intlayer-editor 5.5.2 → 5.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/index-Yc-vRZFR.js +290 -0
- package/client/dist/index.html +1 -1
- package/package.json +28 -25
- package/server/dist/controllers/configuration.controller.cjs +4 -1
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.d.ts +9 -0
- package/server/dist/controllers/configuration.controller.d.ts.map +1 -0
- package/server/dist/controllers/configuration.controller.mjs +4 -1
- package/server/dist/controllers/configuration.controller.mjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +42 -2
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.d.ts +23 -0
- package/server/dist/controllers/dictionary.controller.d.ts.map +1 -0
- package/server/dist/controllers/dictionary.controller.mjs +32 -3
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/server/dist/export.cjs +2 -0
- package/server/dist/export.cjs.map +1 -1
- package/server/dist/export.d.ts +3 -0
- package/server/dist/export.d.ts.map +1 -0
- package/server/dist/export.mjs +1 -0
- package/server/dist/export.mjs.map +1 -1
- package/server/dist/index.d.ts +2 -0
- package/server/dist/index.d.ts.map +1 -0
- package/server/dist/routes/config.routes.d.ts +10 -0
- package/server/dist/routes/config.routes.d.ts.map +1 -0
- package/server/dist/routes/dictionary.routes.cjs +9 -0
- package/server/dist/routes/dictionary.routes.cjs.map +1 -1
- package/server/dist/routes/dictionary.routes.d.ts +15 -0
- package/server/dist/routes/dictionary.routes.d.ts.map +1 -0
- package/server/dist/routes/dictionary.routes.mjs +13 -1
- package/server/dist/routes/dictionary.routes.mjs.map +1 -1
- package/server/dist/types/Routes.d.ts +7 -0
- package/server/dist/types/Routes.d.ts.map +1 -0
- package/server/dist/utils/checkPortAvailability.d.ts +2 -0
- package/server/dist/utils/checkPortAvailability.d.ts.map +1 -0
- package/server/dist/utils/httpStatusCodes.d.ts +395 -0
- package/server/dist/utils/httpStatusCodes.d.ts.map +1 -0
- package/server/dist/utils/responseData.d.ts +64 -0
- package/server/dist/utils/responseData.d.ts.map +1 -0
- package/client/dist/assets/index-A_u6piFE.js +0 -290
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-Bbf3ZyxA.js","assets/html-B8pBdPMQ.js","assets/javascript-BMMyXqK5.js","assets/css-DPfMkruS.js","assets/angular-ts-C26w9mnW.js","assets/scss-OYdSNvt2.js","assets/apl-e980N3t4.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-DAp1zUbp.js","assets/typescript-DlfHMoPT.js","assets/postcss-CXtECtnM.js","assets/blade-DGJDb2eD.js","assets/html-derivative-ZQ8onl8Z.js","assets/sql-B9xm8XSJ.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-CCPHrsME.js","assets/coffee-JUOWOZUj.js","assets/cpp-ChttZZSa.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-CfkhwHAQ.js","assets/shellscript-Yzrsuije.js","assets/edge-CKszZCnI.js","assets/elixir-Cc7HHYVZ.js","assets/elm-DbKCFpqz.js","assets/erb-D3EuUlpm.js","assets/ruby-C5MNRm7z.js","assets/haml-AZXGPtNI.js","assets/graphql-Caa12_AY.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-DQy8In2x.js","assets/markdown-RrBGtqGR.js","assets/gdresource-BSDf9Pz1.js","assets/gdshader-DkwncUOv.js","assets/gdscript-Bty6elJm.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Dz9X99Cm.js","assets/glimmer-ts-aQ3p29eY.js","assets/hack-C1oSbnf3.js","assets/handlebars-YebKLiTq.js","assets/http-C38VWM-o.js","assets/hxml-B2Z6b3nn.js","assets/haxe-BP3HzMA6.js","assets/jinja-BJmZiE_F.js","assets/jison-BCRtk9Os.js","assets/julia-Db79kMu7.js","assets/r-C2tOF0e5.js","assets/latex-okZ41ve_.js","assets/tex-mQPFytnq.js","assets/liquid-C1lUkxsO.js","assets/marko-C0z8HR23.js","assets/less-B1dDrJ26.js","assets/mdc-02rxpBA4.js","assets/nginx-DknmC5AR.js","assets/nim-ANgMEeb1.js","assets/perl-EWVMYlR0.js","assets/php-9PMsNEzE.js","assets/pug-Ch9lOoSd.js","assets/qml-CHzV51_b.js","assets/razor-CNXmhs1n.js","assets/csharp-CHadp7IV.js","assets/rst-DHpKpUMA.js","assets/cmake-D1j8_8rp.js","assets/sas-Dlf3BogE.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-B_7ge1HE.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-C5TGba-T.js","assets/svelte-CXAE1zBs.js","assets/templ-kZcegUSt.js","assets/go-PEFJdsE-.js","assets/ts-tags-CHnADXob.js","assets/twig-febACT8g.js","assets/vue-xz9K_ZKN.js","assets/vue-html-dOMv_FQ0.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var JL=Object.defineProperty;var eM=(e,t,n)=>t in e?JL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>eM(e,typeof t!="symbol"?t+"":t,n);function tM(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 ah(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}},Zl={};/**
|
|
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 KE;function nM(){if(KE)return Zl;KE=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 Zl.Fragment=t,Zl.jsx=n,Zl.jsxs=n,Zl}var WE;function rM(){return WE||(WE=1,Wp.exports=nM()),Wp.exports}var b=rM(),Yp={exports:{}},Ye={};/**
|
|
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 YE;function iM(){if(YE)return Ye;YE=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"),y=Symbol.iterator;function g(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function A(P,Y,F){this.props=P,this.context=Y,this.refs=S,this.updater=F||v}A.prototype.isReactComponent={},A.prototype.setState=function(P,Y){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,Y,"setState")},A.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function w(){}w.prototype=A.prototype;function T(P,Y,F){this.props=P,this.context=Y,this.refs=S,this.updater=F||v}var R=T.prototype=new w;R.constructor=T,x(R,A.prototype),R.isPureReactComponent=!0;var O=Array.isArray,N={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function D(P,Y,F,te,re,fe){return F=fe.ref,{$$typeof:e,type:P,key:Y,ref:F!==void 0?F:null,props:fe}}function L(P,Y){return D(P.type,Y,void 0,void 0,void 0,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function U(P){var Y={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(F){return Y[F]})}var ce=/\/+/g;function ie(P,Y){return typeof P=="object"&&P!==null&&P.key!=null?U(""+P.key):Y.toString(36)}function de(){}function X(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(de,de):(P.status="pending",P.then(function(Y){P.status==="pending"&&(P.status="fulfilled",P.value=Y)},function(Y){P.status==="pending"&&(P.status="rejected",P.reason=Y)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function J(P,Y,F,te,re){var fe=typeof P;(fe==="undefined"||fe==="boolean")&&(P=null);var ge=!1;if(P===null)ge=!0;else switch(fe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(P.$$typeof){case e:case t:ge=!0;break;case m:return ge=P._init,J(ge(P._payload),Y,F,te,re)}}if(ge)return re=re(P),ge=te===""?"."+ie(P,0):te,O(re)?(F="",ge!=null&&(F=ge.replace(ce,"$&/")+"/"),J(re,Y,F,"",function(Oe){return Oe})):re!=null&&(V(re)&&(re=L(re,F+(re.key==null||P&&P.key===re.key?"":(""+re.key).replace(ce,"$&/")+"/")+ge)),Y.push(re)),1;ge=0;var he=te===""?".":te+":";if(O(P))for(var Ee=0;Ee<P.length;Ee++)te=P[Ee],fe=he+ie(te,Ee),ge+=J(te,Y,F,fe,re);else if(Ee=g(P),typeof Ee=="function")for(P=Ee.call(P),Ee=0;!(te=P.next()).done;)te=te.value,fe=he+ie(te,Ee++),ge+=J(te,Y,F,fe,re);else if(fe==="object"){if(typeof P.then=="function")return J(X(P),Y,F,te,re);throw Y=String(P),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ge}function H(P,Y,F){if(P==null)return P;var te=[],re=0;return J(P,te,"","",function(fe){return Y.call(F,fe,re++)}),te}function ne(P){if(P._status===-1){var Y=P._result;Y=Y(),Y.then(function(F){(P._status===0||P._status===-1)&&(P._status=1,P._result=F)},function(F){(P._status===0||P._status===-1)&&(P._status=2,P._result=F)}),P._status===-1&&(P._status=0,P._result=Y)}if(P._status===1)return P._result.default;throw P._result}var q=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)};function ye(){}return Ye.Children={map:H,forEach:function(P,Y,F){H(P,function(){Y.apply(this,arguments)},F)},count:function(P){var Y=0;return H(P,function(){Y++}),Y},toArray:function(P){return H(P,function(Y){return Y})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ye.Component=A,Ye.Fragment=n,Ye.Profiler=a,Ye.PureComponent=T,Ye.StrictMode=r,Ye.Suspense=d,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ye.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ye.cache=function(P){return function(){return P.apply(null,arguments)}},Ye.cloneElement=function(P,Y,F){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var te=x({},P.props),re=P.key,fe=void 0;if(Y!=null)for(ge in Y.ref!==void 0&&(fe=void 0),Y.key!==void 0&&(re=""+Y.key),Y)!M.call(Y,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&Y.ref===void 0||(te[ge]=Y[ge]);var ge=arguments.length-2;if(ge===1)te.children=F;else if(1<ge){for(var he=Array(ge),Ee=0;Ee<ge;Ee++)he[Ee]=arguments[Ee+2];te.children=he}return D(P.type,re,void 0,void 0,fe,te)},Ye.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},Ye.createElement=function(P,Y,F){var te,re={},fe=null;if(Y!=null)for(te in Y.key!==void 0&&(fe=""+Y.key),Y)M.call(Y,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(re[te]=Y[te]);var ge=arguments.length-2;if(ge===1)re.children=F;else if(1<ge){for(var he=Array(ge),Ee=0;Ee<ge;Ee++)he[Ee]=arguments[Ee+2];re.children=he}if(P&&P.defaultProps)for(te in ge=P.defaultProps,ge)re[te]===void 0&&(re[te]=ge[te]);return D(P,fe,void 0,void 0,null,re)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(P){return{$$typeof:u,render:P}},Ye.isValidElement=V,Ye.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:ne}},Ye.memo=function(P,Y){return{$$typeof:f,type:P,compare:Y===void 0?null:Y}},Ye.startTransition=function(P){var Y=N.T,F={};N.T=F;try{var te=P(),re=N.S;re!==null&&re(F,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(ye,q)}catch(fe){q(fe)}finally{N.T=Y}},Ye.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ye.use=function(P){return N.H.use(P)},Ye.useActionState=function(P,Y,F){return N.H.useActionState(P,Y,F)},Ye.useCallback=function(P,Y){return N.H.useCallback(P,Y)},Ye.useContext=function(P){return N.H.useContext(P)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(P,Y){return N.H.useDeferredValue(P,Y)},Ye.useEffect=function(P,Y){return N.H.useEffect(P,Y)},Ye.useId=function(){return N.H.useId()},Ye.useImperativeHandle=function(P,Y,F){return N.H.useImperativeHandle(P,Y,F)},Ye.useInsertionEffect=function(P,Y){return N.H.useInsertionEffect(P,Y)},Ye.useLayoutEffect=function(P,Y){return N.H.useLayoutEffect(P,Y)},Ye.useMemo=function(P,Y){return N.H.useMemo(P,Y)},Ye.useOptimistic=function(P,Y){return N.H.useOptimistic(P,Y)},Ye.useReducer=function(P,Y,F){return N.H.useReducer(P,Y,F)},Ye.useRef=function(P){return N.H.useRef(P)},Ye.useState=function(P){return N.H.useState(P)},Ye.useSyncExternalStore=function(P,Y,F){return N.H.useSyncExternalStore(P,Y,F)},Ye.useTransition=function(){return N.H.useTransition()},Ye.version="19.0.0",Ye}var ZE;function Yc(){return ZE||(ZE=1,Yp.exports=iM()),Yp.exports}var E=Yc();const Ge=ah(E),UT=tM({__proto__:null,default:Ge},[E]);var Zp={exports:{}},Xl={},Xp={exports:{}},Qp={};/**
|
|
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 XE;function aM(){return XE||(XE=1,function(e){function t(H,ne){var q=H.length;H.push(ne);e:for(;0<q;){var ye=q-1>>>1,P=H[ye];if(0<a(P,ne))H[ye]=ne,H[q]=P,q=ye;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ne=H[0],q=H.pop();if(q!==ne){H[0]=q;e:for(var ye=0,P=H.length,Y=P>>>1;ye<Y;){var F=2*(ye+1)-1,te=H[F],re=F+1,fe=H[re];if(0>a(te,q))re<P&&0>a(fe,te)?(H[ye]=fe,H[re]=q,ye=re):(H[ye]=te,H[F]=q,ye=F);else if(re<P&&0>a(fe,q))H[ye]=fe,H[re]=q,ye=re;else break e}}return ne}function a(H,ne){var q=H.sortIndex-ne.sortIndex;return q!==0?q: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,y=null,g=3,v=!1,x=!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 O(H){if(S=!1,R(H),!x)if(n(d)!==null)x=!0,X();else{var ne=n(f);ne!==null&&J(O,ne.startTime-H)}}var N=!1,M=-1,D=5,L=-1;function V(){return!(e.unstable_now()-L<D)}function U(){if(N){var H=e.unstable_now();L=H;var ne=!0;try{e:{x=!1,S&&(S=!1,w(M),M=-1),v=!0;var q=g;try{t:{for(R(H),y=n(d);y!==null&&!(y.expirationTime>H&&V());){var ye=y.callback;if(typeof ye=="function"){y.callback=null,g=y.priorityLevel;var P=ye(y.expirationTime<=H);if(H=e.unstable_now(),typeof P=="function"){y.callback=P,R(H),ne=!0;break t}y===n(d)&&r(d),R(H)}else r(d);y=n(d)}if(y!==null)ne=!0;else{var Y=n(f);Y!==null&&J(O,Y.startTime-H),ne=!1}}break e}finally{y=null,g=q,v=!1}ne=void 0}}finally{ne?ce():N=!1}}}var ce;if(typeof T=="function")ce=function(){T(U)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,de=ie.port2;ie.port1.onmessage=U,ce=function(){de.postMessage(null)}}else ce=function(){A(U,0)};function X(){N||(N=!0,ce())}function J(H,ne){M=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(){x||v||(x=!0,X())},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(H){switch(g){case 1:case 2:case 3:var ne=3;break;default:ne=g}var q=g;g=ne;try{return H()}finally{g=q}},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 q=g;g=H;try{return ne()}finally{g=q}},e.unstable_scheduleCallback=function(H,ne,q){var ye=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ye+q:ye):q=ye,H){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=q+P,H={id:m++,callback:ne,priorityLevel:H,startTime:q,expirationTime:P,sortIndex:-1},q>ye?(H.sortIndex=q,t(f,H),n(d)===null&&H===n(f)&&(S?(w(M),M=-1):S=!0,J(O,q-ye))):(H.sortIndex=P,t(d,H),x||v||(x=!0,X())),H},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(H){var ne=g;return function(){var q=g;g=ne;try{return H.apply(this,arguments)}finally{g=q}}}}(Qp)),Qp}var QE;function sM(){return QE||(QE=1,Xp.exports=aM()),Xp.exports}var Jp={exports:{}},mn={};/**
|
|
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 JE;function oM(){if(JE)return mn;JE=1;var e=Yc();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 y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,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 mn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,mn.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)},mn.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()}},mn.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))},mn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},mn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,y=u(m,f.crossOrigin),g=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:y,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},mn.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)},mn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,y=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:y,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})}},mn.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)},mn.requestFormReset=function(d){r.d.r(d)},mn.unstable_batchedUpdates=function(d,f){return d(f)},mn.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},mn.useFormStatus=function(){return l.H.useHostTransitionStatus()},mn.version="19.0.0",mn}var eS;function HT(){if(eS)return Jp.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(),Jp.exports=oM(),Jp.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 tS;function lM(){if(tS)return Xl;tS=1;var e=sM(),t=Yc(),n=HT();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"),y=Symbol.for("react.provider"),g=Symbol.for("react.consumer"),v=Symbol.for("react.context"),x=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"),O=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function M(i){return i===null||typeof i!="object"?null:(i=N&&i[N]||i["@@iterator"],typeof i=="function"?i:null)}var D=Symbol.for("react.client.reference");function L(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===D?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case d:return"Fragment";case u:return"Portal";case m:return"Profiler";case 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 g:return(i._context.displayName||"Context")+".Consumer";case x: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:L(i.type)||"Memo";case T:s=i._payload,i=i._init;try{return L(i(s))}catch{}}return null}var V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.assign,ce,ie;function de(i){if(ce===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||"",ie=-1<c.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+ce+i+ie}var X=!1;function J(i,s){if(!i||X)return"";X=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ae){var ee=ae}Reflect.construct(i,[],me)}else{try{me.call()}catch(ae){ee=ae}i.call(me.prototype)}}else{try{throw Error()}catch(ae){ee=ae}(me=i())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ae){if(ae&&ee&&typeof ae.stack=="string")return[ae.stack,ee.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 _=h.DetermineComponentFrameRoot(),C=_[0],k=_[1];if(C&&k){var j=C.split(`
|
|
45
|
-
`),$=k.split(`
|
|
46
|
-
`);for(p=h=0;h<j.length&&!j[h].includes("DetermineComponentFrameRoot");)h++;for(;p<$.length&&!$[p].includes("DetermineComponentFrameRoot");)p++;if(h===j.length||p===$.length)for(h=j.length-1,p=$.length-1;1<=h&&0<=p&&j[h]!==$[p];)p--;for(;1<=h&&0<=p;h--,p--)if(j[h]!==$[p]){if(h!==1||p!==1)do if(h--,p--,0>p||j[h]!==$[p]){var se=`
|
|
47
|
-
`+j[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{X=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?de(c):""}function H(i){switch(i.tag){case 26:case 27:case 5:return de(i.type);case 16:return de("Lazy");case 13:return de("Suspense");case 19:return de("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 q(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 ye(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 P(i){if(q(i)!==i)throw Error(r(188))}function Y(i){var s=i.alternate;if(!s){if(s=q(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 _=p.alternate;if(_===null){if(h=p.return,h!==null){c=h;continue}break}if(p.child===_.child){for(_=p.child;_;){if(_===c)return P(p),i;if(_===h)return P(p),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=p,h=_;else{for(var C=!1,k=p.child;k;){if(k===c){C=!0,c=p,h=_;break}if(k===h){C=!0,h=p,c=_;break}k=k.sibling}if(!C){for(k=_.child;k;){if(k===c){C=!0,c=_,h=p;break}if(k===h){C=!0,h=_,c=p;break}k=k.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 te=Array.isArray,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},ge=[],he=-1;function Ee(i){return{current:i}}function Oe(i){0>he||(i.current=ge[he],ge[he]=null,he--)}function Ce(i,s){he++,ge[he]=i.current,i.current=s}var Fe=Ee(null),Ke=Ee(null),Et=Ee(null),Yt=Ee(null);function Ln(i,s){switch(Ce(Et,s),Ce(Ke,i),Ce(Fe,null),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)&&(s=s.namespaceURI)?EE(s):0;break;default:if(i=i===8?s.parentNode:s,s=i.tagName,i=i.namespaceURI)i=EE(i),s=SE(i,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Oe(Fe),Ce(Fe,s)}function Cn(){Oe(Fe),Oe(Ke),Oe(Et)}function pr(i){i.memoizedState!==null&&Ce(Yt,i);var s=Fe.current,c=SE(s,i.type);s!==c&&(Ce(Ke,i),Ce(Fe,c))}function Na(i){Ke.current===i&&(Oe(Fe),Oe(Ke)),Yt.current===i&&(Oe(Yt),$l._currentValue=fe)}var gr=Object.prototype.hasOwnProperty,z=e.unstable_scheduleCallback,Q=e.unstable_cancelCallback,oe=e.unstable_shouldYield,we=e.unstable_requestPaint,_e=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Pe=e.unstable_ImmediatePriority,ct=e.unstable_UserBlockingPriority,ht=e.unstable_NormalPriority,Rn=e.unstable_LowPriority,ka=e.unstable_IdlePriority,kr=e.log,Uh=e.unstable_setDisableYieldValue,ei=null,rn=null;function Hh(i){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(ei,i,void 0,(i.current.flags&128)===128)}catch{}}function yr(i){if(typeof kr=="function"&&Uh(i),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(ei,i)}catch{}}var _n=Math.clz32?Math.clz32:zD,yu=Math.log,BD=Math.LN2;function zD(i){return i>>>=0,i===0?32:31-(yu(i)/BD|0)|0}var vu=128,bu=4194304;function Oa(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 _u(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,p=i.suspendedLanes,_=i.pingedLanes,C=i.warmLanes;i=i.finishedLanes!==0;var k=c&134217727;return k!==0?(c=k&~p,c!==0?h=Oa(c):(_&=k,_!==0?h=Oa(_):i||(C=k&~C,C!==0&&(h=Oa(C))))):(k=c&~p,k!==0?h=Oa(k):_!==0?h=Oa(_):i||(C=c&~C,C!==0&&(h=Oa(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 tl(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function UD(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 m0(){var i=vu;return vu<<=1,(vu&4194176)===0&&(vu=128),i}function p0(){var i=bu;return bu<<=1,(bu&62914560)===0&&(bu=4194304),i}function Fh(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function nl(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function HD(i,s,c,h,p,_){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 k=i.entanglements,j=i.expirationTimes,$=i.hiddenUpdates;for(c=C&~c;0<c;){var se=31-_n(c),me=1<<se;k[se]=0,j[se]=-1;var ee=$[se];if(ee!==null)for($[se]=null,se=0;se<ee.length;se++){var ae=ee[se];ae!==null&&(ae.lane&=-536870913)}c&=~me}h!==0&&g0(i,h,0),_!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=_&~(C&~s))}function g0(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var h=31-_n(s);i.entangledLanes|=s,i.entanglements[h]=i.entanglements[h]|1073741824|c&4194218}function y0(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-_n(c),p=1<<h;p&s|i[h]&s&&(i[h]|=s),c&=~p}}function v0(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function b0(){var i=re.p;return i!==0?i:(i=window.event,i===void 0?32:UE(i.type))}function FD(i,s){var c=re.p;try{return re.p=i,s()}finally{re.p=c}}var Li=Math.random().toString(36).slice(2),fn="__reactFiber$"+Li,Nn="__reactProps$"+Li,Ss="__reactContainer$"+Li,Gh="__reactEvents$"+Li,GD="__reactListeners$"+Li,$D="__reactHandles$"+Li,_0="__reactResources$"+Li,rl="__reactMarker$"+Li;function $h(i){delete i[fn],delete i[Nn],delete i[Gh],delete i[GD],delete i[$D]}function Da(i){var s=i[fn];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Ss]||c[fn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=TE(i);i!==null;){if(c=i[fn])return c;i=TE(i)}return s}i=c,c=i.parentNode}return null}function As(i){if(i=i[fn]||i[Ss]){var s=i.tag;if(s===5||s===6||s===13||s===26||s===27||s===3)return i}return null}function il(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function ws(i){var s=i[_0];return s||(s=i[_0]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Zt(i){i[rl]=!0}var x0=new Set,E0={};function Ia(i,s){Ts(i,s),Ts(i+"Capture",s)}function Ts(i,s){for(E0[i]=s,i=0;i<s.length;i++)x0.add(s[i])}var ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qD=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]*$"),S0={},A0={};function KD(i){return gr.call(A0,i)?!0:gr.call(S0,i)?!1:qD.test(i)?A0[i]=!0:(S0[i]=!0,!1)}function xu(i,s,c){if(KD(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 Eu(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 ni(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 Kn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function w0(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function WD(i){var s=w0(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,_=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return p.call(this)},set:function(C){h=""+C,_.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 Su(i){i._valueTracker||(i._valueTracker=WD(i))}function T0(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=w0(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function Au(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 YD=/[\n"\\]/g;function Wn(i){return i.replace(YD,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function qh(i,s,c,h,p,_,C,k){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=""+Kn(s)):i.value!==""+Kn(s)&&(i.value=""+Kn(s)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),s!=null?Kh(i,C,Kn(s)):c!=null?Kh(i,C,Kn(c)):h!=null&&i.removeAttribute("value"),p==null&&_!=null&&(i.defaultChecked=!!_),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Kn(k):i.removeAttribute("name")}function C0(i,s,c,h,p,_,C,k){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null))return;c=c!=null?""+Kn(c):"",s=s!=null?""+Kn(s):c,k||s===i.value||(i.value=s),i.defaultValue=s}h=h??p,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=k?i.checked:!!h,i.defaultChecked=!!h,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C)}function Kh(i,s,c){s==="number"&&Au(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Cs(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=""+Kn(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 R0(i,s,c){if(s!=null&&(s=""+Kn(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+Kn(c):""}function N0(i,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(te(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=Kn(s),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h)}function Rs(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ZD=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 k0(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||ZD.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function O0(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&&k0(i,p,h)}else for(var _ in s)s.hasOwnProperty(_)&&k0(i,_,s[_])}function Wh(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 XD=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"]]),QD=/^[\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 wu(i){return QD.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var Yh=null;function Zh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ns=null,ks=null;function D0(i){var s=As(i);if(s&&(i=s.stateNode)){var c=i[Nn]||null;e:switch(i=s.stateNode,s.type){case"input":if(qh(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="'+Wn(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var p=h[Nn]||null;if(!p)throw Error(r(90));qh(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&&T0(h)}break e;case"textarea":R0(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Cs(i,!!c.multiple,s,!1)}}}var Xh=!1;function I0(i,s,c){if(Xh)return i(s,c);Xh=!0;try{var h=i(s);return h}finally{if(Xh=!1,(Ns!==null||ks!==null)&&(ld(),Ns&&(s=Ns,i=ks,ks=Ns=null,D0(s),i)))for(s=0;s<i.length;s++)D0(i[s])}}function al(i,s){var c=i.stateNode;if(c===null)return null;var h=c[Nn]||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 Qh=!1;if(ti)try{var sl={};Object.defineProperty(sl,"passive",{get:function(){Qh=!0}}),window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{Qh=!1}var Mi=null,Jh=null,Tu=null;function L0(){if(Tu)return Tu;var i,s=Jh,c=s.length,h,p="value"in Mi?Mi.value:Mi.textContent,_=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[_-h];h++);return Tu=p.slice(i,1<h?1-h:void 0)}function Cu(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 Ru(){return!0}function M0(){return!1}function kn(i){function s(c,h,p,_,C){this._reactName=c,this._targetInst=p,this.type=h,this.nativeEvent=_,this.target=C,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(c=i[k],this[k]=c?c(_):_[k]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Ru:M0,this.isPropagationStopped=M0,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=Ru)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Ru)},persist:function(){},isPersistent:Ru}),s}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nu=kn(La),ol=U({},La,{view:0,detail:0}),JD=kn(ol),em,tm,ll,ku=U({},ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rm,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!==ll&&(ll&&i.type==="mousemove"?(em=i.screenX-ll.screenX,tm=i.screenY-ll.screenY):tm=em=0,ll=i),em)},movementY:function(i){return"movementY"in i?i.movementY:tm}}),j0=kn(ku),eI=U({},ku,{dataTransfer:0}),tI=kn(eI),nI=U({},ol,{relatedTarget:0}),nm=kn(nI),rI=U({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),iI=kn(rI),aI=U({},La,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),sI=kn(aI),oI=U({},La,{data:0}),P0=kn(oI),lI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cI={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"},uI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dI(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=uI[i])?!!s[i]:!1}function rm(){return dI}var fI=U({},ol,{key:function(i){if(i.key){var s=lI[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Cu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?cI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rm,charCode:function(i){return i.type==="keypress"?Cu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Cu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),hI=kn(fI),mI=U({},ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),V0=kn(mI),pI=U({},ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rm}),gI=kn(pI),yI=U({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),vI=kn(yI),bI=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}),_I=kn(bI),xI=U({},La,{newState:0,oldState:0}),EI=kn(xI),SI=[9,13,27,32],im=ti&&"CompositionEvent"in window,cl=null;ti&&"documentMode"in document&&(cl=document.documentMode);var AI=ti&&"TextEvent"in window&&!cl,B0=ti&&(!im||cl&&8<cl&&11>=cl),z0=" ",U0=!1;function H0(i,s){switch(i){case"keyup":return SI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Os=!1;function wI(i,s){switch(i){case"compositionend":return F0(s);case"keypress":return s.which!==32?null:(U0=!0,z0);case"textInput":return i=s.data,i===z0&&U0?null:i;default:return null}}function TI(i,s){if(Os)return i==="compositionend"||!im&&H0(i,s)?(i=L0(),Tu=Jh=Mi=null,Os=!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 B0&&s.locale!=="ko"?null:s.data;default:return null}}var CI={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 G0(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!CI[i.type]:s==="textarea"}function $0(i,s,c,h){Ns?ks?ks.push(h):ks=[h]:Ns=h,s=hd(s,"onChange"),0<s.length&&(c=new Nu("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var ul=null,dl=null;function RI(i){yE(i,0)}function Ou(i){var s=il(i);if(T0(s))return i}function q0(i,s){if(i==="change")return s}var K0=!1;if(ti){var am;if(ti){var sm="oninput"in document;if(!sm){var W0=document.createElement("div");W0.setAttribute("oninput","return;"),sm=typeof W0.oninput=="function"}am=sm}else am=!1;K0=am&&(!document.documentMode||9<document.documentMode)}function Y0(){ul&&(ul.detachEvent("onpropertychange",Z0),dl=ul=null)}function Z0(i){if(i.propertyName==="value"&&Ou(dl)){var s=[];$0(s,dl,i,Zh(i)),I0(RI,s)}}function NI(i,s,c){i==="focusin"?(Y0(),ul=s,dl=c,ul.attachEvent("onpropertychange",Z0)):i==="focusout"&&Y0()}function kI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ou(dl)}function OI(i,s){if(i==="click")return Ou(s)}function DI(i,s){if(i==="input"||i==="change")return Ou(s)}function II(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Mn=typeof Object.is=="function"?Object.is:II;function fl(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(!gr.call(s,p)||!Mn(i[p],s[p]))return!1}return!0}function X0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Q0(i,s){var c=X0(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=X0(c)}}function J0(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?J0(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function e_(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Au(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=Au(i.document)}return s}function om(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 LI(i,s){var c=e_(s);s=i.focusedElem;var h=i.selectionRange;if(c!==s&&s&&s.ownerDocument&&J0(s.ownerDocument.documentElement,s)){if(h!==null&&om(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,_=Math.min(h.start,p);h=h.end===void 0?_:Math.min(h.end,p),!c.extend&&_>h&&(p=h,h=_,_=p),p=Q0(s,_);var C=Q0(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(),_>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 MI=ti&&"documentMode"in document&&11>=document.documentMode,Ds=null,lm=null,hl=null,cm=!1;function t_(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;cm||Ds==null||Ds!==Au(h)||(h=Ds,"selectionStart"in h&&om(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}),hl&&fl(hl,h)||(hl=h,h=hd(lm,"onSelect"),0<h.length&&(s=new Nu("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ds)))}function Ma(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Is={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionrun:Ma("Transition","TransitionRun"),transitionstart:Ma("Transition","TransitionStart"),transitioncancel:Ma("Transition","TransitionCancel"),transitionend:Ma("Transition","TransitionEnd")},um={},n_={};ti&&(n_=document.createElement("div").style,"AnimationEvent"in window||(delete Is.animationend.animation,delete Is.animationiteration.animation,delete Is.animationstart.animation),"TransitionEvent"in window||delete Is.transitionend.transition);function ja(i){if(um[i])return um[i];if(!Is[i])return i;var s=Is[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in n_)return um[i]=s[c];return i}var r_=ja("animationend"),i_=ja("animationiteration"),a_=ja("animationstart"),jI=ja("transitionrun"),PI=ja("transitionstart"),VI=ja("transitioncancel"),s_=ja("transitionend"),o_=new Map,l_="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 vr(i,s){o_.set(i,s),Ia(s,[i])}var Yn=[],Ls=0,dm=0;function Du(){for(var i=Ls,s=dm=Ls=0;s<i;){var c=Yn[s];Yn[s++]=null;var h=Yn[s];Yn[s++]=null;var p=Yn[s];Yn[s++]=null;var _=Yn[s];if(Yn[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}_!==0&&c_(c,p,_)}}function Iu(i,s,c,h){Yn[Ls++]=i,Yn[Ls++]=s,Yn[Ls++]=c,Yn[Ls++]=h,dm|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function fm(i,s,c,h){return Iu(i,s,c,h),Lu(i)}function ji(i,s){return Iu(i,null,null,s),Lu(i)}function c_(i,s,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var p=!1,_=i.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(p=!0)),i=_,_=_.return;p&&s!==null&&i.tag===3&&(_=i.stateNode,p=31-_n(c),_=_.hiddenUpdates,i=_[p],i===null?_[p]=[s]:i.push(s),s.lane=c|536870912)}function Lu(i){if(50<Vl)throw Vl=0,vp=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Ms={},u_=new WeakMap;function Zn(i,s){if(typeof i=="object"&&i!==null){var c=u_.get(i);return c!==void 0?c:(s={value:i,source:s,stack:ne(s)},u_.set(i,s),s)}return{value:i,source:s,stack:ne(s)}}var js=[],Ps=0,Mu=null,ju=0,Xn=[],Qn=0,Pa=null,ri=1,ii="";function Va(i,s){js[Ps++]=ju,js[Ps++]=Mu,Mu=i,ju=s}function d_(i,s,c){Xn[Qn++]=ri,Xn[Qn++]=ii,Xn[Qn++]=Pa,Pa=i;var h=ri;i=ii;var p=32-_n(h)-1;h&=~(1<<p),c+=1;var _=32-_n(s)+p;if(30<_){var C=p-p%5;_=(h&(1<<C)-1).toString(32),h>>=C,p-=C,ri=1<<32-_n(s)+p|c<<p|h,ii=_+i}else ri=1<<_|c<<p|h,ii=i}function hm(i){i.return!==null&&(Va(i,1),d_(i,1,0))}function mm(i){for(;i===Mu;)Mu=js[--Ps],js[Ps]=null,ju=js[--Ps],js[Ps]=null;for(;i===Pa;)Pa=Xn[--Qn],Xn[Qn]=null,ii=Xn[--Qn],Xn[Qn]=null,ri=Xn[--Qn],Xn[Qn]=null}var xn=null,an=null,ut=!1,br=null,Or=!1,pm=Error(r(519));function Ba(i){var s=Error(r(418,""));throw gl(Zn(s,i)),pm}function f_(i){var s=i.stateNode,c=i.type,h=i.memoizedProps;switch(s[fn]=i,s[Nn]=h,c){case"dialog":at("cancel",s),at("close",s);break;case"iframe":case"object":case"embed":at("load",s);break;case"video":case"audio":for(c=0;c<zl.length;c++)at(zl[c],s);break;case"source":at("error",s);break;case"img":case"image":case"link":at("error",s),at("load",s);break;case"details":at("toggle",s);break;case"input":at("invalid",s),C0(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),Su(s);break;case"select":at("invalid",s);break;case"textarea":at("invalid",s),N0(s,h.value,h.defaultValue,h.children),Su(s)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||xE(s.textContent,c)?(h.popover!=null&&(at("beforetoggle",s),at("toggle",s)),h.onScroll!=null&&at("scroll",s),h.onScrollEnd!=null&&at("scrollend",s),h.onClick!=null&&(s.onclick=md),s=!0):s=!1,s||Ba(i)}function h_(i){for(xn=i.return;xn;)switch(xn.tag){case 3:case 27:Or=!0;return;case 5:case 13:Or=!1;return;default:xn=xn.return}}function ml(i){if(i!==xn)return!1;if(!ut)return h_(i),ut=!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")||Mp(i.type,i.memoizedProps)),c=!c),c&&(s=!0),s&&an&&Ba(i),h_(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=xr(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++;i=i.nextSibling}an=null}}else an=xn?xr(i.stateNode.nextSibling):null;return!0}function pl(){an=xn=null,ut=!1}function gl(i){br===null?br=[i]:br.push(i)}var yl=Error(r(460)),m_=Error(r(474)),gm={then:function(){}};function p_(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Pu(){}function g_(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(Pu,Pu),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,i===yl?Error(r(483)):i;default:if(typeof s.status=="string")s.then(Pu,Pu);else{if(i=bt,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===yl?Error(r(483)):i}throw vl=s,yl}}var vl=null;function y_(){if(vl===null)throw Error(r(459));var i=vl;return vl=null,i}var Vs=null,bl=0;function Vu(i){var s=bl;return bl+=1,Vs===null&&(Vs=[]),g_(Vs,i,s)}function _l(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function Bu(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(W,G){if(i){var Z=W.deletions;Z===null?(W.deletions=[G],W.flags|=16):Z.push(G)}}function c(W,G){if(!i)return null;for(;G!==null;)s(W,G),G=G.sibling;return null}function h(W){for(var G=new Map;W!==null;)W.key!==null?G.set(W.key,W):G.set(W.index,W),W=W.sibling;return G}function p(W,G){return W=Wi(W,G),W.index=0,W.sibling=null,W}function _(W,G,Z){return W.index=Z,i?(Z=W.alternate,Z!==null?(Z=Z.index,Z<G?(W.flags|=33554434,G):Z):(W.flags|=33554434,G)):(W.flags|=1048576,G)}function C(W){return i&&W.alternate===null&&(W.flags|=33554434),W}function k(W,G,Z,ue){return G===null||G.tag!==6?(G=up(Z,W.mode,ue),G.return=W,G):(G=p(G,Z),G.return=W,G)}function j(W,G,Z,ue){var Re=Z.type;return Re===d?se(W,G,Z.props.children,ue,Z.key):G!==null&&(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&v_(Re)===G.type)?(G=p(G,Z.props),_l(G,Z),G.return=W,G):(G=rd(Z.type,Z.key,Z.props,null,W.mode,ue),_l(G,Z),G.return=W,G)}function $(W,G,Z,ue){return G===null||G.tag!==4||G.stateNode.containerInfo!==Z.containerInfo||G.stateNode.implementation!==Z.implementation?(G=dp(Z,W.mode,ue),G.return=W,G):(G=p(G,Z.children||[]),G.return=W,G)}function se(W,G,Z,ue,Re){return G===null||G.tag!==7?(G=Ya(Z,W.mode,ue,Re),G.return=W,G):(G=p(G,Z),G.return=W,G)}function me(W,G,Z){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=up(""+G,W.mode,Z),G.return=W,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case l:return Z=rd(G.type,G.key,G.props,null,W.mode,Z),_l(Z,G),Z.return=W,Z;case u:return G=dp(G,W.mode,Z),G.return=W,G;case T:var ue=G._init;return G=ue(G._payload),me(W,G,Z)}if(te(G)||M(G))return G=Ya(G,W.mode,Z,null),G.return=W,G;if(typeof G.then=="function")return me(W,Vu(G),Z);if(G.$$typeof===v)return me(W,ed(W,G),Z);Bu(W,G)}return null}function ee(W,G,Z,ue){var Re=G!==null?G.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Re!==null?null:k(W,G,""+Z,ue);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case l:return Z.key===Re?j(W,G,Z,ue):null;case u:return Z.key===Re?$(W,G,Z,ue):null;case T:return Re=Z._init,Z=Re(Z._payload),ee(W,G,Z,ue)}if(te(Z)||M(Z))return Re!==null?null:se(W,G,Z,ue,null);if(typeof Z.then=="function")return ee(W,G,Vu(Z),ue);if(Z.$$typeof===v)return ee(W,G,ed(W,Z),ue);Bu(W,Z)}return null}function ae(W,G,Z,ue,Re){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return W=W.get(Z)||null,k(G,W,""+ue,Re);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case l:return W=W.get(ue.key===null?Z:ue.key)||null,j(G,W,ue,Re);case u:return W=W.get(ue.key===null?Z:ue.key)||null,$(G,W,ue,Re);case T:var tt=ue._init;return ue=tt(ue._payload),ae(W,G,Z,ue,Re)}if(te(ue)||M(ue))return W=W.get(Z)||null,se(G,W,ue,Re,null);if(typeof ue.then=="function")return ae(W,G,Z,Vu(ue),Re);if(ue.$$typeof===v)return ae(W,G,Z,ed(G,ue),Re);Bu(G,ue)}return null}function Me(W,G,Z,ue){for(var Re=null,tt=null,Ve=G,Be=G=0,Jt=null;Ve!==null&&Be<Z.length;Be++){Ve.index>Be?(Jt=Ve,Ve=null):Jt=Ve.sibling;var dt=ee(W,Ve,Z[Be],ue);if(dt===null){Ve===null&&(Ve=Jt);break}i&&Ve&&dt.alternate===null&&s(W,Ve),G=_(dt,G,Be),tt===null?Re=dt:tt.sibling=dt,tt=dt,Ve=Jt}if(Be===Z.length)return c(W,Ve),ut&&Va(W,Be),Re;if(Ve===null){for(;Be<Z.length;Be++)Ve=me(W,Z[Be],ue),Ve!==null&&(G=_(Ve,G,Be),tt===null?Re=Ve:tt.sibling=Ve,tt=Ve);return ut&&Va(W,Be),Re}for(Ve=h(Ve);Be<Z.length;Be++)Jt=ae(Ve,W,Be,Z[Be],ue),Jt!==null&&(i&&Jt.alternate!==null&&Ve.delete(Jt.key===null?Be:Jt.key),G=_(Jt,G,Be),tt===null?Re=Jt:tt.sibling=Jt,tt=Jt);return i&&Ve.forEach(function(ta){return s(W,ta)}),ut&&Va(W,Be),Re}function $e(W,G,Z,ue){if(Z==null)throw Error(r(151));for(var Re=null,tt=null,Ve=G,Be=G=0,Jt=null,dt=Z.next();Ve!==null&&!dt.done;Be++,dt=Z.next()){Ve.index>Be?(Jt=Ve,Ve=null):Jt=Ve.sibling;var ta=ee(W,Ve,dt.value,ue);if(ta===null){Ve===null&&(Ve=Jt);break}i&&Ve&&ta.alternate===null&&s(W,Ve),G=_(ta,G,Be),tt===null?Re=ta:tt.sibling=ta,tt=ta,Ve=Jt}if(dt.done)return c(W,Ve),ut&&Va(W,Be),Re;if(Ve===null){for(;!dt.done;Be++,dt=Z.next())dt=me(W,dt.value,ue),dt!==null&&(G=_(dt,G,Be),tt===null?Re=dt:tt.sibling=dt,tt=dt);return ut&&Va(W,Be),Re}for(Ve=h(Ve);!dt.done;Be++,dt=Z.next())dt=ae(Ve,W,Be,dt.value,ue),dt!==null&&(i&&dt.alternate!==null&&Ve.delete(dt.key===null?Be:dt.key),G=_(dt,G,Be),tt===null?Re=dt:tt.sibling=dt,tt=dt);return i&&Ve.forEach(function(QL){return s(W,QL)}),ut&&Va(W,Be),Re}function Dt(W,G,Z,ue){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(W,G.sibling),ue=p(G,Z.props.children),ue.return=W,W=ue;break e}}else if(G.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===T&&v_(Re)===G.type){c(W,G.sibling),ue=p(G,Z.props),_l(ue,Z),ue.return=W,W=ue;break e}c(W,G);break}else s(W,G);G=G.sibling}Z.type===d?(ue=Ya(Z.props.children,W.mode,ue,Z.key),ue.return=W,W=ue):(ue=rd(Z.type,Z.key,Z.props,null,W.mode,ue),_l(ue,Z),ue.return=W,W=ue)}return C(W);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(W,G.sibling),ue=p(G,Z.children||[]),ue.return=W,W=ue;break e}else{c(W,G);break}else s(W,G);G=G.sibling}ue=dp(Z,W.mode,ue),ue.return=W,W=ue}return C(W);case T:return Re=Z._init,Z=Re(Z._payload),Dt(W,G,Z,ue)}if(te(Z))return Me(W,G,Z,ue);if(M(Z)){if(Re=M(Z),typeof Re!="function")throw Error(r(150));return Z=Re.call(Z),$e(W,G,Z,ue)}if(typeof Z.then=="function")return Dt(W,G,Vu(Z),ue);if(Z.$$typeof===v)return Dt(W,G,ed(W,Z),ue);Bu(W,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,G!==null&&G.tag===6?(c(W,G.sibling),ue=p(G,Z),ue.return=W,W=ue):(c(W,G),ue=up(Z,W.mode,ue),ue.return=W,W=ue),C(W)):c(W,G)}return function(W,G,Z,ue){try{bl=0;var Re=Dt(W,G,Z,ue);return Vs=null,Re}catch(Ve){if(Ve===yl)throw Ve;var tt=nr(29,Ve,null,W.mode);return tt.lanes=ue,tt.return=W,tt}finally{}}}var za=b_(!0),__=b_(!1),Bs=Ee(null),zu=Ee(0);function x_(i,s){i=pi,Ce(zu,i),Ce(Bs,s),pi=i|s.baseLanes}function ym(){Ce(zu,pi),Ce(Bs,Bs.current)}function vm(){pi=zu.current,Oe(Bs),Oe(zu)}var Jn=Ee(null),Dr=null;function Pi(i){var s=i.alternate;Ce(Ft,Ft.current&1),Ce(Jn,i),Dr===null&&(s===null||Bs.current!==null||s.memoizedState!==null)&&(Dr=i)}function E_(i){if(i.tag===22){if(Ce(Ft,Ft.current),Ce(Jn,i),Dr===null){var s=i.alternate;s!==null&&s.memoizedState!==null&&(Dr=i)}}else Vi()}function Vi(){Ce(Ft,Ft.current),Ce(Jn,Jn.current)}function ai(i){Oe(Jn),Dr===i&&(Dr=null),Oe(Ft)}var Ft=Ee(0);function Uu(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 BI=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()})}},zI=e.unstable_scheduleCallback,UI=e.unstable_NormalPriority,Gt={$$typeof:v,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bm(){return{controller:new BI,data:new Map,refCount:0}}function xl(i){i.refCount--,i.refCount===0&&zI(UI,function(){i.controller.abort()})}var El=null,_m=0,zs=0,Us=null;function HI(i,s){if(El===null){var c=El=[];_m=0,zs=Tp(),Us={status:"pending",value:void 0,then:function(h){c.push(h)}}}return _m++,s.then(S_,S_),s}function S_(){if(--_m===0&&El!==null){Us!==null&&(Us.status="fulfilled");var i=El;El=null,zs=0,Us=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function FI(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 A_=V.S;V.S=function(i,s){typeof s=="object"&&s!==null&&typeof s.then=="function"&&HI(i,s),A_!==null&&A_(i,s)};var Ua=Ee(null);function xm(){var i=Ua.current;return i!==null?i:bt.pooledCache}function Hu(i,s){s===null?Ce(Ua,Ua.current):Ce(Ua,s.pool)}function w_(){var i=xm();return i===null?null:{parent:Gt._currentValue,pool:i}}var Bi=0,Je=null,pt=null,Vt=null,Fu=!1,Hs=!1,Ha=!1,Gu=0,Sl=0,Fs=null,GI=0;function Lt(){throw Error(r(321))}function Em(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 Sm(i,s,c,h,p,_){return Bi=_,Je=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,V.H=i===null||i.memoizedState===null?Fa:zi,Ha=!1,_=c(h,p),Ha=!1,Hs&&(_=C_(s,c,h,p)),T_(i),_}function T_(i){V.H=Ir;var s=pt!==null&&pt.next!==null;if(Bi=0,Vt=pt=Je=null,Fu=!1,Sl=0,Fs=null,s)throw Error(r(300));i===null||Xt||(i=i.dependencies,i!==null&&Ju(i)&&(Xt=!0))}function C_(i,s,c,h){Je=i;var p=0;do{if(Hs&&(Fs=null),Sl=0,Hs=!1,25<=p)throw Error(r(301));if(p+=1,Vt=pt=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}V.H=Ga,_=s(c,h)}while(Hs);return _}function $I(){var i=V.H,s=i.useState()[0];return s=typeof s.then=="function"?Al(s):s,i=i.useState()[0],(pt!==null?pt.memoizedState:null)!==i&&(Je.flags|=1024),s}function Am(){var i=Gu!==0;return Gu=0,i}function wm(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function Tm(i){if(Fu){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Fu=!1}Bi=0,Vt=pt=Je=null,Hs=!1,Sl=Gu=0,Fs=null}function On(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Je.memoizedState=Vt=i:Vt=Vt.next=i,Vt}function Bt(){if(pt===null){var i=Je.alternate;i=i!==null?i.memoizedState:null}else i=pt.next;var s=Vt===null?Je.memoizedState:Vt.next;if(s!==null)Vt=s,pt=i;else{if(i===null)throw Je.alternate===null?Error(r(467)):Error(r(310));pt=i,i={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Vt===null?Je.memoizedState=Vt=i:Vt=Vt.next=i}return Vt}var $u;$u=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Al(i){var s=Sl;return Sl+=1,Fs===null&&(Fs=[]),i=g_(Fs,i,s),s=Je,(Vt===null?s.memoizedState:Vt.next)===null&&(s=s.alternate,V.H=s===null||s.memoizedState===null?Fa:zi),i}function qu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Al(i);if(i.$$typeof===v)return hn(i)}throw Error(r(438,String(i)))}function Cm(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=$u(),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]=O;return s.index++,c}function si(i,s){return typeof s=="function"?s(i):s}function Ku(i){var s=Bt();return Rm(s,pt,i)}function Rm(i,s,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var p=i.baseQueue,_=h.pending;if(_!==null){if(p!==null){var C=p.next;p.next=_.next,_.next=C}s.baseQueue=p=_,h.pending=null}if(_=i.baseState,p===null)i.memoizedState=_;else{s=p.next;var k=C=null,j=null,$=s,se=!1;do{var me=$.lane&-536870913;if(me!==$.lane?(ot&me)===me:(Bi&me)===me){var ee=$.revertLane;if(ee===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),me===zs&&(se=!0);else if((Bi&ee)===ee){$=$.next,ee===zs&&(se=!0);continue}else me={lane:0,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},j===null?(k=j=me,C=_):j=j.next=me,Je.lanes|=ee,Yi|=ee;me=$.action,Ha&&c(_,me),_=$.hasEagerState?$.eagerState:c(_,me)}else ee={lane:me,revertLane:$.revertLane,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},j===null?(k=j=ee,C=_):j=j.next=ee,Je.lanes|=me,Yi|=me;$=$.next}while($!==null&&$!==s);if(j===null?C=_:j.next=k,!Mn(_,i.memoizedState)&&(Xt=!0,se&&(c=Us,c!==null)))throw c;i.memoizedState=_,i.baseState=C,i.baseQueue=j,h.lastRenderedState=_}return p===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function Nm(i){var s=Bt(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,p=c.pending,_=s.memoizedState;if(p!==null){c.pending=null;var C=p=p.next;do _=i(_,C.action),C=C.next;while(C!==p);Mn(_,s.memoizedState)||(Xt=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),c.lastRenderedState=_}return[_,h]}function R_(i,s,c){var h=Je,p=Bt(),_=ut;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var C=!Mn((pt||p).memoizedState,c);if(C&&(p.memoizedState=c,Xt=!0),p=p.queue,Dm(O_.bind(null,h,p,i),[i]),p.getSnapshot!==s||C||Vt!==null&&Vt.memoizedState.tag&1){if(h.flags|=2048,Gs(9,k_.bind(null,h,p,c,s),{destroy:void 0},null),bt===null)throw Error(r(349));_||(Bi&60)!==0||N_(h,s,c)}return c}function N_(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Je.updateQueue,s===null?(s=$u(),Je.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function k_(i,s,c,h){s.value=c,s.getSnapshot=h,D_(s)&&I_(i)}function O_(i,s,c){return c(function(){D_(s)&&I_(i)})}function D_(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Mn(i,c)}catch{return!0}}function I_(i){var s=ji(i,2);s!==null&&En(s,i,2)}function km(i){var s=On();if(typeof i=="function"){var c=i;if(i=c(),Ha){yr(!0);try{c()}finally{yr(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},s}function L_(i,s,c,h){return i.baseState=c,Rm(i,pt,typeof h=="function"?h:si)}function qI(i,s,c,h,p){if(Zu(i))throw Error(r(485));if(i=s.action,i!==null){var _={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){_.listeners.push(C)}};V.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,M_(s,_)):(_.next=c.next,s.pending=c.next=_)}}function M_(i,s){var c=s.action,h=s.payload,p=i.state;if(s.isTransition){var _=V.T,C={};V.T=C;try{var k=c(p,h),j=V.S;j!==null&&j(C,k),j_(i,s,k)}catch($){Om(i,s,$)}finally{V.T=_}}else try{_=c(p,h),j_(i,s,_)}catch($){Om(i,s,$)}}function j_(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){P_(i,s,h)},function(h){return Om(i,s,h)}):P_(i,s,c)}function P_(i,s,c){s.status="fulfilled",s.value=c,V_(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,M_(i,c)))}function Om(i,s,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,V_(s),s=s.next;while(s!==h)}i.action=null}function V_(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function B_(i,s){return s}function z_(i,s){if(ut){var c=bt.formState;if(c!==null){e:{var h=Je;if(ut){if(an){t:{for(var p=an,_=Or;p.nodeType!==8;){if(!_){p=null;break t}if(p=xr(p.nextSibling),p===null){p=null;break t}}_=p.data,p=_==="F!"||_==="F"?p:null}if(p){an=xr(p.nextSibling),h=p.data==="F!";break e}}Ba(h)}h=!1}h&&(s=c[0])}}return c=On(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B_,lastRenderedState:s},c.queue=h,c=ix.bind(null,Je,h),h.dispatch=c,h=km(!1),_=Pm.bind(null,Je,!1,h.queue),h=On(),p={state:s,dispatch:null,action:i,pending:null},h.queue=p,c=qI.bind(null,Je,p,_,c),p.dispatch=c,h.memoizedState=i,[s,c,!1]}function U_(i){var s=Bt();return H_(s,pt,i)}function H_(i,s,c){s=Rm(i,s,B_)[0],i=Ku(si)[0],s=typeof s=="object"&&s!==null&&typeof s.then=="function"?Al(s):s;var h=Bt(),p=h.queue,_=p.dispatch;return c!==h.memoizedState&&(Je.flags|=2048,Gs(9,KI.bind(null,p,c),{destroy:void 0},null)),[s,_,i]}function KI(i,s){i.action=s}function F_(i){var s=Bt(),c=pt;if(c!==null)return H_(s,c,i);Bt(),s=s.memoizedState,c=Bt();var h=c.queue.dispatch;return c.memoizedState=i,[s,h,!1]}function Gs(i,s,c,h){return i={tag:i,create:s,inst:c,deps:h,next:null},s=Je.updateQueue,s===null&&(s=$u(),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 G_(){return Bt().memoizedState}function Wu(i,s,c,h){var p=On();Je.flags|=i,p.memoizedState=Gs(1|s,c,{destroy:void 0},h===void 0?null:h)}function Yu(i,s,c,h){var p=Bt();h=h===void 0?null:h;var _=p.memoizedState.inst;pt!==null&&h!==null&&Em(h,pt.memoizedState.deps)?p.memoizedState=Gs(s,c,_,h):(Je.flags|=i,p.memoizedState=Gs(1|s,c,_,h))}function $_(i,s){Wu(8390656,8,i,s)}function Dm(i,s){Yu(2048,8,i,s)}function q_(i,s){return Yu(4,2,i,s)}function K_(i,s){return Yu(4,4,i,s)}function W_(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 Y_(i,s,c){c=c!=null?c.concat([i]):null,Yu(4,4,W_.bind(null,s,i),c)}function Im(){}function Z_(i,s){var c=Bt();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&Em(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function X_(i,s){var c=Bt();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&Em(s,h[1]))return h[0];if(h=i(),Ha){yr(!0);try{i()}finally{yr(!1)}}return c.memoizedState=[h,s],h}function Lm(i,s,c){return c===void 0||(Bi&1073741824)!==0?i.memoizedState=s:(i.memoizedState=c,i=Jx(),Je.lanes|=i,Yi|=i,c)}function Q_(i,s,c,h){return Mn(c,s)?c:Bs.current!==null?(i=Lm(i,c,h),Mn(i,s)||(Xt=!0),i):(Bi&42)===0?(Xt=!0,i.memoizedState=c):(i=Jx(),Je.lanes|=i,Yi|=i,s)}function J_(i,s,c,h,p){var _=re.p;re.p=_!==0&&8>_?_:8;var C=V.T,k={};V.T=k,Pm(i,!1,s,c);try{var j=p(),$=V.S;if($!==null&&$(k,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var se=FI(j,h);wl(i,s,se,Bn(i))}else wl(i,s,h,Bn(i))}catch(me){wl(i,s,{then:function(){},status:"rejected",reason:me},Bn())}finally{re.p=_,V.T=C}}function WI(){}function Mm(i,s,c,h){if(i.tag!==5)throw Error(r(476));var p=ex(i).queue;J_(i,p,s,fe,c===null?WI:function(){return tx(i),c(h)})}function ex(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:fe},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function tx(i){var s=ex(i).next.queue;wl(i,s,{},Bn())}function jm(){return hn($l)}function nx(){return Bt().memoizedState}function rx(){return Bt().memoizedState}function YI(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=Bn();i=Fi(c);var h=Gi(s,i,c);h!==null&&(En(h,s,c),Rl(h,s,c)),s={cache:bm()},i.payload=s;return}s=s.return}}function ZI(i,s,c){var h=Bn();c={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Zu(i)?ax(s,c):(c=fm(i,s,c,h),c!==null&&(En(c,i,h),sx(c,s,h)))}function ix(i,s,c){var h=Bn();wl(i,s,c,h)}function wl(i,s,c,h){var p={lane:h,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Zu(i))ax(s,p);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var C=s.lastRenderedState,k=_(C,c);if(p.hasEagerState=!0,p.eagerState=k,Mn(k,C))return Iu(i,s,p,0),bt===null&&Du(),!1}catch{}finally{}if(c=fm(i,s,p,h),c!==null)return En(c,i,h),sx(c,s,h),!0}return!1}function Pm(i,s,c,h){if(h={lane:2,revertLane:Tp(),action:h,hasEagerState:!1,eagerState:null,next:null},Zu(i)){if(s)throw Error(r(479))}else s=fm(i,c,h,2),s!==null&&En(s,i,2)}function Zu(i){var s=i.alternate;return i===Je||s!==null&&s===Je}function ax(i,s){Hs=Fu=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function sx(i,s,c){if((c&4194176)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,y0(i,c)}}var Ir={readContext:hn,use:qu,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt};Ir.useCacheRefresh=Lt,Ir.useMemoCache=Lt,Ir.useHostTransitionStatus=Lt,Ir.useFormState=Lt,Ir.useActionState=Lt,Ir.useOptimistic=Lt;var Fa={readContext:hn,use:qu,useCallback:function(i,s){return On().memoizedState=[i,s===void 0?null:s],i},useContext:hn,useEffect:$_,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,Wu(4194308,4,W_.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Wu(4194308,4,i,s)},useInsertionEffect:function(i,s){Wu(4,2,i,s)},useMemo:function(i,s){var c=On();s=s===void 0?null:s;var h=i();if(Ha){yr(!0);try{i()}finally{yr(!1)}}return c.memoizedState=[h,s],h},useReducer:function(i,s,c){var h=On();if(c!==void 0){var p=c(s);if(Ha){yr(!0);try{c(s)}finally{yr(!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=ZI.bind(null,Je,i),[h.memoizedState,i]},useRef:function(i){var s=On();return i={current:i},s.memoizedState=i},useState:function(i){i=km(i);var s=i.queue,c=ix.bind(null,Je,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:Im,useDeferredValue:function(i,s){var c=On();return Lm(c,i,s)},useTransition:function(){var i=km(!1);return i=J_.bind(null,Je,i.queue,!0,!1),On().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var h=Je,p=On();if(ut){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),bt===null)throw Error(r(349));(ot&60)!==0||N_(h,s,c)}p.memoizedState=c;var _={value:c,getSnapshot:s};return p.queue=_,$_(O_.bind(null,h,_,i),[i]),h.flags|=2048,Gs(9,k_.bind(null,h,_,c,s),{destroy:void 0},null),c},useId:function(){var i=On(),s=bt.identifierPrefix;if(ut){var c=ii,h=ri;c=(h&~(1<<32-_n(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Gu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=GI++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},useCacheRefresh:function(){return On().memoizedState=YI.bind(null,Je)}};Fa.useMemoCache=Cm,Fa.useHostTransitionStatus=jm,Fa.useFormState=z_,Fa.useActionState=z_,Fa.useOptimistic=function(i){var s=On();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Pm.bind(null,Je,!0,c),c.dispatch=s,[i,s]};var zi={readContext:hn,use:qu,useCallback:Z_,useContext:hn,useEffect:Dm,useImperativeHandle:Y_,useInsertionEffect:q_,useLayoutEffect:K_,useMemo:X_,useReducer:Ku,useRef:G_,useState:function(){return Ku(si)},useDebugValue:Im,useDeferredValue:function(i,s){var c=Bt();return Q_(c,pt.memoizedState,i,s)},useTransition:function(){var i=Ku(si)[0],s=Bt().memoizedState;return[typeof i=="boolean"?i:Al(i),s]},useSyncExternalStore:R_,useId:nx};zi.useCacheRefresh=rx,zi.useMemoCache=Cm,zi.useHostTransitionStatus=jm,zi.useFormState=U_,zi.useActionState=U_,zi.useOptimistic=function(i,s){var c=Bt();return L_(c,pt,i,s)};var Ga={readContext:hn,use:qu,useCallback:Z_,useContext:hn,useEffect:Dm,useImperativeHandle:Y_,useInsertionEffect:q_,useLayoutEffect:K_,useMemo:X_,useReducer:Nm,useRef:G_,useState:function(){return Nm(si)},useDebugValue:Im,useDeferredValue:function(i,s){var c=Bt();return pt===null?Lm(c,i,s):Q_(c,pt.memoizedState,i,s)},useTransition:function(){var i=Nm(si)[0],s=Bt().memoizedState;return[typeof i=="boolean"?i:Al(i),s]},useSyncExternalStore:R_,useId:nx};Ga.useCacheRefresh=rx,Ga.useMemoCache=Cm,Ga.useHostTransitionStatus=jm,Ga.useFormState=F_,Ga.useActionState=F_,Ga.useOptimistic=function(i,s){var c=Bt();return pt!==null?L_(c,pt,i,s):(c.baseState=i,[i,c.queue.dispatch])};function Vm(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 Bm={isMounted:function(i){return(i=i._reactInternals)?q(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=Fi(h);p.payload=s,c!=null&&(p.callback=c),s=Gi(i,p,h),s!==null&&(En(s,i,h),Rl(s,i,h))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=Bn(),p=Fi(h);p.tag=1,p.payload=s,c!=null&&(p.callback=c),s=Gi(i,p,h),s!==null&&(En(s,i,h),Rl(s,i,h))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=Bn(),h=Fi(c);h.tag=2,s!=null&&(h.callback=s),s=Gi(i,h,c),s!==null&&(En(s,i,c),Rl(s,i,c))}};function ox(i,s,c,h,p,_,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,_,C):s.prototype&&s.prototype.isPureReactComponent?!fl(c,h)||!fl(p,_):!0}function lx(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&&Bm.enqueueReplaceState(s,s.state,null)}function $a(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 Xu=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 cx(i){Xu(i)}function ux(i){console.error(i)}function dx(i){Xu(i)}function Qu(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function fx(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 zm(i,s,c){return c=Fi(c),c.tag=3,c.payload={element:null},c.callback=function(){Qu(i,s)},c}function hx(i){return i=Fi(i),i.tag=3,i}function mx(i,s,c,h){var p=c.type.getDerivedStateFromError;if(typeof p=="function"){var _=h.value;i.payload=function(){return p(_)},i.callback=function(){fx(s,c,h)}}var C=c.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){fx(s,c,h),typeof p!="function"&&(Zi===null?Zi=new Set([this]):Zi.add(this));var k=h.stack;this.componentDidCatch(h.value,{componentStack:k!==null?k:""})})}function XI(i,s,c,h,p){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&Cl(s,c,p,!0),c=Jn.current,c!==null){switch(c.tag){case 13:return Dr===null?xp():c.alternate===null&&Ot===0&&(Ot=3),c.flags&=-257,c.flags|=65536,c.lanes=p,h===gm?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),Sp(i,h,p)),!1;case 22:return c.flags|=65536,h===gm?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)),Sp(i,h,p)),!1}throw Error(r(435,c.tag))}return Sp(i,h,p),xp(),!1}if(ut)return s=Jn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=p,h!==pm&&(i=Error(r(422),{cause:h}),gl(Zn(i,c)))):(h!==pm&&(s=Error(r(423),{cause:h}),gl(Zn(s,c))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,h=Zn(h,c),p=zm(i.stateNode,h,p),tp(i,p),Ot!==4&&(Ot=2)),!1;var _=Error(r(520),{cause:h});if(_=Zn(_,c),jl===null?jl=[_]:jl.push(_),Ot!==4&&(Ot=2),s===null)return!0;h=Zn(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=p&-p,c.lanes|=i,i=zm(c.stateNode,h,i),tp(c,i),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Zi===null||!Zi.has(_))))return c.flags|=65536,p&=-p,c.lanes|=p,p=hx(p),mx(p,i,c,h),tp(c,p),!1}c=c.return}while(c!==null);return!1}var px=Error(r(461)),Xt=!1;function sn(i,s,c,h){s.child=i===null?__(s,null,c,h):za(s,i.child,c,h)}function gx(i,s,c,h,p){c=c.render;var _=s.ref;if("ref"in h){var C={};for(var k in h)k!=="ref"&&(C[k]=h[k])}else C=h;return Ka(s),h=Sm(i,s,c,C,_,p),k=Am(),i!==null&&!Xt?(wm(i,s,p),oi(i,s,p)):(ut&&k&&hm(s),s.flags|=1,sn(i,s,h,p),s.child)}function yx(i,s,c,h,p){if(i===null){var _=c.type;return typeof _=="function"&&!cp(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,vx(i,s,_,h,p)):(i=rd(c.type,null,h,s,s.mode,p),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,!Ym(i,p)){var C=_.memoizedProps;if(c=c.compare,c=c!==null?c:fl,c(C,h)&&i.ref===s.ref)return oi(i,s,p)}return s.flags|=1,i=Wi(_,h),i.ref=s.ref,i.return=s,s.child=i}function vx(i,s,c,h,p){if(i!==null){var _=i.memoizedProps;if(fl(_,h)&&i.ref===s.ref)if(Xt=!1,s.pendingProps=h=_,Ym(i,p))(i.flags&131072)!==0&&(Xt=!0);else return s.lanes=i.lanes,oi(i,s,p)}return Um(i,s,c,h,p)}function bx(i,s,c){var h=s.pendingProps,p=h.children,_=(s.stateNode._pendingVisibility&2)!==0,C=i!==null?i.memoizedState:null;if(Tl(i,s),h.mode==="hidden"||_){if((s.flags&128)!==0){if(h=C!==null?C.baseLanes|c:c,i!==null){for(p=s.child=i.child,_=0;p!==null;)_=_|p.lanes|p.childLanes,p=p.sibling;s.childLanes=_&~h}else s.childLanes=0,s.child=null;return _x(i,s,h,c)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Hu(s,C!==null?C.cachePool:null),C!==null?x_(s,C):ym(),E_(s);else return s.lanes=s.childLanes=536870912,_x(i,s,C!==null?C.baseLanes|c:c,c)}else C!==null?(Hu(s,C.cachePool),x_(s,C),Vi(),s.memoizedState=null):(i!==null&&Hu(s,null),ym(),Vi());return sn(i,s,p,c),s.child}function _x(i,s,c,h){var p=xm();return p=p===null?null:{parent:Gt._currentValue,pool:p},s.memoizedState={baseLanes:c,cachePool:p},i!==null&&Hu(s,null),ym(),E_(s),i!==null&&Cl(i,s,h,!0),null}function Tl(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 Um(i,s,c,h,p){return Ka(s),c=Sm(i,s,c,h,void 0,p),h=Am(),i!==null&&!Xt?(wm(i,s,p),oi(i,s,p)):(ut&&h&&hm(s),s.flags|=1,sn(i,s,c,p),s.child)}function xx(i,s,c,h,p,_){return Ka(s),s.updateQueue=null,c=C_(s,h,c,p),T_(i),h=Am(),i!==null&&!Xt?(wm(i,s,_),oi(i,s,_)):(ut&&h&&hm(s),s.flags|=1,sn(i,s,c,_),s.child)}function Ex(i,s,c,h,p){if(Ka(s),s.stateNode===null){var _=Ms,C=c.contextType;typeof C=="object"&&C!==null&&(_=hn(C)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Bm,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Jm(s),C=c.contextType,_.context=typeof C=="object"&&C!==null?hn(C):Ms,_.state=s.memoizedState,C=c.getDerivedStateFromProps,typeof C=="function"&&(Vm(s,c,C,h),_.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(C=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),C!==_.state&&Bm.enqueueReplaceState(_,_.state,null),kl(s,h,_,p),Nl(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(i===null){_=s.stateNode;var k=s.memoizedProps,j=$a(c,k);_.props=j;var $=_.context,se=c.contextType;C=Ms,typeof se=="object"&&se!==null&&(C=hn(se));var me=c.getDerivedStateFromProps;se=typeof me=="function"||typeof _.getSnapshotBeforeUpdate=="function",k=s.pendingProps!==k,se||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k||$!==C)&&lx(s,_,h,C),Hi=!1;var ee=s.memoizedState;_.state=ee,kl(s,h,_,p),Nl(),$=s.memoizedState,k||ee!==$||Hi?(typeof me=="function"&&(Vm(s,c,me,h),$=s.memoizedState),(j=Hi||ox(s,c,j,h,ee,$,C))?(se||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=$),_.props=h,_.state=$,_.context=C,h=j):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,ep(i,s),C=s.memoizedProps,se=$a(c,C),_.props=se,me=s.pendingProps,ee=_.context,$=c.contextType,j=Ms,typeof $=="object"&&$!==null&&(j=hn($)),k=c.getDerivedStateFromProps,($=typeof k=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(C!==me||ee!==j)&&lx(s,_,h,j),Hi=!1,ee=s.memoizedState,_.state=ee,kl(s,h,_,p),Nl();var ae=s.memoizedState;C!==me||ee!==ae||Hi||i!==null&&i.dependencies!==null&&Ju(i.dependencies)?(typeof k=="function"&&(Vm(s,c,k,h),ae=s.memoizedState),(se=Hi||ox(s,c,se,h,ee,ae,j)||i!==null&&i.dependencies!==null&&Ju(i.dependencies))?($||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ae,j),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ae,j)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||C===i.memoizedProps&&ee===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&ee===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ae),_.props=h,_.state=ae,_.context=j,h=se):(typeof _.componentDidUpdate!="function"||C===i.memoizedProps&&ee===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&ee===i.memoizedState||(s.flags|=1024),h=!1)}return _=h,Tl(i,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,i!==null&&h?(s.child=za(s,i.child,null,p),s.child=za(s,null,c,p)):sn(i,s,c,p),s.memoizedState=_.state,i=s.child):i=oi(i,s,p),i}function Sx(i,s,c,h){return pl(),s.flags|=256,sn(i,s,c,h),s.child}var Hm={dehydrated:null,treeContext:null,retryLane:0};function Fm(i){return{baseLanes:i,cachePool:w_()}}function Gm(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=rr),i}function Ax(i,s,c){var h=s.pendingProps,p=!1,_=(s.flags&128)!==0,C;if((C=_)||(C=i!==null&&i.memoizedState===null?!1:(Ft.current&2)!==0),C&&(p=!0,s.flags&=-129),C=(s.flags&32)!==0,s.flags&=-33,i===null){if(ut){if(p?Pi(s):Vi(),ut){var k=an,j;if(j=k){e:{for(j=k,k=Or;j.nodeType!==8;){if(!k){k=null;break e}if(j=xr(j.nextSibling),j===null){k=null;break e}}k=j}k!==null?(s.memoizedState={dehydrated:k,treeContext:Pa!==null?{id:ri,overflow:ii}:null,retryLane:536870912},j=nr(18,null,null,0),j.stateNode=k,j.return=s,s.child=j,xn=s,an=null,j=!0):j=!1}j||Ba(s)}if(k=s.memoizedState,k!==null&&(k=k.dehydrated,k!==null))return k.data==="$!"?s.lanes=16:s.lanes=536870912,null;ai(s)}return k=h.children,h=h.fallback,p?(Vi(),p=s.mode,k=qm({mode:"hidden",children:k},p),h=Ya(h,p,c,null),k.return=s,h.return=s,k.sibling=h,s.child=k,p=s.child,p.memoizedState=Fm(c),p.childLanes=Gm(i,C,c),s.memoizedState=Hm,h):(Pi(s),$m(s,k))}if(j=i.memoizedState,j!==null&&(k=j.dehydrated,k!==null)){if(_)s.flags&256?(Pi(s),s.flags&=-257,s=Km(i,s,c)):s.memoizedState!==null?(Vi(),s.child=i.child,s.flags|=128,s=null):(Vi(),p=h.fallback,k=s.mode,h=qm({mode:"visible",children:h.children},k),p=Ya(p,k,c,null),p.flags|=2,h.return=s,p.return=s,h.sibling=p,s.child=h,za(s,i.child,null,c),h=s.child,h.memoizedState=Fm(c),h.childLanes=Gm(i,C,c),s.memoizedState=Hm,s=p);else if(Pi(s),k.data==="$!"){if(C=k.nextSibling&&k.nextSibling.dataset,C)var $=C.dgst;C=$,h=Error(r(419)),h.stack="",h.digest=C,gl({value:h,source:null,stack:null}),s=Km(i,s,c)}else if(Xt||Cl(i,s,c,!1),C=(c&i.childLanes)!==0,Xt||C){if(C=bt,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!==j.retryLane)throw j.retryLane=h,ji(i,h),En(C,i,h),px}k.data==="$?"||xp(),s=Km(i,s,c)}else k.data==="$?"?(s.flags|=128,s.child=i.child,s=fL.bind(null,i),k._reactRetry=s,s=null):(i=j.treeContext,an=xr(k.nextSibling),xn=s,ut=!0,br=null,Or=!1,i!==null&&(Xn[Qn++]=ri,Xn[Qn++]=ii,Xn[Qn++]=Pa,ri=i.id,ii=i.overflow,Pa=s),s=$m(s,h.children),s.flags|=4096);return s}return p?(Vi(),p=h.fallback,k=s.mode,j=i.child,$=j.sibling,h=Wi(j,{mode:"hidden",children:h.children}),h.subtreeFlags=j.subtreeFlags&31457280,$!==null?p=Wi($,p):(p=Ya(p,k,c,null),p.flags|=2),p.return=s,h.return=s,h.sibling=p,s.child=h,h=p,p=s.child,k=i.child.memoizedState,k===null?k=Fm(c):(j=k.cachePool,j!==null?($=Gt._currentValue,j=j.parent!==$?{parent:$,pool:$}:j):j=w_(),k={baseLanes:k.baseLanes|c,cachePool:j}),p.memoizedState=k,p.childLanes=Gm(i,C,c),s.memoizedState=Hm,h):(Pi(s),c=i.child,i=c.sibling,c=Wi(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 $m(i,s){return s=qm({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function qm(i,s){return Zx(i,s,0,null)}function Km(i,s,c){return za(s,i.child,null,c),i=$m(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function wx(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Xm(i.return,s,c)}function Wm(i,s,c,h,p){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:p}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=c,_.tailMode=p)}function Tx(i,s,c){var h=s.pendingProps,p=h.revealOrder,_=h.tail;if(sn(i,s,h.children,c),h=Ft.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&&wx(i,c,s);else if(i.tag===19)wx(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(Ce(Ft,h),p){case"forwards":for(c=s.child,p=null;c!==null;)i=c.alternate,i!==null&&Uu(i)===null&&(p=c),c=c.sibling;c=p,c===null?(p=s.child,s.child=null):(p=c.sibling,c.sibling=null),Wm(s,!1,p,c,_);break;case"backwards":for(c=null,p=s.child,s.child=null;p!==null;){if(i=p.alternate,i!==null&&Uu(i)===null){s.child=p;break}i=p.sibling,p.sibling=c,c=p,p=i}Wm(s,!0,c,null,_);break;case"together":Wm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function oi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Yi|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Cl(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=Wi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Wi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function Ym(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Ju(i)))}function QI(i,s,c){switch(s.tag){case 3:Ln(s,s.stateNode.containerInfo),Ui(s,Gt,i.memoizedState.cache),pl();break;case 27:case 5:pr(s);break;case 4:Ln(s,s.stateNode.containerInfo);break;case 10:Ui(s,s.type,s.memoizedProps.value);break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Pi(s),s.flags|=128,null):(c&s.child.childLanes)!==0?Ax(i,s,c):(Pi(s),i=oi(i,s,c),i!==null?i.sibling:null);Pi(s);break;case 19:var p=(i.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(Cl(i,s,c,!1),h=(c&s.childLanes)!==0),p){if(h)return Tx(i,s,c);s.flags|=128}if(p=s.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Ce(Ft,Ft.current),h)break;return null;case 22:case 23:return s.lanes=0,bx(i,s,c);case 24:Ui(s,Gt,i.memoizedState.cache)}return oi(i,s,c)}function Cx(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)Xt=!0;else{if(!Ym(i,c)&&(s.flags&128)===0)return Xt=!1,QI(i,s,c);Xt=(i.flags&131072)!==0}else Xt=!1,ut&&(s.flags&1048576)!==0&&d_(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=$a(h,i),s.tag=1,s=Ex(null,s,h,i,c)):(s.tag=0,s=Um(null,s,h,i,c));else{if(h!=null){if(p=h.$$typeof,p===x){s.tag=11,s=gx(null,s,h,i,c);break e}else if(p===w){s.tag=14,s=yx(null,s,h,i,c);break e}}throw s=L(h)||h,Error(r(306,s,""))}}return s;case 0:return Um(i,s,s.type,s.pendingProps,c);case 1:return h=s.type,p=$a(h,s.pendingProps),Ex(i,s,h,p,c);case 3:e:{if(Ln(s,s.stateNode.containerInfo),i===null)throw Error(r(387));var _=s.pendingProps;p=s.memoizedState,h=p.element,ep(i,s),kl(s,_,null,c);var C=s.memoizedState;if(_=C.cache,Ui(s,Gt,_),_!==p.cache&&Qm(s,[Gt],c,!0),Nl(),_=C.element,p.isDehydrated)if(p={element:_,isDehydrated:!1,cache:C.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=Sx(i,s,_,c);break e}else if(_!==h){h=Zn(Error(r(424)),s),gl(h),s=Sx(i,s,_,c);break e}else for(an=xr(s.stateNode.containerInfo.firstChild),xn=s,ut=!0,br=null,Or=!0,c=__(s,null,_,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(pl(),_===h){s=oi(i,s,c);break e}sn(i,s,_,c)}s=s.child}return s;case 26:return Tl(i,s),i===null?(c=kE(s.type,null,s.pendingProps,null))?s.memoizedState=c:ut||(c=s.type,i=s.pendingProps,h=pd(Et.current).createElement(c),h[fn]=s,h[Nn]=i,on(h,c,i),Zt(h),s.stateNode=h):s.memoizedState=kE(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return pr(s),i===null&&ut&&(h=s.stateNode=CE(s.type,s.pendingProps,Et.current),xn=s,Or=!0,an=xr(h.firstChild)),h=s.pendingProps.children,i!==null||ut?sn(i,s,h,c):s.child=za(s,null,h,c),Tl(i,s),s.child;case 5:return i===null&&ut&&((p=h=an)&&(h=RL(h,s.type,s.pendingProps,Or),h!==null?(s.stateNode=h,xn=s,an=xr(h.firstChild),Or=!1,p=!0):p=!1),p||Ba(s)),pr(s),p=s.type,_=s.pendingProps,C=i!==null?i.memoizedProps:null,h=_.children,Mp(p,_)?h=null:C!==null&&Mp(p,C)&&(s.flags|=32),s.memoizedState!==null&&(p=Sm(i,s,$I,null,null,c),$l._currentValue=p),Tl(i,s),sn(i,s,h,c),s.child;case 6:return i===null&&ut&&((i=c=an)&&(c=NL(c,s.pendingProps,Or),c!==null?(s.stateNode=c,xn=s,an=null,i=!0):i=!1),i||Ba(s)),null;case 13:return Ax(i,s,c);case 4:return Ln(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=za(s,null,h,c):sn(i,s,h,c),s.child;case 11:return gx(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,Ui(s,s.type,h.value),sn(i,s,h.children,c),s.child;case 9:return p=s.type._context,h=s.pendingProps.children,Ka(s),p=hn(p),h=h(p),s.flags|=1,sn(i,s,h,c),s.child;case 14:return yx(i,s,s.type,s.pendingProps,c);case 15:return vx(i,s,s.type,s.pendingProps,c);case 19:return Tx(i,s,c);case 22:return bx(i,s,c);case 24:return Ka(s),h=hn(Gt),i===null?(p=xm(),p===null&&(p=bt,_=bm(),p.pooledCache=_,_.refCount++,_!==null&&(p.pooledCacheLanes|=c),p=_),s.memoizedState={parent:h,cache:p},Jm(s),Ui(s,Gt,p)):((i.lanes&c)!==0&&(ep(i,s),kl(s,null,null,c),Nl()),p=i.memoizedState,_=s.memoizedState,p.parent!==h?(p={parent:h,cache:h},s.memoizedState=p,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=p),Ui(s,Gt,h)):(h=_.cache,Ui(s,Gt,h),h!==p.cache&&Qm(s,[Gt],c,!0))),sn(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}var Zm=Ee(null),qa=null,li=null;function Ui(i,s,c){Ce(Zm,s._currentValue),s._currentValue=c}function ci(i){i._currentValue=Zm.current,Oe(Zm)}function Xm(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 Qm(i,s,c,h){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var _=p.dependencies;if(_!==null){var C=p.child;_=_.firstContext;e:for(;_!==null;){var k=_;_=p;for(var j=0;j<s.length;j++)if(k.context===s[j]){_.lanes|=c,k=_.alternate,k!==null&&(k.lanes|=c),Xm(_.return,c,i),h||(C=null);break e}_=k.next}}else if(p.tag===18){if(C=p.return,C===null)throw Error(r(341));C.lanes|=c,_=C.alternate,_!==null&&(_.lanes|=c),Xm(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 Cl(i,s,c,h){i=null;for(var p=s,_=!1;p!==null;){if(!_){if((p.flags&524288)!==0)_=!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 k=p.type;Mn(p.pendingProps.value,C.value)||(i!==null?i.push(k):i=[k])}}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($l):i=[$l])}p=p.return}i!==null&&Qm(s,i,c,h),s.flags|=262144}function Ju(i){for(i=i.firstContext;i!==null;){if(!Mn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ka(i){qa=i,li=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function hn(i){return Rx(qa,i)}function ed(i,s){return qa===null&&Ka(i),Rx(i,s)}function Rx(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},li===null){if(i===null)throw Error(r(308));li=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else li=li.next=s;return c}var Hi=!1;function Jm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ep(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 Fi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Gi(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=Lu(i),c_(i,null,c),s}return Iu(i,h,s,c),Lu(i)}function Rl(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,y0(i,c)}}function tp(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var p=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var C={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?p=_=C:_=_.next=C,c=c.next}while(c!==null);_===null?p=_=s:_=_.next=s}else p=_=s;c={baseState:h.baseState,firstBaseUpdate:p,lastBaseUpdate:_,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 np=!1;function Nl(){if(np){var i=Us;if(i!==null)throw i}}function kl(i,s,c,h){np=!1;var p=i.updateQueue;Hi=!1;var _=p.firstBaseUpdate,C=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var j=k,$=j.next;j.next=null,C===null?_=$:C.next=$,C=j;var se=i.alternate;se!==null&&(se=se.updateQueue,k=se.lastBaseUpdate,k!==C&&(k===null?se.firstBaseUpdate=$:k.next=$,se.lastBaseUpdate=j))}if(_!==null){var me=p.baseState;C=0,se=$=j=null,k=_;do{var ee=k.lane&-536870913,ae=ee!==k.lane;if(ae?(ot&ee)===ee:(h&ee)===ee){ee!==0&&ee===zs&&(np=!0),se!==null&&(se=se.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Me=i,$e=k;ee=s;var Dt=c;switch($e.tag){case 1:if(Me=$e.payload,typeof Me=="function"){me=Me.call(Dt,me,ee);break e}me=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=$e.payload,ee=typeof Me=="function"?Me.call(Dt,me,ee):Me,ee==null)break e;me=U({},me,ee);break e;case 2:Hi=!0}}ee=k.callback,ee!==null&&(i.flags|=64,ae&&(i.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[ee]:ae.push(ee))}else ae={lane:ee,tag:k.tag,payload:k.payload,callback:k.callback,next:null},se===null?($=se=ae,j=me):se=se.next=ae,C|=ee;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);se===null&&(j=me),p.baseState=j,p.firstBaseUpdate=$,p.lastBaseUpdate=se,_===null&&(p.shared.lanes=0),Yi|=C,i.lanes=C,i.memoizedState=me}}function Nx(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function kx(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Nx(c[i],s)}function Ol(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 _=c.create,C=c.inst;h=_(),C.destroy=h}c=c.next}while(c!==p)}}catch(k){vt(s,s.return,k)}}function $i(i,s,c){try{var h=s.updateQueue,p=h!==null?h.lastEffect:null;if(p!==null){var _=p.next;h=_;do{if((h.tag&i)===i){var C=h.inst,k=C.destroy;if(k!==void 0){C.destroy=void 0,p=s;var j=c;try{k()}catch($){vt(p,j,$)}}}h=h.next}while(h!==_)}}catch($){vt(s,s.return,$)}}function Ox(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{kx(s,c)}catch(h){vt(i,i.return,h)}}}function Dx(i,s,c){c.props=$a(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){vt(i,s,h)}}function Wa(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(_){vt(i,s,_)}}function jn(i,s){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(p){vt(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){vt(i,s,p)}else c.current=null}function Ix(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){vt(i,i.return,p)}}function Lx(i,s,c){try{var h=i.stateNode;SL(h,i.type,c,s),h[Nn]=s}catch(p){vt(i,i.return,p)}}function Mx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27||i.tag===4}function rp(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Mx(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 ip(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=md));else if(h!==4&&h!==27&&(i=i.child,i!==null))for(ip(i,s,c),i=i.sibling;i!==null;)ip(i,s,c),i=i.sibling}function td(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(td(i,s,c),i=i.sibling;i!==null;)td(i,s,c),i=i.sibling}var ui=!1,kt=!1,ap=!1,jx=typeof WeakSet=="function"?WeakSet:Set,Qt=null,Px=!1;function JI(i,s){if(i=i.containerInfo,Ip=xd,i=e_(i),om(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,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var C=0,k=-1,j=-1,$=0,se=0,me=i,ee=null;t:for(;;){for(var ae;me!==c||p!==0&&me.nodeType!==3||(k=C+p),me!==_||h!==0&&me.nodeType!==3||(j=C+h),me.nodeType===3&&(C+=me.nodeValue.length),(ae=me.firstChild)!==null;)ee=me,me=ae;for(;;){if(me===i)break t;if(ee===c&&++$===p&&(k=C),ee===_&&++se===h&&(j=C),(ae=me.nextSibling)!==null)break;me=ee,ee=me.parentNode}me=ae}c=k===-1||j===-1?null:{start:k,end:j}}else c=null}c=c||{start:0,end:0}}else c=null;for(Lp={focusedElem:i,selectionRange:c},xd=!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,_=s.alternate,i=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,c=s,p=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var Me=$a(c.type,p,c.elementType===c.type);i=h.getSnapshotBeforeUpdate(Me,_),h.__reactInternalSnapshotBeforeUpdate=i}catch($e){vt(c,c.return,$e)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)Vp(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Vp(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 Me=Px,Px=!1,Me}function Vx(i,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:fi(i,c),h&4&&Ol(5,c);break;case 1:if(fi(i,c),h&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(k){vt(c,c.return,k)}else{var p=$a(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(p,s,i.__reactInternalSnapshotBeforeUpdate)}catch(k){vt(c,c.return,k)}}h&64&&Ox(c),h&512&&Wa(c,c.return);break;case 3:if(fi(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{kx(h,i)}catch(k){vt(c,c.return,k)}}break;case 26:fi(i,c),h&512&&Wa(c,c.return);break;case 27:case 5:fi(i,c),s===null&&h&4&&Ix(c),h&512&&Wa(c,c.return);break;case 12:fi(i,c);break;case 13:fi(i,c),h&4&&Ux(i,c);break;case 22:if(p=c.memoizedState!==null||ui,!p){s=s!==null&&s.memoizedState!==null||kt;var _=ui,C=kt;ui=p,(kt=s)&&!C?qi(i,c,(c.subtreeFlags&8772)!==0):fi(i,c),ui=_,kt=C}h&512&&(c.memoizedProps.mode==="manual"?Wa(c,c.return):jn(c,c.return));break;default:fi(i,c)}}function Bx(i){var s=i.alternate;s!==null&&(i.alternate=null,Bx(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&$h(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 zt=null,Pn=!1;function di(i,s,c){for(c=c.child;c!==null;)zx(i,s,c),c=c.sibling}function zx(i,s,c){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(ei,c)}catch{}switch(c.tag){case 26:kt||jn(c,s),di(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:kt||jn(c,s);var h=zt,p=Pn;for(zt=c.stateNode,di(i,s,c),c=c.stateNode,s=c.attributes;s.length;)c.removeAttributeNode(s[0]);$h(c),zt=h,Pn=p;break;case 5:kt||jn(c,s);case 6:p=zt;var _=Pn;if(zt=null,di(i,s,c),zt=p,Pn=_,zt!==null)if(Pn)try{i=zt,h=c.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)}catch(C){vt(c,s,C)}else try{zt.removeChild(c.stateNode)}catch(C){vt(c,s,C)}break;case 18:zt!==null&&(Pn?(s=zt,c=c.stateNode,s.nodeType===8?Pp(s.parentNode,c):s.nodeType===1&&Pp(s,c),Yl(s)):Pp(zt,c.stateNode));break;case 4:h=zt,p=Pn,zt=c.stateNode.containerInfo,Pn=!0,di(i,s,c),zt=h,Pn=p;break;case 0:case 11:case 14:case 15:kt||$i(2,c,s),kt||$i(4,c,s),di(i,s,c);break;case 1:kt||(jn(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&Dx(c,s,h)),di(i,s,c);break;case 21:di(i,s,c);break;case 22:kt||jn(c,s),kt=(h=kt)||c.memoizedState!==null,di(i,s,c),kt=h;break;default:di(i,s,c)}}function Ux(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Yl(i)}catch(c){vt(s,s.return,c)}}function eL(i){switch(i.tag){case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new jx),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new jx),s;default:throw Error(r(435,i.tag))}}function sp(i,s){var c=eL(i);s.forEach(function(h){var p=hL.bind(null,i,h);c.has(h)||(c.add(h),h.then(p,p))})}function er(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var p=c[h],_=i,C=s,k=C;e:for(;k!==null;){switch(k.tag){case 27:case 5:zt=k.stateNode,Pn=!1;break e;case 3:zt=k.stateNode.containerInfo,Pn=!0;break e;case 4:zt=k.stateNode.containerInfo,Pn=!0;break e}k=k.return}if(zt===null)throw Error(r(160));zx(_,C,p),zt=null,Pn=!1,_=p.alternate,_!==null&&(_.return=null),p.return=null}if(s.subtreeFlags&13878)for(s=s.child;s!==null;)Hx(s,i),s=s.sibling}var _r=null;function Hx(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:er(s,i),tr(i),h&4&&($i(3,i,i.return),Ol(3,i),$i(5,i,i.return));break;case 1:er(s,i),tr(i),h&512&&(kt||c===null||jn(c,c.return)),h&64&&ui&&(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=_r;if(er(s,i),tr(i),h&512&&(kt||c===null||jn(c,c.return)),h&4){var _=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":_=p.getElementsByTagName("title")[0],(!_||_[rl]||_[fn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=p.createElement(h),p.head.insertBefore(_,p.querySelector("head > title"))),on(_,h,c),_[fn]=i,Zt(_),h=_;break e;case"link":var C=IE("link","href",p).get(h+(c.href||""));if(C){for(var k=0;k<C.length;k++)if(_=C[k],_.getAttribute("href")===(c.href==null?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){C.splice(k,1);break t}}_=p.createElement(h),on(_,h,c),p.head.appendChild(_);break;case"meta":if(C=IE("meta","content",p).get(h+(c.content||""))){for(k=0;k<C.length;k++)if(_=C[k],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){C.splice(k,1);break t}}_=p.createElement(h),on(_,h,c),p.head.appendChild(_);break;default:throw Error(r(468,h))}_[fn]=i,Zt(_),h=_}i.stateNode=h}else LE(p,i.type,i.stateNode);else i.stateNode=DE(p,h,i.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?LE(p,i.type,i.stateNode):DE(p,h,i.memoizedProps)):h===null&&i.stateNode!==null&&Lx(i,i.memoizedProps,c.memoizedProps)}break;case 27:if(h&4&&i.alternate===null){p=i.stateNode,_=i.memoizedProps;try{for(var j=p.firstChild;j;){var $=j.nextSibling,se=j.nodeName;j[rl]||se==="HEAD"||se==="BODY"||se==="SCRIPT"||se==="STYLE"||se==="LINK"&&j.rel.toLowerCase()==="stylesheet"||p.removeChild(j),j=$}for(var me=i.type,ee=p.attributes;ee.length;)p.removeAttributeNode(ee[0]);on(p,me,_),p[fn]=i,p[Nn]=_}catch(Me){vt(i,i.return,Me)}}case 5:if(er(s,i),tr(i),h&512&&(kt||c===null||jn(c,c.return)),i.flags&32){p=i.stateNode;try{Rs(p,"")}catch(Me){vt(i,i.return,Me)}}h&4&&i.stateNode!=null&&(p=i.memoizedProps,Lx(i,p,c!==null?c.memoizedProps:p)),h&1024&&(ap=!0);break;case 6:if(er(s,i),tr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(Me){vt(i,i.return,Me)}}break;case 3:if(vd=null,p=_r,_r=gd(s.containerInfo),er(s,i),_r=p,tr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Yl(s.containerInfo)}catch(Me){vt(i,i.return,Me)}ap&&(ap=!1,Fx(i));break;case 4:h=_r,_r=gd(i.stateNode.containerInfo),er(s,i),tr(i),_r=h;break;case 12:er(s,i),tr(i);break;case 13:er(s,i),tr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(pp=_e()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,sp(i,h)));break;case 22:if(h&512&&(kt||c===null||jn(c,c.return)),j=i.memoizedState!==null,$=c!==null&&c.memoizedState!==null,se=ui,me=kt,ui=se||j,kt=me||$,er(s,i),kt=me,ui=se,tr(i),s=i.stateNode,s._current=i,s._visibility&=-3,s._visibility|=s._pendingVisibility&2,h&8192&&(s._visibility=j?s._visibility&-2:s._visibility|1,j&&(s=ui||kt,c===null||$||s||$s(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,j)_=p.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=$.stateNode,k=$.memoizedProps.style;var ae=k!=null&&k.hasOwnProperty("display")?k.display:null;C.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Me){vt($,$.return,Me)}}}else if(s.tag===6){if(c===null){$=s;try{$.stateNode.nodeValue=j?"":$.memoizedProps}catch(Me){vt($,$.return,Me)}}}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,sp(i,c))));break;case 19:er(s,i),tr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,sp(i,h)));break;case 21:break;default:er(s,i),tr(i)}}function tr(i){var s=i.flags;if(s&2){try{if(i.tag!==27){e:{for(var c=i.return;c!==null;){if(Mx(c)){var h=c;break e}c=c.return}throw Error(r(160))}switch(h.tag){case 27:var p=h.stateNode,_=rp(i);td(i,_,p);break;case 5:var C=h.stateNode;h.flags&32&&(Rs(C,""),h.flags&=-33);var k=rp(i);td(i,k,C);break;case 3:case 4:var j=h.stateNode.containerInfo,$=rp(i);ip(i,$,j);break;default:throw Error(r(161))}}}catch(se){vt(i,i.return,se)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Fx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;Fx(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function fi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Vx(i,s.alternate,s),s=s.sibling}function $s(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:$i(4,s,s.return),$s(s);break;case 1:jn(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&Dx(s,s.return,c),$s(s);break;case 26:case 27:case 5:jn(s,s.return),$s(s);break;case 22:jn(s,s.return),s.memoizedState===null&&$s(s);break;default:$s(s)}i=i.sibling}}function qi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,p=i,_=s,C=_.flags;switch(_.tag){case 0:case 11:case 15:qi(p,_,c),Ol(4,_);break;case 1:if(qi(p,_,c),h=_,p=h.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch($){vt(h,h.return,$)}if(h=_,p=h.updateQueue,p!==null){var k=h.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)Nx(j[p],k)}catch($){vt(h,h.return,$)}}c&&C&64&&Ox(_),Wa(_,_.return);break;case 26:case 27:case 5:qi(p,_,c),c&&h===null&&C&4&&Ix(_),Wa(_,_.return);break;case 12:qi(p,_,c);break;case 13:qi(p,_,c),c&&C&4&&Ux(p,_);break;case 22:_.memoizedState===null&&qi(p,_,c),Wa(_,_.return);break;default:qi(p,_,c)}s=s.sibling}}function op(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&&xl(c))}function lp(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&xl(i))}function Ki(i,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Gx(i,s,c,h),s=s.sibling}function Gx(i,s,c,h){var p=s.flags;switch(s.tag){case 0:case 11:case 15:Ki(i,s,c,h),p&2048&&Ol(9,s);break;case 3:Ki(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&&xl(i)));break;case 12:if(p&2048){Ki(i,s,c,h),i=s.stateNode;try{var _=s.memoizedProps,C=_.id,k=_.onPostCommit;typeof k=="function"&&k(C,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(j){vt(s,s.return,j)}}else Ki(i,s,c,h);break;case 23:break;case 22:_=s.stateNode,s.memoizedState!==null?_._visibility&4?Ki(i,s,c,h):Dl(i,s):_._visibility&4?Ki(i,s,c,h):(_._visibility|=4,qs(i,s,c,h,(s.subtreeFlags&10256)!==0)),p&2048&&op(s.alternate,s);break;case 24:Ki(i,s,c,h),p&2048&&lp(s.alternate,s);break;default:Ki(i,s,c,h)}}function qs(i,s,c,h,p){for(p=p&&(s.subtreeFlags&10256)!==0,s=s.child;s!==null;){var _=i,C=s,k=c,j=h,$=C.flags;switch(C.tag){case 0:case 11:case 15:qs(_,C,k,j,p),Ol(8,C);break;case 23:break;case 22:var se=C.stateNode;C.memoizedState!==null?se._visibility&4?qs(_,C,k,j,p):Dl(_,C):(se._visibility|=4,qs(_,C,k,j,p)),p&&$&2048&&op(C.alternate,C);break;case 24:qs(_,C,k,j,p),p&&$&2048&&lp(C.alternate,C);break;default:qs(_,C,k,j,p)}s=s.sibling}}function Dl(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:Dl(c,h),p&2048&&op(h.alternate,h);break;case 24:Dl(c,h),p&2048&&lp(h.alternate,h);break;default:Dl(c,h)}s=s.sibling}}var Il=8192;function Ks(i){if(i.subtreeFlags&Il)for(i=i.child;i!==null;)$x(i),i=i.sibling}function $x(i){switch(i.tag){case 26:Ks(i),i.flags&Il&&i.memoizedState!==null&&HL(_r,i.memoizedState,i.memoizedProps);break;case 5:Ks(i);break;case 3:case 4:var s=_r;_r=gd(i.stateNode.containerInfo),Ks(i),_r=s;break;case 22:i.memoizedState===null&&(s=i.alternate,s!==null&&s.memoizedState!==null?(s=Il,Il=16777216,Ks(i),Il=s):Ks(i));break;default:Ks(i)}}function qx(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 Ll(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,Wx(h,i)}qx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Kx(i),i=i.sibling}function Kx(i){switch(i.tag){case 0:case 11:case 15:Ll(i),i.flags&2048&&$i(9,i,i.return);break;case 3:Ll(i);break;case 12:Ll(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&4&&(i.return===null||i.return.tag!==13)?(s._visibility&=-5,nd(i)):Ll(i);break;default:Ll(i)}}function nd(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,Wx(h,i)}qx(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:$i(8,s,s.return),nd(s);break;case 22:c=s.stateNode,c._visibility&4&&(c._visibility&=-5,nd(s));break;default:nd(s)}i=i.sibling}}function Wx(i,s){for(;Qt!==null;){var c=Qt;switch(c.tag){case 0:case 11:case 15:$i(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:xl(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,_=h.return;if(Bx(h),h===c){Qt=null;break e}if(p!==null){p.return=_,Qt=p;break e}Qt=_}}}function tL(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 nr(i,s,c,h){return new tL(i,s,c,h)}function cp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Wi(i,s){var c=i.alternate;return c===null?(c=nr(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 Yx(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 rd(i,s,c,h,p,_){var C=0;if(h=i,typeof i=="function")cp(i)&&(C=1);else if(typeof i=="string")C=zL(i,c,Fe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case d:return Ya(c.children,p,_,s);case f:C=8,p|=24;break;case m:return i=nr(12,c,s,p|2),i.elementType=m,i.lanes=_,i;case S:return i=nr(13,c,s,p),i.elementType=S,i.lanes=_,i;case A:return i=nr(19,c,s,p),i.elementType=A,i.lanes=_,i;case R:return Zx(c,p,_,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case y:case v:C=10;break e;case g:C=9;break e;case x: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=nr(C,c,s,p),s.elementType=i,s.type=h,s.lanes=_,s}function Ya(i,s,c,h){return i=nr(7,i,h,s),i.lanes=c,i}function Zx(i,s,c,h){i=nr(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 _=p._current;if(_===null)throw Error(r(456));if((p._pendingVisibility&2)===0){var C=ji(_,2);C!==null&&(p._pendingVisibility|=2,En(C,_,2))}},attach:function(){var _=p._current;if(_===null)throw Error(r(456));if((p._pendingVisibility&2)!==0){var C=ji(_,2);C!==null&&(p._pendingVisibility&=-3,En(C,_,2))}}};return i.stateNode=p,i}function up(i,s,c){return i=nr(6,i,null,s),i.lanes=c,i}function dp(i,s,c){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function hi(i){i.flags|=4}function Xx(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!ME(s)){if(s=Jn.current,s!==null&&((ot&4194176)===ot?Dr!==null:(ot&62914560)!==ot&&(ot&536870912)===0||s!==Dr))throw vl=gm,m_;i.flags|=8192}}function id(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?p0():536870912,i.lanes|=s,Ys|=s)}function Ml(i,s){if(!ut)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 nL(i,s,c){var h=s.pendingProps;switch(mm(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),ci(Gt),Cn(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(ml(s)?hi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,br!==null&&(bp(br),br=null))),At(s),null;case 26:return c=s.memoizedState,i===null?(hi(s),c!==null?(At(s),Xx(s,c)):(At(s),s.flags&=-16777217)):c?c!==i.memoizedState?(hi(s),At(s),Xx(s,c)):(At(s),s.flags&=-16777217):(i.memoizedProps!==h&&hi(s),At(s),s.flags&=-16777217),null;case 27:Na(s),c=Et.current;var p=s.type;if(i!==null&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}i=Fe.current,ml(s)?f_(s):(i=CE(p,h,c),s.stateNode=i,hi(s))}return At(s),null;case 5:if(Na(s),c=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(i=Fe.current,ml(s))f_(s);else{switch(p=pd(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[fn]=s,i[Nn]=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&&hi(s)}}return At(s),s.flags&=-16777217,null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==h&&hi(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(i=Et.current,ml(s)){if(i=s.stateNode,c=s.memoizedProps,h=null,p=xn,p!==null)switch(p.tag){case 27:case 5:h=p.memoizedProps}i[fn]=s,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||xE(i.nodeValue,c)),i||Ba(s)}else i=pd(i).createTextNode(h),i[fn]=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=ml(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[fn]=s}else pl(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),p=!1}else br!==null&&(bp(br),br=null),p=!0;if(!p)return s.flags&256?(ai(s),s):(ai(s),null)}if(ai(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 _=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==p&&(h.flags|=2048)}return c!==i&&c&&(s.child.flags|=8192),id(s,s.updateQueue),At(s),null;case 4:return Cn(),i===null&&kp(s.stateNode.containerInfo),At(s),null;case 10:return ci(s.type),At(s),null;case 19:if(Oe(Ft),p=s.memoizedState,p===null)return At(s),null;if(h=(s.flags&128)!==0,_=p.rendering,_===null)if(h)Ml(p,!1);else{if(Ot!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=Uu(i),_!==null){for(s.flags|=128,Ml(p,!1),i=_.updateQueue,s.updateQueue=i,id(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)Yx(c,i),c=c.sibling;return Ce(Ft,Ft.current&1|2),s.child}i=i.sibling}p.tail!==null&&_e()>ad&&(s.flags|=128,h=!0,Ml(p,!1),s.lanes=4194304)}else{if(!h)if(i=Uu(_),i!==null){if(s.flags|=128,h=!0,i=i.updateQueue,s.updateQueue=i,id(s,i),Ml(p,!0),p.tail===null&&p.tailMode==="hidden"&&!_.alternate&&!ut)return At(s),null}else 2*_e()-p.renderingStartTime>ad&&c!==536870912&&(s.flags|=128,h=!0,Ml(p,!1),s.lanes=4194304);p.isBackwards?(_.sibling=s.child,s.child=_):(i=p.last,i!==null?i.sibling=_:s.child=_,p.last=_)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=_e(),s.sibling=null,i=Ft.current,Ce(Ft,h?i&1|2:i&1),s):(At(s),null);case 22:case 23:return ai(s),vm(),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&&id(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&&Oe(Ua),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ci(Gt),At(s),null;case 25:return null}throw Error(r(156,s.tag))}function rL(i,s){switch(mm(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ci(Gt),Cn(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Na(s),null;case 13:if(ai(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));pl()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Oe(Ft),null;case 4:return Cn(),null;case 10:return ci(s.type),null;case 22:case 23:return ai(s),vm(),i!==null&&Oe(Ua),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return ci(Gt),null;case 25:return null;default:return null}}function Qx(i,s){switch(mm(s),s.tag){case 3:ci(Gt),Cn();break;case 26:case 27:case 5:Na(s);break;case 4:Cn();break;case 13:ai(s);break;case 19:Oe(Ft);break;case 10:ci(s.type);break;case 22:case 23:ai(s),vm(),i!==null&&Oe(Ua);break;case 24:ci(Gt)}}var iL={getCacheForType:function(i){var s=hn(Gt),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c}},aL=typeof WeakMap=="function"?WeakMap:Map,wt=0,bt=null,it=null,ot=0,_t=0,Vn=null,mi=!1,Ws=!1,fp=!1,pi=0,Ot=0,Yi=0,Za=0,hp=0,rr=0,Ys=0,jl=null,Lr=null,mp=!1,pp=0,ad=1/0,sd=null,Zi=null,od=!1,Xa=null,Pl=0,gp=0,yp=null,Vl=0,vp=null;function Bn(){if((wt&2)!==0&&ot!==0)return ot&-ot;if(V.T!==null){var i=zs;return i!==0?i:Tp()}return b0()}function Jx(){rr===0&&(rr=(ot&536870912)===0||ut?m0():536870912);var i=Jn.current;return i!==null&&(i.flags|=32),rr}function En(i,s,c){(i===bt&&_t===2||i.cancelPendingCommit!==null)&&(Zs(i,0),gi(i,ot,rr,!1)),nl(i,c),((wt&2)===0||i!==bt)&&(i===bt&&((wt&2)===0&&(Za|=c),Ot===4&&gi(i,ot,rr,!1)),Mr(i))}function eE(i,s,c){if((wt&6)!==0)throw Error(r(327));var h=!c&&(s&60)===0&&(s&i.expiredLanes)===0||tl(i,s),p=h?lL(i,s):Ep(i,s,!0),_=h;do{if(p===0){Ws&&!h&&gi(i,s,0,!1);break}else if(p===6)gi(i,s,0,!mi);else{if(c=i.current.alternate,_&&!sL(c)){p=Ep(i,s,!1),_=!1;continue}if(p===2){if(_=s,i.errorRecoveryDisabledLanes&_)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){s=C;e:{var k=i;p=jl;var j=k.current.memoizedState.isDehydrated;if(j&&(Zs(k,C).flags|=256),C=Ep(k,C,!1),C!==2){if(fp&&!j){k.errorRecoveryDisabledLanes|=_,Za|=_,p=4;break e}_=Lr,Lr=p,_!==null&&bp(_)}p=C}if(_=!1,p!==2)continue}}if(p===1){Zs(i,0),gi(i,s,0,!0);break}e:{switch(h=i,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194176)===s){gi(h,s,rr,!mi);break e}break;case 2:Lr=null;break;case 3:case 5:break;default:throw Error(r(329))}if(h.finishedWork=c,h.finishedLanes=s,(s&62914560)===s&&(_=pp+300-_e(),10<_)){if(gi(h,s,rr,!mi),_u(h,0)!==0)break e;h.timeoutHandle=AE(tE.bind(null,h,c,Lr,sd,mp,s,rr,Za,Ys,mi,2,-0,0),_);break e}tE(h,c,Lr,sd,mp,s,rr,Za,Ys,mi,0,-0,0)}}break}while(!0);Mr(i)}function bp(i){Lr===null?Lr=i:Lr.push.apply(Lr,i)}function tE(i,s,c,h,p,_,C,k,j,$,se,me,ee){var ae=s.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(Gl={stylesheets:null,count:0,unsuspend:UL},$x(s),s=FL(),s!==null)){i.cancelPendingCommit=s(lE.bind(null,i,c,h,p,C,k,j,1,me,ee)),gi(i,_,C,!$);return}lE(i,c,h,p,C,k,j,se,me,ee)}function sL(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],_=p.getSnapshot;p=p.value;try{if(!Mn(_(),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 gi(i,s,c,h){s&=~hp,s&=~Za,i.suspendedLanes|=s,i.pingedLanes&=~s,h&&(i.warmLanes|=s),h=i.expirationTimes;for(var p=s;0<p;){var _=31-_n(p),C=1<<_;h[_]=-1,p&=~C}c!==0&&g0(i,c,s)}function ld(){return(wt&6)===0?(Bl(0),!1):!0}function _p(){if(it!==null){if(_t===0)var i=it.return;else i=it,li=qa=null,Tm(i),Vs=null,bl=0,i=it;for(;i!==null;)Qx(i.alternate,i),i=i.return;it=null}}function Zs(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,wL(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),_p(),bt=i,it=c=Wi(i.current,null),ot=s,_t=0,Vn=null,mi=!1,Ws=tl(i,s),fp=!1,Ys=rr=hp=Za=Yi=Ot=0,Lr=jl=null,mp=!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-_n(h),_=1<<p;s|=i[p],h&=~_}return pi=s,Du(),c}function nE(i,s){Je=null,V.H=Ir,s===yl?(s=y_(),_t=3):s===m_?(s=y_(),_t=4):_t=s===px?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Vn=s,it===null&&(Ot=1,Qu(i,Zn(s,i.current)))}function rE(){var i=V.H;return V.H=Ir,i===null?Ir:i}function iE(){var i=V.A;return V.A=iL,i}function xp(){Ot=4,mi||(ot&4194176)!==ot&&Jn.current!==null||(Ws=!0),(Yi&134217727)===0&&(Za&134217727)===0||bt===null||gi(bt,ot,rr,!1)}function Ep(i,s,c){var h=wt;wt|=2;var p=rE(),_=iE();(bt!==i||ot!==s)&&(sd=null,Zs(i,s)),s=!1;var C=Ot;e:do try{if(_t!==0&&it!==null){var k=it,j=Vn;switch(_t){case 8:_p(),C=6;break e;case 3:case 2:case 6:Jn.current===null&&(s=!0);var $=_t;if(_t=0,Vn=null,Xs(i,k,j,$),c&&Ws){C=0;break e}break;default:$=_t,_t=0,Vn=null,Xs(i,k,j,$)}}oL(),C=Ot;break}catch(se){nE(i,se)}while(!0);return s&&i.shellSuspendCounter++,li=qa=null,wt=h,V.H=p,V.A=_,it===null&&(bt=null,ot=0,Du()),C}function oL(){for(;it!==null;)aE(it)}function lL(i,s){var c=wt;wt|=2;var h=rE(),p=iE();bt!==i||ot!==s?(sd=null,ad=_e()+500,Zs(i,s)):Ws=tl(i,s);e:do try{if(_t!==0&&it!==null){s=it;var _=Vn;t:switch(_t){case 1:_t=0,Vn=null,Xs(i,s,_,1);break;case 2:if(p_(_)){_t=0,Vn=null,sE(s);break}s=function(){_t===2&&bt===i&&(_t=7),Mr(i)},_.then(s,s);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:p_(_)?(_t=0,Vn=null,sE(s)):(_t=0,Vn=null,Xs(i,s,_,7));break;case 5:var C=null;switch(it.tag){case 26:C=it.memoizedState;case 5:case 27:var k=it;if(!C||ME(C)){_t=0,Vn=null;var j=k.sibling;if(j!==null)it=j;else{var $=k.return;$!==null?(it=$,cd($)):it=null}break t}}_t=0,Vn=null,Xs(i,s,_,5);break;case 6:_t=0,Vn=null,Xs(i,s,_,6);break;case 8:_p(),Ot=6;break e;default:throw Error(r(462))}}cL();break}catch(se){nE(i,se)}while(!0);return li=qa=null,V.H=h,V.A=p,wt=c,it!==null?0:(bt=null,ot=0,Du(),Ot)}function cL(){for(;it!==null&&!oe();)aE(it)}function aE(i){var s=Cx(i.alternate,i,pi);i.memoizedProps=i.pendingProps,s===null?cd(i):it=s}function sE(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=xx(c,s,s.pendingProps,s.type,void 0,ot);break;case 11:s=xx(c,s,s.pendingProps,s.type.render,s.ref,ot);break;case 5:Tm(s);default:Qx(c,s),s=it=Yx(s,pi),s=Cx(c,s,pi)}i.memoizedProps=i.pendingProps,s===null?cd(i):it=s}function Xs(i,s,c,h){li=qa=null,Tm(s),Vs=null,bl=0;var p=s.return;try{if(XI(i,p,s,c,ot)){Ot=1,Qu(i,Zn(c,i.current)),it=null;return}}catch(_){if(p!==null)throw it=p,_;Ot=1,Qu(i,Zn(c,i.current)),it=null;return}s.flags&32768?(ut||h===1?i=!0:Ws||(ot&536870912)!==0?i=!1:(mi=i=!0,(h===2||h===3||h===6)&&(h=Jn.current,h!==null&&h.tag===13&&(h.flags|=16384))),oE(s,i)):cd(s)}function cd(i){var s=i;do{if((s.flags&32768)!==0){oE(s,mi);return}i=s.return;var c=nL(s.alternate,s,pi);if(c!==null){it=c;return}if(s=s.sibling,s!==null){it=s;return}it=s=i}while(s!==null);Ot===0&&(Ot=5)}function oE(i,s){do{var c=rL(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);Ot=6,it=null}function lE(i,s,c,h,p,_,C,k,j,$){var se=V.T,me=re.p;try{re.p=2,V.T=null,uL(i,s,c,h,me,p,_,C,k,j,$)}finally{V.T=se,re.p=me}}function uL(i,s,c,h,p,_,C,k){do Qs();while(Xa!==null);if((wt&6)!==0)throw Error(r(327));var j=i.finishedWork;if(h=i.finishedLanes,j===null)return null;if(i.finishedWork=null,i.finishedLanes=0,j===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0,i.cancelPendingCommit=null;var $=j.lanes|j.childLanes;if($|=dm,HD(i,h,$,_,C,k),i===bt&&(it=bt=null,ot=0),(j.subtreeFlags&10256)===0&&(j.flags&10256)===0||od||(od=!0,gp=$,yp=c,mL(ht,function(){return Qs(),null})),c=(j.flags&15990)!==0,(j.subtreeFlags&15990)!==0||c?(c=V.T,V.T=null,_=re.p,re.p=2,C=wt,wt|=4,JI(i,j),Hx(j,i),LI(Lp,i.containerInfo),xd=!!Ip,Lp=Ip=null,i.current=j,Vx(i,j.alternate,j),we(),wt=C,re.p=_,V.T=c):i.current=j,od?(od=!1,Xa=i,Pl=h):cE(i,$),$=i.pendingLanes,$===0&&(Zi=null),Hh(j.stateNode),Mr(i),s!==null)for(p=i.onRecoverableError,j=0;j<s.length;j++)$=s[j],p($.value,{componentStack:$.stack});return(Pl&3)!==0&&Qs(),$=i.pendingLanes,(h&4194218)!==0&&($&42)!==0?i===vp?Vl++:(Vl=0,vp=i):Vl=0,Bl(0),null}function cE(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,xl(s)))}function Qs(){if(Xa!==null){var i=Xa,s=gp;gp=0;var c=v0(Pl),h=V.T,p=re.p;try{if(re.p=32>c?32:c,V.T=null,Xa===null)var _=!1;else{c=yp,yp=null;var C=Xa,k=Pl;if(Xa=null,Pl=0,(wt&6)!==0)throw Error(r(331));var j=wt;if(wt|=4,Kx(C.current),Gx(C,C.current,k,c),wt=j,Bl(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(ei,C)}catch{}_=!0}return _}finally{re.p=p,V.T=h,cE(i,s)}}return!1}function uE(i,s,c){s=Zn(c,s),s=zm(i.stateNode,s,2),i=Gi(i,s,2),i!==null&&(nl(i,2),Mr(i))}function vt(i,s,c){if(i.tag===3)uE(i,i,c);else for(;s!==null;){if(s.tag===3){uE(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Zi===null||!Zi.has(h))){i=Zn(c,i),c=hx(2),h=Gi(s,c,2),h!==null&&(mx(c,h,s,i),nl(h,2),Mr(h));break}}s=s.return}}function Sp(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new aL;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)||(fp=!0,p.add(c),i=dL.bind(null,i,s,c),s.then(i,i))}function dL(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,bt===i&&(ot&c)===c&&(Ot===4||Ot===3&&(ot&62914560)===ot&&300>_e()-pp?(wt&2)===0&&Zs(i,0):hp|=c,Ys===ot&&(Ys=0)),Mr(i)}function dE(i,s){s===0&&(s=p0()),i=ji(i,s),i!==null&&(nl(i,s),Mr(i))}function fL(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),dE(i,c)}function hL(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),dE(i,c)}function mL(i,s){return z(i,s)}var ud=null,Js=null,Ap=!1,dd=!1,wp=!1,Qa=0;function Mr(i){i!==Js&&i.next===null&&(Js===null?ud=Js=i:Js=Js.next=i),dd=!0,Ap||(Ap=!0,gL(pL))}function Bl(i,s){if(!wp&&dd){wp=!0;do for(var c=!1,h=ud;h!==null;){if(i!==0){var p=h.pendingLanes;if(p===0)var _=0;else{var C=h.suspendedLanes,k=h.pingedLanes;_=(1<<31-_n(42|i)+1)-1,_&=p&~(C&~k),_=_&201326677?_&201326677|1:_?_|2:0}_!==0&&(c=!0,mE(h,_))}else _=ot,_=_u(h,h===bt?_:0),(_&3)===0||tl(h,_)||(c=!0,mE(h,_));h=h.next}while(c);wp=!1}}function pL(){dd=Ap=!1;var i=0;Qa!==0&&(AL()&&(i=Qa),Qa=0);for(var s=_e(),c=null,h=ud;h!==null;){var p=h.next,_=fE(h,s);_===0?(h.next=null,c===null?ud=p:c.next=p,p===null&&(Js=c)):(c=h,(i!==0||(_&3)!==0)&&(dd=!0)),h=p}Bl(i)}function fE(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,p=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var C=31-_n(_),k=1<<C,j=p[C];j===-1?((k&c)===0||(k&h)!==0)&&(p[C]=UD(k,s)):j<=s&&(i.expiredLanes|=k),_&=~k}if(s=bt,c=ot,c=_u(i,i===s?c:0),h=i.callbackNode,c===0||i===s&&_t===2||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Q(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||tl(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(h!==null&&Q(h),v0(c)){case 2:case 8:c=ct;break;case 32:c=ht;break;case 268435456:c=ka;break;default:c=ht}return h=hE.bind(null,i),c=z(c,h),i.callbackPriority=s,i.callbackNode=c,s}return h!==null&&h!==null&&Q(h),i.callbackPriority=2,i.callbackNode=null,2}function hE(i,s){var c=i.callbackNode;if(Qs()&&i.callbackNode!==c)return null;var h=ot;return h=_u(i,i===bt?h:0),h===0?null:(eE(i,h,s),fE(i,_e()),i.callbackNode!=null&&i.callbackNode===c?hE.bind(null,i):null)}function mE(i,s){if(Qs())return null;eE(i,s,!0)}function gL(i){TL(function(){(wt&6)!==0?z(Pe,i):i()})}function Tp(){return Qa===0&&(Qa=m0()),Qa}function pE(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:wu(""+i)}function gE(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 yL(i,s,c,h,p){if(s==="submit"&&c&&c.stateNode===p){var _=pE((p[Nn]||null).action),C=h.submitter;C&&(s=(s=C[Nn]||null)?pE(s.formAction):C.getAttribute("formAction"),s!==null&&(_=s,C=null));var k=new Nu("action","action",null,h,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Qa!==0){var j=C?gE(p,C):new FormData(p);Mm(c,{pending:!0,data:j,method:p.method,action:_},null,j)}}else typeof _=="function"&&(k.preventDefault(),j=C?gE(p,C):new FormData(p),Mm(c,{pending:!0,data:j,method:p.method,action:_},_,j))},currentTarget:p}]})}}for(var Cp=0;Cp<l_.length;Cp++){var Rp=l_[Cp],vL=Rp.toLowerCase(),bL=Rp[0].toUpperCase()+Rp.slice(1);vr(vL,"on"+bL)}vr(r_,"onAnimationEnd"),vr(i_,"onAnimationIteration"),vr(a_,"onAnimationStart"),vr("dblclick","onDoubleClick"),vr("focusin","onFocus"),vr("focusout","onBlur"),vr(jI,"onTransitionRun"),vr(PI,"onTransitionStart"),vr(VI,"onTransitionCancel"),vr(s_,"onTransitionEnd"),Ts("onMouseEnter",["mouseout","mouseover"]),Ts("onMouseLeave",["mouseout","mouseover"]),Ts("onPointerEnter",["pointerout","pointerover"]),Ts("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_L=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zl));function yE(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 _=void 0;if(s)for(var C=h.length-1;0<=C;C--){var k=h[C],j=k.instance,$=k.currentTarget;if(k=k.listener,j!==_&&p.isPropagationStopped())break e;_=k,p.currentTarget=$;try{_(p)}catch(se){Xu(se)}p.currentTarget=null,_=j}else for(C=0;C<h.length;C++){if(k=h[C],j=k.instance,$=k.currentTarget,k=k.listener,j!==_&&p.isPropagationStopped())break e;_=k,p.currentTarget=$;try{_(p)}catch(se){Xu(se)}p.currentTarget=null,_=j}}}}function at(i,s){var c=s[Gh];c===void 0&&(c=s[Gh]=new Set);var h=i+"__bubble";c.has(h)||(vE(s,i,2,!1),c.add(h))}function Np(i,s,c){var h=0;s&&(h|=4),vE(c,i,h,s)}var fd="_reactListening"+Math.random().toString(36).slice(2);function kp(i){if(!i[fd]){i[fd]=!0,x0.forEach(function(c){c!=="selectionchange"&&(_L.has(c)||Np(c,!1,i),Np(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[fd]||(s[fd]=!0,Np("selectionchange",!1,s))}}function vE(i,s,c,h){switch(UE(s)){case 2:var p=qL;break;case 8:p=KL;break;default:p=Fp}c=p.bind(null,s,c,i),p=void 0,!Qh||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 Op(i,s,c,h,p){var _=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 k=h.stateNode.containerInfo;if(k===p||k.nodeType===8&&k.parentNode===p)break;if(C===4)for(C=h.return;C!==null;){var j=C.tag;if((j===3||j===4)&&(j=C.stateNode.containerInfo,j===p||j.nodeType===8&&j.parentNode===p))return;C=C.return}for(;k!==null;){if(C=Da(k),C===null)return;if(j=C.tag,j===5||j===6||j===26||j===27){h=_=C;continue e}k=k.parentNode}}h=h.return}I0(function(){var $=_,se=Zh(c),me=[];e:{var ee=o_.get(i);if(ee!==void 0){var ae=Nu,Me=i;switch(i){case"keypress":if(Cu(c)===0)break e;case"keydown":case"keyup":ae=hI;break;case"focusin":Me="focus",ae=nm;break;case"focusout":Me="blur",ae=nm;break;case"beforeblur":case"afterblur":ae=nm;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=j0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=tI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=gI;break;case r_:case i_:case a_:ae=iI;break;case s_:ae=vI;break;case"scroll":case"scrollend":ae=JD;break;case"wheel":ae=_I;break;case"copy":case"cut":case"paste":ae=sI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=V0;break;case"toggle":case"beforetoggle":ae=EI}var $e=(s&4)!==0,Dt=!$e&&(i==="scroll"||i==="scrollend"),W=$e?ee!==null?ee+"Capture":null:ee;$e=[];for(var G=$,Z;G!==null;){var ue=G;if(Z=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||Z===null||W===null||(ue=al(G,W),ue!=null&&$e.push(Ul(G,ue,Z))),Dt)break;G=G.return}0<$e.length&&(ee=new ae(ee,Me,null,c,se),me.push({event:ee,listeners:$e}))}}if((s&7)===0){e:{if(ee=i==="mouseover"||i==="pointerover",ae=i==="mouseout"||i==="pointerout",ee&&c!==Yh&&(Me=c.relatedTarget||c.fromElement)&&(Da(Me)||Me[Ss]))break e;if((ae||ee)&&(ee=se.window===se?se:(ee=se.ownerDocument)?ee.defaultView||ee.parentWindow:window,ae?(Me=c.relatedTarget||c.toElement,ae=$,Me=Me?Da(Me):null,Me!==null&&(Dt=q(Me),$e=Me.tag,Me!==Dt||$e!==5&&$e!==27&&$e!==6)&&(Me=null)):(ae=null,Me=$),ae!==Me)){if($e=j0,ue="onMouseLeave",W="onMouseEnter",G="mouse",(i==="pointerout"||i==="pointerover")&&($e=V0,ue="onPointerLeave",W="onPointerEnter",G="pointer"),Dt=ae==null?ee:il(ae),Z=Me==null?ee:il(Me),ee=new $e(ue,G+"leave",ae,c,se),ee.target=Dt,ee.relatedTarget=Z,ue=null,Da(se)===$&&($e=new $e(W,G+"enter",Me,c,se),$e.target=Z,$e.relatedTarget=Dt,ue=$e),Dt=ue,ae&&Me)t:{for($e=ae,W=Me,G=0,Z=$e;Z;Z=eo(Z))G++;for(Z=0,ue=W;ue;ue=eo(ue))Z++;for(;0<G-Z;)$e=eo($e),G--;for(;0<Z-G;)W=eo(W),Z--;for(;G--;){if($e===W||W!==null&&$e===W.alternate)break t;$e=eo($e),W=eo(W)}$e=null}else $e=null;ae!==null&&bE(me,ee,ae,$e,!1),Me!==null&&Dt!==null&&bE(me,Dt,Me,$e,!0)}}e:{if(ee=$?il($):window,ae=ee.nodeName&&ee.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ee.type==="file")var Re=q0;else if(G0(ee))if(K0)Re=DI;else{Re=kI;var tt=NI}else ae=ee.nodeName,!ae||ae.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?$&&Wh($.elementType)&&(Re=q0):Re=OI;if(Re&&(Re=Re(i,$))){$0(me,Re,c,se);break e}tt&&tt(i,ee,$),i==="focusout"&&$&&ee.type==="number"&&$.memoizedProps.value!=null&&Kh(ee,"number",ee.value)}switch(tt=$?il($):window,i){case"focusin":(G0(tt)||tt.contentEditable==="true")&&(Ds=tt,lm=$,hl=null);break;case"focusout":hl=lm=Ds=null;break;case"mousedown":cm=!0;break;case"contextmenu":case"mouseup":case"dragend":cm=!1,t_(me,c,se);break;case"selectionchange":if(MI)break;case"keydown":case"keyup":t_(me,c,se)}var Ve;if(im)e:{switch(i){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Os?H0(i,c)&&(Be="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Be="onCompositionStart");Be&&(B0&&c.locale!=="ko"&&(Os||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Os&&(Ve=L0()):(Mi=se,Jh="value"in Mi?Mi.value:Mi.textContent,Os=!0)),tt=hd($,Be),0<tt.length&&(Be=new P0(Be,i,null,c,se),me.push({event:Be,listeners:tt}),Ve?Be.data=Ve:(Ve=F0(c),Ve!==null&&(Be.data=Ve)))),(Ve=AI?wI(i,c):TI(i,c))&&(Be=hd($,"onBeforeInput"),0<Be.length&&(tt=new P0("onBeforeInput","beforeinput",null,c,se),me.push({event:tt,listeners:Be}),tt.data=Ve)),yL(me,i,$,c,se)}yE(me,s)})}function Ul(i,s,c){return{instance:i,listener:s,currentTarget:c}}function hd(i,s){for(var c=s+"Capture",h=[];i!==null;){var p=i,_=p.stateNode;p=p.tag,p!==5&&p!==26&&p!==27||_===null||(p=al(i,c),p!=null&&h.unshift(Ul(i,p,_)),p=al(i,s),p!=null&&h.push(Ul(i,p,_))),i=i.return}return h}function eo(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 _=s._reactName,C=[];c!==null&&c!==h;){var k=c,j=k.alternate,$=k.stateNode;if(k=k.tag,j!==null&&j===h)break;k!==5&&k!==26&&k!==27||$===null||(j=$,p?($=al(c,_),$!=null&&C.unshift(Ul(c,$,j))):p||($=al(c,_),$!=null&&C.push(Ul(c,$,j)))),c=c.return}C.length!==0&&i.push({event:s,listeners:C})}var xL=/\r\n?/g,EL=/\u0000|\uFFFD/g;function _E(i){return(typeof i=="string"?i:""+i).replace(xL,`
|
|
50
|
-
`).replace(EL,"")}function xE(i,s){return s=_E(s),_E(i)===s}function md(){}function gt(i,s,c,h,p,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Rs(i,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Rs(i,""+h);break;case"className":Eu(i,"class",h);break;case"tabIndex":Eu(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Eu(i,c,h);break;case"style":O0(i,h,_);break;case"data":if(s!=="object"){Eu(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=wu(""+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 _=="function"&&(c==="formAction"?(s!=="input"&>(i,s,"name",p.name,p,null),gt(i,s,"formEncType",p.formEncType,p,null),gt(i,s,"formMethod",p.formMethod,p,null),gt(i,s,"formTarget",p.formTarget,p,null)):(gt(i,s,"encType",p.encType,p,null),gt(i,s,"method",p.method,p,null),gt(i,s,"target",p.target,p,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=wu(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=md);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("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=wu(""+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":at("beforetoggle",i),at("toggle",i),xu(i,"popover",h);break;case"xlinkActuate":ni(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ni(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ni(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ni(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ni(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ni(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ni(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ni(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ni(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":xu(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=XD.get(c)||c,xu(i,c,h))}}function Dp(i,s,c,h,p,_){switch(c){case"style":O0(i,h,_);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"?Rs(i,h):(typeof h=="number"||typeof h=="bigint")&&Rs(i,""+h);break;case"onScroll":h!=null&&at("scroll",i);break;case"onScrollEnd":h!=null&&at("scrollend",i);break;case"onClick":h!=null&&(i.onclick=md);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!E0.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(p=c.endsWith("Capture"),s=c.slice(2,p?c.length-7:void 0),_=i[Nn]||null,_=_!=null?_[c]:null,typeof _=="function"&&i.removeEventListener(s,_,p),typeof h=="function")){typeof _!="function"&&_!==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,""):xu(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":at("error",i),at("load",i);var h=!1,p=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var C=c[_];if(C!=null)switch(_){case"src":h=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(i,s,_,C,c,null)}}p&>(i,s,"srcSet",c.srcSet,c,null),h&>(i,s,"src",c.src,c,null);return;case"input":at("invalid",i);var k=_=C=p=null,j=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":j=se;break;case"defaultChecked":$=se;break;case"value":_=se;break;case"defaultValue":k=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:gt(i,s,h,se,c,null)}}C0(i,_,k,j,$,C,p,!1),Su(i);return;case"select":at("invalid",i),h=C=_=null;for(p in c)if(c.hasOwnProperty(p)&&(k=c[p],k!=null))switch(p){case"value":_=k;break;case"defaultValue":C=k;break;case"multiple":h=k;default:gt(i,s,p,k,c,null)}s=_,c=C,i.multiple=!!h,s!=null?Cs(i,!!h,s,!1):c!=null&&Cs(i,!!h,c,!0);return;case"textarea":at("invalid",i),_=p=h=null;for(C in c)if(c.hasOwnProperty(C)&&(k=c[C],k!=null))switch(C){case"value":h=k;break;case"defaultValue":p=k;break;case"children":_=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:gt(i,s,C,k,c,null)}N0(i,h,p,_),Su(i);return;case"option":for(j in c)if(c.hasOwnProperty(j)&&(h=c[j],h!=null))switch(j){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:gt(i,s,j,h,c,null)}return;case"dialog":at("cancel",i),at("close",i);break;case"iframe":case"object":at("load",i);break;case"video":case"audio":for(h=0;h<zl.length;h++)at(zl[h],i);break;case"image":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"embed":case"source":case"link":at("error",i),at("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:gt(i,s,$,h,c,null)}return;default:if(Wh(s)){for(se in c)c.hasOwnProperty(se)&&(h=c[se],h!==void 0&&Dp(i,s,se,h,c,void 0));return}}for(k in c)c.hasOwnProperty(k)&&(h=c[k],h!=null&>(i,s,k,h,c,null))}function SL(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,_=null,C=null,k=null,j=null,$=null,se=null;for(ae in c){var me=c[ae];if(c.hasOwnProperty(ae)&&me!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":j=me;default:h.hasOwnProperty(ae)||gt(i,s,ae,null,h,me)}}for(var ee in h){var ae=h[ee];if(me=c[ee],h.hasOwnProperty(ee)&&(ae!=null||me!=null))switch(ee){case"type":_=ae;break;case"name":p=ae;break;case"checked":$=ae;break;case"defaultChecked":se=ae;break;case"value":C=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,s));break;default:ae!==me&>(i,s,ee,ae,h,me)}}qh(i,C,k,j,$,se,_,p);return;case"select":ae=C=k=ee=null;for(_ in c)if(j=c[_],c.hasOwnProperty(_)&&j!=null)switch(_){case"value":break;case"multiple":ae=j;default:h.hasOwnProperty(_)||gt(i,s,_,null,h,j)}for(p in h)if(_=h[p],j=c[p],h.hasOwnProperty(p)&&(_!=null||j!=null))switch(p){case"value":ee=_;break;case"defaultValue":k=_;break;case"multiple":C=_;default:_!==j&>(i,s,p,_,h,j)}s=k,c=C,h=ae,ee!=null?Cs(i,!!c,ee,!1):!!h!=!!c&&(s!=null?Cs(i,!!c,s,!0):Cs(i,!!c,c?[]:"",!1));return;case"textarea":ae=ee=null;for(k in c)if(p=c[k],c.hasOwnProperty(k)&&p!=null&&!h.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:gt(i,s,k,null,h,p)}for(C in h)if(p=h[C],_=c[C],h.hasOwnProperty(C)&&(p!=null||_!=null))switch(C){case"value":ee=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==_&>(i,s,C,p,h,_)}R0(i,ee,ae);return;case"option":for(var Me in c)if(ee=c[Me],c.hasOwnProperty(Me)&&ee!=null&&!h.hasOwnProperty(Me))switch(Me){case"selected":i.selected=!1;break;default:gt(i,s,Me,null,h,ee)}for(j in h)if(ee=h[j],ae=c[j],h.hasOwnProperty(j)&&ee!==ae&&(ee!=null||ae!=null))switch(j){case"selected":i.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:gt(i,s,j,ee,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 $e in c)ee=c[$e],c.hasOwnProperty($e)&&ee!=null&&!h.hasOwnProperty($e)&>(i,s,$e,null,h,ee);for($ in h)if(ee=h[$],ae=c[$],h.hasOwnProperty($)&&ee!==ae&&(ee!=null||ae!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,s));break;default:gt(i,s,$,ee,h,ae)}return;default:if(Wh(s)){for(var Dt in c)ee=c[Dt],c.hasOwnProperty(Dt)&&ee!==void 0&&!h.hasOwnProperty(Dt)&&Dp(i,s,Dt,void 0,h,ee);for(se in h)ee=h[se],ae=c[se],!h.hasOwnProperty(se)||ee===ae||ee===void 0&&ae===void 0||Dp(i,s,se,ee,h,ae);return}}for(var W in c)ee=c[W],c.hasOwnProperty(W)&&ee!=null&&!h.hasOwnProperty(W)&>(i,s,W,null,h,ee);for(me in h)ee=h[me],ae=c[me],!h.hasOwnProperty(me)||ee===ae||ee==null&&ae==null||gt(i,s,me,ee,h,ae)}var Ip=null,Lp=null;function pd(i){return i.nodeType===9?i:i.ownerDocument}function EE(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 SE(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 Mp(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 jp=null;function AL(){var i=window.event;return i&&i.type==="popstate"?i===jp?!1:(jp=i,!0):(jp=null,!1)}var AE=typeof setTimeout=="function"?setTimeout:void 0,wL=typeof clearTimeout=="function"?clearTimeout:void 0,wE=typeof Promise=="function"?Promise:void 0,TL=typeof queueMicrotask=="function"?queueMicrotask:typeof wE<"u"?function(i){return wE.resolve(null).then(i).catch(CL)}:AE;function CL(i){setTimeout(function(){throw i})}function Pp(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),Yl(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=p}while(c);Yl(s)}function Vp(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":Vp(c),$h(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function RL(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[rl])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(_=i.getAttribute("rel"),_==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(_!==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(_=i.getAttribute("src"),(_!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&_&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var _=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===_)return i}else return i;if(i=xr(i.nextSibling),i===null)break}return null}function NL(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=xr(i.nextSibling),i===null))return null;return i}function xr(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 TE(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 CE(i,s,c){switch(s=pd(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 ir=new Map,RE=new Set;function gd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.ownerDocument}var yi=re.d;re.d={f:kL,r:OL,D:DL,C:IL,L:LL,m:ML,X:PL,S:jL,M:VL};function kL(){var i=yi.f(),s=ld();return i||s}function OL(i){var s=As(i);s!==null&&s.tag===5&&s.type==="form"?tx(s):yi.r(i)}var to=typeof document>"u"?null:document;function NE(i,s,c){var h=to;if(h&&typeof s=="string"&&s){var p=Wn(s);p='link[rel="'+i+'"][href="'+p+'"]',typeof c=="string"&&(p+='[crossorigin="'+c+'"]'),RE.has(p)||(RE.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 DL(i){yi.D(i),NE("dns-prefetch",i,null)}function IL(i,s){yi.C(i,s),NE("preconnect",i,s)}function LL(i,s,c){yi.L(i,s,c);var h=to;if(h&&i&&s){var p='link[rel="preload"][as="'+Wn(s)+'"]';s==="image"&&c&&c.imageSrcSet?(p+='[imagesrcset="'+Wn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(p+='[imagesizes="'+Wn(c.imageSizes)+'"]')):p+='[href="'+Wn(i)+'"]';var _=p;switch(s){case"style":_=no(i);break;case"script":_=ro(i)}ir.has(_)||(i=U({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),ir.set(_,i),h.querySelector(p)!==null||s==="style"&&h.querySelector(Hl(_))||s==="script"&&h.querySelector(Fl(_))||(s=h.createElement("link"),on(s,"link",i),Zt(s),h.head.appendChild(s)))}}function ML(i,s){yi.m(i,s);var c=to;if(c&&i){var h=s&&typeof s.as=="string"?s.as:"script",p='link[rel="modulepreload"][as="'+Wn(h)+'"][href="'+Wn(i)+'"]',_=p;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=ro(i)}if(!ir.has(_)&&(i=U({rel:"modulepreload",href:i},s),ir.set(_,i),c.querySelector(p)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Fl(_)))return}h=c.createElement("link"),on(h,"link",i),Zt(h),c.head.appendChild(h)}}}function jL(i,s,c){yi.S(i,s,c);var h=to;if(h&&i){var p=ws(h).hoistableStyles,_=no(i);s=s||"default";var C=p.get(_);if(!C){var k={loading:0,preload:null};if(C=h.querySelector(Hl(_)))k.loading=5;else{i=U({rel:"stylesheet",href:i,"data-precedence":s},c),(c=ir.get(_))&&Bp(i,c);var j=C=h.createElement("link");Zt(j),on(j,"link",i),j._p=new Promise(function($,se){j.onload=$,j.onerror=se}),j.addEventListener("load",function(){k.loading|=1}),j.addEventListener("error",function(){k.loading|=2}),k.loading|=4,yd(C,s,h)}C={type:"stylesheet",instance:C,count:1,state:k},p.set(_,C)}}}function PL(i,s){yi.X(i,s);var c=to;if(c&&i){var h=ws(c).hoistableScripts,p=ro(i),_=h.get(p);_||(_=c.querySelector(Fl(p)),_||(i=U({src:i,async:!0},s),(s=ir.get(p))&&zp(i,s),_=c.createElement("script"),Zt(_),on(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(p,_))}}function VL(i,s){yi.M(i,s);var c=to;if(c&&i){var h=ws(c).hoistableScripts,p=ro(i),_=h.get(p);_||(_=c.querySelector(Fl(p)),_||(i=U({src:i,async:!0,type:"module"},s),(s=ir.get(p))&&zp(i,s),_=c.createElement("script"),Zt(_),on(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(p,_))}}function kE(i,s,c,h){var p=(p=Et.current)?gd(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=no(c.href),c=ws(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=no(c.href);var _=ws(p).hoistableStyles,C=_.get(i);if(C||(p=p.ownerDocument||p,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(i,C),(_=p.querySelector(Hl(i)))&&!_._p&&(C.instance=_,C.state.loading=5),ir.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},ir.set(i,c),_||BL(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=ro(c),c=ws(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 no(i){return'href="'+Wn(i)+'"'}function Hl(i){return'link[rel="stylesheet"]['+i+"]"}function OE(i){return U({},i,{"data-precedence":i.precedence,precedence:null})}function BL(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 ro(i){return'[src="'+Wn(i)+'"]'}function Fl(i){return"script[async]"+i}function DE(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=i.querySelector('style[data-href~="'+Wn(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),yd(h,c.precedence,i),s.instance=h;case"stylesheet":p=no(c.href);var _=i.querySelector(Hl(p));if(_)return s.state.loading|=4,s.instance=_,Zt(_),_;h=OE(c),(p=ir.get(p))&&Bp(h,p),_=(i.ownerDocument||i).createElement("link"),Zt(_);var C=_;return C._p=new Promise(function(k,j){C.onload=k,C.onerror=j}),on(_,"link",h),s.state.loading|=4,yd(_,c.precedence,i),s.instance=_;case"script":return _=ro(c.src),(p=i.querySelector(Fl(_)))?(s.instance=p,Zt(p),p):(h=c,(p=ir.get(_))&&(h=U({},c),zp(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,yd(h,c.precedence,i));return s.instance}function yd(i,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=h.length?h[h.length-1]:null,_=p,C=0;C<h.length;C++){var k=h[C];if(k.dataset.precedence===s)_=k;else if(_!==p)break}_?_.parentNode.insertBefore(i,_.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function Bp(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function zp(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var vd=null;function IE(i,s,c){if(vd===null){var h=new Map,p=vd=new Map;p.set(c,h)}else p=vd,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 _=c[p];if(!(_[rl]||_[fn]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var C=_.getAttribute(s)||"";C=i+C;var k=h.get(C);k?k.push(_):h.set(C,[_])}}return h}function LE(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function zL(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 ME(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Gl=null;function UL(){}function HL(i,s,c){if(Gl===null)throw Error(r(475));var h=Gl;if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=no(c.href),_=i.querySelector(Hl(p));if(_){i=_._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=bd.bind(h),i.then(h,h)),s.state.loading|=4,s.instance=_,Zt(_);return}_=i.ownerDocument||i,c=OE(c),(p=ir.get(p))&&Bp(c,p),_=_.createElement("link"),Zt(_);var C=_;C._p=new Promise(function(k,j){C.onload=k,C.onerror=j}),on(_,"link",c),s.instance=_}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(h.count++,s=bd.bind(h),i.addEventListener("load",s),i.addEventListener("error",s))}}function FL(){if(Gl===null)throw Error(r(475));var i=Gl;return i.stylesheets&&i.count===0&&Up(i,i.stylesheets),0<i.count?function(s){var c=setTimeout(function(){if(i.stylesheets&&Up(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 bd(){if(this.count--,this.count===0){if(this.stylesheets)Up(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var _d=null;function Up(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,_d=new Map,s.forEach(GL,i),_d=null,bd.call(i))}function GL(i,s){if(!(s.state.loading&4)){var c=_d.get(i);if(c)var h=c.get(null);else{c=new Map,_d.set(i,c);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<p.length;_++){var C=p[_];(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"),_=c.get(C)||h,_===h&&c.set(null,p),c.set(C,p),this.count++,h=bd.bind(this),p.addEventListener("load",h),p.addEventListener("error",h),_?_.parentNode.insertBefore(p,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),s.state.loading|=4}}var $l={$$typeof:v,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function $L(i,s,c,h,p,_,C,k){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=Fh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fh(0),this.hiddenUpdates=Fh(null),this.identifierPrefix=h,this.onUncaughtError=p,this.onCaughtError=_,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function jE(i,s,c,h,p,_,C,k,j,$,se,me){return i=new $L(i,s,c,C,k,j,$,me),s=1,_===!0&&(s|=24),_=nr(3,null,null,s),i.current=_,_.stateNode=i,s=bm(),s.refCount++,i.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},Jm(_),i}function PE(i){return i?(i=Ms,i):Ms}function VE(i,s,c,h,p,_){p=PE(p),h.context===null?h.context=p:h.pendingContext=p,h=Fi(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=Gi(i,h,s),c!==null&&(En(c,i,s),Rl(c,i,s))}function BE(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Hp(i,s){BE(i,s),(i=i.alternate)&&BE(i,s)}function zE(i){if(i.tag===13){var s=ji(i,67108864);s!==null&&En(s,i,67108864),Hp(i,67108864)}}var xd=!0;function qL(i,s,c,h){var p=V.T;V.T=null;var _=re.p;try{re.p=2,Fp(i,s,c,h)}finally{re.p=_,V.T=p}}function KL(i,s,c,h){var p=V.T;V.T=null;var _=re.p;try{re.p=8,Fp(i,s,c,h)}finally{re.p=_,V.T=p}}function Fp(i,s,c,h){if(xd){var p=Gp(h);if(p===null)Op(i,s,h,Ed,c),HE(i,h);else if(YL(p,i,s,c,h))h.stopPropagation();else if(HE(i,h),s&4&&-1<WL.indexOf(i)){for(;p!==null;){var _=As(p);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var C=Oa(_.pendingLanes);if(C!==0){var k=_;for(k.pendingLanes|=2,k.entangledLanes|=2;C;){var j=1<<31-_n(C);k.entanglements[1]|=j,C&=~j}Mr(_),(wt&6)===0&&(ad=_e()+500,Bl(0))}}break;case 13:k=ji(_,2),k!==null&&En(k,_,2),ld(),Hp(_,2)}if(_=Gp(h),_===null&&Op(i,s,h,Ed,c),_===p)break;p=_}p!==null&&h.stopPropagation()}else Op(i,s,h,null,c)}}function Gp(i){return i=Zh(i),$p(i)}var Ed=null;function $p(i){if(Ed=null,i=Da(i),i!==null){var s=q(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=ye(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 Ed=i,null}function UE(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 Pe:return 2;case ct:return 8;case ht:case Rn:return 32;case ka:return 268435456;default:return 32}default:return 32}}var qp=!1,Xi=null,Qi=null,Ji=null,ql=new Map,Kl=new Map,ea=[],WL="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 HE(i,s){switch(i){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Qi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":ql.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kl.delete(s.pointerId)}}function Wl(i,s,c,h,p,_){return i===null||i.nativeEvent!==_?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[p]},s!==null&&(s=As(s),s!==null&&zE(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,p!==null&&s.indexOf(p)===-1&&s.push(p),i)}function YL(i,s,c,h,p){switch(s){case"focusin":return Xi=Wl(Xi,i,s,c,h,p),!0;case"dragenter":return Qi=Wl(Qi,i,s,c,h,p),!0;case"mouseover":return Ji=Wl(Ji,i,s,c,h,p),!0;case"pointerover":var _=p.pointerId;return ql.set(_,Wl(ql.get(_)||null,i,s,c,h,p)),!0;case"gotpointercapture":return _=p.pointerId,Kl.set(_,Wl(Kl.get(_)||null,i,s,c,h,p)),!0}return!1}function FE(i){var s=Da(i.target);if(s!==null){var c=q(s);if(c!==null){if(s=c.tag,s===13){if(s=ye(c),s!==null){i.blockedOn=s,FD(i.priority,function(){if(c.tag===13){var h=Bn(),p=ji(c,h);p!==null&&En(p,c,h),Hp(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 Sd(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Gp(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Yh=h,c.target.dispatchEvent(h),Yh=null}else return s=As(c),s!==null&&zE(s),i.blockedOn=c,!1;s.shift()}return!0}function GE(i,s,c){Sd(i)&&c.delete(s)}function ZL(){qp=!1,Xi!==null&&Sd(Xi)&&(Xi=null),Qi!==null&&Sd(Qi)&&(Qi=null),Ji!==null&&Sd(Ji)&&(Ji=null),ql.forEach(GE),Kl.forEach(GE)}function Ad(i,s){i.blockedOn===s&&(i.blockedOn=null,qp||(qp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZL)))}var wd=null;function $E(i){wd!==i&&(wd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){wd===i&&(wd=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($p(h||c)===null)continue;break}var _=As(c);_!==null&&(i.splice(s,3),s-=3,Mm(_,{pending:!0,data:p,method:c.method,action:h},h,p))}}))}function Yl(i){function s(j){return Ad(j,i)}Xi!==null&&Ad(Xi,i),Qi!==null&&Ad(Qi,i),Ji!==null&&Ad(Ji,i),ql.forEach(s),Kl.forEach(s);for(var c=0;c<ea.length;c++){var h=ea[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<ea.length&&(c=ea[0],c.blockedOn===null);)FE(c),c.blockedOn===null&&ea.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var p=c[h],_=c[h+1],C=p[Nn]||null;if(typeof _=="function")C||$E(c);else if(C){var k=null;if(_&&_.hasAttribute("formAction")){if(p=_,C=_[Nn]||null)k=C.formAction;else if($p(p)!==null)continue}else k=C.action;typeof k=="function"?c[h+1]=k:(c.splice(h,3),h-=3),$E(c)}}}function Kp(i){this._internalRoot=i}Td.prototype.render=Kp.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Bn();VE(c,h,i,s,null,null)},Td.prototype.unmount=Kp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;i.tag===0&&Qs(),VE(i.current,2,null,i,null,null),ld(),s[Ss]=null}};function Td(i){this._internalRoot=i}Td.prototype.unstable_scheduleHydration=function(i){if(i){var s=b0();i={blockedOn:null,target:i,priority:s};for(var c=0;c<ea.length&&s!==0&&s<ea[c].priority;c++);ea.splice(c,0,i),c===0&&FE(i)}};var qE=t.version;if(qE!=="19.0.0")throw Error(r(527,qE,"19.0.0"));re.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=Y(s),i=i!==null?F(i):null,i=i===null?null:i.stateNode,i};var XL={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:V,findFiberByHostInstance:Da,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cd.isDisabled&&Cd.supportsFiber)try{ei=Cd.inject(XL),rn=Cd}catch{}}return Xl.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,h="",p=cx,_=ux,C=dx,k=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&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(k=s.unstable_transitionCallbacks)),s=jE(i,1,!1,null,null,c,h,p,_,C,k,null),i[Ss]=s.current,kp(i.nodeType===8?i.parentNode:i),new Kp(s)},Xl.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var h=!1,p="",_=cx,C=ux,k=dx,j=null,$=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(p=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(C=c.onCaughtError),c.onRecoverableError!==void 0&&(k=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(j=c.unstable_transitionCallbacks),c.formState!==void 0&&($=c.formState)),s=jE(i,1,!0,s,c??null,h,p,_,C,k,j,$),s.context=PE(null),c=s.current,h=Bn(),p=Fi(h),p.callback=null,Gi(c,p,h),s.current.lanes=h,nl(s,h),Mr(s),i[Ss]=s.current,kp(i),new Td(s)},Xl.version="19.0.0",Xl}var nS;function cM(){if(nS)return Zp.exports;nS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=lM(),Zp.exports}var uM=cM();const dM={locales:["en","en-GB","fr","es","de","ja","ko","zh","it","pt","hi","ar","ru"],defaultLocale:"en"},fM={cookieName:"INTLAYER_LOCALE",prefixDefault:!1},hM={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},rt={internationalization:dM,middleware:fM,editor:hM};var K=(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))(K||{});const mM=(e,t,n)=>({...n,nodeType:e,[e]:t}),rS=(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===K.Object||u.type===K.Array)&&(o=[u.key],(!r[u.key]||typeof r[u.key]!="object")&&(r[u.key]={}),r=r[u.key]),(u.type===K.Translation||u.type===K.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===K.Enumeration||u.type===K.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===K.Markdown||u.type===K.Insertion)&&(o=[u.type],(!r[u.type]||typeof r[u.type]!="object")&&(r[u.type]=""),r=r[u.type]),u.type===K.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===K.Object||r.type===K.Array?n=n==null?void 0:n[r.key]:r.type===K.Translation||r.type===K.Condition||r.type===K.Enumeration?n=n==null?void 0:n[r.type][r.key]:(r.type===K.Markdown||r.type===K.Insertion||r.type===K.File)&&(n=n==null?void 0:n[r.type]);return n},FT=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===K.Translation||t.nodeType===K.Enumeration||t.nodeType===K.Condition||t.nodeType===K.Insertion||t.nodeType===K.File){const r=Object.keys(n)[0];return n[r]}return t.nodeType===K.Nested?void 0:n}return!e||typeof e!="object"?e:Array.isArray(e)?e[0]:e},pM=(e,t,n)=>{let r=e,a=null,o=null;for(const l of n)a=r,(l.type===K.Object||l.type===K.Array)&&(o=l.key,r=r[l.key]),(l.type===K.Translation||l.type===K.Enumeration||l.type===K.Condition)&&(o=l.type,r=r[l.type][l.key]),(l.type===K.Markdown||l.type===K.ReactNode||l.type===K.Insertion||l.type===K.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},gM=e=>typeof e=="object"&&typeof(e==null?void 0:e.key)<"u"&&typeof(e==null?void 0:e.props)<"u",Vo=e=>typeof e=="string"?K.Text:typeof(e==null?void 0:e.nodeType)=="string"?e.nodeType:Array.isArray(e)?K.Array:gM(e)?K.ReactNode:typeof e=="number"?K.Number:typeof e=="boolean"?K.Boolean:e&&typeof e=="object"?K.Object:K.Unknown,Ql=(e,t,n)=>{const r=structuredClone(n);switch(e){case K.Translation:return{nodeType:K.Translation,[K.Translation]:Object.assign({},...t.map(a=>({[a]:structuredClone(r)??""})))};case K.Enumeration:return{nodeType:K.Enumeration,[K.Enumeration]:{1:r??""}};case K.Condition:return{nodeType:K.Condition,[K.Condition]:{true:r??"",false:r??""}};case K.Insertion:return{nodeType:K.Insertion,[K.Insertion]:{insertion:r??""}};case K.Nested:return{nodeType:K.Nested,[K.Nested]:{dictionaryKey:""}};case K.Markdown:return{nodeType:K.Markdown,[K.Markdown]:r??""};case K.File:return{nodeType:K.File,[K.File]:r??""};case K.Object:return{newKey:r??""};case K.Array:return[r??""];case K.Text:return r??"";case K.Number:return r??0;case K.Boolean:return r??!0;default:return r??""}},cr=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===K.Translation||r.nodeType===K.Enumeration||r.nodeType===K.Condition||r.nodeType===K.Insertion?cr(a):r.nodeType===K.Nested?"dictionary-key":r.nodeType===K.File?"file/path":r.nodeType===K.Markdown?cr(r):a}if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(cr);const t=Object.entries(e).map(([r,a])=>[r,cr(a)]);return Object.fromEntries(t)},Jd=(e,t)=>{for(const r of t.plugins??[])if(r.canHandle(e))return r.transform(e,t,(a,o)=>Jd(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:K.Array,key:a}]};return Jd(r,o)});const n={};for(const r in e){const a={...t,children:e[r],keyPath:[...t.keyPath,{type:K.Object,key:r}]};n[r]=Jd(e[r],a)}return n},yM=(e,t)=>{const n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},vM=(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}},bM=(e,t)=>{const n=vM(e,t)??"fallback";return e[n]},_M=(e,t)=>e.replace(/\{\{(.*?)\}\}/g,(n,r)=>(t[r]??"").toString()),iS={},GT=(e,t,n)=>{const r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return Av(e.content,r,t)},xM=(e,t,n)=>{const r=iS[e];if(!r)throw new Error(`Dictionary ${e} not found`,iS);return GT(r,t,n)},EM=(e,t,n)=>{const r=xM(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},SM=(e,t,n=!0)=>{const{defaultLocale:r}=rt==null?void 0:rt.internationalization;let a=e[t??r];return n&&!a&&(a=e[r]),a},AM=(e,t=!0)=>({id:"translation-plugin",canHandle:n=>typeof n=="object"&&(n==null?void 0:n.nodeType)===K.Translation,transform:(n,r,a)=>{const o=structuredClone(n[K.Translation]);for(const l in o){const u={...r,children:o[l],keyPath:[...r.keyPath,{type:K.Translation,key:l}]};o[l]=a(o[l],u)}return SM(o,e,t)}}),wM={id:"enumeration-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Enumeration,transform:(e,t,n)=>{const r=structuredClone(e[K.Enumeration]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:K.Enumeration,key:a}]};r[a]=n(o,l)}return a=>bM(r,a)}},TM={id:"condition-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Condition,transform:(e,t,n)=>{const r=structuredClone(e[K.Condition]);for(const a in r){const o=r[a],l={...t,children:o,keyPath:[...t.keyPath,{type:K.Condition,key:a}]};r[a]=n(o,l)}return a=>yM(r,a)}},CM={id:"insertion-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Insertion,transform:(e,t,n)=>{const r=[...t.keyPath,{type:K.Insertion}],a=e[K.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 y=_M(f,m);return d(y,{...u,plugins:t.plugins,children:y})}}},...t.plugins??[]]})}},RM={id:"nested-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Nested,transform:(e,t)=>EM(e.nested.dictionaryKey,e.nested.path,t)},NM={id:"file-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.File,transform:(e,t,n)=>n(e.content,{...t,children:e.content})},Av=(e,t,n=rt.internationalization.defaultLocale)=>{const r=[CM,AM(n),wM,TM,RM,NM,...t.plugins??[]];return Jd(e,{...t,plugins:r})},aS={method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"},kM=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),Rd=e=>e.reduce((t,n)=>{const r=t??{},a=kM(n??{});return typeof r=="object"&&typeof a=="object"?{...r,...a}:a??r},{}),Ie=async(e,...t)=>{const{signal:n}=new AbortController;let r="",a;const o=t.map(({body:v,params:x,headers:S,...A})=>A),l=Rd([aS,...o]),u=Rd([aS.headers,...t.map(v=>v.headers)]),d=Rd(t.map(v=>v.params)),f=l.method;if(f!=="GET"&&f!=="HEAD"){const v=Rd(t.map(x=>x.body));(u==null?void 0:u["Content-Type"])==="application/x-www-form-urlencoded"?a=new URLSearchParams(v).toString():a=JSON.stringify(v)}Object.entries(d).length>0&&(r=`?${new URLSearchParams(d).toString()}`);const m={...l,headers:u,body:a,signal:n},y=`${e}${r}`,g=await fetch(y,m);if(!g.ok){const v=await g.json();throw new Error(JSON.stringify(v.error)??"An error occurred")}return await g.json()},OM=(e={},t)=>{var M,D;const n=((M=t==null?void 0:t.editor)==null?void 0:M.backendURL)??((D=rt.editor)==null?void 0:D.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(L,V={})=>await Ie(`${o}/login`,e,V,{method:"POST",body:L}),getLoginWithGitHubURL:L=>{const V=new URLSearchParams(L);return`${o}/login/github?${V.toString()}`},getLoginWithGoogleURL:L=>{const V=new URLSearchParams(L);return`${o}/login/google?${V.toString()}`},register:async(L,V={},U={})=>await Ie(`${o}/register`,e,U,{method:"POST",body:L,params:V}),logout:async(L={})=>await Ie(`${o}/logout`,e,L,{method:"POST"}),resetPassword:async(L,V={})=>await Ie(`${o}/password/reset`,e,V,{params:L,method:"POST"}),defineNewPassword:async(L,V={})=>await Ie(`${o}/password/define`,e,V,{method:"POST",body:L}),askResetPassword:async(L,V={})=>await Ie(`${o}/password/reset`,e,V,{method:"POST",body:{email:L}}),checkIfUserHasPassword:async(L={})=>await Ie(`${o}/password/has`,e,L,{method:"GET"}),verifyEmail:async({userId:L,secret:V},U={})=>await Ie(`${o}/active/${L}/${V}`,e,U,{method:"PUT"}),getVerifyEmailStatusURL:L=>`${o}/verify-email-status/${String(L)}`,changePassword:async(L,V={})=>await Ie(`${o}/password`,e,V,{method:"PUT",body:L}),createSession:async(L,V={})=>await Ie(`${o}/session`,e,V,{method:"POST",body:L}),getSession:async(L,V={})=>await Ie(`${n}/session`,e,V,{params:{session_token:L}}),getCSRFToken:async(L={})=>await Ie(`${n}/csrf-token`,e,L),getOAuth2AccessToken:async(L={})=>await Ie(`${n}/oauth2/token`,e,L,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:{grant_type:"client_credentials",client_id:r,client_secret:a}})}},DM=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.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/dictionary`;return{getDictionaries:async(v,x={})=>await Ie(r,e,x,{params:v}),getDictionariesKeys:async(v={})=>await Ie(`${r}/keys`,e,v),getDictionary:async(v,x,S={})=>await Ie(`${r}/${v}`,e,S,{params:x?{version:x.toString()}:void 0}),pushDictionaries:async(v,x={})=>await Ie(`${r}`,e,x,{method:"PATCH",body:{dictionaries:v}}),addDictionary:async(v,x={})=>await Ie(`${r}`,e,x,{method:"POST",body:v}),updateDictionary:async(v,x,S={})=>await Ie(`${r}/${v}`,e,S,{method:"PUT",body:x}),deleteDictionary:async(v,x={})=>await Ie(`${r}/${v}`,e,x,{method:"DELETE"})}},IM=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.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{translateJSON:async(v,x={})=>await Ie(`${r}/translate/json`,e,x,{method:"POST",body:v}),auditContentDeclaration:async(v,x={})=>await Ie(`${r}/audit/dictionary`,e,x,{method:"POST",body:v}),auditContentDeclarationField:async(v,x={})=>await Ie(`${r}/audit/dictionary/field`,e,x,{method:"POST",body:v}),auditContentDeclarationMetadata:async(v,x={})=>await Ie(`${r}/audit/dictionary/metadata`,e,x,{method:"POST",body:v}),auditTag:async(v,x={})=>await Ie(`${r}/audit/tag`,e,x,{method:"POST",body:v}),askDocQuestion:async(v,x={})=>{var R;if(!v)return;const{onMessage:S,onDone:A,...w}=v,T=new AbortController;try{const O=await fetch(`${r}/ask`,{method:"POST",headers:{"Content-Type":"application/json",...e.headers,...x.headers},body:JSON.stringify(w),signal:T.signal});if(!O.ok){const L=await O.json().catch(()=>({}));throw new Error(L.message||"Failed to fetch response")}const N=(R=O.body)==null?void 0:R.getReader();if(!N)throw new Error("No reader available");const M=new TextDecoder;let D="";for(;;){const{done:L,value:V}=await N.read();if(L)break;D+=M.decode(V,{stream:!0});const U=D.split(`
|
|
51
|
-
`);D=U.pop()??"";for(const ce of U)if(ce.startsWith("data: "))try{const ie=JSON.parse(ce.slice(6));ie.chunk&&(S==null||S(ie.chunk)),ie.done&&ie.response&&(A==null||A(ie.response))}catch(ie){console.error("Failed to parse SSE data:",ie)}}}catch(O){throw console.error("Error in askDocQuestion:",O),O}},autocomplete:async(v,x={})=>await Ie(`${r}/autocomplete`,e,x,{method:"POST",body:v})}},LM=(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 Ie(`${r}/config`,e,d)).data,writeDictionary:async(d,f={})=>await Ie(`${r}/dictionary`,e,f,{method:"POST",body:{dictionary:d}})}},MM=(e={},t)=>{var v,x;const n=((v=t==null?void 0:t.editor)==null?void 0:v.backendURL)??((x=rt.editor)==null?void 0:x.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 Ie(r,e,A,{params:S}),getOrganization:async(S,A={})=>await Ie(`${r}/${String(S)}`,e,A),addOrganization:async(S,A={})=>await Ie(r,e,A,{method:"POST",body:S}),addOrganizationMember:async(S,A={})=>Ie(`${r}/member`,e,A,{method:"POST",body:S}),updateOrganization:async(S,A={})=>Ie(r,e,A,{method:"PUT",body:S}),updateOrganizationMembers:async(S,A={})=>Ie(`${r}/members`,e,A,{method:"PUT",body:S}),deleteOrganization:async(S={})=>await Ie(r,e,S,{method:"DELETE"}),selectOrganization:async(S,A={})=>await Ie(`${r}/${String(S)}`,e,A,{method:"PUT"}),unselectOrganization:async(S={})=>await Ie(`${r}/logout`,e,S,{method:"POST"})}},jM=(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 Ie(r,e,T,{params:w}),addProject:async(w,T={})=>await Ie(`${r}`,e,T,{method:"POST",body:w}),updateProject:async(w,T={})=>await Ie(`${r}`,e,T,{method:"PUT",body:w}),updateProjectMembers:async(w,T={})=>await Ie(`${r}/members`,e,T,{method:"PUT",body:w}),pushProjectConfiguration:async(w,T={})=>await Ie(`${r}/configuration`,e,T,{method:"PUT",body:w}),deleteProject:async(w={})=>await Ie(`${r}`,e,w,{method:"DELETE"}),selectProject:async(w,T={})=>await Ie(`${r}/${String(w)}`,e,T,{method:"PUT"}),unselectProject:async(w={})=>await Ie(`${r}/logout`,e,w,{method:"POST"}),addNewAccessKey:async(w,T={})=>await Ie(`${r}/access_key`,e,T,{method:"POST",body:w}),deleteAccessKey:async(w,T={})=>await Ie(`${r}/access_key`,e,T,{method:"DELETE",body:{clientId:w}}),refreshAccessKey:async(w,T={})=>await Ie(`${r}/access_key`,e,T,{method:"PATCH",body:{clientId:w}})}},PM=(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 Ie(`${r}/pricing`,e,m,{method:"POST",body:f}),getSubscription:async(f,m={})=>await Ie(`${r}/create-subscription`,e,m,{method:"POST",body:f}),cancelSubscription:async(f={})=>await Ie(`${r}/cancel-subscription`,e,f,{method:"POST"})}},VM=(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,y={})=>await Ie(r,e,y,{params:m}),addTag:async(m,y={})=>await Ie(`${r}`,e,y,{method:"POST",body:m}),updateTag:async(m,y,g={})=>await Ie(`${r}/${m}`,e,g,{method:"PUT",body:y}),deleteTag:async(m,y={})=>await Ie(`${r}/${m}`,e,y,{method:"DELETE"})}},BM=(e={},t)=>{var y,g;const n=((y=t==null?void 0:t.editor)==null?void 0:y.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/user`;return{createUser:async(v,x={})=>await Ie(`${r}/`,e,x,{method:"POST",body:v}),getUsers:async(v,x={})=>await Ie(r,e,x,{params:v}),getUserById:async(v,x={})=>await Ie(`${r}/${v}`,e,x),getUserByAccount:async(v,x,S={})=>await Ie(`${r}/account/${x}/${v}`,e,S),getUserByEmail:async(v,x={})=>await Ie(`${r}/email/${v}`,e,x),updateUser:async(v,x={})=>await Ie(`${r}`,e,x,{method:"PUT",body:v}),deleteUser:async(v,x={})=>await Ie(`${r}/${v}`,e,x,{method:"DELETE"})}},sh=(e={},t)=>({organization:MM(e,t),project:jM(e,t),user:BM(e,t),auth:OM(e,t),dictionary:DM(e,t),stripe:PM(e,t),ai:IM(e,t),tag:VM(e,t),editor:LM(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 zM=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"}},$T=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),sS=new Map,ef=(e,t=e)=>{if(typeof(Intl==null?void 0:Intl.DisplayNames)!="function")return e;let n=sS.get(t);return n||(n=new Intl.DisplayNames([t],{type:"language"}),sS.set(t,n)),n.of(e)??"Unknown locale"},UM=(e,t=rt.internationalization.locales)=>{const n=$T(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","")},HM=(e,t=rt.internationalization.locales,n=rt.internationalization.defaultLocale,r=rt.middleware.prefixDefault)=>{const a=UM(e,t),o=$T(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,y)=>{const g=y.toString()===n.toString();let x=r||!g?`/${y}${u}`:u;x.length>1&&x.endsWith("/")&&(x=x.slice(0,-1));const S=o?`${d}${x}${l.search}${l.hash}`:`${x}${l.search}${l.hash}`;return m[y]=S,m},{})},FM=(e,t,n=rt.internationalization.locales,r=rt.internationalization.defaultLocale,a=rt.middleware.prefixDefault)=>HM(e,n,r,a)[t],GM=(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},pe=e=>mM(K.Translation,e),$M=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]=$M(f)}catch{r[d]=f}}}}return r}catch{return}},Zc=(e,t)=>e.every((n,r)=>t[r]&&t[r].key===n.key&&t[r].type===n.type),qM=(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}},KM=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 fr=(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))(fr||{});const KT=E.createContext(void 0),WT=E.createContext(void 0),WM=({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(KT.Provider,{value:{changedContent:t},children:b.jsx(WT.Provider,{value:{setChangedContent:r},children:e})})},YM=()=>E.useContext(WT),ZM=()=>{const e=E.useContext(KT),t=YM();return{...e,...t}},ln=[];for(let e=0;e<256;++e)ln.push((e+256).toString(16).slice(1));function XM(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 eg;const QM=new Uint8Array(16);function JM(){if(!eg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");eg=crypto.getRandomValues.bind(crypto)}return eg(QM)}const ej=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oS={randomUUID:ej};function tj(e,t,n){var a;if(oS.randomUUID&&!e)return oS.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??JM();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,XM(r)}const{editor:vi}=rt,YT=E.createContext({postMessage:()=>null,allowedOrigins:[vi==null?void 0:vi.applicationURL,vi==null?void 0:vi.editorURL,vi==null?void 0:vi.cmsURL],senderId:""}),lS=({children:e,allowedOrigins:t,postMessage:n})=>{const r=E.useRef(tj()),a=E.useMemo(()=>({postMessage:n,allowedOrigins:t,senderId:r.current}),[n,t,r.current]);return b.jsx(YT.Provider,{value:a,children:e})},ZT=()=>E.useContext(YT),To=(e,t,n)=>{const{allowedOrigins:r,postMessage:a,senderId:o}=ZT();return E.useEffect(()=>{if(t){const u=d=>{const{type:f,data:m,senderId:y}=d.data;f===e&&y!==o&&(typeof r>"u"||r!=null&&r.some(g=>qM(g,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})}},nj=(e,t)=>typeof e=="function"?e(t):e,vs=(e,t,n)=>{const{postMessage:r,senderId:a}=ZT(),{emit:o,receive:l}=n??{emit:!0,receive:!0},u=(v,x)=>{const S=nj(v,x);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)),y=v=>m(x=>u(v,x));To(`${e}/post`,l?v=>{m(v)}:void 0);const g=(v,x)=>{o&&typeof r=="function"&&x!==a&&(typeof f>"u"||r({type:`${e}/post`,data:f,senderId:a}))};return To(`${e}/get`,o?g:void 0,f),E.useEffect(()=>{l&&typeof r=="function"&&typeof f>"u"&&r({type:`${e}/get`,senderId:a})},[]),[f,y,d]},XT=E.createContext(void 0),rj=({children:e,configuration:t})=>b.jsx(XT.Provider,{value:t,children:e}),Yr=()=>E.useContext(XT),QT=E.createContext(void 0),JT=E.createContext(void 0),ij=({children:e})=>{const[t,n]=vs(fr.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(QT.Provider,{value:r,children:b.jsx(JT.Provider,{value:a,children:e})})},wv=()=>E.useContext(JT),e1=()=>{const e=wv(),t=E.useContext(QT);if(!t)throw new Error("useDictionariesRecordStates must be used within a DictionariesRecordProvider");return{...t,...e}},t1=E.createContext(void 0),aj=e=>To(`${fr.INTLAYER_EDITED_CONTENT_CHANGED}/get`,e),n1=E.createContext(void 0),cS=(e,t)=>typeof e=="function"?e(t):e,sj=({children:e})=>{const{localeDictionaries:t}=e1(),[n,r]=vs(fr.INTLAYER_EDITED_CONTENT_CHANGED),a=v=>{let x=cS(v);return r(S=>(x=cS(v,S==null?void 0:S[x.key]),{...S,[x.key]:x})),x},o=(v,x)=>{r(S=>({...S,[v]:{...S==null?void 0:S[v],content:x}}))},l=(v,x,S=[],A=!0)=>{r(w=>{var M,D;const T=(M=t[v])==null?void 0:M.content,R=structuredClone(((D=w==null?void 0:w[v])==null?void 0:D.content)??T);let O=S;if(!A){let L=0;const V=S.slice(0,-1),U=S[S.length-1];let ce=U.key;for(;typeof Ur(R,O)<"u";)L++,ce=L===0?U.key:`${U.key} (${L})`,O=[...V,{...U,key:ce}]}const N=rS(R,O,x);return{...w,[v]:{...w==null?void 0:w[v],content:N}}})},u=(v,x,S=[])=>{r(A=>{var O,N;const w=(O=t[v])==null?void 0:O.content,T=structuredClone(((N=A==null?void 0:A[v])==null?void 0:N.content)??w),R=pM(T,x,S);return{...A,[v]:{...A==null?void 0:A[v],content:R}}})},d=(v,x)=>{r(S=>{var O,N;const A=(O=t[v])==null?void 0:O.content,w=structuredClone(((N=S==null?void 0:S[v])==null?void 0:N.content)??A),T=Ur(A,x),R=rS(w,x,T);return{...S,[v]:{...S==null?void 0:S[v],content:R}}})},f=v=>{r(x=>{const S={...x};return delete S[v],S})},m=v=>{r(x=>Object.entries(x).reduce((A,[w,T])=>w===v?A:{...A,[w]:T},{}))},y=()=>{r({})},g=(v,x)=>{var A;const S=((A=n==null?void 0:n[v])==null?void 0:A.content)??{};return Ur(S,x)};return b.jsx(t1.Provider,{value:{editedContent:n},children:b.jsx(n1.Provider,{value:{setEditedContentState:r,setEditedDictionary:a,setEditedContent:o,addEditedContent:l,renameEditedContent:u,removeEditedContent:d,restoreEditedContent:f,clearEditedDictionaryContent:m,clearEditedContent:y,getEditedContentValue:g},children:e})})},Bo=()=>E.useContext(n1),Tn=()=>{const e=E.useContext(t1),t=Bo();return{...e,...t}},r1=E.createContext({enabled:!1}),oj=e=>vs(fr.INTLAYER_EDITOR_ENABLED,!1,e),lj=e=>To(`${fr.INTLAYER_EDITOR_ENABLED}/post`,e),i1=e=>To(`${fr.INTLAYER_EDITOR_ENABLED}/get`,e),cj=({children:e})=>{const[t]=oj({emit:!1,receive:!0});return b.jsx(r1.Provider,{value:{enabled:t},children:e})},a1=()=>E.useContext(r1),s1=E.createContext(void 0),o1=E.createContext(void 0),uj=({children:e})=>{const[t,n]=vs(fr.INTLAYER_FOCUSED_CONTENT_CHANGED,null),r=a=>{n(o=>o&&{...o,keyPath:a})};return b.jsx(s1.Provider,{value:{focusedContent:t},children:b.jsx(o1.Provider,{value:{setFocusedContent:n,setFocusedContentKeyPath:r},children:e})})},Tv=()=>{const e=E.useContext(o1);if(e===void 0)throw new Error("useFocusDictionaryActions must be used within a FocusDictionaryProvider");return e},ba=()=>{const e=Tv(),t=E.useContext(s1);if(t===void 0)throw new Error("useFocusDictionaryState must be used within a FocusDictionaryProvider");return{...t,...e}},uS=({children:e})=>{const t=aj();return E.useEffect(()=>{t()},[]),b.jsx(ij,{children:b.jsx(sj,{children:b.jsx(uj,{children:e})})})},dj=({children:e,fallback:t})=>{const n=i1(),{enabled:r}=a1();return E.useEffect(()=>{r||n()},[r]),r?e:t},fj=({children:e,fallback:t})=>{const[n,r]=E.useState(!1);return E.useEffect(()=>{r(window.self!==window.top)},[]),n?e:t},hj=({children:e,configuration:t,...n})=>b.jsx(WM,{children:b.jsx(cj,{children:b.jsx(rj,{configuration:t,children:n.mode==="editor"?b.jsx(lS,{...n,children:b.jsx(uS,{children:e})}):b.jsx(fj,{fallback:e,children:b.jsx(lS,{...n,children:b.jsx(dj,{fallback:e,children:b.jsx(uS,{children:e})})})})})})}),mj=(e,t)=>vs(fr.INTLAYER_URL_CHANGE,e,t),pj=()=>To(fr.INTLAYER_IFRAME_CLICKED,KM);/*! js-cookie v3.0.5 | MIT */function Nd(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 gj={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 sy(e,t){function n(a,o,l){if(!(typeof document>"u")){l=Nd({},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,"",Nd({},o,{expires:-1}))},withAttributes:function(a){return sy(this.converter,Nd({},this.attributes,a))},withConverter:function(a){return sy(Nd({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var l1=sy(gj,{path:"/"});const{cookieName:c1}=rt.middleware,yj={path:"/",expires:void 0,domain:void 0,secure:!1,sameSite:"strict"},Cv=l1.get(c1),u1=e=>{l1.set(c1,e,yj)},vj=()=>({localeCookie:Cv,setLocaleCookie:u1});var zT;const oh=E.createContext({locale:Cv??((zT=rt==null?void 0:rt.internationalization)==null?void 0:zT.defaultLocale),setLocale:()=>null,disableEditor:!1}),bj=()=>E.useContext(oh),_j=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:a})=>{const{internationalization:o}=rt??{},{defaultLocale:l,locales:u}=o??{},d=e??Cv??t??l,[f,m]=vs(fr.INTLAYER_CURRENT_LOCALE,d),g=r??(x=>{if(f.toString()!==x.toString()){if(!(u!=null&&u.map(String).includes(x))){console.error(`Locale ${x} is not available`);return}m(x),u1(x)}}),v=GM(e??f);return b.jsx(oh.Provider,{value:{locale:v,setLocale:g,disableEditor:a},children:n})},vf=({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)}})},xj=250,Ej=({children:e,onPress:t,onClickOutside:n,pressDuration:r=xj,isSelecting:a,...o})=>{const l=E.useRef(null),[u,d]=E.useState(!1),[f,m]=E.useState(a),y=E.useRef(null),g=typeof e=="string",v=()=>{m(!0),t()},x=()=>{y.current=setTimeout(()=>{v()},r)},S=()=>{y.current&&(clearTimeout(y.current),y.current=null)},A=()=>{S(),x()},w=()=>{d(!0)},T=()=>{d(!1),S()},R=E.useCallback(M=>{l.current&&!l.current.contains(M.target)&&(m(!1),n==null||n())},[n]);E.useEffect(()=>(document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}),[R]);const O=M=>{f&&(M.preventDefault(),M.stopPropagation())},N=()=>{m(!1)};return b.jsx("span",{style:{display:g?"inline":"inline-block",cursor:"pointer",userSelect:"none",borderRadius:"0.375rem",outlineWidth:"2px",outlineOffset:"4px",outlineStyle:"solid",outlineColor:a||f||u?"inherit":"transparent",transition:"all 100ms 50ms ease-in-out"},role:"button",tabIndex:0,onKeyUp:()=>null,onClick:O,onMouseDown:A,onMouseUp:T,onMouseLeave:T,onTouchStart:A,onTouchEnd:T,onTouchCancel:T,onBlur:N,onMouseEnter:w,ref:l,...o,children:e})},Sj=({children:e,dictionaryKey:t,keyPath:n})=>{const{focusedContent:r,setFocusedContent:a}=ba(),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&&Zc((r==null?void 0:r.keyPath)??[],n))??!1},[r,n,t]);return b.jsx(Ej,{onPress:o,isSelecting:l,children:e})},bf=({children:e,...t})=>{const{enabled:n}=a1(),{disableEditor:r}=bj();return n&&!r?b.jsx(Sj,{...t,children:e}):e},Rv=({dictionaryKey:e,keyPath:t,children:n})=>{const r=Bo();return r?r.getEditedContentValue(e,t)??n:n},Aj=e=>{const t=Rv(e);if(typeof t=="object"){const n=Av(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},wj=E.createContext({renderMarkdown:e=>e}),Tj=()=>E.useContext(wj),Cj=({dictionaryKey:e,keyPath:t,children:n,locale:r})=>{const{renderMarkdown:a}=Tj(),o=Rv({dictionaryKey:e,keyPath:t,children:n});if(typeof o!="string"){const l=Av(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)},Rj=({dictionaryKey:e,keyPath:t,children:n,metadataKeyPath:r})=>{const a=Rv({dictionaryKey:e,keyPath:t,children:n}),o=qT(a);return Ur(o,r)},d1=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(d1((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)},Nj={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{plugins:t,...n})=>vf({...n,value:n.children,children:E.createElement(bf,{...n,key:n.children},b.jsx(Aj,{...n,children:n.children}))})},kj={id:"react-node-plugin",canHandle:e=>typeof e=="object"&&typeof e.props<"u"&&typeof e.key<"u",transform:(e,{plugins:t,...n})=>vf({...n,value:"[[react-element]]",children:b.jsx(bf,{...n,children:d1(e)})})},Oj={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)=>vf({...f,value:d,children:b.jsx(bf,{...a,children:b.jsx(Rj,{...a,metadataKeyPath:f.keyPath,children:e})})})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return vf({...t,value:e,children:b.jsx(bf,{...a,children:b.jsx(Cj,{...a,children:e})}),additionalProps:{metadata:u}})}},Dj={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===K.Markdown,transform:(e,t,n)=>{const r=[...t.keyPath,{type:K.Markdown}],a=e[K.Markdown];return n(a,{...t,children:a,keyPath:r,plugins:[Oj,...t.plugins??[]]})}},dS=(e,t,n)=>GT(e,t,[Nj,kj,Dj]),nn=(e,t)=>{const{locale:n}=E.useContext(oh),r=n,{changedContent:a}=ZM();return a!=null&&a[e.key]?dS(a==null?void 0:a[e.key],r):dS(e,r)},Nv=({onLocaleChange:e}={})=>{const{defaultLocale:t,locales:n}=(rt==null?void 0:rt.internationalization)??{},{locale:r,setLocale:a}=E.useContext(oh),{setLocaleCookie:o}=vj();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 Jl={},fS;function Ij(){if(fS)return Jl;fS=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.parse=l,Jl.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 g=function(){};return g.prototype=Object.create(null),g})();function l(g,v){const x=new o,S=g.length;if(S<2)return x;const A=(v==null?void 0:v.decode)||m;let w=0;do{const T=g.indexOf("=",w);if(T===-1)break;const R=g.indexOf(";",w),O=R===-1?S:R;if(T>O){w=g.lastIndexOf(";",T-1)+1;continue}const N=u(g,w,T),M=d(g,T,N),D=g.slice(N,M);if(x[D]===void 0){let L=u(g,T+1,O),V=d(g,O,L);const U=A(g.slice(L,V));x[D]=U}w=O+1}while(w<S);return x}function u(g,v,x){do{const S=g.charCodeAt(v);if(S!==32&&S!==9)return v}while(++v<x);return x}function d(g,v,x){for(;v>x;){const S=g.charCodeAt(--v);if(S!==32&&S!==9)return v+1}return x}function f(g,v,x){const S=(x==null?void 0:x.encode)||encodeURIComponent;if(!e.test(g))throw new TypeError(`argument name is invalid: ${g}`);const A=S(v);if(!t.test(A))throw new TypeError(`argument val is invalid: ${v}`);let w=g+"="+A;if(!x)return w;if(x.maxAge!==void 0){if(!Number.isInteger(x.maxAge))throw new TypeError(`option maxAge is invalid: ${x.maxAge}`);w+="; Max-Age="+x.maxAge}if(x.domain){if(!n.test(x.domain))throw new TypeError(`option domain is invalid: ${x.domain}`);w+="; Domain="+x.domain}if(x.path){if(!r.test(x.path))throw new TypeError(`option path is invalid: ${x.path}`);w+="; Path="+x.path}if(x.expires){if(!y(x.expires)||!Number.isFinite(x.expires.valueOf()))throw new TypeError(`option expires is invalid: ${x.expires}`);w+="; Expires="+x.expires.toUTCString()}if(x.httpOnly&&(w+="; HttpOnly"),x.secure&&(w+="; Secure"),x.partitioned&&(w+="; Partitioned"),x.priority)switch(typeof x.priority=="string"?x.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: ${x.priority}`)}if(x.sameSite)switch(typeof x.sameSite=="string"?x.sameSite.toLowerCase():x.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: ${x.sameSite}`)}return w}function m(g){if(g.indexOf("%")===-1)return g;try{return decodeURIComponent(g)}catch{return g}}function y(g){return a.call(g)==="[object Date]"}return Jl}Ij();var hS="popstate";function Lj(e={}){function t(r,a){let{pathname:o,search:l,hash:u}=r.location;return oy("",{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:Nc(a)}return jj(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Kr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mj(){return Math.random().toString(36).substring(2,10)}function mS(e,t){return{usr:e.state,key:e.key,idx:t}}function oy(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?zo(t):t,state:n,key:t&&t.key||r||Mj()}}function Nc({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 zo(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 jj(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 y(){u="POP";let A=m(),w=A==null?null:A-f;f=A,d&&d({action:u,location:S.location,delta:w})}function g(A,w){u="PUSH";let T=oy(S.location,A,w);f=m()+1;let R=mS(T,f),O=S.createHref(T);try{l.pushState(R,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(O)}o&&d&&d({action:u,location:S.location,delta:1})}function v(A,w){u="REPLACE";let T=oy(S.location,A,w);f=m();let R=mS(T,f),O=S.createHref(T);l.replaceState(R,"",O),o&&d&&d({action:u,location:S.location,delta:0})}function x(A){return Pj(A)}let S={get action(){return u},get location(){return e(a,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(hS,y),d=A,()=>{a.removeEventListener(hS,y),d=null}},createHref(A){return t(a,A)},createURL:x,encodeLocation(A){let w=x(A);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:v,go(A){return l.go(A)}};return S}function Pj(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Nc(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function f1(e,t,n="/"){return Vj(e,t,n,!1)}function Vj(e,t,n,r){let a=typeof t=="string"?zo(t):t,o=wi(a.pathname||"/",n);if(o==null)return null;let l=h1(e);Bj(l);let u=null;for(let d=0;u==null&&d<l.length;++d){let f=Zj(o);u=Wj(l[d],f,r)}return u}function h1(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("/")&&(Ct(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=Si([r,d.relativePath]),m=n.concat(d);o.children&&o.children.length>0&&(Ct(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),h1(o.children,t,m,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:qj(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 m1(o.path))a(o,l,d)}),t}function m1(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=m1(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 Bj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Kj(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var zj=/^:[\w-]+$/,Uj=3,Hj=2,Fj=1,Gj=10,$j=-2,pS=e=>e==="*";function qj(e,t){let n=e.split("/"),r=n.length;return n.some(pS)&&(r+=$j),t&&(r+=Hj),n.filter(a=>!pS(a)).reduce((a,o)=>a+(zj.test(o)?Uj:o===""?Fj:Gj),r)}function Kj(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 Wj(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)||"/",y=_f({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),g=d.route;if(!y&&f&&n&&!r[r.length-1].route.index&&(y=_f({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!y)return null;Object.assign(a,y.params),l.push({params:a,pathname:Si([o,y.pathname]),pathnameBase:eP(Si([o,y.pathnameBase])),route:g}),y.pathnameBase!=="/"&&(o=Si([o,y.pathnameBase]))}return l}function _f(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Yj(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:y},g)=>{if(m==="*"){let x=u[g]||"";l=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=u[g];return y&&!v?f[m]=void 0:f[m]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:l,pattern:e}}function Yj(e,t=!1,n=!0){Kr(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 Zj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Kr(!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 wi(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 Xj(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?zo(e):e;return{pathname:n?n.startsWith("/")?n:Qj(n,t):t,search:tP(r),hash:nP(a)}}function Qj(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 tg(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 Jj(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function p1(e){let t=Jj(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function g1(e,t,n,r=!1){let a;typeof e=="string"?a=zo(e):(a={...e},Ct(!a.pathname||!a.pathname.includes("?"),tg("?","pathname","search",a)),Ct(!a.pathname||!a.pathname.includes("#"),tg("#","pathname","hash",a)),Ct(!a.search||!a.search.includes("#"),tg("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let y=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),y-=1;a.pathname=g.join("/")}u=y>=0?t[y]:"/"}let d=Xj(a,u),f=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Si=e=>e.join("/").replace(/\/\/+/g,"/"),eP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var y1=["POST","PUT","PATCH","DELETE"];new Set(y1);var iP=["GET",...y1];new Set(iP);var Uo=E.createContext(null);Uo.displayName="DataRouter";var lh=E.createContext(null);lh.displayName="DataRouterState";var v1=E.createContext({isTransitioning:!1});v1.displayName="ViewTransition";var aP=E.createContext(new Map);aP.displayName="Fetchers";var sP=E.createContext(null);sP.displayName="Await";var Zr=E.createContext(null);Zr.displayName="Navigation";var Xc=E.createContext(null);Xc.displayName="Location";var Di=E.createContext({outlet:null,matches:[],isDataRoute:!1});Di.displayName="Route";var kv=E.createContext(null);kv.displayName="RouteError";function oP(e,{relative:t}={}){Ct(Qc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=E.useContext(Zr),{hash:a,pathname:o,search:l}=Jc(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Si([n,o])),r.createHref({pathname:u,search:l,hash:a})}function Qc(){return E.useContext(Xc)!=null}function _a(){return Ct(Qc(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Xc).location}var b1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _1(e){E.useContext(Zr).static||E.useLayoutEffect(e)}function lP(){let{isDataRoute:e}=E.useContext(Di);return e?xP():cP()}function cP(){Ct(Qc(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Uo),{basename:t,navigator:n}=E.useContext(Zr),{matches:r}=E.useContext(Di),{pathname:a}=_a(),o=JSON.stringify(p1(r)),l=E.useRef(!1);return _1(()=>{l.current=!0}),E.useCallback((d,f={})=>{if(Kr(l.current,b1),!l.current)return;if(typeof d=="number"){n.go(d);return}let m=g1(d,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Si([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,o,a,e])}E.createContext(null);function Jc(e,{relative:t}={}){let{matches:n}=E.useContext(Di),{pathname:r}=_a(),a=JSON.stringify(p1(n));return E.useMemo(()=>g1(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function uP(e,t){return x1(e,t)}function x1(e,t,n,r){var T;Ct(Qc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a,static:o}=E.useContext(Zr),{matches:l}=E.useContext(Di),u=l[l.length-1],d=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",y=u&&u.route;{let R=y&&y.path||"";E1(f,!y||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.
|
|
52
|
-
|
|
53
|
-
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let g=_a(),v;if(t){let R=typeof t=="string"?zo(t):t;Ct(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=g;let x=v.pathname||"/",S=x;if(m!=="/"){let R=m.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(R.length).join("/")}let A=!o&&n&&n.matches&&n.matches.length>0?n.matches:f1(e,{pathname:S});Kr(y||A!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Kr(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=pP(A&&A.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Si([m,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?m:Si([m,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),l,n,r);return t&&w?E.createElement(Xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},w):w}function dP(){let e=_P(),t=rP(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 fP=E.createElement(dP,null),hP=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(Di.Provider,{value:this.props.routeContext},E.createElement(kv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function mP({routeContext:e,match:t,children:n}){let r=E.useContext(Uo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Di.Provider,{value:e},n)}function pP(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);Ct(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:y}=n,g=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||g){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,m)=>{let y,g=!1,v=null,x=null;n&&(y=o&&f.route.id?o[f.route.id]:void 0,v=f.route.errorElement||fP,l&&(u<0&&m===0?(E1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,x=null):u===m&&(g=!0,x=f.route.hydrateFallbackElement||null)));let S=t.concat(a.slice(0,m+1)),A=()=>{let w;return y?w=v:g?w=x:f.route.Component?w=E.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,E.createElement(mP,{match:f,routeContext:{outlet:d,matches:S,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?E.createElement(hP,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):A()},null)}function Ov(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gP(e){let t=E.useContext(Uo);return Ct(t,Ov(e)),t}function yP(e){let t=E.useContext(lh);return Ct(t,Ov(e)),t}function vP(e){let t=E.useContext(Di);return Ct(t,Ov(e)),t}function Dv(e){let t=vP(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function bP(){return Dv("useRouteId")}function _P(){var r;let e=E.useContext(kv),t=yP("useRouteError"),n=Dv("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function xP(){let{router:e}=gP("useNavigate"),t=Dv("useNavigate"),n=E.useRef(!1);return _1(()=>{n.current=!0}),E.useCallback(async(a,o={})=>{Kr(n.current,b1),n.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var gS={};function E1(e,t,n){!t&&!gS[e]&&(gS[e]=!0,Kr(!1,n))}E.memo(EP);function EP({routes:e,future:t,state:n}){return x1(e,void 0,n,t)}function S1(e){Ct(!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 SP({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1}){Ct(!Qc(),"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=zo(n));let{pathname:d="/",search:f="",hash:m="",state:y=null,key:g="default"}=n,v=E.useMemo(()=>{let x=wi(d,l);return x==null?null:{location:{pathname:x,search:f,hash:m,state:y,key:g},navigationType:r}},[l,d,f,m,y,g,r]);return Kr(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(Zr.Provider,{value:u},E.createElement(Xc.Provider,{children:t,value:v}))}function AP({children:e,location:t}){return uP(ly(e),t)}function ly(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,ly(r.props.children,o));return}Ct(r.type===S1,`[${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>`),Ct(!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=ly(r.props.children,o)),n.push(l)}),n}var tf="get",nf="application/x-www-form-urlencoded";function ch(e){return e!=null&&typeof e.tagName=="string"}function wP(e){return ch(e)&&e.tagName.toLowerCase()==="button"}function TP(e){return ch(e)&&e.tagName.toLowerCase()==="form"}function CP(e){return ch(e)&&e.tagName.toLowerCase()==="input"}function RP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function NP(e,t){return e.button===0&&(!t||t==="_self")&&!RP(e)}var kd=null;function kP(){if(kd===null)try{new FormData(document.createElement("form"),0),kd=!1}catch{kd=!0}return kd}var OP=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ng(e){return e!=null&&!OP.has(e)?(Kr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nf}"`),null):e}function DP(e,t){let n,r,a,o,l;if(TP(e)){let u=e.getAttribute("action");r=u?wi(u,t):null,n=e.getAttribute("method")||tf,a=ng(e.getAttribute("enctype"))||nf,o=new FormData(e)}else if(wP(e)||CP(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?wi(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||tf,a=ng(e.getAttribute("formenctype"))||ng(u.getAttribute("enctype"))||nf,o=new FormData(u,e),!kP()){let{name:f,type:m,value:y}=e;if(m==="image"){let g=f?`${f}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else f&&o.append(f,y)}}else{if(ch(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=tf,r=null,a=nf,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}function Iv(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function IP(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 LP(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 MP(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await IP(o,n);return l.links?l.links():[]}return[]}));return BP(r.flat(1).filter(LP).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function yS(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 y;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 g=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((y=n[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function jP(e,t,{includeHydrateFallback:n}={}){return PP(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 PP(e){return[...new Set(e)]}function VP(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function BP(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(VP(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zP=new Set([100,101,204,205]);function UP(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&&wi(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function A1(){let e=E.useContext(Uo);return Iv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function HP(){let e=E.useContext(lh);return Iv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Lv=E.createContext(void 0);Lv.displayName="FrameworkContext";function w1(){let e=E.useContext(Lv);return Iv(e,"You must render this element inside a <HydratedRouter> element"),e}function FP(e,t){let n=E.useContext(Lv),[r,a]=E.useState(!1),[o,l]=E.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:y}=t,g=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=w=>{w.forEach(T=>{l(T.isIntersecting)})},A=new IntersectionObserver(S,{threshold:.5});return g.current&&A.observe(g.current),()=>{A.disconnect()}}},[e]),E.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let v=()=>{a(!0)},x=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:ec(u,v),onBlur:ec(d,x),onMouseEnter:ec(f,v),onMouseLeave:ec(m,x),onTouchStart:ec(y,v)}]:[!1,g,{}]}function ec(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function GP({page:e,...t}){let{router:n}=A1(),r=E.useMemo(()=>f1(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?E.createElement(qP,{page:e,matches:r,...t}):null}function $P(e){let{manifest:t,routeModules:n}=w1(),[r,a]=E.useState([]);return E.useEffect(()=>{let o=!1;return MP(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function qP({page:e,matches:t,...n}){let r=_a(),{manifest:a,routeModules:o}=w1(),{basename:l}=A1(),{loaderData:u,matches:d}=HP(),f=E.useMemo(()=>yS(e,t,d,a,r,"data"),[e,t,d,a,r]),m=E.useMemo(()=>yS(e,t,d,a,r,"assets"),[e,t,d,a,r]),y=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(w=>{var R;let T=a.routes[w.route.id];!T||!T.hasLoader||(!f.some(O=>O.route.id===w.route.id)&&w.route.id in u&&((R=o[w.route.id])!=null&&R.shouldRevalidate)||T.hasClientLoader?S=!0:x.add(w.route.id))}),x.size===0)return[];let A=UP(e,l);return S&&x.size>0&&A.searchParams.set("_routes",t.filter(w=>x.has(w.route.id)).map(w=>w.route.id).join(",")),[A.pathname+A.search]},[l,u,r,a,f,t,e,o]),g=E.useMemo(()=>jP(m,a),[m,a]),v=$P(m);return E.createElement(E.Fragment,null,y.map(x=>E.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),g.map(x=>E.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),v.map(({key:x,link:S})=>E.createElement("link",{key:x,...S})))}function KP(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var T1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{T1&&(window.__reactRouterVersion="7.6.0")}catch{}function WP({basename:e,children:t,window:n}){let r=E.useRef();r.current==null&&(r.current=Lj({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(SP,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a})}var C1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,R1=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:y,...g},v){let{basename:x}=E.useContext(Zr),S=typeof f=="string"&&C1.test(f),A,w=!1;if(typeof f=="string"&&S&&(A=f,T1))try{let V=new URL(window.location.href),U=f.startsWith("//")?new URL(V.protocol+f):new URL(f),ce=wi(U.pathname,x);U.origin===V.origin&&ce!=null?f=ce+U.search+U.hash:w=!0}catch{Kr(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=oP(f,{relative:a}),[R,O,N]=FP(r,g),M=QP(f,{replace:l,state:u,target:d,preventScrollReset:m,relative:a,viewTransition:y});function D(V){t&&t(V),V.defaultPrevented||M(V)}let L=E.createElement("a",{...g,...N,href:A||T,onClick:w||o?t:D,ref:KP(v,O),target:d,"data-discover":!S&&n==="render"?"true":void 0});return R&&!S?E.createElement(E.Fragment,null,L,E.createElement(GP,{page:T})):L});R1.displayName="Link";var YP=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 y=Jc(l,{relative:f.relative}),g=_a(),v=E.useContext(lh),{navigator:x,basename:S}=E.useContext(Zr),A=v!=null&&rV(y)&&u===!0,w=x.encodeLocation?x.encodeLocation(y).pathname:y.pathname,T=g.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=wi(R,S)||R);const O=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let N=T===w||!a&&T.startsWith(w)&&T.charAt(O)==="/",M=R!=null&&(R===w||!a&&R.startsWith(w)&&R.charAt(w.length)==="/"),D={isActive:N,isPending:M,isTransitioning:A},L=N?t:void 0,V;typeof r=="function"?V=r(D):V=[r,N?"active":null,M?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(D):o;return E.createElement(R1,{...f,"aria-current":L,className:V,ref:m,style:U,to:l,viewTransition:u},typeof d=="function"?d(D):d)});YP.displayName="NavLink";var ZP=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=tf,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:y,...g},v)=>{let x=tV(),S=nV(u,{relative:f}),A=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&C1.test(u),T=R=>{if(d&&d(R),R.defaultPrevented)return;R.preventDefault();let O=R.nativeEvent.submitter,N=(O==null?void 0:O.getAttribute("formmethod"))||l;x(O||R.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:f,preventScrollReset:m,viewTransition:y})};return E.createElement("form",{ref:v,method:A,action:S,onSubmit:r?d:T,...g,"data-discover":!w&&e==="render"?"true":void 0})});ZP.displayName="Form";function XP(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function N1(e){let t=E.useContext(Uo);return Ct(t,XP(e)),t}function QP(e,{target:t,replace:n,state:r,preventScrollReset:a,relative:o,viewTransition:l}={}){let u=lP(),d=_a(),f=Jc(e,{relative:o});return E.useCallback(m=>{if(NP(m,t)){m.preventDefault();let y=n!==void 0?n:Nc(d)===Nc(f);u(e,{replace:y,state:r,preventScrollReset:a,relative:o,viewTransition:l})}},[d,u,f,n,r,t,e,a,o,l])}var JP=0,eV=()=>`__${String(++JP)}__`;function tV(){let{router:e}=N1("useSubmit"),{basename:t}=E.useContext(Zr),n=bP();return E.useCallback(async(r,a={})=>{let{action:o,method:l,encType:u,formData:d,body:f}=DP(r,t);if(a.navigate===!1){let m=a.fetcherKey||eV();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 nV(e,{relative:t}={}){let{basename:n}=E.useContext(Zr),r=E.useContext(Di);Ct(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...Jc(e||".",{relative:t})},l=_a();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(y=>y).forEach(y=>u.append("index",y));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:Si([n,o.pathname])),Nc(o)}function rV(e,t={}){let n=E.useContext(v1);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=N1("useViewTransitionState"),a=Jc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=wi(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=wi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _f(a.pathname,l)!=null||_f(a.pathname,o)!=null}[...zP];var bs=HT();const iV=ah(bs);/**
|
|
54
|
-
* @license lucide-react v0.488.0 - ISC
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the ISC license.
|
|
57
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const aV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),vS=e=>{const t=sV(e);return t.charAt(0).toUpperCase()+t.slice(1)},k1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
59
|
-
* @license lucide-react v0.488.0 - ISC
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/var oV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
64
|
-
* @license lucide-react v0.488.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const lV=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,...oV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:k1("lucide",a),...u},[...l.map(([f,m])=>E.createElement(f,m)),...Array.isArray(o)?o:[o]]));/**
|
|
69
|
-
* @license lucide-react v0.488.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const St=(e,t)=>{const n=E.forwardRef(({className:r,...a},o)=>E.createElement(lV,{ref:o,iconNode:t,className:k1(`lucide-${aV(vS(e))}`,`lucide-${e}`,r),...a}));return n.displayName=vS(e),n};/**
|
|
74
|
-
* @license lucide-react v0.488.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const cV=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],uV=St("arrow-left",cV);/**
|
|
79
|
-
* @license lucide-react v0.488.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const dV=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],fV=St("arrow-up-from-line",dV);/**
|
|
84
|
-
* @license lucide-react v0.488.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const hV=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ho=St("check",hV);/**
|
|
89
|
-
* @license lucide-react v0.488.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const mV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],O1=St("chevron-down",mV);/**
|
|
94
|
-
* @license lucide-react v0.488.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const pV=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],gV=St("chevron-left",pV);/**
|
|
99
|
-
* @license lucide-react v0.488.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const yV=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xf=St("chevron-right",yV);/**
|
|
104
|
-
* @license lucide-react v0.488.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const vV=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],bV=St("chevron-up",vV);/**
|
|
109
|
-
* @license lucide-react v0.488.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const _V=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],xV=St("chevrons-up-down",_V);/**
|
|
114
|
-
* @license lucide-react v0.488.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const EV=[["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"}]],SV=St("copy-check",EV);/**
|
|
119
|
-
* @license lucide-react v0.488.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const AV=[["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"}]],wV=St("copy",AV);/**
|
|
124
|
-
* @license lucide-react v0.488.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const TV=[["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"}]],CV=St("download",TV);/**
|
|
129
|
-
* @license lucide-react v0.488.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const RV=[["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"}]],NV=St("external-link",RV);/**
|
|
134
|
-
* @license lucide-react v0.488.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const kV=[["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"}]],OV=St("eye-off",kV);/**
|
|
139
|
-
* @license lucide-react v0.488.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const DV=[["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"}]],IV=St("eye",DV);/**
|
|
144
|
-
* @license lucide-react v0.488.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const LV=[["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"}]],MV=St("globe",LV);/**
|
|
149
|
-
* @license lucide-react v0.488.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const jV=[["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"}]],PV=St("move-vertical",jV);/**
|
|
154
|
-
* @license lucide-react v0.488.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const VV=[["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"}]],D1=St("pencil",VV);/**
|
|
159
|
-
* @license lucide-react v0.488.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const BV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],uh=St("plus",BV);/**
|
|
164
|
-
* @license lucide-react v0.488.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const zV=[["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"}]],UV=St("rotate-ccw",zV);/**
|
|
169
|
-
* @license lucide-react v0.488.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const HV=[["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"}]],bS=St("save",HV);/**
|
|
174
|
-
* @license lucide-react v0.488.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const FV=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],GV=St("search",FV);/**
|
|
179
|
-
* @license lucide-react v0.488.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const $V=[["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"}]],dh=St("trash",$V);/**
|
|
184
|
-
* @license lucide-react v0.488.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const qV=[["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"}]],I1=St("wand-sparkles",qV);/**
|
|
189
|
-
* @license lucide-react v0.488.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const KV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_s=St("x",KV);function L1(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=L1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fh(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=L1(e))&&(r&&(r+=" "),r+=t);return r}const Mv="-",WV=e=>{const t=ZV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Mv);return u[0]===""&&u.length!==1&&u.shift(),M1(u,t)||YV(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},M1=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?M1(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Mv);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},_S=/^\[(.+)\]$/,YV=e=>{if(_S.test(e)){const t=_S.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ZV=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)cy(n[a],r,a,t);return r},cy=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:xS(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(XV(a)){cy(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{cy(l,xS(t,o),n,r)})})},xS=(e,t)=>{let n=e;return t.split(Mv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},XV=e=>e.isThemeGetter,QV=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)}}},uy="!",dy=":",JV=dy.length,eB=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const o=[];let l=0,u=0,d=0,f;for(let x=0;x<a.length;x++){let S=a[x];if(l===0&&u===0){if(S===dy){o.push(a.slice(d,x)),d=x+JV;continue}if(S==="/"){f=x;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const m=o.length===0?a:a.substring(d),y=tB(m),g=y!==m,v=f&&f>d?f-d:void 0;return{modifiers:o,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:v}};if(t){const a=t+dy,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},tB=e=>e.endsWith(uy)?e.substring(0,e.length-1):e.startsWith(uy)?e.substring(1):e,nB=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}},rB=e=>({cache:QV(e.cacheSize),parseClassName:eB(e),sortModifiers:nB(e),...WV(e)}),iB=/\s+/,aB=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],u=e.trim().split(iB);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:y,modifiers:g,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:S}=n(m);if(y){d=m+(d.length>0?" "+d:d);continue}let A=!!S,w=r(A?x.substring(0,S):x);if(!w){if(!A){d=m+(d.length>0?" "+d:d);continue}if(w=r(x),!w){d=m+(d.length>0?" "+d:d);continue}A=!1}const T=o(g).join(":"),R=v?T+uy:T,O=R+w;if(l.includes(O))continue;l.push(O);const N=a(w,A);for(let M=0;M<N.length;++M){const D=N[M];l.push(R+D)}d=m+(d.length>0?" "+d:d)}return d};function sB(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=j1(t))&&(r&&(r+=" "),r+=n);return r}const j1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=j1(e[r]))&&(n&&(n+=" "),n+=t);return n};function oB(e,...t){let n,r,a,o=l;function l(d){const f=t.reduce((m,y)=>y(m),e());return n=rB(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=aB(d,n);return a(d,m),m}return function(){return o(sB.apply(null,arguments))}}const $t=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},P1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,V1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lB=/^\d+\/\d+$/,cB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uB=/\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$/,dB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,fB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,io=e=>lB.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),na=e=>!!e&&Number.isInteger(Number(e)),rg=e=>e.endsWith("%")&&et(e.slice(0,-1)),bi=e=>cB.test(e),mB=()=>!0,pB=e=>uB.test(e)&&!dB.test(e),B1=()=>!1,gB=e=>fB.test(e),yB=e=>hB.test(e),vB=e=>!Ne(e)&&!ke(e),bB=e=>Fo(e,H1,B1),Ne=e=>P1.test(e),Ja=e=>Fo(e,F1,pB),ig=e=>Fo(e,AB,et),ES=e=>Fo(e,z1,B1),_B=e=>Fo(e,U1,yB),Od=e=>Fo(e,G1,gB),ke=e=>V1.test(e),tc=e=>Go(e,F1),xB=e=>Go(e,wB),SS=e=>Go(e,z1),EB=e=>Go(e,H1),SB=e=>Go(e,U1),Dd=e=>Go(e,G1,!0),Fo=(e,t,n)=>{const r=P1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Go=(e,t,n=!1)=>{const r=V1.exec(e);return r?r[1]?t(r[1]):n:!1},z1=e=>e==="position"||e==="percentage",U1=e=>e==="image"||e==="url",H1=e=>e==="length"||e==="size"||e==="bg-size",F1=e=>e==="length",AB=e=>e==="number",wB=e=>e==="family-name",G1=e=>e==="shadow",TB=()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),a=$t("tracking"),o=$t("leading"),l=$t("breakpoint"),u=$t("container"),d=$t("spacing"),f=$t("radius"),m=$t("shadow"),y=$t("inset-shadow"),g=$t("text-shadow"),v=$t("drop-shadow"),x=$t("blur"),S=$t("perspective"),A=$t("aspect"),w=$t("ease"),T=$t("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...O(),ke,Ne],M=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],L=()=>[ke,Ne,d],V=()=>[io,"full","auto",...L()],U=()=>[na,"none","subgrid",ke,Ne],ce=()=>["auto",{span:["full",na,ke,Ne]},na,ke,Ne],ie=()=>[na,"auto",ke,Ne],de=()=>["auto","min","max","fr",ke,Ne],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...L()],ne=()=>[io,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],q=()=>[e,ke,Ne],ye=()=>[...O(),SS,ES,{position:[ke,Ne]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",EB,bB,{size:[ke,Ne]}],F=()=>[rg,tc,Ja],te=()=>["","none","full",f,ke,Ne],re=()=>["",et,tc,Ja],fe=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[et,rg,SS,ES],Ee=()=>["","none",x,ke,Ne],Oe=()=>["none",et,ke,Ne],Ce=()=>["none",et,ke,Ne],Fe=()=>[et,ke,Ne],Ke=()=>[io,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[mB],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[vB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",et],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",io,Ne,ke,A]}],container:["container"],columns:[{columns:[et,Ne,ke,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[na,"auto",ke,Ne]}],basis:[{basis:[io,"full","auto",u,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,io,"auto","initial","none",Ne]}],grow:[{grow:["",et,ke,Ne]}],shrink:[{shrink:["",et,ke,Ne]}],order:[{order:[na,"first","last","none",ke,Ne]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[u,"screen",...ne()]}],"min-w":[{"min-w":[u,"screen","none",...ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",n,tc,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ke,ig]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rg,Ne]}],"font-family":[{font:[xB,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,ke,Ne]}],"line-clamp":[{"line-clamp":[et,"none",ke,ig]}],leading:[{leading:[o,...L()]}],"list-image":[{"list-image":["none",ke,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",ke,Ja]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[et,"auto",ke,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},na,ke,Ne],radial:["",ke,Ne],conic:[na,ke,Ne]},SB,_B]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,ke,Ne]}],"outline-w":[{outline:["",et,tc,Ja]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",m,Dd,Od]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",y,Dd,Od]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[et,Ja]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",g,Dd,Od]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[et,ke,Ne]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[et]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[ke,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[et]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Ne]}],filter:[{filter:["","none",ke,Ne]}],blur:[{blur:Ee()}],brightness:[{brightness:[et,ke,Ne]}],contrast:[{contrast:[et,ke,Ne]}],"drop-shadow":[{"drop-shadow":["","none",v,Dd,Od]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",et,ke,Ne]}],"hue-rotate":[{"hue-rotate":[et,ke,Ne]}],invert:[{invert:["",et,ke,Ne]}],saturate:[{saturate:[et,ke,Ne]}],sepia:[{sepia:["",et,ke,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Ne]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[et,ke,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[et,ke,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,ke,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,ke,Ne]}],"backdrop-invert":[{"backdrop-invert":["",et,ke,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[et,ke,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[et,ke,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",et,ke,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",ke,Ne]}],ease:[{ease:["linear","initial",w,ke,Ne]}],delay:[{delay:[et,ke,Ne]}],animate:[{animate:["none",T,ke,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ke,Ne]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[ke,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ke()}],"translate-x":[{"translate-x":Ke()}],"translate-y":[{"translate-y":Ke()}],"translate-z":[{"translate-z":Ke()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",ke,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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,Ne]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[et,tc,Ja,ig]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$1=oB(TB),Ae=(...e)=>$1(fh(e)),AS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wS=fh,hr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return wS(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],y=o==null?void 0:o[f];if(m===null)return null;const g=AS(m)||AS(y);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[y,g]=m;return g===void 0||(f[y]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:y,className:g,...v}=m;return Object.entries(v).every(x=>{let[S,A]=x;return Array.isArray(A)?A.includes({...o,...u}[S]):{...o,...u}[S]===A})?[...f,y,g]:f},[]);return wS(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},CB=({className:e,strokeWidth:t=4})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",stroke:"currentColor",className:Ae("size-full",e),children:b.jsxs("g",{fill:"none",fillRule:"evenodd",strokeWidth:t,children:[b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]}),b.jsxs("circle",{cx:"22",cy:"22",r:"1",children:[b.jsx("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),b.jsx("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]})]})}),Co=({children:e,isLoading:t=!0,className:n,...r})=>b.jsx(b.Fragment,{children:t?b.jsx("div",{className:Ae("flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center",n),role:"status","aria-label":"Animated icon, meaning that the website is processing",...r,children:b.jsx(CB,{className:"size-10 max-h-full max-w-full"})}):e??b.jsx(b.Fragment,{})}),ag=hr("",{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"}}),RB=hr("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}}),yt=({variant:e,size:t,color:n,children:r,Icon:a,IconRight:o,iconClassName:l,isLoading:u,isActive:d,isFullWidth:f=!1,textAlign:m,disabled:y,label:g,className:v,type:x="button",...S})=>{const A=e==="link"||e==="invisible-link";return b.jsxs("button",{disabled:u||y,"aria-current":d?"page":void 0,"aria-label":g,"aria-busy":u,role:A?"link":void 0,type:x,className:RB({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:ag({size:t,className:l,position:"left"})}),b.jsx(Co,{className:ag({size:t,className:l,position:"left"}),isLoading:u??!1}),b.jsx("span",{children:r}),o&&b.jsx(o,{className:ag({size:t,className:l,position:"right"})})]})},q1=({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:Ae("group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out",typeof t<"u"&&!t&&"grid-rows-[1fr] overflow-x-auto",r&&"hover:grid-rows-[1fr] hover:overflow-x-auto",a&&"focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto",n),...l,children:b.jsx("div",{style:{minHeight:`${o}px`},className:Ae(r&&"group-hover/height-smoother:visible",a&&"group-focus/height-smoother:visible",n),children:e})}),K1=({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(yt,{variant:"hoverable",color:"text",onClick:d=>{l(f=>!f),r==null||r(d)},isFullWidth:!0,className:"flex items-center justify-between gap-2",IconRight:O1,iconClassName:Ae("transform transition-transform duration-500 ease-in-out",o?"rotate-0":"-rotate-180"),...a,children:t}),b.jsx(q1,{tabIndex:u!==!1?void 0:-1,isHidden:u,children:e})]})},NB={},TS=e=>{let t;const n=new Set,r=(m,y)=>{const g=typeof m=="function"?m(t):m;if(!Object.is(g,t)){const v=t;t=y??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,v))}},a=()=>t,d={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(NB?"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},kB=e=>e?TS(e):TS;var sg={exports:{}},og={},lg={exports:{}},cg={};/**
|
|
194
|
-
* @license React
|
|
195
|
-
* use-sync-external-store-shim.production.js
|
|
196
|
-
*
|
|
197
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the MIT license found in the
|
|
200
|
-
* LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/var CS;function OB(){if(CS)return cg;CS=1;var e=Yc();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(y,g){var v=g(),x=r({inst:{value:v,getSnapshot:g}}),S=x[0].inst,A=x[1];return o(function(){S.value=v,S.getSnapshot=g,d(S)&&A({inst:S})},[y,v,g]),a(function(){return d(S)&&A({inst:S}),y(function(){d(S)&&A({inst:S})})},[y]),l(v),v}function d(y){var g=y.getSnapshot;y=y.value;try{var v=g();return!n(y,v)}catch{return!0}}function f(y,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return cg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,cg}var RS;function DB(){return RS||(RS=1,lg.exports=OB()),lg.exports}/**
|
|
202
|
-
* @license React
|
|
203
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
204
|
-
*
|
|
205
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
206
|
-
*
|
|
207
|
-
* This source code is licensed under the MIT license found in the
|
|
208
|
-
* LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/var NS;function IB(){if(NS)return og;NS=1;var e=Yc(),t=DB();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 og.useSyncExternalStoreWithSelector=function(f,m,y,g,v){var x=o(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=u(function(){function w(M){if(!T){if(T=!0,R=M,M=g(M),v!==void 0&&S.hasValue){var D=S.value;if(v(D,M))return O=D}return O=M}if(D=O,r(R,M))return D;var L=g(M);return v!==void 0&&v(D,L)?(R=M,D):(R=M,O=L)}var T=!1,R,O,N=y===void 0?null:y;return[function(){return w(m())},N===null?void 0:function(){return w(N())}]},[m,y,g,v]);var A=a(f,x[0],x[1]);return l(function(){S.hasValue=!0,S.value=A},[A]),d(A),A},og}var kS;function LB(){return kS||(kS=1,sg.exports=IB()),sg.exports}var MB=LB();const jB=ah(MB),W1={},{useDebugValue:PB}=Ge,{useSyncExternalStoreWithSelector:VB}=jB;let OS=!1;const BB=e=>e;function zB(e,t=BB,n){(W1?"production":void 0)!=="production"&&n&&!OS&&(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"),OS=!0);const r=VB(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return PB(r),r}const DS=e=>{(W1?"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"?kB(e):e,n=(r,a)=>zB(t,r,a);return Object.assign(n,t),n},Y1=e=>e?DS(e):DS,UB=Y1((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)})),co=()=>({isFetched:!1,fetchedDateTime:null,isLoading:!1,isInvalidated:!1,error:null,isSuccess:!1,data:null,errorCount:0,isEnabled:!0}),ug=(e,t)=>t.filter(n=>e.includes(n.split("/")[0])),HB=(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]??co(),...a}}}}case"MAKE_QUERY_IN_ERROR":{const{key:r,error:a}=t;return{...e,states:{...e.states,[r]:{...e.states[r]??co(),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=ug(o,l);if(u.length===0)return e;const d=structuredClone(e.states);return u.forEach(f=>{d[f]={...e.states[f]??co(),...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=ug(a,o);if(l.length===0)return e;const u={...e.states};return l.forEach(d=>{u[d]=co()}),{...e,states:u}}case"RESET_STATE":{const r=[t.excludeKeys].flat(),a=Object.keys(e.states),o=ug(r,a),l={};return a.forEach(u=>{l[u]=o.includes(u)?e.states[u]:co()}),{...e,states:l}}default:return e}},Z1=E.createContext(null),FB=({children:e})=>{const[t,n]=E.useReducer(HB,{states:{}}),r=f=>t.states[f]??co(),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(Z1.Provider,{value:{getStates:r,setQueryState:a,setQueriesState:o,makeQueryInError:l,resetKeyState:u,resetState:d},children:e})},GB=()=>{const e=E.useContext(Z1);if(!e)throw new Error("useAsyncState must be used within an AsyncStateProvider");return e},Id=new Map,$B=!1,qB=!1,KB=!0,WB=!1,YB=1,ZB=!1,XB=5*60*1e3,QB=5*60*1e3,fy=e=>e?Array.isArray(e)?e:[e]:[],IS=(e,t)=>fy(t).length>0?`${e}/${JSON.stringify(t)}`:e,eu=(e,t,n)=>{const r=(n==null?void 0:n.retryLimit)??YB,a=(n==null?void 0:n.autoFetch)??WB,o=(n==null?void 0:n.retryTime)??QB,l=(n==null?void 0:n.cache)??$B,u=(n==null?void 0:n.store)??qB,d=(n==null?void 0:n.enable)??KB,f=(n==null?void 0:n.revalidation)??ZB,m=(n==null?void 0:n.revalidateTime)??XB,y=(n==null?void 0:n.updateQueries)??[],g=(n==null?void 0:n.invalidateQueries)??[],v=n==null?void 0:n.onSuccess,x=n==null?void 0:n.onError,S=fy((n==null?void 0:n.args)??[]),{getStates:A,setQueryState:w,setQueriesState:T,makeQueryInError:R}=GB(),O=E.useRef(S),N=E.useRef(null),M=IS(e,O.current),{isFetched:D,fetchedDateTime:L,isLoading:V,isEnabled:U,error:ce,isSuccess:ie,isInvalidated:de,data:X,errorCount:J}=A(M),H=async(...Y)=>{const F=IS(e,Y);N.current&&N.current.abort();const te=new AbortController;if(N.current=te,Id.has(F))return Id.get(F);const re=(async()=>{w(F,{isLoading:!0});let fe=null;return await t(...Y).then(ge=>{fe=ge,w(F,{data:ge,errorCount:0,isLoading:!1,isFetched:!0,fetchedDateTime:new Date,isSuccess:!0,isInvalidated:!1,error:null}),v==null||v(ge),g.length>0&&T(g,{isInvalidated:!0}),y.length>0&&T(y,{data:ge}),u&&localStorage.setItem(F,JSON.stringify(ge))}).catch(ge=>{console.error({error:ge});const he=ge instanceof Error?ge.message:String(ge);R(F,he),x==null||x(ge.message)}).finally(()=>{Id.delete(F)}),fe})();return Id.set(F,re),await re},ne=async(...Y)=>{if(!(!U||!d))return Y&&(O.current=fy(Y)),await H(...O.current)},q=async(...Y)=>!U||!d||V?void 0:!de&&ie&&l&&X?X:await ne(...Y);E.useEffect(()=>{d!==U&&w(M,{isEnabled:U})},[d,U,M]),E.useEffect(()=>{if(!U||!d||!u||de||D||X)return;const Y=localStorage.getItem(M);try{Y&&w(M,{data:JSON.parse(Y)})}catch(F){console.error(F)}},[u,M,D,de,U,d,X]),E.useEffect(()=>{a&&(!U||!d||D&&!de||V||H(...O.current))},[a,U,d,D,de,V,H]),E.useEffect(()=>{const Y=J>0&&r>0,F=J>r;if(!U||!d||!Y||F||!(l||u)||V||ie)return;const te=setTimeout(()=>{H(...O.current)},o);return()=>clearTimeout(te)},[U,J,r,d,o,l,u,ie,V,H]),E.useEffect(()=>{if(!f||m<=0||!U||!d||V||!ie||!L||!(l||u))return;const Y=setTimeout(()=>{H(...O.current)},m);return()=>clearTimeout(Y)},[f,m,l,u,ie,L,V,U,d,H]);const ye=Y=>{w(M,{data:Y})},P={isFetched:D,isInvalidated:de,error:ce,data:X,errorCount:J,isSuccess:ie,isEnabled:U,isDisabled:!U,isLoading:V,isWaitingData:V&&!D&&!X,isRevalidating:V&&D,[e]:q,revalidate:ne,setData:ye};return E.useEffect(()=>()=>{N.current&&N.current.abort()},[]),P},JB=e=>{var u;const t=Yr(),r=sh(void 0,e??t??rt),{data:a,isFetched:o}=eu("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}},ez=e=>{const t=Yr(),n=e??t??rt,r=sh(void 0,n),{data:a}=eu("getOAuth2AccessToken",r.auth.getOAuth2AccessToken,{cache:!0,autoFetch:!0,enable:!!(n.editor.clientId&&n.editor.clientSecret)});return{oAuth2AccessToken:a==null?void 0:a.data}},tz=(e,t)=>{const n=Yr(),a=sh(void 0,t??n??rt),{getSession:o,revalidate:l,data:u,setData:d,isFetched:f}=eu("getSession",async()=>{try{const y=await a.auth.getSession();if(y.data){const{user:g,organization:v,project:x}=y.data;return{user:g,organization:v,isOrganizationAdmin:(g&&((v==null?void 0:v.adminsIds)??[]).includes(g._id))??!1,project:x,isProjectAdmin:(g&&((x==null?void 0:x.adminsIds)??[]).includes(g._id))??!1}}}catch(y){console.error(y)}return null},{cache:!0,store:!0,autoFetch:!0,enable:!e,invalidateQueries:["getOrganizations","getProjects","getUsers","getDictionaries"]});return{session:E.useMemo(()=>u??(f?null:void 0),[u,f]),fetchSession:o,revalidateSession:l,setSession:d}},tu=({session:e,intlayerConfiguration:t}={})=>{const{csrfToken:n,csrfTokenFetched:r}=JB(t),{session:a,fetchSession:o,revalidateSession:l,setSession:u}=tz(e,t),{oAuth2AccessToken:d}=ez(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 st(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 LS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ds(...e){return t=>{let n=!1;const r=e.map(a=>{const o=LS(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():LS(e[a],null)}}}}function Nt(...e){return E.useCallback(ds(...e),e)}function nz(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 nu(e,t=[]){let n=[];function r(o,l){const u=E.createContext(l),d=n.length;n=[...n,l];const f=y=>{var w;const{scope:g,children:v,...x}=y,S=((w=g==null?void 0:g[e])==null?void 0:w[d])||u,A=E.useMemo(()=>x,Object.values(x));return b.jsx(S.Provider,{value:A,children:v})};f.displayName=o+"Provider";function m(y,g){var S;const v=((S=g==null?void 0:g[e])==null?void 0:S[d])||u,x=E.useContext(v);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${y}\` 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,rz(a,...t)]}function rz(...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 y=d(o)[`__scope${f}`];return{...u,...y}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Ro(e){const t=az(e),n=E.forwardRef((r,a)=>{const{children:o,...l}=r,u=E.Children.toArray(o),d=u.find(oz);if(d){const f=d.props.children,m=u.map(y=>y===d?E.Children.count(f)>1?E.Children.only(null):E.isValidElement(f)?f.props.children:null:y);return b.jsx(t,{...l,ref:a,children:E.isValidElement(f)?E.cloneElement(f,void 0,m):null})}return b.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var iz=Ro("Slot");function az(e){const t=E.forwardRef((n,r)=>{const{children:a,...o}=n;if(E.isValidElement(a)){const l=cz(a),u=lz(o,a.props);return a.type!==E.Fragment&&(u.ref=r?ds(r,l):l),E.cloneElement(a,u)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sz=Symbol("radix.slottable");function oz(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sz}function lz(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)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function cz(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 X1(e){const t=e+"CollectionProvider",[n,r]=nu(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:A,children:w}=S,T=Ge.useRef(null),R=Ge.useRef(new Map).current;return b.jsx(a,{scope:A,itemMap:R,collectionRef:T,children:w})};l.displayName=t;const u=e+"CollectionSlot",d=Ro(u),f=Ge.forwardRef((S,A)=>{const{scope:w,children:T}=S,R=o(u,w),O=Nt(A,R.collectionRef);return b.jsx(d,{ref:O,children:T})});f.displayName=u;const m=e+"CollectionItemSlot",y="data-radix-collection-item",g=Ro(m),v=Ge.forwardRef((S,A)=>{const{scope:w,children:T,...R}=S,O=Ge.useRef(null),N=Nt(A,O),M=o(m,w);return Ge.useEffect(()=>(M.itemMap.set(O,{ref:O,...R}),()=>void M.itemMap.delete(O))),b.jsx(g,{[y]:"",ref:N,children:T})});v.displayName=m;function x(S){const A=o(e+"CollectionConsumer",S);return Ge.useCallback(()=>{const T=A.collectionRef.current;if(!T)return[];const R=Array.from(T.querySelectorAll(`[${y}]`));return Array.from(A.itemMap.values()).sort((M,D)=>R.indexOf(M.ref.current)-R.indexOf(D.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:l,Slot:f,ItemSlot:v},x,r]}var uz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qe=uz.reduce((e,t)=>{const n=Ro(`Primitive.${t}`),r=E.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Q1(e,t){e&&bs.flushSync(()=>e.dispatchEvent(t))}function Tr(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 dz(e,t=globalThis==null?void 0:globalThis.document){const n=Tr(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 fz="DismissableLayer",hy="dismissableLayer.update",hz="dismissableLayer.pointerDownOutside",mz="dismissableLayer.focusOutside",MS,J1=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hh=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=E.useContext(J1),[m,y]=E.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=E.useState({}),x=Nt(t,D=>y(D)),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,O=T>=w,N=gz(D=>{const L=D.target,V=[...f.branches].some(U=>U.contains(L));!O||V||(a==null||a(D),l==null||l(D),D.defaultPrevented||u==null||u())},g),M=yz(D=>{const L=D.target;[...f.branches].some(U=>U.contains(L))||(o==null||o(D),l==null||l(D),D.defaultPrevented||u==null||u())},g);return dz(D=>{T===f.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))},g),E.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(MS=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),jS(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=MS)}},[m,g,n,f]),E.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),jS())},[m,f]),E.useEffect(()=>{const D=()=>v({});return document.addEventListener(hy,D),()=>document.removeEventListener(hy,D)},[]),b.jsx(Qe.div,{...d,ref:x,style:{pointerEvents:R?O?"auto":"none":void 0,...e.style},onFocusCapture:st(e.onFocusCapture,M.onFocusCapture),onBlurCapture:st(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:st(e.onPointerDownCapture,N.onPointerDownCapture)})});hh.displayName=fz;var pz="DismissableLayerBranch",eC=E.forwardRef((e,t)=>{const n=E.useContext(J1),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(Qe.div,{...e,ref:a})});eC.displayName=pz;function gz(e,t=globalThis==null?void 0:globalThis.document){const n=Tr(e),r=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){tC(hz,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 yz(e,t=globalThis==null?void 0:globalThis.document){const n=Tr(e),r=E.useRef(!1);return E.useEffect(()=>{const a=o=>{o.target&&!r.current&&tC(mz,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 jS(){const e=new CustomEvent(hy);document.dispatchEvent(e)}function tC(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?Q1(a,o):a.dispatchEvent(o)}var vz=hh,bz=eC,dn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},_z="Portal",mh=E.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,o]=E.useState(!1);dn(()=>o(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?iV.createPortal(b.jsx(Qe.div,{...r,ref:t}),l):null});mh.displayName=_z;function xz(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var ru=e=>{const{present:t,children:n}=e,r=Ez(t),a=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Nt(r.ref,Sz(a));return typeof n=="function"||r.isPresent?E.cloneElement(a,{ref:o}):null};ru.displayName="Presence";function Ez(e){const[t,n]=E.useState(),r=E.useRef(null),a=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[u,d]=xz(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const f=Ld(r.current);o.current=u==="mounted"?f:"none"},[u]),dn(()=>{const f=r.current,m=a.current;if(m!==e){const g=o.current,v=Ld(f);e?d("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),dn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,y=v=>{const S=Ld(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)})}},g=v=>{v.target===t&&(o.current=Ld(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:E.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ld(e){return(e==null?void 0:e.animationName)||"none"}function Sz(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Az=UT[" useInsertionEffect ".trim().toString()]||dn;function Ef({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=wz({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=E.useRef(e!==void 0);E.useEffect(()=>{const y=m.current;y!==u&&console.warn(`${r} is changing from ${y?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const f=E.useCallback(m=>{var y;if(u){const g=Tz(m)?m(e):m;g!==e&&((y=l.current)==null||y.call(l,g))}else o(m)},[u,e,o,l]);return[d,f]}function wz({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),a=E.useRef(n),o=E.useRef(t);return Az(()=>{o.current=t},[t]),E.useEffect(()=>{var l;a.current!==n&&((l=o.current)==null||l.call(o,n),a.current=n)},[n,a]),[n,r,o]}function Tz(e){return typeof e=="function"}var nC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Cz="VisuallyHidden",jv=E.forwardRef((e,t)=>b.jsx(Qe.span,{...e,ref:t,style:{...nC,...e.style}}));jv.displayName=Cz;var Pv="ToastProvider",[Vv,Rz,Nz]=X1("Toast"),[rC,kz]=nu("Toast",[Nz]),[Oz,ph]=rC(Pv),Bv=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),y=E.useRef(!1),g=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Pv}\`. Expected non-empty \`string\`.`),b.jsx(Vv.Provider,{scope:t,children:b.jsx(Oz,{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:y,isClosePausedRef:g,children:l})})};Bv.displayName=Pv;var iC="ToastViewport",Dz=["F8"],my="toast.viewportPause",py="toast.viewportResume",zv=E.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Dz,label:a="Notifications ({hotkey})",...o}=e,l=ph(iC,n),u=Rz(n),d=E.useRef(null),f=E.useRef(null),m=E.useRef(null),y=E.useRef(null),g=Nt(t,y,l.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=l.toastCount>0;E.useEffect(()=>{const A=w=>{var R;r.length!==0&&r.every(O=>w[O]||w.code===O)&&((R=y.current)==null||R.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[r]),E.useEffect(()=>{const A=d.current,w=y.current;if(x&&A&&w){const T=()=>{if(!l.isClosePausedRef.current){const M=new CustomEvent(my);w.dispatchEvent(M),l.isClosePausedRef.current=!0}},R=()=>{if(l.isClosePausedRef.current){const M=new CustomEvent(py);w.dispatchEvent(M),l.isClosePausedRef.current=!1}},O=M=>{!A.contains(M.relatedTarget)&&R()},N=()=>{A.contains(document.activeElement)||R()};return A.addEventListener("focusin",T),A.addEventListener("focusout",O),A.addEventListener("pointermove",T),A.addEventListener("pointerleave",N),window.addEventListener("blur",T),window.addEventListener("focus",R),()=>{A.removeEventListener("focusin",T),A.removeEventListener("focusout",O),A.removeEventListener("pointermove",T),A.removeEventListener("pointerleave",N),window.removeEventListener("blur",T),window.removeEventListener("focus",R)}}},[x,l.isClosePausedRef]);const S=E.useCallback(({tabbingDirection:A})=>{const T=u().map(R=>{const O=R.ref.current,N=[O,...$z(O)];return A==="forwards"?N:N.reverse()});return(A==="forwards"?T.reverse():T).flat()},[u]);return E.useEffect(()=>{const A=y.current;if(A){const w=T=>{var N,M,D;const R=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!R){const L=document.activeElement,V=T.shiftKey;if(T.target===A&&V){(N=f.current)==null||N.focus();return}const ie=S({tabbingDirection:V?"backwards":"forwards"}),de=ie.findIndex(X=>X===L);dg(ie.slice(de+1))?T.preventDefault():V?(M=f.current)==null||M.focus():(D=m.current)==null||D.focus()}};return A.addEventListener("keydown",w),()=>A.removeEventListener("keydown",w)}},[u,S]),b.jsxs(bz,{ref:d,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&b.jsx(gy,{ref:f,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"forwards"});dg(A)}}),b.jsx(Vv.Slot,{scope:n,children:b.jsx(Qe.ol,{tabIndex:-1,...o,ref:g})}),x&&b.jsx(gy,{ref:m,onFocusFromOutsideViewport:()=>{const A=S({tabbingDirection:"backwards"});dg(A)}})]})});zv.displayName=iC;var aC="ToastFocusProxy",gy=E.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=ph(aC,n);return b.jsx(jv,{"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()}})});gy.displayName=aC;var iu="Toast",Iz="toast.swipeStart",Lz="toast.swipeMove",Mz="toast.swipeCancel",jz="toast.swipeEnd",Uv=E.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...l}=e,[u,d]=Ef({prop:r,defaultProp:a??!0,onChange:o,caller:iu});return b.jsx(ru,{present:n||u,children:b.jsx(Bz,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:Tr(e.onPause),onResume:Tr(e.onResume),onSwipeStart:st(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:st(e.onSwipeMove,f=>{const{x:m,y}=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",`${y}px`)}),onSwipeCancel:st(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:st(e.onSwipeEnd,f=>{const{x:m,y}=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",`${y}px`),d(!1)})})})});Uv.displayName=iu;var[Pz,Vz]=rC(iu,{onClose(){}}),Bz=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:y,onSwipeCancel:g,onSwipeEnd:v,...x}=e,S=ph(iu,n),[A,w]=E.useState(null),T=Nt(t,X=>w(X)),R=E.useRef(null),O=E.useRef(null),N=a||S.duration,M=E.useRef(0),D=E.useRef(N),L=E.useRef(0),{onToastAdd:V,onToastRemove:U}=S,ce=Tr(()=>{var J;(A==null?void 0:A.contains(document.activeElement))&&((J=S.viewport)==null||J.focus()),l()}),ie=E.useCallback(X=>{!X||X===1/0||(window.clearTimeout(L.current),M.current=new Date().getTime(),L.current=window.setTimeout(ce,X))},[ce]);E.useEffect(()=>{const X=S.viewport;if(X){const J=()=>{ie(D.current),f==null||f()},H=()=>{const ne=new Date().getTime()-M.current;D.current=D.current-ne,window.clearTimeout(L.current),d==null||d()};return X.addEventListener(my,H),X.addEventListener(py,J),()=>{X.removeEventListener(my,H),X.removeEventListener(py,J)}}},[S.viewport,N,d,f,ie]),E.useEffect(()=>{o&&!S.isClosePausedRef.current&&ie(N)},[o,N,S.isClosePausedRef,ie]),E.useEffect(()=>(V(),()=>U()),[V,U]);const de=E.useMemo(()=>A?cC(A):null,[A]);return S.viewport?b.jsxs(b.Fragment,{children:[de&&b.jsx(zz,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:de}),b.jsx(Pz,{scope:n,onClose:ce,children:bs.createPortal(b.jsx(Vv.ItemSlot,{scope:n,children:b.jsx(vz,{asChild:!0,onEscapeKeyDown:st(u,()=>{S.isFocusedToastEscapeKeyDownRef.current||ce(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(Qe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":S.swipeDirection,...x,ref:T,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:st(e.onKeyDown,X=>{X.key==="Escape"&&(u==null||u(X.nativeEvent),X.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,ce()))}),onPointerDown:st(e.onPointerDown,X=>{X.button===0&&(R.current={x:X.clientX,y:X.clientY})}),onPointerMove:st(e.onPointerMove,X=>{if(!R.current)return;const J=X.clientX-R.current.x,H=X.clientY-R.current.y,ne=!!O.current,q=["left","right"].includes(S.swipeDirection),ye=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,P=q?ye(0,J):0,Y=q?0:ye(0,H),F=X.pointerType==="touch"?10:2,te={x:P,y:Y},re={originalEvent:X,delta:te};ne?(O.current=te,Md(Lz,y,re,{discrete:!1})):PS(te,S.swipeDirection,F)?(O.current=te,Md(Iz,m,re,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(J)>F||Math.abs(H)>F)&&(R.current=null)}),onPointerUp:st(e.onPointerUp,X=>{const J=O.current,H=X.target;if(H.hasPointerCapture(X.pointerId)&&H.releasePointerCapture(X.pointerId),O.current=null,R.current=null,J){const ne=X.currentTarget,q={originalEvent:X,delta:J};PS(J,S.swipeDirection,S.swipeThreshold)?Md(jz,v,q,{discrete:!0}):Md(Mz,g,q,{discrete:!0}),ne.addEventListener("click",ye=>ye.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),zz=e=>{const{__scopeToast:t,children:n,...r}=e,a=ph(iu,t),[o,l]=E.useState(!1),[u,d]=E.useState(!1);return Fz(()=>l(!0)),E.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:b.jsx(mh,{asChild:!0,children:b.jsx(jv,{...r,children:o&&b.jsxs(b.Fragment,{children:[a.label," ",n]})})})},Uz="ToastTitle",Hv=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(Qe.div,{...r,ref:t})});Hv.displayName=Uz;var Hz="ToastDescription",Fv=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(Qe.div,{...r,ref:t})});Fv.displayName=Hz;var sC="ToastAction",Gv=E.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(lC,{altText:n,asChild:!0,children:b.jsx(gh,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${sC}\`. Expected non-empty \`string\`.`),null)});Gv.displayName=sC;var oC="ToastClose",gh=E.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=Vz(oC,n);return b.jsx(lC,{asChild:!0,children:b.jsx(Qe.button,{type:"button",...r,ref:t,onClick:st(e.onClick,a.onClose)})})});gh.displayName=oC;var lC=E.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return b.jsx(Qe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function cC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Gz(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(...cC(r))}}),t}function Md(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?Q1(a,o):a.dispatchEvent(o)}var PS=(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 Fz(e=()=>{}){const t=Tr(e);dn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Gz(e){return e.nodeType===e.ELEMENT_NODE}function $z(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 dg(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var qz=Bv,uC=zv,dC=Uv,fC=Hv,hC=Fv,Kz=Gv,mC=gh;const Wz=Object.freeze(Object.defineProperty({__proto__:null,Action:Kz,Close:mC,Description:hC,Provider:qz,Root:dC,Title:fC,Toast:Uv,ToastAction:Gv,ToastClose:gh,ToastDescription:Fv,ToastProvider:Bv,ToastTitle:Hv,ToastViewport:zv,Viewport:uC,createToastScope:kz},Symbol.toStringTag,{value:"Module"})),Yz=Wz,Zz=({className:e,...t})=>b.jsx(uC,{className:Ae("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}),Xz=hr("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"}}),Qz=({className:e,variant:t,...n})=>b.jsx(dC,{className:Ae(Xz({variant:t}),e),...n}),Jz=({className:e,...t})=>b.jsx(mC,{className:Ae("text-text/50 hover:text-text/80 focus:outline-hidden absolute right-1 top-1 rounded-md p-1 opacity-0 transition-opacity focus:opacity-100 focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(_s,{className:"size-5"})}),e2=({className:e,...t})=>b.jsx(fC,{className:Ae("text-sm font-semibold [&+div]:text-xs",e),...t}),t2=({className:e,...t})=>b.jsx(hC,{className:Ae("text-sm opacity-90",e),...t}),n2=1,r2=15*60*1e3;let fg=0;const i2=()=>(fg=(fg+1)%Number.MAX_SAFE_INTEGER,fg.toString()),hg=new Map,VS=e=>{if(hg.has(e))return;const t=setTimeout(()=>{hg.delete(e),yc({type:"REMOVE_TOAST",toastId:e})},r2);hg.set(e,t)},a2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,n2)};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?VS(n):e.toasts.forEach(r=>{VS(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)}}},rf=[];let af={toasts:[]};const yc=e=>{af=a2(af,e),rf.forEach(t=>{t(af)})},s2=({...e})=>{const t=i2(),n=a=>yc({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>yc({type:"DISMISS_TOAST",toastId:t});return yc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}},pC=()=>{const[e,t]=E.useState(af);return E.useEffect(()=>(rf.push(t),()=>{const n=rf.indexOf(t);n>-1&&rf.splice(n,1)}),[e]),{...e,toast:s2,dismiss:n=>yc({type:"DISMISS_TOAST",toastId:n})}},Xr=e=>{const t=Yr(),{csrfToken:n,oAuth2AccessToken:r}=tu(),a=r!=null&&r.accessToken?{Authorization:`Bearer ${r.accessToken}`}:void 0;return sh({headers:a,body:n?{csrf_token:n}:void 0},t)};var o2={};const gC=e=>{const{toast:t}=pC();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:(o2.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)}}},l2=(e,{requireUser:t,requireProject:n,requireOrganization:r}={})=>{const a=Yr(),{csrfToken:o,oAuth2AccessToken:l,session:u}=tu({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,y=u?u.project:l==null?void 0:l.project;return{...e,enable:d&&(t?!!f:!0)&&(n?!!y:!0)&&(r?!!m:!0)&&(!!o||!u&&!!l)}},Ii=(e,t,n,r)=>{const a=l2(n??{},r),o=gC(a);return eu(e,t,o)},c2=(e,t,n)=>{const r=gC({});return eu(e,t,r)},u2=e=>Ii("logout",Xr().auth.logout,{invalidateQueries:["getSession"],...e}),d2=e=>Ii("getProjects",Xr().project.getProjects,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),f2=e=>Ii("getDictionaries",Xr().dictionary.getDictionaries,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0,requireProject:!0}),h2=e=>Ii("pushDictionaries",Xr().dictionary.pushDictionaries,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),m2=e=>Ii("deleteDictionary",Xr().dictionary.deleteDictionary,{invalidateQueries:["getDictionaries","getDictionary","getDictionariesKeys"],...e}),p2=e=>Ii("getTags",Xr().tag.getTags,{cache:!0,store:!0,retryLimit:3,autoFetch:!0,revalidation:!0,revalidateTime:5*60*1e3,...e},{requireUser:!0,requireOrganization:!0}),g2=e=>Ii("auditContentDeclaration",Xr().ai.auditContentDeclarationMetadata,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),y2=e=>Ii("auditContentDeclarationField",Xr().ai.auditContentDeclarationField,e,{requireUser:!0,requireOrganization:!0,requireProject:!0}),v2=e=>Ii("autocomplete",Xr().ai.autocomplete,e),b2=e=>c2("writeDictionary",Xr().editor.writeDictionary);var mg,BS;function _2(){if(BS)return mg;BS=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(O){return u(O,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 y(w){return Object.keys(w).concat(m(w))}function g(w,T){try{return T in w}catch{return!1}}function v(w,T){return g(w,T)&&!(Object.hasOwnProperty.call(w,T)&&Object.propertyIsEnumerable.call(w,T))}function x(w,T,R){var O={};return R.isMergeableObject(w)&&y(w).forEach(function(N){O[N]=u(w[N],R)}),y(T).forEach(function(N){v(w,N)||(g(w,N)&&R.isMergeableObject(T[N])?O[N]=f(N,R)(w[N],T[N],R):O[N]=u(T[N],R))}),O}function S(w,T,R){R=R||{},R.arrayMerge=R.arrayMerge||d,R.isMergeableObject=R.isMergeableObject||e,R.cloneUnlessOtherwiseSpecified=u;var O=Array.isArray(T),N=Array.isArray(w),M=O===N;return M?O?R.arrayMerge(w,T,R):x(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(O,N){return S(O,N,R)},{})};var A=S;return mg=A,mg}var x2=_2();const E2=ah(x2),S2=()=>{const{session:e,revalidateSession:t,setSession:n}=tu(),{logout:r}=u2(),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 au=e=>e.type==="checkbox",is=e=>e instanceof Date,An=e=>e==null;const yC=e=>typeof e=="object";var Pt=e=>!An(e)&&!Array.isArray(e)&&yC(e)&&!is(e),vC=e=>Pt(e)&&e.target?au(e.target)?e.target.checked:e.target.value:e,A2=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bC=(e,t)=>e.has(A2(t)),w2=e=>{const t=e.constructor&&e.constructor.prototype;return Pt(t)&&t.hasOwnProperty("isPrototypeOf")},$v=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cn(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(!($v&&(e instanceof Blob||r))&&(n||Pt(e)))if(t=n?[]:{},!n&&!w2(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=cn(e[a]));else return e;return t}var yh=e=>Array.isArray(e)?e.filter(Boolean):[],jt=e=>e===void 0,Se=(e,t,n)=>{if(!t||!Pt(e))return n;const r=yh(t.split(/[,[\].]+?/)).reduce((a,o)=>An(a)?a:a[o],e);return jt(r)||r===e?jt(e[t])?n:e[t]:r},Un=e=>typeof e=="boolean",qv=e=>/^\w*$/.test(e),_C=e=>yh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const a=qv(t)?[t]:_C(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=Pt(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Sf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ar={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},_i={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},xC=Ge.createContext(null),xa=()=>Ge.useContext(xC),T2=e=>{const{children:t,...n}=e;return Ge.createElement(xC.Provider,{value:n},t)};var EC=(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]!==Ar.all&&(t._proxyFormState[l]=!r||Ar.all),n&&(n[l]=!0),e[l]}});return a};const Kv=typeof window<"u"?E.useLayoutEffect:E.useEffect;function C2(e){const t=xa(),{control:n=t.control,disabled:r,name:a,exact:o}=e||{},[l,u]=Ge.useState(n._formState),d=Ge.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Kv(()=>n._subscribe({name:a,formState:d.current,exact:o,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,o]),Ge.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),Ge.useMemo(()=>EC(l,n,d.current,!1),[l,n])}var Br=e=>typeof e=="string",SC=(e,t,n,r,a)=>Br(e)?(r&&t.watch.add(e),Se(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Se(n,o))):(r&&(t.watchAll=!0),n);function R2(e){const t=xa(),{control:n=t.control,name:r,defaultValue:a,disabled:o,exact:l}=e||{},u=Ge.useRef(a),[d,f]=Ge.useState(n._getWatch(r,u.current));return Kv(()=>n._subscribe({name:r,formState:{values:!0},exact:l,callback:m=>!o&&f(SC(r,n._names,m.values||n._formValues,!1,u.current))}),[r,n,o,l]),Ge.useEffect(()=>n._removeUnmounted()),d}function N2(e){const t=xa(),{name:n,disabled:r,control:a=t.control,shouldUnregister:o}=e,l=bC(a._names.array,n),u=R2({control:a,name:n,defaultValue:Se(a._formValues,n,Se(a._defaultValues,n,e.defaultValue)),exact:!0}),d=C2({control:a,name:n,exact:!0}),f=Ge.useRef(e),m=Ge.useRef(a.register(n,{...e.rules,value:u,...Un(e.disabled)?{disabled:e.disabled}:{}})),y=Ge.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Se(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Se(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Se(d.validatingFields,n)},error:{enumerable:!0,get:()=>Se(d.errors,n)}}),[d,n]),g=Ge.useCallback(A=>m.current.onChange({target:{value:vC(A),name:n},type:Sf.CHANGE}),[n]),v=Ge.useCallback(()=>m.current.onBlur({target:{value:Se(a._formValues,n),name:n},type:Sf.BLUR}),[n,a._formValues]),x=Ge.useCallback(A=>{const w=Se(a._fields,n);w&&A&&(w._f.ref={focus:()=>A.focus(),select:()=>A.select(),setCustomValidity:T=>A.setCustomValidity(T),reportValidity:()=>A.reportValidity()})},[a._fields,n]),S=Ge.useMemo(()=>({name:n,value:u,...Un(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:g,onBlur:v,ref:x}),[n,r,d.disabled,g,v,x,u]);return Ge.useEffect(()=>{const A=a._options.shouldUnregister||o;a.register(n,{...f.current.rules,...Un(f.current.disabled)?{disabled:f.current.disabled}:{}});const w=(T,R)=>{const O=Se(a._fields,T);O&&O._f&&(O._f.mount=R)};if(w(n,!0),A){const T=cn(Se(a._options.defaultValues,n));mt(a._defaultValues,n,T),jt(Se(a._formValues,n))&&mt(a._formValues,n,T)}return!l&&a.register(n),()=>{(l?A&&!a._state.action:A)?a.unregister(n):w(n,!1)}},[n,a,l,o]),Ge.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),Ge.useMemo(()=>({field:S,formState:d,fieldState:y}),[S,d,y])}const k2=e=>e.render(N2(e));var AC=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},vc=e=>Array.isArray(e)?e:[e],zS=()=>{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=[]}}},yy=e=>An(e)||!yC(e);function la(e,t){if(yy(e)||yy(t))return e===t;if(is(e)&&is(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(is(o)&&is(l)||Pt(o)&&Pt(l)||Array.isArray(o)&&Array.isArray(l)?!la(o,l):o!==l)return!1}}return!0}var Sn=e=>Pt(e)&&!Object.keys(e).length,Wv=e=>e.type==="file",wr=e=>typeof e=="function",Af=e=>{if(!$v)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},wC=e=>e.type==="select-multiple",Yv=e=>e.type==="radio",O2=e=>Yv(e)||au(e),pg=e=>Af(e)&&e.isConnected;function D2(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=jt(e)?r++:e[t[r++]];return e}function I2(e){for(const t in e)if(e.hasOwnProperty(t)&&!jt(e[t]))return!1;return!0}function qt(e,t){const n=Array.isArray(t)?t:qv(t)?[t]:_C(t),r=n.length===1?e:D2(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(Pt(r)&&Sn(r)||Array.isArray(r)&&I2(r))&&qt(e,n.slice(0,-1)),e}var TC=e=>{for(const t in e)if(wr(e[t]))return!0;return!1};function wf(e,t={}){const n=Array.isArray(e);if(Pt(e)||n)for(const r in e)Array.isArray(e[r])||Pt(e[r])&&!TC(e[r])?(t[r]=Array.isArray(e[r])?[]:{},wf(e[r],t[r])):An(e[r])||(t[r]=!0);return t}function CC(e,t,n){const r=Array.isArray(e);if(Pt(e)||r)for(const a in e)Array.isArray(e[a])||Pt(e[a])&&!TC(e[a])?jt(t)||yy(n[a])?n[a]=Array.isArray(e[a])?wf(e[a],[]):{...wf(e[a])}:CC(e[a],An(t)?{}:t[a],n[a]):n[a]=!la(e[a],t[a]);return n}var nc=(e,t)=>CC(e,t,wf(t));const US={value:!1,isValid:!1},HS={value:!0,isValid:!0};var RC=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&&!jt(e[0].attributes.value)?jt(e[0].value)||e[0].value===""?HS:{value:e[0].value,isValid:!0}:HS:US}return US},NC=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>jt(e)?e:t?e===""?NaN:e&&+e:n&&Br(e)?new Date(e):r?r(e):e;const FS={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,FS):FS;function GS(e){const t=e.ref;return Wv(t)?t.files:Yv(t)?kC(e.refs).value:wC(t)?[...t.selectedOptions].map(({value:n})=>n):au(t)?RC(e.refs).value:NC(jt(t.value)?e.ref.value:t.value,e)}var L2=(e,t,n,r)=>{const a={};for(const o of e){const l=Se(t,o);l&&mt(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Tf=e=>e instanceof RegExp,rc=e=>jt(e)?e:Tf(e)?e.source:Pt(e)?Tf(e.value)?e.value.source:e.value:e,$S=e=>({isOnSubmit:!e||e===Ar.onSubmit,isOnBlur:e===Ar.onBlur,isOnChange:e===Ar.onChange,isOnAll:e===Ar.all,isOnTouch:e===Ar.onTouched});const qS="AsyncFunction";var M2=e=>!!e&&!!e.validate&&!!(wr(e.validate)&&e.validate.constructor.name===qS||Pt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===qS)),j2=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),KS=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const bc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=Se(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(bc(u,t))break}else if(Pt(u)&&bc(u,t))break}}};function WS(e,t,n){const r=Se(e,n);if(r||qv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=Se(t,o),u=Se(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 P2=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Sn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||Ar.all))},V2=(e,t,n)=>!e||!t||e===t||vc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),B2=(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,z2=(e,t)=>!yh(Se(e,t)).length&&qt(e,t),U2=(e,t,n)=>{const r=vc(Se(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},sf=e=>Br(e);function YS(e,t,n="validate"){if(sf(e)||Array.isArray(e)&&e.every(sf)||Un(e)&&!e)return{type:n,message:sf(e)?e:"",ref:t}}var ao=e=>Pt(e)&&!Tf(e)?e:{value:e,message:""},ZS=async(e,t,n,r,a,o)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:m,min:y,max:g,pattern:v,validate:x,name:S,valueAsNumber:A,mount:w}=e._f,T=Se(n,S);if(!w||t.has(S))return{};const R=u?u[0]:l,O=ie=>{a&&R.reportValidity&&(R.setCustomValidity(Un(ie)?"":ie||""),R.reportValidity())},N={},M=Yv(l),D=au(l),L=M||D,V=(A||Wv(l))&&jt(l.value)&&jt(T)||Af(l)&&l.value===""||T===""||Array.isArray(T)&&!T.length,U=AC.bind(null,S,r,N),ce=(ie,de,X,J=_i.maxLength,H=_i.minLength)=>{const ne=ie?de:X;N[S]={type:ie?J:H,message:ne,ref:l,...U(ie?J:H,ne)}};if(o?!Array.isArray(T)||!T.length:d&&(!L&&(V||An(T))||Un(T)&&!T||D&&!RC(u).isValid||M&&!kC(u).isValid)){const{value:ie,message:de}=sf(d)?{value:!!d,message:d}:ao(d);if(ie&&(N[S]={type:_i.required,message:de,ref:R,...U(_i.required,de)},!r))return O(de),N}if(!V&&(!An(y)||!An(g))){let ie,de;const X=ao(g),J=ao(y);if(!An(T)&&!isNaN(T)){const H=l.valueAsNumber||T&&+T;An(X.value)||(ie=H>X.value),An(J.value)||(de=H<J.value)}else{const H=l.valueAsDate||new Date(T),ne=P=>new Date(new Date().toDateString()+" "+P),q=l.type=="time",ye=l.type=="week";Br(X.value)&&T&&(ie=q?ne(T)>ne(X.value):ye?T>X.value:H>new Date(X.value)),Br(J.value)&&T&&(de=q?ne(T)<ne(J.value):ye?T<J.value:H<new Date(J.value))}if((ie||de)&&(ce(!!ie,X.message,J.message,_i.max,_i.min),!r))return O(N[S].message),N}if((f||m)&&!V&&(Br(T)||o&&Array.isArray(T))){const ie=ao(f),de=ao(m),X=!An(ie.value)&&T.length>+ie.value,J=!An(de.value)&&T.length<+de.value;if((X||J)&&(ce(X,ie.message,de.message),!r))return O(N[S].message),N}if(v&&!V&&Br(T)){const{value:ie,message:de}=ao(v);if(Tf(ie)&&!T.match(ie)&&(N[S]={type:_i.pattern,message:de,ref:l,...U(_i.pattern,de)},!r))return O(de),N}if(x){if(wr(x)){const ie=await x(T,n),de=YS(ie,R);if(de&&(N[S]={...de,...U(_i.validate,de.message)},!r))return O(de.message),N}else if(Pt(x)){let ie={};for(const de in x){if(!Sn(ie)&&!r)break;const X=YS(await x[de](T,n),R,de);X&&(ie={...X,...U(de,X.message)},O(X.message),r&&(N[S]=ie))}if(!Sn(ie)&&(N[S]={ref:R,...ie},!r))return N}}return O(!0),N};const H2={mode:Ar.onSubmit,reValidateMode:Ar.onChange,shouldFocusError:!0};function F2(e={}){let t={...H2,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:wr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let a=Pt(t.defaultValues)||Pt(t.values)?cn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:cn(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};let y={...m};const g={array:zS(),state:zS()},v=t.criteriaMode===Ar.all,x=z=>Q=>{clearTimeout(f),f=setTimeout(z,Q)},S=async z=>{if(!t.disabled&&(m.isValid||y.isValid||z)){const Q=t.resolver?Sn((await D()).errors):await V(r,!0);Q!==n.isValid&&g.state.next({isValid:Q})}},A=(z,Q)=>{!t.disabled&&(m.isValidating||m.validatingFields||y.isValidating||y.validatingFields)&&((z||Array.from(u.mount)).forEach(oe=>{oe&&(Q?mt(n.validatingFields,oe,Q):qt(n.validatingFields,oe))}),g.state.next({validatingFields:n.validatingFields,isValidating:!Sn(n.validatingFields)}))},w=(z,Q=[],oe,we,_e=!0,xe=!0)=>{if(we&&oe&&!t.disabled){if(l.action=!0,xe&&Array.isArray(Se(r,z))){const Pe=oe(Se(r,z),we.argA,we.argB);_e&&mt(r,z,Pe)}if(xe&&Array.isArray(Se(n.errors,z))){const Pe=oe(Se(n.errors,z),we.argA,we.argB);_e&&mt(n.errors,z,Pe),z2(n.errors,z)}if((m.touchedFields||y.touchedFields)&&xe&&Array.isArray(Se(n.touchedFields,z))){const Pe=oe(Se(n.touchedFields,z),we.argA,we.argB);_e&&mt(n.touchedFields,z,Pe)}(m.dirtyFields||y.dirtyFields)&&(n.dirtyFields=nc(a,o)),g.state.next({name:z,isDirty:ce(z,Q),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,z,Q)},T=(z,Q)=>{mt(n.errors,z,Q),g.state.next({errors:n.errors})},R=z=>{n.errors=z,g.state.next({errors:n.errors,isValid:!1})},O=(z,Q,oe,we)=>{const _e=Se(r,z);if(_e){const xe=Se(o,z,jt(oe)?Se(a,z):oe);jt(xe)||we&&we.defaultChecked||Q?mt(o,z,Q?xe:GS(_e._f)):X(z,xe),l.mount&&S()}},N=(z,Q,oe,we,_e)=>{let xe=!1,Pe=!1;const ct={name:z};if(!t.disabled){if(!oe||we){(m.isDirty||y.isDirty)&&(Pe=n.isDirty,n.isDirty=ct.isDirty=ce(),xe=Pe!==ct.isDirty);const ht=la(Se(a,z),Q);Pe=!!Se(n.dirtyFields,z),ht?qt(n.dirtyFields,z):mt(n.dirtyFields,z,!0),ct.dirtyFields=n.dirtyFields,xe=xe||(m.dirtyFields||y.dirtyFields)&&Pe!==!ht}if(oe){const ht=Se(n.touchedFields,z);ht||(mt(n.touchedFields,z,oe),ct.touchedFields=n.touchedFields,xe=xe||(m.touchedFields||y.touchedFields)&&ht!==oe)}xe&&_e&&g.state.next(ct)}return xe?ct:{}},M=(z,Q,oe,we)=>{const _e=Se(n.errors,z),xe=(m.isValid||y.isValid)&&Un(Q)&&n.isValid!==Q;if(t.delayError&&oe?(d=x(()=>T(z,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?mt(n.errors,z,oe):qt(n.errors,z)),(oe?!la(_e,oe):_e)||!Sn(we)||xe){const Pe={...we,...xe&&Un(Q)?{isValid:Q}:{},errors:n.errors,name:z};n={...n,...Pe},g.state.next(Pe)}},D=async z=>{A(z,!0);const Q=await t.resolver(o,t.context,L2(z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return A(z),Q},L=async z=>{const{errors:Q}=await D(z);if(z)for(const oe of z){const we=Se(Q,oe);we?mt(n.errors,oe,we):qt(n.errors,oe)}else n.errors=Q;return Q},V=async(z,Q,oe={valid:!0})=>{for(const we in z){const _e=z[we];if(_e){const{_f:xe,...Pe}=_e;if(xe){const ct=u.array.has(xe.name),ht=_e._f&&M2(_e._f);ht&&m.validatingFields&&A([we],!0);const Rn=await ZS(_e,u.disabled,o,v,t.shouldUseNativeValidation&&!Q,ct);if(ht&&m.validatingFields&&A([we]),Rn[xe.name]&&(oe.valid=!1,Q))break;!Q&&(Se(Rn,xe.name)?ct?U2(n.errors,Rn,xe.name):mt(n.errors,xe.name,Rn[xe.name]):qt(n.errors,xe.name))}!Sn(Pe)&&await V(Pe,Q,oe)}}return oe.valid},U=()=>{for(const z of u.unMount){const Q=Se(r,z);Q&&(Q._f.refs?Q._f.refs.every(oe=>!pg(oe)):!pg(Q._f.ref))&&he(z)}u.unMount=new Set},ce=(z,Q)=>!t.disabled&&(z&&Q&&mt(o,z,Q),!la(P(),a)),ie=(z,Q,oe)=>SC(z,u,{...l.mount?o:jt(Q)?a:Br(z)?{[z]:Q}:Q},oe,Q),de=z=>yh(Se(l.mount?o:a,z,t.shouldUnregister?Se(a,z,[]):[])),X=(z,Q,oe={})=>{const we=Se(r,z);let _e=Q;if(we){const xe=we._f;xe&&(!xe.disabled&&mt(o,z,NC(Q,xe)),_e=Af(xe.ref)&&An(Q)?"":Q,wC(xe.ref)?[...xe.ref.options].forEach(Pe=>Pe.selected=_e.includes(Pe.value)):xe.refs?au(xe.ref)?xe.refs.forEach(Pe=>{(!Pe.defaultChecked||!Pe.disabled)&&(Array.isArray(_e)?Pe.checked=!!_e.find(ct=>ct===Pe.value):Pe.checked=_e===Pe.value||!!_e)}):xe.refs.forEach(Pe=>Pe.checked=Pe.value===_e):Wv(xe.ref)?xe.ref.value="":(xe.ref.value=_e,xe.ref.type||g.state.next({name:z,values:cn(o)})))}(oe.shouldDirty||oe.shouldTouch)&&N(z,_e,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&ye(z)},J=(z,Q,oe)=>{for(const we in Q){if(!Q.hasOwnProperty(we))return;const _e=Q[we],xe=`${z}.${we}`,Pe=Se(r,xe);(u.array.has(z)||Pt(_e)||Pe&&!Pe._f)&&!is(_e)?J(xe,_e,oe):X(xe,_e,oe)}},H=(z,Q,oe={})=>{const we=Se(r,z),_e=u.array.has(z),xe=cn(Q);mt(o,z,xe),_e?(g.array.next({name:z,values:cn(o)}),(m.isDirty||m.dirtyFields||y.isDirty||y.dirtyFields)&&oe.shouldDirty&&g.state.next({name:z,dirtyFields:nc(a,o),isDirty:ce(z,xe)})):we&&!we._f&&!An(xe)?J(z,xe,oe):X(z,xe,oe),KS(z,u)&&g.state.next({...n}),g.state.next({name:l.mount?z:void 0,values:cn(o)})},ne=async z=>{l.mount=!0;const Q=z.target;let oe=Q.name,we=!0;const _e=Se(r,oe),xe=ht=>{we=Number.isNaN(ht)||is(ht)&&isNaN(ht.getTime())||la(ht,Se(o,oe,ht))},Pe=$S(t.mode),ct=$S(t.reValidateMode);if(_e){let ht,Rn;const ka=Q.type?GS(_e._f):vC(z),kr=z.type===Sf.BLUR||z.type===Sf.FOCUS_OUT,Uh=!j2(_e._f)&&!t.resolver&&!Se(n.errors,oe)&&!_e._f.deps||B2(kr,Se(n.touchedFields,oe),n.isSubmitted,ct,Pe),ei=KS(oe,u,kr);mt(o,oe,ka),kr?(_e._f.onBlur&&_e._f.onBlur(z),d&&d(0)):_e._f.onChange&&_e._f.onChange(z);const rn=N(oe,ka,kr),Hh=!Sn(rn)||ei;if(!kr&&g.state.next({name:oe,type:z.type,values:cn(o)}),Uh)return(m.isValid||y.isValid)&&(t.mode==="onBlur"?kr&&S():kr||S()),Hh&&g.state.next({name:oe,...ei?{}:rn});if(!kr&&ei&&g.state.next({...n}),t.resolver){const{errors:yr}=await D([oe]);if(xe(ka),we){const _n=WS(n.errors,r,oe),yu=WS(yr,r,_n.name||oe);ht=yu.error,oe=yu.name,Rn=Sn(yr)}}else A([oe],!0),ht=(await ZS(_e,u.disabled,o,v,t.shouldUseNativeValidation))[oe],A([oe]),xe(ka),we&&(ht?Rn=!1:(m.isValid||y.isValid)&&(Rn=await V(r,!0)));we&&(_e._f.deps&&ye(_e._f.deps),M(oe,Rn,ht,rn))}},q=(z,Q)=>{if(Se(n.errors,Q)&&z.focus)return z.focus(),1},ye=async(z,Q={})=>{let oe,we;const _e=vc(z);if(t.resolver){const xe=await L(jt(z)?z:_e);oe=Sn(xe),we=z?!_e.some(Pe=>Se(xe,Pe)):oe}else z?(we=(await Promise.all(_e.map(async xe=>{const Pe=Se(r,xe);return await V(Pe&&Pe._f?{[xe]:Pe}:Pe)}))).every(Boolean),!(!we&&!n.isValid)&&S()):we=oe=await V(r);return g.state.next({...!Br(z)||(m.isValid||y.isValid)&&oe!==n.isValid?{}:{name:z},...t.resolver||!z?{isValid:oe}:{},errors:n.errors}),Q.shouldFocus&&!we&&bc(r,q,z?_e:u.mount),we},P=z=>{const Q={...l.mount?o:a};return jt(z)?Q:Br(z)?Se(Q,z):z.map(oe=>Se(Q,oe))},Y=(z,Q)=>({invalid:!!Se((Q||n).errors,z),isDirty:!!Se((Q||n).dirtyFields,z),error:Se((Q||n).errors,z),isValidating:!!Se(n.validatingFields,z),isTouched:!!Se((Q||n).touchedFields,z)}),F=z=>{z&&vc(z).forEach(Q=>qt(n.errors,Q)),g.state.next({errors:z?n.errors:{}})},te=(z,Q,oe)=>{const we=(Se(r,z,{_f:{}})._f||{}).ref,_e=Se(n.errors,z)||{},{ref:xe,message:Pe,type:ct,...ht}=_e;mt(n.errors,z,{...ht,...Q,ref:we}),g.state.next({name:z,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&we&&we.focus&&we.focus()},re=(z,Q)=>wr(z)?g.state.subscribe({next:oe=>z(ie(void 0,Q),oe)}):ie(z,Q,!0),fe=z=>g.state.subscribe({next:Q=>{V2(z.name,Q.name,z.exact)&&P2(Q,z.formState||m,pr,z.reRenderRoot)&&z.callback({values:{...o},...n,...Q})}}).unsubscribe,ge=z=>(l.mount=!0,y={...y,...z.formState},fe({...z,formState:y})),he=(z,Q={})=>{for(const oe of z?vc(z):u.mount)u.mount.delete(oe),u.array.delete(oe),Q.keepValue||(qt(r,oe),qt(o,oe)),!Q.keepError&&qt(n.errors,oe),!Q.keepDirty&&qt(n.dirtyFields,oe),!Q.keepTouched&&qt(n.touchedFields,oe),!Q.keepIsValidating&&qt(n.validatingFields,oe),!t.shouldUnregister&&!Q.keepDefaultValue&&qt(a,oe);g.state.next({values:cn(o)}),g.state.next({...n,...Q.keepDirty?{isDirty:ce()}:{}}),!Q.keepIsValid&&S()},Ee=({disabled:z,name:Q})=>{(Un(z)&&l.mount||z||u.disabled.has(Q))&&(z?u.disabled.add(Q):u.disabled.delete(Q))},Oe=(z,Q={})=>{let oe=Se(r,z);const we=Un(Q.disabled)||Un(t.disabled);return mt(r,z,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:z}},name:z,mount:!0,...Q}}),u.mount.add(z),oe?Ee({disabled:Un(Q.disabled)?Q.disabled:t.disabled,name:z}):O(z,!0,Q.value),{...we?{disabled:Q.disabled||t.disabled}:{},...t.progressive?{required:!!Q.required,min:rc(Q.min),max:rc(Q.max),minLength:rc(Q.minLength),maxLength:rc(Q.maxLength),pattern:rc(Q.pattern)}:{},name:z,onChange:ne,onBlur:ne,ref:_e=>{if(_e){Oe(z,Q),oe=Se(r,z);const xe=jt(_e.value)&&_e.querySelectorAll&&_e.querySelectorAll("input,select,textarea")[0]||_e,Pe=O2(xe),ct=oe._f.refs||[];if(Pe?ct.find(ht=>ht===xe):xe===oe._f.ref)return;mt(r,z,{_f:{...oe._f,...Pe?{refs:[...ct.filter(pg),xe,...Array.isArray(Se(a,z))?[{}]:[]],ref:{type:xe.type,name:z}}:{ref:xe}}}),O(z,!1,void 0,xe)}else oe=Se(r,z,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||Q.shouldUnregister)&&!(bC(u.array,z)&&l.action)&&u.unMount.add(z)}}},Ce=()=>t.shouldFocusError&&bc(r,q,u.mount),Fe=z=>{Un(z)&&(g.state.next({disabled:z}),bc(r,(Q,oe)=>{const we=Se(r,oe);we&&(Q.disabled=we._f.disabled||z,Array.isArray(we._f.refs)&&we._f.refs.forEach(_e=>{_e.disabled=we._f.disabled||z}))},0,!1))},Ke=(z,Q)=>async oe=>{let we;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let _e=cn(o);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:xe,values:Pe}=await D();n.errors=xe,_e=Pe}else await V(r);if(u.disabled.size)for(const xe of u.disabled)mt(_e,xe,void 0);if(qt(n.errors,"root"),Sn(n.errors)){g.state.next({errors:{}});try{await z(_e,oe)}catch(xe){we=xe}}else Q&&await Q({...n.errors},oe),Ce(),setTimeout(Ce);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sn(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},Et=(z,Q={})=>{Se(r,z)&&(jt(Q.defaultValue)?H(z,cn(Se(a,z))):(H(z,Q.defaultValue),mt(a,z,cn(Q.defaultValue))),Q.keepTouched||qt(n.touchedFields,z),Q.keepDirty||(qt(n.dirtyFields,z),n.isDirty=Q.defaultValue?ce(z,cn(Se(a,z))):ce()),Q.keepError||(qt(n.errors,z),m.isValid&&S()),g.state.next({...n}))},Yt=(z,Q={})=>{const oe=z?cn(z):a,we=cn(oe),_e=Sn(z),xe=_e?a:we;if(Q.keepDefaultValues||(a=oe),!Q.keepValues){if(Q.keepDirtyValues){const Pe=new Set([...u.mount,...Object.keys(nc(a,o))]);for(const ct of Array.from(Pe))Se(n.dirtyFields,ct)?mt(xe,ct,Se(o,ct)):H(ct,Se(xe,ct))}else{if($v&&jt(z))for(const Pe of u.mount){const ct=Se(r,Pe);if(ct&&ct._f){const ht=Array.isArray(ct._f.refs)?ct._f.refs[0]:ct._f.ref;if(Af(ht)){const Rn=ht.closest("form");if(Rn){Rn.reset();break}}}}for(const Pe of u.mount)H(Pe,Se(xe,Pe))}o=cn(xe),g.array.next({values:{...xe}}),g.state.next({values:{...xe}})}u={mount:Q.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!Q.keepIsValid||!!Q.keepDirtyValues,l.watch=!!t.shouldUnregister,g.state.next({submitCount:Q.keepSubmitCount?n.submitCount:0,isDirty:_e?!1:Q.keepDirty?n.isDirty:!!(Q.keepDefaultValues&&!la(z,a)),isSubmitted:Q.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:_e?{}:Q.keepDirtyValues?Q.keepDefaultValues&&o?nc(a,o):n.dirtyFields:Q.keepDefaultValues&&z?nc(a,z):Q.keepDirty?n.dirtyFields:{},touchedFields:Q.keepTouched?n.touchedFields:{},errors:Q.keepErrors?n.errors:{},isSubmitSuccessful:Q.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ln=(z,Q)=>Yt(wr(z)?z(o):z,Q),Cn=(z,Q={})=>{const oe=Se(r,z),we=oe&&oe._f;if(we){const _e=we.refs?we.refs[0]:we.ref;_e.focus&&(_e.focus(),Q.shouldSelect&&wr(_e.select)&&_e.select())}},pr=z=>{n={...n,...z}},gr={control:{register:Oe,unregister:he,getFieldState:Y,handleSubmit:Ke,setError:te,_subscribe:fe,_runSchema:D,_getWatch:ie,_getDirty:ce,_setValid:S,_setFieldArray:w,_setDisabledField:Ee,_setErrors:R,_getFieldArray:de,_reset:Yt,_resetDefaultValues:()=>wr(t.defaultValues)&&t.defaultValues().then(z=>{Ln(z,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:Fe,_subjects:g,_proxyFormState:m,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},get _options(){return t},set _options(z){t={...t,...z}}},subscribe:ge,trigger:ye,register:Oe,handleSubmit:Ke,watch:re,setValue:H,getValues:P,reset:Ln,resetField:Et,clearErrors:F,unregister:he,setError:te,setFocus:Cn,getFieldState:Y};return{...gr,formControl:gr}}function G2(e={}){const t=Ge.useRef(void 0),n=Ge.useRef(void 0),[r,a]=Ge.useState({isDirty:!1,isValidating:!1,isLoading:wr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:wr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:F2(e),formState:r},e.formControl&&e.defaultValues&&!wr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const o=t.current.control;return o._options=e,Kv(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),o._formState.isReady=!0,l},[o]),Ge.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ge.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode),e.errors&&!Sn(e.errors)&&o._setErrors(e.errors)},[o,e.errors,e.mode,e.reValidateMode]),Ge.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),Ge.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),Ge.useEffect(()=>{e.values&&!la(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a(l=>({...l}))):o._resetDefaultValues()},[o,e.values]),Ge.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=EC(r,o),t.current}const XS=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Se(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},OC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?XS(r.ref,n,e):r.refs&&r.refs.forEach(a=>XS(a,n,e))}},$2=(e,t)=>{t.shouldUseNativeValidation&&OC(e,t);const n={};for(const r in e){const a=Se(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(q2(t.names||Object.keys(e),r)){const l=Object.assign({},Se(n,r));mt(l,"root",o),mt(n,r,l)}else mt(n,r,o)}return n},q2=(e,t)=>e.some(n=>n.startsWith(t+"."));var K2=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(y){return e.push(y)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=AC(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n},W2=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&&OC({},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:$2(K2(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}}};const gg=async e=>e&&typeof e.then=="function"?await e:e,Y2=({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 gg(t==null?void 0:t(f)),m.success?await gg(n==null?void 0:n(m.data)):await gg(r==null?void 0:r(new Error(m.error.errors.map(y=>y.message).join(", "))))};return b.jsx(T2,{...u,children:b.jsx("form",{className:Ae("flex size-full flex-col gap-y-6",a),onSubmit:u.handleSubmit(d),autoComplete:l?"on":"off",children:o})})},Z2=(e,t)=>{const n=G2({resolver:W2(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}},X2=e=>{const t=E.useId(),n=E.useMemo(()=>({id:t}),[t]);return b.jsx(DC,{value:n,children:b.jsx("div",{className:"flex flex-col gap-2 p-2",...e})})},DC=E.createContext({}),IC=E.createContext({}),Q2=({...e})=>{const t=E.useMemo(()=>({name:e.name}),[e.name]);return b.jsx(IC,{value:t,children:b.jsx(k2,{...e})})},Ea=()=>{const e=E.useContext(IC),t=E.useContext(DC),{getFieldState:n,formState:r}=xa(),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}},LC=hr("",{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"}}),$o=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...a})=>b.jsx("input",{className:LC({variant:t,size:n,validationStyleEnabled:e?"enabled":"disabled",className:r}),...a}),J2=hr("",{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"}}),eU=({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:J2({variant:a,size:n,color:r,validationStyleEnabled:e?"enabled":"disabled",className:o}),id:u,...l}),b.jsx("label",{htmlFor:u,children:t})]})},tU=e=>{const[t,n]=E.useState(!1),r=o=>{o.preventDefault(),o.stopPropagation(),n(l=>!l)},a=t?IV:OV;return b.jsxs("div",{className:"relative",children:[b.jsx($o,{...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})})]})},MC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>b.jsx("textarea",{className:Ae("resize-none",LC({variant:t,validationStyleEnabled:n?"enabled":"disabled",className:e})),...r}),jC=({value:e="",onCancel:t,onSave:n,onClick:r,children:a,isDisabled:o,...l})=>{const[u,d]=E.useState(!1),f=E.useRef(null),m=x=>{x.stopPropagation(),d(!1),n()},y=x=>{x.stopPropagation(),d(!1),t()},g=!e||e===""?"-":e,v=E.useCallback(x=>{const S=window.getSelection();S&&S.toString().trim()!==""||f.current&&!f.current.contains(x.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:x=>{d(!0),r==null||r(x)},ref:f,...l,children:[b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"display":"hidden"),children:[a,b.jsx(yt,{label:"Save",variant:"hoverable",size:"icon-sm",color:"text",Icon:Ho,onClick:m,disabled:o,className:"!text-current"}),b.jsx(yt,{label:"Cancel",color:"text",variant:"hoverable",className:"!text-current",size:"icon-sm",Icon:_s,onClick:y,disabled:o})]},String(u)),b.jsxs("div",{className:Ae("flex flex-1 gap-2",u?"hidden":"display"),children:[b.jsx("span",{className:"ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6",children:g}),b.jsx(yt,{label:"Edit",Icon:D1,color:"text",variant:"hoverable",size:"icon-sm",className:"invisible !text-current group-hover/editable-field:visible",disabled:o,onClick:x=>{x.stopPropagation(),d(!0)}})]})]})},PC=({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(jC,{value:u,onCancel:l,onSave:o,children:b.jsx($o,{ref:a,...r})})},QS=24,JS=12,Zv=({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 y=m.style;y.height="auto";const g=m.scrollHeight,v=QS*r+JS,x=QS+JS;y.height=Math.max(Math.min(g,v),x)+"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(MC,{ref:f,onChange:d,className:Ae("overflow-y-scroll",t?"resize-none":"",e),...o})},VC=({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(jC,{value:u,onCancel:l,onSave:o,onClick:f=>{f.preventDefault(),f.stopPropagation()},children:b.jsx(Zv,{className:"leading-6",ref:a,onClick:f=>{f.preventDefault(),f.stopPropagation()},...r})})},nU=hr("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"}}),rU=({className:e,variant:t,color:n,...r})=>b.jsx("div",{className:Ae(nU({variant:t,color:n}),e),...r});var iU=UT[" useId ".trim().toString()]||(()=>{}),aU=0;function ur(e){const[t,n]=E.useState(iU());return dn(()=>{n(r=>r??String(aU++))},[e]),t?`radix-${t}`:""}var yg="focusScope.autoFocusOnMount",vg="focusScope.autoFocusOnUnmount",eA={bubbles:!1,cancelable:!0},sU="FocusScope",Xv=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=E.useState(null),f=Tr(a),m=Tr(o),y=E.useRef(null),g=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 O=R.target;u.contains(O)?y.current=O:aa(y.current,{select:!0})},A=function(R){if(v.paused||!u)return;const O=R.relatedTarget;O!==null&&(u.contains(O)||aa(y.current,{select:!0}))},w=function(R){if(document.activeElement===document.body)for(const N of R)N.removedNodes.length>0&&aa(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){nA.add(v);const S=document.activeElement;if(!u.contains(S)){const w=new CustomEvent(yg,eA);u.addEventListener(yg,f),u.dispatchEvent(w),w.defaultPrevented||(oU(fU(BC(u)),{select:!0}),document.activeElement===S&&aa(u))}return()=>{u.removeEventListener(yg,f),setTimeout(()=>{const w=new CustomEvent(vg,eA);u.addEventListener(vg,m),u.dispatchEvent(w),w.defaultPrevented||aa(S??document.body,{select:!0}),u.removeEventListener(vg,m),nA.remove(v)},0)}}},[u,f,m,v]);const x=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,O]=lU(T);R&&O?!S.shiftKey&&w===O?(S.preventDefault(),n&&aa(R,{select:!0})):S.shiftKey&&w===R&&(S.preventDefault(),n&&aa(O,{select:!0})):w===T&&S.preventDefault()}},[n,r,v.paused]);return b.jsx(Qe.div,{tabIndex:-1,...l,ref:g,onKeyDown:x})});Xv.displayName=sU;function oU(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(aa(r,{select:t}),document.activeElement!==n)return}function lU(e){const t=BC(e),n=tA(t,e),r=tA(t.reverse(),e);return[n,r]}function BC(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 tA(e,t){for(const n of e)if(!cU(n,{upTo:t}))return n}function cU(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 uU(e){return e instanceof HTMLInputElement&&"select"in e}function aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uU(e)&&t&&e.select()}}var nA=dU();function dU(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=rA(e,t),e.unshift(t)},remove(t){var n;e=rA(e,t),(n=e[0])==null||n.resume()}}}function rA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fU(e){return e.filter(t=>t.tagName!=="A")}var bg=0;function zC(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??iA()),document.body.insertAdjacentElement("beforeend",e[1]??iA()),bg++,()=>{bg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),bg--}},[])}function iA(){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 UC(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 hU(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 of="right-scroll-bar-position",lf="width-before-scroll-bar",mU="with-scroll-bars-hidden",pU="--removed-body-scroll-bar-size";function _g(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gU(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 yU=typeof window<"u"?E.useLayoutEffect:E.useEffect,aA=new WeakMap;function vU(e,t){var n=gU(null,function(r){return e.forEach(function(a){return _g(a,r)})});return yU(function(){var r=aA.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(u){o.has(u)||_g(u,null)}),o.forEach(function(u){a.has(u)||_g(u,l)})}aA.set(n,e)},[e]),n}function bU(e){return e}function _U(e,t){t===void 0&&(t=bU);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 xU(e){e===void 0&&(e={});var t=_U(null);return t.options=Vr({async:!0,ssr:!1},e),t}var HC=function(e){var t=e.sideCar,n=UC(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))};HC.isSideCarExport=!0;function EU(e,t){return e.useMedium(t),HC}var FC=xU(),xg=function(){},vh=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:xg,onWheelCapture:xg,onTouchMoveCapture:xg}),a=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,y=e.shards,g=e.sideCar,v=e.noRelative,x=e.noIsolation,S=e.inert,A=e.allowPinchZoom,w=e.as,T=w===void 0?"div":w,R=e.gapMode,O=UC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,M=vU([n,t]),D=Vr(Vr({},O),a);return E.createElement(E.Fragment,null,m&&E.createElement(N,{sideCar:FC,removeScrollBar:f,shards:y,noRelative:v,noIsolation:x,inert:S,setCallbacks:o,allowPinchZoom:!!A,lockRef:n,gapMode:R}),l?E.cloneElement(E.Children.only(u),Vr(Vr({},D),{ref:M})):E.createElement(T,Vr({},D,{className:d,ref:M}),u))});vh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vh.classNames={fullWidth:lf,zeroRight:of};var SU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=SU();return t&&e.setAttribute("nonce",t),e}function wU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function TU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var CU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=AU())&&(wU(t,n),TU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},RU=function(){var e=CU();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},GC=function(){var e=RU(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},NU={left:0,top:0,right:0,gap:0},Eg=function(e){return parseInt(e||"",10)||0},kU=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[Eg(n),Eg(r),Eg(a)]},OU=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NU;var t=kU(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])}},DU=GC(),Eo="data-scroll-locked",IU=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
210
|
-
.`.concat(mU,` {
|
|
211
|
-
overflow: hidden `).concat(r,`;
|
|
212
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
213
|
-
}
|
|
214
|
-
body[`).concat(Eo,`] {
|
|
215
|
-
overflow: hidden `).concat(r,`;
|
|
216
|
-
overscroll-behavior: contain;
|
|
217
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
218
|
-
padding-left: `.concat(a,`px;
|
|
219
|
-
padding-top: `).concat(o,`px;
|
|
220
|
-
padding-right: `).concat(l,`px;
|
|
221
|
-
margin-left:0;
|
|
222
|
-
margin-top:0;
|
|
223
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
224
|
-
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.`).concat(of,` {
|
|
228
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.`).concat(lf,` {
|
|
232
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.`).concat(of," .").concat(of,` {
|
|
236
|
-
right: 0 `).concat(r,`;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.`).concat(lf," .").concat(lf,` {
|
|
240
|
-
margin-right: 0 `).concat(r,`;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
body[`).concat(Eo,`] {
|
|
244
|
-
`).concat(pU,": ").concat(u,`px;
|
|
245
|
-
}
|
|
246
|
-
`)},sA=function(){var e=parseInt(document.body.getAttribute(Eo)||"0",10);return isFinite(e)?e:0},LU=function(){E.useEffect(function(){return document.body.setAttribute(Eo,(sA()+1).toString()),function(){var e=sA()-1;e<=0?document.body.removeAttribute(Eo):document.body.setAttribute(Eo,e.toString())}},[])},MU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;LU();var o=E.useMemo(function(){return OU(a)},[a]);return E.createElement(DU,{styles:IU(o,!t,a,n?"":"!important")})},vy=!1;if(typeof window<"u")try{var jd=Object.defineProperty({},"passive",{get:function(){return vy=!0,!0}});window.addEventListener("test",jd,jd),window.removeEventListener("test",jd,jd)}catch{vy=!1}var so=vy?{passive:!1}:!1,jU=function(e){return e.tagName==="TEXTAREA"},$C=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jU(e)&&n[t]==="visible")},PU=function(e){return $C(e,"overflowY")},VU=function(e){return $C(e,"overflowX")},oA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=qC(e,r);if(a){var o=KC(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},BU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qC=function(e,t){return e==="v"?PU(t):VU(t)},KC=function(e,t){return e==="v"?BU(t):zU(t)},UU=function(e,t){return e==="h"&&t==="rtl"?-1:1},HU=function(e,t,n,r,a){var o=UU(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,m=l>0,y=0,g=0;do{var v=KC(e,u),x=v[0],S=v[1],A=v[2],w=S-A-o*x;(x||w)&&qC(e,u)&&(y+=w,g+=x),u=u.parentNode.host||u.parentNode}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(y)<1||!m&&Math.abs(g)<1)&&(f=!0),f},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lA=function(e){return[e.deltaX,e.deltaY]},cA=function(e){return e&&"current"in e?e.current:e},FU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GU=function(e){return`
|
|
247
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
248
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
249
|
-
`)},$U=0,oo=[];function qU(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),a=E.useState($U++)[0],o=E.useState(GC)[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=hU([e.lockRef.current],(e.shards||[]).map(cA),!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=Pd(S),T=n.current,R="deltaX"in S?S.deltaX:T[0]-w[0],O="deltaY"in S?S.deltaY:T[1]-w[1],N,M=S.target,D=Math.abs(R)>Math.abs(O)?"h":"v";if("touches"in S&&D==="h"&&M.type==="range")return!1;var L=oA(D,M);if(!L)return!0;if(L?N=D:(N=D==="v"?"h":"v",L=oA(D,M)),!L)return!1;if(!r.current&&"changedTouches"in S&&(R||O)&&(r.current=N),!N)return!0;var V=r.current||N;return HU(V,A,S,V==="h"?R:O)},[]),d=E.useCallback(function(S){var A=S;if(!(!oo.length||oo[oo.length-1]!==o)){var w="deltaY"in A?lA(A):Pd(A),T=t.current.filter(function(N){return N.name===A.type&&(N.target===A.target||A.target===N.shadowParent)&&FU(N.delta,w)})[0];if(T&&T.should){A.cancelable&&A.preventDefault();return}if(!T){var R=(l.current.shards||[]).map(cA).filter(Boolean).filter(function(N){return N.contains(A.target)}),O=R.length>0?u(A,R[0]):!l.current.noIsolation;O&&A.cancelable&&A.preventDefault()}}},[]),f=E.useCallback(function(S,A,w,T){var R={name:S,delta:A,target:w,should:T,shadowParent:KU(w)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(O){return O!==R})},1)},[]),m=E.useCallback(function(S){n.current=Pd(S),r.current=void 0},[]),y=E.useCallback(function(S){f(S.type,lA(S),S.target,u(S,e.lockRef.current))},[]),g=E.useCallback(function(S){f(S.type,Pd(S),S.target,u(S,e.lockRef.current))},[]);E.useEffect(function(){return oo.push(o),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:g}),document.addEventListener("wheel",d,so),document.addEventListener("touchmove",d,so),document.addEventListener("touchstart",m,so),function(){oo=oo.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,so),document.removeEventListener("touchmove",d,so),document.removeEventListener("touchstart",m,so)}},[]);var v=e.removeScrollBar,x=e.inert;return E.createElement(E.Fragment,null,x?E.createElement(o,{styles:GU(a)}):null,v?E.createElement(MU,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function KU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const WU=EU(FC,qU);var Qv=E.forwardRef(function(e,t){return E.createElement(vh,Vr({},e,{ref:t,sideCar:WU}))});Qv.classNames=vh.classNames;var YU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},lo=new WeakMap,Vd=new WeakMap,Bd={},Sg=0,WC=function(e){return e&&(e.host||WC(e.parentNode))},ZU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=WC(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})},XU=function(e,t,n,r){var a=ZU(t,Array.isArray(e)?e:[e]);Bd[n]||(Bd[n]=new WeakMap);var o=Bd[n],l=[],u=new Set,d=new Set(a),f=function(y){!y||u.has(y)||(u.add(y),f(y.parentNode))};a.forEach(f);var m=function(y){!y||d.has(y)||Array.prototype.forEach.call(y.children,function(g){if(u.has(g))m(g);else try{var v=g.getAttribute(r),x=v!==null&&v!=="false",S=(lo.get(g)||0)+1,A=(o.get(g)||0)+1;lo.set(g,S),o.set(g,A),l.push(g),S===1&&x&&Vd.set(g,!0),A===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return m(t),u.clear(),Sg++,function(){l.forEach(function(y){var g=lo.get(y)-1,v=o.get(y)-1;lo.set(y,g),o.set(y,v),g||(Vd.has(y)||y.removeAttribute(r),Vd.delete(y)),v||y.removeAttribute(n)}),Sg--,Sg||(lo=new WeakMap,lo=new WeakMap,Vd=new WeakMap,Bd={})}},YC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=YU(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),XU(r,a,n,"aria-hidden")):function(){return null}},bh="Dialog",[ZC,aQ]=nu(bh),[QU,Nr]=ZC(bh),XC=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,m]=Ef({prop:r,defaultProp:a??!1,onChange:o,caller:bh});return b.jsx(QU,{scope:t,triggerRef:u,contentRef:d,contentId:ur(),titleId:ur(),descriptionId:ur(),open:f,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(y=>!y),[m]),modal:l,children:n})};XC.displayName=bh;var QC="DialogTrigger",JU=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Nr(QC,n),o=Nt(t,a.triggerRef);return b.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":tb(a.open),...r,ref:o,onClick:st(e.onClick,a.onOpenToggle)})});JU.displayName=QC;var Jv="DialogPortal",[eH,JC]=ZC(Jv,{forceMount:void 0}),eR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Nr(Jv,t);return b.jsx(eH,{scope:t,forceMount:n,children:E.Children.map(r,l=>b.jsx(ru,{present:n||o.open,children:b.jsx(mh,{asChild:!0,container:a,children:l})}))})};eR.displayName=Jv;var Cf="DialogOverlay",tR=E.forwardRef((e,t)=>{const n=JC(Cf,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Nr(Cf,e.__scopeDialog);return o.modal?b.jsx(ru,{present:r||o.open,children:b.jsx(nH,{...a,ref:t})}):null});tR.displayName=Cf;var tH=Ro("DialogOverlay.RemoveScroll"),nH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Nr(Cf,n);return b.jsx(Qv,{as:tH,allowPinchZoom:!0,shards:[a.contentRef],children:b.jsx(Qe.div,{"data-state":tb(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fs="DialogContent",nR=E.forwardRef((e,t)=>{const n=JC(fs,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Nr(fs,e.__scopeDialog);return b.jsx(ru,{present:r||o.open,children:o.modal?b.jsx(rH,{...a,ref:t}):b.jsx(iH,{...a,ref:t})})});nR.displayName=fs;var rH=E.forwardRef((e,t)=>{const n=Nr(fs,e.__scopeDialog),r=E.useRef(null),a=Nt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return YC(o)},[]),b.jsx(rR,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:st(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:st(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:st(e.onFocusOutside,o=>o.preventDefault())})}),iH=E.forwardRef((e,t)=>{const n=Nr(fs,e.__scopeDialog),r=E.useRef(!1),a=E.useRef(!1);return b.jsx(rR,{...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()}})}),rR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,u=Nr(fs,n),d=E.useRef(null),f=Nt(t,d);return zC(),b.jsxs(b.Fragment,{children:[b.jsx(Xv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:b.jsx(hh,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":tb(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(lH,{titleId:u.titleId}),b.jsx(uH,{contentRef:d,descriptionId:u.descriptionId})]})]})}),eb="DialogTitle",aH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Nr(eb,n);return b.jsx(Qe.h2,{id:a.titleId,...r,ref:t})});aH.displayName=eb;var iR="DialogDescription",sH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Nr(iR,n);return b.jsx(Qe.p,{id:a.descriptionId,...r,ref:t})});sH.displayName=iR;var aR="DialogClose",oH=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Nr(aR,n);return b.jsx(Qe.button,{type:"button",...r,ref:t,onClick:st(e.onClick,()=>a.onOpenChange(!1))})});oH.displayName=aR;function tb(e){return e?"open":"closed"}var sR="DialogTitleWarning",[sQ,oR]=nz(sR,{contentName:fs,titleName:eb,docsSlug:"dialog"}),lH=({titleId:e})=>{const t=oR(sR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
250
|
-
|
|
251
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
252
|
-
|
|
253
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},cH="DialogDescriptionWarning",uH=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oR(cH).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},dH=XC,fH=eR,hH=tR,mH=nR,uA=1,pH=.9,gH=.8,yH=.17,Ag=.1,wg=.999,vH=.9999,bH=.99,_H=/[\\\/_+.#"@\[\(\{&]/,xH=/[\\\/_+.#"@\[\(\{&]/g,EH=/[\s-]/,lR=/[\s-]/g;function by(e,t,n,r,a,o,l){if(o===t.length)return a===e.length?uA:bH;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,y,g,v,x;f>=0;)y=by(e,t,n,r,f+1,o+1,l),y>m&&(f===a?y*=uA:_H.test(e.charAt(f-1))?(y*=gH,v=e.slice(a,f-1).match(xH),v&&a>0&&(y*=Math.pow(wg,v.length))):EH.test(e.charAt(f-1))?(y*=pH,x=e.slice(a,f-1).match(lR),x&&a>0&&(y*=Math.pow(wg,x.length))):(y*=yH,a>0&&(y*=Math.pow(wg,f-a))),e.charAt(f)!==t.charAt(o)&&(y*=vH)),(y<Ag&&n.charAt(f-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(f-1)!==r.charAt(o))&&(g=by(e,t,n,r,f+1,o+2,l),g*Ag>y&&(y=g*Ag)),y>m&&(m=y),f=n.indexOf(d,f+1);return l[u]=m,m}function dA(e){return e.toLowerCase().replace(lR," ")}function SH(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,by(e,t,dA(e),dA(t),0,0,{})}var ic='[cmdk-group=""]',Tg='[cmdk-group-items=""]',AH='[cmdk-group-heading=""]',cR='[cmdk-item=""]',fA=`${cR}:not([aria-disabled="true"])`,_y="cmdk-item-select",uo="data-value",wH=(e,t,n)=>SH(e,t,n),uR=E.createContext(void 0),su=()=>E.useContext(uR),dR=E.createContext(void 0),nb=()=>E.useContext(dR),fR=E.createContext(void 0),hR=E.forwardRef((e,t)=>{let n=fo(()=>{var F,te;return{search:"",value:(te=(F=e.value)!=null?F:e.defaultValue)!=null?te:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=fo(()=>new Set),a=fo(()=>new Map),o=fo(()=>new Map),l=fo(()=>new Set),u=mR(e),{label:d,children:f,value:m,onValueChange:y,filter:g,shouldFilter:v,loop:x,disablePointerSelection:S=!1,vimBindings:A=!0,...w}=e,T=ur(),R=ur(),O=ur(),N=E.useRef(null),M=jH();hs(()=>{if(m!==void 0){let F=m.trim();n.current.value=F,D.emit()}},[m]),hs(()=>{M(6,de)},[]);let D=E.useMemo(()=>({subscribe:F=>(l.current.add(F),()=>l.current.delete(F)),snapshot:()=>n.current,setState:(F,te,re)=>{var fe,ge,he,Ee;if(!Object.is(n.current[F],te)){if(n.current[F]=te,F==="search")ie(),U(),M(1,ce);else if(F==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Oe=document.getElementById(O);Oe?Oe.focus():(fe=document.getElementById(T))==null||fe.focus()}if(M(7,()=>{var Oe;n.current.selectedItemId=(Oe=X())==null?void 0:Oe.id,D.emit()}),re||M(5,de),((ge=u.current)==null?void 0:ge.value)!==void 0){let Oe=te??"";(Ee=(he=u.current).onValueChange)==null||Ee.call(he,Oe);return}}D.emit()}},emit:()=>{l.current.forEach(F=>F())}}),[]),L=E.useMemo(()=>({value:(F,te,re)=>{var fe;te!==((fe=o.current.get(F))==null?void 0:fe.value)&&(o.current.set(F,{value:te,keywords:re}),n.current.filtered.items.set(F,V(te,re)),M(2,()=>{U(),D.emit()}))},item:(F,te)=>(r.current.add(F),te&&(a.current.has(te)?a.current.get(te).add(F):a.current.set(te,new Set([F]))),M(3,()=>{ie(),U(),n.current.value||ce(),D.emit()}),()=>{o.current.delete(F),r.current.delete(F),n.current.filtered.items.delete(F);let re=X();M(4,()=>{ie(),(re==null?void 0:re.getAttribute("id"))===F&&ce(),D.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:O,labelId:R,listInnerRef:N}),[]);function V(F,te){var re,fe;let ge=(fe=(re=u.current)==null?void 0:re.filter)!=null?fe:wH;return F?ge(F,n.current.search,te):0}function U(){if(!n.current.search||u.current.shouldFilter===!1)return;let F=n.current.filtered.items,te=[];n.current.filtered.groups.forEach(fe=>{let ge=a.current.get(fe),he=0;ge.forEach(Ee=>{let Oe=F.get(Ee);he=Math.max(Oe,he)}),te.push([fe,he])});let re=N.current;J().sort((fe,ge)=>{var he,Ee;let Oe=fe.getAttribute("id"),Ce=ge.getAttribute("id");return((he=F.get(Ce))!=null?he:0)-((Ee=F.get(Oe))!=null?Ee:0)}).forEach(fe=>{let ge=fe.closest(Tg);ge?ge.appendChild(fe.parentElement===ge?fe:fe.closest(`${Tg} > *`)):re.appendChild(fe.parentElement===re?fe:fe.closest(`${Tg} > *`))}),te.sort((fe,ge)=>ge[1]-fe[1]).forEach(fe=>{var ge;let he=(ge=N.current)==null?void 0:ge.querySelector(`${ic}[${uo}="${encodeURIComponent(fe[0])}"]`);he==null||he.parentElement.appendChild(he)})}function ce(){let F=J().find(re=>re.getAttribute("aria-disabled")!=="true"),te=F==null?void 0:F.getAttribute(uo);D.setState("value",te||void 0)}function ie(){var F,te,re,fe;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ge=0;for(let he of r.current){let Ee=(te=(F=o.current.get(he))==null?void 0:F.value)!=null?te:"",Oe=(fe=(re=o.current.get(he))==null?void 0:re.keywords)!=null?fe:[],Ce=V(Ee,Oe);n.current.filtered.items.set(he,Ce),Ce>0&&ge++}for(let[he,Ee]of a.current)for(let Oe of Ee)if(n.current.filtered.items.get(Oe)>0){n.current.filtered.groups.add(he);break}n.current.filtered.count=ge}function de(){var F,te,re;let fe=X();fe&&(((F=fe.parentElement)==null?void 0:F.firstChild)===fe&&((re=(te=fe.closest(ic))==null?void 0:te.querySelector(AH))==null||re.scrollIntoView({block:"nearest"})),fe.scrollIntoView({block:"nearest"}))}function X(){var F;return(F=N.current)==null?void 0:F.querySelector(`${cR}[aria-selected="true"]`)}function J(){var F;return Array.from(((F=N.current)==null?void 0:F.querySelectorAll(fA))||[])}function H(F){let te=J()[F];te&&D.setState("value",te.getAttribute(uo))}function ne(F){var te;let re=X(),fe=J(),ge=fe.findIndex(Ee=>Ee===re),he=fe[ge+F];(te=u.current)!=null&&te.loop&&(he=ge+F<0?fe[fe.length-1]:ge+F===fe.length?fe[0]:fe[ge+F]),he&&D.setState("value",he.getAttribute(uo))}function q(F){let te=X(),re=te==null?void 0:te.closest(ic),fe;for(;re&&!fe;)re=F>0?LH(re,ic):MH(re,ic),fe=re==null?void 0:re.querySelector(fA);fe?D.setState("value",fe.getAttribute(uo)):ne(F)}let ye=()=>H(J().length-1),P=F=>{F.preventDefault(),F.metaKey?ye():F.altKey?q(1):ne(1)},Y=F=>{F.preventDefault(),F.metaKey?H(0):F.altKey?q(-1):ne(-1)};return E.createElement(Qe.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:F=>{var te;(te=w.onKeyDown)==null||te.call(w,F);let re=F.nativeEvent.isComposing||F.keyCode===229;if(!(F.defaultPrevented||re))switch(F.key){case"n":case"j":{A&&F.ctrlKey&&P(F);break}case"ArrowDown":{P(F);break}case"p":case"k":{A&&F.ctrlKey&&Y(F);break}case"ArrowUp":{Y(F);break}case"Home":{F.preventDefault(),H(0);break}case"End":{F.preventDefault(),ye();break}case"Enter":{F.preventDefault();let fe=X();if(fe){let ge=new Event(_y);fe.dispatchEvent(ge)}}}}},E.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:VH},d),_h(e,F=>E.createElement(dR.Provider,{value:D},E.createElement(uR.Provider,{value:L},F))))}),TH=E.forwardRef((e,t)=>{var n,r;let a=ur(),o=E.useRef(null),l=E.useContext(fR),u=su(),d=mR(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;hs(()=>{if(!f)return u.item(a,l==null?void 0:l.id)},[f]);let m=pR(a,o,[e.value,e.children,o],e.keywords),y=nb(),g=fa(M=>M.value&&M.value===m.current),v=fa(M=>f||u.filter()===!1?!0:M.search?M.filtered.items.get(a)>0:!0);E.useEffect(()=>{let M=o.current;if(!(!M||e.disabled))return M.addEventListener(_y,x),()=>M.removeEventListener(_y,x)},[v,e.onSelect,e.disabled]);function x(){var M,D;S(),(D=(M=d.current).onSelect)==null||D.call(M,m.current)}function S(){y.setState("value",m.current,!0)}if(!v)return null;let{disabled:A,value:w,onSelect:T,forceMount:R,keywords:O,...N}=e;return E.createElement(Qe.div,{ref:ds(o,t),...N,id:a,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!g,"data-disabled":!!A,"data-selected":!!g,onPointerMove:A||u.getDisablePointerSelection()?void 0:S,onClick:A?void 0:x},e.children)}),CH=E.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,l=ur(),u=E.useRef(null),d=E.useRef(null),f=ur(),m=su(),y=fa(v=>a||m.filter()===!1?!0:v.search?v.filtered.groups.has(l):!0);hs(()=>m.group(l),[]),pR(l,u,[e.value,e.heading,d]);let g=E.useMemo(()=>({id:l,forceMount:a}),[a]);return E.createElement(Qe.div,{ref:ds(u,t),...o,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&E.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),_h(e,v=>E.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},E.createElement(fR.Provider,{value:g},v))))}),RH=E.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=E.useRef(null),o=fa(l=>!l.search);return!n&&!o?null:E.createElement(Qe.div,{ref:ds(a,t),...r,"cmdk-separator":"",role:"separator"})}),NH=E.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=nb(),l=fa(f=>f.search),u=fa(f=>f.selectedItemId),d=su();return E.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),E.createElement(Qe.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:a?e.value:l,onChange:f=>{a||o.setState("search",f.target.value),n==null||n(f.target.value)}})}),kH=E.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=E.useRef(null),l=E.useRef(null),u=fa(f=>f.selectedItemId),d=su();return E.useEffect(()=>{if(l.current&&o.current){let f=l.current,m=o.current,y,g=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let v=f.offsetHeight;m.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return g.observe(f),()=>{cancelAnimationFrame(y),g.unobserve(f)}}},[]),E.createElement(Qe.div,{ref:ds(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},_h(e,f=>E.createElement("div",{ref:ds(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),OH=E.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:l,...u}=e;return E.createElement(dH,{open:n,onOpenChange:r},E.createElement(fH,{container:l},E.createElement(hH,{"cmdk-overlay":"",className:a}),E.createElement(mH,{"aria-label":e.label,"cmdk-dialog":"",className:o},E.createElement(hR,{ref:t,...u}))))}),DH=E.forwardRef((e,t)=>fa(n=>n.filtered.count===0)?E.createElement(Qe.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),IH=E.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return E.createElement(Qe.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},_h(e,l=>E.createElement("div",{"aria-hidden":!0},l)))}),ou=Object.assign(hR,{List:kH,Item:TH,Input:NH,Group:CH,Separator:RH,Dialog:OH,Empty:DH,Loading:IH});function LH(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function MH(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function mR(e){let t=E.useRef(e);return hs(()=>{t.current=e}),t}var hs=typeof window>"u"?E.useEffect:E.useLayoutEffect;function fo(e){let t=E.useRef();return t.current===void 0&&(t.current=e()),t}function fa(e){let t=nb(),n=()=>e(t.snapshot());return E.useSyncExternalStore(t.subscribe,n,n)}function pR(e,t,n,r=[]){let a=E.useRef(),o=su();return hs(()=>{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(uo,u),a.current=u}),a}var jH=()=>{let[e,t]=E.useState(),n=fo(()=>new Map);return hs(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function PH(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function _h({asChild:e,children:t},n){return e&&E.isValidElement(t)?E.cloneElement(PH(t),{ref:t.ref},n(t.props.children)):n(t)}var VH={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const gR=({className:e,...t})=>b.jsx(ou,{className:Ae("flex size-full flex-col overflow-hidden rounded-md",e),...t}),BH=({className:e,...t})=>b.jsxs("div",{className:"flex w-full items-center","cmdk-input-wrapper":"",children:[b.jsx(GV,{className:"mr-2 size-4 shrink-0 opacity-50"}),b.jsx(ou.Input,{className:Ae("placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}),zH=({className:e,...t})=>b.jsx(ou.List,{className:Ae("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}),UH=e=>b.jsx(ou.Empty,{className:"py-6 text-center text-sm",...e}),HH=({className:e,...t})=>b.jsx(ou.Item,{className:Ae("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}),Rf={...gR,Input:BH,List:zH,Empty:UH,Item:HH},yR=E.createContext(null),xh=()=>{const e=E.useContext(yR);if(!e)throw new Error("useMultiSelect must be used within MultiSelectProvider");return e},FH=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:a,children:o,dir:l,...u})=>{const[d,f]=E.useState(t??[]),[m,y]=E.useState(""),[g,v]=E.useState(!1),[x,S]=E.useState(-1),A=E.useRef(null),[w,T]=E.useState(!1),[R,O]=E.useState("");E.useEffect(()=>{e&&f(e)},[e]);const N=E.useCallback(V=>{if(d.includes(V)){const U=d.filter(ce=>ce!==V);f(U),n==null||n(U)}else{const U=[...d,V];f(U),n==null||n(U)}},[d]),M=E.useCallback(V=>{V.preventDefault();const U=V.currentTarget,ce=U.value.substring(U.selectionStart??0,U.selectionEnd??0);O(ce),T(ce===m)},[m]),D=E.useCallback(V=>{V.stopPropagation();const U=A.current;if(!U)return;const ce=()=>{const X=x+1;S(X>d.length-1?r?0:-1:X)},ie=()=>{const X=x-1;S(X<0?d.length-1:X)},de=()=>{const X=x-1<=0?d.length-1===0?-1:0:x-1;S(X)};switch(V.key){case"ArrowLeft":l==="rtl"?d.length>0&&(x!==-1||r)&&ce():d.length>0&&U.selectionStart===0&&ie();break;case"ArrowRight":l==="rtl"?d.length>0&&U.selectionStart===0&&ie():d.length>0&&(x!==-1||r)&&ce();break;case"Backspace":case"Delete":d.length>0&&(x!==-1&&x<d.length?(N(d[x]),de()):(U.selectionStart===0&&R===m||w)&&N(d[d.length-1]));break;case"Enter":v(!0);break;case"Escape":x!==-1?S(-1):g&&v(!1);break}},[d,m,x,r]),L=E.useMemo(()=>({value:d,onValueChange:N,open:g,setOpen:v,inputValue:m,setInputValue:y,activeIndex:x,setActiveIndex:S,ref:A,handleSelect:M}),[d,N,g,v,m,y,x,S,A,M]);return b.jsx(yR,{value:L,children:b.jsx(gR,{onKeyDown:D,className:Ae("flex w-full flex-col gap-2 overflow-visible bg-transparent",a),dir:l,...u,children:o})})},GH=({className:e,getBadgeValue:t=o=>o,validationStyleEnabled:n=!1,children:r,...a})=>{const{value:o,onValueChange:l,activeIndex:u}=xh(),d=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]);return b.jsxs("div",{className:Ae("flex w-full flex-col gap-3 rounded-lg p-1 py-2","border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",n&&"valid:border-success invalid:border-error",e),...a,children:[o.length>0&&b.jsx("div",{className:"flex w-full flex-wrap gap-1",children:o.map((f,m)=>b.jsxs(rU,{className:Ae("flex items-center gap-1 rounded-xl px-1",u===m&&"ring-muted-foreground ring-2"),color:"text",children:[b.jsx("span",{className:"text-xs",children:t(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(_s,{className:"size-4 cursor-pointer"})]})]},f))}),r]})},$H=({className:e,...t})=>{const{setOpen:n,inputValue:r,setInputValue:a,activeIndex:o,setActiveIndex:l,handleSelect:u,ref:d}=xh();return b.jsx(Rf.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:Ae("outline-hidden ml-2 flex-1 cursor-pointer",e,o!==-1&&"caret-transparent")})},qH=({children:e})=>{const{open:t}=xh();return b.jsx("div",{className:"relative",children:t&&e})},KH=({className:e,children:t})=>b.jsxs(Rf.List,{className:Ae("border-muted bg-input-background absolute top-0 z-10 flex w-full flex-col gap-2 rounded-lg border p-2 shadow-md transition-colors",e),children:[t,b.jsx(Rf.Empty,{children:b.jsx("span",{className:"text-muted-foreground",children:"No results found"})})]}),WH=({className:e,value:t,children:n,...r})=>{const{value:a,onValueChange:o,setInputValue:l}=xh(),u=E.useCallback(f=>{f.preventDefault(),f.stopPropagation()},[]),d=a.includes(t);return b.jsxs(Rf.Item,{...r,onSelect:()=>{o(t),l("")},className:Ae("flex cursor-pointer justify-between rounded-lg px-2 py-1 transition-colors","hover:bg-neutral/10",e,d&&"opacity-50",r.disabled&&"cursor-not-allowed opacity-50"),onMouseDown:u,children:[n,d&&b.jsx(Ho,{className:"size-4"})]})},gn=FH;gn.Trigger=GH;gn.Input=$H;gn.Content=qH;gn.List=KH;gn.Item=WH;const YH=({className:e,children:t,...n})=>b.jsxs("i",{className:Ae("text-xs text-neutral-400",e),...n,children:["ⓘ ",t]}),xy=({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}),ZH=({className:e,...t})=>{const{error:n,formItemId:r}=Ea();return b.jsx(xy,{className:Ae("mb-2",n&&"text-error",e),htmlFor:r,...t})},XH=({isRequired:e})=>e?b.jsx("span",{"aria-label":"Asterisk meaning the field is required",children:"*"}):b.jsx(b.Fragment,{}),vR=({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(ZH,{htmlFor:r,id:`${r}-label`,className:fh("font-bold",a),children:[e,b.jsx(XH,{isRequired:t})]}),n&&b.jsx(YH,{content:n})]});function hA(e,[t,n]){return Math.min(n,Math.max(t,e))}var QH=E.createContext(void 0);function JH(e){const t=E.useContext(QH);return e||t||"ltr"}const eF=["top","right","bottom","left"],ha=Math.min,Fn=Math.max,Nf=Math.round,zd=Math.floor,Hr=e=>({x:e,y:e}),tF={left:"right",right:"left",bottom:"top",top:"bottom"},nF={start:"end",end:"start"};function Ey(e,t,n){return Fn(e,ha(t,n))}function Ti(e,t){return typeof e=="function"?e(t):e}function Ci(e){return e.split("-")[0]}function qo(e){return e.split("-")[1]}function rb(e){return e==="x"?"y":"x"}function ib(e){return e==="y"?"height":"width"}function Ai(e){return["top","bottom"].includes(Ci(e))?"y":"x"}function ab(e){return rb(Ai(e))}function rF(e,t,n){n===void 0&&(n=!1);const r=qo(e),a=ab(e),o=ib(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=kf(l)),[l,kf(l)]}function iF(e){const t=kf(e);return[Sy(e),t,Sy(t)]}function Sy(e){return e.replace(/start|end/g,t=>nF[t])}function aF(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 sF(e,t,n,r){const a=qo(e);let o=aF(Ci(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(Sy)))),o}function kf(e){return e.replace(/left|right|bottom|top/g,t=>tF[t])}function oF(e){return{top:0,right:0,bottom:0,left:0,...e}}function bR(e){return typeof e!="number"?oF(e):{top:e,right:e,bottom:e,left:e}}function Of(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 mA(e,t,n){let{reference:r,floating:a}=e;const o=Ai(t),l=ab(t),u=ib(l),d=Ci(t),f=o==="y",m=r.x+r.width/2-a.width/2,y=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let v;switch(d){case"top":v={x:m,y:r.y-a.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y};break;case"left":v={x:r.x-a.width,y};break;default:v={x:r.x,y:r.y}}switch(qo(t)){case"start":v[l]-=g*(n&&f?-1:1);break;case"end":v[l]+=g*(n&&f?-1:1);break}return v}const lF=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}=mA(f,r,d),g=r,v={},x=0;for(let S=0;S<u.length;S++){const{name:A,fn:w}=u[S],{x:T,y:R,data:O,reset:N}=await w({x:m,y,initialPlacement:r,placement:g,strategy:a,middlewareData:v,rects:f,platform:l,elements:{reference:e,floating:t}});m=T??m,y=R??y,v={...v,[A]:{...v[A],...O}},N&&x<=50&&(x++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y}=mA(f,g,d)),S=-1)}return{x:m,y,placement:g,strategy:a,middlewareData:v}};async function kc(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:y="floating",altBoundary:g=!1,padding:v=0}=Ti(t,e),x=bR(v),A=u[g?y==="floating"?"reference":"floating":y],w=Of(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=y==="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)),O=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=Of(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:T,offsetParent:R,strategy:d}):T);return{top:(w.top-N.top+x.top)/O.y,bottom:(N.bottom-w.bottom+x.bottom)/O.y,left:(w.left-N.left+x.left)/O.x,right:(N.right-w.right+x.right)/O.x}}const cF=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}=Ti(e,t)||{};if(f==null)return{};const y=bR(m),g={x:n,y:r},v=ab(a),x=ib(v),S=await l.getDimensions(f),A=v==="y",w=A?"top":"left",T=A?"bottom":"right",R=A?"clientHeight":"clientWidth",O=o.reference[x]+o.reference[v]-g[v]-o.floating[x],N=g[v]-o.reference[v],M=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let D=M?M[R]:0;(!D||!await(l.isElement==null?void 0:l.isElement(M)))&&(D=u.floating[R]||o.floating[x]);const L=O/2-N/2,V=D/2-S[x]/2-1,U=ha(y[w],V),ce=ha(y[T],V),ie=U,de=D-S[x]-ce,X=D/2-S[x]/2+L,J=Ey(ie,X,de),H=!d.arrow&&qo(a)!=null&&X!==J&&o.reference[x]/2-(X<ie?U:ce)-S[x]/2<0,ne=H?X<ie?X-ie:X-de:0;return{[v]:g[v]+ne,data:{[v]:J,centerOffset:X-J-ne,...H&&{alignmentOffset:ne}},reset:H}}}),uF=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:y=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...A}=Ti(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ci(a),T=Ai(u),R=Ci(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=g||(R||!S?[kf(u)]:iF(u)),M=x!=="none";!g&&M&&N.push(...sF(u,S,x,O));const D=[u,...N],L=await kc(t,A),V=[];let U=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&V.push(L[w]),y){const J=rF(a,l,O);V.push(L[J[0]],L[J[1]])}if(U=[...U,{placement:a,overflows:V}],!V.every(J=>J<=0)){var ce,ie;const J=(((ce=o.flip)==null?void 0:ce.index)||0)+1,H=D[J];if(H){var de;const q=y==="alignment"?T!==Ai(H):!1,ye=((de=U[0])==null?void 0:de.overflows[0])>0;if(!q||ye)return{data:{index:J,overflows:U},reset:{placement:H}}}let ne=(ie=U.filter(q=>q.overflows[0]<=0).sort((q,ye)=>q.overflows[1]-ye.overflows[1])[0])==null?void 0:ie.placement;if(!ne)switch(v){case"bestFit":{var X;const q=(X=U.filter(ye=>{if(M){const P=Ai(ye.placement);return P===T||P==="y"}return!0}).map(ye=>[ye.placement,ye.overflows.filter(P=>P>0).reduce((P,Y)=>P+Y,0)]).sort((ye,P)=>ye[1]-P[1])[0])==null?void 0:X[0];q&&(ne=q);break}case"initialPlacement":ne=u;break}if(a!==ne)return{reset:{placement:ne}}}return{}}}};function pA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gA(e){return eF.some(t=>e[t]>=0)}const dF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Ti(e,t);switch(r){case"referenceHidden":{const o=await kc(t,{...a,elementContext:"reference"}),l=pA(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:gA(l)}}}case"escaped":{const o=await kc(t,{...a,altBoundary:!0}),l=pA(o,n.floating);return{data:{escapedOffsets:l,escaped:gA(l)}}}default:return{}}}}};async function fF(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ci(n),u=qo(n),d=Ai(n)==="y",f=["left","top"].includes(l)?-1:1,m=o&&d?-1:1,y=Ti(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return u&&typeof x=="number"&&(v=u==="end"?x*-1:x),d?{x:v*m,y:g*f}:{x:g*f,y:v*m}}const hF=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 fF(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}}}}},mF=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}=Ti(e,t),f={x:n,y:r},m=await kc(t,d),y=Ai(Ci(a)),g=rb(y);let v=f[g],x=f[y];if(o){const A=g==="y"?"top":"left",w=g==="y"?"bottom":"right",T=v+m[A],R=v-m[w];v=Ey(T,v,R)}if(l){const A=y==="y"?"top":"left",w=y==="y"?"bottom":"right",T=x+m[A],R=x-m[w];x=Ey(T,x,R)}const S=u.fn({...t,[g]:v,[y]:x});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:o,[y]:l}}}}}},pF=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}=Ti(e,t),m={x:n,y:r},y=Ai(a),g=rb(y);let v=m[g],x=m[y];const S=Ti(u,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=g==="y"?"height":"width",O=o.reference[g]-o.floating[R]+A.mainAxis,N=o.reference[g]+o.reference[R]-A.mainAxis;v<O?v=O:v>N&&(v=N)}if(f){var w,T;const R=g==="y"?"width":"height",O=["top","left"].includes(Ci(a)),N=o.reference[y]-o.floating[R]+(O&&((w=l.offset)==null?void 0:w[y])||0)+(O?0:A.crossAxis),M=o.reference[y]+o.reference[R]+(O?0:((T=l.offset)==null?void 0:T[y])||0)-(O?A.crossAxis:0);x<N?x=N:x>M&&(x=M)}return{[g]:v,[y]:x}}}},gF=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}=Ti(e,t),m=await kc(t,f),y=Ci(a),g=qo(a),v=Ai(a)==="y",{width:x,height:S}=o.floating;let A,w;y==="top"||y==="bottom"?(A=y,w=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(w=y,A=g==="end"?"top":"bottom");const T=S-m.top-m.bottom,R=x-m.left-m.right,O=ha(S-m[A],T),N=ha(x-m[w],R),M=!t.middlewareData.shift;let D=O,L=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=T),M&&!g){const U=Fn(m.left,0),ce=Fn(m.right,0),ie=Fn(m.top,0),de=Fn(m.bottom,0);v?L=x-2*(U!==0||ce!==0?U+ce:Fn(m.left,m.right)):D=S-2*(ie!==0||de!==0?ie+de:Fn(m.top,m.bottom))}await d({...t,availableWidth:L,availableHeight:D});const V=await l.getDimensions(u.floating);return x!==V.width||S!==V.height?{reset:{rects:!0}}:{}}}};function Eh(){return typeof window<"u"}function Ko(e){return _R(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(_R(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _R(e){return Eh()?e instanceof Node||e instanceof $n(e).Node:!1}function Cr(e){return Eh()?e instanceof Element||e instanceof $n(e).Element:!1}function Wr(e){return Eh()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function yA(e){return!Eh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function lu(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function yF(e){return["table","td","th"].includes(Ko(e))}function Sh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function sb(e){const t=ob(),n=Cr(e)?Rr(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 vF(e){let t=ma(e);for(;Wr(t)&&!No(t);){if(sb(t))return t;if(Sh(t))return null;t=ma(t)}return null}function ob(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function No(e){return["html","body","#document"].includes(Ko(e))}function Rr(e){return $n(e).getComputedStyle(e)}function Ah(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ma(e){if(Ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yA(e)&&e.host||Qr(e);return yA(t)?t.host:t}function xR(e){const t=ma(e);return No(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wr(t)&&lu(t)?t:xR(t)}function Oc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=xR(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=$n(a);if(o){const u=Ay(l);return t.concat(l,l.visualViewport||[],lu(a)?a:[],u&&n?Oc(u):[])}return t.concat(a,Oc(a,[],n))}function Ay(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ER(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Wr(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Nf(n)!==o||Nf(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function lb(e){return Cr(e)?e:e.contextElement}function So(e){const t=lb(e);if(!Wr(t))return Hr(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=ER(t);let l=(o?Nf(n.width):n.width)/r,u=(o?Nf(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const bF=Hr(0);function SR(e){const t=$n(e);return!ob()||!t.visualViewport?bF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _F(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function ms(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=lb(e);let l=Hr(1);t&&(r?Cr(r)&&(l=So(r)):l=So(e));const u=_F(o,n,r)?SR(o):Hr(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,y=a.height/l.y;if(o){const g=$n(o),v=r&&Cr(r)?$n(r):r;let x=g,S=Ay(x);for(;S&&r&&v!==x;){const A=So(S),w=S.getBoundingClientRect(),T=Rr(S),R=w.left+(S.clientLeft+parseFloat(T.paddingLeft))*A.x,O=w.top+(S.clientTop+parseFloat(T.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,y*=A.y,d+=R,f+=O,x=$n(S),S=Ay(x)}}return Of({width:m,height:y,x:d,y:f})}function cb(e,t){const n=Ah(e).scrollLeft;return t?t.left+n:ms(Qr(e)).left+n}function AR(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:cb(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function xF(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Qr(r),u=t?Sh(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=Hr(1);const m=Hr(0),y=Wr(r);if((y||!y&&!o)&&((Ko(r)!=="body"||lu(l))&&(d=Ah(r)),Wr(r))){const v=ms(r);f=So(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const g=l&&!y&&!o?AR(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+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function EF(e){return Array.from(e.getClientRects())}function SF(e){const t=Qr(e),n=Ah(e),r=e.ownerDocument.body,a=Fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+cb(e);const u=-n.scrollTop;return Rr(r).direction==="rtl"&&(l+=Fn(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:u}}function AF(e,t){const n=$n(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=ob();(!f||f&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}return{width:o,height:l,x:u,y:d}}function wF(e,t){const n=ms(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Wr(e)?So(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 vA(e,t,n){let r;if(t==="viewport")r=AF(e,n);else if(t==="document")r=SF(Qr(e));else if(Cr(t))r=wF(t,n);else{const a=SR(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Of(r)}function wR(e,t){const n=ma(e);return n===t||!Cr(n)||No(n)?!1:Rr(n).position==="fixed"||wR(n,t)}function TF(e,t){const n=t.get(e);if(n)return n;let r=Oc(e,[],!1).filter(u=>Cr(u)&&Ko(u)!=="body"),a=null;const o=Rr(e).position==="fixed";let l=o?ma(e):e;for(;Cr(l)&&!No(l);){const u=Rr(l),d=sb(l);!d&&u.position==="fixed"&&(a=null),(o?!d&&!a:!d&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||lu(l)&&!d&&wR(e,l))?r=r.filter(m=>m!==l):a=u,l=ma(l)}return t.set(e,r),r}function CF(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Sh(t)?[]:TF(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const y=vA(t,m,a);return f.top=Fn(y.top,f.top),f.right=ha(y.right,f.right),f.bottom=ha(y.bottom,f.bottom),f.left=Fn(y.left,f.left),f},vA(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function RF(e){const{width:t,height:n}=ER(e);return{width:t,height:n}}function NF(e,t,n){const r=Wr(t),a=Qr(t),o=n==="fixed",l=ms(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=Hr(0);function f(){d.x=cb(a)}if(r||!r&&!o)if((Ko(t)!=="body"||lu(a))&&(u=Ah(t)),r){const v=ms(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&f();o&&!r&&a&&f();const m=a&&!r&&!o?AR(a,u):Hr(0),y=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:y,y:g,width:l.width,height:l.height}}function Cg(e){return Rr(e).position==="static"}function bA(e,t){if(!Wr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function TR(e,t){const n=$n(e);if(Sh(e))return n;if(!Wr(e)){let a=ma(e);for(;a&&!No(a);){if(Cr(a)&&!Cg(a))return a;a=ma(a)}return n}let r=bA(e,t);for(;r&&yF(r)&&Cg(r);)r=bA(r,t);return r&&No(r)&&Cg(r)&&!sb(r)?n:r||vF(e)||n}const kF=async function(e){const t=this.getOffsetParent||TR,n=this.getDimensions,r=await n(e.floating);return{reference:NF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function OF(e){return Rr(e).direction==="rtl"}const DF={convertOffsetParentRelativeRectToViewportRelativeRect:xF,getDocumentElement:Qr,getClippingRect:CF,getOffsetParent:TR,getElementRects:kF,getClientRects:EF,getDimensions:RF,getScale:So,isElement:Cr,isRTL:OF};function CR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function IF(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:y,width:g,height:v}=f;if(u||t(),!g||!v)return;const x=zd(y),S=zd(a.clientWidth-(m+g)),A=zd(a.clientHeight-(y+v)),w=zd(m),R={rootMargin:-x+"px "+-S+"px "+-A+"px "+-w+"px",threshold:Fn(0,ha(1,d))||1};let O=!0;function N(M){const D=M[0].intersectionRatio;if(D!==d){if(!O)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!CR(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(N,{...R,root:a.ownerDocument})}catch{n=new IntersectionObserver(N,R)}n.observe(e)}return l(!0),o}function LF(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=lb(e),m=a||o?[...f?Oc(f):[],...Oc(t)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const y=f&&u?IF(f,n):null;let g=-1,v=null;l&&(v=new ResizeObserver(w=>{let[T]=w;T&&T.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(t)})),n()}),f&&!d&&v.observe(f),v.observe(t));let x,S=d?ms(e):null;d&&A();function A(){const w=ms(e);S&&!CR(S,w)&&n(),S=w,x=requestAnimationFrame(A)}return n(),()=>{var w;m.forEach(T=>{a&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),y==null||y(),(w=v)==null||w.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const MF=hF,jF=mF,PF=uF,VF=gF,BF=dF,_A=cF,zF=pF,UF=(e,t,n)=>{const r=new Map,a={platform:DF,...n},o={...a.platform,_c:r};return lF(e,t,{...a,platform:o})};var cf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Df(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(!Df(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)&&!Df(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function RR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xA(e,t){const n=RR(e);return Math.round(t*n)/n}function Rg(e){const t=E.useRef(e);return cf(()=>{t.current=e}),t}function HF(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,y]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=E.useState(r);Df(g,r)||v(r);const[x,S]=E.useState(null),[A,w]=E.useState(null),T=E.useCallback(q=>{q!==M.current&&(M.current=q,S(q))},[]),R=E.useCallback(q=>{q!==D.current&&(D.current=q,w(q))},[]),O=o||x,N=l||A,M=E.useRef(null),D=E.useRef(null),L=E.useRef(m),V=d!=null,U=Rg(d),ce=Rg(a),ie=Rg(f),de=E.useCallback(()=>{if(!M.current||!D.current)return;const q={placement:t,strategy:n,middleware:g};ce.current&&(q.platform=ce.current),UF(M.current,D.current,q).then(ye=>{const P={...ye,isPositioned:ie.current!==!1};X.current&&!Df(L.current,P)&&(L.current=P,bs.flushSync(()=>{y(P)}))})},[g,t,n,ce,ie]);cf(()=>{f===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,y(q=>({...q,isPositioned:!1})))},[f]);const X=E.useRef(!1);cf(()=>(X.current=!0,()=>{X.current=!1}),[]),cf(()=>{if(O&&(M.current=O),N&&(D.current=N),O&&N){if(U.current)return U.current(O,N,de);de()}},[O,N,de,U,V]);const J=E.useMemo(()=>({reference:M,floating:D,setReference:T,setFloating:R}),[T,R]),H=E.useMemo(()=>({reference:O,floating:N}),[O,N]),ne=E.useMemo(()=>{const q={position:n,left:0,top:0};if(!H.floating)return q;const ye=xA(H.floating,m.x),P=xA(H.floating,m.y);return u?{...q,transform:"translate("+ye+"px, "+P+"px)",...RR(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ye,top:P}},[n,u,H.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:de,refs:J,elements:H,floatingStyles:ne}),[m,de,J,H,ne])}const FF=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?_A({element:r.current,padding:a}).fn(n):{}:r?_A({element:r,padding:a}).fn(n):{}}}},GF=(e,t)=>({...MF(e),options:[e,t]}),$F=(e,t)=>({...jF(e),options:[e,t]}),qF=(e,t)=>({...zF(e),options:[e,t]}),KF=(e,t)=>({...PF(e),options:[e,t]}),WF=(e,t)=>({...VF(e),options:[e,t]}),YF=(e,t)=>({...BF(e),options:[e,t]}),ZF=(e,t)=>({...FF(e),options:[e,t]});var XF="Arrow",NR=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return b.jsx(Qe.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"})})});NR.displayName=XF;var QF=NR;function JF(e){const[t,n]=E.useState(void 0);return dn(()=>{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 ub="Popper",[kR,OR]=nu(ub),[e4,DR]=kR(ub),IR=e=>{const{__scopePopper:t,children:n}=e,[r,a]=E.useState(null);return b.jsx(e4,{scope:t,anchor:r,onAnchorChange:a,children:n})};IR.displayName=ub;var LR="PopperAnchor",MR=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=DR(LR,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(Qe.div,{...a,ref:u})});MR.displayName=LR;var db="PopperContent",[t4,n4]=kR(db),jR=E.forwardRef((e,t)=>{var he,Ee,Oe,Ce,Fe,Ke;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:y="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:x,...S}=e,A=DR(db,n),[w,T]=E.useState(null),R=Nt(t,Et=>T(Et)),[O,N]=E.useState(null),M=JF(O),D=(M==null?void 0:M.width)??0,L=(M==null?void 0:M.height)??0,V=r+(o!=="center"?"-"+o:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},ce=Array.isArray(f)?f:[f],ie=ce.length>0,de={padding:U,boundary:ce.filter(i4),altBoundary:ie},{refs:X,floatingStyles:J,placement:H,isPositioned:ne,middlewareData:q}=HF({strategy:"fixed",placement:V,whileElementsMounted:(...Et)=>LF(...Et,{animationFrame:v==="always"}),elements:{reference:A.anchor},middleware:[GF({mainAxis:a+L,alignmentAxis:l}),d&&$F({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?qF():void 0,...de}),d&&KF({...de}),WF({...de,apply:({elements:Et,rects:Yt,availableWidth:Ln,availableHeight:Cn})=>{const{width:pr,height:Na}=Yt.reference,gr=Et.floating.style;gr.setProperty("--radix-popper-available-width",`${Ln}px`),gr.setProperty("--radix-popper-available-height",`${Cn}px`),gr.setProperty("--radix-popper-anchor-width",`${pr}px`),gr.setProperty("--radix-popper-anchor-height",`${Na}px`)}}),O&&ZF({element:O,padding:u}),a4({arrowWidth:D,arrowHeight:L}),g&&YF({strategy:"referenceHidden",...de})]}),[ye,P]=BR(H),Y=Tr(x);dn(()=>{ne&&(Y==null||Y())},[ne,Y]);const F=(he=q.arrow)==null?void 0:he.x,te=(Ee=q.arrow)==null?void 0:Ee.y,re=((Oe=q.arrow)==null?void 0:Oe.centerOffset)!==0,[fe,ge]=E.useState();return dn(()=>{w&&ge(window.getComputedStyle(w).zIndex)},[w]),b.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ne?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(Ce=q.transformOrigin)==null?void 0:Ce.x,(Fe=q.transformOrigin)==null?void 0:Fe.y].join(" "),...((Ke=q.hide)==null?void 0:Ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(t4,{scope:n,placedSide:ye,onArrowChange:N,arrowX:F,arrowY:te,shouldHideArrow:re,children:b.jsx(Qe.div,{"data-side":ye,"data-align":P,...S,ref:R,style:{...S.style,animation:ne?void 0:"none"}})})})});jR.displayName=db;var PR="PopperArrow",r4={top:"bottom",right:"left",bottom:"top",left:"right"},VR=E.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=n4(PR,r),l=r4[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(QF,{...a,ref:n,style:{...a.style,display:"block"}})})});VR.displayName=PR;function i4(e){return e!==null}var a4=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]=BR(n),y={start:"0%",center:"50%",end:"100%"}[m],g=(((w=a.arrow)==null?void 0:w.x)??0)+u/2,v=(((T=a.arrow)==null?void 0:T.y)??0)+d/2;let x="",S="";return f==="bottom"?(x=l?y:`${g}px`,S=`${-d}px`):f==="top"?(x=l?y:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=l?y:`${v}px`):f==="left"&&(x=`${r.floating.width+d}px`,S=l?y:`${v}px`),{data:{x,y:S}}}});function BR(e){const[t,n="center"]=e.split("-");return[t,n]}var s4=IR,o4=MR,l4=jR,c4=VR;function u4(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 d4=[" ","Enter","ArrowUp","ArrowDown"],f4=[" ","Enter"],ps="Select",[wh,Th,h4]=X1(ps),[Wo,oQ]=nu(ps,[h4,OR]),Ch=OR(),[m4,Sa]=Wo(ps),[p4,g4]=Wo(ps),zR=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:y,disabled:g,required:v,form:x}=e,S=Ch(t),[A,w]=E.useState(null),[T,R]=E.useState(null),[O,N]=E.useState(!1),M=JH(f),[D,L]=Ef({prop:r,defaultProp:a??!1,onChange:o,caller:ps}),[V,U]=Ef({prop:l,defaultProp:u,onChange:d,caller:ps}),ce=E.useRef(null),ie=A?x||!!A.closest("form"):!0,[de,X]=E.useState(new Set),J=Array.from(de).map(H=>H.props.value).join(";");return b.jsx(s4,{...S,children:b.jsxs(m4,{required:v,scope:t,trigger:A,onTriggerChange:w,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:ur(),value:V,onValueChange:U,open:D,onOpenChange:L,dir:M,triggerPointerDownPosRef:ce,disabled:g,children:[b.jsx(wh.Provider,{scope:t,children:b.jsx(p4,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(H=>{X(ne=>new Set(ne).add(H))},[]),onNativeOptionRemove:E.useCallback(H=>{X(ne=>{const q=new Set(ne);return q.delete(H),q})},[]),children:n})}),ie?b.jsxs(dN,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:y,value:V,onChange:H=>U(H.target.value),disabled:g,form:x,children:[V===void 0?b.jsx("option",{value:""}):null,Array.from(de)]},J):null]})})};zR.displayName=ps;var UR="SelectTrigger",HR=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Ch(n),l=Sa(UR,n),u=l.disabled||r,d=Nt(t,l.onTriggerChange),f=Th(n),m=E.useRef("touch"),[y,g,v]=hN(S=>{const A=f().filter(R=>!R.disabled),w=A.find(R=>R.value===l.value),T=mN(A,S,w);T!==void 0&&l.onValueChange(T.value)}),x=S=>{u||(l.onOpenChange(!0),v()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return b.jsx(o4,{asChild:!0,...o,children:b.jsx(Qe.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":fN(l.value)?"":void 0,...a,ref:d,onClick:st(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&x(S)}),onPointerDown:st(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"&&(x(S),S.preventDefault())}),onKeyDown:st(a.onKeyDown,S=>{const A=y.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(A&&S.key===" ")&&d4.includes(S.key)&&(x(),S.preventDefault())})})})});HR.displayName=UR;var FR="SelectValue",GR=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...u}=e,d=Sa(FR,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,y=Nt(t,d.onValueNodeChange);return dn(()=>{f(m)},[f,m]),b.jsx(Qe.span,{...u,ref:y,style:{pointerEvents:"none"},children:fN(d.value)?b.jsx(b.Fragment,{children:l}):o})});GR.displayName=FR;var y4="SelectIcon",$R=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return b.jsx(Qe.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});$R.displayName=y4;var v4="SelectPortal",qR=e=>b.jsx(mh,{asChild:!0,...e});qR.displayName=v4;var gs="SelectContent",KR=E.forwardRef((e,t)=>{const n=Sa(gs,e.__scopeSelect),[r,a]=E.useState();if(dn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?bs.createPortal(b.jsx(WR,{scope:e.__scopeSelect,children:b.jsx(wh.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),o):null}return b.jsx(YR,{...e,ref:t})});KR.displayName=gs;var Er=10,[WR,Aa]=Wo(gs),b4="SelectContentImpl",_4=Ro("SelectContent.RemoveScroll"),YR=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:y,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:S,avoidCollisions:A,...w}=e,T=Sa(gs,n),[R,O]=E.useState(null),[N,M]=E.useState(null),D=Nt(t,he=>O(he)),[L,V]=E.useState(null),[U,ce]=E.useState(null),ie=Th(n),[de,X]=E.useState(!1),J=E.useRef(!1);E.useEffect(()=>{if(R)return YC(R)},[R]),zC();const H=E.useCallback(he=>{const[Ee,...Oe]=ie().map(Ke=>Ke.ref.current),[Ce]=Oe.slice(-1),Fe=document.activeElement;for(const Ke of he)if(Ke===Fe||(Ke==null||Ke.scrollIntoView({block:"nearest"}),Ke===Ee&&N&&(N.scrollTop=0),Ke===Ce&&N&&(N.scrollTop=N.scrollHeight),Ke==null||Ke.focus(),document.activeElement!==Fe))return},[ie,N]),ne=E.useCallback(()=>H([L,R]),[H,L,R]);E.useEffect(()=>{de&&ne()},[de,ne]);const{onOpenChange:q,triggerPointerDownPosRef:ye}=T;E.useEffect(()=>{if(R){let he={x:0,y:0};const Ee=Ce=>{var Fe,Ke;he={x:Math.abs(Math.round(Ce.pageX)-(((Fe=ye.current)==null?void 0:Fe.x)??0)),y:Math.abs(Math.round(Ce.pageY)-(((Ke=ye.current)==null?void 0:Ke.y)??0))}},Oe=Ce=>{he.x<=10&&he.y<=10?Ce.preventDefault():R.contains(Ce.target)||q(!1),document.removeEventListener("pointermove",Ee),ye.current=null};return ye.current!==null&&(document.addEventListener("pointermove",Ee),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ee),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[R,q,ye]),E.useEffect(()=>{const he=()=>q(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[q]);const[P,Y]=hN(he=>{const Ee=ie().filter(Fe=>!Fe.disabled),Oe=Ee.find(Fe=>Fe.ref.current===document.activeElement),Ce=mN(Ee,he,Oe);Ce&&setTimeout(()=>Ce.ref.current.focus())}),F=E.useCallback((he,Ee,Oe)=>{const Ce=!J.current&&!Oe;(T.value!==void 0&&T.value===Ee||Ce)&&(V(he),Ce&&(J.current=!0))},[T.value]),te=E.useCallback(()=>R==null?void 0:R.focus(),[R]),re=E.useCallback((he,Ee,Oe)=>{const Ce=!J.current&&!Oe;(T.value!==void 0&&T.value===Ee||Ce)&&ce(he)},[T.value]),fe=r==="popper"?wy:ZR,ge=fe===wy?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:y,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:S,avoidCollisions:A}:{};return b.jsx(WR,{scope:n,content:R,viewport:N,onViewportChange:M,itemRefCallback:F,selectedItem:L,onItemLeave:te,itemTextRefCallback:re,focusSelectedItem:ne,selectedItemText:U,position:r,isPositioned:de,searchRef:P,children:b.jsx(Qv,{as:_4,allowPinchZoom:!0,children:b.jsx(Xv,{asChild:!0,trapped:T.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:st(a,he=>{var Ee;(Ee=T.trigger)==null||Ee.focus({preventScroll:!0}),he.preventDefault()}),children:b.jsx(hh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:b.jsx(fe,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:he=>he.preventDefault(),...w,...ge,onPlaced:()=>X(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:st(w.onKeyDown,he=>{const Ee=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!Ee&&he.key.length===1&&Y(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Ce=ie().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const Fe=he.target,Ke=Ce.indexOf(Fe);Ce=Ce.slice(Ke+1)}setTimeout(()=>H(Ce)),he.preventDefault()}})})})})})})});YR.displayName=b4;var x4="SelectItemAlignedPosition",ZR=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Sa(gs,n),l=Aa(gs,n),[u,d]=E.useState(null),[f,m]=E.useState(null),y=Nt(t,D=>m(D)),g=Th(n),v=E.useRef(!1),x=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 D=o.trigger.getBoundingClientRect(),L=f.getBoundingClientRect(),V=o.valueNode.getBoundingClientRect(),U=w.getBoundingClientRect();if(o.dir!=="rtl"){const Fe=U.left-L.left,Ke=V.left-Fe,Et=D.left-Ke,Yt=D.width+Et,Ln=Math.max(Yt,L.width),Cn=window.innerWidth-Er,pr=hA(Ke,[Er,Math.max(Er,Cn-Ln)]);u.style.minWidth=Yt+"px",u.style.left=pr+"px"}else{const Fe=L.right-U.right,Ke=window.innerWidth-V.right-Fe,Et=window.innerWidth-D.right-Ke,Yt=D.width+Et,Ln=Math.max(Yt,L.width),Cn=window.innerWidth-Er,pr=hA(Ke,[Er,Math.max(Er,Cn-Ln)]);u.style.minWidth=Yt+"px",u.style.right=pr+"px"}const ce=g(),ie=window.innerHeight-Er*2,de=S.scrollHeight,X=window.getComputedStyle(f),J=parseInt(X.borderTopWidth,10),H=parseInt(X.paddingTop,10),ne=parseInt(X.borderBottomWidth,10),q=parseInt(X.paddingBottom,10),ye=J+H+de+q+ne,P=Math.min(A.offsetHeight*5,ye),Y=window.getComputedStyle(S),F=parseInt(Y.paddingTop,10),te=parseInt(Y.paddingBottom,10),re=D.top+D.height/2-Er,fe=ie-re,ge=A.offsetHeight/2,he=A.offsetTop+ge,Ee=J+H+he,Oe=ye-Ee;if(Ee<=re){const Fe=ce.length>0&&A===ce[ce.length-1].ref.current;u.style.bottom="0px";const Ke=f.clientHeight-S.offsetTop-S.offsetHeight,Et=Math.max(fe,ge+(Fe?te:0)+Ke+ne),Yt=Ee+Et;u.style.height=Yt+"px"}else{const Fe=ce.length>0&&A===ce[0].ref.current;u.style.top="0px";const Et=Math.max(re,J+S.offsetTop+(Fe?F:0)+ge)+Oe;u.style.height=Et+"px",S.scrollTop=Ee-re+S.offsetTop}u.style.margin=`${Er}px 0`,u.style.minHeight=P+"px",u.style.maxHeight=ie+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[g,o.trigger,o.valueNode,u,f,S,A,w,o.dir,r]);dn(()=>R(),[R]);const[O,N]=E.useState();dn(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const M=E.useCallback(D=>{D&&x.current===!0&&(R(),T==null||T(),x.current=!1)},[R,T]);return b.jsx(S4,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:M,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:b.jsx(Qe.div,{...a,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});ZR.displayName=x4;var E4="SelectPopperPosition",wy=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Er,...o}=e,l=Ch(n);return b.jsx(l4,{...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)"}})});wy.displayName=E4;var[S4,fb]=Wo(gs,{}),Ty="SelectViewport",XR=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Aa(Ty,n),l=fb(Ty,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(wh.Slot,{scope:n,children:b.jsx(Qe.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:st(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&y){const v=Math.abs(d.current-m.scrollTop);if(v>0){const x=window.innerHeight-Er*2,S=parseFloat(y.style.minHeight),A=parseFloat(y.style.height),w=Math.max(S,A);if(w<x){const T=w+v,R=Math.min(x,T),O=T-R;y.style.height=R+"px",y.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});XR.displayName=Ty;var QR="SelectGroup",[A4,w4]=Wo(QR),JR=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=ur();return b.jsx(A4,{scope:n,id:a,children:b.jsx(Qe.div,{role:"group","aria-labelledby":a,...r,ref:t})})});JR.displayName=QR;var eN="SelectLabel",tN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=w4(eN,n);return b.jsx(Qe.div,{id:a.id,...r,ref:t})});tN.displayName=eN;var If="SelectItem",[T4,nN]=Wo(If),rN=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,u=Sa(If,n),d=Aa(If,n),f=u.value===r,[m,y]=E.useState(o??""),[g,v]=E.useState(!1),x=Nt(t,T=>{var R;return(R=d.itemRefCallback)==null?void 0:R.call(d,T,r,a)}),S=ur(),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(T4,{scope:n,value:r,disabled:a,textId:S,isSelected:f,onItemTextChange:E.useCallback(T=>{y(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:b.jsx(wh.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:b.jsx(Qe.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:x,onFocus:st(l.onFocus,()=>v(!0)),onBlur:st(l.onBlur,()=>v(!1)),onClick:st(l.onClick,()=>{A.current!=="mouse"&&w()}),onPointerUp:st(l.onPointerUp,()=>{A.current==="mouse"&&w()}),onPointerDown:st(l.onPointerDown,T=>{A.current=T.pointerType}),onPointerMove:st(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:st(l.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=d.onItemLeave)==null||R.call(d))}),onKeyDown:st(l.onKeyDown,T=>{var O;((O=d.searchRef)==null?void 0:O.current)!==""&&T.key===" "||(f4.includes(T.key)&&w(),T.key===" "&&T.preventDefault())})})})})});rN.displayName=If;var uc="SelectItemText",iN=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=Sa(uc,n),u=Aa(uc,n),d=nN(uc,n),f=g4(uc,n),[m,y]=E.useState(null),g=Nt(t,w=>y(w),d.onItemTextChange,w=>{var T;return(T=u.itemTextRefCallback)==null?void 0:T.call(u,w,d.value,d.disabled)}),v=m==null?void 0:m.textContent,x=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 dn(()=>(S(x),()=>A(x)),[S,A,x]),b.jsxs(b.Fragment,{children:[b.jsx(Qe.span,{id:d.textId,...o,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?bs.createPortal(o.children,l.valueNode):null]})});iN.displayName=uc;var aN="SelectItemIndicator",sN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return nN(aN,n).isSelected?b.jsx(Qe.span,{"aria-hidden":!0,...r,ref:t}):null});sN.displayName=aN;var Cy="SelectScrollUpButton",oN=E.forwardRef((e,t)=>{const n=Aa(Cy,e.__scopeSelect),r=fb(Cy,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return dn(()=>{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(cN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});oN.displayName=Cy;var Ry="SelectScrollDownButton",lN=E.forwardRef((e,t)=>{const n=Aa(Ry,e.__scopeSelect),r=fb(Ry,e.__scopeSelect),[a,o]=E.useState(!1),l=Nt(t,r.onScrollButtonChange);return dn(()=>{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(cN,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});lN.displayName=Ry;var cN=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Aa("SelectScrollButton",n),l=E.useRef(null),u=Th(n),d=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),dn(()=>{var m;const f=u().find(y=>y.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),b.jsx(Qe.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:st(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:st(a.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:st(a.onPointerLeave,()=>{d()})})}),C4="SelectSeparator",uN=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(Qe.div,{"aria-hidden":!0,...r,ref:t})});uN.displayName=C4;var Ny="SelectArrow",R4=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Ch(n),o=Sa(Ny,n),l=Aa(Ny,n);return o.open&&l.position==="popper"?b.jsx(c4,{...a,...r,ref:t}):null});R4.displayName=Ny;var N4="SelectBubbleInput",dN=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=E.useRef(null),o=Nt(r,a),l=u4(t);return E.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const y=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(y)}},[l,t]),b.jsx(Qe.select,{...n,style:{...nC,...n.style},ref:o,defaultValue:t})});dN.displayName=N4;function fN(e){return e===""||e===void 0}function hN(e){const t=Tr(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 mN(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=k4(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 k4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var O4=zR,D4=HR,I4=GR,L4=$R,M4=qR,j4=KR,P4=XR,V4=JR,B4=tN,z4=rN,U4=iN,H4=sN,F4=oN,G4=lN,$4=uN;const q4=O4,K4=V4,W4=I4,Y4=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>b.jsxs(D4,{className:Ae("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring focus:outline-hidden flex w-full items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 px-2 py-1 text-sm shadow-none outline-0 transition-all","border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]","aria-[invalid=true]:border-error",e&&"valid:border-success invalid:border-error",t),...r,children:[n,b.jsx(L4,{asChild:!0,children:b.jsx(xV,{className:"size-4 opacity-50"})})]}),pN=({className:e,...t})=>b.jsx(F4,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(bV,{})}),gN=({className:e,...t})=>b.jsx(G4,{className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(O1,{})}),Z4=({className:e,children:t,position:n="popper",...r})=>b.jsx(M4,{children:b.jsxs(j4,{className:Ae("bg-input-background text-input-text w-full select-text resize-none rounded-xl border-2 p-1 text-sm shadow-none outline-0 transition-all","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[b.jsx(pN,{}),b.jsx(P4,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(gN,{})]})}),X4=({className:e,...t})=>b.jsx(B4,{className:Ae("px-1 py-0.5 text-sm font-semibold",e),...t}),Q4=({className:e,children:t,...n})=>b.jsxs(z4,{className:Ae("focus:bg-neutral/10 outline-hidden relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:b.jsx(H4,{children:b.jsx(Ho,{className:"size-4"})})}),b.jsx(U4,{children:t})]}),J4=({className:e,...t})=>b.jsx($4,{className:Ae("-mx-1 my-1 h-px bg-red-300",e),...t}),je=q4;je.Group=K4;je.Value=W4;je.Trigger=Y4;je.ScrollUpButton=pN;je.ScrollDownButton=gN;je.Content=Z4;je.Label=X4;je.Item=Q4;je.Separator=J4;const e3=e=>(e==null?void 0:e.getAttribute("aria-selected"))==="true",t3=(e,t=e3,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=[],y=S=>{if(!S)return;const A=new ResizeObserver(()=>{d()});A.observe(S),m.push(A)},g=e.current.find(t)??null;g&&y(g),o&&y(o);const v=S=>{l(S.currentTarget)},x=()=>{l(null)};return n&&e.current.forEach(S=>{S==null||S.addEventListener("mouseenter",v,{passive:!0}),S==null||S.addEventListener("mouseleave",x,{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",x)})}},[e,t,o,u]),{choiceIndicatorPosition:r}},n3=[{content:"Off",value:!1},{content:"On",value:!0}],r3=hr("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"}}),i3=hr("z-1 w-full flex-1 text-sm font-medium transition-all duration-300 ease-in-out cursor-pointer aria-selected:cursor-default aria-selected:text-text-opposite motion-reduce:transition-none",{variants:{size:{sm:"py-1 px-2 text-xs",md:"p-2 text-sm",lg:"p-4 text-base"}},defaultVariants:{size:"md"}}),a3=hr("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"}}}),cu=({choices:e=n3,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:y}=t3(f),g=v=>{d(v),r==null||r(v)};return E.useEffect(()=>{t!==void 0&&d(t)},[t]),b.jsx("div",{className:r3({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,x)=>{const{content:S,value:A,...w}=v,T=typeof A=="string"||typeof A=="number",R=A===u;return E.createElement("button",{...w,className:Ae(i3({size:o})),key:T?A:x,role:"tab",onClick:()=>g(A),"aria-selected":R,disabled:R,ref:O=>{f.current[x]=O}},S)}),y&&b.jsx("div",{className:Ae(a3({color:a})),style:y,ref:m})]})})},s3=e=>{const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=Ea();return b.jsx(iz,{id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})},o3=e=>{const{formDescriptionId:t}=Ea();return b.jsx("p",{className:"text-neutral text-sm",id:t,...e})},l3=({children:e,...t})=>{const{error:n,formMessageId:r}=Ea(),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},Rh=({label:e,description:t,isRequired:n,info:r,children:a,showErrorMessage:o=!0,htmlFor:l})=>b.jsxs(Xe.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(vR,{isRequired:n,info:r,htmlFor:l,children:e}),t&&b.jsx(Xe.Description,{children:t})]}),b.jsx(Xe.Control,{children:a}),o&&b.jsx(Xe.Message,{"data-testid":"error-message"})]}),c3=({field:e,name:t,label:n,Element:r,isRequired:a=!1,info:o,description:l,showErrorMessage:u=!0,...d})=>{const{error:f}=Ea();return b.jsx(Rh,{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})})},wa=e=>{const{control:t}=xa();return b.jsx(Xe.Field,{control:t,name:e.name,render:({field:n})=>b.jsx(c3,{...e,field:n})})},u3=e=>b.jsx(wa,{id:e.name,"data-testid":e.name,Element:$o,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),d3=({autoComplete:e,...t})=>b.jsx(wa,{Element:tU,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}),f3=e=>b.jsx(wa,{Element:MC,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}),h3=e=>b.jsx(wa,{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:PC,...e}),m3=e=>b.jsx(wa,{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:VC,...e}),p3=e=>b.jsx(wa,{Element:Zv,id:e.name,"data-testid":e.name,...e}),g3=({inputLabel:e,...t})=>b.jsx(eU,{...t,label:e}),y3=({autoComplete:e,...t})=>b.jsx(wa,{Element:g3,id:t.name,"data-testid":t.name,autoComplete:e,minLength:6,maxLength:255,...t}),v3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=xa();return b.jsx(Xe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ea();return b.jsx(Rh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(gn,{onValueChange:f.onChange,values:f.value,...u,children:l})})}})},b3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=xa();return b.jsx(Xe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ea();return b.jsx(Rh,{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})})}})},_3=({name:e,description:t,label:n,isRequired:r,info:a,showErrorMessage:o,children:l,...u})=>{const{control:d}=xa();return b.jsx(Xe.Field,{control:d,name:e,render:({field:f})=>{const{error:m}=Ea();return b.jsx(Rh,{htmlFor:e,label:n,description:t,isRequired:r,info:a,showErrorMessage:o,"aria-invalid":!!m,children:b.jsx(cu,{...f,...u,children:l})})}})},Xe=Y2;Xe.Description=o3;Xe.Control=s3;Xe.Field=Q2;Xe.Item=X2;Xe.Label=vR;Xe.Message=l3;Xe.Element=wa;Xe.Input=u3;Xe.InputPassword=d3;Xe.Checkbox=y3;Xe.TextArea=f3;Xe.AutoSizedTextArea=p3;Xe.Button=yt;Xe.Select=b3;Xe.MultiSelect=v3;Xe.EditableFieldInput=h3;Xe.EditableFieldTextArea=m3;Xe.SwitchSelector=_3;var ft;(function(e){e.assertEqual=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"&&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})(ft||(ft={}));var EA;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(EA||(EA={}));const De=ft.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oa=e=>{switch(typeof e){case"undefined":return De.undefined;case"string":return De.string;case"number":return Number.isNaN(e)?De.nan:De.number;case"boolean":return De.boolean;case"function":return De.function;case"bigint":return De.bigint;case"symbol":return De.symbol;case"object":return Array.isArray(e)?De.array:e===null?De.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?De.promise:typeof Map<"u"&&e instanceof Map?De.map:typeof Set<"u"&&e instanceof Set?De.set:typeof Date<"u"&&e instanceof Date?De.date:De.object;default:return De.unknown}},be=ft.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ri 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 Ri))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ft.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()}}Ri.create=e=>new Ri(e);const ky=(e,t)=>{let n;switch(e.code){case be.invalid_type:e.received===De.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case be.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ft.jsonStringifyReplacer)}`;break;case be.unrecognized_keys:n=`Unrecognized key(s) in object: ${ft.joinValues(e.keys,", ")}`;break;case be.invalid_union:n="Invalid input";break;case be.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ft.joinValues(e.options)}`;break;case be.invalid_enum_value:n=`Invalid enum value. Expected ${ft.joinValues(e.options)}, received '${e.received}'`;break;case be.invalid_arguments:n="Invalid function arguments";break;case be.invalid_return_type:n="Invalid function return type";break;case be.invalid_date:n="Invalid date";break;case be.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}"`:ft.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case be.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 be.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 be.custom:n="Invalid input";break;case be.invalid_intersection_types:n="Intersection results could not be merged";break;case be.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case be.not_finite:n="Number must be finite";break;default:n=t.defaultError,ft.assertNever(e)}return{message:n}};let x3=ky;function E3(){return x3}const S3=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}};function Te(e,t){const n=E3(),r=S3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ky?void 0:ky].filter(a=>!!a)});e.common.issues.push(r)}class qn{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 We;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 qn.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 We;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 We=Object.freeze({status:"aborted"}),dc=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),SA=e=>e.status==="aborted",AA=e=>e.status==="dirty",ko=e=>e.status==="valid",Lf=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Le||(Le={}));var Mf=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},yN=function(e,t,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(e,n):a?a.value=n:t.set(e,n),n},fc,hc;class pa{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||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const wA=(e,t)=>{if(ko(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 Ri(e.common.issues);return this._error=n,this._error}}};function nt(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)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class lt{get description(){return this._def.description}_getType(t){return oa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:oa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qn,ctx:{common:t.parent.common,data:t.data,parsedType:oa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Lf(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){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)},a=this._parseSync({data:t,path:r.path,parent:r});return wA(r,a)}"~validate"(t){var r,a;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oa(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:n});return ko(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(a=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>ko(o)?{value:o.value}:{issues:n.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:oa(t)},a=this._parse({data:t,path:r.path,parent:r}),o=await(Lf(a)?a:Promise.resolve(a));return wA(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:be.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 Do({schema:this,typeName:qe.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 ua.create(this,this._def)}nullable(){return Io.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fr.create(this)}promise(){return Bf.create(this,this._def)}or(t){return Pf.create([this,t],this._def)}and(t){return Vf.create(this,t,this._def)}transform(t){return new Do({...nt(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Dy({...nt(this._def),innerType:this,defaultValue:n,typeName:qe.ZodDefault})}brand(){return new q3({typeName:qe.ZodBranded,type:this,...nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Iy({...nt(this._def),innerType:this,catchValue:n,typeName:qe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return hb.create(this,t)}readonly(){return Ly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const A3=/^c[^\s-]{8,}$/i,w3=/^[0-9a-z]+$/,T3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,C3=/^[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,R3=/^[a-z0-9_-]{21}$/i,N3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,k3=/^[-+]?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)?)??$/,O3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,D3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ng;const I3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,L3=/^(?:(?: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])$/,M3=/^(([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]))$/,j3=/^(([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])$/,P3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,V3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",B3=new RegExp(`^${vN}$`);function bN(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function z3(e){return new RegExp(`^${bN(e)}$`)}function U3(e){let t=`${vN}T${bN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function H3(e,t){return!!((t==="v4"||!t)&&I3.test(e)||(t==="v6"||!t)&&M3.test(e))}function F3(e,t){if(!N3.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||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function G3(e,t){return!!((t==="v4"||!t)&&L3.test(e)||(t==="v6"||!t)&&j3.test(e))}class ca extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==De.string){const o=this._getOrReturnCtx(t);return Te(o,{code:be.invalid_type,expected:De.string,received:o.parsedType}),We}const r=new qn;let a;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:be.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),Te(a,{code:be.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?Te(a,{code:be.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Te(a,{code:be.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")O3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"email",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Ng||(Ng=new RegExp(D3,"u")),Ng.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"emoji",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")C3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"uuid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")R3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"nanoid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")A3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cuid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")w3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cuid2",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")T3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"ulid",code:be.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Te(a,{validation:"url",code:be.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),Te(a,{validation:"regex",code:be.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),Te(a,{code:be.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),Te(a,{code:be.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(a=this._getOrReturnCtx(t,a),Te(a,{code:be.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?U3(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:be.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?B3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:be.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?z3(o).test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{code:be.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?k3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"duration",code:be.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?H3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"ip",code:be.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?F3(t.data,o.alg)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"jwt",code:be.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?G3(t.data,o.version)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"cidr",code:be.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?P3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"base64",code:be.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?V3.test(t.data)||(a=this._getOrReturnCtx(t,a),Te(a,{validation:"base64url",code:be.invalid_string,message:o.message}),r.dirty()):ft.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:be.invalid_string,...Le.errToObj(r)})}_addCheck(t){return new ca({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Le.errToObj(t)})}datetime(t){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:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Le.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,...Le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}nonempty(t){return this.min(1,Le.errToObj(t))}trim(){return new ca({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ca({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ca({...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}}ca.create=e=>new ca({checks:[],typeName:qe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...nt(e)});function $3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,o=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return o%l/10**a}class Dc extends lt{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)!==De.number){const o=this._getOrReturnCtx(t);return Te(o,{code:be.invalid_type,expected:De.number,received:o.parsedType}),We}let r;const a=new qn;for(const o of this._def.checks)o.kind==="int"?ft.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:be.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),Te(r,{code:be.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),Te(r,{code:be.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),a.dirty()):o.kind==="multipleOf"?$3(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Te(r,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:be.not_finite,message:o.message}),a.dirty()):ft.assertNever(o);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,r,a){return new Dc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Le.toString(a)}]})}_addCheck(t){return new Dc({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.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"&&ft.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)}}Dc.create=e=>new Dc({checks:[],typeName:qe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...nt(e)});class Ic extends lt{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)!==De.bigint)return this._getInvalidInput(t);let r;const a=new qn;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),Te(r,{code:be.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),Te(r,{code:be.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),Te(r,{code:be.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):ft.assertNever(o);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Te(n,{code:be.invalid_type,expected:De.bigint,received:n.parsedType}),We}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,r,a){return new Ic({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Le.toString(a)}]})}_addCheck(t){return new Ic({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.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}}Ic.create=e=>new Ic({checks:[],typeName:qe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...nt(e)});class TA extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==De.boolean){const r=this._getOrReturnCtx(t);return Te(r,{code:be.invalid_type,expected:De.boolean,received:r.parsedType}),We}return mr(t.data)}}TA.create=e=>new TA({typeName:qe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...nt(e)});class jf extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==De.date){const o=this._getOrReturnCtx(t);return Te(o,{code:be.invalid_type,expected:De.date,received:o.parsedType}),We}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Te(o,{code:be.invalid_date}),We}const r=new qn;let a;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(a=this._getOrReturnCtx(t,a),Te(a,{code:be.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),Te(a,{code:be.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ft.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new jf({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.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}}jf.create=e=>new jf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:qe.ZodDate,...nt(e)});class CA extends lt{_parse(t){if(this._getType(t)!==De.symbol){const r=this._getOrReturnCtx(t);return Te(r,{code:be.invalid_type,expected:De.symbol,received:r.parsedType}),We}return mr(t.data)}}CA.create=e=>new CA({typeName:qe.ZodSymbol,...nt(e)});class RA extends lt{_parse(t){if(this._getType(t)!==De.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:be.invalid_type,expected:De.undefined,received:r.parsedType}),We}return mr(t.data)}}RA.create=e=>new RA({typeName:qe.ZodUndefined,...nt(e)});class NA extends lt{_parse(t){if(this._getType(t)!==De.null){const r=this._getOrReturnCtx(t);return Te(r,{code:be.invalid_type,expected:De.null,received:r.parsedType}),We}return mr(t.data)}}NA.create=e=>new NA({typeName:qe.ZodNull,...nt(e)});class kA extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}}kA.create=e=>new kA({typeName:qe.ZodAny,...nt(e)});class OA extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}}OA.create=e=>new OA({typeName:qe.ZodUnknown,...nt(e)});class ga extends lt{_parse(t){const n=this._getOrReturnCtx(t);return Te(n,{code:be.invalid_type,expected:De.never,received:n.parsedType}),We}}ga.create=e=>new ga({typeName:qe.ZodNever,...nt(e)});class DA extends lt{_parse(t){if(this._getType(t)!==De.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:be.invalid_type,expected:De.void,received:r.parsedType}),We}return mr(t.data)}}DA.create=e=>new DA({typeName:qe.ZodVoid,...nt(e)});class Fr extends lt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==De.array)return Te(n,{code:be.invalid_type,expected:De.array,received:n.parsedType}),We;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(Te(n,{code:l?be.too_big:be.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&&(Te(n,{code:be.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&&(Te(n,{code:be.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 pa(n,l,n.path,u)))).then(l=>qn.mergeArray(r,l));const o=[...n.data].map((l,u)=>a.type._parseSync(new pa(n,l,n.path,u)));return qn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Fr({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new Fr({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new Fr({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}Fr.create=(e,t)=>new Fr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...nt(t)});function ho(e){if(e instanceof Ht){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ua.create(ho(r))}return new Ht({...e._def,shape:()=>t})}else return e instanceof Fr?new Fr({...e._def,type:ho(e.element)}):e instanceof ua?ua.create(ho(e.unwrap())):e instanceof Io?Io.create(ho(e.unwrap())):e instanceof ys?ys.create(e.items.map(t=>ho(t))):e}class Ht extends lt{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=ft.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==De.object){const f=this._getOrReturnCtx(t);return Te(f,{code:be.invalid_type,expected:De.object,received:f.parsedType}),We}const{status:r,ctx:a}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof ga&&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],y=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new pa(a,y,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof ga){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&&(Te(a,{code:be.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 y=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new pa(a,y,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const y=await m.key,g=await m.value;f.push({key:y,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>qn.mergeObjectSync(r,f)):qn.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new Ht({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,l;const a=((l=(o=this._def).errorMap)==null?void 0:l.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Le.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Ht({...this._def,unknownKeys:"strip"})}passthrough(){return new Ht({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ht({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ht({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:qe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ht({...this._def,catchall:t})}pick(t){const n={};for(const r of ft.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Ht({...this._def,shape:()=>n})}omit(t){const n={};for(const r of ft.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Ht({...this._def,shape:()=>n})}deepPartial(){return ho(this)}partial(t){const n={};for(const r of ft.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Ht({...this._def,shape:()=>n})}required(t){const n={};for(const r of ft.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ua;)o=o._def.innerType;n[r]=o}return new Ht({...this._def,shape:()=>n})}keyof(){return _N(ft.objectKeys(this.shape))}}Ht.create=(e,t)=>new Ht({shape:()=>e,unknownKeys:"strip",catchall:ga.create(),typeName:qe.ZodObject,...nt(t)});Ht.strictCreate=(e,t)=>new Ht({shape:()=>e,unknownKeys:"strict",catchall:ga.create(),typeName:qe.ZodObject,...nt(t)});Ht.lazycreate=(e,t)=>new Ht({shape:e,unknownKeys:"strip",catchall:ga.create(),typeName:qe.ZodObject,...nt(t)});class Pf extends lt{_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 Ri(u.ctx.common.issues));return Te(n,{code:be.invalid_union,unionErrors:l}),We}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 Ri(d));return Te(n,{code:be.invalid_union,unionErrors:u}),We}}get options(){return this._def.options}}Pf.create=(e,t)=>new Pf({options:e,typeName:qe.ZodUnion,...nt(t)});function Oy(e,t){const n=oa(e),r=oa(t);if(e===t)return{valid:!0,data:e};if(n===De.object&&r===De.object){const a=ft.objectKeys(t),o=ft.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of o){const d=Oy(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===De.array&&r===De.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=Oy(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===De.date&&r===De.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Vf extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(o,l)=>{if(SA(o)||SA(l))return We;const u=Oy(o.value,l.value);return u.valid?((AA(o)||AA(l))&&n.dirty(),{status:n.value,value:u.data}):(Te(r,{code:be.invalid_intersection_types}),We)};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}))}}Vf.create=(e,t,n)=>new Vf({left:e,right:t,typeName:qe.ZodIntersection,...nt(n)});class ys extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==De.array)return Te(r,{code:be.invalid_type,expected:De.array,received:r.parsedType}),We;if(r.data.length<this._def.items.length)return Te(r,{code:be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),We;!this._def.rest&&r.data.length>this._def.items.length&&(Te(r,{code:be.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 pa(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>qn.mergeArray(n,l)):qn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ys({...this._def,rest:t})}}ys.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ys({items:e,typeName:qe.ZodTuple,rest:null,...nt(t)})};class IA extends lt{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!==De.map)return Te(r,{code:be.invalid_type,expected:De.map,received:r.parsedType}),We;const a=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new pa(r,u,r.path,[f,"key"])),value:o._parse(new pa(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 We;(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 We;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}IA.create=(e,t,n)=>new IA({valueType:t,keyType:e,typeName:qe.ZodMap,...nt(n)});class Lc extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==De.set)return Te(r,{code:be.invalid_type,expected:De.set,received:r.parsedType}),We;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Te(r,{code:be.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&&(Te(r,{code:be.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 We;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 pa(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new Lc({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new Lc({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Lc.create=(e,t)=>new Lc({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...nt(t)});class LA extends lt{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})}}LA.create=(e,t)=>new LA({getter:e,typeName:qe.ZodLazy,...nt(t)});class MA extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Te(n,{received:n.data,code:be.invalid_literal,expected:this._def.value}),We}return{status:"valid",value:t.data}}get value(){return this._def.value}}MA.create=(e,t)=>new MA({value:e,typeName:qe.ZodLiteral,...nt(t)});function _N(e,t){return new Oo({values:e,typeName:qe.ZodEnum,...nt(t)})}class Oo extends lt{constructor(){super(...arguments),fc.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{expected:ft.joinValues(r),received:n.parsedType,code:be.invalid_type}),We}if(Mf(this,fc,"f")||yN(this,fc,new Set(this._def.values),"f"),!Mf(this,fc,"f").has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{received:n.data,code:be.invalid_enum_value,options:r}),We}return mr(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 Oo.create(t,{...this._def,...n})}exclude(t,n=this._def){return Oo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}fc=new WeakMap;Oo.create=_N;class jA extends lt{constructor(){super(...arguments),hc.set(this,void 0)}_parse(t){const n=ft.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==De.string&&r.parsedType!==De.number){const a=ft.objectValues(n);return Te(r,{expected:ft.joinValues(a),received:r.parsedType,code:be.invalid_type}),We}if(Mf(this,hc,"f")||yN(this,hc,new Set(ft.getValidEnumValues(this._def.values)),"f"),!Mf(this,hc,"f").has(t.data)){const a=ft.objectValues(n);return Te(r,{received:r.data,code:be.invalid_enum_value,options:a}),We}return mr(t.data)}get enum(){return this._def.values}}hc=new WeakMap;jA.create=(e,t)=>new jA({values:e,typeName:qe.ZodNativeEnum,...nt(t)});class Bf extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==De.promise&&n.common.async===!1)return Te(n,{code:be.invalid_type,expected:De.promise,received:n.parsedType}),We;const r=n.parsedType===De.promise?n.data:Promise.resolve(n.data);return mr(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Bf.create=(e,t)=>new Bf({type:e,typeName:qe.ZodPromise,...nt(t)});class Do extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.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=>{Te(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 We;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?We:d.status==="dirty"||n.value==="dirty"?dc(d.value):d});{if(n.value==="aborted")return We;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?We:u.status==="dirty"||n.value==="dirty"?dc(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"?We:(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"?We:(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(!ko(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=>ko(l)?Promise.resolve(a.transform(l.value,o)).then(u=>({status:n.value,value:u})):l);ft.assertNever(a)}}Do.create=(e,t,n)=>new Do({schema:e,typeName:qe.ZodEffects,effect:t,...nt(n)});Do.createWithPreprocess=(e,t,n)=>new Do({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...nt(n)});class ua extends lt{_parse(t){return this._getType(t)===De.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ua.create=(e,t)=>new ua({innerType:e,typeName:qe.ZodOptional,...nt(t)});class Io extends lt{_parse(t){return this._getType(t)===De.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Io.create=(e,t)=>new Io({innerType:e,typeName:qe.ZodNullable,...nt(t)});class Dy extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===De.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Dy.create=(e,t)=>new Dy({innerType:e,typeName:qe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...nt(t)});class Iy extends lt{_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 Lf(a)?a.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ri(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ri(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Iy.create=(e,t)=>new Iy({innerType:e,typeName:qe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...nt(t)});class PA extends lt{_parse(t){if(this._getType(t)!==De.nan){const r=this._getOrReturnCtx(t);return Te(r,{code:be.invalid_type,expected:De.nan,received:r.parsedType}),We}return{status:"valid",value:t.data}}}PA.create=e=>new PA({typeName:qe.ZodNaN,...nt(e)});class q3 extends lt{_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 hb extends lt{_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"?We:o.status==="dirty"?(n.dirty(),dc(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"?We: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 hb({in:t,out:n,typeName:qe.ZodPipeline})}}class Ly extends lt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(ko(a)&&(a.value=Object.freeze(a.value)),a);return Lf(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}Ly.create=(e,t)=>new Ly({innerType:e,typeName:qe.ZodReadonly,...nt(t)});var qe;(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"})(qe||(qe={}));const ac=ca.create;ga.create;const VA=Fr.create,K3=Ht.create;Pf.create;Vf.create;ys.create;Oo.create;Bf.create;ua.create;Io.create;const xN=E.createContext({});function W3(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const mb=typeof window<"u",Y3=mb?E.useLayoutEffect:E.useEffect,pb=E.createContext(null);function gb(e,t){e.indexOf(t)===-1&&e.push(t)}function yb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ni=(e,t,n)=>n>t?t:n<e?e:n;let vb=()=>{};const ki={},EN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function SN(e){return typeof e=="object"&&e!==null}const AN=e=>/^0[^.\s]+$/u.test(e);function bb(e){let t;return()=>(t===void 0&&(t=e()),t)}const dr=e=>e,Z3=(e,t)=>n=>t(e(n)),uu=(...e)=>e.reduce(Z3),Mc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class _b{constructor(){this.subscriptions=[]}add(t){return gb(this.subscriptions,t),()=>yb(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 Gr=e=>e*1e3,$r=e=>e/1e3;function wN(e,t){return t?e*(1e3/t):0}const TN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,X3=1e-7,Q3=12;function J3(e,t,n,r,a){let o,l,u=0;do l=t+(n-t)/2,o=TN(l,r,a)-e,o>0?n=l:t=l;while(Math.abs(o)>X3&&++u<Q3);return l}function du(e,t,n,r){if(e===t&&n===r)return dr;const a=o=>J3(o,0,1,e,n);return o=>o===0||o===1?o:TN(a(o),t,r)}const CN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,RN=e=>t=>1-e(1-t),NN=du(.33,1.53,.69,.99),xb=RN(NN),kN=CN(xb),ON=e=>(e*=2)<1?.5*xb(e):.5*(2-Math.pow(2,-10*(e-1))),Eb=e=>1-Math.sin(Math.acos(e)),DN=RN(Eb),IN=CN(Eb),e5=du(.42,0,1,1),t5=du(0,0,.58,1),LN=du(.42,0,.58,1),n5=e=>Array.isArray(e)&&typeof e[0]!="number",MN=e=>Array.isArray(e)&&typeof e[0]=="number",r5={linear:dr,easeIn:e5,easeInOut:LN,easeOut:t5,circIn:Eb,circInOut:IN,circOut:DN,backIn:xb,backInOut:kN,backOut:NN,anticipate:ON},i5=e=>typeof e=="string",BA=e=>{if(MN(e)){vb(e.length===4);const[t,n,r,a]=e;return du(t,n,r,a)}else if(i5(e))return r5[e];return e},Ud=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function a5(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,y=!1,g=!1)=>{const x=g&&a?n:r;return y&&l.add(m),x.has(m)||x.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 s5=40;function jN(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Ud.reduce((R,O)=>(R[O]=a5(o),R),{}),{setup:u,read:d,resolveKeyframes:f,preUpdate:m,update:y,preRender:g,render:v,postRender:x}=l,S=()=>{const R=ki.useManualTiming?a.timestamp:performance.now();n=!1,ki.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(R-a.timestamp,s5),1)),a.timestamp=R,a.isProcessing=!0,u.process(a),d.process(a),f.process(a),m.process(a),y.process(a),g.process(a),v.process(a),x.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(S))},A=()=>{n=!0,r=!0,a.isProcessing||e(S)};return{schedule:Ud.reduce((R,O)=>{const N=l[O];return R[O]=(M,D=!1,L=!1)=>(n||A(),N.schedule(M,D,L)),R},{}),cancel:R=>{for(let O=0;O<Ud.length;O++)l[Ud[O]].cancel(R)},state:a,steps:l}}const{schedule:Rt,cancel:ya,state:un,steps:kg}=jN(typeof requestAnimationFrame<"u"?requestAnimationFrame:dr,!0);let uf;function o5(){uf=void 0}const Dn={now:()=>(uf===void 0&&Dn.set(un.isProcessing||ki.useManualTiming?un.timestamp:performance.now()),uf),set:e=>{uf=e,queueMicrotask(o5)}},PN=e=>t=>typeof t=="string"&&t.startsWith(e),Sb=PN("--"),l5=PN("var(--"),Ab=e=>l5(e)?c5.test(e.split("/*")[0].trim()):!1,c5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jc={...Yo,transform:e=>Ni(0,1,e)},Hd={...Yo,default:1},_c=e=>Math.round(e*1e5)/1e5,wb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function u5(e){return e==null}const d5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tb=(e,t)=>n=>!!(typeof n=="string"&&d5.test(n)&&n.startsWith(e)||t&&!u5(n)&&Object.prototype.hasOwnProperty.call(n,t)),VN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,o,l,u]=r.match(wb);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},f5=e=>Ni(0,255,e),Og={...Yo,transform:e=>Math.round(f5(e))},as={test:Tb("rgb","red"),parse:VN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Og.transform(e)+", "+Og.transform(t)+", "+Og.transform(n)+", "+_c(jc.transform(r))+")"};function h5(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 My={test:Tb("#"),parse:h5,transform:as.transform},fu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sa=fu("deg"),qr=fu("%"),Ue=fu("px"),m5=fu("vh"),p5=fu("vw"),zA={...qr,parse:e=>qr.parse(e)/100,transform:e=>qr.transform(e*100)},po={test:Tb("hsl","hue"),parse:VN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qr.transform(_c(t))+", "+qr.transform(_c(n))+", "+_c(jc.transform(r))+")"},yn={test:e=>as.test(e)||My.test(e)||po.test(e),parse:e=>as.test(e)?as.parse(e):po.test(e)?po.parse(e):My.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?as.transform(e):po.transform(e)},g5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function y5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(wb))==null?void 0:t.length)||0)+(((n=e.match(g5))==null?void 0:n.length)||0)>0}const BN="number",zN="color",v5="var",b5="var(",UA="${}",_5=/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 Pc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const u=t.replace(_5,d=>(yn.test(d)?(r.color.push(o),a.push(zN),n.push(yn.parse(d))):d.startsWith(b5)?(r.var.push(o),a.push(v5),n.push(d)):(r.number.push(o),a.push(BN),n.push(parseFloat(d))),++o,UA)).split(UA);return{values:n,split:u,indexes:r,types:a}}function UN(e){return Pc(e).values}function HN(e){const{split:t,types:n}=Pc(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===BN?o+=_c(a[l]):u===zN?o+=yn.transform(a[l]):o+=a[l]}return o}}const x5=e=>typeof e=="number"?0:e;function E5(e){const t=UN(e);return HN(e)(t.map(x5))}const va={test:y5,parse:UN,createTransformer:HN,getAnimatableNone:E5};function Dg(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 S5({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=Dg(d,u,e+1/3),o=Dg(d,u,e),l=Dg(d,u,e-1/3)}return{red:Math.round(a*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function zf(e,t){return n=>n>0?t:e}const Tt=(e,t,n)=>e+(t-e)*n,Ig=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},A5=[My,as,po],w5=e=>A5.find(t=>t.test(e));function HA(e){const t=w5(e);if(!t)return!1;let n=t.parse(e);return t===po&&(n=S5(n)),n}const FA=(e,t)=>{const n=HA(e),r=HA(t);if(!n||!r)return zf(e,t);const a={...n};return o=>(a.red=Ig(n.red,r.red,o),a.green=Ig(n.green,r.green,o),a.blue=Ig(n.blue,r.blue,o),a.alpha=Tt(n.alpha,r.alpha,o),as.transform(a))},jy=new Set(["none","hidden"]);function T5(e,t){return jy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function C5(e,t){return n=>Tt(e,t,n)}function Cb(e){return typeof e=="number"?C5:typeof e=="string"?Ab(e)?zf:yn.test(e)?FA:k5:Array.isArray(e)?FN:typeof e=="object"?yn.test(e)?FA:R5:zf}function FN(e,t){const n=[...e],r=n.length,a=e.map((o,l)=>Cb(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=a[l](o);return n}}function R5(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=Cb(e[a])(e[a],t[a]));return a=>{for(const o in r)n[o]=r[o](a);return n}}function N5(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],l=e.indexes[o][r[o]],u=e.values[l]??0;n[a]=u,r[o]++}return n}const k5=(e,t)=>{const n=va.createTransformer(t),r=Pc(e),a=Pc(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?jy.has(e)&&!a.values.length||jy.has(t)&&!r.values.length?T5(e,t):uu(FN(N5(r,a),a.values),n):zf(e,t)};function GN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Tt(e,t,n):Cb(e)(e,t)}const O5=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Rt.update(t,n),stop:()=>ya(t),now:()=>un.isProcessing?un.timestamp:Dn.now()}},$N=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=e(o/(a-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Uf=2e4;function Rb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Uf;)t+=n,r=e.next(t);return t>=Uf?1/0:t}function D5(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(Rb(r),Uf);return{type:"keyframes",ease:o=>r.next(a*o).value/t,duration:$r(a)}}const I5=5;function qN(e,t,n){const r=Math.max(t-I5,0);return wN(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},GA=.001;function L5({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let a,o,l=1-t;l=Ni(It.minDamping,It.maxDamping,l),e=Ni(It.minDuration,It.maxDuration,$r(e)),l<1?(a=f=>{const m=f*l,y=m*e,g=m-n,v=Py(f,l),x=Math.exp(-y);return GA-g/v*x},o=f=>{const y=f*l*e,g=y*n+n,v=Math.pow(l,2)*Math.pow(f,2)*e,x=Math.exp(-y),S=Py(Math.pow(f,2),l);return(-a(f)+GA>0?-1:1)*((g-v)*x)/S}):(a=f=>{const m=Math.exp(-f*e),y=(f-n)*e+1;return-.001+m*y},o=f=>{const m=Math.exp(-f*e),y=(n-f)*(e*e);return m*y});const u=5/e,d=j5(a,o,u);if(e=Gr(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 M5=12;function j5(e,t,n){let r=n;for(let a=1;a<M5;a++)r=r-e(r)/t(r);return r}function Py(e,t){return e*Math.sqrt(1-t*t)}const P5=["duration","bounce"],V5=["stiffness","damping","mass"];function $A(e,t){return t.some(n=>e[n]!==void 0)}function B5(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!$A(e,V5)&&$A(e,P5))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,o=2*Ni(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:It.mass,stiffness:a,damping:o}}else{const n=L5(e);t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function Hf(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:y,velocity:g,isResolvedFromDuration:v}=B5({...n,velocity:-$r(n.velocity||0)}),x=g||0,S=f/(2*Math.sqrt(d*m)),A=l-o,w=$r(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=Py(w,S);R=M=>{const D=Math.exp(-S*w*M);return l-D*((x+S*w*A)/N*Math.sin(N*M)+A*Math.cos(N*M))}}else if(S===1)R=N=>l-Math.exp(-w*N)*(A+(x+w*A)*N);else{const N=w*Math.sqrt(S*S-1);R=M=>{const D=Math.exp(-S*w*M),L=Math.min(N*M,300);return l-D*((x+S*w*A)*Math.sinh(L)+N*A*Math.cosh(L))/N}}const O={calculatedDuration:v&&y||null,next:N=>{const M=R(N);if(v)u.done=N>=y;else{let D=N===0?x:0;S<1&&(D=N===0?Gr(x):qN(R,N,M));const L=Math.abs(D)<=r,V=Math.abs(l-M)<=a;u.done=L&&V}return u.value=u.done?l:M,u},toString:()=>{const N=Math.min(Rb(O),Uf),M=$N(D=>O.next(N*D).value,N,30);return N+"ms "+M},toTransition:()=>{}};return O}Hf.applyToOptions=e=>{const t=D5(e,100,Hf);return e.ease=t.ease,e.duration=Gr(t.duration),e.type="keyframes",e};function Vy({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 y=e[0],g={done:!1,value:y},v=L=>u!==void 0&&L<u||d!==void 0&&L>d,x=L=>u===void 0?d:d===void 0||Math.abs(u-L)<Math.abs(d-L)?u:d;let S=n*t;const A=y+S,w=l===void 0?A:l(A);w!==A&&(S=w-y);const T=L=>-S*Math.exp(-L/r),R=L=>w+T(L),O=L=>{const V=T(L),U=R(L);g.done=Math.abs(V)<=f,g.value=g.done?w:U};let N,M;const D=L=>{v(g.value)&&(N=L,M=Hf({keyframes:[g.value,x(g.value)],velocity:qN(R,L,g.value),damping:a,stiffness:o,restDelta:f,restSpeed:m}))};return D(0),{calculatedDuration:null,next:L=>{let V=!1;return!M&&N===void 0&&(V=!0,O(L),D(L)),N!==void 0&&L>=N?M.next(L-N):(!V&&O(L),g)}}}function z5(e,t,n){const r=[],a=n||ki.mix||GN,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]||dr:t;u=uu(d,u)}r.push(u)}return r}function U5(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(vb(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=z5(t,r,a),d=u.length,f=m=>{if(l&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const g=Mc(e[y],e[y+1],m);return u[y](g)};return n?m=>f(Ni(e[0],e[o-1],m)):f}function H5(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Mc(0,t,r);e.push(Tt(n,1,a))}}function F5(e){const t=[0];return H5(t,e.length-1),t}function G5(e,t){return e.map(n=>n*t)}function $5(e,t){return e.map(()=>t||LN).splice(0,e.length-1)}function xc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=n5(r)?r.map(BA):BA(r),o={done:!1,value:t[0]},l=G5(n&&n.length===t.length?n:F5(t),e),u=U5(l,t,{ease:Array.isArray(a)?a:$5(t,a)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const q5=e=>e!==null;function Nb(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(q5),u=a<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const K5={decay:Vy,inertia:Vy,tween:xc,keyframes:xc,spring:Hf};function KN(e){typeof e.type=="string"&&(e.type=K5[e.type])}class kb{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const W5=e=>e/100;class Ob extends kb{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,a;if(n){const{motionValue:o}=this.options;o&&o.updatedAt!==Dn.now()&&this.tick(Dn.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;KN(t);const{type:n=xc,repeat:r=0,repeatDelay:a=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const d=n||xc;d!==xc&&typeof u[0]!="number"&&(this.mixKeyframes=uu(W5,GN(u[0],u[1])),u=[0,100]);const f=d({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=Rb(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:m,repeat:y,repeatType:g,repeatDelay:v,type:x,onUpdate:S,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-f*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?w<0:w>a;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let R=this.currentTime,O=r;if(y){const L=Math.min(this.currentTime,a)/u;let V=Math.floor(L),U=L%1;!U&&L>=1&&(U=1),U===1&&V--,V=Math.min(V,y+1),!!(V%2)&&(g==="reverse"?(U=1-U,v&&(U-=v/u)):g==="mirror"&&(O=l)),R=Ni(0,1,U)*u}const N=T?{done:!1,value:m[0]}:O.next(R);o&&(N.value=o(N.value));let{done:M}=N;!T&&d!==null&&(M=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return D&&x!==Vy&&(N.value=Nb(m,this.options,A,this.speed)),S&&S(N.value),D&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return $r(this.calculatedDuration)}get time(){return $r(this.currentTime)}set time(t){var n;t=Gr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Dn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=$r(this.currentTime))}play(){var a,o;if(this.isStopped)return;const{driver:t=O5,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(a=this.options).onPlay)==null||o.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Dn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Y5(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ss=e=>e*180/Math.PI,By=e=>{const t=ss(Math.atan2(e[1],e[0]));return zy(t)},Z5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:By,rotateZ:By,skewX:e=>ss(Math.atan(e[1])),skewY:e=>ss(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zy=e=>(e=e%360,e<0&&(e+=360),e),qA=By,KA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),WA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),X5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KA,scaleY:WA,scale:e=>(KA(e)+WA(e))/2,rotateX:e=>zy(ss(Math.atan2(e[6],e[5]))),rotateY:e=>zy(ss(Math.atan2(-e[2],e[0]))),rotateZ:qA,rotate:qA,skewX:e=>ss(Math.atan(e[4])),skewY:e=>ss(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Uy(e){return e.includes("scale")?1:0}function Hy(e,t){if(!e||e==="none")return Uy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=X5,a=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Z5,a=u}if(!a)return Uy(t);const o=r[t],l=a[1].split(",").map(J5);return typeof o=="function"?o(l):l[o]}const Q5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hy(n,t)};function J5(e){return parseFloat(e.trim())}const Zo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xo=new Set(Zo),YA=e=>e===Yo||e===Ue,eG=new Set(["x","y","z"]),tG=Zo.filter(e=>!eG.has(e));function nG(e){const t=[];return tG.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const cs={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})=>Hy(t,"x"),y:(e,{transform:t})=>Hy(t,"y")};cs.translateX=cs.x;cs.translateY=cs.y;const us=new Set;let Fy=!1,Gy=!1,$y=!1;function WN(){if(Gy){const e=Array.from(us).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=nG(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.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gy=!1,Fy=!1,us.forEach(e=>e.complete($y)),us.clear()}function YN(){us.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gy=!0)})}function rG(){$y=!0,YN(),WN(),$y=!1}class Db{constructor(t,n,r,a,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(us.add(this),Fy||(Fy=!0,Rt.read(YN),Rt.resolveKeyframes(WN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const o=a==null?void 0:a.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),a&&o===void 0&&a.set(t[0])}Y5(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),us.delete(this)}cancel(){this.state==="scheduled"&&(us.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const iG=e=>e.startsWith("--");function aG(e,t,n){iG(t)?e.style.setProperty(t,n):e.style[t]=n}const sG=bb(()=>window.ScrollTimeline!==void 0),oG={};function lG(e,t){const n=bb(e);return()=>oG[t]??n()}const ZN=lG(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ZA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mc([0,.65,.55,1]),circOut:mc([.55,0,1,.45]),backIn:mc([.31,.01,.66,-.59]),backOut:mc([.33,1.53,.69,.99])};function XN(e,t){if(e)return typeof e=="function"?ZN()?$N(e,t):"ease-out":MN(e)?mc(e):Array.isArray(e)?e.map(n=>XN(n,t)||ZA.easeOut):ZA[e]}function cG(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:d}={},f=void 0){const m={[t]:n};d&&(m.offset=d);const y=XN(u,a);Array.isArray(y)&&(m.easing=y);const g={delay:r,duration:a,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(m,g)}function QN(e){return typeof e=="function"&&"applyToOptions"in e}function uG({type:e,...t}){return QN(e)&&ZN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class dG extends kb{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,vb(typeof t.type!="string");const f=uG(t);this.animation=cG(n,r,a,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Nb(a,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):aG(n,r,m),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return $r(Number(t))}get time(){return $r(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Gr(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&sG()?(this.animation.timeline=t,dr):n(this)}}const JN={anticipate:ON,backInOut:kN,circInOut:IN};function fG(e){return e in JN}function hG(e){typeof e.ease=="string"&&fG(e.ease)&&(e.ease=JN[e.ease])}const XA=10;class mG extends dG{constructor(t){hG(t),KN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Ob({...l,autoplay:!1}),d=Gr(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-XA).value,u.sample(d).value,XA),u.stop()}}const QA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(va.test(e)||e==="0")&&!e.startsWith("url("));function pG(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 gG(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=QA(a,t),u=QA(o,t);return!l||!u?!1:pG(e)||(n==="spring"||QN(n))&&r}function ek(e){return SN(e)&&"offsetHeight"in e}const yG=new Set(["opacity","clipPath","filter","transform"]),vG=bb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bG(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:l}=e;if(!ek((f=t==null?void 0:t.owner)==null?void 0:f.current))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return vG()&&n&&yG.has(n)&&(n!=="transform"||!d)&&!u&&!r&&a!=="mirror"&&o!==0&&l!=="inertia"}const _G=40;class xG extends kb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:d,motionValue:f,element:m,...y}){var x;super(),this.stop=()=>{var S,A;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=Dn.now();const g={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:o,repeatType:l,name:d,motionValue:f,element:m,...y},v=(m==null?void 0:m.KeyframeResolver)||Db;this.keyframeResolver=new v(u,(S,A,w)=>this.onKeyframesResolved(S,A,g,!w),d,f,m),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:d,isHandoff:f,onUpdate:m}=r;this.resolvedAt=Dn.now(),gG(t,o,l,u)||((ki.instantAnimations||!d)&&(m==null||m(Nb(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const g={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>_G?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!f&&bG(g)?new mG({...g,element:g.motionValue.owner.current}):new Ob(g);v.finished.then(()=>this.notifyFinished()).catch(dr),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),rG()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const EG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function SG(e){const t=EG.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function tk(e,t,n=1){const[r,a]=SG(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return EN(l)?parseFloat(l):l}return Ab(a)?tk(a,t,n+1):a}function Ib(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const nk=new Set(["width","height","top","left","right","bottom",...Zo]),AG={test:e=>e==="auto",parse:e=>e},rk=e=>t=>t.test(e),ik=[Yo,Ue,qr,sa,p5,m5,AG],JA=e=>ik.find(rk(e));function wG(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||AN(e):!0}const TG=new Set(["brightness","contrast","saturate","opacity"]);function CG(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wb)||[];if(!r)return e;const a=n.replace(r,"");let o=TG.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const RG=/\b([a-z-]*)\(.*?\)/gu,qy={...va,getAnimatableNone:e=>{const t=e.match(RG);return t?t.map(CG).join(" "):e}},ew={...Yo,transform:Math.round},NG={rotate:sa,rotateX:sa,rotateY:sa,rotateZ:sa,scale:Hd,scaleX:Hd,scaleY:Hd,scaleZ:Hd,skew:sa,skewX:sa,skewY:sa,distance:Ue,translateX:Ue,translateY:Ue,translateZ:Ue,x:Ue,y:Ue,z:Ue,perspective:Ue,transformPerspective:Ue,opacity:jc,originX:zA,originY:zA,originZ:Ue},Lb={borderWidth:Ue,borderTopWidth:Ue,borderRightWidth:Ue,borderBottomWidth:Ue,borderLeftWidth:Ue,borderRadius:Ue,radius:Ue,borderTopLeftRadius:Ue,borderTopRightRadius:Ue,borderBottomRightRadius:Ue,borderBottomLeftRadius:Ue,width:Ue,maxWidth:Ue,height:Ue,maxHeight:Ue,top:Ue,right:Ue,bottom:Ue,left:Ue,padding:Ue,paddingTop:Ue,paddingRight:Ue,paddingBottom:Ue,paddingLeft:Ue,margin:Ue,marginTop:Ue,marginRight:Ue,marginBottom:Ue,marginLeft:Ue,backgroundPositionX:Ue,backgroundPositionY:Ue,...NG,zIndex:ew,fillOpacity:jc,strokeOpacity:jc,numOctaves:ew},kG={...Lb,color:yn,backgroundColor:yn,outlineColor:yn,fill:yn,stroke:yn,borderColor:yn,borderTopColor:yn,borderRightColor:yn,borderBottomColor:yn,borderLeftColor:yn,filter:qy,WebkitFilter:qy},ak=e=>kG[e];function sk(e,t){let n=ak(e);return n!==qy&&(n=va),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const OG=new Set(["auto","none","0"]);function DG(e,t,n){let r=0,a;for(;r<e.length&&!a;){const o=e[r];typeof o=="string"&&!OG.has(o)&&Pc(o).values.length&&(a=e[r]),r++}if(a&&n)for(const o of t)e[o]=sk(n,a)}class IG extends Db{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(),Ab(f))){const m=tk(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!nk.has(r)||t.length!==2)return;const[a,o]=t,l=JA(a),u=JA(o);if(l!==u)if(YA(l)&&YA(u))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else cs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||wG(t[a]))&&r.push(a);r.length&&DG(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=cs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=cs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function LG(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const a=(n==null?void 0:n[e])??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const tw=30,MG=e=>!isNaN(parseFloat(e));class jG{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{var l,u;const o=Dn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty();a&&((u=this.events.renderRequest)==null||u.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=MG(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 _b);const r=this.events[t].add(n);return t==="change"?()=>{r(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>tw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tw);return wN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lo(e,t){return new jG(e,t)}const ok=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:Mb}=jN(queueMicrotask,!1),Sr={x:!1,y:!1};function lk(){return Sr.x||Sr.y}function PG(e){return e==="x"||e==="y"?Sr[e]?null:(Sr[e]=!0,()=>{Sr[e]=!1}):Sr.x||Sr.y?null:(Sr.x=Sr.y=!0,()=>{Sr.x=Sr.y=!1})}function ck(e,t){const n=LG(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function nw(e){return!(e.pointerType==="touch"||lk())}function VG(e,t,n={}){const[r,a,o]=ck(e,n),l=u=>{if(!nw(u))return;const{target:d}=u,f=t(d,u);if(typeof f!="function"||!d)return;const m=y=>{nw(y)&&(f(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,a)};return r.forEach(u=>{u.addEventListener("pointerenter",l,a)}),o}const uk=(e,t)=>t?e===t?!0:uk(e,t.parentElement):!1,jb=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,BG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zG(e){return BG.has(e.tagName)||e.tabIndex!==-1}const df=new WeakSet;function rw(e){return t=>{t.key==="Enter"&&e(t)}}function Lg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const UG=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=rw(()=>{if(df.has(n))return;Lg(n,"down");const a=rw(()=>{Lg(n,"up")}),o=()=>Lg(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 iw(e){return jb(e)&&!lk()}function HG(e,t,n={}){const[r,a,o]=ck(e,n),l=u=>{const d=u.currentTarget;if(!iw(u))return;df.add(d);const f=t(d,u),m=(v,x)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",g),df.has(d)&&df.delete(d),iw(v)&&typeof f=="function"&&f(v,{success:x})},y=v=>{m(v,d===window||d===document||n.useGlobalTarget||uk(d,v.target))},g=v=>{m(v,!1)};window.addEventListener("pointerup",y,a),window.addEventListener("pointercancel",g,a)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,a),ek(u)&&(u.addEventListener("focus",f=>UG(f,a)),!zG(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function dk(e){return SN(e)&&"ownerSVGElement"in e}function FG(e){return dk(e)&&e.tagName==="svg"}const bn=e=>!!(e&&e.getVelocity),GG=[...ik,yn,va],$G=e=>GG.find(rk(e)),fk=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function qG(e=!0){const t=E.useContext(pb);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]}const Pb=E.createContext({strict:!1}),aw={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"]},Mo={};for(const e in aw)Mo[e]={isEnabled:t=>aw[e].some(n=>!!t[n])};function Ky(e){for(const t in e)Mo[t]={...Mo[t],...e[t]}}function KG({children:e,features:t,strict:n=!1}){const[,r]=E.useState(!Mg(t)),a=E.useRef(void 0);if(!Mg(t)){const{renderer:o,...l}=t;a.current=o,Ky(l)}return E.useEffect(()=>{Mg(t)&&t().then(({renderer:o,...l})=>{Ky(l),a.current=o,r(!0)})},[]),b.jsx(Pb.Provider,{value:{renderer:a.current,strict:n},children:e})}function Mg(e){return typeof e=="function"}const WG=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 Ff(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||WG.has(e)}let hk=e=>!Ff(e);function YG(e){e&&(hk=t=>t.startsWith("on")?!Ff(t):e(t))}try{YG(require("@emotion/is-prop-valid").default)}catch{}function ZG(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(hk(a)||n===!0&&Ff(a)||!t&&!Ff(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function XG(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 Nh=E.createContext({});function kh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vc(e){return typeof e=="string"||Array.isArray(e)}const Vb=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bb=["initial",...Vb];function Oh(e){return kh(e.animate)||Bb.some(t=>Vc(e[t]))}function mk(e){return!!(Oh(e)||e.variants)}function QG(e,t){if(Oh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vc(n)?n:void 0,animate:Vc(r)?r:void 0}}return e.inherit!==!1?t:{}}function JG(e){const{initial:t,animate:n}=QG(e,E.useContext(Nh));return E.useMemo(()=>({initial:t,animate:n}),[sw(t),sw(n)])}function sw(e){return Array.isArray(e)?e.join(" "):e}const e$=Symbol.for("motionComponentSymbol");function go(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function t$(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):go(n)&&(n.current=r))},[t])}const zb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),n$="framerAppearId",pk="data-"+zb(n$),gk=E.createContext({});function r$(e,t,n,r,a){var S,A;const{visualElement:o}=E.useContext(Nh),l=E.useContext(Pb),u=E.useContext(pb),d=E.useContext(fk).reducedMotion,f=E.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const m=f.current,y=E.useContext(gk);m&&!m.projection&&a&&(m.type==="html"||m.type==="svg")&&i$(f.current,n,a,y);const g=E.useRef(!1);E.useInsertionEffect(()=>{m&&g.current&&m.update(n,u)});const v=n[pk],x=E.useRef(!!v&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,v)));return Y3(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Mb.render(m.render),x.current&&m.animationState&&m.animationState.animateChanges())}),E.useEffect(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,v)}),x.current=!1))}),m}function i$(e,t,n,r){const{layoutId:a,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:f,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yk(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:!!l||u&&go(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:f})}function yk(e){if(e)return e.options.allowProjection!==!1?e.projection:yk(e.parent)}function a$({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&Ky(e);function o(u,d){let f;const m={...E.useContext(fk),...u,layoutId:s$(u)},{isStatic:y}=m,g=JG(u),v=r(u,y);if(!y&&mb){o$();const x=l$(m);f=x.MeasureLayout,g.visualElement=r$(a,v,m,t,x.ProjectionNode)}return b.jsxs(Nh.Provider,{value:g,children:[f&&g.visualElement?b.jsx(f,{visualElement:g.visualElement,...m}):null,n(a,u,t$(v,g.visualElement,d),v,y,g.visualElement)]})}o.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const l=E.forwardRef(o);return l[e$]=a,l}function s$({layoutId:e}){const t=E.useContext(xN).id;return t&&e!==void 0?t+"-"+e:e}function o$(e,t){E.useContext(Pb).strict}function l$(e){const{drag:t,layout:n}=Mo;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 Bc={};function c$(e){for(const t in e)Bc[t]=e[t],Sb(t)&&(Bc[t].isCSSVariable=!0)}function vk(e,{layout:t,layoutId:n}){return Xo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Bc[e]||e==="opacity")}const u$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d$=Zo.length;function f$(e,t,n){let r="",a=!0;for(let o=0;o<d$;o++){const l=Zo[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=ok(u,Lb[l]);if(!d){a=!1;const m=u$[l]||l;r+=`${m}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function Ub(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(Xo.has(d)){l=!0;continue}else if(Sb(d)){a[d]=f;continue}else{const m=ok(f,Lb[d]);d.startsWith("origin")?(u=!0,o[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=f$(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 Hb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bk(e,t,n){for(const r in t)!bn(t[r])&&!vk(r,n)&&(e[r]=t[r])}function h$({transformTemplate:e},t){return E.useMemo(()=>{const n=Hb();return Ub(n,t,e),Object.assign({},n.vars,n.style)},[t])}function m$(e,t){const n=e.style||{},r={};return bk(r,n,e),Object.assign(r,h$(e,t)),r}function p$(e,t){const n={},r=m$(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 g$={offset:"stroke-dashoffset",array:"stroke-dasharray"},y$={offset:"strokeDashoffset",array:"strokeDasharray"};function v$(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?g$:y$;e[o.offset]=Ue.transform(-r);const l=Ue.transform(t),u=Ue.transform(n);e[o.array]=`${l} ${u}`}function _k(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...u},d,f,m){if(Ub(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:g}=e;y.transform&&(g.transform=y.transform,delete y.transform),(g.transform||y.transformOrigin)&&(g.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),g.transform&&(g.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete y.transformBox),t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),r!==void 0&&(y.scale=r),a!==void 0&&v$(y,a,o,l,!1)}const xk=()=>({...Hb(),attrs:{}}),Ek=e=>typeof e=="string"&&e.toLowerCase()==="svg";function b$(e,t,n,r){const a=E.useMemo(()=>{const o=xk();return _k(o,t,Ek(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};bk(o,e.style,e),a.style={...o,...a.style}}return a}const _$=["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 Fb(e){return typeof e!="string"||e.includes("-")?!1:!!(_$.indexOf(e)>-1||/[A-Z]/u.test(e))}function x$(e=!1){return(n,r,a,{latestValues:o},l)=>{const d=(Fb(n)?b$:p$)(r,o,l,n),f=ZG(r,typeof n=="string",e),m=n!==E.Fragment?{...f,...d,ref:a}:{},{children:y}=r,g=E.useMemo(()=>bn(y)?y.get():y,[y]);return E.createElement(n,{...m,children:g})}}function ow(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Gb(e,t,n,r){if(typeof t=="function"){const[a,o]=ow(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]=ow(r);t=t(n!==void 0?n:e.custom,a,o)}return t}function ff(e){return bn(e)?e.get():e}function E$({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:S$(n,r,a,e),renderState:t()}}const Sk=e=>(t,n)=>{const r=E.useContext(Nh),a=E.useContext(pb),o=()=>E$(e,t,r,a);return n?o():W3(o)};function S$(e,t,n,r){const a={},o=r(e,{});for(const g in o)a[g]=ff(o[g]);let{initial:l,animate:u}=e;const d=Oh(e),f=mk(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 y=m?u:l;if(y&&typeof y!="boolean"&&!kh(y)){const g=Array.isArray(y)?y:[y];for(let v=0;v<g.length;v++){const x=Gb(e,g[v]);if(x){const{transitionEnd:S,transition:A,...w}=x;for(const T in w){let R=w[T];if(Array.isArray(R)){const O=m?R.length-1:0;R=R[O]}R!==null&&(a[T]=R)}for(const T in S)a[T]=S[T]}}}return a}function $b(e,t,n){var o;const{style:r}=e,a={};for(const l in r)(bn(r[l])||t.style&&bn(t.style[l])||vk(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=r[l]);return a}const A$={useVisualState:Sk({scrapeMotionValuesFromProps:$b,createRenderState:Hb})};function Ak(e,t,n){const r=$b(e,t,n);for(const a in e)if(bn(e[a])||bn(t[a])){const o=Zo.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[o]=e[a]}return r}const w$={useVisualState:Sk({scrapeMotionValuesFromProps:Ak,createRenderState:xk})};function T$(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const l={...Fb(r)?w$:A$,preloadedFeatures:e,useRender:x$(a),createVisualElement:t,Component:r};return a$(l)}}function zc(e,t,n){const r=e.getProps();return Gb(r,t,n!==void 0?n:r.custom,e)}const Wy=e=>Array.isArray(e);function C$(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lo(n))}function R$(e){return Wy(e)?e[e.length-1]||0:e}function N$(e,t){const n=zc(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const l in o){const u=R$(o[l]);C$(e,l,u)}}function k$(e){return!!(bn(e)&&e.add)}function Yy(e,t){const n=e.getValue("willChange");if(k$(n))return n.add(t);if(!n&&ki.WillChange){const r=new ki.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function wk(e){return e.props[pk]}const O$=e=>e!==null;function D$(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(O$),o=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[o]}const I$={type:"spring",stiffness:500,damping:25,restSpeed:10},L$=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),M$={type:"keyframes",duration:.8},j$={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},P$=(e,{keyframes:t})=>t.length>2?M$:Xo.has(e)?e.startsWith("scale")?L$(t[1]):I$:j$;function V$({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 qb=(e,t,n,r={},a,o)=>l=>{const u=Ib(r,e)||{},d=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Gr(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:g=>{t.set(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:a};V$(u)||Object.assign(m,P$(e,m)),m.duration&&(m.duration=Gr(m.duration)),m.repeatDelay&&(m.repeatDelay=Gr(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(y=!0)),(ki.instantAnimations||ki.skipAnimations)&&(y=!0,m.duration=0,m.delay=0),m.allowFlatten=!u.type&&!u.ease,y&&!o&&t.get()!==void 0){const g=D$(m.keyframes,u);if(g!==void 0){Rt.update(()=>{m.onUpdate(g),m.onComplete()});return}}return u.isSync?new Ob(m):new xG(m)};function B$({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Tk(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(o=r);const d=[],f=a&&e.animationState&&e.animationState.getState()[a];for(const m in u){const y=e.getValue(m,e.latestValues[m]??null),g=u[m];if(g===void 0||f&&B$(f,m))continue;const v={delay:n,...Ib(o||{},m)},x=y.get();if(x!==void 0&&!y.isAnimating&&!Array.isArray(g)&&g===x&&!v.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const w=wk(e);if(w){const T=window.MotionHandoffAnimation(w,m,Rt);T!==null&&(v.startTime=T,S=!0)}}Yy(e,m),y.start(qb(m,y,g,e.shouldReduceMotion&&nk.has(m)?{type:!1}:v,e,S));const A=y.animation;A&&d.push(A)}return l&&Promise.all(d).then(()=>{Rt.update(()=>{l&&N$(e,l)})}),d}function Zy(e,t,n={}){var d;const r=zc(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(Tk(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=a;return z$(e,t,m+f,y,g,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[f,m]=u==="beforeChildren"?[o,l]:[l,o];return f().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function z$(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(U$).forEach((f,m)=>{f.notify("AnimationStart",t),l.push(Zy(f,t,{...o,delay:n+d(m)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function U$(e,t){return e.sortNodePosition(t)}function H$(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(o=>Zy(e,o,n));r=Promise.all(a)}else if(typeof t=="string")r=Zy(e,t,n);else{const a=typeof t=="function"?zc(e,t,n.custom):t;r=Promise.all(Tk(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Ck(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 F$=Bb.length;function Rk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Rk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<F$;n++){const r=Bb[n],a=e.props[r];(Vc(a)||a===!1)&&(t[r]=a)}return t}const G$=[...Vb].reverse(),$$=Vb.length;function q$(e){return t=>Promise.all(t.map(({animation:n,options:r})=>H$(e,n,r)))}function K$(e){let t=q$(e),n=lw(),r=!0;const a=d=>(f,m)=>{var g;const y=zc(e,m,d==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(y){const{transition:v,transitionEnd:x,...S}=y;f={...f,...S,...x}}return f};function o(d){t=d(e)}function l(d){const{props:f}=e,m=Rk(e.parent)||{},y=[],g=new Set;let v={},x=1/0;for(let A=0;A<$$;A++){const w=G$[A],T=n[w],R=f[w]!==void 0?f[w]:m[w],O=Vc(R),N=w===d?T.isActive:null;N===!1&&(x=A);let M=R===m[w]&&R!==f[w]&&O;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),T.protectedKeys={...v},!T.isActive&&N===null||!R&&!T.prevProp||kh(R)||typeof R=="boolean")continue;const D=W$(T.prevProp,R);let L=D||w===d&&T.isActive&&!M&&O||A>x&&O,V=!1;const U=Array.isArray(R)?R:[R];let ce=U.reduce(a(w),{});N===!1&&(ce={});const{prevResolvedValues:ie={}}=T,de={...ie,...ce},X=ne=>{L=!0,g.has(ne)&&(V=!0,g.delete(ne)),T.needsAnimating[ne]=!0;const q=e.getValue(ne);q&&(q.liveStyle=!1)};for(const ne in de){const q=ce[ne],ye=ie[ne];if(v.hasOwnProperty(ne))continue;let P=!1;Wy(q)&&Wy(ye)?P=!Ck(q,ye):P=q!==ye,P?q!=null?X(ne):g.add(ne):q!==void 0&&g.has(ne)?X(ne):T.protectedKeys[ne]=!0}T.prevProp=R,T.prevResolvedValues=ce,T.isActive&&(v={...v,...ce}),r&&e.blockInitialAnimation&&(L=!1),L&&(!(M&&D)||V)&&y.push(...U.map(ne=>({animation:ne,options:{type:w}})))}if(g.size){const A={};if(typeof f.initial!="boolean"){const w=zc(e,Array.isArray(f.initial)?f.initial[0]:f.initial);w&&w.transition&&(A.transition=w.transition)}g.forEach(w=>{const T=e.getBaseTarget(w),R=e.getValue(w);R&&(R.liveStyle=!0),A[w]=T??null}),y.push({animation:A})}let S=!!y.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(y):Promise.resolve()}function u(d,f){var y;if(n[d].isActive===f)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(d,f)}),n[d].isActive=f;const m=l(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=lw(),r=!0}}}function W$(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ck(t,e):!1}function es(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lw(){return{animate:es(!0),whileInView:es(),whileHover:es(),whileTap:es(),whileDrag:es(),whileFocus:es(),exit:es()}}class Ta{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Y$ extends Ta{constructor(t){super(t),t.animationState||(t.animationState=K$(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.call(this)}}let Z$=0;class X$ extends Ta{constructor(){super(...arguments),this.id=Z$++}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 Nk={animation:{Feature:Y$},exit:{Feature:X$}};function Uc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hu(e){return{point:{x:e.pageX,y:e.pageY}}}const Q$=e=>t=>jb(t)&&e(t,hu(t));function Ec(e,t,n,r){return Uc(e,t,Q$(n),r)}function kk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function J$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function e6(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 Ok=1e-4,t6=1-Ok,n6=1+Ok,Dk=.01,r6=0-Dk,i6=0+Dk;function wn(e){return e.max-e.min}function a6(e,t,n){return Math.abs(e-t)<=n}function cw(e,t,n,r=.5){e.origin=r,e.originPoint=Tt(t.min,t.max,e.origin),e.scale=wn(n)/wn(t),e.translate=Tt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=t6&&e.scale<=n6||isNaN(e.scale))&&(e.scale=1),(e.translate>=r6&&e.translate<=i6||isNaN(e.translate))&&(e.translate=0)}function Sc(e,t,n,r){cw(e.x,t.x,n.x,r?r.originX:void 0),cw(e.y,t.y,n.y,r?r.originY:void 0)}function uw(e,t,n){e.min=n.min+t.min,e.max=e.min+wn(t)}function s6(e,t,n){uw(e.x,t.x,n.x),uw(e.y,t.y,n.y)}function dw(e,t,n){e.min=t.min-n.min,e.max=e.min+wn(t)}function Ac(e,t,n){dw(e.x,t.x,n.x),dw(e.y,t.y,n.y)}const fw=()=>({translate:0,scale:1,origin:0,originPoint:0}),yo=()=>({x:fw(),y:fw()}),hw=()=>({min:0,max:0}),Mt=()=>({x:hw(),y:hw()});function or(e){return[e("x"),e("y")]}function jg(e){return e===void 0||e===1}function Xy({scale:e,scaleX:t,scaleY:n}){return!jg(e)||!jg(t)||!jg(n)}function ts(e){return Xy(e)||Ik(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ik(e){return mw(e.x)||mw(e.y)}function mw(e){return e&&e!=="0%"}function Gf(e,t,n){const r=e-n,a=t*r;return n+a}function pw(e,t,n,r,a){return a!==void 0&&(e=Gf(e,a,r)),Gf(e,n,r)+t}function Qy(e,t=0,n=1,r,a){e.min=pw(e.min,t,n,r,a),e.max=pw(e.max,t,n,r,a)}function Lk(e,{x:t,y:n}){Qy(e.x,t.translate,t.scale,t.originPoint),Qy(e.y,n.translate,n.scale,n.originPoint)}const gw=.999999999999,yw=1.0000000000001;function o6(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&&bo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Lk(e,l)),r&&ts(o.latestValues)&&bo(e,o.latestValues))}t.x<yw&&t.x>gw&&(t.x=1),t.y<yw&&t.y>gw&&(t.y=1)}function vo(e,t){e.min=e.min+t,e.max=e.max+t}function vw(e,t,n,r,a=.5){const o=Tt(e.min,e.max,a);Qy(e,t,n,o,r)}function bo(e,t){vw(e.x,t.x,t.scaleX,t.scale,t.originX),vw(e.y,t.y,t.scaleY,t.scale,t.originY)}function Mk(e,t){return kk(e6(e.getBoundingClientRect(),t))}function l6(e,t,n){const r=Mk(e,n),{scroll:a}=t;return a&&(vo(r.x,a.offset.x),vo(r.y,a.offset.y)),r}const jk=({current:e})=>e?e.ownerDocument.defaultView:null,bw=(e,t)=>Math.abs(e-t);function c6(e,t){const n=bw(e.x,t.x),r=bw(e.y,t.y);return Math.sqrt(n**2+r**2)}class Pk{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 y=Vg(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=c6(y.offset,{x:0,y:0})>=3;if(!g&&!v)return;const{point:x}=y,{timestamp:S}=un;this.history.push({...x,timestamp:S});const{onStart:A,onMove:w}=this.handlers;g||(A&&A(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,y)},this.handlePointerMove=(y,g)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Pg(g,this.transformPagePoint),Rt.update(this.updatePoint,!0)},this.handlePointerUp=(y,g)=>{this.end();const{onEnd:v,onSessionEnd:x,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=Vg(y.type==="pointercancel"?this.lastMoveEventInfo:Pg(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(y,A),x&&x(y,A)},!jb(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const l=hu(t),u=Pg(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=un;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,Vg(u,this.history)),this.removeListeners=uu(Ec(this.contextWindow,"pointermove",this.handlePointerMove),Ec(this.contextWindow,"pointerup",this.handlePointerUp),Ec(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ya(this.updatePoint)}}function Pg(e,t){return t?{point:t(e.point)}:e}function _w(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vg({point:e},t){return{point:e,delta:_w(e,Vk(t)),offset:_w(e,u6(t)),velocity:d6(t,.1)}}function u6(e){return e[0]}function Vk(e){return e[e.length-1]}function d6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=Vk(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Gr(t)));)n--;if(!r)return{x:0,y:0};const o=$r(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 f6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Tt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Tt(n,e,r.max):Math.min(e,n)),e}function xw(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 h6(e,{top:t,left:n,bottom:r,right:a}){return{x:xw(e.x,n,a),y:xw(e.y,t,r)}}function Ew(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 m6(e,t){return{x:Ew(e.x,t.x),y:Ew(e.y,t.y)}}function p6(e,t){let n=.5;const r=wn(e),a=wn(t);return a>r?n=Mc(t.min,t.max-r,e.min):r>a&&(n=Mc(e.min,e.max-a,t.min)),Ni(0,1,n)}function g6(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 Jy=.35;function y6(e=Jy){return e===!1?e=0:e===!0&&(e=Jy),{x:Sw(e,"left","right"),y:Sw(e,"top","bottom")}}function Sw(e,t,n){return{min:Aw(e,t),max:Aw(e,n)}}function Aw(e,t){return typeof e=="number"?e:e[t]||0}const v6=new WeakMap;class b6{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=Mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hu(m).point)},o=(m,y)=>{const{drag:g,dragPropagation:v,onDragStart:x}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=PG(g),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),or(A=>{let w=this.getAxisMotionValue(A).get()||0;if(qr.test(w)){const{projection:T}=this.visualElement;if(T&&T.layout){const R=T.layout.layoutBox[A];R&&(w=wn(R)*(parseFloat(w)/100))}}this.originPoint[A]=w}),x&&Rt.postRender(()=>x(m,y)),Yy(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},l=(m,y)=>{const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:x,onDrag:S}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:A}=y;if(v&&this.currentDirection===null){this.currentDirection=_6(A),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",y.point,A),this.updateAxis("y",y.point,A),this.visualElement.render(),S&&S(m,y)},u=(m,y)=>this.stop(m,y),d=()=>or(m=>{var y;return this.getAnimationState(m)==="paused"&&((y=this.getAxisMotionValue(m).animation)==null?void 0:y.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new Pk(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:jk(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&&Rt.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||!Fd(t,a,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=f6(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,a=this.constraints;t&&go(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=h6(r.layoutBox,t):this.constraints=!1,this.elastic=y6(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&or(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=g6(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!go(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const o=l6(r,a.root,this.visualElement.getTransformPagePoint());let l=m6(a.layout.layoutBox,o);if(n){const u=n(J$(l));this.hasMutatedConstraints=!!u,u&&(l=kk(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},f=or(m=>{if(!Fd(m,n,this.currentDirection))return;let y=d&&d[m]||{};l&&(y={min:0,max:0});const g=a?200:1e6,v=a?40:1e7,x={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Yy(this.visualElement,t),r.start(qb(t,r,0,n,this.visualElement,!1))}stopAnimation(){or(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){or(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){or(n=>{const{drag:r}=this.getProps();if(!Fd(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]-Tt(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!go(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};or(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();a[l]=p6({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(),or(l=>{if(!Fd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];u.set(Tt(d,f,a[l]))})}addListeners(){if(!this.visualElement.current)return;v6.set(this.visualElement,this);const t=this.visualElement.current,n=Ec(t,"pointerdown",d=>{const{drag:f,dragListener:m=!0}=this.getProps();f&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();go(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()),Rt.read(r);const l=Uc(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&(or(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:o=!1,dragElastic:l=Jy,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Fd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class x6 extends Ta{constructor(t){super(t),this.removeGroupControls=dr,this.removeListeners=dr,this.controls=new b6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dr}unmount(){this.removeGroupControls(),this.removeListeners()}}const ww=e=>(t,n)=>{e&&Rt.postRender(()=>e(t,n))};class E6 extends Ta{constructor(){super(...arguments),this.removePointerDownListener=dr}onPointerDown(t){this.session=new Pk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jk(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:ww(t),onStart:ww(n),onMove:r,onEnd:(o,l)=>{delete this.session,a&&Rt.postRender(()=>a(o,l))}}}mount(){this.removePointerDownListener=Ec(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 hf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const sc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ue.test(e))e=parseFloat(e);else return e;const n=Tw(e,t.target.x),r=Tw(e,t.target.y);return`${n}% ${r}%`}},S6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=va.parse(e);if(a.length>5)return r;const o=va.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=Tt(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 A6 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:o}=t;c$(w6),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()})),hf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:o}=this.props,{projection:l}=r;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()||Rt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mb.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 Bk(e){const[t,n]=qG(),r=E.useContext(xN);return b.jsx(A6,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(gk),isPresent:t,safeToRemove:n})}const w6={borderRadius:{...sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sc,borderTopRightRadius:sc,borderBottomLeftRadius:sc,borderBottomRightRadius:sc,boxShadow:S6};function T6(e,t,n){const r=bn(e)?e:Lo(e);return r.start(qb("",r,t,n)),r.animation}const C6=(e,t)=>e.depth-t.depth;class R6{constructor(){this.children=[],this.isDirty=!1}add(t){gb(this.children,t),this.isDirty=!0}remove(t){yb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(C6),this.isDirty=!1,this.children.forEach(t)}}function N6(e,t){const n=Dn.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(ya(r),e(o-t))};return Rt.setup(r,!0),()=>ya(r)}const zk=["TopLeft","TopRight","BottomLeft","BottomRight"],k6=zk.length,Cw=e=>typeof e=="string"?parseFloat(e):e,Rw=e=>typeof e=="number"||Ue.test(e);function O6(e,t,n,r,a,o){a?(e.opacity=Tt(0,n.opacity??1,D6(r)),e.opacityExit=Tt(t.opacity??1,0,I6(r))):o&&(e.opacity=Tt(t.opacity??1,n.opacity??1,r));for(let l=0;l<k6;l++){const u=`border${zk[l]}Radius`;let d=Nw(t,u),f=Nw(n,u);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Rw(d)===Rw(f)?(e[u]=Math.max(Tt(Cw(d),Cw(f),r),0),(qr.test(f)||qr.test(d))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=Tt(t.rotate||0,n.rotate||0,r))}function Nw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const D6=Uk(0,.5,DN),I6=Uk(.5,.95,dr);function Uk(e,t,n){return r=>r<e?0:r>t?1:n(Mc(e,t,r))}function kw(e,t){e.min=t.min,e.max=t.max}function ar(e,t){kw(e.x,t.x),kw(e.y,t.y)}function Ow(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dw(e,t,n,r,a){return e-=t,e=Gf(e,1/n,r),a!==void 0&&(e=Gf(e,1/a,r)),e}function L6(e,t=0,n=1,r=.5,a,o=e,l=e){if(qr.test(t)&&(t=parseFloat(t),t=Tt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Tt(o.min,o.max,r);e===o&&(u-=t),e.min=Dw(e.min,t,n,u,a),e.max=Dw(e.max,t,n,u,a)}function Iw(e,t,[n,r,a],o,l){L6(e,t[n],t[r],t[a],t.scale,o,l)}const M6=["x","scaleX","originX"],j6=["y","scaleY","originY"];function Lw(e,t,n,r){Iw(e.x,t,M6,n?n.x:void 0,r?r.x:void 0),Iw(e.y,t,j6,n?n.y:void 0,r?r.y:void 0)}function Mw(e){return e.translate===0&&e.scale===1}function Hk(e){return Mw(e.x)&&Mw(e.y)}function jw(e,t){return e.min===t.min&&e.max===t.max}function P6(e,t){return jw(e.x,t.x)&&jw(e.y,t.y)}function Pw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Fk(e,t){return Pw(e.x,t.x)&&Pw(e.y,t.y)}function Vw(e){return wn(e.x)/wn(e.y)}function Bw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class V6{constructor(){this.members=[]}add(t){gb(this.members,t),t.scheduleRender()}remove(t){if(yb(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 B6(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:y,rotateY:g,skewX:v,skewY:x}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),y&&(r+=`rotateX(${y}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),x&&(r+=`skewY(${x}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 Bg=["","X","Y","Z"],z6={visibility:"hidden"},U6=1e3;let H6=0;function zg(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Gk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Rt,!(a||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Gk(r)}function $k({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(l={},u=t==null?void 0:t()){this.id=H6++,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($6),this.nodes.forEach(Z6),this.nodes.forEach(X6),this.nodes.forEach(q6)},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 R6)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new _b),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=dk(l)&&!FG(l),this.instance=l;const{layoutId:u,layout:d,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const y=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=N6(y,250),hf.hasAnimatedSinceResize&&(hf.hasAnimatedSinceResize=!1,this.nodes.forEach(Uw))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||n8,{onLayoutAnimationStart:S,onLayoutAnimationComplete:A}=f.getProps(),w=!this.targetLayout||!Fk(this.targetLayout,v),T=!y&&g;if(this.options.layoutRoot||this.resumeFrom||T||y&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,T);const R={...Ib(x,"layout"),onPlay:S,onComplete:A};(f.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R)}else y||Uw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ya(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(Q6),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&&Gk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const 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(zw);return}this.isUpdating||this.nodes.forEach(W6),this.isUpdating=!1,this.nodes.forEach(Y6),this.nodes.forEach(F6),this.nodes.forEach(G6),this.clearAllSnapshots();const u=Dn.now();un.delta=Ni(0,1e3/60,u-un.timestamp),un.timestamp=u,un.isProcessing=!0,kg.update.process(un),kg.preRender.process(un),kg.render.process(un),un.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(K6),this.sharedNodes.forEach(J6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wn(this.snapshot.measuredBox.x)&&!wn(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=Mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!Hk(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&this.instance&&(u||ts(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)),r8(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return Mt();const u=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(i8))){const{scroll:m}=this.root;m&&(vo(u.x,m.offset.x),vo(u.y,m.offset.y))}return u}removeElementScroll(l){var d;const u=Mt();if(ar(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:y,options:g}=m;m!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&ar(u,l),vo(u.x,y.offset.x),vo(u.y,y.offset.y))}return u}applyTransform(l,u=!1){const d=Mt();ar(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&&bo(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),ts(m.latestValues)&&bo(d,m.latestValues)}return ts(this.latestValues)&&bo(d,this.latestValues),d}removeTransform(l){const u=Mt();ar(u,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!ts(f.latestValues))continue;Xy(f.latestValues)&&f.updateSnapshot();const m=Mt(),y=f.measurePageBox();ar(m,y),Lw(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,m)}return ts(this.latestValues)&&Lw(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!==un.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var g;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!(!this.layout||!(m||y))){if(this.resolvedRelativeTargetAt=un.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mt(),this.relativeTargetOrigin=Mt(),Ac(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),ar(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Mt(),this.targetWithTransforms=Mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ar(this.target,this.layout.layoutBox),Lk(this.target,this.targetDelta)):ar(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=Mt(),this.relativeTargetOrigin=Mt(),Ac(this.relativeTargetOrigin,this.target,v.target),ar(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Xy(this.parent.latestValues)||Ik(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 x;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===un.timestamp&&(d=!1),d)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;ar(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,g=this.treeScale.y;o6(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Mt());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ow(this.prevProjectionDelta.x,this.projectionDelta.x),Ow(this.prevProjectionDelta.y,this.projectionDelta.y)),Sc(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==g||!Bw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yo(),this.projectionDelta=yo(),this.projectionDeltaWithTransform=yo()}setAnimationOrigin(l,u=!1){const d=this.snapshot,f=d?d.latestValues:{},m={...this.latestValues},y=yo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const g=Mt(),v=d?d.source:void 0,x=this.layout?this.layout.source:void 0,S=v!==x,A=this.getStack(),w=!A||A.members.length<=1,T=!!(S&&!w&&this.options.crossfade===!0&&!this.path.some(t8));this.animationProgress=0;let R;this.mixTargetDelta=O=>{const N=O/1e3;Hw(y.x,l.x,N),Hw(y.y,l.y,N),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ac(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),e8(this.relativeTarget,this.relativeTargetOrigin,g,N),R&&P6(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Mt()),ar(R,this.relativeTarget)),S&&(this.animationValues=m,O6(m,f,this.latestValues,N,T,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,f;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(!1),(f=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||f.stop(!1),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rt.update(()=>{hf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Lo(0)),this.currentAnimation=T6(this.motionValue,[0,1e3],{...l,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(U6),this.currentAnimation.stop(!1)),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&&qk(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||Mt();const y=wn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const g=wn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+g}ar(u,d),bo(u,m),Sc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new V6),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 u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const 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&&zg("z",l,f,this.animationValues);for(let m=0;m<Bg.length;m++)zg(`rotate${Bg[m]}`,l,f,this.animationValues),zg(`skew${Bg[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){if(!this.instance||this.isSVG)return;if(!this.isVisible)return z6;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ff(l==null?void 0:l.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=ff(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ts(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=B6(this.projectionDeltaWithTransform,this.treeScale,m),d&&(u.transform=d(m,u.transform));const{x:y,y:g}=this.projectionDelta;u.transformOrigin=`${y.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const v in Bc){if(m[v]===void 0)continue;const{correct:x,applyTo:S,isCSSVariable:A}=Bc[v],w=u.transform==="none"?m[v]:x(m[v],f);if(S){const T=S.length;for(let R=0;R<T;R++)u[S[R]]=w}else A?this.options.visualElement.renderState.vars[v]=w:u[v]=w}return this.options.layoutId&&(u.pointerEvents=f===this?ff(l==null?void 0:l.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop(!1)}),this.root.nodes.forEach(zw),this.root.sharedNodes.clear()}}}function F6(e){e.updateLayout()}function G6(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?or(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=wn(g);g.min=r[y].min,g.max=g.min+v}):qk(o,t.layoutBox,r)&&or(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=wn(r[y]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+v)});const u=yo();Sc(u,r,t.layoutBox);const d=yo();l?Sc(d,e.applyTransform(a,!0),t.measuredBox):Sc(d,r,t.layoutBox);const f=!Hk(u);let m=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:v}=y;if(g&&v){const x=Mt();Ac(x,t.layoutBox,g.layoutBox);const S=Mt();Ac(S,r,v.layoutBox),Fk(x,S)||(m=!0),y.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=x,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,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 $6(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 q6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function K6(e){e.clearSnapshot()}function zw(e){e.clearMeasurements()}function W6(e){e.isLayoutDirty=!1}function Y6(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Z6(e){e.resolveTargetDelta()}function X6(e){e.calcProjection()}function Q6(e){e.resetSkewAndRotation()}function J6(e){e.removeLeadSnapshot()}function Hw(e,t,n){e.translate=Tt(t.translate,0,n),e.scale=Tt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fw(e,t,n,r){e.min=Tt(t.min,n.min,r),e.max=Tt(t.max,n.max,r)}function e8(e,t,n,r){Fw(e.x,t.x,n.x,r),Fw(e.y,t.y,n.y,r)}function t8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const n8={duration:.45,ease:[.4,0,.1,1]},Gw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$w=Gw("applewebkit/")&&!Gw("chrome/")?Math.round:dr;function qw(e){e.min=$w(e.min),e.max=$w(e.max)}function r8(e){qw(e.x),qw(e.y)}function qk(e,t,n){return e==="position"||e==="preserve-aspect"&&!a6(Vw(t),Vw(n),.2)}function i8(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const a8=$k({attachResizeListener:(e,t)=>Uc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ug={current:void 0},Kk=$k({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ug.current){const e=new a8({});e.mount(window),e.setOptions({layoutScroll:!0}),Ug.current=e}return Ug.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),s8={pan:{Feature:E6},drag:{Feature:x6,ProjectionNode:Kk,MeasureLayout:Bk}};function Kw(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&&Rt.postRender(()=>o(t,hu(t)))}class o8 extends Ta{mount(){const{current:t}=this.node;t&&(this.unmount=VG(t,(n,r)=>(Kw(this.node,r,"Start"),a=>Kw(this.node,a,"End"))))}unmount(){}}class l8 extends Ta{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=uu(Uc(this.node.current,"focus",()=>this.onFocus()),Uc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ww(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&&Rt.postRender(()=>o(t,hu(t)))}class c8 extends Ta{mount(){const{current:t}=this.node;t&&(this.unmount=HG(t,(n,r)=>(Ww(this.node,r,"Start"),(a,{success:o})=>Ww(this.node,a,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ev=new WeakMap,Hg=new WeakMap,u8=e=>{const t=ev.get(e.target);t&&t(e)},d8=e=>{e.forEach(u8)};function f8({root:e,...t}){const n=e||document;Hg.has(n)||Hg.set(n,{});const r=Hg.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(d8,{root:e,...t})),r[a]}function h8(e,t,n){const r=f8(t);return ev.set(e,n),r.observe(e),()=>{ev.delete(e),r.unobserve(e)}}const m8={some:0,all:1};class p8 extends Ta{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:m8[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:y}=this.node.getProps(),g=f?m:y;g&&g(d)};return h8(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(g8(t,n))&&this.startObserver()}unmount(){}}function g8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Wk={inView:{Feature:p8},tap:{Feature:c8},focus:{Feature:l8},hover:{Feature:o8}},y8={layout:{ProjectionNode:Kk,MeasureLayout:Bk}},tv={current:null},Yk={current:!1};function v8(){if(Yk.current=!0,!!mb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tv.current=e.matches;e.addListener(t),t()}else tv.current=!1}const b8=new WeakMap;function _8(e,t,n){for(const r in t){const a=t[r],o=n[r];if(bn(a))e.addValue(r,a);else if(bn(o))e.addValue(r,Lo(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,Lo(l!==void 0?l:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Yw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class x8{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=Db,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Dn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Rt.render(this.render,!1,!0))};const{latestValues:d,renderState:f}=l;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=Oh(n),this.isVariantNode=mk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in y){const v=y[g];d[g]!==void 0&&bn(v)&&v.set(d[g],!1)}}mount(t){this.current=t,b8.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)),Yk.current||v8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:tv.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(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=Xo.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Rt.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 Mo){const n=Mo[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):Mt()}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<Yw.length;r++){const a=Yw[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=_8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Lo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(EN(r)||AN(r))?r=parseFloat(r):!$G(r)&&va.test(n)&&(r=sk(t,n)),this.setBaseTarget(t,bn(r)?r.get():r)),bn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=Gb(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!bn(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _b),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Zk extends x8{constructor(){super(...arguments),this.KeyframeResolver=IG}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;bn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Xk(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])}function E8(e){return window.getComputedStyle(e)}class S8 extends Zk{constructor(){super(...arguments),this.type="html",this.renderInstance=Xk}readValueFromInstance(t,n){var r;if(Xo.has(n))return(r=this.projection)!=null&&r.isProjecting?Uy(n):Q5(t,n);{const a=E8(t),o=(Sb(n)?a.getPropertyValue(n):a[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mk(t,n)}build(t,n,r){Ub(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return $b(t,n,r)}}const Qk=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 A8(e,t,n,r){Xk(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(Qk.has(a)?a:zb(a),t.attrs[a])}class w8 extends Zk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Mt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xo.has(n)){const r=ak(n);return r&&r.default||0}return n=Qk.has(n)?n:zb(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ak(t,n,r)}build(t,n,r){_k(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){A8(t,n,r,a)}mount(t){this.isSVGTag=Ek(t.tagName),super.mount(t)}}const Jk=(e,t)=>Fb(e)?new w8(t):new S8(t,{allowProjection:e!==E.Fragment}),T8=T$({...Nk,...Wk,...s8,...y8},Jk),eO=XG(T8),C8={renderer:Jk,...Nk,...Wk},tO=e=>{const[t,n]=E.useState(e);return E.useEffect(()=>{n(e??window.document.body)},[e]),t};function R8(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:N8}=Ge;function nO(e){const t=N8();return n=>{const r=e(n);return R8(t.current,r)?t.current:t.current=r}}const rO=e=>{const{disableScroll:t=!1,element:n,key:r="unnamed_blocker"}=e??{},{isElementScrollBlocked:a,addBlockage:o,removeBlockage:l}=UB(nO(f=>({isElementScrollBlocked:f.isElementScrollBlocked,addBlockage:f.addBlockage,removeBlockage:f.removeBlockage}))),u=tO(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}},k8=hr("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:Ae(k8({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}),Kb="relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8",O8="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",D8=({className:e,...t})=>b.jsx("h1",{className:Ae("mt-5 text-2xl font-bold",e),...t}),I8=({className:e,...t})=>b.jsx("h2",{className:Ae("mt-16 mb-2 text-2xl font-bold",Kb,e),...t}),L8=({className:e,...t})=>b.jsx("h3",{className:Ae("mt-5 mb-2 text-xl font-bold",Kb,e),...t}),M8=({className:e,...t})=>b.jsx("h4",{className:Ae("mt-3 text-lg font-bold",Kb,e),...t}),j8=e=>String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase(),P8=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"})},V8=(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},Wb=({H:e,children:t,className:n,isClickable:r,...a})=>{const o=typeof t=="string"?j8(t):void 0,l=u=>{const{id:d}=u.currentTarget;if(V8(u.currentTarget,u)&&typeof d=="string"){const y=`${window.location.href.split("#")[0]}#${d}`;navigator.clipboard.writeText(y),P8(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:Ae(r&&O8,n),...a,children:t})},B8=({isClickable:e,...t})=>b.jsx(D8,{...t}),z8=({isClickable:e=!1,...t})=>b.jsx(Wb,{H:I8,isClickable:e,...t}),Yb=({isClickable:e=!1,...t})=>b.jsx(Wb,{H:L8,isClickable:e,...t}),U8=({isClickable:e=!1,...t})=>b.jsx(Wb,{H:M8,isClickable:e,...t}),H8=hr("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"}}),F8=eO.create(Jr),iO=({children:e,isOpen:t,container:n,disableScroll:r=!1,onClose:a,hasCloseButton:o=!1,title:l,size:u="md",className:d,...f})=>{const m=tO(n);if(rO({key:"modal",disableScroll:t&&r}),!m)return b.jsx(b.Fragment,{});const y=typeof l=="string";return bs.createPortal(b.jsx(eO.div,{className:"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur",animate:t?"visible":"invisible",variants:{visible:{opacity:1,visibility:"visible",transition:{duration:.1,when:"beforeChildren"}},invisible:{opacity:0,visibility:"hidden",transition:{duration:.1,when:"afterChildren"}}},onClick:g=>{g.stopPropagation(),a==null||a()},"aria-hidden":!t,children:b.jsx("div",{className:"flex justify-center p-4",children:b.jsxs(F8,{onClick:g=>g.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:H8({size:u,className:d}),role:"dialog","aria-modal":!0,roundedSize:"2xl",...f,children:[b.jsxs("div",{className:Ae("cursor-default px-4",o&&y?"flex items-center justify-center":o?"flex items-center justify-end":y?"items-center":"hidden"),children:[y&&b.jsx(Yb,{className:"ml-4 flex items-center justify-center text-lg font-bold",children:l}),o&&b.jsx(yt,{variant:"hoverable",color:"text",label:"Close modal",className:"ml-auto",onClick:g=>{g.stopPropagation(),a==null||a()},Icon:_s,size:"icon-md"})]}),b.jsx("div",{className:"flex flex-1 flex-col items-center overflow-auto",children:e})]})})}),m)},G8=hr("gap-3 transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline","invisible-link":"h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0",button:"rounded-lg bg-current *:text-text-opposite min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50","button-outlined":"rounded-lg border-[1.5px] hover:bg-current/30 min-h-8 px-6 max-md:py-2 text-sm flex items-center justify-center gap-2 whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",hoverable:"block rounded-lg border-none bg-current/0 transition hover:bg-current/20 aria-[current]:bg-current/5"},color:{primary:"text-primary",secondary:"text-secondary",destructive:"text-destructive",neutral:"text-neutral",light:"text-white",dark:"text-neutral-800",text:"text-text","text-inverse":"text-text-opposite",error:"text-error",success:"text-success",custom:""},underlined:{default:"",true:"underline",false:"no-underline"}},defaultVariants:{variant:"default",color:"primary",underlined:"default"}}),$8=({href:e,isExternalLink:t})=>{const n=typeof e=="string"&&e.trim()!=="";return t===!0||typeof t>"u"&&n&&/^https?:\/\//.test(e)},Zb=e=>{const{variant:t="default",color:n="primary",children:r,label:a,className:o,isActive:l,underlined:u,locale:d,isExternalLink:f,href:m,...y}=e,{internationalization:g}=rt,v=$8(e),x=typeof r=="string",S=v?"noopener noreferrer nofollow":void 0,A=v?"_blank":"_self",w=d?d===g.defaultLocale?"x-default":d:void 0,T=d&&m&&!v?FM(m,d):m;return b.jsxs("a",{href:T,hrefLang:w,"aria-label":a,rel:S,target:A,"aria-current":l?"page":void 0,className:Ae(G8({variant:t,color:n,underlined:u,className:o})),...y,children:[t==="button"?b.jsx("span",{children:r}):r,v&&x&&b.jsx(NV,{className:"ml-2 inline-block size-4"})]})},aO={key:"breadcrumb",content:{linkLabel:pe({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:"Перейти на"})}},q8=({href:e,lang:t,children:n,onClick:r,color:a,position:o,locale:l,...u})=>{const{linkLabel:d}=nn(aO);return b.jsxs(b.Fragment,{children:[b.jsx(Zb,{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()})]})},K8=({children:e,onClick:t,color:n,position:r,...a})=>{const{linkLabel:o}=nn(aO);return b.jsxs(b.Fragment,{children:[b.jsx(yt,{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()})]})},W8=({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()})]}),Y8=({links:e,className:t,color:n="text",locale:r,elementType:a="page",...o})=>b.jsx("nav",{"aria-label":"breadcrumb",children:b.jsx("ol",{className:Ae("flex flex-row flex-wrap items-center gap-2 text-sm",t),itemScope:!0,itemType:"http://schema.org/BreadcrumbList",...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",g=u===e.length-1?a:void 0,v=l.text??l;let x=b.jsx(W8,{position:u+1,"aria-current":g,children:v},v);f?x=b.jsx(q8,{href:l.href,color:n,position:u+1,locale:r,"aria-current":g,children:v},v):m&&(x=b.jsx(K8,{onClick:l.onClick,color:n,position:u+1,"aria-current":g,children:v},v));const S=b.jsx("li",{itemProp:"itemListElement",itemScope:!0,itemType:"https://schema.org/ListItem",children:x},v);return d?S:b.jsxs(E.Fragment,{children:[S,b.jsx(xf,{size:10})]},v)})})}),Z8={key:"save-dictionary-details",content:{deleteButton:{text:pe({en:"Delete dictionary","en-GB":"Delete dictionary",fr:"Supprimer le dictionnaire",es:"Eliminar diccionario",de:"Wörterbuch löschen",ja:"辞書を削除",ko:"사전 삭제",zh:"删除字典",it:"Elimina dizionario",pt:"Excluir dicionário",hi:"शब्दकोश हटाएं",ar:"حذف القاموس",ru:"Удалить словарь"}),label:pe({en:"Click to delete dictionary","en-GB":"Click to delete dictionary",fr:"Cliquez pour supprimer le dictionnaire",es:"Haga clic para eliminar el diccionario",de:"Klicken Sie, um das Wörterbuch zu löschen",ja:"辞書を削除するにはクリックしてください",ko:"사전을 삭제하려면 클릭하세요",zh:"单击以删除字典",it:"Fai clic per eliminare il dizionario",pt:"Clique para excluir o dicionário",hi:"शब्दकोश हटाने के लिए क्लिक करें",ar:"انقر لحذف القاموس",ru:"Нажмите, чтобы удалить словарь"})},resetButton:{text:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({en:"Download","en-GB":"Download",fr:"Télécharger",es:"Descargar",de:"Herunterladen",ja:"ダウンロード",ko:"다운로드",zh:"下载",it:"Scarica",pt:"Baixar",hi:"डाउनलोड",ar:"تنزيل",ru:"Скачать"}),label:pe({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:pe({en:"Confirmation","en-GB":"Confirmation",fr:"Confirmation",es:"Confirmation",de:"Confirmation",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmação",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтверждение"}),message:pe({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:pe({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:pe({en:"Confirm","en-GB":"Confirm",fr:"Confirmer",es:"Confirmar",de:"Bestätigen",ja:"確認",ko:"확인",zh:"确认",it:"Conferma",pt:"Confirmar",hi:"पुष्टि करें",ar:"تأكيد",ru:"Подтвердить"}),label:pe({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:pe({en:"Cancel","en-GB":"Cancel",fr:"Annuler",es:"Cancelar",de:"Abbrechen",ja:"キャンセル",ko:"취소",zh:"取消",it:"Annulla",pt:"Cancelar",hi:"रद्द करें",ar:"إلغاء",ru:"Отмена"}),label:pe({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:"Нажмите, чтобы отменить"})}}}},sO=({dictionary:e,mode:t,className:n,onDelete:r,...a})=>{var J;const[o,l]=E.useState(!1),{setLocaleDictionary:u}=wv(),{deleteDictionary:d,isLoading:f}=m2(),{writeDictionary:m,isLoading:y}=b2(),{pushDictionaries:g,isLoading:v}=h2(),x=y||v,S=t.includes("local")&&((J=e.filePath)==null?void 0:J.endsWith(".json")),{editedContent:A,restoreEditedContent:w}=Tn(),{deleteButton:T,resetButton:R,saveButton:O,publishButton:N,downloadButton:M,confirmation:D}=nn(Z8),{isAuthenticated:L}=tu(),V=A==null?void 0:A[e.key],U=V&&JSON.stringify(V)!==JSON.stringify(e),ce=typeof(e==null?void 0:e._id)<"u",ie=async()=>{if(!(A!=null&&A[e.key]))return;const H={...e,...A==null?void 0:A[e.key]};await m(H).then(()=>{u(A==null?void 0:A[e.key]),w(e.key)})},de=async()=>{if(!(A!=null&&A[e.key]))return;const H={...e,...A==null?void 0:A[e.key]};await g([H]).then(ne=>{ne&&(u(A==null?void 0:A[e.key]),w(e.key))})},X=async()=>{e._id&&await d(e._id.toString()).then(H=>{H&&(r==null||r())})};return b.jsxs(b.Fragment,{children:[b.jsx(iO,{isOpen:o,title:D.title.value,size:"md",children:b.jsxs("form",{className:"size-full px-3",children:[S?b.jsx("p",{className:"text-neutral py-4 text-sm",children:D.message}):b.jsx("p",{className:"text-neutral py-4 text-sm",children:D.differentFormatMessage}),b.jsxs("div",{className:"mt-12 flex justify-end gap-2 max-md:flex-col",children:[b.jsx(Xe.Button,{label:D.cancelButton.label.value,disabled:!U||x,color:"text",className:"max-md:w-full",variant:"outline",onClick:()=>l(!1),children:D.cancelButton.text}),b.jsx(Xe.Button,{label:D.confirmButton.label.value,disabled:!U||x,Icon:bS,color:"text",className:"max-md:w-full",isLoading:v,onClick:ie,children:D.confirmButton.text})]})]})}),b.jsxs("form",{className:Ae("flex justify-end gap-2 max-md:flex-col",n),...a,children:[t.includes("remote")&&ce&&r&&L&&b.jsx(Xe.Button,{label:T.label.value,Icon:dh,color:"error",variant:"outline",className:"max-md:w-full",isLoading:f,onClick:X,children:T.text}),U&&b.jsx(Xe.Button,{label:R.label.value,disabled:!U,Icon:UV,variant:"outline",color:"text",className:"max-md:w-full",onClick:()=>w(e.key),children:R.text}),t.includes("local")&&b.jsx(Xe.Button,{label:M.label.value,disabled:!U||x,Icon:CV,color:"text",variant:L?"outline":"default",className:"max-md:w-full",isLoading:y,onClick:()=>l(!0),children:M.text}),t.includes("remote")&&L&&!ce&&b.jsx(Xe.Button,{label:N.label.value,disabled:x,Icon:fV,color:"text",className:"max-md:w-full",isLoading:v,onClick:de,children:N.text}),t.includes("remote")&&L&&ce&&U&&b.jsx(Xe.Button,{label:O.label.value,disabled:!U||x,Icon:bS,color:"text",className:"max-md:w-full",isLoading:v,onClick:de,children:O.text})]})]})},oO=({level:e,title:t,description:n,children:r,rightParam:a,isSelected:o,...l})=>b.jsx("div",{className:Ae("rounded-md p-2 transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",e===2&&"hover:bg-card/30",e>=3&&"",o===!0&&"bg-card/40"),...l,children:b.jsx(K1,{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:Ae(e===0&&"text-2xl",e===1&&"text-xl",e===2&&"text-lg",e>=3&&"text-base"),children:t}),a&&b.jsx("div",{className:"flex w-auto items-center justify-between p-3",children:a})]}),n&&b.jsx("p",{className:"text-card pl-3 text-sm",children:n})]}),children:r})}),lO=({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:Ae("w-full rounded-md p-2 text-left transition","hover:bg-card/30 [&:has(.section:hover)]:bg-transparent",d===2&&"hover:bg-card/30",d>=3&&""),onClick:m=>{m.stopPropagation(),o(e)},children:typeof l=="function"?l(f):b.jsx(VC,{"aria-label":"Editable field",defaultValue:f,onSave:m=>a({keyPath:e,newValue:m}),onCancel:()=>null})})},X8=e=>{const{keyPath:t,section:n}=e,{addEditedContent:r}=Tn(),a=Ur(e.editedContent,t),o=n[K.File],{content:l}=n,u=[...t,{type:K.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(lO,{...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)}})]})},Q8=e=>{const{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:a=[]}=e;return n.map((o,l)=>{const u={key:l,type:K.Array},d=[...t,u];return b.jsx(oO,{level:t.length,title:`${l}`,description:"",isSelected:Zc(d,a),onClick:f=>{f.stopPropagation(),r(d)},children:b.jsx(Ca,{...e,keyPath:d,section:o})},JSON.stringify(o))})},J8=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=>!Xb.includes(r)).map(r=>{const a={type:K.Condition,key:r},o=[...t,a],l=n[K.Condition][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(Ca,{...e,key:r,keyPath:o,section:l})]})})})},e9=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=>!Xb.includes(r)).map(r=>{const a={type:K.Enumeration,key:r},o=[...t,a],l=n[K.Enumeration][r];return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"flex items-center font-bold",children:r}),E.createElement(Ca,{...e,key:r,keyPath:o,section:l})]})})})},t9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:K.Insertion}],a=n[K.Insertion];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(Ca,{...e,keyPath:r,section:a})})},n9=e=>{const{keyPath:t,section:n}=e,r=[...t,{type:K.Markdown}],a=n[K.Markdown];return b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:b.jsx(Ca,{...e,keyPath:r,section:a})})},r9=e=>{const{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:a}=e;return Object.keys(n).filter(o=>!Xb.includes(o)).map(o=>{const l={key:o,type:K.Object},u=[...t,l];return b.jsx(oO,{level:t.length,title:o,description:"",isSelected:Zc(u,r),onClick:d=>{d.stopPropagation(),a(u)},children:b.jsx(Ca,{...e,keyPath:u,section:n[o]})},o)})},i9=e=>{const{keyPath:t,section:n,locale:r}=e,a={type:K.Translation,key:r},o=[...t,a],l=n.translation[r];return b.jsx(Ca,{...e,keyPath:o,section:l})},Xb=["filePath","id","nodeType"],Ca=e=>{const n=Ur(e.editedContent,e.keyPath)??e.section,r=Vo(n);if(typeof n=="object")return r===K.ReactNode?b.jsx("span",{className:"text-neutral text-xs",children:"React node not editable"}):r===K.Nested?b.jsx("div",{className:"ml-2 grid grid-cols-[auto,1fr] gap-2",children:"[Nested] Dictionary"}):r===K.Markdown?b.jsx(n9,{...e,section:n}):r===K.Translation?b.jsx(i9,{...e,section:n}):r===K.Enumeration?b.jsx(e9,{...e,section:n}):r===K.Condition?b.jsx(J8,{...e,section:n}):r===K.Insertion?b.jsx(t9,{...e,section:n}):r===K.Array?b.jsx(Q8,{...e,section:n}):r===K.File?b.jsx(X8,{...e,section:n}):b.jsx(r9,{...e,section:n});if(typeof n=="string")return b.jsx(lO,{...e,section:n})},a9=({dictionary:e,mode:t,onDelete:n,...r})=>{var m;const{editedContent:a,addEditedContent:o}=Tn(),{focusedContent:l,setFocusedContentKeyPath:u,setFocusedContent:d}=ba(),f=l==null?void 0:l.keyPath;return b.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2",children:[b.jsx("div",{children:E.createElement(Ca,{...r,keyPath:[],dictionary:e,key:JSON.stringify(((a==null?void 0:a[e.key])??e).content),editedContent:(m=a==null?void 0:a[e.key])==null?void 0:m.content,focusedKeyPath:f,section:e.content,onContentChange:y=>{o(e.key,y.newValue,y.keyPath)},onFocusKeyPath:u})}),b.jsx(sO,{dictionary:e,mode:t,className:"mb-4 flex-col",onDelete:()=>{d(null),n==null||n()}})]})};function Oi(e){return Array.isArray?Array.isArray(e):dO(e)==="[object Array]"}function s9(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function o9(e){return e==null?"":s9(e)}function zr(e){return typeof e=="string"}function cO(e){return typeof e=="number"}function l9(e){return e===!0||e===!1||c9(e)&&dO(e)=="[object Boolean]"}function uO(e){return typeof e=="object"}function c9(e){return uO(e)&&e!==null}function Gn(e){return e!=null}function Fg(e){return!e.trim().length}function dO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const u9="Incorrect 'index' type",d9=e=>`Invalid value for key ${e}`,f9=e=>`Pattern length exceeds max of ${e}.`,h9=e=>`Missing ${e} property in key`,m9=e=>`Property 'weight' in key '${e}' must be a positive integer`,Zw=Object.prototype.hasOwnProperty;class p9{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let a=fO(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 fO(e){let t=null,n=null,r=null,a=1,o=null;if(zr(e)||Oi(e))r=e,t=Xw(e),n=nv(e);else{if(!Zw.call(e,"name"))throw new Error(h9("name"));const l=e.name;if(r=l,Zw.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(m9(l));t=Xw(l),n=nv(l),o=e.getFn}return{path:t,id:n,weight:a,src:r,getFn:o}}function Xw(e){return Oi(e)?e:e.split(".")}function nv(e){return Oi(e)?e.join("."):e}function g9(e,t){let n=[],r=!1;const a=(o,l,u)=>{if(Gn(o))if(!l[u])n.push(o);else{let d=l[u];const f=o[d];if(!Gn(f))return;if(u===l.length-1&&(zr(f)||cO(f)||l9(f)))n.push(o9(f));else if(Oi(f)){r=!0;for(let m=0,y=f.length;m<y;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 y9={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},v9={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},b9={location:0,threshold:.6,distance:100},_9={useExtendedSearch:!1,getFn:g9,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var He={...v9,...y9,...b9,..._9};const x9=/[^ ]+/g;function E9(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(a){const o=a.match(x9).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 Qb{constructor({getFn:t=He.getFn,fieldNormWeight:n=He.fieldNormWeight}={}){this.norm=E9(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(!Gn(t)||Fg(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(Gn(l)){if(Oi(l)){let u=[];const d=[{nestedArrIndex:-1,value:l}];for(;d.length;){const{nestedArrIndex:f,value:m}=d.pop();if(Gn(m))if(zr(m)&&!Fg(m)){let y={v:m,i:f,n:this.norm.get(m)};u.push(y)}else Oi(m)&&m.forEach((y,g)=>{d.push({nestedArrIndex:g,value:y})})}r.$[o]=u}else if(zr(l)&&!Fg(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 hO(e,t,{getFn:n=He.getFn,fieldNormWeight:r=He.fieldNormWeight}={}){const a=new Qb({getFn:n,fieldNormWeight:r});return a.setKeys(e.map(fO)),a.setSources(t),a.create(),a}function S9(e,{getFn:t=He.getFn,fieldNormWeight:n=He.fieldNormWeight}={}){const{keys:r,records:a}=e,o=new Qb({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(a),o}function Gd(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:a=He.distance,ignoreLocation:o=He.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 A9(e=[],t=He.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 ns=32;function w9(e,t,n,{location:r=He.location,distance:a=He.distance,threshold:o=He.threshold,findAllMatches:l=He.findAllMatches,minMatchCharLength:u=He.minMatchCharLength,includeMatches:d=He.includeMatches,ignoreLocation:f=He.ignoreLocation}={}){if(t.length>ns)throw new Error(f9(ns));const m=t.length,y=e.length,g=Math.max(0,Math.min(r,y));let v=o,x=g;const S=u>1||d,A=S?Array(y):[];let w;for(;(w=e.indexOf(t,x))>-1;){let D=Gd(t,{currentLocation:w,expectedLocation:g,distance:a,ignoreLocation:f});if(v=Math.min(D,v),x=w+m,S){let L=0;for(;L<m;)A[w+L]=1,L+=1}}x=-1;let T=[],R=1,O=m+y;const N=1<<m-1;for(let D=0;D<m;D+=1){let L=0,V=O;for(;L<V;)Gd(t,{errors:D,currentLocation:g+V,expectedLocation:g,distance:a,ignoreLocation:f})<=v?L=V:O=V,V=Math.floor((O-L)/2+L);O=V;let U=Math.max(1,g-V+1),ce=l?y:Math.min(g+V,y)+m,ie=Array(ce+2);ie[ce+1]=(1<<D)-1;for(let X=ce;X>=U;X-=1){let J=X-1,H=n[e.charAt(J)];if(S&&(A[J]=+!!H),ie[X]=(ie[X+1]<<1|1)&H,D&&(ie[X]|=(T[X+1]|T[X])<<1|1|T[X+1]),ie[X]&N&&(R=Gd(t,{errors:D,currentLocation:J,expectedLocation:g,distance:a,ignoreLocation:f}),R<=v)){if(v=R,x=J,x<=g)break;U=Math.max(1,2*g-x)}}if(Gd(t,{errors:D+1,currentLocation:g,expectedLocation:g,distance:a,ignoreLocation:f})>v)break;T=ie}const M={isMatch:x>=0,score:Math.max(.001,R)};if(S){const D=A9(A,u);D.length?d&&(M.indices=D):M.isMatch=!1}return M}function T9(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 $f=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 mO{constructor(t,{location:n=He.location,threshold:r=He.threshold,distance:a=He.distance,includeMatches:o=He.includeMatches,findAllMatches:l=He.findAllMatches,minMatchCharLength:u=He.minMatchCharLength,isCaseSensitive:d=He.isCaseSensitive,ignoreDiacritics:f=He.ignoreDiacritics,ignoreLocation:m=He.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?$f(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const y=(v,x)=>{this.chunks.push({pattern:v,alphabet:T9(v),startIndex:x})},g=this.pattern.length;if(g>ns){let v=0;const x=g%ns,S=g-x;for(;v<S;)y(this.pattern.substr(v,ns),v),v+=ns;if(x){const A=g-ns;y(this.pattern.substr(A),A)}}else y(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=r?$f(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 y=[],g=0,v=!1;this.chunks.forEach(({pattern:S,alphabet:A,startIndex:w})=>{const{isMatch:T,score:R,indices:O}=w9(t,S,A,{location:o+w,distance:l,threshold:u,findAllMatches:d,minMatchCharLength:f,includeMatches:a,ignoreLocation:m});T&&(v=!0),g+=R,T&&O&&(y=[...y,...O])});let x={isMatch:v,score:v?g/this.chunks.length:1};return v&&a&&(x.indices=y),x}}class Ra{constructor(t){this.pattern=t}static isMultiMatch(t){return Qw(t,this.multiRegex)}static isSingleMatch(t){return Qw(t,this.singleRegex)}search(){}}function Qw(e,t){const n=e.match(t);return n?n[1]:null}class C9 extends Ra{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 R9 extends Ra{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 N9 extends Ra{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 k9 extends Ra{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 O9 extends Ra{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 D9 extends Ra{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 pO extends Ra{constructor(t,{location:n=He.location,threshold:r=He.threshold,distance:a=He.distance,includeMatches:o=He.includeMatches,findAllMatches:l=He.findAllMatches,minMatchCharLength:u=He.minMatchCharLength,isCaseSensitive:d=He.isCaseSensitive,ignoreDiacritics:f=He.ignoreDiacritics,ignoreLocation:m=He.ignoreLocation}={}){super(t),this._bitapSearch=new mO(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 gO extends Ra{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 rv=[C9,gO,N9,k9,D9,O9,R9,pO],Jw=rv.length,I9=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,L9="|";function M9(e,t={}){return e.split(L9).map(n=>{let r=n.trim().split(I9).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<Jw;){const m=rv[f];let y=m.isMultiMatch(u);y&&(a.push(new m(y,t)),d=!0)}if(!d)for(f=-1;++f<Jw;){const m=rv[f];let y=m.isSingleMatch(u);if(y){a.push(new m(y,t));break}}}return a})}const j9=new Set([pO.type,gO.type]);class P9{constructor(t,{isCaseSensitive:n=He.isCaseSensitive,ignoreDiacritics:r=He.ignoreDiacritics,includeMatches:a=He.includeMatches,minMatchCharLength:o=He.minMatchCharLength,ignoreLocation:l=He.ignoreLocation,findAllMatches:u=He.findAllMatches,location:d=He.location,threshold:f=He.threshold,distance:m=He.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?$f(t):t,this.pattern=t,this.query=M9(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?$f(t):t;let l=0,u=[],d=0;for(let f=0,m=n.length;f<m;f+=1){const y=n[f];u.length=0,l=0;for(let g=0,v=y.length;g<v;g+=1){const x=y[g],{isMatch:S,indices:A,score:w}=x.search(t);if(S){if(l+=1,d+=w,r){const T=x.constructor.type;j9.has(T)?u=[...u,...A]:u.push(A)}}else{d=0,l=0,u.length=0;break}}if(l){let g={isMatch:!0,score:d/l};return r&&(g.indices=u),g}}return{isMatch:!1,score:1}}}const iv=[];function V9(...e){iv.push(...e)}function av(e,t){for(let n=0,r=iv.length;n<r;n+=1){let a=iv[n];if(a.condition(e,t))return new a(e,t)}return new mO(e,t)}const qf={AND:"$and",OR:"$or"},sv={PATH:"$path",PATTERN:"$val"},ov=e=>!!(e[qf.AND]||e[qf.OR]),B9=e=>!!e[sv.PATH],z9=e=>!Oi(e)&&uO(e)&&!ov(e),eT=e=>({[qf.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function yO(e,t,{auto:n=!0}={}){const r=a=>{let o=Object.keys(a);const l=B9(a);if(!l&&o.length>1&&!ov(a))return r(eT(a));if(z9(a)){const d=l?a[sv.PATH]:o[0],f=l?a[sv.PATTERN]:a[d];if(!zr(f))throw new Error(d9(d));const m={keyId:nv(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];Oi(f)&&f.forEach(m=>{u.children.push(r(m))})}),u};return ov(e)||(e=eT(e)),r(e)}function U9(e,{ignoreFieldNorm:t=He.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 H9(e,t){const n=e.matches;t.matches=[],Gn(n)&&n.forEach(r=>{if(!Gn(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 F9(e,t){t.score=e.score}function G9(e,t,{includeMatches:n=He.includeMatches,includeScore:r=He.includeScore}={}){const a=[];return n&&a.push(H9),r&&a.push(F9),e.map(o=>{const{idx:l}=o,u={item:t[l],refIndex:l};return a.length&&a.forEach(d=>{d(o,u)}),u})}class Qo{constructor(t,n={},r){this.options={...He,...n},this.options.useExtendedSearch,this._keyStore=new p9(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Qb))throw new Error(u9);this._myIndex=n||hO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Gn(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 U9(d,{ignoreFieldNorm:u}),o&&d.sort(l),cO(n)&&n>-1&&(d=d.slice(0,n)),G9(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(!Gn(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=yO(t,this.options),r=(u,d,f)=>{if(!u.children){const{keyId:y,searcher:g}=u,v=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(d,y),searcher:g});return v&&v.length?[{idx:f,item:d,matches:v}]:[]}const m=[];for(let y=0,g=u.children.length;y<g;y+=1){const v=u.children[y],x=r(v,d,f);if(x.length)m.push(...x);else if(u.operator===qf.AND)return[]}return m},a=this._myIndex.records,o={},l=[];return a.forEach(({$:u,i:d})=>{if(Gn(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(!Gn(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(!Gn(n))return[];let a=[];if(Oi(n))n.forEach(({v:o,i:l,n:u})=>{if(!Gn(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}}Qo.version="7.1.0";Qo.createIndex=hO;Qo.parseIndex=S9;Qo.config=He;Qo.parseQuery=yO;V9(P9);const $9=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}},q9=()=>{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)},K9=()=>{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},W9=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},tT=(e="md")=>{const t=$9(e),n=q9(),r=W9(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n}},Y9=(e="md")=>{const[t,n]=E.useState(tT(e));return E.useEffect(()=>{const r=()=>{n(tT(e))};return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[e]),t},wc=({children:e,className:t,identifier:n,...r})=>b.jsx("div",{className:Ae("group/dropdown relative flex",t),"aria-label":`DropDown ${n}`,id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),Z9=({children:e,identifier:t,className:n,...r})=>b.jsx("button",{className:Ae("w-full cursor-pointer",n),"aria-label":`Open panel ${t}`,onClick:a=>{K9()&&a.currentTarget.focus({preventScroll:!0})},onBlur:a=>a.currentTarget.blur(),...r,children:e}),X9=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:a="start",identifier:o,className:l,...u})=>b.jsx("div",{className:Ae("absolute top-[calc(100%+0.5rem)] z-[1000] min-w-full",a==="start"&&"left-0",a==="end"&&"right-0",l),"aria-hidden":t,role:"region","aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,children:b.jsx(q1,{isHidden:t,className:Ae("overflow-x-visible",t!==!1?"invisible":"visible",n&&"group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]",r&&"group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]"),...u,children:e})});wc.Trigger=Z9;wc.Panel=X9;const Q9={key:"locale-switcher-content",content:{localeSwitcherLabel:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:"Показать только выбранные языки"})}}},Tc=(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])},vO=E.createContext({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),bO=()=>E.useContext(vO),J9=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{const{locale:r}=Nv(),[a,o]=Tc("locale-content-selector-selected-locales",t??[r]);return b.jsx(vO,{value:{availableLocales:e,selectedLocales:a,setSelectedLocales:o},children:n})},Gg="locale-switcher-content",e7=({panelProps:e,isMultilingual:t=!0})=>{const{switchTo:n,searchInput:r,localeSwitcherLabel:a,languageListLabel:o,seeAllLocalesSwitch:l}=nn(Q9),u=E.useRef(null),{locale:d}=Nv(),{availableLocales:f,selectedLocales:m,setSelectedLocales:y}=bO(),g=E.useMemo(()=>f.map(N=>{const M=ef(N,B.ENGLISH),D=ef(N,d),L=ef(N);return{locale:N,englishName:M,currentLocaleName:D,ownLocaleName:L}}),[f,d]),[v,x]=E.useState(g),[S,A]=Tc("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 Qo(g,N)},[g]),T=E.useCallback(N=>{if(N){const M=w.search(N).map(D=>D.item);x(M)}else x(g)},[w,g]),R=N=>{t?m.includes(N)?m.length>1&&y(M=>M.filter(D=>D!==N)):y(M=>[...M,N]):y([N])},O=N=>{A(N),y(N?f:[d])};return b.jsx("div",{className:"border-text text-text rounded-xl border transition-colors","aria-label":a.value,children:b.jsxs(wc,{identifier:Gg,children:[b.jsx(wc.Trigger,{identifier:Gg,children:b.jsxs("div",{className:"flex w-full items-center justify-between",children:[b.jsx("div",{className:"px-2 py-1",children:b.jsx(MV,{size:18})}),b.jsx(PV,{className:"self-center",size:18})]})}),b.jsx(wc.Panel,{identifier:Gg,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(cu,{defaultValue:!1,onChange:O,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($o,{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:M,ownLocaleName:D})=>b.jsx("li",{className:"px-1.5 py-1",children:b.jsx(yt,{onClick:()=>R(N),label:`${n} ${M}`,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(Ho,{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:zM(N),lang:N,children:D}),b.jsx("span",{className:"text-neutral text-xs",children:M})]}),b.jsx("span",{className:"text-neutral text-sm",children:N.toUpperCase()})]})]})})},N))})]})]})})]})})},t7=(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},lv=({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,y=()=>{u(e),f(S=>S+1)},g=()=>{t(l)},v=S=>{u(S.currentTarget.value)};E.useEffect(()=>{u(e)},[e]);const x=(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($o,{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(yt,{Icon:Ho,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!x,onClick:g}),b.jsx(yt,{Icon:_s,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:y})]}),a]})]},String(e))},n7=(e,t)=>{const[n,r]=E.useState(e);return E.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),n},r7=({isActive:e=!0,suggestion:t,...n})=>{const r=String(n.value??n.defaultValue??""),{autocomplete:a}=v2(),o=Yr(),[l,u]=E.useState(!1),[d,f]=E.useState(r),[m,y]=E.useState(""),g=n7(d,200);E.useEffect(()=>{typeof n.value>"u"||f(r)},[n.value,n.defaultValue]),E.useEffect(()=>{if(!e||!l)return;const x=async()=>{var S;try{const A=await a({text:g,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(g)){const T=w.slice(g.length);return y(T)}return y(w)}catch(A){console.error("Autocomplete error:",A)}};g.length>3?(y(""),x()):y("")},[g,e]);const v=()=>{f(x=>x+m),y("")};return b.jsxs("div",{className:"relative w-full",children:[b.jsxs("div",{className:"pointer-events-none absolute inset-0 whitespace-pre-wrap break-words px-1 py-3 text-base leading-[1.45rem] md:py-1 md:text-sm md:leading-[1.23rem]","aria-hidden":"true",children:[b.jsx("span",{className:"align-text-top text-transparent",children:d}),(m||t)&&b.jsx("span",{className:"text-neutral ml-3 align-text-top",children:t??m})]}),b.jsx(Zv,{...n,value:d,onChange:x=>{var S;u(!0),f(x.target.value),(S=n.onChange)==null||S.call(n,x)},onKeyDown:x=>{var S;x.key==="Tab"&&m&&(x.preventDefault(),v()),(S=n.onKeyDown)==null||S.call(n,x)}})]})},i7=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:a,...o})=>{const{isAuthenticated:l}=S2(),[u,d]=E.useState(e),[f,m]=E.useState(0),y=u!==e,g=()=>{d(e),m(A=>A+1)},v=()=>{t(u)},x=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(r7,{onChange:x,variant:"invisible",className:"size-full",defaultValue:e,isActive:l,...o},f),(y||a)&&b.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[y&&b.jsxs(b.Fragment,{children:[b.jsx(yt,{Icon:Ho,label:"Validate",variant:"hoverable",color:"text",size:"icon-sm",className:"cursor-pointer hover:scale-110",disabled:n||!S,onClick:v}),b.jsx(yt,{Icon:_s,label:"Cancel",variant:"hoverable",size:"icon-sm",color:"text",className:"cursor-pointer hover:scale-110",onClick:g})]}),a]})]},e)};function rs(){return rs=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},rs.apply(this,arguments)}const a7=["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 nT;(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"})(nT||(nT={}));const rT=["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"}),iT={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},s7=["style","script"],o7=["src","href","data","formAction","srcDoc","action"],l7=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,c7=/mailto:/i,u7=/\n{2,}$/,_O=/^(\s*>[\s\S]*?)(?=\n\n|$)/,d7=/^ *> ?/gm,f7=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,h7=/^ {2,}\n/,m7=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,xO=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,EO=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,p7=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,g7=/^(?:\n *)*\n/,y7=/\r\n?/g,v7=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,b7=/^\[\^([^\]]+)]/,_7=/\f/g,x7=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,E7=/^\s*?\[(x|\s)\]/,SO=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,AO=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,wO=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,cv=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,S7=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,TO=/^<!--[\s\S]*?(?:-->)/,A7=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,uv=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,w7=/^\{.*\}$/,T7=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,C7=/^<([^ >]+@[^ >]+)>/,R7=/^<([^ >]+:\/[^ >]+)>/,N7=/-([a-z])?/gi,CO=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,k7=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,O7=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,D7=/^\[([^\]]*)\] ?\[([^\]]*)\]/,I7=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,L7=/\t/g,M7=/(^ *\||\| *$)/g,j7=/^ *:-+: *$/,P7=/^ *:-+ *$/,V7=/^ *-+: *$/,Dh="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",B7=new RegExp(`^([*_])\\1${Dh}\\1\\1(?!\\1)`),z7=new RegExp(`^([*_])${Dh}\\1(?!\\1)`),U7=new RegExp(`^(==)${Dh}\\1`),H7=new RegExp(`^(~~)${Dh}\\1`),F7=/^\\([^0-9A-Za-z\s])/,aT=/\\([^0-9A-Za-z\s])/g,G7=/^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/,$7=/^\n+/,q7=/^([ \t]*)/,K7=/\\([^\\])/g,W7=/(?:^|\n)( *)$/,Jb="(?:\\d+\\.)",e0="(?:[*+-])";function RO(e){return"( *)("+(e===1?Jb:e0)+") +"}const NO=RO(1),kO=RO(2);function OO(e){return new RegExp("^"+(e===1?NO:kO))}const Y7=OO(1),Z7=OO(2);function DO(e){return new RegExp("^"+(e===1?NO:kO)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Jb:e0)+" )[^\\n]*)*(\\n|$)","gm")}const X7=DO(1),Q7=DO(2);function IO(e){const t=e===1?Jb:e0;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const LO=IO(1),MO=IO(2);function sT(e,t){const n=t===1,r=n?LO:MO,a=n?X7:Q7,o=n?Y7:Z7;return{match:jo(function(l,u){const d=W7.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(u7,`
|
|
254
|
-
`).match(a);let y=!1;return{items:m.map(function(g,v){const x=o.exec(g)[0].length,S=new RegExp("^ {1,"+x+"}","gm"),A=g.replace(S,"").replace(o,""),w=v===m.length-1,T=A.indexOf(`
|
|
255
|
-
|
|
256
|
-
`)!==-1||w&&y;y=T;const R=d.inline,O=d.list;let N;d.list=!0,T?(d.inline=!1,N=Hc(A)+`
|
|
257
|
-
|
|
258
|
-
`):(d.inline=!0,N=Hc(A));const M=u(N,d);return d.inline=R,d.list=O,M}),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 J7=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),eq=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,jO=[_O,xO,EO,SO,wO,AO,CO,LO,MO],tq=[...jO,/^[^\n]+(?: \n|\n{2,})/,cv,TO,uv];function Hc(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function oc(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 nq(e){return V7.test(e)?"right":j7.test(e)?"center":P7.test(e)?"left":null}function oT(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 rq(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(M7,"").split("|").map(nq):[],a=e[3]?function(l,u,d){return l.trim().split(`
|
|
259
|
-
`).map(function(f){return oT(f,u,d,!0)})}(e[3],t,n):[],o=oT(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 lT(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function jo(e){return e.inline=1,e}function ra(e){return jo(function(t,n){return n.inline?e.exec(t):null})}function ia(e){return jo(function(t,n){return n.inline||n.simple?e.exec(t):null})}function xi(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function lc(e){return jo(function(t){return e.exec(t)})}function iq(e,t){if(t.inline||t.simple)return null;let n="";e.split(`
|
|
260
|
-
`).every(a=>(a+=`
|
|
261
|
-
`,!jO.some(o=>o.test(a))&&(n+=a,!!a.trim())));const r=Hc(n);return r==""?null:[n,,r]}const aq=/(javascript|vbscript|data(?!:image)):/i;function sq(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(aq.test(t))return null}catch{return null}return e}function cT(e){return e.replace(K7,"$1")}function mf(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 oq(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 lq(e,t,n){const r=n.inline||!1;n.inline=!1;const a=e(t,n);return n.inline=r,a}const $g=(e,t,n)=>({children:mf(t,e[2],n)});function qg(){return{}}function Kg(){return null}function cq(...e){return e.filter(Boolean).join(" ")}function Wg(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 uq(e="",t={}){function n(g,v,...x){const S=Wg(t.overrides,`${g}.props`,{});return t.createElement(function(A,w){const T=Wg(w,A);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:Wg(w,`${A}.component`,A):A}(g,t.overrides),rs({},v,S,{className:cq(v==null?void 0:v.className,S.className)||void 0}),...x)}function r(g){g=g.replace(x7,"");let v=!1;t.forceInline?v=!0:t.forceBlock||(v=I7.test(g)===!1);const x=f(d(v?g:`${Hc(g).replace($7,"")}
|
|
262
|
-
|
|
263
|
-
`,{inline:v}));for(;typeof x[x.length-1]=="string"&&!x[x.length-1].trim();)x.pop();if(t.wrapper===null)return x;const S=t.wrapper||(v?"span":"div");let A;if(x.length>1||t.forceWrapper)A=x;else{if(x.length===1)return A=x[0],typeof A=="string"?n("span",{key:"outer"},A):A;A=null}return t.createElement(S,{key:"outer"},A)}function a(g,v){const x=v.match(l7);return x?x.reduce(function(S,A){const w=A.indexOf("=");if(w!==-1){const T=function(M){return M.indexOf("-")!==-1&&M.match(A7)===null&&(M=M.replace(N7,function(D,L){return L.toUpperCase()})),M}(A.slice(0,w)).trim(),R=function(M){const D=M[0];return(D==='"'||D==="'")&&M.length>=2&&M[M.length-1]===D?M.slice(1,-1):M}(A.slice(w+1).trim()),O=rT[T]||T;if(O==="ref")return S;const N=S[O]=function(M,D,L,V){return D==="style"?function(U){const ce=[];let ie="",de=!1,X=!1,J="";if(!U)return ce;for(let ne=0;ne<U.length;ne++){const q=U[ne];if(q!=='"'&&q!=="'"||de||(X?q===J&&(X=!1,J=""):(X=!0,J=q)),q==="("&&ie.endsWith("url")?de=!0:q===")"&&de&&(de=!1),q!==";"||X||de)ie+=q;else{const ye=ie.trim();if(ye){const P=ye.indexOf(":");if(P>0){const Y=ye.slice(0,P).trim(),F=ye.slice(P+1).trim();ce.push([Y,F])}}ie=""}}const H=ie.trim();if(H){const ne=H.indexOf(":");if(ne>0){const q=H.slice(0,ne).trim(),ye=H.slice(ne+1).trim();ce.push([q,ye])}}return ce}(L).reduce(function(U,[ce,ie]){return U[ce.replace(/(-[a-z])/g,de=>de[1].toUpperCase())]=V(ie,M,ce),U},{}):o7.indexOf(D)!==-1?V(L,M,D):(L.match(w7)&&(L=L.slice(1,L.length-1)),L==="true"||L!=="false"&&L)}(g,T,R,t.sanitizer);typeof N=="string"&&(cv.test(N)||uv.test(N))&&(S[O]=r(N.trim()))}else A!=="style"&&(S[rT[A]||A]=!0);return S},{}):null}t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||sq,t.slugify=t.slugify||oc,t.namedCodesToUnicode=t.namedCodesToUnicode?rs({},iT,t.namedCodesToUnicode):iT,t.createElement=t.createElement||E.createElement;const o=[],l={},u={[ze.blockQuote]:{match:xi(_O),order:1,parse(g,v,x){const[,S,A]=g[0].replace(d7,"").match(f7);return{alert:S,children:v(A,x)}},render(g,v,x){const S={key:x.key};return g.alert&&(S.className="markdown-alert-"+t.slugify(g.alert.toLowerCase(),oc),g.children.unshift({attrs:{},children:[{type:ze.text,text:g.alert}],noInnerParse:!0,type:ze.htmlBlock,tag:"header"})),n("blockquote",S,v(g.children,x))}},[ze.breakLine]:{match:lc(h7),order:1,parse:qg,render:(g,v,x)=>n("br",{key:x.key})},[ze.breakThematic]:{match:xi(m7),order:1,parse:qg,render:(g,v,x)=>n("hr",{key:x.key})},[ze.codeBlock]:{match:xi(EO),order:0,parse:g=>({lang:void 0,text:Hc(g[0].replace(/^ {4}/gm,"")).replace(aT,"$1")}),render:(g,v,x)=>n("pre",{key:x.key},n("code",rs({},g.attrs,{className:g.lang?`lang-${g.lang}`:""}),g.text))},[ze.codeFenced]:{match:xi(xO),order:0,parse:g=>({attrs:a("code",g[3]||""),lang:g[2]||void 0,text:g[4],type:ze.codeBlock})},[ze.codeInline]:{match:ia(p7),order:3,parse:g=>({text:g[2].replace(aT,"$1")}),render:(g,v,x)=>n("code",{key:x.key},g.text)},[ze.footnote]:{match:xi(v7),order:0,parse:g=>(o.push({footnote:g[2],identifier:g[1]}),{}),render:Kg},[ze.footnoteReference]:{match:ra(b7),order:1,parse:g=>({target:`#${t.slugify(g[1],oc)}`,text:g[1]}),render:(g,v,x)=>n("a",{key:x.key,href:t.sanitizer(g.target,"a","href")},n("sup",{key:x.key},g.text))},[ze.gfmTask]:{match:ra(E7),order:1,parse:g=>({completed:g[1].toLowerCase()==="x"}),render:(g,v,x)=>n("input",{checked:g.completed,key:x.key,readOnly:!0,type:"checkbox"})},[ze.heading]:{match:xi(t.enforceAtxHeadings?AO:SO),order:1,parse:(g,v,x)=>({children:mf(v,g[2],x),id:t.slugify(g[2],oc),level:g[1].length}),render:(g,v,x)=>n(`h${g.level}`,{id:g.id,key:x.key},v(g.children,x))},[ze.headingSetext]:{match:xi(wO),order:0,parse:(g,v,x)=>({children:mf(v,g[1],x),level:g[2]==="="?1:2,type:ze.heading})},[ze.htmlBlock]:{match:lc(cv),order:1,parse(g,v,x){const[,S]=g[3].match(q7),A=new RegExp(`^${S}`,"gm"),w=g[3].replace(A,""),T=(R=w,tq.some(L=>L.test(R))?lq:mf);var R;const O=g[1].toLowerCase(),N=s7.indexOf(O)!==-1,M=(N?O:g[1]).trim(),D={attrs:a(M,g[2]),noInnerParse:N,tag:M};return x.inAnchor=x.inAnchor||O==="a",N?D.text=g[3]:D.children=T(v,w,x),x.inAnchor=!1,D},render:(g,v,x)=>n(g.tag,rs({key:x.key},g.attrs),g.text||(g.children?v(g.children,x):""))},[ze.htmlSelfClosing]:{match:lc(uv),order:1,parse(g){const v=g[1].trim();return{attrs:a(v,g[2]||""),tag:v}},render:(g,v,x)=>n(g.tag,rs({},g.attrs,{key:x.key}))},[ze.htmlComment]:{match:lc(TO),order:1,parse:()=>({}),render:Kg},[ze.image]:{match:ia(eq),order:1,parse:g=>({alt:g[1],target:cT(g[2]),title:g[3]}),render:(g,v,x)=>n("img",{key:x.key,alt:g.alt||void 0,title:g.title||void 0,src:t.sanitizer(g.target,"img","src")})},[ze.link]:{match:ra(J7),order:3,parse:(g,v,x)=>({children:oq(v,g[1],x),target:cT(g[2]),title:g[3]}),render:(g,v,x)=>n("a",{key:x.key,href:t.sanitizer(g.target,"a","href"),title:g.title},v(g.children,x))},[ze.linkAngleBraceStyleDetector]:{match:ra(R7),order:0,parse:g=>({children:[{text:g[1],type:ze.text}],target:g[1],type:ze.link})},[ze.linkBareUrlDetector]:{match:jo((g,v)=>v.inAnchor||t.disableAutoLink?null:ra(T7)(g,v)),order:0,parse:g=>({children:[{text:g[1],type:ze.text}],target:g[1],title:void 0,type:ze.link})},[ze.linkMailtoDetector]:{match:ra(C7),order:0,parse(g){let v=g[1],x=g[1];return c7.test(x)||(x="mailto:"+x),{children:[{text:v.replace("mailto:",""),type:ze.text}],target:x,type:ze.link}}},[ze.orderedList]:sT(n,1),[ze.unorderedList]:sT(n,2),[ze.newlineCoalescer]:{match:xi(g7),order:3,parse:qg,render:()=>`
|
|
264
|
-
`},[ze.paragraph]:{match:jo(iq),order:3,parse:$g,render:(g,v,x)=>n("p",{key:x.key},v(g.children,x))},[ze.ref]:{match:ra(k7),order:0,parse:g=>(l[g[1]]={target:g[2],title:g[4]},{}),render:Kg},[ze.refImage]:{match:ia(O7),order:0,parse:g=>({alt:g[1]||void 0,ref:g[2]}),render:(g,v,x)=>l[g.ref]?n("img",{key:x.key,alt:g.alt,src:t.sanitizer(l[g.ref].target,"img","src"),title:l[g.ref].title}):null},[ze.refLink]:{match:ra(D7),order:0,parse:(g,v,x)=>({children:v(g[1],x),fallbackChildren:g[0],ref:g[2]}),render:(g,v,x)=>l[g.ref]?n("a",{key:x.key,href:t.sanitizer(l[g.ref].target,"a","href"),title:l[g.ref].title},v(g.children,x)):n("span",{key:x.key},g.fallbackChildren)},[ze.table]:{match:xi(CO),order:1,parse:rq,render(g,v,x){const S=g;return n("table",{key:x.key},n("thead",null,n("tr",null,S.header.map(function(A,w){return n("th",{key:w,style:lT(S,w)},v(A,x))}))),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:lT(S,R)},v(T,x))}))})))}},[ze.text]:{match:lc(G7),order:4,parse:g=>({text:g[0].replace(S7,(v,x)=>t.namedCodesToUnicode[x]?t.namedCodesToUnicode[x]:v)}),render:g=>g.text},[ze.textBolded]:{match:ia(B7),order:2,parse:(g,v,x)=>({children:v(g[2],x)}),render:(g,v,x)=>n("strong",{key:x.key},v(g.children,x))},[ze.textEmphasized]:{match:ia(z7),order:3,parse:(g,v,x)=>({children:v(g[2],x)}),render:(g,v,x)=>n("em",{key:x.key},v(g.children,x))},[ze.textEscaped]:{match:ia(F7),order:1,parse:g=>({text:g[1],type:ze.text})},[ze.textMarked]:{match:ia(U7),order:3,parse:$g,render:(g,v,x)=>n("mark",{key:x.key},v(g.children,x))},[ze.textStrikethroughed]:{match:ia(H7),order:3,parse:$g,render:(g,v,x)=>n("del",{key:x.key},v(g.children,x))}};t.disableParsingRawHTML===!0&&(delete u[ze.htmlBlock],delete u[ze.htmlSelfClosing]);const d=function(g){let v=Object.keys(g);function x(S,A){let w,T,R=[],O="",N="";for(A.prevCapture=A.prevCapture||"";S;){let M=0;for(;M<v.length;){if(O=v[M],w=g[O],A.inline&&!w.match.inline){M++;continue}const D=w.match(S,A);if(D){N=D[0],A.prevCapture+=N,S=S.substring(N.length),T=w.parse(D,x,A),T.type==null&&(T.type=O),R.push(T);break}M++}}return A.prevCapture="",R}return v.sort(function(S,A){let w=g[S].order,T=g[A].order;return w!==T?w-T:S<A?-1:1}),function(S,A){return x(function(w){return w.replace(y7,`
|
|
265
|
-
`).replace(_7,"").replace(L7," ")}(S),A)}}(u),f=(m=function(g,v){return function(x,S,A){const w=g[x.type].render;return v?v(()=>w(x,S,A),x,S,A):w(x,S,A)}}(u,t.renderRule),function g(v,x={}){if(Array.isArray(v)){const S=x.key,A=[];let w=!1;for(let T=0;T<v.length;T++){x.key=T;const R=g(v[T],x),O=typeof R=="string";O&&w?A[A.length-1]+=R:R!==null&&A.push(R),w=O}return x.key=S,A}return m(v,g,x)});var m;const y=r(e);return o.length?n("div",null,y,n("footer",{key:"footer"},o.map(function(g){return n("div",{id:t.slugify(g.identifier,oc),key:g.identifier},g.identifier,f(d(g.footnote,{inline:!0})))}))):y}const dq=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,a7);return E.cloneElement(uq(t,n),r)},fq=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"})},hq=()=>{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&&fq(e)},[e]),null},mq=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function pq(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 y=f===a.children.length-1;if(!dT(m.value,y))return d;const v=m.value.split(/(\s+\/\/)/);if(v.length<=1)return d;let x=[v[0]];for(let S=1;S<v.length;S+=2)x.push(v[S]+(v[S+1]||""));return x=x.filter(Boolean),x.length<=1?d:x.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,y=dT(f.value,m);if(y)if(t&&!m&&u!==0){const g=uT(o[u-1],"{")&&uT(o[u+1],"}");r.push({info:y,line:a,token:d,isLineCommentOnly:o.length===3&&d.children.length===1,isJsxStyle:g})}else r.push({info:y,line:a,token:d,isLineCommentOnly:o.length===1&&d.children.length===1,isJsxStyle:!1})}}return r}function uT(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function dT(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 mq){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 gq(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function PO(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=pq(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 y=!1;if(f.info[1]=f.info[1].replace(t,(...v)=>n.call(this,v,f.line,f.token,o,m)?(y=!0,""):v[0]),!y)continue;r==="v1"&&(f.info[1]=gq(f.info[1]));const g=f.info[1].trim().length===0;if(g&&(f.info[1]=""),g&&f.isLineCommentOnly)l.push(f.line);else if(g&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(g)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),y=a.children[m+1];let g=1;(y==null?void 0:y.type)==="text"&&(y==null?void 0:y.value)===`
|
|
266
|
-
`&&(g=2),a.children.splice(m,g)}}}}function yq(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 $d=Symbol("highlighted-lines");function vq(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[$d]??(a[$d]=yq(this.options.meta.__raw)),(a[$d]??[]).includes(r)&&this.addClassToHast(n,t),n}}}function bq(e){return e?Array.from(e.matchAll(/\/((?:\\.|[^/])+)\//g)).map(n=>n[1].replace(/\\(.)/g,"$1")):[]}function _q(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=bq(this.options.meta.__raw);r.decorations||(r.decorations=[]);for(const l of a){const u=xq(n,l);for(const d of u)r.decorations.push({start:d,end:d+l.length,properties:{class:t}})}}}}function xq(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 Eq(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function t0(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0}=e;return PO(t,new RegExp(`\\s*\\[!code (${Object.keys(n).map(Eq).join("|")})(:\\d+)?\\]`),function([a,o,l=":1"],u,d,f,m){const y=Number.parseInt(l.slice(1),10);for(let g=m;g<Math.min(m+y,f.length);g++)this.addClassToHast(f[g],n[o]);return r&&this.addClassToHast(this.pre,r),!0},e.matchAlgorithm)}function Sq(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff"}=e;return t0({classMap:{"++":t,"--":n},classActivePre:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function Aq(e={}){const{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:n="has-highlighted"}=e;return t0({classMap:t,classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function wq(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted"}=e;return t0({classMap:{highlight:t,hl:t},classActivePre:n,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function Tq(e,t,n,r){const a=VO(e);let o=a.indexOf(n);for(;o!==-1;)Cq.call(this,e.children,t,o,n.length,r),o=a.indexOf(n,o+1)}function VO(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(VO).join(""):""}function Cq(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(Rq([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 y=Nq(u,d,f,m);this.addClassToHast(y[1],a);const g=y.filter(Boolean);e.splice(l,1,...g),l+=g.length-1}o+=d.value.length}}}function Rq(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function Nq(e,t,n,r){const a=t.value,o=l=>kq(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 kq(e,t){return{...e,properties:{...e.properties},...t}}function Oq(e={}){const{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return PO("@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 y=f;y<Math.min(f+m,d.length);y++)Tq.call(this,d[y],u,a,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}const Dq="modulepreload",Iq=function(e){return"/"+e},fT={},I=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(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=l(n.map(f=>{if(f=Iq(f),f in fT)return;fT[f]=!0;const m=f.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":Dq,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,x)=>{g.addEventListener("load",v),g.addEventListener("error",()=>x(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 tn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Lq(e){return n0(e)}function n0(e){return Array.isArray(e)?Mq(e):e instanceof RegExp?e:typeof e=="object"?jq(e):e}function Mq(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=n0(e[n]);return t}function jq(e){let t={};for(let n in e)t[n]=n0(e[n]);return t}function BO(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function zO(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?zO(e.substring(0,e.length-1)):e.substr(~t+1)}var Yg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,qd=class{static hasCaptures(e){return e===null?!1:(Yg.lastIndex=0,Yg.test(e))}static replaceCaptures(e,t,n){return e.replace(Yg,(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 UO(e,t){return e<t?-1:e>t?1:0}function HO(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=UO(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function hT(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 FO(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var GO=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}},Kf=class{constructor(e,t,n){le(this,"_cachedMatchRoot",new GO(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Bq(e),t)}static createFromParsedTheme(e,t){return Uq(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=>Pq(e.parent,a.parentScopes));return r?new $O(r.fontStyle,r.foreground,r.background):null}},Zg=class pf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new pf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new pf(n,t[r]);return n}push(t){return new pf(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 Pq(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&&!Vq(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Vq(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var $O=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Bq(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 y=l.scope;y=y.replace(/^[,]+/,""),y=y.replace(/[,]+$/,""),u=y.split(",")}else Array.isArray(l.scope)?u=l.scope:u=[""];let d=-1;if(typeof l.settings.fontStyle=="string"){d=0;let y=l.settings.fontStyle.split(" ");for(let g=0,v=y.length;g<v;g++)switch(y[g]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let f=null;typeof l.settings.foreground=="string"&&hT(l.settings.foreground)&&(f=l.settings.foreground);let m=null;typeof l.settings.background=="string"&&hT(l.settings.background)&&(m=l.settings.background);for(let y=0,g=u.length;y<g;y++){let x=u[y].trim().split(" "),S=x[x.length-1],A=null;x.length>1&&(A=x.slice(0,x.length-1),A.reverse()),n[r++]=new zq(S,A,a,d,f,m)}}return n}var zq=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}},vn=(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))(vn||{});function Uq(e,t){e.sort((d,f)=>{let m=UO(d.scope,f.scope);return m!==0||(m=HO(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 Hq(t),l=new $O(n,o.getId(r),o.getId(a)),u=new Gq(new dv(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 Kf(o,l,u)}var Hq=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)}},Fq=Object.freeze([]),dv=class qO{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||Fq,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new qO(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)}},Gq=class fv{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(fv._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 fv(this._mainRule.clone(),dv.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(HO(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 dv(t,n,r,a,o))}},Po=class sr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=sr.getLanguageId(t),r=sr.getTokenType(t),a=sr.getFontStyle(t),o=sr.getForeground(t),l=sr.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=sr.getLanguageId(t),f=sr.getTokenType(t),m=sr.containsBalancedBrackets(t)?1:0,y=sr.getFontStyle(t),g=sr.getForeground(t),v=sr.getBackground(t);return n!==0&&(d=n),r!==8&&(f=r),a!==null&&(m=a?1:0),o!==-1&&(y=o),l!==0&&(g=l),u!==0&&(v=u),(d<<0|f<<8|m<<10|y<<11|g<<15|v<<24)>>>0}};function Wf(e,t){const n=[],r=$q(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(mT(a)){const d=[];do d.push(a),a=r.next();while(mT(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(y=>y(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(y=>y(m))}}function mT(e){return!!e&&!!e.match(/[\w\.:]+/)}function $q(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 KO(e){typeof e.dispose=="function"&&e.dispose()}var Fc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Kq=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))}},Wq=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 Fc(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Kq;for(const n of e)Yq(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Fc){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 Yq(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 Fc?gf({baseGrammar:o,selfGrammar:a},r):hv(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 Fc(u))}function hv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Yf([r],t,n)}}function gf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Yf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Yf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Yf(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?BO({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Yf(r.patterns,{...t,repository:a},n);const o=r.include;if(!o)continue;const l=WO(o);switch(l.kind){case 0:gf({...t,selfGrammar:t.baseGrammar},n);break;case 1:gf(t,n);break;case 2:hv(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?hv(l.ruleName,d,n):gf(d,n)}else l.kind===4?n.add(new qq(l.scopeName,l.ruleName)):n.add(new Fc(l.scopeName));break}}}var Zq=class{constructor(){le(this,"kind",0)}},Xq=class{constructor(){le(this,"kind",1)}},Qq=class{constructor(e){le(this,"kind",2);this.ruleName=e}},Jq=class{constructor(e){le(this,"kind",3);this.scopeName=e}},eK=class{constructor(e,t){le(this,"kind",4);this.scopeName=e,this.ruleName=t}};function WO(e){if(e==="$base")return new Zq;if(e==="$self")return new Xq;const t=e.indexOf("#");if(t===-1)return new Jq(e);if(t===0)return new Qq(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new eK(n,r)}}var tK=/\\(\d+)/,pT=/\\(\d+)/g,nK=-1,YO=-2;var mu=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=qd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=qd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${zO(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:qd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:qd.replaceCaptures(this._contentName,e,t)}},rK=class extends mu{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!")}},iK=class extends mu{constructor(t,n,r,a,o){super(t,n,r,null);le(this,"_match");le(this,"captures");le(this,"_cachedCompiledPatterns");this._match=new Gc(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 $c,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gT=class extends mu{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 $c,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},mv=class extends mu{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 Gc(o,this.id),this.beginCaptures=l,this._end=new Gc(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 $c;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}},Zf=class extends mu{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 Gc(o,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new Gc(u,YO),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 $c;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 $c,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},ZO=class pn{static createCaptureRule(t,n,r,a,o){return t.registerRule(l=>new rK(n,l,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new iK(t.$vscodeTextmateLocation,t.id,t.name,t.match,pn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=BO({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new gT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,pn._compilePatterns(o,n,r))}return t.while?new Zf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,pn._compileCaptures(t.whileCaptures||t.captures,n,r),pn._compilePatterns(t.patterns,n,r)):new mv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,pn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,pn._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=pn.getCompiledRuleId(t[l],n,r)),a[u]=pn.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=WO(u.include);switch(f.kind){case 0:case 1:d=pn.getCompiledRuleId(r[u.include],n,r);break;case 2:let m=r[f.ruleName];m&&(d=pn.getCompiledRuleId(m,n,r));break;case 3:case 4:const y=f.scopeName,g=f.kind===4?f.ruleName:null,v=n.getExternalGrammar(y,r);if(v)if(g){let x=v.repository[g];x&&(d=pn.getCompiledRuleId(x,n,v.repository))}else d=pn.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else d=pn.getCompiledRuleId(u,n,r);if(d!==-1){const f=n.getRule(d);let m=!1;if((f instanceof gT||f instanceof mv||f instanceof Zf)&&f.hasMissingPatterns&&f.patterns.length===0&&(m=!0),m)continue;a.push(d)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Gc=class XO{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=tK.test(this.source):this.hasBackReferences=!1}clone(){return new XO(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 pT.lastIndex=0,this.source.replace(pT,(a,o)=>FO(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}},$c=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 yT(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 yT(e,r,this._items.map(a=>a.ruleId))}},yT=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(`
|
|
267
|
-
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Xg=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ei,aK=(Ei=class{constructor(t,n){le(this,"_defaultAttributes");le(this,"_embeddedLanguagesMatcher");le(this,"_getBasicScopeAttributes",new GO(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Xg(n,r)}));this._defaultAttributes=new Xg(t,8),this._embeddedLanguagesMatcher=new sK(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 Xg(0,0)),le(Ei,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Ei),sK=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])=>FO(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])}},vT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function QO(e,t,n,r,a,o,l,u){const d=t.content.length;let f=!1,m=-1;if(l){const v=oK(e,t,n,r,a,o);a=v.stack,r=v.linePos,n=v.isFirstLine,m=v.anchorPosition}const y=Date.now();for(;!f;){if(u!==0&&Date.now()-y>u)return new vT(a,!0);g()}return new vT(a,!1);function g(){const v=lK(e,t,n,r,a,m);if(!v){o.produce(a,d),f=!0;return}const x=v.captureIndices,S=v.matchedRuleId,A=x&&x.length>0?x[0].end>r:!1;if(S===nK){const w=a.getRule(e);o.produce(a,x[0].start),a=a.withContentNameScopesList(a.nameScopesList),pc(e,t,n,a,o,w.endCaptures,x),o.produce(a,x[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,x[0].start);const T=a,R=w.getName(t.content,x),O=a.contentNameScopesList.pushAttributed(R,e);if(a=a.push(S,r,m,x[0].end===d,null,O,O),w instanceof mv){const N=w;pc(e,t,n,a,o,N.beginCaptures,x),o.produce(a,x[0].end),m=x[0].end;const M=N.getContentName(t.content,x),D=O.pushAttributed(M,e);if(a=a.withContentNameScopesList(D),N.endHasBackReferences&&(a=a.withEndRule(N.getEndWithResolvedBackReferences(t.content,x))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(w instanceof Zf){const N=w;pc(e,t,n,a,o,N.beginCaptures,x),o.produce(a,x[0].end),m=x[0].end;const M=N.getContentName(t.content,x),D=O.pushAttributed(M,e);if(a=a.withContentNameScopesList(D),N.whileHasBackReferences&&(a=a.withEndRule(N.getWhileWithResolvedBackReferences(t.content,x))),!A&&T.hasSameRuleAs(a)){a=a.pop(),o.produce(a,d),f=!0;return}}else if(pc(e,t,n,a,o,w.captures,x),o.produce(a,x[0].end),a=a.pop(),!A){a=a.safePop(),o.produce(a,d),f=!0;return}}x[0].end>r&&(r=x[0].end,n=!1)}}function oK(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 Zf&&u.push({rule:f,stack:d})}for(let d=u.pop();d;d=u.pop()){const{ruleScanner:f,findOptions:m}=dK(d.rule,e,d.stack.endRule,n,r===l),y=f.findNextMatchSync(t,r,m);if(y){if(y.ruleId!==YO){a=d.stack.pop();break}y.captureIndices&&y.captureIndices.length&&(o.produce(d.stack,y.captureIndices[0].start),pc(e,t,n,d.stack,o,d.rule.whileCaptures,y.captureIndices),o.produce(d.stack,y.captureIndices[0].end),l=y.captureIndices[0].end,y.captureIndices[0].end>r&&(r=y.captureIndices[0].end,n=!1))}else{a=d.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function lK(e,t,n,r,a,o){const l=cK(e,t,n,r,a,o),u=e.getInjections();if(u.length===0)return l;const d=uK(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 cK(e,t,n,r,a,o){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=JO(l,e,a.endRule,n,r===o),f=u.findNextMatchSync(t,r,d);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function uK(e,t,n,r,a,o,l){let u=Number.MAX_VALUE,d=null,f,m=0;const y=o.contentNameScopesList.getScopeNames();for(let g=0,v=e.length;g<v;g++){const x=e[g];if(!x.matcher(y))continue;const S=t.getRule(x.ruleId),{ruleScanner:A,findOptions:w}=JO(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=x.priority,u===a))break}return d?{priorityMatch:m===-1,captureIndices:d,matchedRuleId:f}:null}function JO(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function dK(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function pc(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 y=0;y<d;y++){const g=o[y];if(g===null)continue;const v=l[y];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),g.retokenizeCapturedWithRuleId){const S=g.getName(u,l),A=r.contentNameScopesList.pushAttributed(S,e),w=g.getContentName(u,l),T=A.pushAttributed(w,e),R=r.push(g.retokenizeCapturedWithRuleId,v.start,-1,!1,null,A,T),O=e.createOnigString(u.substring(0,v.end));QO(e,O,n&&v.start===0,v.start,R,a,!1,0),KO(O);continue}const x=g.getName(u,l);if(x!==null){const A=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(x,e);f.push(new fK(A,v.end))}}for(;f.length>0;)a.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var fK=class{constructor(e,t){le(this,"scopes");le(this,"endPos");this.scopes=e,this.endPos=t}};function hK(e,t,n,r,a,o,l,u){return new pK(e,t,n,r,a,o,l,u)}function bT(e,t,n,r,a){const o=Wf(t,Xf),l=ZO.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 Xf(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(mK(t[a],r))return n=a+1,!0;return!1})}function mK(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 pK=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 aK(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=_T(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const d of Object.keys(a)){const f=Wf(d,Xf);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)bT(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&&bT(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]=_T(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=ZO.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===pv.NULL){a=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),y=Po.set(0,f.languageId,f.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),g=this.getRule(this._rootId).getName(null,null);let v;g?v=Cc.createRootAndLookUpScopeName(g,y,this):v=Cc.createRoot("unknown",y),t=new pv(null,this._rootId,-1,-1,!1,null,v,v)}else a=!1,t.reset();e=e+`
|
|
268
|
-
`;const o=this.createOnigString(e),l=o.content.length,u=new yK(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=QO(this,o,a,0,t,u,!0,r);return KO(o),{lineLength:l,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function _T(e,t){return e=Lq(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 Cc=class jr{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=Zg.push(a,o.scopeNames),r=new jr(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new jr(null,new Zg(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),o=new Zg(null,t),l=r.themeProvider.themeMatch(o),u=jr.mergeAttributes(n,a,l);return new jr(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return jr.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),Po.set(t,n.languageId,n.tokenType,null,a,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return jr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const o of r)a=jr._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=jr.mergeAttributes(t.tokenAttributes,a,l);return new jr(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}},lr,pv=(lr=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:lr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Cc.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(){lr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,l,u){return new lr(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 lr(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=Cc.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new lr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Cc.fromExtension(r,n.contentNameScopesList))}},le(lr,"NULL",new lr(null,0,0,0,!1,null,null,null)),lr),gK=class{constructor(e,t){le(this,"balancedBracketScopes");le(this,"unbalancedBracketScopes");le(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Wf(n,Xf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Wf(n,Xf).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}},yK=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=Po.set(a,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(a=Po.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}},vK=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,hK(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},bK=class{constructor(t){le(this,"_options");le(this,"_syncRegistry");le(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new vK(Kf.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Kf.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new gK(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,o){const l=new Wq(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)}},gv=pv.NULL;const _K=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class pu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}pu.prototype.normal={};pu.prototype.property={};pu.prototype.space=void 0;function eD(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new pu(n,r,t)}function yv(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let xK=0;const Ze=xs(),Ut=xs(),vv=xs(),ve=xs(),xt=xs(),Ao=xs(),zn=xs();function xs(){return 2**++xK}const bv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:Ut,commaOrSpaceSeparated:zn,commaSeparated:Ao,number:ve,overloadedBoolean:vv,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),Qg=Object.keys(bv);class r0 extends In{constructor(t,n,r,a){let o=-1;if(super(t,n),xT(this,"space",a),typeof r=="number")for(;++o<Qg.length;){const l=Qg[o];xT(this,Qg[o],(r&bv[l])===bv[l])}}}r0.prototype.defined=!0;function xT(e,t,n){n&&(e[t]=n)}function Jo(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new r0(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[yv(r)]=r,n[yv(o.attribute)]=r}return new pu(t,n,e.space)}const tD=Jo({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:xt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:ve,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:xt,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:Ut,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function nD(e,t){return t in e?e[t]:t}function rD(e,t){return nD(e,t.toLowerCase())}const EK=Jo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ao,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:xt,autoFocus:Ze,autoPlay:Ze,blocking:xt,capture:null,charSet:null,checked:Ze,cite:null,className:xt,cols:ve,colSpan:null,content:null,contentEditable:Ut,controls:Ze,controlsList:xt,coords:ve|Ao,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:vv,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:xt,height:ve,hidden:vv,high:ve,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ze,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,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:Ze,optimum:ve,pattern:null,ping:xt,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:xt,required:Ze,reversed:Ze,rows:ve,rowSpan:ve,sandbox:xt,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:Ut,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ze,disableRemotePlayback:Ze,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:rD}),SK=Jo({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:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ao,g2:Ao,glyphName:Ao,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ve,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zn,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nD}),iD=Jo({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()}}),aD=Jo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rD}),sD=Jo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),AK=/[A-Z]/g,ET=/-[a-z]/g,wK=/^data[-\w.:]+$/i;function TK(e,t){const n=yv(t);let r=t,a=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wK.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ET,RK);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ET.test(o)){let l=o.replace(AK,CK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=r0}return new a(r,t)}function CK(e){return"-"+e.toLowerCase()}function RK(e){return e.charAt(1).toUpperCase()}const NK=eD([tD,EK,iD,aD,sD],"html"),oD=eD([tD,SK,iD,aD,sD],"svg"),ST={}.hasOwnProperty;function kK(e,t){const n=t||{};function r(a,...o){let l=r.invalid;const u=r.handlers;if(a&&ST.call(a,e)){const d=String(a[e]);l=ST.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 OK=/["&'<>`]/g,DK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,IK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,LK=/[|\\{}()[\]^$+*?.]/g,AT=new WeakMap;function MK(e,t){if(e=e.replace(t.subset?jK(t.subset):OK,r),t.subset||t.escapeOnly)return e;return e.replace(DK,n).replace(IK,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 jK(e){let t=AT.get(e);return t||(t=PK(e),AT.set(e,t)),t}function PK(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(LK,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const VK=/[\dA-Fa-f]/;function BK(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!VK.test(String.fromCharCode(t))?r:r+";"}const zK=/\d/;function UK(e,t,n){const r="&#"+String(e);return n&&t&&!zK.test(String.fromCharCode(t))?r:r+";"}const HK=["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"],Jg={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:"€"},FK=["cent","copy","divide","gt","lt","not","para","times"],lD={}.hasOwnProperty,_v={};let Kd;for(Kd in Jg)lD.call(Jg,Kd)&&(_v[Jg[Kd]]=Kd);const GK=/[^\dA-Za-z]/;function $K(e,t,n,r){const a=String.fromCharCode(e);if(lD.call(_v,a)){const o=_v[a],l="&"+o;return n&&HK.includes(o)&&!FK.includes(o)&&(!r||t&&t!==61&&GK.test(String.fromCharCode(t)))?l:l+";"}return""}function qK(e,t,n){let r=BK(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=$K(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const o=UK(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function wo(e,t){return MK(e,Object.assign({format:qK},t))}const KK=/^>|^->|<!--|-->|--!>|<!-$/g,WK=[">"],YK=["<",">"];function ZK(e,t,n,r){return r.settings.bogusComments?"<?"+wo(e.value,Object.assign({},r.settings.characterReferences,{subset:WK}))+">":"<!--"+e.value.replace(KK,a)+"-->";function a(o){return wo(o,Object.assign({},r.settings.characterReferences,{subset:YK}))}}function XK(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function wT(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 QK(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function JK(e){return e.join(" ").trim()}const eW=/[ \t\n\f\r]/g;function i0(e){return typeof e=="object"?e.type==="text"?TT(e.value):!1:TT(e)}function TT(e){return e.replace(eW,"")===""}const Wt=uD(1),cD=uD(-1),tW=[];function uD(e){return t;function t(n,r,a){const o=n?n.children:tW;let l=(r||0)+e,u=o[l];if(!a)for(;u&&i0(u);)l+=e,u=o[l];return u}}const nW={}.hasOwnProperty;function dD(e){return t;function t(n,r,a){return nW.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const a0=dD({body:iW,caption:ey,colgroup:ey,dd:lW,dt:oW,head:ey,html:rW,li:sW,optgroup:cW,option:uW,p:aW,rp:CT,rt:CT,tbody:fW,td:RT,tfoot:hW,th:RT,thead:dW,tr:mW});function ey(e,t,n){const r=Wt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&i0(r.value.charAt(0)))}function rW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function iW(e,t,n){const r=Wt(n,t);return!r||r.type!=="comment"}function aW(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 sW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function oW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function lW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function CT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function cW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function uW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function dW(e,t,n){const r=Wt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function fW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function hW(e,t,n){return!Wt(n,t)}function mW(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function RT(e,t,n){const r=Wt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const pW=dD({body:vW,colgroup:bW,head:yW,html:gW,tbody:_W});function gW(e){const t=Wt(e,-1);return!t||t.type!=="comment"}function yW(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 vW(e){const t=Wt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&i0(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function bW(e,t,n){const r=cD(n,t),a=Wt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&a0(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function _W(e,t,n){const r=cD(n,t),a=Wt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&a0(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Wd={name:[[`
|
|
269
|
-
\f\r &/=>`.split(""),`
|
|
270
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
271
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
272
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
273
|
-
\f\r &>`.split(""),`\0
|
|
274
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
275
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
276
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function xW(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=oD);const f=EW(r,e.properties),m=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,m&&(l=!1),(f||!o||!pW(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||!a0(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function EW(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const o=SW(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 SW(e,t,n){const r=TK(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=wo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Wd.name[a][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?QK:JK)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?d:(e.settings.preferUnquoted&&(u=wo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Wd.unquoted[a][o]}))),u!==n&&(e.settings.quoteSmart&&wT(n,l)>wT(n,e.alternative)&&(l=e.alternative),u=l+wo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Wd.single:Wd.double)[a][o],attribute:!0}))+l),d+(u&&"="+u))}const AW=["<","&"];function fD(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:wo(e.value,Object.assign({},r.settings.characterReferences,{subset:AW}))}function wW(e,t,n,r){return r.settings.allowDangerousHtml?e.value:fD(e,t,n,r)}function TW(e,t,n,r){return r.all(e)}const CW=kK("type",{invalid:RW,unknown:NW,handlers:{comment:ZK,doctype:XK,element:xW,raw:wW,root:TW,text:fD}});function RW(e){throw new Error("Expected node, not `"+e+"`")}function NW(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const kW={},OW={},DW=[];function IW(e,t){const n=t||kW,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:LW,all:MW,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||_K,characterReferences:n.characterReferences||OW,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?oD:NK,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function LW(e,t,n){return CW(e,t,n,this)}function MW(e){const t=[],n=e&&e.children||DW;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Qf(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 os(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function jW(e){return Array.isArray(e)?e:[e]}async function hD(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function s0(e){return!e||["plaintext","txt","text","plain"].includes(e)}function mD(e){return e==="ansi"||s0(e)}function o0(e){return e==="none"}function pD(e){return o0(e)}function gD(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 Ih(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 PW(e){const t=Ih(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 VW(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 BW(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 zW(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?BW(a,o):a})):e}function UW(e,t,n,r){const a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(d=>Jf(e.variants[d])),l=new Set(o.flatMap(d=>Object.keys(d))),u={};return o.forEach((d,f)=>{for(const m of l){const y=d[m]||"inherit";if(f===0&&r)u[m]=y;else{const g=m==="color"?"":m==="background-color"?"-bg":`-${m}`,v=n+t[f]+(m==="color"?"":g);u[v]=y}}}),a.htmlStyle=u,a}function Jf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&vn.Italic&&(t["font-style"]="italic"),e.fontStyle&vn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&vn.Underline&&n.push("underline"),e.fontStyle&vn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function xv(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const yD=new WeakMap;function Lh(e,t){yD.set(e,t)}function qc(e){return yD.get(e)}class el{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 el(Object.fromEntries(jW(n).map(r=>[r,gv])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return HW(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function HW(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 FW(e,t){if(!(e instanceof el))throw new tn("Invalid grammar state");return e.getInternalStack(t)}function GW(){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 tn(`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 tn(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${a.lines.length}`);if(l.character<0||l.character>u.length)throw new tn(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${u.length}`);return{...l,offset:a.posToIndex(l.line,l.character)}}};const a=PW(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));$W(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 zW(n,a)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const r=t(this),a=Array.from(n.children).filter(y=>y.type==="element"&&y.tagName==="span");if(a.length!==r.converter.lines.length)throw new tn(`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(y,g,v,x){const S=a[y];let A="",w=-1,T=-1;if(g===0&&(w=0),v===0&&(T=0),v===Number.POSITIVE_INFINITY&&(T=S.children.length),w===-1||T===-1)for(let O=0;O<S.children.length;O++)A+=vD(S.children[O]),w===-1&&A.length===g&&(w=O+1),T===-1&&A.length===v&&(T=O+1);if(w===-1)throw new tn(`Failed to find start index for decoration ${JSON.stringify(x.start)}`);if(T===-1)throw new tn(`Failed to find end index for decoration ${JSON.stringify(x.end)}`);const R=S.children.slice(w,T);if(!x.alwaysWrap&&R.length===S.children.length)u(S,x,"line");else if(!x.alwaysWrap&&R.length===1&&R[0].type==="element")u(R[0],x,"token");else{const O={type:"element",tagName:"span",properties:{},children:R};u(O,x,"wrapper"),S.children.splice(w,R.length,O)}}function l(y,g){a[y]=u(a[y],g,"line")}function u(y,g,v){var A;const x=g.properties||{},S=g.transform||(w=>w);return y.tagName=g.tagName||"span",y.properties={...y.properties,...x,class:y.properties.class},(A=g.properties)!=null&&A.class&&gD(y,g.properties.class),y=S(y,v)||y,y}const d=[],f=r.decorations.sort((y,g)=>g.start.offset-y.start.offset||y.end.offset-g.end.offset);for(const y of f){const{start:g,end:v}=y;if(g.line===v.line)o(g.line,g.character,v.character,y);else if(g.line<v.line){o(g.line,g.character,Number.POSITIVE_INFINITY,y);for(let x=g.line+1;x<v.line;x++)d.unshift(()=>l(x,y));o(v.line,0,v.character,y)}}d.forEach(y=>y())}}}function $W(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new tn(`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 tn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function vD(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(vD).join(""):""}const qW=[GW()];function eh(e){return[...e.transformers||[],...qW]}var ls=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ty={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function KW(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 NT(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 WW(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)ty[r]&&t.push({type:"setDecoration",value:ty[r]});else if(r<=29){const a=ty[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:ls[r-30]}});else if(r===38){const a=NT(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:ls[r-40]}});else if(r===48){const a=NT(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:ls[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ls[r-100+8]}})}return t}function YW(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let o=0;do{const l=KW(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=WW(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 ZW={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 XW(e=ZW){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<ls.length;f++)r.push(t(ls[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 y=0;y<6;y++)r.push(n([u[f],u[m],u[y]]));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 QW(e,t,n){const r=Qf(e,n),a=Ih(t),o=XW(Object.fromEntries(ls.map(u=>{var d;return[u,(d=e.colors)==null?void 0:d[`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`]]}))),l=YW();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=os(f,r),m=os(m,r),d.decorations.has("dim")&&(f=JW(f));let y=vn.None;return d.decorations.has("bold")&&(y|=vn.Bold),d.decorations.has("italic")&&(y|=vn.Italic),d.decorations.has("underline")&&(y|=vn.Underline),d.decorations.has("strikethrough")&&(y|=vn.Strikethrough),{content:d.value,offset:u[1],color:f,bgColor:m,fontStyle:y}}))}function JW(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 l0(e,t,n={}){const{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(s0(r)||o0(a))return Ih(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:o,colorMap:l}=e.setTheme(a);if(r==="ansi")return QW(o,t,n);const u=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==u.name)throw new tn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new tn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return tY(t,u,o,l,n)}function eY(...e){if(e.length===2)return qc(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(s0(a)||o0(o))throw new tn("Plain language does not have grammar state");if(a==="ansi")throw new tn("ANSI language does not have grammar state");const{theme:l,colorMap:u}=t.setTheme(o),d=t.getLanguage(a);return new el(th(n,d,l,u,r).stateStack,d.name,l.name)}function tY(e,t,n,r,a){const o=th(e,t,n,r,a),l=new el(th(e,t,n,r,a).stateStack,t.name,n.name);return Lh(o.tokens,l),o.tokens}function th(e,t,n,r,a){const o=Qf(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:u=500}=a,d=Ih(e);let f=a.grammarState?FW(a.grammarState,n.name)??gv:a.grammarContextCode!=null?th(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:gv,m=[];const y=[];for(let g=0,v=d.length;g<v;g++){const[x,S]=d[g];if(x===""){m=[],y.push([]);continue}if(l>0&&x.length>=l){m=[],y.push([{content:x,offset:S,color:"",fontStyle:0}]);continue}let A,w,T;a.includeExplanation&&(A=t.tokenizeLine(x,f,u),w=A.tokens,T=0);const R=t.tokenizeLine2(x,f,u),O=R.tokens.length/2;for(let N=0;N<O;N++){const M=R.tokens[2*N],D=N+1<O?R.tokens[2*N+2]:x.length;if(M===D)continue;const L=R.tokens[2*N+1],V=os(r[Po.getForeground(L)],o),U=Po.getFontStyle(L),ce={content:x.substring(M,D),offset:S+M,color:V,fontStyle:U};if(a.includeExplanation){const ie=[];if(a.includeExplanation!=="scopeName")for(const X of n.settings){let J;switch(typeof X.scope){case"string":J=X.scope.split(/,/).map(H=>H.trim());break;case"object":J=X.scope;break;default:continue}ie.push({settings:X,selectors:J.map(H=>H.split(/ /))})}ce.explanation=[];let de=0;for(;M+de<D;){const X=w[T],J=x.substring(X.startIndex,X.endIndex);de+=J.length,ce.explanation.push({content:J,scopes:a.includeExplanation==="scopeName"?nY(X.scopes):rY(ie,X.scopes)}),T+=1}}m.push(ce)}y.push(m),m=[],f=R.ruleStack}return{tokens:y,stateStack:f}}function nY(e){return e.map(t=>({scopeName:t}))}function rY(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r];n[r]={scopeName:o,themeMatches:aY(e,o,t.slice(0,r))}}return n}function kT(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function iY(e,t,n){if(!kT(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)kT(e[r],n[a])&&(r-=1),a-=1;return r===-1}function aY(e,t,n){const r=[];for(const{selectors:a,settings:o}of e)for(const l of a)if(iY(l,t,n)){r.push(o);break}return r}function bD(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=l0(e,t,{...n,theme:d.theme}),m=qc(f),y=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:f,state:m,theme:y}}),o=sY(...a.map(d=>d.tokens)),l=o[0].map((d,f)=>d.map((m,y)=>{const g={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=m.explanation),o.forEach((v,x)=>{const{content:S,explanation:A,offset:w,...T}=v[f][y];g.variants[r[x].color]=T}),g})),u=a[0].state?new el(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&&Lh(l,u),l}function sY(...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 nh(e,t,n){let r,a,o,l,u,d;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:m="--shiki-"}=n,y=Object.entries(n.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,w)=>A.color===f?-1:w.color===f?1:0);if(y.length===0)throw new tn("`themes` option must not be empty");const g=bD(e,t,n);if(d=qc(g),f&&!y.find(A=>A.color===f))throw new tn(`\`themes\` option must contain the defaultColor key \`${f}\``);const v=y.map(A=>e.getTheme(A.theme)),x=y.map(A=>A.color);o=g.map(A=>A.map(w=>UW(w,x,m,f))),d&&Lh(o,d);const S=y.map(A=>Qf(A.theme,n));a=y.map((A,w)=>(w===0&&f?"":`${m+A.color}:`)+(os(v[w].fg,S[w])||"inherit")).join(";"),r=y.map((A,w)=>(w===0&&f?"":`${m+A.color}-bg:`)+(os(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=Qf(n.theme,n);o=l0(e,t,n);const m=e.getTheme(n.theme);r=os(m.bg,f),a=os(m.fg,f),l=m.name,d=qc(o)}else throw new tn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:r,themeName:l,rootStyle:u,grammarState:d}}function rh(e,t,n,r={meta:{},options:n,codeToHast:(a,o)=>rh(e,a,o),codeToTokens:(a,o)=>nh(e,a,o)}){var x,S;let a=t;for(const A of eh(n))a=((x=A.preprocess)==null?void 0:x.call(r,a,n))||a;let{tokens:o,fg:l,bg:u,themeName:d,rootStyle:f,grammarState:m}=nh(e,a,n);const{mergeWhitespaces:y=!0,mergeSameStyleTokens:g=!1}=n;y===!0?o=lY(o):y==="never"&&(o=cY(o)),g&&(o=uY(o));const v={...r,get source(){return a}};for(const A of eh(n))o=((S=A.tokens)==null?void 0:S.call(v,o))||o;return oY(o,{...n,fg:l,bg:u,themeName:d,rootStyle:f},v,m)}function oY(e,t,n,r=qc(e)){var x,S,A;const a=eh(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 y=[],g={...n,structure:u,addClassToHast:gD,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 y}};if(e.forEach((w,T)=>{var N,M;T&&(u==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
|
|
277
|
-
`}));let R={type:"element",tagName:"span",properties:{class:"line"},children:[]},O=0;for(const D of w){let L={type:"element",tagName:"span",properties:{...D.htmlAttrs},children:[{type:"text",value:D.content}]};const V=xv(D.htmlStyle||Jf(D));V&&(L.properties.style=V);for(const U of a)L=((N=U==null?void 0:U.span)==null?void 0:N.call(g,L,T+1,O,R,D))||L;u==="inline"?l.children.push(L):u==="classic"&&R.children.push(L),O+=D.content.length}if(u==="classic"){for(const D of a)R=((M=D==null?void 0:D.line)==null?void 0:M.call(g,R,T+1))||R;y.push(R),o.push(R)}}),u==="classic"){for(const w of a)m=((x=w==null?void 0:w.code)==null?void 0:x.call(g,m))||m;f.children.push(m);for(const w of a)f=((S=w==null?void 0:w.pre)==null?void 0:S.call(g,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(g,v))||v;return r&&Lh(v,r),v}function lY(e){return e.map(t=>{const n=[];let r="",a=0;return t.forEach((o,l)=>{const d=!(o.fontStyle&&(o.fontStyle&vn.Underline||o.fontStyle&vn.Strikethrough));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 cY(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}))}function uY(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n[n.length-1],o=a.htmlStyle||xv(Jf(a)),l=r.htmlStyle||xv(Jf(r)),u=a.fontStyle&&(a.fontStyle&vn.Underline||a.fontStyle&vn.Strikethrough),d=r.fontStyle&&(r.fontStyle&vn.Underline||r.fontStyle&vn.Strikethrough);!u&&!d&&o===l?a.content+=r.content:n.push({...r})}return n})}const dY=IW;function fY(e,t,n){var o;const r={meta:{},options:n,codeToHast:(l,u)=>rh(e,l,u),codeToTokens:(l,u)=>nh(e,l,u)};let a=dY(rh(e,t,n,r));for(const l of eh(n))a=((o=l.postprocess)==null?void 0:o.call(r,a,n))||a;return a}const OT={light:"#333333",dark:"#bbbbbb"},DT={light:"#fffffe",dark:"#1e1e1e"},IT="__shiki_resolved";function c0(e){var u,d,f,m,y;if(e!=null&&e[IT])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const g=t.settings?t.settings.find(v=>!v.name&&!v.scope):void 0;(u=g==null?void 0:g.settings)!=null&&u.foreground&&(r=g.settings.foreground),(d=g==null?void 0:g.settings)!=null&&d.background&&(n=g.settings.background),!r&&((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"?OT.light:OT.dark),n||(n=t.type==="light"?DT.light:DT.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(g){var x;if(o.has(g))return o.get(g);a+=1;const v=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return(x=t.colorReplacements)!=null&&x[`#${v}`]?l(g):(o.set(g,v),v)}t.settings=t.settings.map(g=>{var A,w;const v=((A=g.settings)==null?void 0:A.foreground)&&!g.settings.foreground.startsWith("#"),x=((w=g.settings)==null?void 0:w.background)&&!g.settings.background.startsWith("#");if(!v&&!x)return g;const S={...g,settings:{...g.settings}};if(v){const T=l(g.settings.foreground);t.colorReplacements[T]=g.settings.foreground,S.settings.foreground=T}if(x){const T=l(g.settings.background);t.colorReplacements[T]=g.settings.background,S.settings.background=T}return S});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((y=t.colors[g])!=null&&y.startsWith("#"))){const v=l(t.colors[g]);t.colorReplacements[v]=t.colors[g],t.colors[g]=v}return Object.defineProperty(t,IT,{enumerable:!1,writable:!1,value:!0}),t}async function _D(e){return Array.from(new Set((await Promise.all(e.filter(t=>!mD(t)).map(async t=>await hD(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function xD(e){return(await Promise.all(e.map(async n=>pD(n)?null:c0(await hD(n))))).filter(n=>!!n)}let hY=3;function mY(e,t=3){t>hY||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let _o=class extends Error{constructor(t){super(t),this.name="ShikiError"}};class pY extends bK{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=c0(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Kf.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new _o(`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 y;return(y=m.embeddedLangsLazy)==null?void 0:y.includes(n.name)}));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const 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 _o(`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 gY{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 cc=0;function yY(e){cc+=1,e.warnings!==!1&&cc>=10&&cc%10===0&&console.warn(`[Shiki] ${cc} 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 _o("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(c0),a=new gY(e.engine,n),o=new pY(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 _o(`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 _o(`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 O=o.getColorMap();return{theme:R,colorMap:O}}function m(){return A(),o.getLoadedThemes()}function y(){return A(),o.getLoadedLanguages()}function g(...T){A(),o.loadLanguages(T.flat(1))}async function v(...T){return g(await _D(T))}function x(...T){A();for(const R of T.flat(1))o.loadTheme(R)}async function S(...T){return A(),x(await xD(T))}function A(){if(t)throw new _o("Shiki instance has been disposed")}function w(){t||(t=!0,o.dispose(),cc-=1)}return{setTheme:f,getTheme:d,getLanguage:u,getLoadedThemes:m,getLoadedLanguages:y,loadLanguage:v,loadLanguageSync:g,loadTheme:S,loadThemeSync:x,dispose:w,[Symbol.dispose]:w}}async function vY(e){e.engine||mY("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([xD(e.themes||[]),_D(e.langs||[]),e.engine]);return yY({...e,themes:t,langs:n,engine:r})}async function bY(e){const t=await vY(e);return{getLastGrammarState:(...n)=>eY(t,...n),codeToTokensBase:(n,r)=>l0(t,n,r),codeToTokensWithThemes:(n,r)=>bD(t,n,r),codeToTokens:(n,r)=>nh(t,n,r),codeToHast:(n,r)=>rh(t,n,r),codeToHtml:(n,r)=>fY(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function _Y(e){const t=e.langs,n=e.themes,r=e.engine;async function a(o){function l(y){if(typeof y=="string"){if(mD(y))return[];const g=t[y];if(!g)throw new tn(`Language \`${y}\` is not included in this bundle. You may want to load it from external source.`);return g}return y}function u(y){if(pD(y))return"none";if(typeof y=="string"){const g=n[y];if(!g)throw new tn(`Theme \`${y}\` is not included in this bundle. You may want to load it from external source.`);return g}return y}const d=(o.themes??[]).map(y=>u(y)),f=(o.langs??[]).map(y=>l(y)),m=await bY({engine:o.engine??r(),...o,themes:d,langs:f});return{...m,loadLanguage(...y){return m.loadLanguage(...y.map(l))},loadTheme(...y){return m.loadTheme(...y.map(u))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}function xY(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 EY(e,t){const n=xY(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 ED=[{id:"abap",name:"ABAP",import:()=>I(()=>import("./abap-BdImnpbu.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>I(()=>import("./actionscript-3-CfeIJUat.js"),[])},{id:"ada",name:"Ada",import:()=>I(()=>import("./ada-bCR0ucgS.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>I(()=>import("./angular-html-Bbf3ZyxA.js").then(e=>e.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>I(()=>import("./angular-ts-C26w9mnW.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>I(()=>import("./apache-Pmp26Uib.js"),[])},{id:"apex",name:"Apex",import:()=>I(()=>import("./apex-QX45V2Sx.js"),[])},{id:"apl",name:"APL",import:()=>I(()=>import("./apl-e980N3t4.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>I(()=>import("./applescript-Co6uUVPk.js"),[])},{id:"ara",name:"Ara",import:()=>I(()=>import("./ara-BRHolxvo.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>I(()=>import("./asciidoc-CdggvHu8.js"),[])},{id:"asm",name:"Assembly",import:()=>I(()=>import("./asm-D_Q5rh1f.js"),[])},{id:"astro",name:"Astro",import:()=>I(()=>import("./astro-DAp1zUbp.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>I(()=>import("./awk-DMzUqQB5.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>I(()=>import("./ballerina-BFfxhgS-.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>I(()=>import("./bat-BkioyH1T.js"),[])},{id:"beancount",name:"Beancount",import:()=>I(()=>import("./beancount-BoKiGodi.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>I(()=>import("./berry-D08WgyRC.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>I(()=>import("./bibtex-CHM0blh-.js"),[])},{id:"bicep",name:"Bicep",import:()=>I(()=>import("./bicep-6nHXG8SA.js"),[])},{id:"blade",name:"Blade",import:()=>I(()=>import("./blade-DGJDb2eD.js"),__vite__mapDeps([13,14,1,2,3,7,8,15,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>I(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([16,17]))},{id:"c",name:"C",import:()=>I(()=>import("./c-BIGW1oBm.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>I(()=>import("./cadence-D2CYqzqI.js"),[])},{id:"cairo",name:"Cairo",import:()=>I(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([18,19]))},{id:"clarity",name:"Clarity",import:()=>I(()=>import("./clarity-CHh-QcGE.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>I(()=>import("./clojure-P80f7IUj.js"),[])},{id:"cmake",name:"CMake",import:()=>I(()=>import("./cmake-D1j8_8rp.js"),[])},{id:"cobol",name:"COBOL",import:()=>I(()=>import("./cobol-CCPHrsME.js"),__vite__mapDeps([20,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>I(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>I(()=>import("./codeql-DsOJ9woJ.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>I(()=>import("./coffee-JUOWOZUj.js"),__vite__mapDeps([21,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>I(()=>import("./common-lisp-Cg-RD9OK.js"),[])},{id:"coq",name:"Coq",import:()=>I(()=>import("./coq-CMdgaOU9.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>I(()=>import("./cpp-ChttZZSa.js"),__vite__mapDeps([22,23,24,25,15]))},{id:"crystal",name:"Crystal",import:()=>I(()=>import("./crystal-CfkhwHAQ.js"),__vite__mapDeps([26,1,2,3,15,25,27]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>I(()=>import("./csharp-CHadp7IV.js"),[])},{id:"css",name:"CSS",import:()=>I(()=>import("./css-DPfMkruS.js"),[])},{id:"csv",name:"CSV",import:()=>I(()=>import("./csv-fuZLfV_i.js"),[])},{id:"cue",name:"CUE",import:()=>I(()=>import("./cue-D82EKSYY.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>I(()=>import("./cypher-COkxafJQ.js"),[])},{id:"d",name:"D",import:()=>I(()=>import("./d-85-TOEBH.js"),[])},{id:"dart",name:"Dart",import:()=>I(()=>import("./dart-CF10PKvl.js"),[])},{id:"dax",name:"DAX",import:()=>I(()=>import("./dax-CEL-wOlO.js"),[])},{id:"desktop",name:"Desktop",import:()=>I(()=>import("./desktop-BmXAJ9_W.js"),[])},{id:"diff",name:"Diff",import:()=>I(()=>import("./diff-D97Zzqfu.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>I(()=>import("./docker-BcOcwvcX.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>I(()=>import("./dotenv-Da5cRb03.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>I(()=>import("./dream-maker-BtqSS_iP.js"),[])},{id:"edge",name:"Edge",import:()=>I(()=>import("./edge-CKszZCnI.js"),__vite__mapDeps([28,11,1,2,3,14]))},{id:"elixir",name:"Elixir",import:()=>I(()=>import("./elixir-Cc7HHYVZ.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>I(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([30,24,25]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>I(()=>import("./emacs-lisp-C9XAeP06.js"),[])},{id:"erb",name:"ERB",import:()=>I(()=>import("./erb-D3EuUlpm.js"),__vite__mapDeps([31,1,2,3,32,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>I(()=>import("./erlang-DpOm0zC4.js"),[])},{id:"fennel",name:"Fennel",import:()=>I(()=>import("./fennel-BYunw83y.js"),[])},{id:"fish",name:"Fish",import:()=>I(()=>import("./fish-Bl2oy6fF.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>I(()=>import("./fluent-C4IJs8-o.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>I(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>I(()=>import("./fortran-free-form-D22FLkUw.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>I(()=>import("./fsharp-DQy8In2x.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>I(()=>import("./gdresource-BSDf9Pz1.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>I(()=>import("./gdscript-Bty6elJm.js"),[])},{id:"gdshader",name:"GDShader",import:()=>I(()=>import("./gdshader-DkwncUOv.js"),[])},{id:"genie",name:"Genie",import:()=>I(()=>import("./genie-D0YGMca9.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>I(()=>import("./gherkin-DyxjwDmM.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>I(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>I(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([48,27]))},{id:"gleam",name:"Gleam",import:()=>I(()=>import("./gleam-BspZqrRM.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>I(()=>import("./glimmer-js-Dz9X99Cm.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>I(()=>import("./glimmer-ts-aQ3p29eY.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>I(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([24,25]))},{id:"gnuplot",name:"Gnuplot",import:()=>I(()=>import("./gnuplot-DdkO51Og.js"),[])},{id:"go",name:"Go",import:()=>I(()=>import("./go-PEFJdsE-.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>I(()=>import("./graphql-Caa12_AY.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>I(()=>import("./groovy-gcz8RCvz.js"),[])},{id:"hack",name:"Hack",import:()=>I(()=>import("./hack-C1oSbnf3.js"),__vite__mapDeps([51,1,2,3,15]))},{id:"haml",name:"Ruby Haml",import:()=>I(()=>import("./haml-AZXGPtNI.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>I(()=>import("./handlebars-YebKLiTq.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>I(()=>import("./haskell-Df6bDoY_.js"),[])},{id:"haxe",name:"Haxe",import:()=>I(()=>import("./haxe-BP3HzMA6.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>I(()=>import("./hcl-BWvSN4gD.js"),[])},{id:"hjson",name:"Hjson",import:()=>I(()=>import("./hjson-D5-asLiD.js"),[])},{id:"hlsl",name:"HLSL",import:()=>I(()=>import("./hlsl-D3lLCCz7.js"),[])},{id:"html",name:"HTML",import:()=>I(()=>import("./html-B8pBdPMQ.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>I(()=>import("./html-derivative-ZQ8onl8Z.js"),__vite__mapDeps([14,1,2,3]))},{id:"http",name:"HTTP",import:()=>I(()=>import("./http-C38VWM-o.js"),__vite__mapDeps([53,27,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>I(()=>import("./hxml-B2Z6b3nn.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>I(()=>import("./hy-DFXneXwc.js"),[])},{id:"imba",name:"Imba",import:()=>I(()=>import("./imba-DGztddWO.js"),[])},{id:"ini",name:"INI",aliases:["properties"],import:()=>I(()=>import("./ini-BEwlwnbL.js"),[])},{id:"java",name:"Java",import:()=>I(()=>import("./java-CylS5w8V.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>I(()=>import("./javascript-BMMyXqK5.js"),[])},{id:"jinja",name:"Jinja",import:()=>I(()=>import("./jinja-BJmZiE_F.js"),__vite__mapDeps([56,1,2,3]))},{id:"jison",name:"Jison",import:()=>I(()=>import("./jison-BCRtk9Os.js"),__vite__mapDeps([57,2]))},{id:"json",name:"JSON",import:()=>I(()=>import("./json-Cp-IABpG.js"),[])},{id:"json5",name:"JSON5",import:()=>I(()=>import("./json5-C9tS-k6U.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>I(()=>import("./jsonc-Des-eS-w.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>I(()=>import("./jsonl-DcaNXYhu.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>I(()=>import("./jsonnet-DFQXde-d.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>I(()=>import("./jssm-C2t-YnRu.js"),[])},{id:"jsx",name:"JSX",import:()=>I(()=>import("./jsx-g9-lgVsj.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>I(()=>import("./julia-Db79kMu7.js"),__vite__mapDeps([58,22,23,24,25,15,19,2,59]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>I(()=>import("./kotlin-BdnUsdx6.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>I(()=>import("./kusto-BvAqAH-y.js"),[])},{id:"latex",name:"LaTeX",import:()=>I(()=>import("./latex-okZ41ve_.js"),__vite__mapDeps([60,61,59]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>I(()=>import("./lean-c1G5yEKj.js"),[])},{id:"less",name:"Less",import:()=>I(()=>import("./less-B1dDrJ26.js"),[])},{id:"liquid",name:"Liquid",import:()=>I(()=>import("./liquid-C1lUkxsO.js"),__vite__mapDeps([62,1,2,3,9]))},{id:"llvm",name:"LLVM IR",import:()=>I(()=>import("./llvm-D32k8WzR.js"),[])},{id:"log",name:"Log file",import:()=>I(()=>import("./log-BFvZA1X9.js"),[])},{id:"logo",name:"Logo",import:()=>I(()=>import("./logo-BtOb2qkB.js"),[])},{id:"lua",name:"Lua",import:()=>I(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,25]))},{id:"luau",name:"Luau",import:()=>I(()=>import("./luau-irsrSlf-.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>I(()=>import("./make-CHLpvVh8.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>I(()=>import("./markdown-RrBGtqGR.js"),[])},{id:"marko",name:"Marko",import:()=>I(()=>import("./marko-C0z8HR23.js"),__vite__mapDeps([63,3,64,5,2]))},{id:"matlab",name:"MATLAB",import:()=>I(()=>import("./matlab-D7o27uSR.js"),[])},{id:"mdc",name:"MDC",import:()=>I(()=>import("./mdc-02rxpBA4.js"),__vite__mapDeps([65,42,38,14,1,2,3]))},{id:"mdx",name:"MDX",import:()=>I(()=>import("./mdx-Cmh6b_Ma.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>I(()=>import("./mermaid-DfEE3Bzs.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>I(()=>import("./mipsasm-CKIfxQSi.js"),[])},{id:"mojo",name:"Mojo",import:()=>I(()=>import("./mojo-1DNp92w6.js"),[])},{id:"move",name:"Move",import:()=>I(()=>import("./move-BkPM1oy1.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>I(()=>import("./narrat-DRg8JJMk.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>I(()=>import("./nextflow-Bk5OV074.js"),[])},{id:"nginx",name:"Nginx",import:()=>I(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([66,37,25]))},{id:"nim",name:"Nim",import:()=>I(()=>import("./nim-ANgMEeb1.js"),__vite__mapDeps([67,25,1,2,3,7,8,24,42]))},{id:"nix",name:"Nix",import:()=>I(()=>import("./nix-BepWV7mh.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>I(()=>import("./nushell-I3RK9BU8.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>I(()=>import("./objective-c-DXmwc3jG.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>I(()=>import("./objective-cpp-CLxacb5B.js"),[])},{id:"ocaml",name:"OCaml",import:()=>I(()=>import("./ocaml-C0hk2d4L.js"),[])},{id:"pascal",name:"Pascal",import:()=>I(()=>import("./pascal-D93ZcfNL.js"),[])},{id:"perl",name:"Perl",import:()=>I(()=>import("./perl-EWVMYlR0.js"),__vite__mapDeps([68,1,2,3,7,8,15]))},{id:"php",name:"PHP",import:()=>I(()=>import("./php-9PMsNEzE.js"),__vite__mapDeps([69,1,2,3,7,8,15,9]))},{id:"plsql",name:"PL/SQL",import:()=>I(()=>import("./plsql-ChMvpjG-.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>I(()=>import("./po-BTJTHyun.js"),[])},{id:"polar",name:"Polar",import:()=>I(()=>import("./polar-C0HS_06l.js"),[])},{id:"postcss",name:"PostCSS",import:()=>I(()=>import("./postcss-CXtECtnM.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>I(()=>import("./powerquery-CEu0bR-o.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>I(()=>import("./powershell-Dpen1YoG.js"),[])},{id:"prisma",name:"Prisma",import:()=>I(()=>import("./prisma-Dd19v3D-.js"),[])},{id:"prolog",name:"Prolog",import:()=>I(()=>import("./prolog-CbFg5uaA.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>I(()=>import("./proto-DyJlTyXw.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>I(()=>import("./pug-Ch9lOoSd.js"),__vite__mapDeps([70,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>I(()=>import("./puppet-BMWR74SV.js"),[])},{id:"purescript",name:"PureScript",import:()=>I(()=>import("./purescript-CtrldY6v.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>I(()=>import("./python-B6aJPvgy.js"),[])},{id:"qml",name:"QML",import:()=>I(()=>import("./qml-CHzV51_b.js"),__vite__mapDeps([71,2]))},{id:"qmldir",name:"QML Directory",import:()=>I(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>I(()=>import("./qss-IeuSbFQv.js"),[])},{id:"r",name:"R",import:()=>I(()=>import("./r-C2tOF0e5.js"),[])},{id:"racket",name:"Racket",import:()=>I(()=>import("./racket-BqYA7rlc.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>I(()=>import("./raku-DXvB9xmW.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>I(()=>import("./razor-CNXmhs1n.js"),__vite__mapDeps([72,1,2,3,73]))},{id:"reg",name:"Windows Registry Script",import:()=>I(()=>import("./reg-C-SQnVFl.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>I(()=>import("./regexp-CDVJQ6XC.js"),[])},{id:"rel",name:"Rel",import:()=>I(()=>import("./rel-C3B-1QV4.js"),[])},{id:"riscv",name:"RISC-V",import:()=>I(()=>import("./riscv-BM1_JUlF.js"),[])},{id:"rst",name:"reStructuredText",import:()=>I(()=>import("./rst-DHpKpUMA.js"),__vite__mapDeps([74,14,1,2,3,22,23,24,25,15,19,27,38,75,32,33,7,8,34,11,35,36,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>I(()=>import("./ruby-C5MNRm7z.js"),__vite__mapDeps([32,1,2,3,33,7,8,15,34,11,35,36,22,23,24,25,27,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>I(()=>import("./rust-B1yitclQ.js"),[])},{id:"sas",name:"SAS",import:()=>I(()=>import("./sas-Dlf3BogE.js"),__vite__mapDeps([76,15]))},{id:"sass",name:"Sass",import:()=>I(()=>import("./sass-Cj5Yp3dK.js"),[])},{id:"scala",name:"Scala",import:()=>I(()=>import("./scala-C151Ov-r.js"),[])},{id:"scheme",name:"Scheme",import:()=>I(()=>import("./scheme-C98Dy4si.js"),[])},{id:"scss",name:"SCSS",import:()=>I(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>I(()=>import("./sdbl-DVxCFoDh.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>I(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([77,78]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>I(()=>import("./shellscript-Yzrsuije.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>I(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([79,27]))},{id:"smalltalk",name:"Smalltalk",import:()=>I(()=>import("./smalltalk-BERRCDM3.js"),[])},{id:"solidity",name:"Solidity",import:()=>I(()=>import("./solidity-BbcW6ACK.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>I(()=>import("./soy-B_7ge1HE.js"),__vite__mapDeps([80,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>I(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([81,82]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>I(()=>import("./splunk-BtCnVYZw.js"),[])},{id:"sql",name:"SQL",import:()=>I(()=>import("./sql-B9xm8XSJ.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>I(()=>import("./ssh-config-_ykCGR6B.js"),[])},{id:"stata",name:"Stata",import:()=>I(()=>import("./stata-C5TGba-T.js"),__vite__mapDeps([83,15]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>I(()=>import("./stylus-BEDo0Tqx.js"),[])},{id:"svelte",name:"Svelte",import:()=>I(()=>import("./svelte-CXAE1zBs.js"),__vite__mapDeps([84,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>I(()=>import("./swift-fve9TYiY.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>I(()=>import("./system-verilog-CnnmHF94.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>I(()=>import("./systemd-4A_iFExJ.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>I(()=>import("./talonscript-CkByrt1z.js"),[])},{id:"tasl",name:"Tasl",import:()=>I(()=>import("./tasl-QIJgUcNo.js"),[])},{id:"tcl",name:"Tcl",import:()=>I(()=>import("./tcl-dwOrl1Do.js"),[])},{id:"templ",name:"Templ",import:()=>I(()=>import("./templ-kZcegUSt.js"),__vite__mapDeps([85,86,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>I(()=>import("./terraform-BETggiCN.js"),[])},{id:"tex",name:"TeX",import:()=>I(()=>import("./tex-mQPFytnq.js"),__vite__mapDeps([61,59]))},{id:"toml",name:"TOML",import:()=>I(()=>import("./toml-vGWfd6FD.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>I(()=>import("./ts-tags-CHnADXob.js"),__vite__mapDeps([87,11,3,2,24,25,1,15,7,8]))},{id:"tsv",name:"TSV",import:()=>I(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>I(()=>import("./tsx-COt5Ahok.js"),[])},{id:"turtle",name:"Turtle",import:()=>I(()=>import("./turtle-BsS91CYL.js"),[])},{id:"twig",name:"Twig",import:()=>I(()=>import("./twig-febACT8g.js"),__vite__mapDeps([88,3,2,5,69,1,7,8,15,9,19,32,33,34,11,35,36,22,23,24,25,27,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>I(()=>import("./typescript-DlfHMoPT.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>I(()=>import("./typespec-Df68jz8_.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>I(()=>import("./typst-DHCkPAjA.js"),[])},{id:"v",name:"V",import:()=>I(()=>import("./v-DljmTZ5-.js"),[])},{id:"vala",name:"Vala",import:()=>I(()=>import("./vala-CsfeWuGM.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>I(()=>import("./vb-D17OF-Vu.js"),[])},{id:"verilog",name:"Verilog",import:()=>I(()=>import("./verilog-BQ8w6xss.js"),[])},{id:"vhdl",name:"VHDL",import:()=>I(()=>import("./vhdl-CeAyd5Ju.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>I(()=>import("./viml-CJc9bBzg.js"),[])},{id:"vue",name:"Vue",import:()=>I(()=>import("./vue-xz9K_ZKN.js"),__vite__mapDeps([89,3,2,11,9,14,1]))},{id:"vue-html",name:"Vue HTML",import:()=>I(()=>import("./vue-html-dOMv_FQ0.js"),__vite__mapDeps([90,89,3,2,11,9,14,1]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>I(()=>import("./vyper-CDx5xZoG.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>I(()=>import("./wasm-MzD3tlZU.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>I(()=>import("./wenyan-BV7otONQ.js"),[])},{id:"wgsl",name:"WGSL",import:()=>I(()=>import("./wgsl-Dx-B1_4e.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>I(()=>import("./wikitext-BhOHFoWU.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>I(()=>import("./wit-5i3qLPDT.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>I(()=>import("./wolfram-lXgVvXCa.js"),[])},{id:"xml",name:"XML",import:()=>I(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>I(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([91,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>I(()=>import("./yaml-Buea-lGh.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>I(()=>import("./zenscript-DVFEvuxE.js"),[])},{id:"zig",name:"Zig",import:()=>I(()=>import("./zig-CK-KhNJq.js"),[])}],SY=Object.fromEntries(ED.map(e=>[e.id,e.import])),AY=Object.fromEntries(ED.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),wY={...SY,...AY},TY=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>I(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>I(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>I(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>I(()=>import("./catppuccin-frappe-Btyk0a-E.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>I(()=>import("./catppuccin-latte-q-j0iyEw.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>I(()=>import("./catppuccin-macchiato-brDaU2vB.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>I(()=>import("./catppuccin-mocha-BR7mELCv.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>I(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>I(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>I(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>I(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>I(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>I(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>I(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>I(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>I(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>I(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>I(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>I(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>I(()=>import("./gruvbox-dark-hard-Hhtzho9R.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>I(()=>import("./gruvbox-dark-medium-DFR6f4Jn.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>I(()=>import("./gruvbox-dark-soft-BFVdkX1U.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>I(()=>import("./gruvbox-light-hard-7i6GEmcB.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>I(()=>import("./gruvbox-light-medium-Dcsh5twl.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>I(()=>import("./gruvbox-light-soft-leinZj1a.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>I(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>I(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>I(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>I(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>I(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>I(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>I(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>I(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>I(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>I(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>I(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>I(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>I(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>I(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>I(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>I(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>I(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>I(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>I(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>I(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>I(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>I(()=>import("./rose-pine-BHrmToEH.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>I(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>I(()=>import("./rose-pine-moon-NleAzG8P.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>I(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>I(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>I(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>I(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>I(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>I(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>I(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>I(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>I(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>I(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>I(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],CY=Object.fromEntries(TY.map(e=>[e.id,e.import]));class u0 extends Error{constructor(t){super(t),this.name="ShikiError"}}function RY(){return 2147483648}function NY(){return typeof performance<"u"?performance.now():Date.now()}const kY=(e,t)=>e+(t-e%t)%t;async function OY(e){let t,n;const r={};function a(v){n=v,r.HEAPU8=new Uint8Array(v),r.HEAPU32=new Uint32Array(v)}function o(v,x,S){r.HEAPU8.copyWithin(v,x,x+S)}function l(v){try{return t.grow(v-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function u(v){const x=r.HEAPU8.length;v=v>>>0;const S=RY();if(v>S)return!1;for(let A=1;A<=4;A*=2){let w=x*(1+.2/A);w=Math.min(w,v+100663296);const T=Math.min(S,kY(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,x,S=1024){const A=x+S;let w=x;for(;v[w]&&!(w>=A);)++w;if(w-x>16&&v.buffer&&d)return d.decode(v.subarray(x,w));let T="";for(;x<w;){let R=v[x++];if(!(R&128)){T+=String.fromCharCode(R);continue}const O=v[x++]&63;if((R&224)===192){T+=String.fromCharCode((R&31)<<6|O);continue}const N=v[x++]&63;if((R&240)===224?R=(R&15)<<12|O<<6|N:R=(R&7)<<18|O<<12|N<<6|v[x++]&63,R<65536)T+=String.fromCharCode(R);else{const M=R-65536;T+=String.fromCharCode(55296|M>>10,56320|M&1023)}}return T}function m(v,x){return v?f(r.HEAPU8,v,x):""}const y={emscripten_get_now:NY,emscripten_memcpy_big:o,emscripten_resize_heap:u,fd_write:()=>0};async function g(){const x=await e({env:y,wasi_snapshot_preview1:y});t=x.memory,a(t.buffer),Object.assign(r,x),r.UTF8ToString=m}return await g(),r}var DY=Object.defineProperty,IY=(e,t,n)=>t in e?DY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kt=(e,t,n)=>IY(e,typeof t!="symbol"?t+"":t,n);let en=null;function LY(e){throw new u0(e.UTF8ToString(e.getLastOnigError()))}class Mh{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=Mh._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 y=m,g=!1;if(m>=55296&&m<=56319&&f+1<n){const v=t.charCodeAt(f+1);v>=56320&&v<=57343&&(y=(m-55296<<10)+65536|v-56320,g=!0)}a&&(o[f]=d,g&&(o[f+1]=d),y<=127?l[d+0]=f:y<=2047?(l[d+0]=f,l[d+1]=f):y<=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)),y<=127?u[d++]=y:y<=2047?(u[d++]=192|(y&1984)>>>6,u[d++]=128|(y&63)>>>0):y<=65535?(u[d++]=224|(y&61440)>>>12,u[d++]=128|(y&4032)>>>6,u[d++]=128|(y&63)>>>0):(u[d++]=240|(y&1835008)>>>18,u[d++]=128|(y&258048)>>>12,u[d++]=128|(y&4032)>>>6,u[d++]=128|(y&63)>>>0),g&&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 jh=class Pr{constructor(t){if(Kt(this,"id",++Pr.LAST_ID),Kt(this,"_onigBinding"),Kt(this,"content"),Kt(this,"utf16Length"),Kt(this,"utf8Length"),Kt(this,"utf16OffsetToUtf8"),Kt(this,"utf8OffsetToUtf16"),Kt(this,"ptr"),!en)throw new u0("Must invoke loadWasm first.");this._onigBinding=en,this.content=t;const n=new Mh(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Pr._sharedPtrInUse?(Pr._sharedPtr||(Pr._sharedPtr=en.omalloc(1e4)),Pr._sharedPtrInUse=!0,en.HEAPU8.set(n.utf8Value,Pr._sharedPtr),this.ptr=Pr._sharedPtr):this.ptr=n.createString(en)}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===Pr._sharedPtr?Pr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Kt(jh,"LAST_ID",0);Kt(jh,"_sharedPtr",0);Kt(jh,"_sharedPtrInUse",!1);let SD=jh;class MY{constructor(t){if(Kt(this,"_onigBinding"),Kt(this,"_ptr"),!en)throw new u0("Must invoke loadWasm first.");const n=[],r=[];for(let u=0,d=t.length;u<d;u++){const f=new Mh(t[u]);n[u]=f.createString(en),r[u]=f.utf8Length}const a=en.omalloc(4*t.length);en.HEAPU32.set(n,a/4);const o=en.omalloc(4*t.length);en.HEAPU32.set(r,o/4);const l=en.createOnigScanner(a,o,t.length);for(let u=0,d=t.length;u<d;u++)en.ofree(n[u]);en.ofree(o),en.ofree(a),l===0&&LY(en),this._onigBinding=en,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 SD(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++],y=[];for(let g=0;g<m;g++){const v=t.convertUtf8OffsetToUtf16(u[d++]),x=t.convertUtf8OffsetToUtf16(u[d++]);y[g]={start:v,end:x,length:x-v}}return{index:f,captureIndices:y}}}function jY(e){return typeof e.instantiator=="function"}function PY(e){return typeof e.default=="function"}function VY(e){return typeof e.data<"u"}function BY(e){return typeof Response<"u"&&e instanceof Response}function zY(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 Yd;function UY(e){if(Yd)return Yd;async function t(){en=await OY(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),jY(r)?r=await r.instantiator(n):PY(r)?r=await r.default(n):(VY(r)&&(r=r.data),BY(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await HY(r)(n):r=await FY(r)(n):zY(r)?r=await ny(r)(n):r instanceof WebAssembly.Module?r=await ny(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await ny(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Yd=t(),Yd}function ny(e){return t=>WebAssembly.instantiate(e,t)}function HY(e){return t=>WebAssembly.instantiateStreaming(e,t)}function FY(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function GY(e){return e&&await UY(e),{createScanner(t){return new MY(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new SD(t)}}}const $Y=_Y({langs:wY,themes:CY,engine:()=>GY(I(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:qY}=EY($Y,{guessEmbeddedLanguages:VW}),KY=({children:e})=>b.jsx("div",{children:b.jsx("pre",{children:b.jsx("code",{children:e.split(`
|
|
278
|
-
`).map((t,n)=>b.jsx("span",{className:"line block w-full",children:t},n))})})}),WY=({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:[Sq(),wq(),Oq(),Aq(),vq(),_q()]}),[t,n]);return E.useEffect(()=>{qY(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(KY,{children:e})},YY=({className:e,onChange:t,isEditable:n,...r})=>b.jsx(WY,{className:Ae("flex w-full",e),contentEditable:n,onInput:a=>t==null?void 0:t(a.currentTarget.textContent??""),...r}),AD=E.createContext({packageManager:"npm",setPackageManager:()=>{},codeFormat:"typescript",setCodeFormat:()=>{},contentDeclarationFormat:"typescript",setContentDeclarationFormat:()=>{}}),Ph=()=>E.useContext(AD),ZY=({children:e})=>{const[t,n]=Tc("packageManager","npm"),[r,a]=Tc("codeFormat","typescript"),[o,l]=Tc("contentDeclarationFormat","typescript");return b.jsx(AD,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:l},children:e})},XY=({children:e,...t})=>{const{packageManager:n,codeFormat:r,contentDeclarationFormat:a}=Ph(),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,{})},QY=()=>{const{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=Ph();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"})]})]})},JY=()=>{const{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Ph();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"})]})]})},eZ={key:"copy-button",content:{label:pe({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:"Копировать содержимое"})}},wD=({content:e})=>{const[t,n]=E.useState(!1),{label:r}=nn(eZ),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(yt,{Icon:t?SV:wV,onClick:a,variant:"hoverable",color:"text",label:r.value,size:"icon-sm"})},tZ=()=>{const{packageManager:e,setPackageManager:t}=Ph();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"})]})]})},nZ=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:a=!0,className:o,fileName:l,packageManager:u,codeFormat:d,contentDeclarationFormat:f,...m})=>{const y=e.endsWith(`
|
|
279
|
-
`)?e.slice(0,-1):e,g=u||d||f;return b.jsx(XY,{packageManager:u,codeFormat:d,contentDeclarationFormat:f,children:b.jsxs(Jr,{className:Ae("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(tZ,{}),d&&b.jsx(QY,{}),f&&b.jsx(JY,{})]})]}),b.jsx("div",{className:"sticky top-28",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center",g&&"h-11"),children:b.jsx(wD,{content:y})})})]}),b.jsx("div",{className:"grid size-full grid-cols-[0px] overflow-auto p-3",children:b.jsx(YY,{lang:t,isDarkMode:n,children:y})})]})})},rZ=({children:e,isDarkMode:t,locale:n,options:r})=>{const{overrides:a,...o}=r??{};return b.jsx(ZY,{children:b.jsx(dq,{options:{overrides:{h1:l=>b.jsx(B8,{isClickable:!0,...l}),h2:l=>b.jsx(z8,{isClickable:!0,...l}),h3:l=>b.jsx(Yb,{isClickable:!0,...l}),h4:l=>b.jsx(U8,{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(nZ,{isDarkMode:t,language:(u=l.className)==null?void 0:u.replace("lang-",""),...l})},blockquote:({className:l,...u})=>b.jsx("blockquote",{className:Ae("border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5",l),...u}),ul:({className:l,...u})=>b.jsx("ul",{className:Ae("mt-5 flex flex-col gap-3 pl-5",l),...u}),ol:({className:l,...u})=>b.jsx("ol",{className:Ae("mt-5 flex flex-col gap-3 pl-5",l),...u}),li:({className:l,...u})=>b.jsx("li",{className:Ae("list-disc",l),...u}),img:({className:l,...u})=>b.jsx("img",{...u,loading:"lazy",className:Ae("max-w-full rounded-md",l),src:`${u.src}?raw=true`}),a:l=>{var u;return b.jsx(Zb,{color:"neutral",isExternalLink:(u=l.href)==null?void 0:u.startsWith("http"),underlined:!0,locale:n,...l})},pre:l=>l.children,table:({className:l,...u})=>b.jsx("div",{className:"grid w-full max-w-full overflow-scroll rounded",children:b.jsx("table",{className:Ae("max-w-full table-auto overflow-hidden text-left",l),...u})}),th:({className:l,...u})=>b.jsx("th",{className:Ae("border-neutral bg-neutral/10 border-b p-4",l),...u}),tr:({className:l,...u})=>b.jsx("tr",{className:Ae("hover:bg-neutral/10 hover:/10",l),...u}),td:({className:l,...u})=>b.jsx("td",{className:Ae("border-b border-neutral-500/50 p-4",l),...u}),...a},wrapper:({className:l,...u})=>b.jsxs(b.Fragment,{children:[b.jsx(hq,{}),b.jsx("div",{className:Ae("flex flex-col gap-8 p-10",l),...u})]}),...o},children:e??""})})},iZ=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}},aZ=({value:e,onChange:t})=>{const{comparator:n,numberValue:r}=E.useMemo(()=>iZ(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($o,{type:"number","aria-label":"Quantity",defaultValue:l??void 0,onChange:d=>u(d.target.value),className:"min-w-4"})]})},Vh={key:"navigation-view",content:{tsxNotEditable:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:"Добавить новое условие"})}}},sZ=({keyPath:e,dictionary:t,...n})=>{const{editedContent:r,addEditedContent:a}=Tn(),o=Yr(),{auditContentDeclarationField:l,isLoading:u}=y2();return b.jsx(i7,{variant:"default",onContentChange:d=>a(t.key,d,e),additionalButtons:b.jsx(yt,{Icon:I1,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})},oZ=({keyPath:e,dictionary:t,...n})=>{const{addEditedContent:r}=Tn();return b.jsx(lv,{variant:"default",onContentChange:a=>r(t.key,a,e),...n})},lZ=[{content:"False",value:!1},{content:"True",value:!0}],cZ=({dictionary:e,keyPath:t,...n})=>{const{addEditedContent:r}=Tn();return b.jsx(cu,{choices:lZ,value:!0,onChange:a=>r(e.key,a,t),color:"text",size:"sm",...n})},uZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{locale:a,defaultLocale:o}=Nv(),{selectedLocales:l,availableLocales:u}=bO(),d=e[K.Translation],f=Object.keys(d),y=u.length>l.length?l:[...new Set([...u,...f])],g=e[K.Translation];return b.jsx("table",{className:"w-full",children:b.jsx("tbody",{className:"flex w-full flex-col gap-2",children:y.map(v=>b.jsxs(E.Fragment,{children:[b.jsx("tr",{className:"mt-2 w-full p-2 text-xs",children:ef(v,a)}),b.jsx("tr",{children:b.jsx(Es,{section:g[v]??cr(g[o]),keyPath:[...t,{type:K.Translation,key:v}],dictionary:n,renderSection:r})})]},v))})})},dZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=Tn(),{addNewEnumeration:o,removeEnumeration:l}=nn(Vh),u=e[K.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[K.Enumeration]).map(f=>{const m=[...t,{type:K.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(yt,{label:l.label.value,variant:"hoverable",color:"text",Icon:dh,className:"ml-auto",onClick:()=>a(n.key,void 0,m),children:l.text})})}),b.jsx("tr",{className:"w-full p-2",children:b.jsx(aZ,{value:f,onChange:y=>{const g=e[K.Enumeration],v=t7(g,f,y),x={...e,[K.Enumeration]:v};a(n.key,x,t)}})}),b.jsx("tr",{className:"block w-full",children:b.jsx(d0,{section:u[f]??cr(u[d]),keyPath:m,dictionary:n,renderSection:r})})]},f)})})}),b.jsx(yt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>a(n.key,cr(u[d])??"",[...t,{type:K.Enumeration,key:"unknown"}]),Icon:uh,className:"m-2",children:o.text})]})},fZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const a=e[K.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(Es,{section:a[o]??cr(a.true),keyPath:[...t,{type:K.Condition,key:o}],dictionary:n,renderSection:r})},o)]},o))})})},hZ=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{const{addEditedContent:a}=Tn(),{addNewElement:o,removeElement:l}=nn(Vh);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(yt,{label:l.label.value,variant:"hoverable",color:"neutral",className:"ml-auto",textAlign:"left",onClick:()=>{const f=[...t,{type:K.Array,key:e.length}];a(n.key,void 0,f)},Icon:dh,children:l.text})]}),b.jsx("tr",{className:"block w-full",children:b.jsx(Es,{section:u??cr(e[0]),keyPath:[...t,{type:K.Array,key:d}],dictionary:n,renderSection:r})})]},JSON.stringify(u)))})}),b.jsx(yt,{label:o.label.value,variant:"hoverable",color:"neutral",textAlign:"left",isFullWidth:!0,onClick:()=>{const u=[...t,{type:K.Array,key:e.length}];a(n.key,cr(e[0])??"",u,!1)},Icon:uh,children:o.text})]})},mZ=({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:K.Object,key:a}],l=e,u=Object.keys(l)[0],d=l[a]??cr(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(d0,{section:d,keyPath:o,dictionary:n,renderSection:r})},JSON.stringify(d))]},a)})})})}),pZ=({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:K.Markdown}],f=e[K.Markdown];return b.jsxs("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:[b.jsx(cu,{choices:u,value:o,onChange:l,color:"text",size:"sm",className:"ml-auto"}),b.jsx(Es,{section:f,keyPath:d,dictionary:n,renderSection:o===1?m=>b.jsx(rZ,{isDarkMode:r,children:m}):void 0,onContentChange:a})]})},gZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:K.Insertion}],a=e[K.Insertion];return b.jsx("div",{className:"flex w-full flex-col justify-center gap-6 p-2",children:b.jsx(Es,{section:a,keyPath:r,...n})})},yZ=({section:e,keyPath:t,...n})=>{const r=[...t,{type:K.File}],a=e[K.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(Es,{section:o,keyPath:r,...n})]})},vZ=({keyPath:e,dictionary:t,renderSection:n,section:r,...a})=>{const{addEditedContent:o}=Tn(),l=r[K.Nested],u=[...e,{type:K.Nested}];return b.jsxs("div",{className:"w-full p-2",children:[b.jsx(xy,{children:"Dictionary key"}),b.jsx(lv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,dictionaryKey:String(d)},u)},children:l.dictionaryKey??""}),b.jsx(xy,{children:"Path (optional)"}),b.jsx(lv,{"aria-label":"Edit field",type:"text",variant:"default",...a,onContentChange:d=>{o(t.key,{...l,path:d!==""?d:void 0},u)},children:l.path??""})]})},d0=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:a})=>{const{tsxNotEditable:o}=nn(Vh),l=Vo(e);return l===K.ReactNode?b.jsxs(b.Fragment,{children:[b.jsx("span",{children:"[React Node]"}),b.jsx("span",{className:"text-neutral text-xs",children:o})]}):l===K.Nested?b.jsx(vZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Translation?b.jsx(uZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Enumeration?b.jsx(dZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Condition?b.jsx(fZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Insertion?b.jsx(gZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Markdown?b.jsx(pZ,{dictionary:n,keyPath:t,section:e,isDarkMode:a}):l===K.File?b.jsx(yZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Array?b.jsx(hZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Object?b.jsx(mZ,{dictionary:n,renderSection:r,keyPath:t,section:e}):l===K.Number?b.jsx("div",{className:"w-full p-2",children:b.jsx(oZ,{dictionary:n,keyPath:t,type:"number","aria-label":"Edit field",children:e})}):l===K.Text?b.jsx("div",{className:"w-full p-2",children:typeof r=="function"?r(e):b.jsx(sZ,{variant:"default","aria-label":"Edit field",keyPath:t,dictionary:n,children:e})}):l===K.Boolean?b.jsx("div",{className:"w-full p-2",children:b.jsx(cZ,{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]})},Es=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(d0,{...e})}),Kc=e=>{const t=FT(e),n=Vo(e);return t&&(n===K.ReactNode||n===K.File)?!0:t&&typeof t.nodeType=="string"?Kc(t[t.nodeType]):typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"},bZ=({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(Y8,{links:a,locale:r,elementType:"location"})},yf=e=>String(e).replace(/([A-Z])/g," $1").toLowerCase().trim(),mo=({section:e,keyPath:t,dictionaryKey:n})=>{const{locales:r}=rt==null?void 0:rt.internationalization,a=Ur(e,t),{addEditedContent:o}=Bo(),{setFocusedContentKeyPath:l,focusedContent:u}=ba(),{addNewElement:d,goToField:f}=nn(Vh),m=Vo(a),y=v=>{var x;return(((x=u==null?void 0:u.keyPath)==null?void 0:x.length)??0)>0&&Zc(v,(u==null?void 0:u.keyPath)??[])},g=Kc(a);if(!a)return b.jsx(b.Fragment,{});if(g)return b.jsx(yt,{label:f.label.value,variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(t),IconRight:xf,children:yf(t[t.length-1].key)});if(typeof a=="object"){if(m===K.ReactNode)return b.jsx(b.Fragment,{children:"React Node"});if(m===K.Translation)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:r.map(x=>{const S=[...t,{type:K.Translation,key:x}];return b.jsx(mo,{keyPath:S,section:e,dictionaryKey:n},x)})});if(m===K.Enumeration||m===K.Condition)return b.jsx("div",{className:"flex flex-col justify-between gap-2",children:Object.keys(a[m]).map(x=>{const S=[...t,{type:m,key:x}];return b.jsx(mo,{keyPath:S,section:e,dictionaryKey:n},x)})});if(m===K.Array)return b.jsxs("div",{className:"flex flex-col justify-between gap-2",children:[a.map((x,S)=>{const A=[...t,{type:K.Array,key:S}];return b.jsx(mo,{keyPath:A,section:e,dictionaryKey:n},JSON.stringify(A))}),b.jsx(yt,{label:d.label.value,variant:"hoverable",color:"neutral",textAlign:"left",onClick:()=>{const x=[...t,{type:K.Array,key:a.length}],S=a,A=cr(S[S.length-1])??"";o(n,A,x,!1),l(x)},Icon:uh,children:d.text})]});if(typeof a.nodeType=="string"){const x=[...t,{type:a.nodeType}];return b.jsx(mo,{keyPath:x,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(x=>{const S=[...t,{type:K.Object,key:x}],A=Ur(e,S);return Kc(A)?b.jsx(yt,{label:`${f.label.value} ${x}`,isActive:y(S),variant:"hoverable",color:"text",className:"w-full",onClick:()=>l(S),IconRight:xf,children:yf(x)},x):b.jsx(K1,{label:`${f.label.value} ${x}`,isActive:y(S),onClick:()=>l(S),header:yf(x),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(mo,{keyPath:S,section:e,dictionaryKey:n})})})},x)})})}return b.jsxs(b.Fragment,{children:["Error loading section --",m,"--",JSON.stringify(a),"--",JSON.stringify(t)]})},_Z=({dictionary:e,isDarkMode:t})=>{var g,v;const{content:n,key:r}=e,{editedContent:a}=Tn(),{focusedContent:o,setFocusedContentKeyPath:l}=ba(),u=o==null?void 0:o.keyPath,d=typeof((g=a==null?void 0:a[e.key])==null?void 0:g.content)>"u"?n:(v=a==null?void 0:a[r])==null?void 0:v.content,f=Ur(d,u??[]),m=Kc(d),y=Kc(f);return E.useEffect(()=>{var x;typeof f>"u"&&l(((x=o==null?void 0:o.keyPath)==null?void 0:x.slice(0,-1))??[])},[]),b.jsxs("div",{children:[b.jsxs("div",{className:"mb-6 flex items-center justify-between gap-2",children:[b.jsx(bZ,{dictionaryKey:r,keyPath:u??[],onClickKeyPath:l}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsx(e7,{})})]}),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(mo,{keyPath:[],section:d,dictionaryKey:r})}),(y||(u??[]).length>0)&&b.jsx(Es,{keyPath:u??[],section:f,dictionary:e,isDarkMode:t})]})]})},xZ={key:"dictionary-details",content:{titleInput:{label:pe({en:"Title","en-GB":"Title",fr:"Titre",es:"Título",de:"Titel",ja:"タイトル",ko:"제목",zh:"标题",it:"Titolo",pt:"Título",hi:"शीर्षक",ar:"العنوان",ru:"Заголовок"}),description:pe({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:pe({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:pe({en:"Key","en-GB":"Key",fr:"Clé",es:"Clave",de:"Schlüssel",ja:"キー",ko:"키",zh:"键",it:"Chiave",pt:"Chave",hi:"कुंजी",ar:"مفتاح",ru:"Ключ"}),description:pe({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:pe({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:pe({en:"Description","en-GB":"Description",fr:"Description",es:"Descripción",de:"Beschreibung",ja:"説明",ko:"설명",zh:"描述",it:"Descrizione",pt:"Descrição",hi:"विवरण",ar:"الوصف",ru:"Описание"}),placeholder:pe({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:pe({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:pe({en:"Projects","en-GB":"Projects",fr:"Projets",es:"Proyectos",de:"Projekte",ja:"プロジェクト",ko:"프로젝트",zh:"项目",it:"Progetti",pt:"Projetos",hi:"परियोजनाएँ",ar:"المشاريع",ru:"Проекты"}),description:pe({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:pe({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:pe({en:"Tags","en-GB":"Tags",fr:"Tags",es:"Etiquetas",de:"Tags",ja:"タグ",ko:"태그",zh:"标签",it:"Tag",pt:"Tags",hi:"टैग",ar:"الوسوم",ru:"Теги"}),description:pe({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:pe({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:pe({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"}),text:pe({en:"Audit",fr:"Auditer",es:"Auditar","en-GB":"Audit",de:"Prüfen",ja:"監査",ko:"감사",zh:"审核",it:"Controllare",pt:"Auditar",hi:"ऑडिट",ar:"التدقيق",ru:"Отслеживание"})}}},EZ={key:"dictionary-detail-schema",content:{titleRequiredError:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:pe({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:"Пожалуйста, введите действительный тег"})}},SZ=e=>{const{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:l,keyMinLengthError:u,descriptionRequiredError:d,descriptionInvalidTypeError:f,requiredErrorProjectId:m,invalidTypeErrorProjectId:y,invalidTypeErrorTags:g}=nn(EZ);return K3({title:ac({required_error:t.value,invalid_type_error:n.value}).refine(v=>v.length===0||v.length>=4,{message:r.value}).optional(),key:ac({required_error:a.value,invalid_type_error:o.value}).min(4,{message:u.value}).regex(/^[a-zA-Z0-9-_]+$/,{message:l.value}).default(""),description:ac({required_error:d.value,invalid_type_error:f.value}).optional(),projectIds:VA(ac({required_error:m.value,invalid_type_error:y.value})).default([e]),tags:VA(ac({invalid_type_error:g.value})).default([])})},AZ=({dictionary:e})=>{var N,M;const{session:t}=tu(),{project:n}=t??{},{data:r,isLoading:a}=d2(),{data:o}=p2(),l=SZ(String(n==null?void 0:n._id)),{form:u,isSubmitting:d}=Z2(l,{defaultValues:e}),{editedContent:f,setEditedDictionary:m}=Tn(),{titleInput:y,keyInput:g,descriptionInput:v,projectInput:x,tagsSelect:S,auditButton:A}=nn(xZ),{auditContentDeclaration:w,isLoading:T}=g2(),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 O=async()=>{const D={...e,...R};await w({fileContent:JSON.stringify(D)}).then(L=>{if(L!=null&&L.data)try{const V=JSON.parse(L.data.fileContent);m(U=>({...U,...D,...V})),u.reset({...D,...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(Xe,{className:"flex w-full flex-col gap-8",...u,schema:l,onChange:D=>m(L=>({...L,...D})),children:[b.jsxs("div",{className:"flex w-full flex-1 gap-8 max-md:flex-col",children:[b.jsx(Xe.EditableFieldInput,{name:"key",label:g.label,placeholder:g.label.value,description:g.description,disabled:d,isRequired:!0,onSave:D=>{u.setValue("key",D),m(L=>({...e,...L??{},key:D}))}}),b.jsx(Xe.EditableFieldInput,{name:"title",label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:d,onSave:D=>{u.setValue("title",D),m(L=>({...e,...L??{},title:D}))}})]}),b.jsx(Xe.EditableFieldTextArea,{name:"description",label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:d,onSave:D=>{u.setValue("description",D),m(L=>({...e,...L??{},description:D}))}}),b.jsxs("div",{className:"flex size-full flex-1 gap-8 max-md:flex-col",children:[b.jsxs(Xe.MultiSelect,{name:"projectIds",label:x.label.value,description:x.description.value,onValueChange:D=>{const L=[D].flat();u.setValue("projectIds",L),m(V=>({...e,...V??{},projectIds:L}))},children:[b.jsx(gn.Trigger,{getBadgeValue:D=>{var L,V;return((V=(L=r==null?void 0:r.data)==null?void 0:L.find(U=>String(U._id)===D))==null?void 0:V.name)??D},children:b.jsx(gn.Input,{placeholder:x.placeholder.value})}),b.jsx(gn.Content,{children:b.jsx(Co,{isLoading:a,children:b.jsx(gn.List,{children:(N=r==null?void 0:r.data)==null?void 0:N.map(D=>b.jsx(gn.Item,{value:String(D._id),children:D.name},String(D._id)))})})})]}),b.jsxs(Xe.MultiSelect,{name:"tags",label:S.label.value,description:S.description.value,onValueChange:D=>{u.setValue("tags",[D].flat()),m(L=>({...e,...L??{},tags:[D].flat()}))},children:[b.jsx(gn.Trigger,{getBadgeValue:D=>{var L,V;return((V=(L=r==null?void 0:r.data)==null?void 0:L.find(U=>String(U._id)===D))==null?void 0:V.name)??D},children:b.jsx(gn.Input,{placeholder:S.placeholder.value})}),b.jsx(gn.Content,{children:b.jsx(Co,{isLoading:a,children:b.jsx(gn.List,{children:(M=o==null?void 0:o.data)==null?void 0:M.map(D=>b.jsx(gn.Item,{value:String(D.key),children:D.name??D.key},String(D.key)))})})})]})]}),b.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 max-md:flex-col",children:b.jsx(Xe.Button,{type:"button",label:A.label.value,Icon:I1,variant:"outline",color:"text",className:"max-md:w-full",onClick:O,disabled:d||T,isLoading:T,children:A.text})})]})})},wZ={key:"dictionary-field-editor",content:{returnToDictionaryList:{label:pe({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:pe({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 TZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LT(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 MT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LT(Object(n),!0).forEach(function(r){TZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CZ(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 RZ(e,t){if(e==null)return{};var n=CZ(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 NZ(e,t){return kZ(e)||OZ(e,t)||DZ(e,t)||IZ()}function kZ(e){if(Array.isArray(e))return e}function OZ(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 DZ(e,t){if(e){if(typeof e=="string")return jT(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 jT(e,t)}}function jT(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 IZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
280
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PT(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 VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){LZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MZ(){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 gc(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 ih(e){return{}.toString.call(e).includes("Object")}function jZ(e){return!Object.keys(e).length}function Wc(e){return typeof e=="function"}function PZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function VZ(e,t){return ih(t)||da("changeType"),Object.keys(t).some(function(n){return!PZ(e,n)})&&da("changeField"),t}function BZ(e){Wc(e)||da("selectorType")}function zZ(e){Wc(e)||ih(e)||da("handlerType"),ih(e)&&Object.values(e).some(function(t){return!Wc(t)})&&da("handlersType")}function UZ(e){e||da("initialIsRequired"),ih(e)||da("initialType"),jZ(e)&&da("initialContent")}function HZ(e,t){throw new Error(e[t]||e.default)}var FZ={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"},da=gc(HZ)(FZ),Zd={changes:VZ,selector:BZ,handler:zZ,initial:UZ};function GZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zd.initial(e),Zd.handler(t);var n={current:e},r=gc(KZ)(n,t),a=gc(qZ)(n),o=gc(Zd.changes)(e),l=gc($Z)(n);function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(m){return m};return Zd.selector(f),f(n.current)}function d(f){MZ(r,a,o,l)(f)}return[u,d]}function $Z(e,t){return Wc(t)?t(e.current):t}function qZ(e,t){return e.current=VT(VT({},e.current),t),t}function KZ(e,t,n){return Wc(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 WZ={create:GZ},YZ={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function ZZ(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 XZ(e){return{}.toString.call(e).includes("Object")}function QZ(e){return e||BT("configIsRequired"),XZ(e)||BT("configType"),e.urls?(JZ(),{paths:{vs:e.urls.monacoBase}}):e}function JZ(){console.warn(TD.deprecation)}function eX(e,t){throw new Error(e[t]||e.default)}var TD={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!
|
|
281
|
-
You are using deprecated way of configuration.
|
|
282
|
-
|
|
283
|
-
Instead of using
|
|
284
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
285
|
-
use
|
|
286
|
-
monaco.config({ paths: { vs: '...' } })
|
|
287
|
-
|
|
288
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
289
|
-
`},BT=ZZ(eX)(TD),tX={config:QZ},nX=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 CD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],CD(e[n],t[n]))}),MT(MT({},e),t)}var rX={type:"cancelation",msg:"operation is manually canceled"};function ry(e){var t=!1,n=new Promise(function(r,a){e.then(function(o){return t?a(rX):r(o)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var iX=WZ.create({config:YZ,isInitialized:!1,resolve:null,reject:null,monaco:null}),RD=NZ(iX,2),gu=RD[0],Bh=RD[1];function aX(e){var t=tX.config(e),n=t.monaco,r=RZ(t,["monaco"]);Bh(function(a){return{config:CD(a.config,r),monaco:n}})}function sX(){var e=gu(function(t){var n=t.monaco,r=t.isInitialized,a=t.resolve;return{monaco:n,isInitialized:r,resolve:a}});if(!e.isInitialized){if(Bh({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ry(iy);if(window.monaco&&window.monaco.editor)return ND(window.monaco),e.resolve(window.monaco),ry(iy);nX(oX,cX)(uX)}return ry(iy)}function oX(e){return document.body.appendChild(e)}function lX(e){var t=document.createElement("script");return e&&(t.src=e),t}function cX(e){var t=gu(function(r){var a=r.config,o=r.reject;return{config:a,reject:o}}),n=lX("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function uX(){var e=gu(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){ND(n),e.resolve(n)},function(n){e.reject(n)})}function ND(e){gu().monaco||Bh({monaco:e})}function dX(){return gu(function(e){var t=e.monaco;return t})}var iy=new Promise(function(e,t){return Bh({resolve:e,reject:t})}),kD={config:aX,init:sX,__getMonacoInstance:dX},fX={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ay=fX,hX={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},mX=hX;function pX({children:e}){return Ge.createElement("div",{style:mX.container},e)}var gX=pX,yX=gX;function vX({width:e,height:t,isEditorReady:n,loading:r,_ref:a,className:o,wrapperProps:l}){return Ge.createElement("section",{style:{...ay.wrapper,width:e,height:t},...l},!n&&Ge.createElement(yX,null,r),Ge.createElement("div",{ref:a,style:{...ay.fullWidth,...!n&&ay.hide},className:o}))}var bX=vX,OD=E.memo(bX);function _X(e){E.useEffect(e,[])}var DD=_X;function xX(e,t,n=!0){let r=E.useRef(!0);E.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Hn=xX;function Rc(){}function xo(e,t,n,r){return EX(e,r)||SX(e,t,n,r)}function EX(e,t){return e.editor.getModel(ID(e,t))}function SX(e,t,n,r){return e.editor.createModel(t,n,r?ID(e,r):void 0)}function ID(e,t){return e.Uri.parse(t)}function AX({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:y={},height:g="100%",width:v="100%",className:x,wrapperProps:S={},beforeMount:A=Rc,onMount:w=Rc}){let[T,R]=E.useState(!1),[O,N]=E.useState(!0),M=E.useRef(null),D=E.useRef(null),L=E.useRef(null),V=E.useRef(w),U=E.useRef(A),ce=E.useRef(!1);DD(()=>{let J=kD.init();return J.then(H=>(D.current=H)&&N(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>M.current?X():J.cancel()}),Hn(()=>{if(M.current&&D.current){let J=M.current.getOriginalEditor(),H=xo(D.current,e||"",r||n||"text",o||"");H!==J.getModel()&&J.setModel(H)}},[o],T),Hn(()=>{if(M.current&&D.current){let J=M.current.getModifiedEditor(),H=xo(D.current,t||"",a||n||"text",l||"");H!==J.getModel()&&J.setModel(H)}},[l],T),Hn(()=>{let J=M.current.getModifiedEditor();J.getOption(D.current.editor.EditorOption.readOnly)?J.setValue(t||""):t!==J.getValue()&&(J.executeEdits("",[{range:J.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),J.pushUndoStop())},[t],T),Hn(()=>{var J,H;(H=(J=M.current)==null?void 0:J.getModel())==null||H.original.setValue(e||"")},[e],T),Hn(()=>{let{original:J,modified:H}=M.current.getModel();D.current.editor.setModelLanguage(J,r||n||"text"),D.current.editor.setModelLanguage(H,a||n||"text")},[n,r,a],T),Hn(()=>{var J;(J=D.current)==null||J.editor.setTheme(f)},[f],T),Hn(()=>{var J;(J=M.current)==null||J.updateOptions(y)},[y],T);let ie=E.useCallback(()=>{var ne;if(!D.current)return;U.current(D.current);let J=xo(D.current,e||"",r||n||"text",o||""),H=xo(D.current,t||"",a||n||"text",l||"");(ne=M.current)==null||ne.setModel({original:J,modified:H})},[n,t,a,e,r,o,l]),de=E.useCallback(()=>{var J;!ce.current&&L.current&&(M.current=D.current.editor.createDiffEditor(L.current,{automaticLayout:!0,...y}),ie(),(J=D.current)==null||J.editor.setTheme(f),R(!0),ce.current=!0)},[y,f,ie]);E.useEffect(()=>{T&&V.current(M.current,D.current)},[T]),E.useEffect(()=>{!O&&!T&&de()},[O,T,de]);function X(){var H,ne,q,ye;let J=(H=M.current)==null?void 0:H.getModel();u||((ne=J==null?void 0:J.original)==null||ne.dispose()),d||((q=J==null?void 0:J.modified)==null||q.dispose()),(ye=M.current)==null||ye.dispose()}return Ge.createElement(OD,{width:v,height:g,isEditorReady:T,loading:m,_ref:L,className:x,wrapperProps:S})}var wX=AX;E.memo(wX);function TX(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var CX=TX,Xd=new Map;function RX({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:y=!0,keepCurrentModel:g=!1,width:v="100%",height:x="100%",className:S,wrapperProps:A={},beforeMount:w=Rc,onMount:T=Rc,onChange:R,onValidate:O=Rc}){let[N,M]=E.useState(!1),[D,L]=E.useState(!0),V=E.useRef(null),U=E.useRef(null),ce=E.useRef(null),ie=E.useRef(T),de=E.useRef(w),X=E.useRef(),J=E.useRef(r),H=CX(o),ne=E.useRef(!1),q=E.useRef(!1);DD(()=>{let Y=kD.init();return Y.then(F=>(V.current=F)&&L(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>U.current?P():Y.cancel()}),Hn(()=>{var F,te,re,fe;let Y=xo(V.current,e||r||"",t||a||"",o||n||"");Y!==((F=U.current)==null?void 0:F.getModel())&&(y&&Xd.set(H,(te=U.current)==null?void 0:te.saveViewState()),(re=U.current)==null||re.setModel(Y),y&&((fe=U.current)==null||fe.restoreViewState(Xd.get(o))))},[o],N),Hn(()=>{var Y;(Y=U.current)==null||Y.updateOptions(f)},[f],N),Hn(()=>{!U.current||r===void 0||(U.current.getOption(V.current.editor.EditorOption.readOnly)?U.current.setValue(r):r!==U.current.getValue()&&(q.current=!0,U.current.executeEdits("",[{range:U.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),U.current.pushUndoStop(),q.current=!1))},[r],N),Hn(()=>{var F,te;let Y=(F=U.current)==null?void 0:F.getModel();Y&&a&&((te=V.current)==null||te.editor.setModelLanguage(Y,a))},[a],N),Hn(()=>{var Y;u!==void 0&&((Y=U.current)==null||Y.revealLine(u))},[u],N),Hn(()=>{var Y;(Y=V.current)==null||Y.editor.setTheme(l)},[l],N);let ye=E.useCallback(()=>{var Y;if(!(!ce.current||!V.current)&&!ne.current){de.current(V.current);let F=o||n,te=xo(V.current,r||e||"",t||a||"",F||"");U.current=(Y=V.current)==null?void 0:Y.editor.create(ce.current,{model:te,automaticLayout:!0,...f},m),y&&U.current.restoreViewState(Xd.get(F)),V.current.editor.setTheme(l),u!==void 0&&U.current.revealLine(u),M(!0),ne.current=!0}},[e,t,n,r,a,o,f,m,y,l,u]);E.useEffect(()=>{N&&ie.current(U.current,V.current)},[N]),E.useEffect(()=>{!D&&!N&&ye()},[D,N,ye]),J.current=r,E.useEffect(()=>{var Y,F;N&&R&&((Y=X.current)==null||Y.dispose(),X.current=(F=U.current)==null?void 0:F.onDidChangeModelContent(te=>{q.current||R(U.current.getValue(),te)}))},[N,R]),E.useEffect(()=>{if(N){let Y=V.current.editor.onDidChangeMarkers(F=>{var re;let te=(re=U.current.getModel())==null?void 0:re.uri;if(te&&F.find(fe=>fe.path===te.path)){let fe=V.current.editor.getModelMarkers({resource:te});O==null||O(fe)}});return()=>{Y==null||Y.dispose()}}return()=>{}},[N,O]);function P(){var Y,F;(Y=X.current)==null||Y.dispose(),g?y&&Xd.set(o,U.current.saveViewState()):(F=U.current.getModel())==null||F.dispose(),U.current.dispose()}return Ge.createElement(OD,{width:v,height:x,isEditorReady:N,loading:d,_ref:ce,className:S,wrapperProps:A})}var NX=RX,kX=E.memo(NX);const OX=({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}),y=E.useMemo(()=>n?"vs-dark-transparent":"hc-light-theme",[n]),g=(x,S)=>{var w;d.current=x;const A=(x.getContentHeight()??0)+25;S.editor.defineTheme("vs-dark-transparent",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.defineTheme("hc-light-theme",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),S.editor.setTheme(y),S.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),S.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),S.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),m({height:A,width:((w=u.current)==null?void 0:w.clientWidth)??0})},v=r??e.split(`
|
|
290
|
-
`).length>1;return b.jsxs("div",{className:Ae("relative h-full w-full text-sm",r&&"ml-0"),children:[a&&b.jsx("div",{className:"sticky top-5 z-10",children:b.jsx("div",{className:Ae("absolute bottom-0 right-2 flex h-7 items-center"),children:b.jsx(wD,{content:e})})}),b.jsx("div",{className:"z-0 grid size-full grid-cols-[0px] overflow-auto",ref:u,children:b.jsx(kX,{...f,defaultLanguage:"typescript",language:t,loading:b.jsx(Co,{}),defaultValue:String(e).replace(/\n$/,""),onMount:g,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:y,className:"my-2 rounded-md"})})]})},DX=({dictionary:e,isDarkMode:t})=>{const{setEditedContent:n,editedContent:r}=Tn(),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(OX,{language:"json",onChange:l=>{a(l??"{}")&&n(e.key,JSON.parse(l??"{}"))},isDarkMode:t,children:JSON.stringify(o,null,2)})})},IX={key:"node-type-selector",content:{triggerPlaceHolder:pe({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:pe({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:pe({en:"Text","en-GB":"Text",fr:"Texte",es:"Texto",de:"Text",ja:"テキスト",ko:"텍스트",zh:"文本",it:"Testo",pt:"Texto",hi:"पाठ",ar:"نص",ru:"Текст"}),number:pe({en:"Number","en-GB":"Number",fr:"Nombre",es:"Número",de:"Zahl",ja:"数字",ko:"숫자",zh:"数字",it:"Numero",pt:"Número",hi:"संख्या",ar:"رقم",ru:"Число"}),boolean:pe({en:"Boolean","en-GB":"Boolean",fr:"Booléen",es:"Booleano",de:"Bool",ja:"ブール",ko:"불리언",zh:"布尔",it:"Booleano",pt:"Booleano",hi:"बूलियन",ar:"منطقي",ru:"Булево"}),node:pe({en:"Object","en-GB":"Object",fr:"Objet",es:"Objeto",de:"Objekt",ja:"オブジェクト",ko:"객체",zh:"对象",it:"Oggetto",pt:"Objeto",hi:"ऑब्जेक्ट",ar:"كائن",ru:"Объект"}),array:pe({en:"Array","en-GB":"Array",fr:"Tableau",es:"Arreglo",de:"Array",ja:"配列",ko:"배열",zh:"数组",it:"Array",pt:"Array",hi:"ऐरे",ar:"مصفوفة",ru:"Массив"}),enumeration:pe({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:pe({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:pe({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:pe({en:"Condition","en-GB":"Condition",fr:"Condition",es:"Condición",de:"Bedingung",ja:"条件",ko:"조건",zh:"条件",it:"Condizione",pt:"Condição",hi:"शर्त्ता",ar:"شرط",ru:"Условие"}),file:pe({en:"File","en-GB":"File",fr:"Fichier",es:"Archivo",de:"Datei",ja:"ファイル",ko:"파일",zh:"文件",it:"File",pt:"Arquivo",hi:"फ़ाइल",ar:"ملف",ru:"Файл"}),markdown:pe({en:"Markdown","en-GB":"Markdown",fr:"Markdown",es:"Markdown",de:"Markdown",ja:"マークダウン",ko:"마크다운",zh:"Markdown",it:"Markdown",pt:"Markdown",hi:"मार्कडाउन",ar:"مارك داون",ru:"Markdown"}),reactNode:pe({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:"Реакт узел"})}},Qd=({section:e,onValueChange:t})=>{const{multilingual:n,text:r,number:a,boolean:o,node:l,array:u,enumeration:d,triggerPlaceHolder:f,nest:m,condition:y,markdown:g,insertion:v,reactNode:x,file:S}=nn(IX),A=Vo(e),[w,T]=E.useState(A),R=O=>{T(O),t(O)};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:K.Translation,children:n}),b.jsx(je.Item,{value:K.Text,children:r}),b.jsx(je.Item,{value:K.Number,children:a}),b.jsx(je.Item,{value:K.Boolean,children:o}),b.jsx(je.Item,{value:K.Object,children:l}),b.jsx(je.Item,{value:K.Array,children:u}),b.jsx(je.Item,{value:K.Enumeration,children:d}),b.jsx(je.Item,{value:K.Insertion,children:v}),b.jsx(je.Item,{value:K.Markdown,children:g}),b.jsx(je.Item,{value:K.Nested,children:m}),b.jsx(je.Item,{value:K.Condition,children:y}),b.jsx(je.Item,{value:K.ReactNode,disabled:!0,children:x}),b.jsx(je.Item,{value:K.File,children:S})]})]})},LD={key:"editor-view",content:{titleInput:{placeholder:pe({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:pe({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:pe({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:pe({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:"Добавить новый узел"})}}},Ev=({section:e,dictionaryKey:t,keyPath:n,onNodeTypeChange:r})=>{var d;const a=((d=Yr())==null?void 0:d.internationalization.locales)??[],o=Vo(e),l=FT(e),u=f=>{const m=Ql(o,a,f);r(m)};if(o===K.Translation||o===K.Condition||o===K.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(Qd,{section:e,onValueChange:y=>r(Ql(y,a))}),b.jsx(Ev,{section:l,keyPath:m,dictionaryKey:t,onNodeTypeChange:u})]})}if(o===K.Array){const f=[...n,{type:o,key:0}];return b.jsxs("div",{className:"flex w-full flex-col gap-1",children:[b.jsx(Qd,{section:e,onValueChange:m=>r(Ql(m,a))}),b.jsx(Ev,{section:l,keyPath:f,dictionaryKey:t,onNodeTypeChange:u})]})}return o===K.Object?b.jsxs(b.Fragment,{children:[b.jsx(Qd,{section:e,onValueChange:f=>r(Ql(f,a))}),b.jsx("div",{className:"ml-10 mt-6",children:b.jsx(MX,{keyPath:n,section:e,dictionaryKey:t})})]}):b.jsx(Qd,{section:e,onValueChange:f=>r(Ql(f,a))})},f0=({sectionKey:e,section:t,keyPath:n,dictionaryKey:r})=>{const{focusedContent:a,setFocusedContentKeyPath:o}=ba(),{renameEditedContent:l,addEditedContent:u}=Bo(),{titleInput:d,deleteButton:f}=nn(LD),m=y=>{l(r,y,n);const g=n.slice(0,-1),v=n[n.length-1],x=[...g,{...v,key:y}];o(x)};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":Zc(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(PC,{name:"key","aria-label":"Key",placeholder:d.placeholder.value,defaultValue:e,onSave:y=>m(y),variant:"invisible"}),b.jsx(yt,{label:f.label.value,variant:"hoverable",size:"icon-sm",color:"text",className:"translate-x-2",Icon:dh,onClick:()=>{u(r,void 0,n);const y=n.slice(0,-1);o(y)}})]}),b.jsxs("span",{className:"text-neutral ml-3 text-sm",children:["( ",yf(e)," )"]})]}),b.jsx(Ev,{keyPath:n,dictionaryKey:r,section:t,onNodeTypeChange:y=>{u(r,y,n)}})]})})},LX=({section:e,keyPath:t,dictionaryKey:n})=>{const{addNodeButton:r}=nn(LD),{setFocusedContentKeyPath:a}=Tv(),{addEditedContent:o}=Bo();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(f0,{sectionKey:l,section:e==null?void 0:e[l],keyPath:[...t,{type:K.Object,key:l}],dictionaryKey:n})},l))}),b.jsx(yt,{label:r.label.value,variant:"hoverable",size:"md",color:"text",Icon:uh,className:"flex-1",onClick:()=>{const u=[...t,{type:K.Object,key:"newKey"}];o(n,"",u),a(u)},children:r.text})]})},MX=({section:e,keyPath:t,dictionaryKey:n})=>!e||typeof e!="object"||typeof e.nodeType=="string"?b.jsx(f0,{sectionKey:"content",section:e,keyPath:t,dictionaryKey:n}):b.jsx(LX,{section:e,keyPath:t,dictionaryKey:n}),jX=({dictionary:e})=>{var o,l;const{content:t,key:n}=e,{editedContent:r}=Tn(),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(f0,{section:a,keyPath:[],dictionaryKey:e.key})},PX=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:a})=>{const o=Yr(),[l,u]=E.useState(1),{returnToDictionaryList:d}=nn(wZ),{setFocusedContent:f}=Tv(),{setLocaleDictionaries:m}=wv();return E.useEffect(()=>{f(y=>({...y??{},dictionaryKey:e.key})),m(y=>({...y,[e.key]:e}))},[]),b.jsx(J9,{availableLocales:(o==null?void 0:o.internationalization.locales)??[],children:b.jsxs("div",{className:"flex size-full flex-col gap-6 px-2",children:[b.jsx(yt,{onClick:t,variant:"hoverable",className:"z-10 ml-5 mr-auto",color:"text",Icon:uV,label:d.label.value,children:d.text}),b.jsx(cu,{defaultValue:l,onChange:y=>u(y),color:"text",size:"sm",className:"m-auto w-full max-w-xl",choices:[{content:"Details",value:0},{content:"Structure",value:2},{content:"Content",value:1},{content:"JSON",value:3}].filter(({value:y})=>!(!r.includes("remote")&&y===0))}),l===0&&b.jsx(AZ,{dictionary:e}),l===2&&b.jsx(jX,{dictionary:e}),l===1&&b.jsx(_Z,{dictionary:e,isDarkMode:n}),l===3&&b.jsx(DX,{dictionary:e,isDarkMode:n}),b.jsx(sO,{dictionary:e,mode:r,onDelete:()=>{f(null),a==null||a()}})]})})},VX=({children:e,isHidden:t,minWidth:n=0,align:r="left",className:a,...o})=>b.jsx("div",{className:Ae("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out",t?"":"grid-cols-[1fr]",a),"aria-hidden":t,...o,children:b.jsx("div",{style:{minWidth:`${n}px`},tabIndex:t!==!1?void 0:-1,className:Ae(r==="right"&&"ml-auto"),children:e})}),BX=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},zh=Y1((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})),MD=({title:e,identifier:t,children:n,header:r,closeOnOutsideClick:a=!0,backButton:o,isOpen:l,onClose:u})=>{const{isMobile:d}=Y9("md"),f=E.useRef(null),m=E.useRef(null),{close:y,open:g,isOpen:v}=zh(nO(S=>({close:()=>S.close(t),open:()=>S.open(t),isOpen:S.isOpen(t)})));rO({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=BX(f.current);(w&&T&&R||!A.target)&&(y(),u==null||u())}catch{y(),u==null||u()}};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[v,y,u,a,t]),E.useEffect(()=>{l!==void 0&&(l?g():(y(),u==null||u()))},[y,g,u,l,t]);const x=S=>{S.target===S.currentTarget&&d&&(y(),u==null||u())};return b.jsx("div",{className:"fixed right-0 top-0 z-50 flex h-full justify-end",children:b.jsx(VX,{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(yt,{variant:"hoverable",color:"text",label:o.text??"Go back",onClick:o.onBack,Icon:gV,children:o==null?void 0:o.text})}),b.jsx("div",{children:b.jsx(yt,{variant:"hoverable",color:"text",label:"Close",className:"ml-auto",onClick:y,Icon:_s,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:x,ref:m,children:n})})]})})})},zX=()=>{const{toasts:e}=pC();return b.jsxs(Yz.Provider,{children:[e.map(({id:t,title:n,description:r,action:a,...o})=>b.jsxs(Qz,{...o,children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(e2,{children:n}),r&&b.jsx(t2,{children:r})]}),a,b.jsx(Jz,{})]},t)),b.jsx(Zz,{})]})},jD=(...e)=>{const{localeDictionaries:t}=e1(),{data:n,isWaitingData:r}=f2(...e),a=E.useMemo(()=>((n==null?void 0:n.data)??[]).reduce((l,u)=>(l[u.key]=u,l),{}),[n]),o=E.useMemo(()=>E2(a??{},t),[a,t]);return{online:a,locale:t,all:o,isLoading:r}},UX=({children:e})=>b.jsx(KG,{features:C8,children:e}),HX=({children:e})=>b.jsx(UX,{children:b.jsxs(FB,{children:[b.jsx(zX,{}),e]})}),FX=({children:e})=>b.jsx(WP,{children:b.jsx(AP,{children:b.jsx(S1,{path:"*",element:e})})}),Sv="dictionaryList",PD={key:"dictionary-edition-drawer",content:{openDictionaryEditor:{label:pe({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:pe({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:pe({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:pe({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"})}},h0=e=>`dictionary_edition_${e}`,VD=e=>{const t=h0(e),{isOpen:n,open:r,close:a}=zh(),{getEditedContentValue:o}=Bo(),{focusedContent:l,setFocusedContent:u}=ba();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)}}},GX=({locale:e,identifier:t,handleOnBack:n,isDarkMode:r})=>{const{modalTitle:a,openDictionaryEditor:o}=nn(PD),[l,u]=E.useState(!1),{all:d}=jD(),{focusedContent:f}=VD(t),m=E.useCallback(()=>{u(!1),n()},[n]),y=f==null?void 0:f.dictionaryKey;if(!y)return b.jsx(b.Fragment,{children:"No dictionary focused"});const g=d[y];return g?b.jsxs(b.Fragment,{children:[b.jsx(iO,{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(PX,{dictionary:g,onClickDictionaryList:m,isDarkMode:r,mode:["local","remote"],onDelete:()=>{u(!1),n()}})})}),b.jsxs("div",{className:"border-text/20 /20 mb-5 flex w-full border-b border-dashed px-3 pb-2",children:[b.jsx("h3",{className:"w-full text-center text-lg",children:g.title?g.title:g.key}),b.jsx(yt,{variant:"hoverable",color:"text",size:"icon-md",IconRight:D1,label:o.label.value,onClick:()=>u(!0)})]}),b.jsx(a9,{dictionary:g,locale:e,mode:["local","remote"]})]}):b.jsx(b.Fragment,{children:"No dictionary focused"})},$X=({locale:e,dictionaryKey:t,isDarkMode:n})=>{const{backButtonText:r}=nn(PD),a=h0(t),{focusedContent:o,close:l}=VD(t),{openDictionaryListDrawer:u}=zh(f=>({openDictionaryListDrawer:()=>f.open(Sv)})),d=()=>{l(),u()};return b.jsx(MD,{identifier:a,backButton:{onBack:d,text:r.value},onClose:l,children:o&&b.jsx(GX,{focusedContent:o,locale:e,identifier:a,handleOnBack:d,isDarkMode:n})})},qX=({locale:e,isDarkMode:t})=>{const{focusedContent:n}=ba(),r=n==null?void 0:n.dictionaryKey;return r?b.jsx($X,{locale:e,dictionaryKey:r,isDarkMode:t}):b.jsx(b.Fragment,{})},KX=()=>{const{all:e}=jD(),t=E.useMemo(()=>Object.keys(e),[e]),{close:n,open:r}=zh(),{editedContent:a}=Tn(),{setFocusedContent:o}=ba(),l=d=>{n(Sv);const{filePath:f}=e[d];o({dictionaryKey:d,dictionaryPath:f}),r(h0(d))},u=E.useCallback(d=>Object.keys(a??{}).includes(d),[a]);return b.jsx(MD,{title:"Dictionary list",identifier:Sv,children:t.map(d=>b.jsx("div",{children:b.jsx(yt,{label:`Open dictionary editor ${d}`,onClick:()=>l(d),variant:"hoverable",color:"text",IconRight:xf,size:"md",isFullWidth:!0,children:u(d)?`✎ ${d}`:d})},d))})},WX=({children:e})=>{const[t]=vs(fr.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(qX,{locale:t}),b.jsx(KX,{})]})},YX=()=>{const[e,t]=E.useState();return E.useEffect(()=>{fetch("/api/config").then(n=>n.json()).then(n=>t(n.data))},[]),e},ZX=({children:e,iframeRef:t})=>{const n=YX(),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(hj,{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(Co,{})},XX=()=>{const{editedContent:e,setEditedContentState:t}=Tn(),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},QX=(...e)=>$1(fh(e)),JX={key:"no-application-url-view",content:{title:pe({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:pe({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:pe({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:pe({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:"查看如何配置编辑器"})}}},eQ=()=>{const{title:e,description:t,documentationLink:n}=nn(JX);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsx(Yb,{className:"mb-8",children:e}),b.jsx("strong",{className:"text-neutral block",children:t}),b.jsx(Zb,{label:n.label.value,href:"https://intlayer.org/doc/concept/configuration#editor-configuration",color:"text",children:n.text})]})},tQ=({iframeRef:e,applicationPath:t})=>{const{editor:n}=Yr(),r=()=>a(n.enabled),a=lj();i1(r),XX(),pj();const[o,l]=E.useState(!1),[u]=mj(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(Co,{isLoading:o}),b.jsx("iframe",{src:`${n.applicationURL}${t}`,title:"Intlayer Application",className:QX("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(eQ,{})})})},nQ=()=>{const e=E.useRef(null),t=_a();return b.jsx(ZX,{iframeRef:e,children:b.jsx(_j,{disableEditor:!0,children:b.jsx(WX,{children:b.jsx(tQ,{iframeRef:e,applicationPath:t.pathname})})})})},rQ=()=>b.jsx(FX,{children:b.jsx(HX,{children:b.jsx(nQ,{})})});uM.createRoot(document.getElementById("root")).render(b.jsx(E.StrictMode,{children:b.jsx(rQ,{})}));
|