@dhzh/foundry 7.4.1 → 8.0.0

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.
Files changed (100) hide show
  1. package/README.md +29 -14
  2. package/dist/index.mjs +7 -8
  3. package/dist/skills/foundry/SKILL.md +9 -7
  4. package/dist/skills/foundry/references/agents.md +8 -1
  5. package/dist/skills/foundry/references/backups.md +32 -26
  6. package/dist/skills/foundry/references/instructions.md +2 -1
  7. package/dist/skills/foundry/references/skills.md +201 -8
  8. package/dist/web/assets/abap-DLDM7-KI.js +1 -0
  9. package/dist/web/assets/apex-DNDY2TF8.js +1 -0
  10. package/dist/web/assets/azcli-Y6nb8tq_.js +1 -0
  11. package/dist/web/assets/bat-BwHxbl9M.js +1 -0
  12. package/dist/web/assets/bicep-CFznDFnq.js +2 -0
  13. package/dist/web/assets/cameligo-Bf6VGUru.js +1 -0
  14. package/dist/web/assets/clojure-Dnu-v4kV.js +1 -0
  15. package/dist/web/assets/code-editor-LITaffq7.js +1123 -0
  16. package/dist/web/assets/codicon-MIjLT6Vj.ttf +0 -0
  17. package/dist/web/assets/coffee-Bd8akH9Z.js +1 -0
  18. package/dist/web/assets/cpp-BbWJElDN.js +1 -0
  19. package/dist/web/assets/csharp-Co3qMtFm.js +1 -0
  20. package/dist/web/assets/csp-D-4FJmMZ.js +1 -0
  21. package/dist/web/assets/css-DdJfP1eB.js +3 -0
  22. package/dist/web/assets/cypher-cTPe9QuQ.js +1 -0
  23. package/dist/web/assets/dart-BOtBlQCF.js +1 -0
  24. package/dist/web/assets/dockerfile-BG73LgW2.js +1 -0
  25. package/dist/web/assets/ecl-BEgZUVRK.js +1 -0
  26. package/dist/web/assets/elixir-B99a8Jiy.js +1 -0
  27. package/dist/web/assets/flow9-BeJ5waoc.js +1 -0
  28. package/dist/web/assets/freemarker2-CnoNAUv6.js +3 -0
  29. package/dist/web/assets/fsharp-PahG7c26.js +1 -0
  30. package/dist/web/assets/go-acbASCJo.js +1 -0
  31. package/dist/web/assets/graphql-BxJiqAUM.js +1 -0
  32. package/dist/web/assets/handlebars-DUxhpkjP.js +1 -0
  33. package/dist/web/assets/hcl-DtV1sZF8.js +1 -0
  34. package/dist/web/assets/html-BG3mLIV3.js +1 -0
  35. package/dist/web/assets/index-DcnVokj7.js +201 -0
  36. package/dist/web/assets/index-Z4Mw08LY.css +1 -0
  37. package/dist/web/assets/ini-CWGZJIwx.js +1 -0
  38. package/dist/web/assets/java-CXBNlu9o.js +1 -0
  39. package/dist/web/assets/javascript-BUXOllvL.js +1 -0
  40. package/dist/web/assets/json.worker-DjMR4gyh.js +77 -0
  41. package/dist/web/assets/jsonMode-D5RylzZ2.js +56 -0
  42. package/dist/web/assets/jsonMode-Dnk_vNU4.css +1 -0
  43. package/dist/web/assets/julia-cl7-CwDS.js +1 -0
  44. package/dist/web/assets/kotlin-s7OhZKlX.js +1 -0
  45. package/dist/web/assets/less-9HpZscsL.js +2 -0
  46. package/dist/web/assets/lexon-OrD6JF1K.js +1 -0
  47. package/dist/web/assets/liquid-BeZnVjtp.js +1 -0
  48. package/dist/web/assets/lua-Cyyb5UIc.js +1 -0
  49. package/dist/web/assets/m3-B8OfTtLu.js +1 -0
  50. package/dist/web/assets/mdx-CUPokOtG.js +1 -0
  51. package/dist/web/assets/mips-CiqrrVzr.js +1 -0
  52. package/dist/web/assets/msdax-DmeGPVcC.js +1 -0
  53. package/dist/web/assets/mysql-C_tMU-Nz.js +1 -0
  54. package/dist/web/assets/objective-c-BDtDVThU.js +1 -0
  55. package/dist/web/assets/pascal-vHIfCaH5.js +1 -0
  56. package/dist/web/assets/pascaligo-DtZ0uQbO.js +1 -0
  57. package/dist/web/assets/perl-Ub6l9XKa.js +1 -0
  58. package/dist/web/assets/pgsql-BlNEE0v7.js +1 -0
  59. package/dist/web/assets/php-BBUBE1dy.js +1 -0
  60. package/dist/web/assets/pla-DSh2-awV.js +1 -0
  61. package/dist/web/assets/postiats-CocnycG-.js +1 -0
  62. package/dist/web/assets/powerquery-tScXyioY.js +1 -0
  63. package/dist/web/assets/powershell-COWaemsV.js +1 -0
  64. package/dist/web/assets/protobuf-Brw8urJB.js +2 -0
  65. package/dist/web/assets/pug-8SOpv6rk.js +1 -0
  66. package/dist/web/assets/python-Ce6KXmfY.js +1 -0
  67. package/dist/web/assets/qsharp-Bw9ernYp.js +1 -0
  68. package/dist/web/assets/r-j7ic8hl3.js +1 -0
  69. package/dist/web/assets/razor-at-_pj8L.js +1 -0
  70. package/dist/web/assets/redis-Bu5POkcn.js +1 -0
  71. package/dist/web/assets/redshift-Bs9aos_-.js +1 -0
  72. package/dist/web/assets/restructuredtext-CqXO7rUv.js +1 -0
  73. package/dist/web/assets/ruby-zBfavPgS.js +1 -0
  74. package/dist/web/assets/rust-BzKRNQWT.js +1 -0
  75. package/dist/web/assets/sb-BBc9UKZt.js +1 -0
  76. package/dist/web/assets/scala-D9hQfWCl.js +1 -0
  77. package/dist/web/assets/scheme-BPhDTwHR.js +1 -0
  78. package/dist/web/assets/scss-CBJaRo0y.js +3 -0
  79. package/dist/web/assets/shell-DiJ1NA_G.js +1 -0
  80. package/dist/web/assets/solidity-Db0IVjzk.js +1 -0
  81. package/dist/web/assets/sophia-CnS9iZB_.js +1 -0
  82. package/dist/web/assets/sparql-CJmd_6j2.js +1 -0
  83. package/dist/web/assets/sql-ClhHkBeG.js +1 -0
  84. package/dist/web/assets/st-CHwy0fLd.js +1 -0
  85. package/dist/web/assets/swift-CnmFD0ga.js +1 -0
  86. package/dist/web/assets/systemverilog-Bs9z6M-B.js +1 -0
  87. package/dist/web/assets/tcl-Dm6ycUr_.js +1 -0
  88. package/dist/web/assets/twig-Csy3S7wG.js +1 -0
  89. package/dist/web/assets/typescript-t-PYMj1J.js +1 -0
  90. package/dist/web/assets/typespec-Btyra-wh.js +1 -0
  91. package/dist/web/assets/vb-Db0cS2oM.js +1 -0
  92. package/dist/web/assets/wgsl-BTesnYfV.js +298 -0
  93. package/dist/web/assets/xml-LqDDuqzV.js +1 -0
  94. package/dist/web/assets/yaml-DE0XDSVN.js +1 -0
  95. package/dist/web/index.html +2 -2
  96. package/package.json +1 -1
  97. package/dist/web/assets/index-BCwzZP_O.css +0 -1
  98. package/dist/web/assets/index-huTxUjD-.js +0 -155
  99. package/dist/web/assets/markdown-editor-nKIMVkN5.js +0 -1120
  100. /package/dist/web/assets/{markdown-editor-DMeNDIaI.css → code-editor-DMeNDIaI.css} +0 -0
@@ -0,0 +1,201 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-LITaffq7.js","assets/code-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
2
+ function ZD(e,t){for(var i=0;i<t.length;i++){const a=t[i];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const c=Object.getOwnPropertyDescriptor(a,o);c&&Object.defineProperty(e,o,c.get?c:{enumerable:!0,get:()=>a[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();function DR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I0={exports:{}},lu={};var $S;function WD(){if($S)return lu;$S=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var d in o)d!=="key"&&(c[d]=o[d])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return lu.Fragment=t,lu.jsx=i,lu.jsxs=i,lu}var QS;function JD(){return QS||(QS=1,I0.exports=WD()),I0.exports}var b=JD(),P0={exports:{}},kt={};var XS;function ej(){if(XS)return kt;XS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),S=Symbol.iterator;function E(I){return I===null||typeof I!="object"?null:(I=S&&I[S]||I["@@iterator"],typeof I=="function"?I:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,R={};function O(I,V,J){this.props=I,this.context=V,this.refs=R,this.updater=J||C}O.prototype.isReactComponent={},O.prototype.setState=function(I,V){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,V,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function A(){}A.prototype=O.prototype;function k(I,V,J){this.props=I,this.context=V,this.refs=R,this.updater=J||C}var N=k.prototype=new A;N.constructor=k,w(N,O.prototype),N.isPureReactComponent=!0;var j=Array.isArray;function D(){}var M={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function L(I,V,J){var re=J.ref;return{$$typeof:e,type:I,key:V,ref:re!==void 0?re:null,props:J}}function q(I,V){return L(I.type,V,I.props)}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function B(I){var V={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(J){return V[J]})}var H=/\/+/g;function U(I,V){return typeof I=="object"&&I!==null&&I.key!=null?B(""+I.key):V.toString(36)}function z(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(D,D):(I.status="pending",I.then(function(V){I.status==="pending"&&(I.status="fulfilled",I.value=V)},function(V){I.status==="pending"&&(I.status="rejected",I.reason=V)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function Q(I,V,J,re,we){var le=typeof I;(le==="undefined"||le==="boolean")&&(I=null);var me=!1;if(I===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(I.$$typeof){case e:case t:me=!0;break;case y:return me=I._init,Q(me(I._payload),V,J,re,we)}}if(me)return we=we(I),me=re===""?"."+U(I,0):re,j(we)?(J="",me!=null&&(J=me.replace(H,"$&/")+"/"),Q(we,V,J,"",function(Te){return Te})):we!=null&&(X(we)&&(we=q(we,J+(we.key==null||I&&I.key===we.key?"":(""+we.key).replace(H,"$&/")+"/")+me)),V.push(we)),1;me=0;var ge=re===""?".":re+":";if(j(I))for(var ue=0;ue<I.length;ue++)re=I[ue],le=ge+U(re,ue),me+=Q(re,V,J,le,we);else if(ue=E(I),typeof ue=="function")for(I=ue.call(I),ue=0;!(re=I.next()).done;)re=re.value,le=ge+U(re,ue++),me+=Q(re,V,J,le,we);else if(le==="object"){if(typeof I.then=="function")return Q(z(I),V,J,re,we);throw V=String(I),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return me}function $(I,V,J){if(I==null)return I;var re=[],we=0;return Q(I,re,"","",function(le){return V.call(J,le,we++)}),re}function K(I){if(I._status===-1){var V=I._result,J=V();J.then(function(re){(I._status===0||I._status===-1)&&(I._status=1,I._result=re,J.status===void 0&&(J.status="fulfilled",J.value=re))},function(re){(I._status===0||I._status===-1)&&(I._status=2,I._result=re,J.status===void 0&&(J.status="rejected",J.reason=re))}),I._status===-1&&(I._status=0,I._result=J)}if(I._status===1)return I._result.default;throw I._result}var Y=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=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(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)};function ee(I){var V=M.T,J={};J.types=V!==null?V.types:null,M.T=J;try{var re=I(),we=M.S;we!==null&&we(J,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(D,Y)}catch(le){Y(le)}finally{V!==null&&J.types!==null&&(V.types=J.types),M.T=V}}function G(I){var V=M.T;if(V!==null){var J=V.types;J===null?V.types=[I]:J.indexOf(I)===-1&&J.push(I)}else ee(G.bind(null,I))}var oe={map:$,forEach:function(I,V,J){$(I,function(){V.apply(this,arguments)},J)},count:function(I){var V=0;return $(I,function(){V++}),V},toArray:function(I){return $(I,function(V){return V})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return kt.Activity=h,kt.Children=oe,kt.Component=O,kt.Fragment=i,kt.Profiler=o,kt.PureComponent=k,kt.StrictMode=a,kt.Suspense=f,kt.ViewTransition=x,kt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,kt.__COMPILER_RUNTIME={__proto__:null,c:function(I){return M.H.useMemoCache(I)}},kt.addTransitionType=G,kt.cache=function(I){return function(){return I.apply(null,arguments)}},kt.cacheSignal=function(){return null},kt.cloneElement=function(I,V,J){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var re=w({},I.props),we=I.key;if(V!=null)for(le in V.key!==void 0&&(we=""+V.key),V)!_.call(V,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&V.ref===void 0||(re[le]=V[le]);var le=arguments.length-2;if(le===1)re.children=J;else if(1<le){for(var me=Array(le),ge=0;ge<le;ge++)me[ge]=arguments[ge+2];re.children=me}return L(I.type,we,re)},kt.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:c,_context:I},I},kt.createElement=function(I,V,J){var re,we={},le=null;if(V!=null)for(re in V.key!==void 0&&(le=""+V.key),V)_.call(V,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(we[re]=V[re]);var me=arguments.length-2;if(me===1)we.children=J;else if(1<me){for(var ge=Array(me),ue=0;ue<me;ue++)ge[ue]=arguments[ue+2];we.children=ge}if(I&&I.defaultProps)for(re in me=I.defaultProps,me)we[re]===void 0&&(we[re]=me[re]);return L(I,le,we)},kt.createRef=function(){return{current:null}},kt.forwardRef=function(I){return{$$typeof:d,render:I}},kt.isValidElement=X,kt.lazy=function(I){return{$$typeof:y,_payload:{_status:-1,_result:I},_init:K}},kt.memo=function(I,V){return{$$typeof:g,type:I,compare:V===void 0?null:V}},kt.startTransition=ee,kt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},kt.use=function(I){return M.H.use(I)},kt.useActionState=function(I,V,J){return M.H.useActionState(I,V,J)},kt.useCallback=function(I,V){return M.H.useCallback(I,V)},kt.useContext=function(I){return M.H.useContext(I)},kt.useDebugValue=function(){},kt.useDeferredValue=function(I,V){return M.H.useDeferredValue(I,V)},kt.useEffect=function(I,V){return M.H.useEffect(I,V)},kt.useEffectEvent=function(I){return M.H.useEffectEvent(I)},kt.useId=function(){return M.H.useId()},kt.useImperativeHandle=function(I,V,J){return M.H.useImperativeHandle(I,V,J)},kt.useInsertionEffect=function(I,V){return M.H.useInsertionEffect(I,V)},kt.useLayoutEffect=function(I,V){return M.H.useLayoutEffect(I,V)},kt.useMemo=function(I,V){return M.H.useMemo(I,V)},kt.useOptimistic=function(I,V){return M.H.useOptimistic(I,V)},kt.useReducer=function(I,V,J){return M.H.useReducer(I,V,J)},kt.useRef=function(I){return M.H.useRef(I)},kt.useState=function(I){return M.H.useState(I)},kt.useSyncExternalStore=function(I,V,J){return M.H.useSyncExternalStore(I,V,J)},kt.useTransition=function(){return M.H.useTransition()},kt.version="19.3.1",kt}var ZS;function qu(){return ZS||(ZS=1,P0.exports=ej()),P0.exports}var v=qu();const Ne=DR(v),jR=ZD({__proto__:null,default:Ne},[v]);var L0={exports:{}},cu={},z0={exports:{}},_0={};var WS;function tj(){return WS||(WS=1,(function(e){function t(z,Q){var $=z.length;z.push(Q);e:for(;0<$;){var K=$-1>>>1,Y=z[K];if(0<o(Y,Q))z[K]=Q,z[$]=Y,$=K;else break e}}function i(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var Q=z[0],$=z.pop();if($!==Q){z[0]=$;e:for(var K=0,Y=z.length,ee=Y>>>1;K<ee;){var G=2*(K+1)-1,oe=z[G],I=G+1,V=z[I];if(0>o(oe,$))I<Y&&0>o(V,oe)?(z[K]=V,z[I]=$,K=I):(z[K]=oe,z[G]=$,K=G);else if(I<Y&&0>o(V,$))z[K]=V,z[I]=$,K=I;else break e}}return Q}function o(z,Q){var $=z.sortIndex-Q.sortIndex;return $!==0?$:z.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],g=[],y=1,h=null,x=3,S=!1,E=!1,C=!1,w=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function k(z){for(var Q=i(g);Q!==null;){if(Q.callback===null)a(g);else if(Q.startTime<=z)a(g),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=i(g)}}function N(z){if(C=!1,k(z),!E)if(i(f)!==null)E=!0,j||(j=!0,X());else{var Q=i(g);Q!==null&&U(N,Q.startTime-z)}}var j=!1,D=-1,M=5,_=-1;function L(){return w?!0:!(e.unstable_now()-_<M)}function q(){if(w=!1,j){var z=e.unstable_now();_=z;var Q=!0;try{e:{E=!1,C&&(C=!1,O(D),D=-1),S=!0;var $=x;try{t:{for(k(z),h=i(f);h!==null&&!(h.expirationTime>z&&L());){var K=h.callback;if(typeof K=="function"){h.callback=null,x=h.priorityLevel;var Y=K(h.expirationTime<=z);if(z=e.unstable_now(),typeof Y=="function"){h.callback=Y,k(z),Q=!0;break t}h===i(f)&&a(f),k(z)}else a(f);h=i(f)}if(h!==null)Q=!0;else{var ee=i(g);ee!==null&&U(N,ee.startTime-z),Q=!1}}break e}finally{h=null,x=$,S=!1}Q=void 0}}finally{Q?X():j=!1}}}var X;if(typeof A=="function")X=function(){A(q)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,H=B.port2;B.port1.onmessage=q,X=function(){H.postMessage(null)}}else X=function(){R(q,0)};function U(z,Q){D=R(function(){z(e.unstable_now())},Q)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(z){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var $=x;x=Q;try{return z()}finally{x=$}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(z,Q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var $=x;x=z;try{return Q()}finally{x=$}},e.unstable_scheduleCallback=function(z,Q,$){var K=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?K+$:K):$=K,z){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=$+Y,z={id:y++,callback:Q,priorityLevel:z,startTime:$,expirationTime:Y,sortIndex:-1},$>K?(z.sortIndex=$,t(g,z),i(f)===null&&z===i(g)&&(C?(O(D),D=-1):C=!0,U(N,$-K))):(z.sortIndex=Y,t(f,z),E||S||(E=!0,j||(j=!0,X()))),z},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(z){var Q=x;return function(){var $=x;x=Q;try{return z.apply(this,arguments)}finally{x=$}}}})(_0)),_0}var JS;function nj(){return JS||(JS=1,z0.exports=tj()),z0.exports}var U0={exports:{}},Sr={};var eE;function rj(){if(eE)return Sr;eE=1;var e=qu();function t(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal"),c=Symbol.for("react.recoverable"),u=Symbol.for("react.optimistic_key");function d(y,h,x){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:S==null?null:S===u?u:""+S,children:y,containerInfo:h,implementation:x}}var f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Sr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Sr.browser=function(y){return{$$typeof:c,_reason:y}},Sr.createPortal=function(y,h){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return d(y,h,null,x)},Sr.flushSync=function(y){var h=f.T,x=a.p;try{if(f.T=null,a.p=2,y)return y()}finally{f.T=h,a.p=x,a.d.f()}},Sr.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(y,h))},Sr.prefetchDNS=function(y){typeof y=="string"&&a.d.D(y)},Sr.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var x=h.as,S=g(x,h.crossOrigin),E=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;x==="style"?a.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:E,fetchPriority:C}):x==="script"&&a.d.X(y,{crossOrigin:S,integrity:E,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Sr.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var x=g(h.as,h.crossOrigin);a.d.M(y,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}}else h==null&&a.d.M(y)},Sr.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var x=h.as,S=g(x,h.crossOrigin);a.d.L(y,x,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Sr.preloadModule=function(y,h){if(typeof y=="string")if(h){var x=g(h.as,h.crossOrigin);a.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}else a.d.m(y)},Sr.requestFormReset=function(y){a.d.r(y)},Sr.unstable_batchedUpdates=function(y,h){return y(h)},Sr.useFormState=function(y,h,x){return f.H.useFormState(y,h,x)},Sr.useFormStatus=function(){return f.H.useHostTransitionStatus()},Sr.version="19.3.1",Sr}var tE;function IR(){if(tE)return U0.exports;tE=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(),U0.exports=rj(),U0.exports}var nE;function ij(){if(nE)return cu;nE=1;var e=nj(),t=qu(),i=IR();function a(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){for(var r=n,s=r;s&&!s.alternate;)r=s,(r.flags&4098)!==0&&(n=r.return),s=r.return;for(;r.return;)r=r.return;return r.tag===3?n:null}function u(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(c(n)!==n)throw Error(a(188))}function g(n){var r=n.alternate;if(!r){if(r=c(n),r===null)throw Error(a(188));return r!==n?null:n}for(var s=n,l=r;;){var p=s.return;if(p===null)break;var m=p.alternate;if(m===null){if(l=p.return,l!==null){s=l;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===s)return f(p),n;if(m===l)return f(p),r;m=m.sibling}throw Error(a(188))}if(s.return!==l.return)s=p,l=m;else{for(var T=!1,P=p.child;P;){if(P===s){T=!0,s=p,l=m;break}if(P===l){T=!0,l=p,s=m;break}P=P.sibling}if(!T){for(P=m.child;P;){if(P===s){T=!0,s=m,l=p;break}if(P===l){T=!0,l=m,s=p;break}P=P.sibling}if(!T)throw Error(a(189))}}if(s.alternate!==l)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}function h(n,r,s,l,p,m){for(;n!==null;){if((n.tag===5||n.tag===27||n.tag===6)&&s(n,l,p,m)||(n.tag!==22||n.memoizedState===null)&&(r||n.tag!==5&&n.tag!==27)&&h(n.child,r,s,l,p,m))return!0;n=n.sibling}return!1}function x(n){for(n=n.return;n!==null;){if(n.tag===3||n.tag===5||n.tag===27)return n;n=n.return}return null}function S(n){var r=!1;for(n=n.return;n!==null&&(n.tag===4&&(r=!0),!(n.tag===3||n.tag===5||n.tag===27));)n=n.return;return r}function E(n){var r=[null,null],s=x(n);return s===null||C(r,n,s.child,{foundSelf:!1}),r}function C(n,r,s,l){for(;s!==null;){if(s===r)l.foundSelf=!0;else if(s.tag===5||s.tag===27||s.tag===6){if(l.foundSelf)return n[1]=s,!0;n[0]=s}else if((s.tag!==22||s.memoizedState===null)&&C(n,r,s.child,l))return!0;s=s.sibling}return!1}function w(n){switch(n.tag){case 5:case 27:case 6:return n.stateNode;case 3:return n.stateNode.containerInfo;default:throw Error(a(559))}}var R=null,O=null;function A(n,r,s){return n===s?!0:n===r?(R=n,!0):!1}function k(n,r,s){return n===s?(O=n,!1):n===r?(O!==null&&(R=n),!0):!1}function N(n){if(n===null)return null;do n=n===null?null:n.return;while(n&&n.tag!==5&&n.tag!==27&&n.tag!==3);return n||null}function j(n,r,s){for(var l=0,p=n;p;p=s(p))l++;p=0;for(var m=r;m;m=s(m))p++;for(;0<l-p;)n=s(n),l--;for(;0<p-l;)r=s(r),p--;for(;l--;){if(n===r||r!==null&&n===r.alternate)return n;n=s(n),r=s(r)}return null}var D=Object.assign,M=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),U=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),G=Symbol.for("react.legacy_hidden"),oe=Symbol.for("react.memo_cache_sentinel"),I=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),J=Symbol.iterator;function re(n){return n===null||typeof n!="object"?null:(n=J&&n[J]||n["@@iterator"],typeof n=="function"?n:null)}var we=Symbol.for("react.client.reference");function le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===we?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case q:return"Fragment";case B:return"Profiler";case X:return"StrictMode";case Q:return"Suspense";case $:return"SuspenseList";case ee:return"Activity";case I:return"ViewTransition"}if(typeof n=="object")switch(n.$$typeof){case L:return"Portal";case U:return n.displayName||"Context";case H:return(n._context.displayName||"Context")+".Consumer";case z:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case K:return r=n.displayName||null,r!==null?r:le(n.type)||"Memo";case Y:r=n._payload,n=n._init;try{return le(n(r))}catch{}}return null}var me=Array.isArray,ge=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},ve=[],Pe=-1;function Ae(n){return{current:n}}function Le(n){0>Pe||(n.current=ve[Pe],ve[Pe]=null,Pe--)}function Be(n,r){Pe++,ve[Pe]=n.current,n.current=r}var Oe=Ae(null),Ue=Ae(null),be=Ae(null),He=Ae(null);function Ze(n,r){switch(Be(be,r),Be(Ue,n),Be(Oe,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?rS(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=rS(r),n=iS(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Le(Oe),Be(Oe,n)}function st(){Le(Oe),Le(Ue),Le(be)}function de(n){var r=n.memoizedState;r!==null&&(Cl._currentValue=r.memoizedState,Be(He,n)),r=Oe.current;var s=iS(r,n.type);r!==s&&(Be(Ue,n),Be(Oe,s))}function Ee(n){Ue.current===n&&(Le(Oe),Le(Ue)),He.current===n&&(Le(He),Cl._currentValue=Te)}var Ge,Me;function De(n){if(Ge===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);Ge=r&&r[1]||"",Me=-1<s.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Ge+n+Me}var vt=!1;function dt(n,r){if(!n||vt)return"";vt=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(qe){var ie=qe}Reflect.construct(n,[],Ce)}else{try{Ce.call()}catch(qe){ie=qe}Ce=!1;try{var fe=Object.getOwnPropertyDescriptor(n.prototype,"props");Object.defineProperty(n.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Ce=!0,new n}finally{Ce&&(fe!==void 0?Object.defineProperty(n.prototype,"props",fe):delete n.prototype.props)}}}else{try{throw Error()}catch(qe){ie=qe}(Ce=n())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(qe){if(qe&&ie&&typeof qe.stack=="string")return[qe.stack,ie.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),T=m[0],P=m[1];if(T&&P){var Z=T.split(`
5
+ `),se=P.split(`
6
+ `);for(p=l=0;l<Z.length&&!Z[l].includes("DetermineComponentFrameRoot");)l++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(l===Z.length||p===se.length)for(l=Z.length-1,p=se.length-1;1<=l&&0<=p&&Z[l]!==se[p];)p--;for(;1<=l&&0<=p;l--,p--)if(Z[l]!==se[p]){if(l!==1||p!==1)do if(l--,p--,0>p||Z[l]!==se[p]){var pe=`
7
+ `+Z[l].replace(" at new "," at ");return n.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",n.displayName)),pe}while(1<=l&&0<=p);break}}}finally{vt=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?De(s):""}function pt(n,r){switch(n.tag){case 26:case 27:case 5:return De(n.type);case 16:return De("Lazy");case 13:return n.child!==r&&r!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return dt(n.type,!1);case 11:return dt(n.type.render,!1);case 1:return dt(n.type,!0);case 31:return De("Activity");case 30:return De("ViewTransition");default:return""}}function Mt(n){try{var r="",s=null;do r+=pt(n,s),s=n,n=n.return;while(n);return r}catch(l){return`
8
+ Error generating stack: `+l.message+`
9
+ `+l.stack}}var jt=Object.prototype.hasOwnProperty,en=e.unstable_scheduleCallback,an=e.unstable_cancelCallback,tn=e.unstable_shouldYield,Je=e.unstable_requestPaint,St=e.unstable_now,Xt=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,bt=e.unstable_UserBlockingPriority,mt=e.unstable_NormalPriority,Ut=e.unstable_LowPriority,un=e.unstable_IdlePriority,je=e.log,at=e.unstable_setDisableYieldValue,Ie=null,ze=null;function $e(n){if(typeof je=="function"&&at(n),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Ie,n)}catch{}}var et=Math.clz32?Math.clz32:W,Tt=Math.log,F=Math.LN2;function W(n){return n>>>=0,n===0?32:31-(Tt(n)/F|0)|0}var ne=256,ye=262144,xe=4194304;function Ke(n){var r=n&42;if(r!==0)return r;switch(n&-n){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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&-n;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ve(n,r,s){var l=n.pendingLanes;if(l===0)return 0;var p=0,m=n.suspendedLanes,T=n.pingedLanes;n=n.warmLanes;var P=l&134217727;return P!==0?(l=P&~m,l!==0?p=Ke(l):(T&=P,T!==0?p=Ke(T):s||(s=P&~n,s!==0&&(p=Ke(s))))):(P=l&~m,P!==0?p=Ke(P):T!==0?p=Ke(T):s||(s=l&~n,s!==0&&(p=Ke(s)))),p===0?0:r!==0&&r!==p&&(r&m)===0&&(m=p&-p,s=r&-r,m>=s||m===32&&(s&4194048)!==0)?r:p}function Xe(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Qe(n,r){(r&8)!==0&&(r|=r&32);var s=n.entangledLanes;if(s!==0)for(n=n.entanglements,s&=r;0<s;){var l=31-et(s),p=1<<l;r|=n[l],s&=~p}return r}function ot(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var n=xe;return xe<<=1,(xe&62914560)===0&&(xe=4194304),n}function Et(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function ft(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Kt(n,r,s,l,p,m){var T=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var P=n.entanglements,Z=n.expirationTimes,se=n.hiddenUpdates;for(s=T&~s;0<s;){var pe=31-et(s),Ce=1<<pe;P[pe]=0,Z[pe]=-1;var ie=se[pe];if(ie!==null)for(se[pe]=null,pe=0;pe<ie.length;pe++){var fe=ie[pe];fe!==null&&(fe.lane&=-536870913)}s&=~Ce}l!==0&&Ft(n,l,0),m!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=m&~(T&~r))}function Ft(n,r,s){n.pendingLanes|=r,n.suspendedLanes&=~r;var l=31-et(r);n.entangledLanes|=r,n.entanglements[l]=n.entanglements[l]|1073741824|s&261930}function An(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var l=31-et(s),p=1<<l;p&r|n[l]&r&&(n[l]|=r),s&=~p}}function qt(n,r){var s=r&-r;return s=(s&42)!==0?1:Bt(s),(s&(n.suspendedLanes|r))!==0?0:s}function Bt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Cn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Tn(){var n=ue.p;return n!==0?n:(n=window.event,n===void 0?32:FS(n.type))}function ei(n,r){var s=ue.p;try{return ue.p=n,r()}finally{ue.p=s}}var dn=Math.random().toString(36).slice(2),fn="__reactFiber$"+dn,kn="__reactProps$"+dn,jn="__reactContainer$"+dn,wa="__reactEvents$"+dn,Dr="__reactListeners$"+dn,zi="__reactHandles$"+dn,ti="__reactResources$"+dn,vi="__reactMarker$"+dn,zt="__reactLoad$"+dn;function qn(n){delete n[fn],delete n[kn],delete n[Dr],delete n[zi]}function Fn(n){var r;if(r=n[fn])return r;for(var s=n.parentNode;s;){if(r=s[jn]||s[fn]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=SS(n);n!==null;){if(s=n[fn])return s;n=SS(n)}return r}n=s,s=n.parentNode}return null}function hr(n){if(n=n[fn]||n[jn]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function he(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(a(33))}function ke(n){var r=n[ti];return r||(r=n[ti]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(n){n[vi]=!0}function nt(n){n[zt]=void 0}var Ot=new Set,wt={};function Ht(n,r){xn(n,r),xn(n+"Capture",r)}function xn(n,r){for(wt[n]=r,n=0;n<r.length;n++)Ot.add(r[n])}var hn=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]*$"),yt={},Dt={};function sn(n){return jt.call(Dt,n)?!0:jt.call(yt,n)?!1:hn.test(n)?Dt[n]=!0:(yt[n]=!0,!1)}var gt=!1;function nr(){var n=gt;return gt=!1,n}function zn(n,r,s){if(sn(r))if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,s)}}function ni(n,r,s){if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,s)}}function Gn(n,r,s,l){if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(r,s,l)}}function $n(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Vo(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function yc(n,r,s){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,m=l.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(T){s=""+T,m.call(this,T)}}),Object.defineProperty(n,r,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(T){s=""+T},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ra(n){if(!n._valueTracker){var r=Vo(n)?"checked":"value";n._valueTracker=yc(n,r,""+n[r])}}function Ko(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),l="";return n&&(l=Vo(n)?n.checked?"true":"false":n.value),n=l,n!==s?(r.setValue(n),!0):!1}var Sd=/[\n"\\]/g;function Dn(n){return n.replace(Sd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Cr(n,r,s,l,p,m,T,P){n.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.type=T:n.removeAttribute("type"),r!=null?T==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+$n(r)):n.value!==""+$n(r)&&(n.value=""+$n(r)):T!=="submit"&&T!=="reset"||n.removeAttribute("value"),r!=null?T==="number"&&n.value==r?qo(n,$n(n.value)):qo(n,$n(r)):s!=null?qo(n,$n(s)):l!=null&&n.removeAttribute("value"),p==null&&m!=null&&(n.defaultChecked=!!m),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.name=""+$n(P):n.removeAttribute("name")}function ts(n,r,s,l,p,m,T,P){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),r!=null||s!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){Ra(n);return}s=s!=null?""+$n(s):"",r=r!=null?""+$n(r):s,P||r===n.value||(n.value=r),n.defaultValue=r}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=P?n.checked:!!l,n.defaultChecked=!!l,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(n.name=T),Ra(n)}function qo(n,r){n.defaultValue!==""+r&&(n.defaultValue=""+r)}function Vr(n,r,s,l){if(n=n.options,r){r={};for(var p=0;p<s.length;p++)r["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=r.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&l&&(n[s].defaultSelected=!0)}else{for(s=""+$n(s),r=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,l&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function Yo(n,r,s){if(r!=null&&(r=""+$n(r),r!==n.value&&(n.value=r),s==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=s!=null?""+$n(s):""}function ri(n,r,s,l){if(r==null){if(l!=null){if(s!=null)throw Error(a(92));if(me(l)){if(1<l.length)throw Error(a(93));l=l[0]}s=l}s==null&&(s=""),r=s}s=$n(r),n.defaultValue=s,l=n.textContent,l===s&&l!==""&&l!==null&&(n.value=l),Ra(n)}function jr(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var ns=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 vc(n,r,s){var l=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":l?n.setProperty(r,s):typeof s!="number"||s===0||ns.has(r)?r==="float"?n.cssFloat=s:n[r]=(""+s).trim():n[r]=s+"px"}function ii(n,r,s){if(r!=null&&typeof r!="object")throw Error(a(62));if(n=n.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="",gt=!0);for(var p in r)l=r[p],r.hasOwnProperty(p)&&s[p]!==l&&(vc(n,p,l),gt=!0)}else for(var m in r)r.hasOwnProperty(m)&&vc(n,m,r[m])}function Qs(n){if(n.indexOf("-")===-1)return!1;switch(n){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 bc=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"],["maskType","mask-type"],["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"]]),xc=/^[\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 pr(n){return xc.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ir(){}var Xs=null;function Zs(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var nn=null,ar=null;function bi(n){var r=hr(n);if(r&&(n=r.stateNode)){var s=n[kn]||null;e:switch(n=r.stateNode,r.type){case"input":if(Cr(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Dn(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var l=s[r];if(l!==n&&l.form===n.form){var p=l[kn]||null;if(!p)throw Error(a(90));Cr(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<s.length;r++)l=s[r],l.form===n.form&&Ko(l)}break e;case"textarea":Yo(n,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&Vr(n,!!s.multiple,r,!1)}}}var ai=!1;function Ws(n,r,s){if(ai)return n(r,s);ai=!0;try{var l=n(r);return l}finally{if(ai=!1,(nn!==null||ar!==null)&&(Ef(),nn&&(r=nn,n=ar,ar=nn=null,bi(r),n)))for(r=0;r<n.length;r++)bi(n[r])}}function Ca(n,r){var s=n.stateNode;if(s===null)return null;var l=s[kn]||null;if(l===null)return null;s=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,r,typeof s));return s}var gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Js=!1;if(gr)try{var Sc={};Object.defineProperty(Sc,"passive",{get:function(){Js=!0}}),window.addEventListener("test",Sc,Sc),window.removeEventListener("test",Sc,Sc)}catch{Js=!1}var rs=null,vg=null,Ed=null;function Jb(){if(Ed)return Ed;var n,r=vg,s=r.length,l,p="value"in rs?rs.value:rs.textContent,m=p.length;for(n=0;n<s&&r[n]===p[n];n++);var T=s-n;for(l=1;l<=T&&r[s-l]===p[m-l];l++);return Ed=p.slice(n,1<l?1-l:void 0)}function wd(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Rd(){return!0}function ex(){return!1}function Pr(n){function r(s,l,p,m,T){this._reactName=s,this._targetInst=p,this.type=l,this.nativeEvent=m,this.target=T,this.currentTarget=null;for(var P in n)n.hasOwnProperty(P)&&(s=n[P],this[P]=s?s(m):m[P]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Rd:ex,this.isPropagationStopped=ex,this}return D(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Rd)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Rd)},persist:function(){},isPersistent:Rd}),r}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cd=Pr(is),Ec=D({},is,{view:0,detail:0}),EM=Pr(Ec),bg,xg,wc,Td=D({},Ec,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eg,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==wc&&(wc&&n.type==="mousemove"?(bg=n.screenX-wc.screenX,xg=n.screenY-wc.screenY):xg=bg=0,wc=n),bg)},movementY:function(n){return"movementY"in n?n.movementY:xg}}),tx=Pr(Td),wM=D({},Td,{dataTransfer:0}),RM=Pr(wM),CM=D({},Ec,{relatedTarget:0}),Sg=Pr(CM),TM=D({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),OM=Pr(TM),AM=D({},is,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),kM=Pr(AM),MM=D({},is,{data:0}),nx=Pr(MM),NM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DM={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"},jM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IM(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=jM[n])?!!r[n]:!1}function Eg(){return IM}var PM=D({},Ec,{key:function(n){if(n.key){var r=NM[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=wd(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?DM[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eg,charCode:function(n){return n.type==="keypress"?wd(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?wd(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),LM=Pr(PM),zM=D({},Td,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rx=Pr(zM),_M=D({},is,{submitter:0}),UM=Pr(_M),HM=D({},Ec,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eg}),FM=Pr(HM),BM=D({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),VM=Pr(BM),KM=D({},Td,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),qM=Pr(KM),YM=D({},is,{newState:0,oldState:0,source:0}),GM=Pr(YM),$M=[9,13,27,32],wg=gr&&"CompositionEvent"in window,Rc=null;gr&&"documentMode"in document&&(Rc=document.documentMode);var QM=gr&&"TextEvent"in window&&!Rc,ix=gr&&(!wg||Rc&&8<Rc&&11>=Rc),ax=" ",sx=!1;function ox(n,r){switch(n){case"keyup":return $M.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lx(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Go=!1;function XM(n,r){switch(n){case"compositionend":return lx(r);case"keypress":return r.which!==32?null:(sx=!0,ax);case"textInput":return n=r.data,n===ax&&sx?null:n;default:return null}}function ZM(n,r){if(Go)return n==="compositionend"||!wg&&ox(n,r)?(n=Jb(),Ed=vg=rs=null,Go=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return ix&&r.locale!=="ko"?null:r.data;default:return null}}var WM={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 cx(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!WM[n.type]:r==="textarea"}function ux(n,r,s,l){nn?ar?ar.push(l):ar=[l]:nn=l,r=Af(r,"onChange"),0<r.length&&(s=new Cd("onChange","change",null,s,l),n.push({event:s,listeners:r}))}var Cc=null,Tc=null;function JM(n){Z1(n,0)}function Od(n){var r=he(n);if(Ko(r))return n}function dx(n,r){if(n==="change")return r}var fx=!1;if(gr){var Rg;if(gr){var Cg="oninput"in document;if(!Cg){var hx=document.createElement("div");hx.setAttribute("oninput","return;"),Cg=typeof hx.oninput=="function"}Rg=Cg}else Rg=!1;fx=Rg&&(!document.documentMode||9<document.documentMode)}function px(){Cc&&(Cc.detachEvent("onpropertychange",gx),Tc=Cc=null)}function gx(n){if(n.propertyName==="value"&&Od(Tc)){var r=[];ux(r,Tc,n,Zs(n)),Ws(JM,r)}}function eN(n,r,s){n==="focusin"?(px(),Cc=r,Tc=s,Cc.attachEvent("onpropertychange",gx)):n==="focusout"&&px()}function tN(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Od(Tc)}function nN(n,r){if(n==="click")return Od(r)}function rN(n,r){if(n==="input"||n==="change")return Od(r)}function iN(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var si=typeof Object.is=="function"?Object.is:iN;function Oc(n,r){if(si(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),l=Object.keys(r);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var p=s[l];if(!jt.call(r,p)||!si(n[p],r[p]))return!1}return!0}function Tg(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function mx(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function yx(n,r){var s=mx(n);n=0;for(var l;s;){if(s.nodeType===3){if(l=n+s.textContent.length,n<=r&&l>=r)return{node:s,offset:r-n};n=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=mx(s)}}function vx(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?vx(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function bx(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Tg(n.document);r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=Tg(n.document)}return r}function Og(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var aN=gr&&"documentMode"in document&&11>=document.documentMode,$o=null,Ag=null,Ac=null,kg=!1;function xx(n,r,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;kg||$o==null||$o!==Tg(l)||(l=$o,"selectionStart"in l&&Og(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ac&&Oc(Ac,l)||(Ac=l,l=Af(Ag,"onSelect"),0<l.length&&(r=new Cd("onSelect","select",null,r,s),n.push({event:r,listeners:l}),r.target=$o)))}function eo(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var Qo={animationend:eo("Animation","AnimationEnd"),animationiteration:eo("Animation","AnimationIteration"),animationstart:eo("Animation","AnimationStart"),transitionrun:eo("Transition","TransitionRun"),transitionstart:eo("Transition","TransitionStart"),transitioncancel:eo("Transition","TransitionCancel"),transitionend:eo("Transition","TransitionEnd")},Mg={},Sx={};gr&&(Sx=document.createElement("div").style,"AnimationEvent"in window||(delete Qo.animationend.animation,delete Qo.animationiteration.animation,delete Qo.animationstart.animation),"TransitionEvent"in window||delete Qo.transitionend.transition);function to(n){if(Mg[n])return Mg[n];if(!Qo[n])return n;var r=Qo[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in Sx)return Mg[n]=r[s];return n}var Ex=to("animationend"),wx=to("animationiteration"),Rx=to("animationstart"),sN=to("transitionrun"),oN=to("transitionstart"),lN=to("transitioncancel"),Cx=to("transitionend"),Tx=new Map,Ng="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ng.push("scrollEnd");function _i(n,r){Tx.set(n,r),Ht(r,[n])}var cN=0;function Ta(n,r){if(n.name!=null&&n.name!=="auto")return n.name;if(r.autoName!==null)return r.autoName;n=Bi.identifierPrefix;var s=cN++;return n="_"+n+"t_"+s.toString(32)+"_",r.autoName=n}function Ox(n){if(n==null||typeof n=="string")return n;var r=null,s=gl;if(s!==null)for(var l=0;l<s.length;l++){var p=n[s[l]];if(p!=null){if(p==="none")return"none";r=r==null?p:r+(" "+p)}}return r??n.default}function Oa(n,r){return n=Ox(n),r=Ox(r),r==null?n==="auto"?null:n:r==="auto"?null:r}var Ad=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},xi=[],Xo=0,Dg=0;function kd(){for(var n=Xo,r=Dg=Xo=0;r<n;){var s=xi[r];xi[r++]=null;var l=xi[r];xi[r++]=null;var p=xi[r];xi[r++]=null;var m=xi[r];if(xi[r++]=null,l!==null&&p!==null){var T=l.pending;T===null?p.next=p:(p.next=T.next,T.next=p),l.pending=p}m!==0&&Ax(s,p,m)}}function Md(n,r,s,l){xi[Xo++]=n,xi[Xo++]=r,xi[Xo++]=s,xi[Xo++]=l,Dg|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function jg(n,r,s,l){return Md(n,r,s,l),Nd(n)}function no(n,r){return Md(n,null,null,r),Nd(n)}function Ax(n,r,s){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s);for(var p=!1,m=n.return;m!==null;)m.childLanes|=s,l=m.alternate,l!==null&&(l.childLanes|=s),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(p=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,p&&r!==null&&(p=31-et(s),n=m.hiddenUpdates,l=n[p],l===null?n[p]=[r]:l.push(r),r.lane=s|536870912),m):null}function Nd(n){if(50<Xc)throw Xc=0,Sf=null,Error(a(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Zo={};function uN(n,r,s,l){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(n,r,s,l){return new uN(n,r,s,l)}function Ig(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Aa(n,r){var s=n.alternate;return s===null?(s=Kr(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&1206910976,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function kx(n,r){n.flags&=1206910978;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,r=s.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Dd(n,r,s,l,p,m){var T=0;if(l=n,typeof l=="function")Ig(l)&&(T=1);else if(typeof l=="string")T=_D(n,s,Oe.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(l){case ee:return n=Kr(31,s,r,p),n.elementType=ee,n.lanes=m,n;case q:return ro(s.children,p,m,r);case X:T=8,p|=24;break;case B:return n=Kr(12,s,r,p|2),n.elementType=B,n.lanes=m,n;case Q:return n=Kr(13,s,r,p),n.elementType=Q,n.lanes=m,n;case $:return n=Kr(19,s,r,p),n.elementType=$,n.lanes=m,n;case G:case I:return n=p|32,n=Kr(30,s,r,n),n.elementType=I,n.lanes=m,n.stateNode={autoName:null,paired:null,clones:null,ref:null},n;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case U:T=10;break e;case H:T=9;break e;case z:T=11;break e;case K:T=14;break e;case Y:T=16,l=null;break e}T=29,s=Error(a(130,n===null?"null":typeof n,"")),l=null}return r=Kr(T,s,r,p),r.elementType=n,r.type=l,r.lanes=m,r}function ro(n,r,s,l){return n=Kr(7,n,l,r),n.lanes=s,n}function Pg(n,r,s){return n=Kr(6,n,null,r),n.lanes=s,n}function Mx(n){var r=Kr(18,null,null,0);return r.stateNode=n,r}function Lg(n,r,s){return r=Kr(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Nx=new WeakMap;function Si(n,r){if(typeof n=="object"&&n!==null){var s=Nx.get(n);return s!==void 0?s:(r={value:n,source:r,stack:Mt(r)},Nx.set(n,r),r)}return{value:n,source:r,stack:Mt(r)}}var Wo=[],Jo=0,jd=null,kc=0,Ei=[],wi=0,as=null,Ji=1,ea="";function ka(n,r){Wo[Jo++]=kc,Wo[Jo++]=jd,jd=n,kc=r}function Dx(n,r,s){Ei[wi++]=Ji,Ei[wi++]=ea,Ei[wi++]=as,as=n;var l=Ji;n=ea;var p=32-et(l)-1;l&=~(1<<p),s+=1;var m=32-et(r)+p;if(30<m){var T=p-p%5;m=(l&(1<<T)-1).toString(32),l>>=T,p-=T,Ji=1<<32-et(r)+p|s<<p|l,ea=m+n}else Ji=1<<m|s<<p|l,ea=n}function Id(n){n.return!==null&&(ka(n,1),Dx(n,1,0))}function zg(n){for(;n===jd;)jd=Wo[--Jo],Wo[Jo]=null,kc=Wo[--Jo],Wo[Jo]=null;for(;n===as;)as=Ei[--wi],Ei[wi]=null,ea=Ei[--wi],Ei[wi]=null,Ji=Ei[--wi],Ei[wi]=null}function jx(n,r){Ei[wi++]=Ji,Ei[wi++]=ea,Ei[wi++]=as,Ji=r.id,ea=r.overflow,as=n}var sr=null,Mn=null,Vt=!1,ss=null,Ri=!1,_g=Error(a(519));function os(n){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mc(Si(r,n)),_g}function Ix(n){var r=n.stateNode,s=n.type,l=n.memoizedProps;switch(r[fn]=n,r[kn]=l,s){case"dialog":Gt("cancel",r),Gt("close",r);break;case"iframe":case"object":case"embed":Gt("load",r);break;case"video":case"audio":for(s=0;s<Wc.length;s++)Gt(Wc[s],r);break;case"source":Gt("error",r);break;case"img":case"image":case"link":Gt("error",r),Gt("load",r);break;case"details":Gt("toggle",r);break;case"input":Gt("invalid",r),ts(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Gt("invalid",r);break;case"textarea":Gt("invalid",r),ri(r,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||l.suppressHydrationWarning===!0||tS(r.textContent,s)?(l.popover!=null&&(Gt("beforetoggle",r),Gt("toggle",r)),l.onScroll!=null&&Gt("scroll",r),l.onScrollEnd!=null&&Gt("scrollend",r),l.onClick!=null&&(r.onclick=Ir),r=!0):r=!1,r||os(n,!0)}function Pd(n){for(sr=n.return;sr;)switch(sr.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:sr=sr.return}}function el(n){if(n!==sr)return!1;if(!Vt)return Pd(n),Vt=!0,!1;var r=n.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||p0(n.type,n.memoizedProps)),s=!s),s&&Mn&&os(n),Pd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Mn=xS(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));Mn=xS(n)}else r===27?(r=Mn,ws(n.type)?(n=w0,w0=null,Mn=n):Mn=r):Mn=sr?Ti(n.stateNode.nextSibling):null;return!0}function io(){Mn=sr=null,Vt=!1}function Ug(){var n=ss;return n!==null&&(Gr===null?Gr=n:Gr.push.apply(Gr,n),ss=null),n}function Mc(n){ss===null?ss=[n]:ss.push(n)}var Hg=Ae(null),ao=null,Ma=null;function ls(n,r,s){Be(Hg,r._currentValue),r._currentValue=s}function Na(n){n._currentValue=Hg.current,Le(Hg)}function Ld(n,r,s){for(;n!==null;){var l=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),n===s)break;n=n.return}}function Fg(n,r,s,l){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var m=p.dependencies;if(m!==null){var T=p.child;m=m.firstContext;e:for(;m!==null;){var P=m;m=p;for(var Z=0;Z<r.length;Z++)if(P.context===r[Z]){m.lanes|=s,P=m.alternate,P!==null&&(P.lanes|=s),Ld(m.return,s,n),l||(T=null);break e}m=P.next}}else if(p.tag===18){if(T=p.return,T===null)throw Error(a(341));T.lanes|=s,m=T.alternate,m!==null&&(m.lanes|=s),Ld(T,s,n),T=null}else p.tag===13&&p.memoizedState!==null&&p.memoizedState.dehydrated===null?(p.lanes|=s,T=p.alternate,T!==null&&(T.lanes|=s),Ld(p.return,s,n),T=p.child,T=T!==null?T.sibling:null):T=p.child;if(T!==null)T.return=p;else for(T=p;T!==null;){if(T===n){T=null;break}if(p=T.sibling,p!==null){p.return=T.return,T=p;break}T=T.return}p=T}}function so(n,r,s,l){n=null;for(var p=r,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var T=p.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var P=p.type;si(p.pendingProps.value,T.value)||(n!==null?n.push(P):n=[P])}}else if(p===He.current){if(T=p.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Cl):n=[Cl])}p=p.return}return n!==null&&Fg(r,n,s,l),r.flags|=262144,n!==null}function zd(n){for(n=n.firstContext;n!==null;){if(!si(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function oo(n){ao=n,Ma=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function mr(n){return Px(ao,n)}function _d(n,r){return ao===null&&oo(n),Px(n,r)}function Px(n,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},Ma===null){if(n===null)throw Error(a(308));Ma=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Ma=Ma.next=r;return s}var dN=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(s,l){n.push(l)}};this.abort=function(){r.aborted=!0,n.forEach(function(s){return s()})}},fN=e.unstable_scheduleCallback,hN=e.unstable_NormalPriority,Qn={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bg(){return{controller:new dN,data:new Map,refCount:0}}function Nc(n){n.refCount--,n.refCount===0&&fN(hN,function(){n.controller.abort()})}function Lx(n,r){if((n.pendingLanes&4194048)!==0){var s=n.transitionTypes;for(s===null&&(s=n.transitionTypes=[]),n=0;n<r.length;n++){var l=r[n];s.indexOf(l)===-1&&s.push(l)}}}var Dc=null;function pN(n){var r=n.transitionTypes;return n.transitionTypes=null,r}var jc=null,Vg=0,lo=0,tl=null;function gN(n,r){if(jc===null){var s=jc=[];Vg=0,lo=a0(),tl={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Vg++,r.then(zx,zx),r}function zx(){if(--Vg===0&&(Dc=null,jc!==null)){tl!==null&&(tl.status="fulfilled");var n=jc;jc=null,lo=0,tl=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function mN(n,r){var s=[],l={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){l.status="fulfilled",l.value=r;for(var p=0;p<s.length;p++)(0,s[p])(r)},function(p){for(l.status="rejected",l.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),l}var _x=ge.S;ge.S=function(n,r){if(M1=St(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&gN(n,r),Dc!==null)for(var s=bl;s!==null;)Lx(s,Dc),s=s.next;if(s=n.types,s!==null){for(var l=bl;l!==null;)Lx(l,s),l=l.next;if(lo!==0){l=Dc,l===null&&(l=Dc=[]);for(var p=0;p<s.length;p++){var m=s[p];l.indexOf(m)===-1&&l.push(m)}}}_x!==null&&_x(n,r)};var co=Ae(null);function Kg(){var n=co.current;return n!==null?n:On.pooledCache}function Ud(n,r){r===null?Be(co,co.current):Be(co,r.pool)}function Ux(){var n=Kg();return n===null?null:{parent:Qn._currentValue,pool:n}}var nl=Error(a(460)),qg=Error(a(474)),Hd=Error(a(542)),Fd={then:function(){}};function Hx(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Fx(n,r,s){switch(s=n[s],s===void 0?n.push(r):s!==r&&(r.then(Ir,Ir),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Vx(n),n===void 0&&!("reason"in r)?Error(a(600)):n;default:if(typeof r.status=="string")r.then(Ir,Ir);else{if(n=On,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=r,n.status="pending",n.then(function(l){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=l}},function(l){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Vx(n),n}throw fo=r,nl}}function uo(n){try{var r=n._init;return r(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(fo=s,nl):s}}var fo=null;function Bx(){if(fo===null)throw Error(a(459));var n=fo;return fo=null,n}function Vx(n){if(n===nl||n===Hd)throw Error(a(483))}var rl=null,Ic=0;function Bd(n){var r=Ic;return Ic+=1,rl===null&&(rl=[]),Fx(rl,n,r)}function cs(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Vd(n,r){throw r.$$typeof===M?Error(a(525)):(n=Object.prototype.toString.call(r),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Kx(n){function r(ae,te){if(n){var ce=ae.deletions;ce===null?(ae.deletions=[te],ae.flags|=16):ce.push(te)}}function s(ae,te){if(!n)return null;for(;te!==null;)r(ae,te),te=te.sibling;return null}function l(ae){for(var te=new Map;ae!==null;)ae.key===null?te.set(ae.index,ae):te.set(ae.key,ae),ae=ae.sibling;return te}function p(ae,te){return ae=Aa(ae,te),ae.index=0,ae.sibling=null,ae}function m(ae,te,ce){return ae.index=ce,n?(ce=ae.alternate,ce!==null?(ce=ce.index,ce<te?(ae.flags|=2,te):ce):(ae.flags|=134217730,te)):(ae.flags|=1048576,te)}function T(ae){return n&&ae.alternate===null&&(ae.flags|=134217730),ae}function P(ae,te,ce,Re){return te===null||te.tag!==6?(te=Pg(ce,ae.mode,Re),te.return=ae,te):(te=p(te,ce),te.return=ae,te)}function Z(ae,te,ce,Re){var We=ce.type;return We===q?(ae=pe(ae,te,ce.props.children,Re,ce.key),cs(ae,ce),ae):te!==null&&(te.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Y&&uo(We)===te.type)?(te=p(te,ce.props),cs(te,ce),te.return=ae,te):(te=Dd(ce.type,ce.key,ce.props,null,ae.mode,Re),cs(te,ce),te.return=ae,te)}function se(ae,te,ce,Re){return te===null||te.tag!==4||te.stateNode.containerInfo!==ce.containerInfo||te.stateNode.implementation!==ce.implementation?(te=Lg(ce,ae.mode,Re),te.return=ae,te):(te=p(te,ce.children||[]),te.return=ae,te)}function pe(ae,te,ce,Re,We){return te===null||te.tag!==7?(te=ro(ce,ae.mode,Re,We),te.return=ae,te):(te=p(te,ce),te.return=ae,te)}function Ce(ae,te,ce){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Pg(""+te,ae.mode,ce),te.return=ae,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case _:return ce=Dd(te.type,te.key,te.props,null,ae.mode,ce),cs(ce,te),ce.return=ae,ce;case L:return te=Lg(te,ae.mode,ce),te.return=ae,te;case Y:return te=uo(te),Ce(ae,te,ce)}if(me(te)||re(te))return te=ro(te,ae.mode,ce,null),te.return=ae,te;if(typeof te.then=="function")return Ce(ae,Bd(te),ce);if(te.$$typeof===U)return Ce(ae,_d(ae,te),ce);Vd(ae,te)}return null}function ie(ae,te,ce,Re){var We=te!==null?te.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return We!==null?null:P(ae,te,""+ce,Re);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return ce.key===We?Z(ae,te,ce,Re):null;case L:return ce.key===We?se(ae,te,ce,Re):null;case Y:return ce=uo(ce),ie(ae,te,ce,Re)}if(me(ce)||re(ce))return We!==null?null:pe(ae,te,ce,Re,null);if(typeof ce.then=="function")return ie(ae,te,Bd(ce),Re);if(ce.$$typeof===U)return ie(ae,te,_d(ae,ce),Re);Vd(ae,ce)}return null}function fe(ae,te,ce,Re,We){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return ae=ae.get(ce)||null,P(te,ae,""+Re,We);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case _:return ae=ae.get(Re.key===null?ce:Re.key)||null,Z(te,ae,Re,We);case L:return ae=ae.get(Re.key===null?ce:Re.key)||null,se(te,ae,Re,We);case Y:return Re=uo(Re),fe(ae,te,ce,Re,We)}if(me(Re)||re(Re))return ae=ae.get(ce)||null,pe(te,ae,Re,We,null);if(typeof Re.then=="function")return fe(ae,te,ce,Bd(Re),We);if(Re.$$typeof===U)return fe(ae,te,ce,_d(te,Re),We);Vd(te,Re)}return null}function qe(ae,te,ce,Re){for(var We=null,Wt=null,lt=te,xt=te=0,Wn=null;lt!==null&&xt<ce.length;xt++){lt.index>xt?(Wn=lt,lt=null):Wn=lt.sibling;var rn=ie(ae,lt,ce[xt],Re);if(rn===null){lt===null&&(lt=Wn);break}n&&lt&&rn.alternate===null&&r(ae,lt),te=m(rn,te,xt),Wt===null?We=rn:Wt.sibling=rn,Wt=rn,lt=Wn}if(xt===ce.length)return s(ae,lt),Vt&&ka(ae,xt),We;if(lt===null){for(;xt<ce.length;xt++)lt=Ce(ae,ce[xt],Re),lt!==null&&(te=m(lt,te,xt),Wt===null?We=lt:Wt.sibling=lt,Wt=lt);return Vt&&ka(ae,xt),We}for(lt=l(lt);xt<ce.length;xt++)Wn=fe(lt,ae,xt,ce[xt],Re),Wn!==null&&(n&&(rn=Wn.alternate,rn!==null&&lt.delete(rn.key===null?xt:rn.key)),te=m(Wn,te,xt),Wt===null?We=Wn:Wt.sibling=Wn,Wt=Wn);return n&&lt.forEach(function(As){return r(ae,As)}),Vt&&ka(ae,xt),We}function rt(ae,te,ce,Re){if(ce==null)throw Error(a(151));for(var We=null,Wt=null,lt=te,xt=te=0,Wn=null,rn=ce.next();lt!==null&&!rn.done;xt++,rn=ce.next()){lt.index>xt?(Wn=lt,lt=null):Wn=lt.sibling;var As=ie(ae,lt,rn.value,Re);if(As===null){lt===null&&(lt=Wn);break}n&&lt&&As.alternate===null&&r(ae,lt),te=m(As,te,xt),Wt===null?We=As:Wt.sibling=As,Wt=As,lt=Wn}if(rn.done)return s(ae,lt),Vt&&ka(ae,xt),We;if(lt===null){for(;!rn.done;xt++,rn=ce.next())rn=Ce(ae,rn.value,Re),rn!==null&&(te=m(rn,te,xt),Wt===null?We=rn:Wt.sibling=rn,Wt=rn);return Vt&&ka(ae,xt),We}for(lt=l(lt);!rn.done;xt++,rn=ce.next())rn=fe(lt,ae,xt,rn.value,Re),rn!==null&&(n&&(Wn=rn.alternate,Wn!==null&&lt.delete(Wn.key===null?xt:Wn.key)),te=m(rn,te,xt),Wt===null?We=rn:Wt.sibling=rn,Wt=rn);return n&&lt.forEach(function(XD){return r(ae,XD)}),Vt&&ka(ae,xt),We}function Pt(ae,te,ce,Re){if(typeof ce=="object"&&ce!==null&&ce.type===q&&ce.key===null&&ce.props.ref===void 0&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:e:{for(var We=ce.key;te!==null;){if(te.key===We){if(We=ce.type,We===q){if(te.tag===7){s(ae,te.sibling),Re=p(te,ce.props.children),cs(Re,ce),Re.return=ae,ae=Re;break e}}else if(te.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Y&&uo(We)===te.type){s(ae,te.sibling),Re=p(te,ce.props),cs(Re,ce),Re.return=ae,ae=Re;break e}s(ae,te);break}else r(ae,te);te=te.sibling}ce.type===q?(Re=ro(ce.props.children,ae.mode,Re,ce.key),cs(Re,ce),Re.return=ae,ae=Re):(Re=Dd(ce.type,ce.key,ce.props,null,ae.mode,Re),cs(Re,ce),Re.return=ae,ae=Re)}return T(ae);case L:e:{for(We=ce.key;te!==null;){if(te.key===We)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){s(ae,te.sibling),Re=p(te,ce.children||[]),Re.return=ae,ae=Re;break e}else{s(ae,te);break}else r(ae,te);te=te.sibling}Re=Lg(ce,ae.mode,Re),Re.return=ae,ae=Re}return T(ae);case Y:return ce=uo(ce),Pt(ae,te,ce,Re)}if(me(ce))return qe(ae,te,ce,Re);if(re(ce)){if(We=re(ce),typeof We!="function")throw Error(a(150));return ce=We.call(ce),rt(ae,te,ce,Re)}if(typeof ce.then=="function")return Pt(ae,te,Bd(ce),Re);if(ce.$$typeof===U)return Pt(ae,te,_d(ae,ce),Re);Vd(ae,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(s(ae,te.sibling),Re=p(te,ce),Re.return=ae,ae=Re):(s(ae,te),Re=Pg(ce,ae.mode,Re),Re.return=ae,ae=Re),T(ae)):s(ae,te)}return function(ae,te,ce,Re){try{Ic=0;var We=Pt(ae,te,ce,Re);return rl=null,We}catch(lt){if(lt===nl||lt===Hd)throw lt;var Wt=Kr(29,lt,null,ae.mode);return Wt.lanes=Re,Wt.return=ae,Wt}}}var ho=Kx(!0),qx=Kx(!1),us=!1;function Yg(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gg(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ds(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function fs(n,r,s){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(cn&2)!==0){var p=l.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),l.pending=r,r=Nd(n),Ax(n,null,s),r}return Md(n,l,r,s),Nd(n)}function Pc(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,An(n,s)}}function $g(n,r){var s=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var p=null,m=null;if(s=s.firstBaseUpdate,s!==null){do{var T={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};m===null?p=m=T:m=m.next=T,s=s.next}while(s!==null);m===null?p=m=r:m=m.next=r}else p=m=r;s={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}var Qg=!1;function Lc(){if(Qg){var n=tl;if(n!==null)throw n}}function zc(n,r,s,l){Qg=!1;var p=n.updateQueue;us=!1;var m=p.firstBaseUpdate,T=p.lastBaseUpdate,P=p.shared.pending;if(P!==null){p.shared.pending=null;var Z=P,se=Z.next;Z.next=null,T===null?m=se:T.next=se,T=Z;var pe=n.alternate;pe!==null&&(pe=pe.updateQueue,P=pe.lastBaseUpdate,P!==T&&(P===null?pe.firstBaseUpdate=se:P.next=se,pe.lastBaseUpdate=Z))}if(m!==null){var Ce=p.baseState;T=0,pe=se=Z=null,P=m;do{var ie=P.lane&-536870913,fe=ie!==P.lane;if(fe?(Zt&ie)===ie:(l&ie)===ie){ie!==0&&ie===lo&&(Qg=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var qe=n,rt=P;ie=r;var Pt=s;switch(rt.tag){case 1:if(qe=rt.payload,typeof qe=="function"){Ce=qe.call(Pt,Ce,ie);break e}Ce=qe;break e;case 3:qe.flags=qe.flags&-65537|128;case 0:if(qe=rt.payload,ie=typeof qe=="function"?qe.call(Pt,Ce,ie):qe,ie==null)break e;Ce=D({},Ce,ie);break e;case 2:us=!0}}ie=P.callback,ie!==null&&(n.flags|=64,fe&&(n.flags|=8192),fe=p.callbacks,fe===null?p.callbacks=[ie]:fe.push(ie))}else fe={lane:ie,tag:P.tag,payload:P.payload,callback:P.callback,next:null},pe===null?(se=pe=fe,Z=Ce):pe=pe.next=fe,T|=ie;if(P=P.next,P===null){if(P=p.shared.pending,P===null)break;fe=P,P=fe.next,fe.next=null,p.lastBaseUpdate=fe,p.shared.pending=null}}while(!0);pe===null&&(Z=Ce),p.baseState=Z,p.firstBaseUpdate=se,p.lastBaseUpdate=pe,m===null&&(p.shared.lanes=0),bs|=T,n.lanes=T,n.memoizedState=Ce}}function Yx(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function Gx(n,r){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Yx(s[n],r)}var hs=Ae(null),Kd=Ae(0);function $x(n,r){n=La,Be(Kd,n),Be(hs,r),La=n|r.baseLanes}function Xg(){Be(Kd,La),Be(hs,hs.current)}function Zg(){La=Kd.current,Le(hs),Le(Kd)}var yr=Ae(null),Tr=null;function ps(n){var r=n.alternate;Be(vr,vr.current&1),Be(yr,n),Tr===null&&(r===null||hs.current!==null||r.memoizedState!==null)&&(Tr=n)}function Wg(n){Be(vr,vr.current),Be(yr,n),Tr===null&&(Tr=n)}function Qx(n){n.tag===22?(Be(vr,vr.current),Be(yr,n),Tr===null&&(Tr=n)):gs()}function gs(){Be(vr,vr.current),Be(yr,yr.current)}function oi(n){Le(yr),Tr===n&&(Tr=null),Le(vr)}var vr=Ae(0);function _c(n,r){Be(yr,yr.current),Be(vr,r)}function Jg(n){Le(vr),Le(yr),Tr===n&&(Tr=null)}function qd(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||S0(s)||E0(s)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!=="independent"){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Da=0,It=null,Sn=null,Xn=null,Yd=!1,il=!1,po=!1,Gd=0,Uc=0,al=null,yN=0;function Bn(){throw Error(a(321))}function em(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!si(n[s],r[s]))return!1;return!0}function tm(n,r,s,l,p,m){return Da=m,It=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=n===null||n.memoizedState===null?D2:j2,po=!1,m=s(l,p),po=!1,il&&(m=Zx(r,s,l,p)),Xx(n),m}function Xx(n){ge.H=ef;var r=Sn!==null&&Sn.next!==null;if(Da=0,Xn=Sn=It=null,Yd=!1,Uc=0,al=null,r)throw Error(a(300));n===null||Zn||(n=n.dependencies,n!==null&&zd(n)&&(Zn=!0))}function Zx(n,r,s,l){It=n;var p=0;do{if(il&&(al=null),Uc=0,il=!1,25<=p)throw Error(a(301));if(p+=1,Xn=Sn=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ge.H=CN,m=r(s,l)}while(il);return m}function vN(){var n=ge.H,r=n.useState()[0];return r=typeof r.then=="function"?Hc(r):r,n=n.useState()[0],(Sn!==null?Sn.memoizedState:null)!==n&&(It.flags|=1024),r}function nm(){var n=Gd!==0;return Gd=0,n}function rm(n,r,s){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~s}function im(n){if(Yd){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Yd=!1}Da=0,Xn=Sn=It=null,il=!1,Uc=Gd=0,al=null}function Lr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xn===null?It.memoizedState=Xn=n:Xn=Xn.next=n,Xn}function Yn(){if(Sn===null){var n=It.alternate;n=n!==null?n.memoizedState:null}else n=Sn.next;var r=Xn===null?It.memoizedState:Xn.next;if(r!==null)Xn=r,Sn=n;else{if(n===null)throw It.alternate===null?Error(a(467)):Error(a(310));Sn=n,n={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},Xn===null?It.memoizedState=Xn=n:Xn=Xn.next=n}return Xn}function $d(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hc(n){var r=Uc;return Uc+=1,al===null&&(al=[]),n=Fx(al,n,r),r=It,(Xn===null?r.memoizedState:Xn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?D2:j2),n}function Qd(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Hc(n);if(n.$$typeof===V)return;if(n.$$typeof===U)return mr(n)}throw Error(a(438,String(n)))}function am(n){var r=null,s=It.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var l=It.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),s===null&&(s=$d(),It.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(n),l=0;l<n;l++)s[l]=oe;return r.index++,s}function ja(n,r){return typeof r=="function"?r(n):r}function Xd(n){var r=Yn();return sm(r,Sn,n)}function sm(n,r,s){var l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=s;var p=n.baseQueue,m=l.pending;if(m!==null){if(p!==null){var T=p.next;p.next=m.next,m.next=T}r.baseQueue=p=m,l.pending=null}if(m=n.baseState,p===null)n.memoizedState=m;else{r=p.next;var P=T=null,Z=null,se=r,pe=!1;do{var Ce=se.lane&-536870913;if(Ce!==se.lane?(Zt&Ce)===Ce:(Da&Ce)===Ce){var ie=se.revertLane;if(ie===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),Ce===lo&&(pe=!0);else if((Da&ie)===ie){se=se.next,ie===lo&&(pe=!0);continue}else Ce={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},Z===null?(P=Z=Ce,T=m):Z=Z.next=Ce,It.lanes|=ie,bs|=ie;Ce=se.action,po&&s(m,Ce),m=se.hasEagerState?se.eagerState:s(m,Ce)}else ie={lane:Ce,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},Z===null?(P=Z=ie,T=m):Z=Z.next=ie,It.lanes|=Ce,bs|=Ce;se=se.next}while(se!==null&&se!==r);if(Z===null?T=m:Z.next=P,!si(m,n.memoizedState)&&(Zn=!0,pe&&(s=tl,s!==null)))throw s;n.memoizedState=m,n.baseState=T,n.baseQueue=Z,l.lastRenderedState=m}return p===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function om(n){var r=Yn(),s=r.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var l=s.dispatch,p=s.pending,m=r.memoizedState;if(p!==null){s.pending=null;var T=p=p.next;do m=n(m,T.action),T=T.next;while(T!==p);si(m,r.memoizedState)||(Zn=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),s.lastRenderedState=m}return[m,l]}function Wx(n,r,s){var l=It,p=Yn(),m=Vt;if(m){if(s===void 0)throw Error(a(407));s=s()}else s=r();var T=!si((Sn||p).memoizedState,s);if(T&&(p.memoizedState=s,Zn=!0),p=p.queue,um(t2.bind(null,l,p,n),[n]),n=p.getSnapshot!==r||T||Xn!==null&&(Xn.memoizedState.tag&1)!==0,sl(n?9:8,{destroy:void 0},e2.bind(null,l,p,s,r),null),n){if(l.flags|=2048,On===null)throw Error(a(349));m||(Da&127)!==0||Jx(l,r,s)}return s}function Jx(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=It.updateQueue,r===null?(r=$d(),It.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function e2(n,r,s,l){r.value=s,r.getSnapshot=l,n2(r)&&r2(n)}function t2(n,r,s){return s(function(){n2(r)&&r2(n)})}function n2(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!si(n,s)}catch{return!0}}function r2(n){var r=no(n,2);r!==null&&$r(r,n,2)}function lm(n){var r=Lr();if(typeof n=="function"){var s=n;if(n=s(),po){$e(!0);try{s()}finally{$e(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:n},r}function i2(n,r,s,l){return n.baseState=s,sm(n,Sn,typeof l=="function"?l:ja)}function bN(n,r,s,l,p){if(Jd(n))throw Error(a(485));if(n=r.action,n!==null){var m={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){m.listeners.push(T)}};ge.T!==null?s(!0):m.isTransition=!1,l(m),s=r.pending,s===null?(m.next=r.pending=m,a2(r,m)):(m.next=s.next,r.pending=s.next=m)}}function a2(n,r){var s=r.action,l=r.payload,p=n.state;if(r.isTransition){var m=ge.T,T={};T.types=m!==null?m.types:null,ge.T=T;try{var P=s(p,l),Z=ge.S;Z!==null&&Z(T,P),s2(n,r,P)}catch(se){cm(n,r,se)}finally{m!==null&&T.types!==null&&(m.types=T.types),ge.T=m}}else try{m=s(p,l),s2(n,r,m)}catch(se){cm(n,r,se)}}function s2(n,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){o2(n,r,l)},function(l){return cm(n,r,l)}):o2(n,r,s)}function o2(n,r,s){r.status="fulfilled",r.value=s,l2(r),n.state=s,r=n.pending,r!==null&&(s=r.next,s===r?n.pending=null:(s=s.next,r.next=s,a2(n,s)))}function cm(n,r,s){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=s,l2(r),r=r.next;while(r!==l)}n.action=null}function l2(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function c2(n,r){return r}function u2(n,r){if(Vt){var s=On.formState;if(s!==null){e:{var l=It;if(Vt){if(Mn){t:{for(var p=Mn,m=Ri;p.nodeType!==8;){if(!m){p=null;break t}if(p=Ti(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){Mn=Ti(p.nextSibling),l=p.data==="F!";break e}}os(l)}l=!1}l&&(r=s[0])}}return s=Lr(),s.memoizedState=s.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c2,lastRenderedState:r},s.queue=l,s=k2.bind(null,It,l),l.dispatch=s,l=lm(!1),m=gm.bind(null,It,!1,l.queue),l=Lr(),p={state:r,dispatch:null,action:n,pending:null},l.queue=p,s=bN.bind(null,It,p,m,s),p.dispatch=s,l.memoizedState=n,[r,s,!1]}function d2(n){var r=Yn();return f2(r,Sn,n)}function f2(n,r,s){if(r=sm(n,r,c2)[0],n=Xd(ja)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=Hc(r)}catch(T){throw T===nl?Hd:T}else l=r;r=Yn();var p=r.queue,m=p.dispatch;return s!==r.memoizedState&&(It.flags|=2048,sl(9,{destroy:void 0},xN.bind(null,p,s),null)),[l,m,n]}function xN(n,r){n.action=r}function h2(n){var r=Yn(),s=Sn;if(s!==null)return f2(r,s,n);Yn(),r=r.memoizedState,s=Yn();var l=s.queue.dispatch;return s.memoizedState=n,[r,l,!1]}function sl(n,r,s,l){return n={tag:n,create:s,deps:l,inst:r,next:null},r=It.updateQueue,r===null&&(r=$d(),It.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=n.next=n:(l=s.next,s.next=n,n.next=l,r.lastEffect=n),n}function p2(){return Yn().memoizedState}function Zd(n,r,s,l){var p=Lr();It.flags|=n,p.memoizedState=sl(1|r,{destroy:void 0},s,l===void 0?null:l)}function Wd(n,r,s,l){var p=Yn();l=l===void 0?null:l;var m=p.memoizedState.inst;Sn!==null&&l!==null&&em(l,Sn.memoizedState.deps)?p.memoizedState=sl(r,m,s,l):(It.flags|=n,p.memoizedState=sl(1|r,m,s,l))}function g2(n,r){Zd(8390656,8,n,r)}function um(n,r){Wd(2048,8,n,r)}function SN(n){It.flags|=4;var r=It.updateQueue;if(r===null)r=$d(),It.updateQueue=r,r.events=[n];else{var s=r.events;s===null?r.events=[n]:s.push(n)}}function m2(n){var r=Yn().memoizedState;return SN({ref:r,nextImpl:n}),function(){if((cn&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function y2(n,r){return Wd(4,2,n,r)}function v2(n,r){return Wd(4,4,n,r)}function b2(n,r){if(typeof r=="function"){n=n();var s=r(n);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function x2(n,r,s){s=s!=null?s.concat([n]):null,Wd(4,4,b2.bind(null,r,n),s)}function dm(){}function S2(n,r){var s=Yn();r=r===void 0?null:r;var l=s.memoizedState;return r!==null&&em(r,l[1])?l[0]:(s.memoizedState=[n,r],n)}function E2(n,r){var s=Yn();r=r===void 0?null:r;var l=s.memoizedState;if(r!==null&&em(r,l[1]))return l[0];if(l=n(),po){$e(!0);try{n()}finally{$e(!1)}}return s.memoizedState=[l,r],l}function fm(n,r,s){return s===void 0||(Da&1073741824)!==0&&(Zt&261930)===0?n.memoizedState=r:(n.memoizedState=s,n=D1(),It.lanes|=n,bs|=n,s)}function w2(n,r,s,l){return si(s,r)?s:hs.current!==null?(n=fm(n,s,l),si(n,r)||(Zn=!0),n):(Da&106)===0||(Da&1073741824)!==0&&(Zt&261930)===0?(Zn=!0,n.memoizedState=s):(n=D1(),It.lanes|=n,bs|=n,r)}function R2(n,r,s,l,p){var m=ue.p;ue.p=m!==0&&8>m?m:8;var T=ge.T,P={};P.types=T!==null?T.types:null,ge.T=P,gm(n,!1,r,s);try{var Z=p(),se=ge.S;if(se!==null&&se(P,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var pe=mN(Z,l);Fc(n,r,pe,di(n))}else Fc(n,r,l,di(n))}catch(Ce){Fc(n,r,{then:function(){},status:"rejected",reason:Ce},di())}finally{ue.p=m,T!==null&&P.types!==null&&(T.types=P.types),ge.T=T}}function EN(){}function hm(n,r,s,l){if(n.tag!==5)throw Error(a(476));var p=C2(n).queue;R2(n,p,r,Te,s===null?EN:function(){return T2(n),s(l)})}function C2(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:Te},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:s},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function T2(n){var r=C2(n);r.next===null&&(r=n.alternate.memoizedState),Fc(n,r.next.queue,{},di())}function pm(){return mr(Cl)}function O2(){return Yn().memoizedState}function A2(){return Yn().memoizedState}function wN(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var s=di();n=ds(s);var l=fs(r,n,s);l!==null&&($r(l,r,s),Pc(l,r,s)),r={cache:Bg()},n.payload=r;return}r=r.return}}function RN(n,r,s){var l=di();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Jd(n)?M2(r,s):(s=jg(n,r,s,l),s!==null&&($r(s,n,l),N2(s,r,l)))}function k2(n,r,s){var l=di();Fc(n,r,s,l)}function Fc(n,r,s,l){var p={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Jd(n))M2(r,p);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var T=r.lastRenderedState,P=m(T,s);if(p.hasEagerState=!0,p.eagerState=P,si(P,T))return Md(n,r,p,0),On===null&&kd(),!1}catch{}if(s=jg(n,r,p,l),s!==null)return $r(s,n,l),N2(s,r,l),!0}return!1}function gm(n,r,s,l){if(l={lane:2,revertLane:a0(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Jd(n)){if(r)throw Error(a(479))}else r=jg(n,s,l,2),r!==null&&$r(r,n,2)}function Jd(n){var r=n.alternate;return n===It||r!==null&&r===It}function M2(n,r){il=Yd=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function N2(n,r,s){if((s&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,An(n,s)}}var ef={readContext:mr,use:Qd,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useLayoutEffect:Bn,useInsertionEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useSyncExternalStore:Bn,useId:Bn,useHostTransitionStatus:Bn,useFormState:Bn,useActionState:Bn,useOptimistic:Bn,useMemoCache:Bn,useCacheRefresh:Bn,useEffectEvent:Bn},D2={readContext:mr,use:Qd,useCallback:function(n,r){return Lr().memoizedState=[n,r===void 0?null:r],n},useContext:mr,useEffect:g2,useImperativeHandle:function(n,r,s){s=s!=null?s.concat([n]):null,Zd(4194308,4,b2.bind(null,r,n),s)},useLayoutEffect:function(n,r){return Zd(4194308,4,n,r)},useInsertionEffect:function(n,r){Zd(4,2,n,r)},useMemo:function(n,r){var s=Lr();r=r===void 0?null:r;var l=n();if(po){$e(!0);try{n()}finally{$e(!1)}}return s.memoizedState=[l,r],l},useReducer:function(n,r,s){var l=Lr();if(s!==void 0){var p=s(r);if(po){$e(!0);try{s(r)}finally{$e(!1)}}}else p=r;return l.memoizedState=l.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},l.queue=n,n=n.dispatch=RN.bind(null,It,n),[l.memoizedState,n]},useRef:function(n){var r=Lr();return n={current:n},r.memoizedState=n},useState:function(n){n=lm(n);var r=n.queue,s=k2.bind(null,It,r);return r.dispatch=s,[n.memoizedState,s]},useDebugValue:dm,useDeferredValue:function(n,r){var s=Lr();return fm(s,n,r)},useTransition:function(){var n=lm(!1);return n=R2.bind(null,It,n.queue,!0,!1),Lr().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,s){var l=It,p=Lr();if(Vt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),On===null)throw Error(a(349));(Zt&127)!==0||Jx(l,r,s)}p.memoizedState=s;var m={value:s,getSnapshot:r};return p.queue=m,g2(t2.bind(null,l,m,n),[n]),l.flags|=2048,sl(9,{destroy:void 0},e2.bind(null,l,m,s,r),null),s},useId:function(){var n=Lr(),r=On.identifierPrefix;if(Vt){var s=ea,l=Ji;s=(l&~(1<<32-et(l)-1)).toString(32)+s,r="_"+r+"R_"+s,s=Gd++,0<s&&(r+="H"+s.toString(32)),r+="_"}else s=yN++,r="_"+r+"r_"+s.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:pm,useFormState:u2,useActionState:u2,useOptimistic:function(n){var r=Lr();r.memoizedState=r.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=gm.bind(null,It,!0,s),s.dispatch=r,[n,r]},useMemoCache:am,useCacheRefresh:function(){return Lr().memoizedState=wN.bind(null,It)},useEffectEvent:function(n){var r=Lr(),s={impl:n};return r.memoizedState=s,function(){if((cn&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},j2={readContext:mr,use:Qd,useCallback:S2,useContext:mr,useEffect:um,useImperativeHandle:x2,useInsertionEffect:y2,useLayoutEffect:v2,useMemo:E2,useReducer:Xd,useRef:p2,useState:function(){return Xd(ja)},useDebugValue:dm,useDeferredValue:function(n,r){var s=Yn();return w2(s,Sn.memoizedState,n,r)},useTransition:function(){var n=Xd(ja)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:Hc(n),r]},useSyncExternalStore:Wx,useId:O2,useHostTransitionStatus:pm,useFormState:d2,useActionState:d2,useOptimistic:function(n,r){var s=Yn();return i2(s,Sn,n,r)},useMemoCache:am,useCacheRefresh:A2,useEffectEvent:m2},CN={readContext:mr,use:Qd,useCallback:S2,useContext:mr,useEffect:um,useImperativeHandle:x2,useInsertionEffect:y2,useLayoutEffect:v2,useMemo:E2,useReducer:om,useRef:p2,useState:function(){return om(ja)},useDebugValue:dm,useDeferredValue:function(n,r){var s=Yn();return Sn===null?fm(s,n,r):w2(s,Sn.memoizedState,n,r)},useTransition:function(){var n=om(ja)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:Hc(n),r]},useSyncExternalStore:Wx,useId:O2,useHostTransitionStatus:pm,useFormState:h2,useActionState:h2,useOptimistic:function(n,r){var s=Yn();return Sn!==null?i2(s,Sn,n,r):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:am,useCacheRefresh:A2,useEffectEvent:m2};function mm(n,r,s,l){r=n.memoizedState,s=s(l,r),s=s==null?r:D({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var ym={enqueueSetState:function(n,r,s){n=n._reactInternals;var l=di(),p=ds(l);p.payload=r,s!=null&&(p.callback=s),r=fs(n,p,l),r!==null&&($r(r,n,l),Pc(r,n,l))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var l=di(),p=ds(l);p.tag=1,p.payload=r,s!=null&&(p.callback=s),r=fs(n,p,l),r!==null&&($r(r,n,l),Pc(r,n,l))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=di(),l=ds(s);l.tag=2,r!=null&&(l.callback=r),r=fs(n,l,s),r!==null&&($r(r,n,s),Pc(r,n,s))}};function I2(n,r,s,l,p,m,T){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,m,T):r.prototype&&r.prototype.isPureReactComponent?!Oc(s,l)||!Oc(p,m):!0}function P2(n,r,s,l){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,l),r.state!==n&&ym.enqueueReplaceState(r,r.state,null)}function go(n,r){var s=r;if("ref"in r){s={};for(var l in r)l!=="ref"&&(s[l]=r[l])}if(n=n.defaultProps){s===r&&(s=D({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function L2(n){Ad(n)}function z2(n){console.error(n)}function _2(n){Ad(n)}function tf(n,r){try{var s=n.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function U2(n,r,s){try{var l=n.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function vm(n,r,s){return s=ds(s),s.tag=3,s.payload={element:null},s.callback=function(){tf(n,r)},s}function H2(n){return n=ds(n),n.tag=3,n}function F2(n,r,s,l){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var m=l.value;n.payload=function(){return p(m)},n.callback=function(){U2(r,s,l)}}var T=s.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(n.callback=function(){U2(r,s,l),typeof p!="function"&&(xs===null?xs=new Set([this]):xs.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function TN(n,r,s,l,p){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=s.alternate,r!==null&&so(r,s,p,!0),s=yr.current,s!==null){switch(s.tag){case 31:case 13:case 19:return Tr===null?wf():s.alternate===null&&Vn===0&&(Vn=3),s.flags&=-257,s.flags|=65536,s.lanes=p,l===Fd?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([l]):r.add(l),n0(n,l,p)),!1;case 22:return s.flags|=65536,l===Fd?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([l]):s.add(l)),n0(n,l,p)),!1}throw Error(a(435,s.tag))}return n0(n,l,p),wf(),!1}if(Vt)return r=yr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,l!==_g&&(n=Error(a(422),{cause:l}),Mc(Si(n,s)))):(l!==_g&&(r=Error(a(423),{cause:l}),Mc(Si(r,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,l=Si(l,s),p=vm(n.stateNode,l,p),$g(n,p),Vn!==4&&(Vn=2)),!1;var m=Error(a(520),{cause:l});if(m=Si(m,s),Qc===null?Qc=[m]:Qc.push(m),Vn!==4&&(Vn=2),r===null)return!0;l=Si(l,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=vm(s.stateNode,l,n),$g(s,n),!1;case 1:if(r=s.type,m=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(xs===null||!xs.has(m))))return s.flags|=65536,p&=-p,s.lanes|=p,p=H2(p),F2(p,n,s,l),$g(s,p),!1;break;case 22:if(s.memoizedState!==null)return s.flags|=65536,!1}s=s.return}while(s!==null);return!1}var bm=Error(a(461)),Zn=!1;function rr(n,r,s,l){r.child=n===null?qx(r,null,s,l):ho(r,n.child,s,l)}function B2(n,r,s,l,p){s=s.render;var m=r.ref;if("ref"in l){var T={};for(var P in l)P!=="ref"&&(T[P]=l[P])}else T=l;return oo(r),l=tm(n,r,s,T,m,p),P=nm(),n!==null&&!Zn?(rm(n,r,p),Ia(n,r,p)):(Vt&&P&&Id(r),r.flags|=1,rr(n,r,l,p),r.child)}function V2(n,r,s,l,p){if(n===null){var m=s.type;return typeof m=="function"&&!Ig(m)&&m.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=m,K2(n,r,m,l,p)):(n=Dd(s.type,null,l,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Om(n,p)){var T=m.memoizedProps;if(s=s.compare,s=s!==null?s:Oc,s(T,l)&&n.ref===r.ref)return Ia(n,r,p)}return r.flags|=1,n=Aa(m,l),n.ref=r.ref,n.return=r,r.child=n}function K2(n,r,s,l,p){if(n!==null){var m=n.memoizedProps;if(Oc(m,l)&&n.ref===r.ref)if(Zn=!1,r.pendingProps=l=m,Om(n,p))(n.flags&131072)!==0&&(Zn=!0);else return r.lanes=n.lanes,Ia(n,r,p)}return xm(n,r,s,l,p)}function q2(n,r,s,l){var p=l.children,m=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|s:s,n!==null){for(l=r.child=n.child,p=0;l!==null;)p=p|l.lanes|l.childLanes,l=l.sibling;l=p&~m}else l=0,r.child=null;return Y2(n,r,m,s,l)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ud(r,m!==null?m.cachePool:null),m!==null?$x(r,m):Xg(),Qx(r);else return l=r.lanes=536870912,Y2(n,r,m!==null?m.baseLanes|s:s,s,l)}else m!==null?(Ud(r,m.cachePool),$x(r,m),gs(),r.memoizedState=null):(n!==null&&Ud(r,null),Xg(),gs());return rr(n,r,p,s),r.child}function Bc(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Y2(n,r,s,l,p){var m=Kg();return m=m===null?null:{parent:Qn._currentValue,pool:m},r.memoizedState={baseLanes:s,cachePool:m},n!==null&&Ud(r,null),Xg(),Qx(r),n!==null&&so(n,r,l,!0),r.childLanes=p,null}function nf(n,r){return r=rf({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function G2(n,r,s){return ho(r,n.child,null,s),n=nf(r,r.pendingProps),n.flags|=2,oi(r),r.memoizedState=null,n}function ON(n,r,s){var l=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Vt){if(l.mode==="hidden")return n=nf(r,l),r.lanes=536870912,n.memoizedState={baseLanes:0,cachePool:null},Bc(null,n);if(Wg(r),(n=Mn)?(n=bS(n,Ri),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:as!==null?{id:Ji,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},s=Mx(n),s.return=r,r.child=s,sr=r,Mn=null)):n=null,n===null)throw os(r);return r.lanes=536870912,null}return nf(r,l)}var m=n.memoizedState;if(m!==null){var T=m.dehydrated;if(Wg(r),p)if(r.flags&256)r.flags&=-257,r=G2(n,r,s);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(a(558));else if(Zn||so(n,r,s,!1),p=(s&n.childLanes)!==0,Zn||p){if(hs.current===null){if(l=On,l!==null&&(T=qt(l,s),T!==0&&T!==m.retryLane))throw m.retryLane=T,no(n,T),$r(l,n,T),bm;wf()}r=G2(n,r,s)}else n=m.treeContext,Mn=Ti(T.nextSibling),sr=r,Vt=!0,ss=null,Ri=!1,n!==null&&jx(r,n),r=nf(r,l),r.flags|=134221824;return r}return n=Aa(n.child,{mode:l.mode,children:l.children}),n.ref=r.ref,r.child=n,n.return=r,n}function ol(n,r){var s=r.ref;if(s===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(r.flags|=4194816)}}function xm(n,r,s,l,p){return oo(r),s=tm(n,r,s,l,void 0,p),l=nm(),n!==null&&!Zn?(rm(n,r,p),Ia(n,r,p)):(Vt&&l&&Id(r),r.flags|=1,rr(n,r,s,p),r.child)}function $2(n,r,s,l,p,m){return oo(r),r.updateQueue=null,s=Zx(r,l,s,p),Xx(n),l=nm(),n!==null&&!Zn?(rm(n,r,m),Ia(n,r,m)):(Vt&&l&&Id(r),r.flags|=1,rr(n,r,s,m),r.child)}function Q2(n,r,s,l,p){if(oo(r),r.stateNode===null){var m=Zo,T=s.contextType;typeof T=="object"&&T!==null&&(m=mr(T)),m=new s(l,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=ym,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=l,m.state=r.memoizedState,m.refs={},Yg(r),T=s.contextType,m.context=typeof T=="object"&&T!==null?mr(T):Zo,m.state=r.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&(mm(r,s,T,l),m.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(T=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),T!==m.state&&ym.enqueueReplaceState(m,m.state,null),zc(r,l,m,p),Lc(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(n===null){m=r.stateNode;var P=r.memoizedProps,Z=go(s,P);m.props=Z;var se=m.context,pe=s.contextType;T=Zo,typeof pe=="object"&&pe!==null&&(T=mr(pe));var Ce=s.getDerivedStateFromProps;pe=typeof Ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",P=r.pendingProps!==P,pe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(P||se!==T)&&P2(r,m,l,T),us=!1;var ie=r.memoizedState;m.state=ie,zc(r,l,m,p),Lc(),se=r.memoizedState,P||ie!==se||us?(typeof Ce=="function"&&(mm(r,s,Ce,l),se=r.memoizedState),(Z=us||I2(r,s,Z,l,ie,se,T))?(pe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=se),m.props=l,m.state=se,m.context=T,l=Z):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{m=r.stateNode,Gg(n,r),T=r.memoizedProps,pe=go(s,T),m.props=pe,Ce=r.pendingProps,ie=m.context,se=s.contextType,Z=Zo,typeof se=="object"&&se!==null&&(Z=mr(se)),P=s.getDerivedStateFromProps,(se=typeof P=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(T!==Ce||ie!==Z)&&P2(r,m,l,Z),us=!1,ie=r.memoizedState,m.state=ie,zc(r,l,m,p),Lc();var fe=r.memoizedState;T!==Ce||ie!==fe||us||n!==null&&n.dependencies!==null&&zd(n.dependencies)?(typeof P=="function"&&(mm(r,s,P,l),fe=r.memoizedState),(pe=us||I2(r,s,pe,l,ie,fe,Z)||n!==null&&n.dependencies!==null&&zd(n.dependencies))?(se||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,fe,Z),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,fe,Z)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=fe),m.props=l,m.state=fe,m.context=Z,l=pe):(typeof m.componentDidUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),l=!1)}return m=l,ol(n,r),l=(r.flags&128)!==0,m||l?(m=r.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,n!==null&&l?(r.child=ho(r,n.child,null,p),r.child=ho(r,null,s,p)):rr(n,r,s,p),r.memoizedState=m.state,n=r.child):n=Ia(n,r,p),n}function X2(n,r,s,l){return io(),r.flags|=256,rr(n,r,s,l),r.child}var Sm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Em(n){return{baseLanes:n,cachePool:Ux()}}function wm(n,r,s){return n=n!==null?n.childLanes&~s:0,r&&(n|=ui),n}function Z2(n,r,s){var l=r.pendingProps,p=!1,m=(r.flags&128)!==0,T;if((T=m)||(T=n!==null&&n.memoizedState===null?!1:(vr.current&2)!==0),T&&(p=!0,r.flags&=-129),T=(r.flags&32)!==0,r.flags&=-33,n===null){if(Vt){if(p?ps(r):gs(),(n=Mn)?(n=bS(n,Ri),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:as!==null?{id:Ji,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},s=Mx(n),s.return=r,r.child=s,sr=r,Mn=null)):n=null,n===null)throw os(r);return E0(n)?r.lanes=32:r.lanes=536870912,null}return m=l.children,l=l.fallback,p?(gs(),p=r.mode,m=rf({mode:"hidden",children:m},p),l=ro(l,p,s,null),m.return=r,l.return=r,m.sibling=l,r.child=m,l=r.child,l.memoizedState=Em(s),l.childLanes=wm(n,T,s),r.memoizedState=Sm,Bc(null,l)):(ps(r),Rm(r,m))}var P=n.memoizedState;if(P!==null){var Z=P.dehydrated;if(Z!==null)return AN(n,r,m,T,l,Z,P,s)}return p?(gs(),p=l.fallback,m=r.mode,P=n.child,Z=P.sibling,l=Aa(P,{mode:"hidden",children:l.children}),l.subtreeFlags=P.subtreeFlags&1206910976,Z!==null?p=Aa(Z,p):(p=ro(p,m,s,null),p.flags|=2),p.return=r,l.return=r,l.sibling=p,r.child=l,Bc(null,l),l=r.child,p=n.child.memoizedState,p===null?p=Em(s):(m=p.cachePool,m!==null?(P=Qn._currentValue,m=m.parent!==P?{parent:P,pool:P}:m):m=Ux(),p={baseLanes:p.baseLanes|s,cachePool:m}),l.memoizedState=p,l.childLanes=wm(n,T,s),r.memoizedState=Sm,Bc(n.child,l)):(ps(r),s=n.child,n=s.sibling,s=Aa(s,{mode:"visible",children:l.children}),s.return=r,s.sibling=null,n!==null&&(T=r.deletions,T===null?(r.deletions=[n],r.flags|=16):T.push(n)),r.child=s,r.memoizedState=null,s)}function Rm(n,r){return r=rf({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function rf(n,r){return n=Kr(22,n,null,r),n.lanes=0,n}function af(n,r,s){return ho(r,n.child,null,s),n=Rm(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function AN(n,r,s,l,p,m,T,P){if(s)return r.flags&256?(ps(r),r.flags&=-257,af(n,r,P)):r.memoizedState!==null?(gs(),r.child=n.child,r.flags|=128,null):(gs(),m=p.fallback,T=r.mode,p=rf({mode:"visible",children:p.children},T),m=ro(m,T,P,null),m.flags|=2,p.return=r,m.return=r,p.sibling=m,r.child=p,ho(r,n.child,null,P),p=r.child,p.memoizedState=Em(P),p.childLanes=wm(n,l,P),r.memoizedState=Sm,Bc(null,p));if(ps(r),E0(m)){if(l=m.nextSibling&&m.nextSibling.dataset,l)var Z=l.dgst;return l=Z,l!==""&&(p=Error(a(419)),p.stack="",p.digest=l,Mc({value:p,source:null,stack:null})),af(n,r,P)}if(Zn||so(n,r,P,!1),l=(P&n.childLanes)!==0,Zn||l){if(hs.current!==null)return af(n,r,P);if(l=On,l!==null&&(p=qt(l,P),p!==0&&p!==T.retryLane))throw T.retryLane=p,no(n,p),$r(l,n,p),bm;return S0(m)||wf(),af(n,r,P)}return S0(m)?(r.flags|=192,r.child=n.child,null):(n=T.treeContext,Mn=Ti(m.nextSibling),sr=r,Vt=!0,ss=null,Ri=!1,n!==null&&jx(r,n),r=Rm(r,p.children),r.flags|=134221824,r)}function W2(n,r,s){n.lanes|=r;var l=n.alternate;l!==null&&(l.lanes|=r),Ld(n.return,r,s)}function J2(n){for(var r=null;n!==null;){var s=n.alternate;s!==null&&qd(s)===null&&(r=n),n=n.sibling}return r}function sf(n,r,s,l,p,m){var T=n.memoizedState;T===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:p,treeForkCount:m}:(T.isBackwards=r,T.rendering=null,T.renderingStartTime=0,T.last=l,T.tail=s,T.tailMode=p,T.treeForkCount=m)}function Cm(n){var r=n.child;for(n.child=null;r!==null;){var s=r.sibling;r.sibling=n.child,n.child=r,r=s}}function Tm(n,r,s){var l=r.pendingProps,p=l.revealOrder,m=l.tail;l=l.children;var T=vr.current;if(r.flags&128)return _c(r,T),null;var P=(T&2)!==0;if(P?(T=T&1|2,r.flags|=128):T&=1,_c(r,T),p==="backwards"&&n!==null?(Cm(n),rr(n,r,l,s),Cm(n)):rr(n,r,l,s),l=Vt?kc:0,!P&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&W2(n,s,r);else if(n.tag===19)W2(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"backwards":s=J2(r.child),s===null?(p=r.child,r.child=null):(p=s.sibling,s.sibling=null,Cm(r)),sf(r,!0,p,null,m,l);break;case"unstable_legacy-backwards":for(s=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&qd(n)===null){r.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}sf(r,!0,s,null,m,l);break;case"together":sf(r,!1,null,null,void 0,l);break;case"independent":r.memoizedState=null;break;default:s=J2(r.child),s===null?(p=r.child,r.child=null):(p=s.sibling,s.sibling=null),sf(r,!1,p,s,m,l)}return r.child}function e1(n,r,s){var l=r.pendingProps;return ls(r,r.type,l.value),rr(n,r,l.children,s),r.child}function Ia(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),bs|=r.lanes,(s&r.childLanes)===0)if(n!==null){if(so(n,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(a(153));if(r.child!==null){for(n=r.child,s=Aa(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=Aa(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function Om(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&zd(n)))}function kN(n,r,s){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),ls(r,Qn,n.memoizedState.cache),io();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:ls(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Wg(r),null;break;case 13:var l=r.memoizedState;if(l!==null){if(l.dehydrated!==null)return ps(r),r.flags|=128,null;l=so(n,r,s,!1);var p=r.child.childLanes;return l||(s&p)!==0?Z2(n,r,s):(ps(r),n=Ia(n,r,s),n!==null?n.sibling:null)}ps(r);break;case 19:if(r.flags&128)return Tm(n,r,s);if(p=(n.flags&128)!==0,l=(s&r.childLanes)!==0,l||(so(n,r,s,!1),l=(s&r.childLanes)!==0),p){if(l)return Tm(n,r,s);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),_c(r,vr.current),l)break;return null;case 22:return r.lanes=0,q2(n,r,s,r.pendingProps);case 24:ls(r,Qn,n.memoizedState.cache)}return Ia(n,r,s)}function t1(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps)Zn=!0;else{if(!Om(n,s)&&(r.flags&128)===0)return Zn=!1,kN(n,r,s);Zn=(n.flags&131072)!==0}else Zn=!1,Vt&&(r.flags&1048576)!==0&&Dx(r,kc,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(n=uo(r.elementType),r.type=n,typeof n=="function")Ig(n)?(l=go(n,l),r.tag=1,r=Q2(null,r,n,l,s)):(r.tag=0,r=xm(null,r,n,l,s));else{if(n!=null){var p=n.$$typeof;if(p===z){r.tag=11,r=B2(null,r,n,l,s);break e}else if(p===K){r.tag=14,r=V2(null,r,n,l,s);break e}else if(p===U){r.tag=10,r.type=n,r=e1(null,r,s);break e}}throw r=le(n)||n,Error(a(306,r,""))}}return r;case 0:return xm(n,r,r.type,r.pendingProps,s);case 1:return l=r.type,p=go(l,r.pendingProps),Q2(n,r,l,p,s);case 3:e:{if(Ze(r,r.stateNode.containerInfo),n===null)throw Error(a(387));l=r.pendingProps;var m=r.memoizedState;p=m.element,Gg(n,r),zc(r,l,null,s);var T=r.memoizedState;if(l=T.cache,ls(r,Qn,l),l!==m.cache&&Fg(r,[Qn],s,!0),Lc(),l=T.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:T.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=X2(n,r,l,s);break e}else if(l!==p){p=Si(Error(a(424)),r),Mc(p),r=X2(n,r,l,s);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Mn=Ti(n.firstChild),sr=r,Vt=!0,ss=null,Ri=!0,s=qx(r,null,l,s),r.child=s;s;)s.flags=s.flags&-3|134221824,s=s.sibling;else{if(io(),l===p){r=Ia(n,r,s);break e}rr(n,r,l,s)}r=r.child}return r;case 26:return ol(n,r),n===null?(s=TS(r.type,null,r.pendingProps,null))?r.memoizedState=s:Vt||(r.stateNode=aS(r.type,r.pendingProps,be.current,r)):r.memoizedState=TS(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return de(r),n===null&&Vt&&(l=r.stateNode=ES(r.type,r.pendingProps,be.current),sr=r,Ri=!0,p=Mn,ws(r.type)?(w0=p,Mn=Ti(l.firstChild)):Mn=p),rr(n,r,r.pendingProps.children,s),ol(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Vt&&((p=l=Mn)&&(l=wD(l,r.type,r.pendingProps,Ri),l!==null?(r.stateNode=l,sr=r,Mn=Ti(l.firstChild),Ri=!1,p=!0):p=!1),p||os(r)),de(r),p=r.type,m=r.pendingProps,T=n!==null?n.memoizedProps:null,l=m.children,p0(p,m)?l=null:T!==null&&p0(p,T)&&(r.flags|=32),r.memoizedState!==null&&(p=tm(n,r,vN,null,null,s),Cl._currentValue=p),ol(n,r),rr(n,r,l,s),r.child;case 6:return n===null&&Vt&&((n=s=Mn)&&(s=RD(s,r.pendingProps,Ri),s!==null?(r.stateNode=s,sr=r,Mn=null,n=!0):n=!1),n||os(r)),null;case 13:return Z2(n,r,s);case 4:return Ze(r,r.stateNode.containerInfo),l=r.pendingProps,n===null?r.child=ho(r,null,l,s):rr(n,r,l,s),r.child;case 11:return B2(n,r,r.type,r.pendingProps,s);case 7:return l=r.pendingProps,ol(n,r),rr(n,r,l,s),r.child;case 8:return rr(n,r,r.pendingProps.children,s),r.child;case 12:return rr(n,r,r.pendingProps.children,s),r.child;case 10:return e1(n,r,s);case 9:return p=r.type._context,l=r.pendingProps.children,oo(r),p=mr(p),l=l(p),r.flags|=1,rr(n,r,l,s),r.child;case 14:return V2(n,r,r.type,r.pendingProps,s);case 15:return K2(n,r,r.type,r.pendingProps,s);case 19:return Tm(n,r,s);case 31:return ON(n,r,s);case 22:return q2(n,r,s,r.pendingProps);case 24:return oo(r),l=mr(Qn),n===null?(p=Kg(),p===null&&(p=On,m=Bg(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=s),p=m),r.memoizedState={parent:l,cache:p},Yg(r),ls(r,Qn,p)):((n.lanes&s)!==0&&(Gg(n,r),zc(r,null,null,s),Lc()),p=n.memoizedState,m=r.memoizedState,p.parent!==l?(p={parent:l,cache:l},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),ls(r,Qn,l)):(l=m.cache,ls(r,Qn,l),l!==p.cache&&Fg(r,[Qn],s,!0))),rr(n,r,r.pendingProps.children,s),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=r.pendingProps,l.name!=null&&l.name!=="auto"?r.flags|=n===null?18882560:18874368:Vt&&Id(r),n!==null&&n.memoizedProps.name!==l.name?r.flags|=4194816:ol(n,r),rr(n,r,l.children,s),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function Pa(n){n.flags|=4}function Am(n,r,s,l,p){var m;if((m=(n.mode&32)!==0)&&(m=s===null?MS(r,l):MS(r,l)&&(l.src!==s.src||l.srcSet!==s.srcSet)),m){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(L1())n.flags|=8192;else throw fo=Fd,qg}else n.flags&=-16777217}function n1(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!NS(r))if(L1())n.flags|=8192;else throw fo=Fd,qg}function of(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?tt():536870912,n.lanes|=r,fl|=r)}function Vc(n,r){if(!Vt)switch(n.tailMode){case"visible":break;case"collapsed":for(var s=n.tail,l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null;break;default:for(r=n.tail,s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null}}function Nn(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,l=0;if(r)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,l|=p.subtreeFlags&1206910976,l|=p.flags&1206910976,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=l,n.childLanes=s,r}function MN(n,r,s){var l=r.pendingProps;switch(zg(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(r),null;case 1:return Nn(r),null;case 3:return s=r.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Na(Qn),st(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(el(r)?Pa(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Ug())),Nn(r),null;case 26:var p=r.type,m=r.memoizedState;return n===null?(Pa(r),m!==null?(Nn(r),n1(r,m)):(Nn(r),Am(r,p,null,l,s))):m?m!==n.memoizedState?(Pa(r),Nn(r),n1(r,m)):(Nn(r),r.flags&=-16777217):(n=n.memoizedProps,n!==l&&Pa(r),Nn(r),Am(r,p,n,l,s)),null;case 27:if(Ee(r),s=be.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&Pa(r);else{if(!l){if(r.stateNode===null)throw Error(a(166));return Nn(r),r.subtreeFlags&=-33554433,null}n=Oe.current,el(r)?Ix(r):(n=ES(p,l,s),r.stateNode=n,Pa(r))}return Nn(r),r.subtreeFlags&=-33554433,null;case 5:if(Ee(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&Pa(r);else{if(!l){if(r.stateNode===null)throw Error(a(166));return Nn(r),r.subtreeFlags&=-33554433,null}if(m=Oe.current,el(r))Ix(r);else{var T=eu(be.current);switch(m){case 1:m=T.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=T.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=T.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=T.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=T.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?T.createElement("select",{is:l.is}):T.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?T.createElement(p,{is:l.is}):T.createElement(p)}}m[fn]=r,m[kn]=l;e:for(T=r.child;T!==null;){if(T.tag===5||T.tag===6)m.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===r)break e;for(;T.sibling===null;){if(T.return===null||T.return===r)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}r.stateNode=m;e:switch(xr(m,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Pa(r)}}return Nn(r),r.subtreeFlags&=-33554433,Am(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,s),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&Pa(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(a(166));if(n=be.current,el(r)){if(n=r.stateNode,s=r.memoizedProps,l=null,p=sr,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}n[fn]=r,n=!!(n.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||tS(n.nodeValue,s)),n||os(r,!0)}else n=eu(n).createTextNode(l),n[fn]=r,r.stateNode=n}return Nn(r),null;case 31:if(s=r.memoizedState,n===null||n.memoizedState!==null){if(l=el(r),s!==null){if(n===null){if(!l)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[fn]=r}else io(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),n=!1}else s=Ug(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return r.flags&256?(oi(r),r):(oi(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Nn(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=el(r),l!==null&&l.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[fn]=r}else io(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),p=!1}else p=Ug(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(oi(r),r):(oi(r),null)}return oi(r),(r.flags&128)!==0?(r.lanes=s,r):(s=l!==null,n=n!==null&&n.memoizedState!==null,s&&(l=r.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==p&&(l.flags|=2048)),s!==n&&s&&(r.child.flags|=8192),of(r,r.updateQueue),Nn(r),null);case 4:return st(),n===null&&c0(r.stateNode.containerInfo),r.flags|=67108864,Nn(r),null;case 10:return Na(r.type),Nn(r),null;case 19:if(Jg(r),l=r.memoizedState,l===null)return Nn(r),null;if(p=(r.flags&128)!==0,m=l.rendering,m===null)if(p)Vc(l,!1);else{if(Vn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=qd(n),m!==null){for(r.flags|=128,Vc(l,!1),n=m.updateQueue,r.updateQueue=n,of(r,n),r.subtreeFlags=0,n=s,s=r.child;s!==null;)kx(s,n),s=s.sibling;return _c(r,vr.current&1|2),Vt&&ka(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&St()>bf&&(r.flags|=128,p=!0,Vc(l,!1),r.lanes=4194304)}else{if(!p)if(n=qd(m),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,of(r,n),Vc(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!m.alternate&&!Vt)return Nn(r),null}else 2*St()-l.renderingStartTime>bf&&s!==536870912&&(r.flags|=128,p=!0,Vc(l,!1),r.lanes=4194304);l.isBackwards?(m.sibling=r.child,r.child=m):(n=l.last,n!==null?n.sibling=m:r.child=m,l.last=m)}if(l.tail!==null){n=l.tail;e:{for(s=n;s!==null;){if(s.alternate!==null){s=!1;break e}s=s.sibling}s=!0}return l.rendering=n,l.tail=n.sibling,l.renderingStartTime=St(),n.sibling=null,m=vr.current,m=p?m&1|2:m&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!s||Vt?_c(r,m):(s=m,Be(yr,r),Be(vr,s),Tr===null&&(Tr=r)),Vt&&ka(r,l.treeForkCount),n}return Nn(r),null;case 22:case 23:return oi(r),Zg(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(s&536870912)!==0&&(r.flags&128)===0&&(Nn(r),r.subtreeFlags&6&&(r.flags|=8192)):Nn(r),s=r.updateQueue,s!==null&&of(r,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==s&&(r.flags|=2048),n!==null&&Le(co),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),Na(Qn),Nn(r),null;case 25:return null;case 30:return r.flags|=33554432,Nn(r),null}throw Error(a(156,r.tag))}function NN(n,r){switch(zg(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Na(Qn),st(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Ee(r),null;case 31:if(r.memoizedState!==null){if(oi(r),r.alternate===null)throw Error(a(340));io()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(oi(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));io()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Jg(r),n=r.flags,n&65536?(r.flags=n&-65537|128,n=r.memoizedState,n!==null&&(n.rendering=null,n.tail=null),r.flags|=4,r):null;case 4:return st(),null;case 10:return Na(r.type),null;case 22:case 23:return oi(r),Zg(),n!==null&&Le(co),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Na(Qn),null;case 25:return null;default:return null}}function r1(n,r){switch(zg(r),r.tag){case 3:Na(Qn),st();break;case 26:case 27:case 5:Ee(r);break;case 4:st();break;case 31:r.memoizedState!==null&&oi(r);break;case 13:oi(r);break;case 19:Jg(r);break;case 10:Na(r.type);break;case 22:case 23:oi(r),Zg(),n!==null&&Le(co);break;case 24:Na(Qn)}}function Kc(n,r){try{var s=r.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var p=l.next;s=p;do{if((s.tag&n)===n){l=void 0;var m=s.create,T=s.inst;l=m(),T.destroy=l}s=s.next}while(s!==p)}}catch(P){mn(r,r.return,P)}}function ms(n,r,s){try{var l=r.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var m=p.next;l=m;do{if((l.tag&n)===n){var T=l.inst,P=T.destroy;if(P!==void 0){T.destroy=void 0,p=r;var Z=s,se=P;try{se()}catch(pe){mn(p,Z,pe)}}}l=l.next}while(l!==m)}}catch(pe){mn(r,r.return,pe)}}function i1(n){var r=n.updateQueue;if(r!==null){var s=n.stateNode;try{Gx(r,s)}catch(l){mn(n,n.return,l)}}}function a1(n,r,s){s.props=go(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(l){mn(n,r,l)}}function ta(n,r){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:var p=n.stateNode,m=Ta(n.memoizedProps,p);(p.ref===null||p.ref.name!==m)&&(p.ref=fS(m)),l=p.ref;break;case 7:if(n.stateNode===null){var T=new fi(n);h(n.child,!1,SD,T,void 0,void 0),n.stateNode=T}l=n.stateNode;break;default:l=n.stateNode}typeof s=="function"?n.refCleanup=s(l):s.current=l}}catch(P){mn(n,r,P)}}function br(n,r){var s=n.ref,l=n.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(p){mn(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){mn(n,r,p)}else s.current=null}function lf(n,r){if((n.tag===5||n.tag===27||n.tag===6)&&n.alternate===null&&r!==null)for(var s=0;s<r.length;s++)vS(n.stateNode,r[s])}function s1(n){for(var r=n.return;r!==null&&(Mm(r)&&vS(n.stateNode,r.stateNode),!km(r));)r=r.return}function qc(n){for(var r=n.return;r!==null&&(Mm(r)&&ED(n.stateNode,r.stateNode),!km(r));)r=r.return}function km(n){return n.tag===5||n.tag===3||n.tag===27}function Mm(n){return n&&n.tag===7&&n.stateNode!==null}function Nm(n){var r=n.type,s=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(p){mn(n,n.return,p)}}function Dm(n,r,s){try{var l=n.stateNode;rD(l,n.type,s,r),l[kn]=r}catch(p){mn(n,n.return,p)}}function o1(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ws(n.type)||n.tag===4}function jm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||o1(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ws(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Im(n,r,s,l){var p=n.tag;if(p===5||p===6)p=n.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(p,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(p),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Ir)),lf(n,l),gt=!0;else if(p!==4&&(p===27&&(lf(n,l),l=null,ws(n.type)&&(s=n.stateNode,r=null)),n=n.child,n!==null))for(Im(n,r,s,l),n=n.sibling;n!==null;)Im(n,r,s,l),n=n.sibling}function cf(n,r,s,l){var p=n.tag;if(p===5||p===6)p=n.stateNode,r?s.insertBefore(p,r):s.appendChild(p),lf(n,l),gt=!0;else if(p!==4&&(p===27&&(lf(n,l),l=null,ws(n.type)&&(s=n.stateNode)),n=n.child,n!==null))for(cf(n,r,s,l),n=n.sibling;n!==null;)cf(n,r,s,l),n=n.sibling}function l1(n){var r=n.stateNode,s=n.memoizedProps;try{for(var l=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);xr(r,l,s),r[fn]=n,r[kn]=s}catch(m){mn(n,n.return,m)}}var uf=!1,li=null;function c1(n){(n.tag===30||(n.subtreeFlags&33554432)!==0)&&(uf=!0)}var na=null;function u1(){var n=na;return na=null,n}var qr=0;function ll(n,r,s,l,p){return qr=0,d1(n.child,r,s,l,p)}function d1(n,r,s,l,p){for(var m=!1;n!==null;){if(n.tag===5){var T=n.stateNode;if(l!==null){var P=y0(T);l.push(P),P.view&&(m=!0)}else m||y0(T).view&&(m=!0);uf=!0,uS(T,qr===0?r:r+"_"+qr,s),qr++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&p||d1(n.child,r,s,l,p)&&(m=!0));n=n.sibling}return m}function ra(n,r){for(;n!==null;)n.tag===5?dS(n.stateNode,n.memoizedProps):(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&r||ra(n.child,r)),n=n.sibling}function df(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if((n.tag!==22||n.memoizedState===null)&&(df(n),n.tag===30&&(n.flags&18874368)!==0&&n.stateNode.paired)){var r=n.memoizedProps;if(r.name==null||r.name==="auto")throw Error(a(544));var s=r.name;r=Oa(r.default,r.share),r!=="none"&&(ll(n,s,r,null,!1)||ra(n.child,!1))}n=n.sibling}}function Pm(n,r){if(n.tag===30){var s=n.stateNode,l=n.memoizedProps,p=Ta(l,s),m=Oa(l.default,s.paired?l.share:l.enter);m!=="none"?ll(n,p,m,null,!1)?(df(n),s.paired||r||ml(n,l.onEnter)):ra(n.child,!1):df(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Pm(n,r),n=n.sibling;else df(n)}function Lm(n){if(li!==null&&li.size!==0){var r=li;if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var s=n.memoizedProps,l=s.name;if(l!=null&&l!=="auto"){var p=r.get(l);if(p!==void 0){var m=Oa(s.default,s.share);if(m!=="none"&&(ll(n,l,m,null,!1)?(m=n.stateNode,p.paired=m,m.paired=p,ml(n,s.onShare)):ra(n.child,!1)),r.delete(l),r.size===0)break}}}Lm(n)}n=n.sibling}}}function zm(n){if(n.tag===30){var r=n.memoizedProps,s=Ta(r,n.stateNode),l=li!==null?li.get(s):void 0,p=Oa(r.default,l!==void 0?r.share:r.exit);p!=="none"&&(ll(n,s,p,null,!1)?l!==void 0?(p=n.stateNode,l.paired=p,p.paired=l,li.delete(s),ml(n,r.onShare)):ml(n,r.onExit):ra(n.child,!1)),li!==null&&Lm(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)zm(n),n=n.sibling;else li!==null&&Lm(n)}function f1(n){for(n=n.child;n!==null;){if(n.tag===30){var r=n.memoizedProps,s=Ta(r,n.stateNode);r=Oa(r.default,r.update),n.flags&=-5,r!=="none"&&ll(n,s,r,n.memoizedState=[],!1)}else(n.subtreeFlags&33554432)!==0&&f1(n);n=n.sibling}}function _m(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var r=n.stateNode;r.paired!==null&&(r.paired=null,ra(n.child,!1))}_m(n)}n=n.sibling}}function ff(n){if(n.tag===30)n.stateNode.paired=null,ra(n.child,!1),_m(n);else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)ff(n),n=n.sibling;else _m(n)}function h1(n){for(n=n.child;n!==null;)n.tag===30?ra(n.child,!1):(n.subtreeFlags&33554432)!==0&&h1(n),n=n.sibling}function Um(n,r,s,l,p,m,T){for(var P=!1;r!==null;){if(r.tag===5){var Z=r.stateNode;if(m!==null&&qr<m.length){var se=m[qr],pe=y0(Z);(se.view||pe.view)&&(P=!0);var Ce;if(Ce=(n.flags&4)===0)if(pe.clip)Ce=!0;else{Ce=se.rect;var ie=pe.rect;Ce=Ce.y!==ie.y||Ce.x!==ie.x||Ce.height!==ie.height||Ce.width!==ie.width}Ce&&(n.flags|=4),pe.abs?pe=!se.abs:(se=se.rect,pe=pe.rect,pe=se.height!==pe.height||se.width!==pe.width),pe&&(n.flags|=32)}else n.flags|=32;(n.flags&4)!==0&&uS(Z,qr===0?s:s+"_"+qr,p),P&&(n.flags&4)!==0||(na===null&&(na=[]),na.push(Z,qr===0?l:l+"_"+qr,r.memoizedProps)),qr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&T?n.flags|=r.flags&32:Um(n,r.child,s,l,p,m,T)&&(P=!0));r=r.sibling}return P}function p1(n,r){for(n=n.child;n!==null;){if(n.tag===30){var s=n.memoizedProps,l=n.stateNode,p=Ta(s,l),m=Oa(s.default,s.update),T;T=n.memoizedState,n.memoizedState=null,l=n;var P=n.child;qr=0,p=Um(l,P,p,p,m,T,!1),(n.flags&4)!==0&&p&&ml(n,s.onUpdate)}else(n.subtreeFlags&33554432)!==0&&p1(n);n=n.sibling}}var or=!1,pn=!1,ia=!1,Hm=!1,g1=typeof WeakSet=="function"?WeakSet:Set,lr=null,aa=!1,Yc=!1,hf=!1,Fm=!1;function DN(n,r,s){if(n=n.containerInfo,f0=Tl,n=bx(n),Og(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var p=l.getSelection&&l.getSelection();if(p&&p.rangeCount!==0){l=p.anchorNode;var m=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{l.nodeType,T.nodeType}catch{l=null;break e}var P=0,Z=-1,se=-1,pe=0,Ce=0,ie=n,fe=null;t:for(;;){for(var qe;ie!==l||m!==0&&ie.nodeType!==3||(Z=P+m),ie!==T||p!==0&&ie.nodeType!==3||(se=P+p),ie.nodeType===3&&(P+=ie.nodeValue.length),(qe=ie.firstChild)!==null;)fe=ie,ie=qe;for(;;){if(ie===n)break t;if(fe===l&&++pe===m&&(Z=P),fe===T&&++Ce===p&&(se=P),(qe=ie.nextSibling)!==null)break;ie=fe,fe=ie.parentNode}ie=qe}l=Z===-1||se===-1?null:{start:Z,end:se}}else l=null}l=l||{start:0,end:0}}else l=null;for(h0={focusedElem:n,selectionRange:l},Tl=!1,s=(s&335544064)===s,lr=r,r=s?9270:1024;lr!==null;){if(n=lr,s&&(l=n.deletions,l!==null))for(m=0;m<l.length;m++)s&&zm(l[m]);if(n.alternate===null&&(n.flags&2)!==0)s&&c1(n),pf(s);else{if(n.tag===22){if(l=n.alternate,n.memoizedState!==null){l!==null&&l.memoizedState===null&&s&&zm(l),pf(s);continue}else if(l!==null&&l.memoizedState!==null){s&&c1(n),pf(s);continue}}l=n.child,(n.subtreeFlags&r)!==0&&l!==null?(l.return=n,lr=l):(s&&f1(n),pf(s))}}li=null}function pf(n){for(;lr!==null;){var r=lr,s=n,l=r.alternate,p=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((p&1024)!==0&&l!==null){s=void 0,p=l.memoizedProps,l=l.memoizedState;var m=r.stateNode;try{var T=go(r.type,p);s=m.getSnapshotBeforeUpdate(T,l),m.__reactInternalSnapshotBeforeUpdate=s}catch(P){mn(r,r.return,P)}}break;case 3:if((p&1024)!==0){if(l=r.stateNode.containerInfo,s=l.nodeType,s===9)x0(l);else if(s===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":x0(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:s&&l!==null&&(s=Ta(l.memoizedProps,l.stateNode),p=r.memoizedProps,p=Oa(p.default,p.update),p!=="none"&&ll(l,s,p,l.memoizedState=[],!0));break;default:if((p&1024)!==0)throw Error(a(163))}if(l=r.sibling,l!==null){l.return=r.return,lr=l;break}lr=r.return}}function m1(n,r,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:sa(n,s),l&4&&Kc(5,s);break;case 1:if(sa(n,s),l&4)if(n=s.stateNode,r===null)try{n.componentDidMount()}catch(T){mn(s,s.return,T)}else{var p=go(s.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(T){mn(s,s.return,T)}}l&64&&i1(s),l&512&&ta(s,s.return);break;case 3:if(sa(n,s),l&64&&(n=s.updateQueue,n!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{Gx(n,r)}catch(T){mn(s,s.return,T)}}break;case 27:r===null&&l&4&&l1(s);case 26:case 5:sa(n,s),r===null&&l&4&&Nm(s),l&512&&ta(s,s.return);break;case 12:sa(n,s);break;case 31:sa(n,s),l&4&&x1(n,s);break;case 13:sa(n,s),l&4&&S1(n,s),l&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=KN.bind(null,s),CD(n,s))));break;case 22:if(l=s.memoizedState!==null||or,!l){var m=r!==null&&r.memoizedState!==null||pn;r=or,p=pn,or=l,(pn=m)&&!p?(l=2,(s.subtreeFlags&8772)!==0&&(l|=1),Fi(n,s,l)):sa(n,s),or=r,pn=p}break;case 30:sa(n,s),l&512&&ta(s,s.return);break;case 7:l&512&&ta(s,s.return);default:sa(n,s)}}function Bm(n,r){for(n=n.child;n!==null;)y1(n,r),n=n.sibling}function y1(n,r){switch(n.tag){case 5:case 26:try{var s=n.stateNode;if(r){var l=s.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var p=n.stateNode,m=n.memoizedProps.style,T=m!=null&&m.hasOwnProperty("display")?m.display:null;p.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(Z){mn(n,n.return,Z)}Vm(n,r);break;case 6:try{n.stateNode.nodeValue=r?"":n.memoizedProps,gt=!0}catch(Z){mn(n,n.return,Z)}break;case 18:try{var P=n.stateNode;r?cS(P,!0):cS(n.stateNode,!1)}catch(Z){mn(n,n.return,Z)}break;case 22:case 23:n.memoizedState===null&&Bm(n,r);break;default:Bm(n,r)}}function Vm(n,r){if(n.subtreeFlags&67108864)for(n=n.child;n!==null;){e:{var s=n,l=r;switch(s.tag){case 4:y1(s,l);break e;case 22:s.memoizedState===null&&Vm(s,l);break e;default:Vm(s,l)}}n=n.sibling}}function v1(n){var r=n.alternate;r!==null&&(n.alternate=null,v1(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&qn(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var In=null,Yr=!1;function Ui(n,r,s){for(s=s.child;s!==null;)b1(n,r,s),s=s.sibling}function b1(n,r,s){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Ie,s)}catch{}switch(s.tag){case 26:pn||br(s,r),Ui(n,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&!pn&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:pn||br(s,r),qc(s);var l=In,p=Yr;ws(s.type)&&(In=s.stateNode,Yr=!1),Ui(n,r,s),wS(s.stateNode,s.type,s.memoizedProps),In=l,Yr=p;break;case 5:pn||br(s,r),qc(s);case 6:if(s.tag===6&&qc(s),l=In,p=Yr,In=null,Ui(n,r,s),In=l,Yr=p,In!==null)if(Yr)try{(In.nodeType===9?In.body:In.nodeName==="HTML"?In.ownerDocument.body:In).removeChild(s.stateNode),gt=!0}catch(m){mn(s,r,m)}else try{In.removeChild(s.stateNode),gt=!0}catch(m){mn(s,r,m)}break;case 18:In!==null&&(Yr?(n=In,lS(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Ol(n)):lS(In,s.stateNode));break;case 4:l=In,p=Yr,In=s.stateNode.containerInfo,Yr=!0,Ui(n,r,s),In=l,Yr=p;break;case 0:case 11:case 14:case 15:ms(2,s,r),pn||ms(4,s,r),Ui(n,r,s);break;case 1:pn||(br(s,r),l=s.stateNode,typeof l.componentWillUnmount=="function"&&a1(s,r,l)),Ui(n,r,s);break;case 21:Ui(n,r,s);break;case 22:pn=(l=pn)||s.memoizedState!==null,Ui(n,r,s),pn=l;break;case 30:br(s,r),Ui(n,r,s);break;case 7:pn||br(s,r),Ui(n,r,s);break;default:Ui(n,r,s)}}function x1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ol(n)}catch(s){mn(r,r.return,s)}}}function S1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ol(n)}catch(s){mn(r,r.return,s)}}function jN(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new g1),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new g1),r;default:throw Error(a(435,n.tag))}}function gf(n,r){var s=jN(n);r.forEach(function(l){if(!s.has(l)){s.add(l);var p=qN.bind(null,n,l);l.then(p,p)}})}function zr(n,r,s){var l=r.deletions;if(l!==null)for(var p=0;p<l.length;p++){var m=l[p],T=n,P=r,Z=P;e:for(;Z!==null;){switch(Z.tag){case 27:if(ws(Z.type)){In=Z.stateNode,Yr=!1;break e}break;case 5:In=Z.stateNode,Yr=!1;break e;case 3:case 4:In=Z.stateNode.containerInfo,Yr=!0;break e}Z=Z.return}if(In===null)throw Error(a(160));b1(T,P,m),In=null,Yr=!1,T=m.alternate,T!==null&&(T.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)E1(r,n,s),r=r.sibling}var Hi=null;function E1(n,r,s){var l=n.alternate,p=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(p&4&&(l=n.updateQueue,l=l!==null?l.events:null,l!==null))for(var m=0;m<l.length;m++){var T=l[m];T.ref.impl=T.nextImpl}zr(r,n,s),_r(n),p&4&&(ms(3,n,n.return),Kc(3,n),ms(5,n,n.return));break;case 1:zr(r,n,s),_r(n),p&512&&(pn||l===null||br(l,l.return)),p&64&&or&&(n=n.updateQueue,n!==null&&(r=n.callbacks,r!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?r:s.concat(r))));break;case 26:if(m=Hi,zr(r,n,s),_r(n),p&512&&(pn||l===null||br(l,l.return)),p&4)if(p=l!==null?l.memoizedState:null,s=n.memoizedState,l===null)if(s===null)if(n.stateNode===null)if(or)n.stateNode=aS(n.type,n.memoizedProps,r.containerInfo,n);else{e:{r=n.type,s=n.memoizedProps,p=m.ownerDocument||m;t:switch(r){case"title":l=p.getElementsByTagName("title")[0],(!l||l[vi]||l[fn]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=p.createElement(r),p.head.insertBefore(l,p.querySelector("head > title"))),xr(l,r,s),l[fn]=n,Se(l),r=l;break e;case"link":if(m=kS("link","href",p).get(r+(s.href||""))){for(T=0;T<m.length;T++)if(l=m[T],l.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&l.getAttribute("rel")===(s.rel==null?null:s.rel)&&l.getAttribute("title")===(s.title==null?null:s.title)&&l.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){m.splice(T,1);break t}}l=p.createElement(r),xr(l,r,s),p.head.appendChild(l);break;case"meta":if(m=kS("meta","content",p).get(r+(s.content||""))){for(T=0;T<m.length;T++)if(l=m[T],l.getAttribute("content")===(s.content==null?null:""+s.content)&&l.getAttribute("name")===(s.name==null?null:s.name)&&l.getAttribute("property")===(s.property==null?null:s.property)&&l.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&l.getAttribute("charset")===(s.charSet==null?null:s.charSet)){m.splice(T,1);break t}}l=p.createElement(r),xr(l,r,s),p.head.appendChild(l);break;default:throw Error(a(468,r))}l[fn]=n,Se(l),r=l}n.stateNode=r}else or||O0(m,n.type,n.stateNode);else n.stateNode=AS(m,s,n.memoizedProps);else p!==s?(p===null?(r=l.stateNode,r===null||pn||r.parentNode.removeChild(r)):p.count--,s===null?or||O0(m,n.type,n.stateNode):AS(m,s,n.memoizedProps)):s===null&&n.stateNode!==null&&Dm(n,n.memoizedProps,l.memoizedProps);break;case 27:zr(r,n,s),_r(n),p&512&&(pn||l===null||br(l,l.return)),l!==null&&p&4&&Dm(n,n.memoizedProps,l.memoizedProps);break;case 5:if(m=ia,ia=!1,zr(r,n,s),ia=m,_r(n),p&512&&(pn||l===null||br(l,l.return)),n.flags&32){r=n.stateNode;try{jr(r,""),gt=!0}catch(pe){mn(n,n.return,pe)}}p&4&&n.stateNode!=null&&(r=n.memoizedProps,Dm(n,r,l!==null?l.memoizedProps:r)),p&1024&&(Hm=!0);break;case 6:if(zr(r,n,s),_r(n),p&4){if(n.stateNode===null)throw Error(a(162));r=n.memoizedProps,s=n.stateNode;try{s.nodeValue=r,gt=!0}catch(pe){mn(n,n.return,pe)}}break;case 3:if(gt=!1,Mf=null,m=Hi,Hi=tu(r.containerInfo),zr(r,n,s),Hi=m,_r(n),p&4&&l!==null&&l.memoizedState.isDehydrated)try{Ol(r.containerInfo)}catch(pe){mn(n,n.return,pe)}Hm&&(Hm=!1,w1(n)),gt=!1;break;case 4:p=ia,ia=or,l=nr(),m=Hi,Hi=tu(n.stateNode.containerInfo),zr(r,n,s),_r(n),Hi=m,gt&&Yc&&(hf=!0),gt=l,ia=p;break;case 12:zr(r,n,s),_r(n);break;case 31:zr(r,n,s),_r(n),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,gf(n,r)));break;case 13:zr(r,n,s),_r(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(vf=St()),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,gf(n,r)));break;case 22:m=n.memoizedState!==null,T=l!==null&&l.memoizedState!==null;var P=or,Z=pn,se=ia;or=P||m,ia=se||m,pn=Z||T,zr(r,n,s),pn=Z,ia=se,or=P,_r(n),p&8192&&(r=n.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||l===null||T||or||pn||(r=T||pn,s=or,l=pn,or=m||or,pn=r,ys(n,2),or=s,pn=l),!m&&ia||Bm(n,m)),p&4&&(r=n.updateQueue,r!==null&&(s=r.retryQueue,s!==null&&(r.retryQueue=null,gf(n,s))));break;case 19:zr(r,n,s),_r(n),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,gf(n,r)));break;case 30:p&512&&(pn||l===null||br(l,l.return)),p=nr(),m=Yc,T=(s&335544064)===s,P=n.memoizedProps,Yc=T&&Oa(P.default,P.update)!=="none",zr(r,n,s),_r(n),T&&l!==null&&gt&&(n.flags|=4),Yc=m,gt=p;break;case 21:break;case 7:p&512&&(pn||l===null||br(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=n);default:zr(r,n,s),_r(n)}}function _r(n){var r=n.flags;if(r&2){try{for(var s,l=n.return;l!==null;){if(o1(l)){s=l;break}l=l.return}l=null;for(var p=n.return;p!==null;){if(Mm(p)){var m=p.stateNode;l===null?l=[m]:l.push(m)}if(km(p))break;p=p.return}var T=l;if(s==null)throw Error(a(160));switch(s.tag){case 27:var P=s.stateNode,Z=jm(n);cf(n,Z,P,T);break;case 5:var se=s.stateNode;s.flags&32&&(jr(se,""),s.flags&=-33);var pe=jm(n);cf(n,pe,se,T);break;case 3:case 4:var Ce=s.stateNode.containerInfo,ie=jm(n);Im(n,ie,Ce,T);break;default:throw Error(a(161))}}catch(fe){mn(n,n.return,fe)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function w1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;w1(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,Tl=!0,r.reset(),Tl=!1),n=n.sibling}}function cl(n,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)R1(r,n),r=r.sibling;else p1(r)}function R1(n,r){var s=n.alternate;if(s===null)Pm(n,!1);else switch(n.tag){case 3:if(Fm=aa=!1,u1(),cl(r,n),!aa&&!hf){if(n=na,n!==null)for(var l=0;l<n.length;l+=3){s=n[l];var p=n[l+1];dS(s,n[l+2]),s=s.ownerDocument.documentElement,s!==null&&s.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+p+")"})}n=r.containerInfo,n=n.nodeType===9?n.documentElement:n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName===""&&(n.style.viewTransitionName="none",n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),n.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Fm=!0}na=null;break;case 5:cl(r,n);break;case 4:l=aa,aa=!1,cl(r,n),aa&&(hf=!0),aa=l;break;case 22:n.memoizedState===null&&(s.memoizedState!==null?Pm(n,!1):cl(r,n));break;case 30:l=aa,p=u1(),aa=!1,cl(r,n),aa&&(n.flags|=4);var m=n.memoizedProps,T=n.stateNode;r=Ta(m,T),T=Ta(s.memoizedProps,T);var P=Oa(m.default,m.update);P==="none"?r=!1:(m=s.memoizedState,s.memoizedState=null,s=n.child,qr=0,r=Um(n,s,r,T,P,m,!0),qr!==(m===null?0:m.length)&&(n.flags|=32)),(n.flags&4)!==0&&r?(ml(n,n.memoizedProps.onUpdate),na=p):p!==null&&(p.push.apply(p,na),na=p),aa=(n.flags&32)!==0?!0:l;break;default:cl(r,n)}}function sa(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)m1(n,r.alternate,r),r=r.sibling}function ys(n,r){for(n=n.child;n!==null;){var s=n,l=r;switch(s.tag){case 0:case 11:case 14:case 15:ms(4,s,s.return),ys(s,l);break;case 1:br(s,s.return);var p=s.stateNode;typeof p.componentWillUnmount=="function"&&a1(s,s.return,p),ys(s,l);break;case 27:(l&2)!==0&&wS(s.stateNode,s.type,s.memoizedProps);case 5:br(s,s.return),s.tag!==5&&s.tag!==27||qc(s),ys(s,l);break;case 6:qc(s);break;case 26:br(s,s.return),p=s.stateNode,s.memoizedState!==null||p===null||pn||p.parentNode.removeChild(p),ys(s,l);break;case 22:s.memoizedState===null&&ys(s,l);break;case 30:br(s,s.return),ys(s,l);break;case 7:br(s,s.return);default:ys(s,l)}n=n.sibling}}function Fi(n,r,s){for(s=(r.subtreeFlags&8772)!==0?s:s&-2,r=r.child;r!==null;){var l=r.alternate,p=n,m=r,T=m.flags,P=(s&1)!==0;switch(m.tag){case 0:case 11:case 15:Fi(p,m,s),Kc(4,m);break;case 1:if(Fi(p,m,s),l=m,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(pe){mn(l,l.return,pe)}if(l=m,p=l.updateQueue,p!==null){var Z=l.stateNode;try{var se=p.shared.hiddenCallbacks;if(se!==null)for(p.shared.hiddenCallbacks=null,p=0;p<se.length;p++)Yx(se[p],Z)}catch(pe){mn(l,l.return,pe)}}P&&T&64&&i1(m),ta(m,m.return);break;case 27:(s&2)!==0&&l1(m);case 5:m.tag!==5&&m.tag!==27||s1(m),Fi(p,m,s),P&&l===null&&T&4&&Nm(m),ta(m,m.return);break;case 6:s1(m);break;case 26:Z=m.stateNode,m.memoizedState!==null||Z===null||or||O0(tu(Z.ownerDocument),m.type,Z),Fi(p,m,s),P&&l===null&&T&4&&Nm(m),ta(m,m.return);break;case 12:Fi(p,m,s);break;case 31:Fi(p,m,s),P&&T&4&&x1(p,m);break;case 13:Fi(p,m,s),P&&T&4&&S1(p,m);break;case 22:m.memoizedState===null&&Fi(p,m,s),ta(m,m.return);break;case 30:Fi(p,m,s),ta(m,m.return);break;case 7:ta(m,m.return);default:Fi(p,m,s)}r=r.sibling}}function Km(n,r){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&Nc(s))}function qm(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Nc(n))}function Ci(n,r,s,l){var p=(s&335544064)===s;if(r.subtreeFlags&(p?10262:10256))for(r=r.child;r!==null;)C1(n,r,s,l),r=r.sibling;else p&&h1(r)}function C1(n,r,s,l){var p=(s&335544064)===s;p&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&ff(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:Ci(n,r,s,l),m&2048&&Kc(9,r);break;case 1:Ci(n,r,s,l);break;case 3:Ci(n,r,s,l),p&&Fm&&(n=n.containerInfo,n=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,n.style.viewTransitionName==="root"&&(n.style.viewTransitionName=""),n=n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName==="none"&&(n.style.viewTransitionName="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&Nc(m)));break;case 12:if(m&2048){Ci(n,r,s,l),m=r.stateNode;try{var T=r.memoizedProps,P=T.id,Z=T.onPostCommit;typeof Z=="function"&&Z(P,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(se){mn(r,r.return,se)}}else Ci(n,r,s,l);break;case 31:Ci(n,r,s,l);break;case 13:Ci(n,r,s,l);break;case 23:break;case 22:T=r.stateNode,P=r.alternate,r.memoizedState!==null?(p&&P!==null&&P.memoizedState===null&&ff(P),T._visibility&2?Ci(n,r,s,l):Gc(n,r)):(p&&P!==null&&P.memoizedState!==null&&ff(r),T._visibility&2?Ci(n,r,s,l):(T._visibility|=2,ul(n,r,s,l,(r.subtreeFlags&10256)!==0||!1))),m&2048&&Km(P,r);break;case 24:Ci(n,r,s,l),m&2048&&qm(r.alternate,r);break;case 30:p&&(m=r.alternate,m!==null&&(ra(m.child,!0),ra(r.child,!0))),Ci(n,r,s,l);break;default:Ci(n,r,s,l)}}function ul(n,r,s,l,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,T=r,P=s,Z=l,se=T.flags;switch(T.tag){case 0:case 11:case 15:ul(m,T,P,Z,p),Kc(8,T);break;case 23:break;case 22:var pe=T.stateNode;T.memoizedState!==null?pe._visibility&2?ul(m,T,P,Z,p):Gc(m,T):(pe._visibility|=2,ul(m,T,P,Z,p)),p&&se&2048&&Km(T.alternate,T);break;case 24:ul(m,T,P,Z,p),p&&se&2048&&qm(T.alternate,T);break;default:ul(m,T,P,Z,p)}r=r.sibling}}function Gc(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=n,l=r,p=l.flags;switch(l.tag){case 22:Gc(s,l),p&2048&&Km(l.alternate,l);break;case 24:Gc(s,l),p&2048&&qm(l.alternate,l);break;default:Gc(s,l)}r=r.sibling}}var mo=8192;function yo(n,r,s){if(n.subtreeFlags&mo)for(n=n.child;n!==null;)T1(n,r,s),n=n.sibling}function T1(n,r,s){switch(n.tag){case 26:yo(n,r,s),n.flags&mo&&(n.memoizedState!==null?UD(s,Hi,n.memoizedState,n.memoizedProps):(n=n.stateNode,(r&335544128)===r&&jS(s,n)));break;case 5:yo(n,r,s),n.flags&mo&&(n=n.stateNode,(r&335544128)===r&&jS(s,n));break;case 3:case 4:var l=Hi;Hi=tu(n.stateNode.containerInfo),yo(n,r,s),Hi=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=mo,mo=16777216,yo(n,r,s),mo=l):yo(n,r,s));break;case 30:if((n.flags&mo)!==0&&(l=n.memoizedProps.name,l!=null&&l!=="auto")){var p=n.stateNode;p.paired=null,li===null&&(li=new Map),li.set(l,p)}yo(n,r,s);break;default:yo(n,r,s)}}function O1(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function $c(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];lr=l,k1(l,n)}O1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)A1(n),n=n.sibling}function A1(n){switch(n.tag){case 0:case 11:case 15:$c(n),n.flags&2048&&ms(9,n,n.return);break;case 3:$c(n);break;case 12:$c(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,mf(n)):$c(n);break;default:$c(n)}}function mf(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];lr=l,k1(l,n)}O1(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:ms(8,r,r.return),mf(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,mf(r));break;default:mf(r)}n=n.sibling}}function k1(n,r){for(;lr!==null;){var s=lr;switch(s.tag){case 0:case 11:case 15:ms(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Nc(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,lr=l;else e:for(s=n;lr!==null;){l=lr;var p=l.sibling,m=l.return;if(v1(l),l===s){lr=null;break e}if(p!==null){p.return=m,lr=p;break e}lr=m}}}var IN={getCacheForType:function(n){var r=mr(Qn),s=r.data.get(n);return s===void 0&&(s=n(),r.data.set(n,s)),s},cacheSignal:function(){return mr(Qn).controller.signal}},PN=typeof WeakMap=="function"?WeakMap:Map,cn=0,On=null,Yt=null,Zt=0,gn=0,ci=null,vs=!1,dl=!1,Ym=!1,La=0,Vn=0,bs=0,vo=0,yf=0,ui=0,fl=0,Qc=null,Gr=null,Gm=!1,vf=0,M1=0,bf=1/0,xf=null,xs=null,_n=0,Bi=null,bo=null,oa=0,$m=0,Qm=null,N1=null,hl=null,pl=null,gl=null,Xc=0,Sf=null;function di(){return(cn&2)!==0&&Zt!==0?Zt&-Zt:ge.T!==null?a0():Tn()}function D1(){if(ui===0)if((Zt&536870912)===0||Vt){var n=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),ui=n}else ui=536870912;return n=yr.current,n!==null&&(n.flags|=32),ui}function ml(n,r){if(r!=null){var s=n.stateNode,l=s.ref;l===null&&(l=s.ref=fS(Ta(n.memoizedProps,s))),pl===null&&(pl=[]),pl.push(r.bind(null,l))}}function $r(n,r,s){(n===On&&(gn===2||gn===9)||n.cancelPendingCommit!==null)&&(yl(n,0),Ss(n,Zt,ui,!1)),ft(n,s),((cn&2)===0||n!==On)&&(n===On&&((cn&2)===0&&(vo|=s),Vn===4&&Ss(n,Zt,ui,!1)),la(n))}function j1(n,r,s){if((cn&6)!==0)throw Error(a(327));var l=!s&&(r&127)===0&&(r&n.expiredLanes)===0||Xe(n,r),p=l?_N(n,r):Zm(n,r,!0),m=l;do{if(p===0){dl&&!l&&Ss(n,r,0,!1);break}else{if(s=n.current.alternate,m&&!LN(s)){p=Zm(n,r,!1),m=!1;continue}if(p===2){if(m=r,n.errorRecoveryDisabledLanes&m)var T=0;else T=n.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){r=T;e:{var P=n;p=Qc;var Z=P.current.memoizedState.isDehydrated;if(Z&&(yl(P,T).flags|=256),T=Zm(P,T,!1),T!==2&&T!==6){if(Ym&&!Z){P.errorRecoveryDisabledLanes|=m,vo|=m,p=4;break e}m=Gr,Gr=p,m!==null&&(Gr===null?Gr=m:Gr.push.apply(Gr,m))}p=T}if(m=!1,p!==2)continue}}if(p===1){yl(n,0),Ss(n,r,0,!0);break}e:{switch(l=n,m=p,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:Ss(l,r,ui,!vs);break e;case 2:Gr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=vf+300-St(),10<p)){if(Ss(l,r,ui,!vs),Ve(l,0,!0)!==0)break e;oa=r,l.timeoutHandle=m0(I1.bind(null,l,s,Gr,xf,Gm,r,ui,vo,fl,vs,m,"Throttled",-0,0),p);break e}I1(l,s,Gr,xf,Gm,r,ui,vo,fl,vs,m,null,-0,0)}}break}while(!0);la(n)}function I1(n,r,s,l,p,m,T,P,Z,se,pe,Ce,ie,fe){n.timeoutHandle=-1;var qe=r.subtreeFlags,rt=(m&335544064)===m;if(Ce=null,(rt||qe&8192||(qe&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ir},li=null,T1(r,m,Ce),rt&&(qe=Ce,rt=n.containerInfo,rt=(rt.nodeType===9?rt:rt.ownerDocument).__reactViewTransition,rt!=null&&(qe.count++,qe.waitingForViewTransition=!0,qe=iu.bind(qe),rt.finished.then(qe,qe))),qe=(m&62914560)===m?vf-St():(m&4194048)===m?M1-St():0,qe=HD(Ce,qe),qe!==null)){oa=m,n.cancelPendingCommit=qe(B1.bind(null,n,r,m,s,l,p,T,P,Z,se,pe,Ce,null,ie,fe)),Ss(n,m,T,!se);return}B1(n,r,m,s,l,p,T,P,Z,se,pe,Ce)}function LN(n){for(var r=n;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var p=s[l],m=p.getSnapshot;p=p.value;try{if(!si(m(),p))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ss(n,r,s,l){r=Qe(n,r),r&=~yf,r&=~vo,n.suspendedLanes|=r,n.pingedLanes&=~r,l&&(n.warmLanes|=r),l=n.expirationTimes;for(var p=r;0<p;){var m=31-et(p),T=1<<m;l[m]=-1,p&=~T}s!==0&&Ft(n,s,r)}function Ef(){return(cn&6)===0?(Zc(0),!1):!0}function Xm(){if(Yt!==null){if(gn===0)var n=Yt.return;else n=Yt,Ma=ao=null,im(n),rl=null,Ic=0,n=Yt;for(;n!==null;)r1(n.alternate,n),n=n.return;Yt=null}}function yl(n,r){var s=n.timeoutHandle;return s!==-1&&(n.timeoutHandle=-1,sD(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),oa=0,Xm(),On=n,Yt=s=Aa(n.current,null),Zt=r,gn=0,ci=null,vs=!1,dl=Xe(n,r),Ym=!1,fl=ui=yf=vo=bs=Vn=0,Gr=Qc=null,Gm=!1,La=Qe(n,r),kd(),s}function P1(n,r){It=null,ge.H=ef,r===nl||r===Hd?(r=Bx(),gn=3):r===qg?(r=Bx(),gn=4):gn=r===bm?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ci=r,Yt===null&&(Vn=1,tf(n,Si(r,n.current)))}function L1(){var n=yr.current;return n===null?!0:(Zt&4194048)===Zt?Tr===null:(Zt&62914560)===Zt||(Zt&536870912)!==0?n===Tr:!1}function z1(){var n=ge.H;return ge.H=ef,n===null?ef:n}function _1(){var n=ge.A;return ge.A=IN,n}function wf(){Vn=4,vs||(Zt&4194048)!==Zt&&yr.current!==null||(dl=!0),(bs&134217727)===0&&(vo&134217727)===0||On===null||Ss(On,Zt,ui,!1)}function Zm(n,r,s){var l=cn;cn|=2;var p=z1(),m=_1();(On!==n||Zt!==r)&&(xf=null,yl(n,r)),r=!1;var T=Vn;e:do try{if(gn!==0&&Yt!==null){var P=Yt,Z=ci;switch(gn){case 8:Xm(),T=6;break e;case 3:case 2:case 9:case 6:yr.current===null&&(r=!0);var se=gn;if(gn=0,ci=null,vl(n,P,Z,se),s&&dl){T=0;break e}break;default:se=gn,gn=0,ci=null,vl(n,P,Z,se)}}zN(),T=Vn;break}catch(pe){P1(n,pe)}while(!0);return r&&n.shellSuspendCounter++,Ma=ao=null,cn=l,ge.H=p,ge.A=m,Yt===null&&(On=null,Zt=0,kd()),T}function zN(){for(;Yt!==null;)U1(Yt)}function _N(n,r){var s=cn;cn|=2;var l=z1(),p=_1();On!==n||Zt!==r?(xf=null,bf=St()+500,yl(n,r)):dl=Xe(n,r);e:do try{if(gn!==0&&Yt!==null){r=Yt;var m=ci;t:switch(gn){case 1:gn=0,ci=null,vl(n,r,m,1);break;case 2:case 9:if(Hx(m)){gn=0,ci=null,H1(r);break}r=function(){gn!==2&&gn!==9||On!==n||(gn=7),la(n)},m.then(r,r);break e;case 3:gn=7;break e;case 4:gn=5;break e;case 7:Hx(m)?(gn=0,ci=null,H1(r)):(gn=0,ci=null,vl(n,r,m,7));break;case 5:var T=null;switch(Yt.tag){case 26:T=Yt.memoizedState;case 5:case 27:var P=Yt;if(T?NS(T):P.stateNode.complete){gn=0,ci=null;var Z=P.sibling;if(Z!==null)Yt=Z;else{var se=P.return;se!==null?(Yt=se,Rf(se)):Yt=null}break t}}gn=0,ci=null,vl(n,r,m,5);break;case 6:gn=0,ci=null,vl(n,r,m,6);break;case 8:Xm(),Vn=6;break e;default:throw Error(a(462))}}UN();break}catch(pe){P1(n,pe)}while(!0);return Ma=ao=null,ge.H=l,ge.A=p,cn=s,Yt!==null?0:(On=null,Zt=0,kd(),Vn)}function UN(){for(;Yt!==null&&!tn();)U1(Yt)}function U1(n){var r=t1(n.alternate,n,La);n.memoizedProps=n.pendingProps,r===null?Rf(n):Yt=r}function H1(n){var r=n,s=r.alternate;switch(r.tag){case 15:case 0:r=$2(s,r,r.pendingProps,r.type,void 0,Zt);break;case 11:r=$2(s,r,r.pendingProps,r.type.render,r.ref,Zt);break;case 5:im(r);var l=r;l===sr&&(Vt?(Pd(l),l.tag===5&&l.stateNode!=null&&(Mn=l.stateNode)):(Pd(l),Vt=!0));default:r1(s,r),r=Yt=kx(r,La),r=t1(s,r,La)}n.memoizedProps=n.pendingProps,r===null?Rf(n):Yt=r}function vl(n,r,s,l){Ma=ao=null,im(r),rl=null,Ic=0;var p=r.return;try{if(TN(n,p,r,s,Zt)){Vn=1,tf(n,Si(s,n.current)),Yt=null;return}}catch(m){if(p!==null)throw Yt=p,m;Vn=1,tf(n,Si(s,n.current)),Yt=null;return}r.flags&32768?(Vt||l===1?n=!0:dl||(Zt&536870912)!==0?n=!1:(vs=n=!0,(l===2||l===9||l===3||l===6)&&(l=yr.current,l!==null&&l.tag===13&&(l.flags|=16384))),F1(r,n)):Rf(r)}function Rf(n){var r=n;do{if((r.flags&32768)!==0){F1(r,vs);return}n=r.return;var s=MN(r.alternate,r,La);if(s!==null){Yt=s;return}if(r=r.sibling,r!==null){Yt=r;return}Yt=r=n}while(r!==null);Vn===0&&(Vn=5)}function F1(n,r){do{var s=NN(n.alternate,n);if(s!==null){s.flags&=32767,Yt=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(n=n.sibling,n!==null)){Yt=n;return}Yt=n=s}while(n!==null);Vn=6,Yt=null}function B1(n,r,s,l,p,m,T,P,Z,se,pe,Ce){n.cancelPendingCommit=null;do Cf();while(_n!==0);if((cn&6)!==0)throw Error(a(327));if(r!==null){if(r===n.current)throw Error(a(177));n===On&&(Yt=On=null,Zt=0),bo=r,Bi=n,oa=s,Qm=p,N1=l,HN(n,r,s,T,P,Z,Ce)}}function HN(n,r,s,l,p,m,T){var P=r.lanes|r.childLanes;if($m=P,P|=Dg,Kt(n,s,P,l,p,m),pl=null,(s&335544064)===s?(gl=pN(n),l=10262):(gl=null,l=10256),(r.subtreeFlags&l)!==0||(r.flags&l)!==0?(n.callbackNode=null,n.callbackPriority=0,YN(mt,function(){return t0(),null})):(n.callbackNode=null,n.callbackPriority=0),uf=!1,l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null,p=ue.p,ue.p=2,m=cn,cn|=4;try{DN(n,r,s)}finally{cn=m,ue.p=p,ge.T=l}}_n=1,uf?hl=fD(T,n.containerInfo,gl,Wm,Jm,BN,e0,t0,FN):(Wm(),Jm(),e0())}function FN(n){if(_n!==0){var r=Bi.onRecoverableError;r(n,{componentStack:null})}}function BN(){_n===3&&(_n=0,R1(bo,Bi),_n=4)}function Wm(){if(_n===1){_n=0;var n=Bi,r=bo,s=oa,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null;var p=ue.p;ue.p=2;var m=cn;cn|=4;try{Yc=hf=!1,E1(r,n,s),s=h0;var T=bx(n.containerInfo),P=s.focusedElem,Z=s.selectionRange;if(T!==P&&P&&P.ownerDocument&&vx(P.ownerDocument.documentElement,P)){if(Z!==null&&Og(P)){var se=Z.start,pe=Z.end;if(pe===void 0&&(pe=se),"selectionStart"in P)P.selectionStart=se,P.selectionEnd=Math.min(pe,P.value.length);else{var Ce=P.ownerDocument||document,ie=Ce&&Ce.defaultView||window;if(ie.getSelection){var fe=ie.getSelection(),qe=P.textContent.length,rt=Math.min(Z.start,qe),Pt=Z.end===void 0?rt:Math.min(Z.end,qe);!fe.extend&&rt>Pt&&(T=Pt,Pt=rt,rt=T);var ae=yx(P,rt),te=yx(P,Pt);if(ae&&te&&(fe.rangeCount!==1||fe.anchorNode!==ae.node||fe.anchorOffset!==ae.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ce=Ce.createRange();ce.setStart(ae.node,ae.offset),fe.removeAllRanges(),rt>Pt?(fe.addRange(ce),fe.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),fe.addRange(ce))}}}}for(Ce=[],fe=P;fe=fe.parentNode;)fe.nodeType===1&&Ce.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Ce.length;P++){var Re=Ce[P];Re.element.scrollLeft=Re.left,Re.element.scrollTop=Re.top}}Tl=!!f0,h0=f0=null}finally{cn=m,ue.p=p,ge.T=l}}n.current=r,_n=2}}function Jm(){if(_n===2){_n=0;var n=Bi,r=bo,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=ge.T,ge.T=null;var l=ue.p;ue.p=2;var p=cn;cn|=4;try{m1(n,r.alternate,r)}finally{cn=p,ue.p=l,ge.T=s}}_n=3}}function e0(){if(_n===4||_n===3){_n=0;var n=hl;hl=null,Je();var r=Bi,s=bo,l=oa,p=N1,m=(l&335544064)===l?10262:10256;if((s.subtreeFlags&m)!==0||(s.flags&m)!==0?_n=5:(_n=0,bo=Bi=null,V1(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(xs=null),Cn(l),s=s.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Ie,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=ge.T,m=ue.p,ue.p=2,ge.T=null;try{for(var T=r.onRecoverableError,P=0;P<p.length;P++){var Z=p[P];T(Z.value,{componentStack:Z.stack})}}finally{ge.T=s,ue.p=m}}if(p=pl,T=gl,gl=null,p!==null&&(pl=null,T===null&&(T=[]),n!==null))for(Z=0;Z<p.length;Z++)s=(0,p[Z])(T),s!==void 0&&n.finished.finally(s);(oa&3)!==0&&Cf(),la(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Sf?Xc++:(Xc=0,Sf=r):(Xc=0,Sf=null),Zc(0)}}function V1(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Nc(r)))}function Cf(){return hl!==null&&(hl.skipTransition(),hl=null),Wm(),Jm(),e0(),t0()}function t0(){if(_n!==5)return!1;var n=Bi,r=$m;$m=0;var s=Cn(oa),l=ge.T,p=ue.p;try{ue.p=32>s?32:s,ge.T=null,s=Qm,Qm=null;var m=Bi,T=oa;if(_n=0,bo=Bi=null,oa=0,(cn&6)!==0)throw Error(a(331));var P=cn;if(cn|=4,A1(m.current),C1(m,m.current,T,s),cn=P,Zc(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Ie,m)}catch{}return!0}finally{ue.p=p,ge.T=l,V1(n,r)}}function K1(n,r,s){r=Si(s,r),r=vm(n.stateNode,r,2),n=fs(n,r,2),n!==null&&(ft(n,2),la(n))}function mn(n,r,s){if(n.tag===3)K1(n,n,s);else for(;r!==null;){if(r.tag===3){K1(r,n,s);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(xs===null||!xs.has(l))){n=Si(s,n),s=H2(2),l=fs(r,s,2),l!==null&&(F2(s,l,r,n),ft(l,2),la(l));break}}r=r.return}}function n0(n,r,s){var l=n.pingCache;if(l===null){l=n.pingCache=new PN;var p=new Set;l.set(r,p)}else p=l.get(r),p===void 0&&(p=new Set,l.set(r,p));p.has(s)||(Ym=!0,p.add(s),n=VN.bind(null,n,r,s),r.then(n,n))}function VN(n,r,s){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,On===n&&(Zt&s)===s&&((Vn===4||Vn===3&&(Zt&62914560)===Zt&&300>St()-vf)&&(cn&2)===0?yl(n,0):yf|=s,fl===Zt&&(fl=0)),la(n)}function q1(n,r){r===0&&(r=tt()),n=no(n,r),n!==null&&(ft(n,r),la(n))}function KN(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),q1(n,s)}function qN(n,r){var s=0;switch(n.tag){case 31:case 13:var l=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(r),q1(n,s)}function YN(n,r){return en(n,r)}var bl=null,xl=null,r0=!1,Tf=!1,i0=!1,Es=0;function la(n){n!==xl&&n.next===null&&(xl===null?bl=xl=n:xl=xl.next=n),Tf=!0,r0||(r0=!0,$N())}function Zc(n,r){if(!i0&&Tf){i0=!0;do for(var s=!1,l=bl;l!==null;){if(n!==0){var p=l.pendingLanes;if(p===0)var m=0;else{var T=l.suspendedLanes,P=l.pingedLanes;m=(1<<31-et(42|n)+1)-1,m&=p&~(T&~P),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(s=!0,Q1(l,m))}else m=Zt,m=Ve(l,l===On?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Xe(l,m)||(s=!0,Q1(l,m));l=l.next}while(s);i0=!1}}function GN(){Y1()}function Y1(){Tf=r0=!1;var n=0;Es!==0&&aD()&&(n=Es);for(var r=St(),s=null,l=bl;l!==null;){var p=l.next,m=G1(l,r);m===0?(l.next=null,s===null?bl=p:s.next=p,p===null&&(xl=s)):(s=l,(n!==0||(m&3)!==0)&&(Tf=!0)),l=p}_n!==0&&_n!==5||Zc(n),Es!==0&&(Es=0)}function G1(n,r){for(var s=n.suspendedLanes,l=n.pingedLanes,p=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var T=31-et(m),P=1<<T,Z=p[T];Z===-1?((P&s)===0||(P&l)!==0)&&(p[T]=ot(P,r)):Z<=r&&(n.expiredLanes|=P),m&=~P}if(r=On,s=Zt,s=Ve(n,n===r?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,s===0||n===r&&(gn===2||gn===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&an(l),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||Xe(n,s)){if(r=s&-s,r===n.callbackPriority)return r;switch(l!==null&&an(l),Cn(s)){case 2:case 8:s=bt;break;case 32:s=mt;break;case 268435456:s=un;break;default:s=mt}return l=$1.bind(null,n),s=en(s,l),n.callbackPriority=r,n.callbackNode=s,r}return l!==null&&l!==null&&an(l),n.callbackPriority=2,n.callbackNode=null,2}function $1(n,r){if(_n!==0&&_n!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Cf()&&n.callbackNode!==s)return null;var l=Zt;return l=Ve(n,n===On?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(j1(n,l,r),G1(n,St()),n.callbackNode!=null&&n.callbackNode===s?$1.bind(null,n):null)}function Q1(n,r){if(Cf())return null;j1(n,r,!0)}function $N(){oD(function(){(cn&6)!==0?en(ht,GN):Y1()})}function a0(){if(Es===0){var n=lo;n===0&&(n=ne,ne<<=1,(ne&261888)===0&&(ne=256)),Es=n}return Es}function X1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:pr(n)}function QN(n,r,s,l,p){if(r==="submit"&&s&&s.stateNode===p){var m=X1((p[kn]||null).action),T=l.submitter;T&&(r=(r=T[kn]||null)?X1(r.formAction):T.getAttribute("formAction"),r!==null&&(m=r,T=null));var P=new Cd("action","action",null,l,p);n.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Es!==0){var Z=new FormData(p,T);hm(s,{pending:!0,data:Z,method:p.method,action:m},null,Z)}}else typeof m=="function"&&(P.preventDefault(),Z=new FormData(p,T),hm(s,{pending:!0,data:Z,method:p.method,action:m},m,Z))},currentTarget:p}]})}}for(var s0=0;s0<Ng.length;s0++){var o0=Ng[s0],XN=o0.toLowerCase(),ZN=o0[0].toUpperCase()+o0.slice(1);_i(XN,"on"+ZN)}_i(Ex,"onAnimationEnd"),_i(wx,"onAnimationIteration"),_i(Rx,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(sN,"onTransitionRun"),_i(oN,"onTransitionStart"),_i(lN,"onTransitionCancel"),_i(Cx,"onTransitionEnd"),xn("onMouseEnter",["mouseout","mouseover"]),xn("onMouseLeave",["mouseout","mouseover"]),xn("onPointerEnter",["pointerout","pointerover"]),xn("onPointerLeave",["pointerout","pointerover"]),Ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ht("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wc="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(" "),WN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wc));function Z1(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var l=n[s],p=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var T=l.length-1;0<=T;T--){var P=l[T],Z=P.instance,se=P.currentTarget;if(P=P.listener,Z!==m&&p.isPropagationStopped())break e;m=P,p.currentTarget=se;try{m(p)}catch(pe){Ad(pe)}p.currentTarget=null,m=Z}else for(T=0;T<l.length;T++){if(P=l[T],Z=P.instance,se=P.currentTarget,P=P.listener,Z!==m&&p.isPropagationStopped())break e;m=P,p.currentTarget=se;try{m(p)}catch(pe){Ad(pe)}p.currentTarget=null,m=Z}}}}function Gt(n,r){var s=r[wa];s===void 0&&(s=r[wa]=new Set);var l=n+"__bubble";s.has(l)||(W1(r,n,2,!1),s.add(l))}function l0(n,r,s){var l=0;r&&(l|=4),W1(s,n,l,r)}var Of="_reactListening"+Math.random().toString(36).slice(2);function c0(n){if(!n[Of]){n[Of]=!0,Ot.forEach(function(s){s!=="selectionchange"&&(WN.has(s)||l0(s,!1,n),l0(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Of]||(r[Of]=!0,l0("selectionchange",!1,r))}}function W1(n,r,s,l){switch(FS(r)){case 2:var p=KD;break;case 8:p=qD;break;default:p=k0}s=p.bind(null,r,s,n),p=void 0,!Js||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),l?p!==void 0?n.addEventListener(r,s,{capture:!0,passive:p}):n.addEventListener(r,s,!0):p!==void 0?n.addEventListener(r,s,{passive:p}):n.addEventListener(r,s,!1)}function u0(n,r,s,l,p){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var T=l.tag;if(T===3||T===4){var P=l.stateNode.containerInfo;if(P===p)break;if(T===4)for(T=l.return;T!==null;){var Z=T.tag;if((Z===3||Z===4)&&T.stateNode.containerInfo===p)return;T=T.return}for(;P!==null;){if(T=Fn(P),T===null)return;if(Z=T.tag,Z===5||Z===6||Z===26||Z===27){l=m=T;continue e}P=P.parentNode}}l=l.return}Ws(function(){var se=m,pe=Zs(s),Ce=[];e:{var ie=Tx.get(n);if(ie!==void 0){var fe=Cd,qe=n;switch(n){case"keypress":if(wd(s)===0)break e;case"keydown":case"keyup":fe=LM;break;case"focusin":qe="focus",fe=Sg;break;case"focusout":qe="blur",fe=Sg;break;case"beforeblur":case"afterblur":fe=Sg;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=tx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=RM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=FM;break;case Ex:case wx:case Rx:fe=OM;break;case Cx:fe=VM;break;case"scroll":case"scrollend":fe=EM;break;case"wheel":fe=qM;break;case"copy":case"cut":case"paste":fe=kM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=rx;break;case"submit":fe=UM;break;case"toggle":case"beforetoggle":fe=GM}var rt=(r&4)!==0,Pt=!rt&&(n==="scroll"||n==="scrollend"),ae=rt?ie!==null?ie+"Capture":null:ie;rt=[];for(var te=se,ce;te!==null;){var Re=te;if(ce=Re.stateNode,Re=Re.tag,Re!==5&&Re!==26&&Re!==27||ce===null||ae===null||(Re=Ca(te,ae),Re!=null&&rt.push(Jc(te,Re,ce))),Pt)break;te=te.return}0<rt.length&&(ie=new fe(ie,qe,null,s,pe),Ce.push({event:ie,listeners:rt}))}}if((r&7)===0){e:{if(fe=n==="mouseover"||n==="pointerover",ie=n==="mouseout"||n==="pointerout",fe&&s!==Xs&&(qe=s.relatedTarget||s.fromElement)&&(Fn(qe)||qe[jn]))break e;(ie||fe)&&(qe=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ie?(fe=s.relatedTarget||s.toElement,ie=se,fe=fe?Fn(fe):null,fe!==null&&(Pt=c(fe),rt=fe.tag,fe!==Pt||rt!==5&&rt!==27&&rt!==6)&&(fe=null)):(ie=null,fe=se),ie!==fe&&(rt=tx,Re="onMouseLeave",ae="onMouseEnter",te="mouse",(n==="pointerout"||n==="pointerover")&&(rt=rx,Re="onPointerLeave",ae="onPointerEnter",te="pointer"),Pt=ie==null?qe:he(ie),ce=fe==null?qe:he(fe),qe=new rt(Re,te+"leave",ie,s,pe),qe.target=Pt,qe.relatedTarget=ce,Re=null,Fn(pe)===se&&(rt=new rt(ae,te+"enter",fe,s,pe),rt.target=ce,rt.relatedTarget=Pt,Re=rt),Pt=Re,rt=ie&&fe?j(ie,fe,JN):null,ie!==null&&J1(Ce,qe,ie,rt,!1),fe!==null&&Pt!==null&&J1(Ce,Pt,fe,rt,!0)))}e:{if(ie=se?he(se):window,fe=ie.nodeName&&ie.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ie.type==="file")var We=dx;else if(cx(ie))if(fx)We=rN;else{We=tN;var Wt=eN}else fe=ie.nodeName,!fe||fe.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?se&&Qs(se.elementType)&&(We=dx):We=nN;if(We&&(We=We(n,se))){ux(Ce,We,s,pe);break e}Wt&&Wt(n,ie,se)}switch(Wt=se?he(se):window,n){case"focusin":(cx(Wt)||Wt.contentEditable==="true")&&($o=Wt,Ag=se,Ac=null);break;case"focusout":Ac=Ag=$o=null;break;case"mousedown":kg=!0;break;case"contextmenu":case"mouseup":case"dragend":kg=!1,xx(Ce,s,pe);break;case"selectionchange":if(aN)break;case"keydown":case"keyup":xx(Ce,s,pe)}var lt;if(wg)e:{switch(n){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else Go?ox(n,s)&&(xt="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(xt="onCompositionStart");xt&&(ix&&s.locale!=="ko"&&(Go||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&Go&&(lt=Jb()):(rs=pe,vg="value"in rs?rs.value:rs.textContent,Go=!0)),Wt=Af(se,xt),0<Wt.length&&(xt=new nx(xt,n,null,s,pe),Ce.push({event:xt,listeners:Wt}),lt?xt.data=lt:(lt=lx(s),lt!==null&&(xt.data=lt)))),(lt=QM?XM(n,s):ZM(n,s))&&(xt=Af(se,"onBeforeInput"),0<xt.length&&(Wt=new nx("onBeforeInput","beforeinput",null,s,pe),Ce.push({event:Wt,listeners:xt}),Wt.data=lt)),QN(Ce,n,se,s,pe)}Z1(Ce,r)})}function Jc(n,r,s){return{instance:n,listener:r,currentTarget:s}}function Af(n,r){for(var s=r+"Capture",l=[];n!==null;){var p=n,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=Ca(n,s),p!=null&&l.unshift(Jc(n,p,m)),p=Ca(n,r),p!=null&&l.push(Jc(n,p,m))),n.tag===3)return l;n=n.return}return[]}function JN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function J1(n,r,s,l,p){for(var m=r._reactName,T=[];s!==null&&s!==l;){var P=s,Z=P.alternate,se=P.stateNode;if(P=P.tag,Z!==null&&Z===l)break;P!==5&&P!==26&&P!==27||se===null||(Z=se,p?(se=Ca(s,m),se!=null&&T.unshift(Jc(s,se,Z))):p||(se=Ca(s,m),se!=null&&T.push(Jc(s,se,Z)))),s=s.return}T.length!==0&&n.push({event:r,listeners:T})}var eD=/\r\n?/g,tD=/\u0000|\uFFFD/g;function eS(n){return(typeof n=="string"?n:""+n).replace(eD,`
10
+ `).replace(tD,"")}function tS(n,r){return r=eS(r),eS(n)===r}function yn(n,r,s,l,p,m){switch(s){case"children":if(typeof l=="string")r==="body"||r==="textarea"&&l===""||jr(n,l);else if(typeof l=="number"||typeof l=="bigint")r!=="body"&&jr(n,""+l);else return;break;case"className":ni(n,"class",l);break;case"tabIndex":ni(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ni(n,s,l);break;case"style":ii(n,l,m);return;case"data":if(r!=="object"){ni(n,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||s!=="href")){n.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(s);break}l=pr(l),n.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(s,"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 m=="function"&&(s==="formAction"?(r!=="input"&&yn(n,r,"name",p.name,p,null),yn(n,r,"formEncType",p.formEncType,p,null),yn(n,r,"formMethod",p.formMethod,p,null),yn(n,r,"formTarget",p.formTarget,p,null)):(yn(n,r,"encType",p.encType,p,null),yn(n,r,"method",p.method,p,null),yn(n,r,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(s);break}l=pr(l),n.setAttribute(s,l);break;case"onClick":l!=null&&(n.onclick=Ir);return;case"onScroll":l!=null&&Gt("scroll",n);return;case"onScrollEnd":l!=null&&Gt("scrollend",n);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(s=l.__html,s!=null){if(p.children!=null)throw Error(a(60));m?.__html!==s&&(n.innerHTML=s)}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}s=pr(l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(s,l):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":l===!0?n.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(s,l):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(s,l):n.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(s):n.setAttribute(s,l);break;case"popover":Gt("beforetoggle",n),Gt("toggle",n),zn(n,"popover",l);break;case"xlinkActuate":Gn(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zn(n,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")s=bc.get(s)||s,zn(n,s,l);else return}gt=!0}function d0(n,r,s,l,p,m){switch(s){case"style":ii(n,l,m);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(s=l.__html,s!=null){if(p.children!=null)throw Error(a(60));m?.__html!==s&&(n.innerHTML=s)}}break;case"children":if(typeof l=="string")jr(n,l);else if(typeof l=="number"||typeof l=="bigint")jr(n,""+l);else return;break;case"onScroll":l!=null&&Gt("scroll",n);return;case"onScrollEnd":l!=null&&Gt("scrollend",n);return;case"onClick":l!=null&&(n.onclick=Ir);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!wt.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),m=s.slice(2,p?s.length-7:void 0),r=n[kn]||null,r=r!=null?r[s]:null,typeof r=="function"&&n.removeEventListener(m,r,p),typeof l=="function")){typeof r!="function"&&r!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(m,l,p);break e}gt=!0,s in n?n[s]=l:l===!0?n.setAttribute(s,""):zn(n,s,l)}return}gt=!0}function xr(n,r,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Gt("error",n),Gt("load",n);var l=!1,p=!1,m;for(m in s)if(s.hasOwnProperty(m)){var T=s[m];if(T!=null)switch(m){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:yn(n,r,m,T,s,null)}}p&&yn(n,r,"srcSet",s.srcSet,s,null),l&&yn(n,r,"src",s.src,s,null);return;case"input":Gt("invalid",n);var P=m=T=p=null,Z=null,se=null;for(l in s)if(s.hasOwnProperty(l)){var pe=s[l];if(pe!=null)switch(l){case"name":p=pe;break;case"type":T=pe;break;case"checked":Z=pe;break;case"defaultChecked":se=pe;break;case"value":m=pe;break;case"defaultValue":P=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,r));break;default:yn(n,r,l,pe,s,null)}}ts(n,m,P,Z,se,T,p,!1);return;case"select":Gt("invalid",n),l=T=m=null;for(p in s)if(s.hasOwnProperty(p)&&(P=s[p],P!=null))switch(p){case"value":m=P;break;case"defaultValue":T=P;break;case"multiple":l=P;default:yn(n,r,p,P,s,null)}r=m,s=T,n.multiple=!!l,r!=null?Vr(n,!!l,r,!1):s!=null&&Vr(n,!!l,s,!0);return;case"textarea":Gt("invalid",n),m=p=l=null;for(T in s)if(s.hasOwnProperty(T)&&(P=s[T],P!=null))switch(T){case"value":l=P;break;case"defaultValue":p=P;break;case"children":m=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(91));break;default:yn(n,r,T,P,s,null)}ri(n,l,p,m);return;case"option":for(Z in s)s.hasOwnProperty(Z)&&(l=s[Z],l!=null)&&(Z==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":yn(n,r,Z,l,s,null));return;case"dialog":Gt("beforetoggle",n),Gt("toggle",n),Gt("cancel",n),Gt("close",n);break;case"iframe":case"object":Gt("load",n);break;case"video":case"audio":for(l=0;l<Wc.length;l++)Gt(Wc[l],n);break;case"image":Gt("error",n),Gt("load",n);break;case"details":Gt("toggle",n);break;case"embed":case"source":case"link":Gt("error",n),Gt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in s)if(s.hasOwnProperty(se)&&(l=s[se],l!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:yn(n,r,se,l,s,null)}return;default:if(Qs(r)){for(pe in s)s.hasOwnProperty(pe)&&(l=s[pe],l!==void 0&&d0(n,r,pe,l,s,void 0));return}}for(P in s)s.hasOwnProperty(P)&&(l=s[P],l!=null&&yn(n,r,P,l,s,null))}var nD={};function rD(n,r,s,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,T=null,P=null,Z=null,se=null,pe=null;for(fe in s){var Ce=s[fe];if(s.hasOwnProperty(fe)&&Ce!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Z=Ce;default:l.hasOwnProperty(fe)||yn(n,r,fe,null,l,Ce)}}for(var ie in l){var fe=l[ie];if(Ce=s[ie],l.hasOwnProperty(ie)&&(fe!=null||Ce!=null))switch(ie){case"type":fe!==Ce&&(gt=!0),m=fe;break;case"name":fe!==Ce&&(gt=!0),p=fe;break;case"checked":fe!==Ce&&(gt=!0),se=fe;break;case"defaultChecked":fe!==Ce&&(gt=!0),pe=fe;break;case"value":fe!==Ce&&(gt=!0),T=fe;break;case"defaultValue":fe!==Ce&&(gt=!0),P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,r));break;default:fe!==Ce&&yn(n,r,ie,fe,l,Ce)}}Cr(n,T,P,Z,se,pe,m,p);return;case"select":fe=T=P=ie=null;for(m in s)if(Z=s[m],s.hasOwnProperty(m)&&Z!=null)switch(m){case"value":break;case"multiple":fe=Z;default:l.hasOwnProperty(m)||yn(n,r,m,null,l,Z)}for(p in l)if(m=l[p],Z=s[p],l.hasOwnProperty(p)&&(m!=null||Z!=null))switch(p){case"value":m!==Z&&(gt=!0),ie=m;break;case"defaultValue":m!==Z&&(gt=!0),P=m;break;case"multiple":m!==Z&&(gt=!0),T=m;default:m!==Z&&yn(n,r,p,m,l,Z)}r=P,s=T,l=fe,ie!=null?Vr(n,!!s,ie,!1):!!l!=!!s&&(r!=null?Vr(n,!!s,r,!0):Vr(n,!!s,s?[]:"",!1));return;case"textarea":fe=ie=null;for(P in s)if(p=s[P],s.hasOwnProperty(P)&&p!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:yn(n,r,P,null,l,p)}for(T in l)if(p=l[T],m=s[T],l.hasOwnProperty(T)&&(p!=null||m!=null))switch(T){case"value":p!==m&&(gt=!0),ie=p;break;case"defaultValue":p!==m&&(gt=!0),fe=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==m&&yn(n,r,T,p,l,m)}Yo(n,ie,fe);return;case"option":for(var qe in s)ie=s[qe],s.hasOwnProperty(qe)&&ie!=null&&!l.hasOwnProperty(qe)&&(qe==="selected"?n.selected=!1:yn(n,r,qe,null,l,ie));for(Z in l)ie=l[Z],fe=s[Z],l.hasOwnProperty(Z)&&ie!==fe&&(ie!=null||fe!=null)&&(Z==="selected"?(ie!==fe&&(gt=!0),n.selected=ie&&typeof ie!="function"&&typeof ie!="symbol"):yn(n,r,Z,ie,l,fe));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 rt in s)ie=s[rt],s.hasOwnProperty(rt)&&ie!=null&&!l.hasOwnProperty(rt)&&yn(n,r,rt,null,l,ie);for(se in l)if(ie=l[se],fe=s[se],l.hasOwnProperty(se)&&ie!==fe&&(ie!=null||fe!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:yn(n,r,se,ie,l,fe)}return;default:if(Qs(r)){for(var Pt in s)ie=s[Pt],s.hasOwnProperty(Pt)&&ie!==void 0&&!l.hasOwnProperty(Pt)&&d0(n,r,Pt,void 0,l,ie);for(pe in l)ie=l[pe],fe=s[pe],!l.hasOwnProperty(pe)||ie===fe||ie===void 0&&fe===void 0||d0(n,r,pe,ie,l,fe);return}}for(var ae in s)ie=s[ae],s.hasOwnProperty(ae)&&ie!=null&&!l.hasOwnProperty(ae)&&yn(n,r,ae,null,l,ie);for(Ce in l)ie=l[Ce],fe=s[Ce],!l.hasOwnProperty(Ce)||ie===fe||ie==null&&fe==null||yn(n,r,Ce,ie,l,fe)}function nS(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iD(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var p=s[l],m=p.transferSize,T=p.initiatorType,P=p.duration;if(m&&P&&nS(T)){for(T=0,P=p.responseEnd,l+=1;l<s.length;l++){var Z=s[l],se=Z.startTime;if(se>P)break;var pe=Z.transferSize,Ce=Z.initiatorType;pe&&nS(Ce)&&(Z=Z.responseEnd,T+=pe*(Z<P?1:(P-se)/(Z-se)))}if(--l,r+=8*(m+T)/(p.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var f0=null,h0=null;function eu(n){return n.nodeType===9?n:n.ownerDocument}function rS(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function iS(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function aS(n,r,s,l){return s=eu(s).createElement(n),s[fn]=l,s[kn]=r,xr(s,n,r),Se(s),s}function p0(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var g0=null;function aD(){var n=window.event;return n&&n.type==="popstate"?n===g0?!1:(g0=n,!0):(g0=null,!1)}var m0=typeof setTimeout=="function"?setTimeout:void 0,sD=typeof clearTimeout=="function"?clearTimeout:void 0,sS=typeof Promise=="function"?Promise:void 0,oS=typeof requestAnimationFrame=="function"?requestAnimationFrame:m0,oD=typeof queueMicrotask=="function"?queueMicrotask:typeof sS<"u"?function(n){return sS.resolve(null).then(n).catch(lD)}:m0;function lD(n){setTimeout(function(){throw n})}function ws(n){return n==="head"}function lS(n,r){var s=r,l=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(l===0){n.removeChild(p),Ol(r);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")R0(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,R0(s);for(var m=s.firstChild;m;){var T=m.nextSibling,P=m.nodeName;m[vi]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&m.rel.toLowerCase()==="stylesheet"||s.removeChild(m),m=T}}else s==="body"&&R0(n.ownerDocument.body);s=p}while(s);Ol(r)}function cS(n,r){var s=n;n=0;do{var l=s.nextSibling;if(s.nodeType===1?r?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(r?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=l}while(s)}function uS(n,r,s){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,n.style.viewTransitionName=r,s!=null&&(n.style.viewTransitionClass=s),s=getComputedStyle(n),s.display==="inline"){if(r=n.getClientRects(),r.length===1)var l=1;else for(var p=l=0;p<r.length;p++){var m=r[p];0<m.width&&0<m.height&&l++}l===1&&(n=n.style,n.display=r.length===1?"inline-block":"block",n.marginTop="-"+s.paddingTop,n.marginBottom="-"+s.paddingBottom)}}function dS(n,r){n=n.style,r=r.style;var s=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;n.viewTransitionName=s==null||typeof s=="boolean"?"":(""+s).trim(),s=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,n.viewTransitionClass=s==null||typeof s=="boolean"?"":(""+s).trim(),n.display==="inline-block"&&(r==null?n.display=n.margin="":(s=r.display,n.display=s==null||typeof s=="boolean"?"":s,s=r.margin,s!=null?n.margin=s:(s=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],n.marginTop=s==null||typeof s=="boolean"?"":s,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],n.marginBottom=r==null||typeof r=="boolean"?"":r)))}function cD(n,r,s){return s=s.ownerDocument.defaultView,{rect:n,abs:r.position==="absolute"||r.position==="fixed",clip:r.clipPath!=="none"||r.overflow!=="visible"||r.filter!=="none"||r.mask!=="none"||r.mask!=="none"||r.borderRadius!=="0px",view:0<=n.bottom&&0<=n.right&&n.top<=s.innerHeight&&n.left<=s.innerWidth}}function y0(n){var r=n.getBoundingClientRect(),s=getComputedStyle(n);return cD(r,s,n)}function uD(n){return n.documentElement.clientHeight}function dD(n){this.addEventListener("load",n),this.addEventListener("error",n)}function fD(n,r,s,l,p,m,T,P,Z){var se=r.nodeType===9?r:r.ownerDocument;try{var pe=se.startViewTransition({update:function(){var ie=se.defaultView,fe=ie.navigation&&ie.navigation.transition,qe=se.fonts.status;l();var rt=[];if(qe==="loaded"&&(uD(se),se.fonts.status==="loading"&&rt.push(se.fonts.ready)),qe=rt.length,n!==null)for(var Pt=n.suspenseyImages,ae=0,te=0;te<Pt.length;te++){var ce=Pt[te];if(!ce.complete){var Re=ce.getBoundingClientRect();if(0<Re.bottom&&0<Re.right&&Re.top<ie.innerHeight&&Re.left<ie.innerWidth){if(ae+=DS(ce),ae>Nf){rt.length=qe;break}ce=new Promise(dD.bind(ce)),rt.push(ce)}}}if(0<rt.length)return ie=Promise.race([Promise.all(rt),new Promise(function(We){return setTimeout(We,500)})]).then(p,p),(fe?Promise.allSettled([fe.finished,ie]):ie).then(m,m);if(p(),fe)return fe.finished.then(m,m);m()},types:s});se.__reactViewTransition=pe;var Ce=[];return pe.ready.then(function(){for(var ie=se.documentElement.getAnimations({subtree:!0}),fe=0;fe<ie.length;fe++){var qe=ie[fe],rt=qe.effect,Pt=rt.pseudoElement;if(Pt!=null&&Pt.startsWith("::view-transition")){Ce.push(qe),qe=rt.getKeyframes();for(var ae=Pt=void 0,te=!0,ce=0;ce<qe.length;ce++){var Re=qe[ce],We=Re.width;if(Pt===void 0)Pt=We;else if(Pt!==We){te=!1;break}if(We=Re.height,ae===void 0)ae=We;else if(ae!==We){te=!1;break}delete Re.width,delete Re.height,Re.transform==="none"&&delete Re.transform}te&&Pt!==void 0&&ae!==void 0&&(rt.setKeyframes(qe),te=getComputedStyle(rt.target,rt.pseudoElement),te.width!==Pt||te.height!==ae)&&(te=qe[0],te.width=Pt,te.height=ae,te=qe[qe.length-1],te.width=Pt,te.height=ae,rt.setKeyframes(qe))}}T()},function(ie){se.__reactViewTransition===pe&&(se.__reactViewTransition=null);try{typeof ie=="object"&&ie!==null&&ie.name==="InvalidStateError"&&(ie.message==="View transition was skipped because document visibility state is hidden."||ie.message==="Skipping view transition because document visibility state has become hidden."||ie.message==="Skipping view transition because viewport size changed."||ie.message==="Transition was aborted because of invalid state")&&(ie=null),ie!==null&&Z(ie)}finally{l(),p(),T()}}),pe.finished.finally(function(){for(var ie=0;ie<Ce.length;ie++)Ce[ie].cancel();se.__reactViewTransition===pe&&(se.__reactViewTransition=null),P()}),pe}catch{return l(),p(),T(),null}}function xo(n,r){this._scope=document.documentElement,this._selector="::view-transition-"+n+"("+r+")"}xo.prototype.animate=function(n,r){return r=typeof r=="number"?{duration:r}:D({},r),r.pseudoElement=this._selector,this._scope.animate(n,r)},xo.prototype.getAnimations=function(){for(var n=this._scope,r=this._selector,s=n.getAnimations({subtree:!0}),l=[],p=0;p<s.length;p++){var m=s[p].effect;m!==null&&m.target===n&&m.pseudoElement===r&&l.push(s[p])}return l},xo.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function fS(n){return{name:n,group:new xo("group",n),imagePair:new xo("image-pair",n),old:new xo("old",n),new:new xo("new",n)}}function fi(n){this._fragmentFiber=n,this._observers=this._eventListeners=null}fi.prototype.addEventListener=function(n,r,s){var l=null,p=null;if(!(s!=null&&typeof s!="boolean"&&(l=s.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(pS(m,n,r,s)===-1){var T=this,P=r;s!=null&&typeof s!="boolean"&&s.once===!0&&(P=function(Z){T.removeEventListener(n,r,s),typeof r=="function"?r.call(this,Z):r.handleEvent(Z)}),l!==null&&(p=T.removeEventListener.bind(T,n,r,s),l.addEventListener("abort",p,{once:!0}),p=l.removeEventListener.bind(l,"abort",p)),l=Sl(s),m.push({type:n,listener:r,optionsOrUseCapture:s,attachedListener:P,cleanup:p}),h(this._fragmentFiber.child,!1,hD,n,P,l)}this._eventListeners=m}};function hD(n,r,s,l){return w(n).addEventListener(r,s,l),!1}fi.prototype.removeEventListener=function(n,r,s){var l=this._eventListeners;if(l!==null&&(r=pS(l,n,r,s),r!==-1)){var p=l[r];s=p.attachedListener;var m=p.cleanup;p=Sl(p.optionsOrUseCapture),h(this._fragmentFiber.child,!1,pD,n,s,p),l.splice(r,1),m!==null&&m()}};function pD(n,r,s,l){return w(n).removeEventListener(r,s,l),!1}function Sl(n){return n!=null&&typeof n!="boolean"&&(n.once===!0||n.signal instanceof AbortSignal)?{capture:n.capture,passive:n.passive}:n}function hS(n){return n==null?"c=0":typeof n=="boolean"?"c="+(n?"1":"0"):"c="+(n.capture?"1":"0")}function pS(n,r,s,l){if(n.length===0)return-1;l=hS(l);for(var p=0;p<n.length;p++){var m=n[p];if(m.type===r&&m.listener===s&&hS(m.optionsOrUseCapture)===l)return p}return-1}fi.prototype.dispatchEvent=function(n){var r=x(this._fragmentFiber);if(r===null)return!0;r=w(r);var s=this._eventListeners;if(s!==null&&0<s.length||!n.bubbles){var l=r.nodeType===9?r.createComment(""):document.createTextNode("");if(s)for(var p=0;p<s.length;p++){var m=s[p];l.addEventListener(m.type,m.attachedListener,Sl(m.optionsOrUseCapture))}if(r.appendChild(l),n=l.dispatchEvent(n),s)for(p=0;p<s.length;p++)m=s[p],l.removeEventListener(m.type,m.attachedListener,Sl(m.optionsOrUseCapture));return r.removeChild(l),n}return r.dispatchEvent(n)},fi.prototype.focus=function(n){h(this._fragmentFiber.child,!0,gS,n,void 0,void 0)};function gS(n,r){return n.tag===6?!1:(n=w(n),TD(n,r))}fi.prototype.focusLast=function(n){var r=[];h(this._fragmentFiber.child,!0,v0,r,void 0,void 0);for(var s=r.length-1;0<=s&&!gS(r[s],n);s--);};function v0(n,r){return r.push(n),!1}fi.prototype.blur=function(){var n=x(this._fragmentFiber);n!==null&&(n=w(n),n=eu(n).activeElement,n!==null&&h(this._fragmentFiber.child,!1,gD,n,void 0,void 0))};function gD(n,r){return n.tag===6?!1:(n=w(n),n===r||n.contains(r)?(r.blur(),!0):!1)}fi.prototype.observeUsing=function(n){this._observers===null&&(this._observers=new Set),this._observers.add(n),h(this._fragmentFiber.child,!1,mD,n,void 0,void 0)};function mD(n,r){return n.tag===6||(n=w(n),r.observe(n)),!1}fi.prototype.unobserveUsing=function(n){var r=this._observers;if(r!==null&&r.has(n)){r.delete(n),h(this._fragmentFiber.child,!1,yD,n,void 0,void 0);for(var s=r=0;s<Vi.length;s++){var l=Vi[s];l.fragmentInstance===this&&l.observer===n?n.unobserve(l.instance):Vi[r++]=l}Vi.length=r}};function yD(n,r){return n.tag===6||(n=w(n),r.unobserve(n)),!1}var Vi=[],b0=!1;function vD(n,r,s){Vi.push({fragmentInstance:n,observer:r,instance:s}),b0||(b0=!0,OD(function(){b0=!1;var l=Vi;Vi=[];for(var p=0;p<l.length;p++){var m=l[p];m.observer.unobserve(m.instance)}}))}fi.prototype.getClientRects=function(){var n=[];return h(this._fragmentFiber.child,!1,bD,n,void 0,void 0),n};function bD(n,r){if(n.tag===6){n=n.stateNode;var s=n.ownerDocument.createRange();s.selectNodeContents(n),r.push.apply(r,s.getClientRects())}else n=w(n),r.push.apply(r,n.getClientRects());return!1}fi.prototype.getRootNode=function(n){var r=x(this._fragmentFiber);return r===null?this:w(r).getRootNode(n)},fi.prototype.compareDocumentPosition=function(n){var r=x(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var s=[];h(this._fragmentFiber.child,!1,v0,s,void 0,void 0);var l=w(r);if(s.length===0){if(s=l,S(this._fragmentFiber)){e:{for(r=this._fragmentFiber.return;r!==null;){if(r.tag===4){r=r.stateNode.containerInfo;break e}if(r.tag===3||r.tag===5||r.tag===27)break;r=r.return}r=null}r!=null&&(s=r)}r=this._fragmentFiber;var p=l=s.compareDocumentPosition(n);return s===n?p=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(s=E(r)[1],s===null?p=Node.DOCUMENT_POSITION_PRECEDING:(n=w(s).compareDocumentPosition(n),p=n===0||n&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),p|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=w(s[0]),p=w(s[s.length-1]);var m=S(this._fragmentFiber)?r.parentElement:l;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=m.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY;var T=r.compareDocumentPosition(n),P=p.compareDocumentPosition(n),Z=T&Node.DOCUMENT_POSITION_CONTAINED_BY||P&Node.DOCUMENT_POSITION_CONTAINED_BY;return P=l&&m&&T&Node.DOCUMENT_POSITION_FOLLOWING&&P&Node.DOCUMENT_POSITION_PRECEDING,r=l&&r===n||m&&p===n||Z||P?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&r===n||!m&&p===n?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:T,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||xD(r,this._fragmentFiber,s[0],s[s.length-1],n)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function xD(n,r,s,l,p){var m=Fn(p);if(n&Node.DOCUMENT_POSITION_CONTAINED_BY){if(s=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){s=!0;break e}m=m.return}s=!1}return s}if(n&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=p.ownerDocument,p===m||p===m.documentElement||p===m.body;e:{for(m=r,r=x(r);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==r&&m.alternate!==r)){m=!0;break e}m=m.return}m=!1}return m}return n&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===s)&&(r=j(s,m,N),r===null?r=!1:(h(r,!0,A,m,s),m=R,R=null,r=m!==null)),r):n&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===l)&&(r=j(l,m,N),r===null?r=!1:(h(r,!0,k,m,l),m=R,O=R=null,r=m!==null)),r):!1}function mS(n,r){var s=n.ownerDocument.createRange();s.selectNodeContents(n),n=s.getBoundingClientRect(),window.scrollTo(window.scrollX+n.left,r?window.scrollY+n.top:window.scrollY+n.bottom-window.innerHeight)}fi.prototype.scrollIntoView=function(n){if(typeof n=="object")throw Error(a(566));var r=[];h(this._fragmentFiber.child,!1,v0,r,void 0,void 0);var s=n!==!1;if(r.length===0){var l=E(this._fragmentFiber);if(l=s?l[1]||l[0]||x(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){n=w(l),mS(n,s);return}if(l=w(l),l.nodeType!==9){if(l.nodeType===11){s="host"in l?l.host:null,s!==null&&s.scrollIntoView(n);return}l.scrollIntoView(n)}}for(l=s?r.length-1:0;l!==(s?-1:r.length);){var p=r[l];p.tag===6?(p=w(p),mS(p,s)):w(p).scrollIntoView(n),l+=s?-1:1}};function SD(n,r){return n=w(n),yS(n,r),!1}function yS(n,r){n.reactFragments==null&&(n.reactFragments=new Set),n.reactFragments.add(r)}function vS(n,r){var s=r._eventListeners;if(s!==null)for(var l=0;l<s.length;l++){var p=s[l];n.addEventListener(p.type,p.attachedListener,Sl(p.optionsOrUseCapture))}n.nodeType!==3&&(s=r._observers,s!==null&&s.forEach(function(m){for(var T=0,P=0;P<Vi.length;P++){var Z=Vi[P];(Z.fragmentInstance!==r||Z.observer!==m||Z.instance!==n)&&(Vi[T++]=Z)}Vi.length=T,m.observe(n)}),yS(n,r))}function ED(n,r){var s=r._eventListeners;if(s!==null)for(var l=0;l<s.length;l++){var p=s[l];n.removeEventListener(p.type,p.attachedListener,Sl(p.optionsOrUseCapture))}n.nodeType!==3&&(s=r._observers,s!==null&&s.forEach(function(m){typeof m.rootMargin=="string"?vD(r,m,n):m.unobserve(n)}),n.reactFragments!=null&&n.reactFragments.delete(r))}function x0(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":x0(s),qn(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function wD(n,r,s,l){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[vi])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=Ti(n.nextSibling),n===null)break}return null}function RD(n,r,s){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Ti(n.nextSibling),n===null))return null;return n}function bS(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Ti(n.nextSibling),n===null))return null;return n}function S0(n){return n.data==="$?"||n.data==="$~"}function E0(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function CD(n,r){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||s.readyState!=="loading")r();else{var l=function(){r(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function Ti(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var w0=null;function xS(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(r===0)return Ti(n.nextSibling);r--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||r++}n=n.nextSibling}return null}function SS(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(r===0)return n;r--}else s!=="/$"&&s!=="/&"||r++}n=n.previousSibling}return null}function TD(n,r){function s(){l=!0}if(n.ownerDocument.activeElement===n)return!0;var l=!1;try{n.ownerDocument.addEventListener("focus",s,!0),(n.focus||HTMLElement.prototype.focus).call(n,r)}finally{n.ownerDocument.removeEventListener("focus",s,!0)}return l}function OD(n){oS(function(){oS(function(r){return n(r)})})}function ES(n,r,s){switch(r=eu(s),n){case"html":if(n=r.documentElement,!n)throw Error(a(452));return n;case"head":if(n=r.head,!n)throw Error(a(453));return n;case"body":if(n=r.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function wS(n,r,s){for(var l in s){var p=s[l];s.hasOwnProperty(l)&&p!=null&&yn(n,r,l,null,nD,p)}s.dangerouslySetInnerHTML!=null&&(n.textContent=""),n.onclick===Ir&&(n.onclick=null),qn(n)}function R0(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);qn(n)}var Oi=new Map,RS=new Set;function tu(n){if(typeof n.getRootNode=="function"){var r=n.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return n.nodeType===9?n:n.ownerDocument}var za=ue.d;ue.d={f:AD,r:kD,D:MD,C:ND,L:DD,m:jD,X:PD,S:ID,M:LD};function AD(){var n=za.f(),r=Ef();return n||r}function kD(n){var r=hr(n);r!==null&&r.tag===5&&r.type==="form"?T2(r):za.r(n)}var El=typeof document>"u"?null:document;function CS(n,r,s){var l=El;if(l&&typeof r=="string"&&r){var p=Dn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),RS.has(p)||(RS.add(p),n={rel:n,crossOrigin:s,href:r},l.querySelector(p)===null&&(r=l.createElement("link"),xr(r,"link",n),Se(r),l.head.appendChild(r)))}}function MD(n){za.D(n),CS("dns-prefetch",n,null)}function ND(n,r){za.C(n,r),CS("preconnect",n,r)}function DD(n,r,s){za.L(n,r,s);var l=El;if(l&&n&&r){var p='link[rel="preload"][as="'+Dn(r)+'"]';r==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Dn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Dn(s.imageSizes)+'"]')):p+='[href="'+Dn(n)+'"]';var m=p;switch(r){case"style":m=wl(n);break;case"script":m=Rl(n)}if(!(Oi.has(m)||(n=D({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:n,as:r},s),Oi.set(m,n),l.querySelector(p)!==null||r==="style"&&l.querySelector(nu(m))||r==="script"&&l.querySelector(ru(m))))){var T=l.createElement("link");xr(T,"link",n),r==="style"&&(T[zt]=!0,T.onload=T.onerror=function(){nt(T)}),Se(T),l.head.appendChild(T)}}}function jD(n,r){za.m(n,r);var s=El;if(s&&n){var l=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Dn(l)+'"][href="'+Dn(n)+'"]',m=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Rl(n)}if(!Oi.has(m)&&(n=D({rel:"modulepreload",href:n},r),Oi.set(m,n),s.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ru(m)))return}l=s.createElement("link"),xr(l,"link",n),Se(l),s.head.appendChild(l)}}}function ID(n,r,s){za.S(n,r,s);var l=El;if(l&&n){var p=ke(l).hoistableStyles,m=wl(n);r=r||"default";var T=p.get(m);if(!T){var P={loading:0,preload:null};if(T=l.querySelector(nu(m)))P.loading=5;else{n=D({rel:"stylesheet",href:n,"data-precedence":r},s),(s=Oi.get(m))&&C0(n,s);var Z=T=l.createElement("link");Se(Z),xr(Z,"link",n),Z._p=new Promise(function(se,pe){Z.onload=se,Z.onerror=pe}),Z.addEventListener("load",function(){P.loading|=1}),Z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,kf(T,r,l)}T={type:"stylesheet",instance:T,count:1,state:P},p.set(m,T)}}}function PD(n,r){za.X(n,r);var s=El;if(s&&n){var l=ke(s).hoistableScripts,p=Rl(n),m=l.get(p);m||(m=s.querySelector(ru(p)),m||(n=D({src:n,async:!0},r),(r=Oi.get(p))&&T0(n,r),m=s.createElement("script"),Se(m),xr(m,"link",n),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(p,m))}}function LD(n,r){za.M(n,r);var s=El;if(s&&n){var l=ke(s).hoistableScripts,p=Rl(n),m=l.get(p);m||(m=s.querySelector(ru(p)),m||(n=D({src:n,async:!0,type:"module"},r),(r=Oi.get(p))&&T0(n,r),m=s.createElement("script"),Se(m),xr(m,"link",n),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(p,m))}}function TS(n,r,s,l){var p=(p=be.current)?tu(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(s=wl(s.href),r=ke(p).hoistableStyles,l=r.get(s),l||(l={type:"style",instance:null,count:0,state:null},r.set(s,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=wl(s.href);var m=ke(p).hoistableStyles,T=m.get(n);if(T||(p=p.ownerDocument||p,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,T),(m=p.querySelector(nu(n)))?m._p||(T.instance=m,T.state.loading=5):(m=Oi.get(n),m||(m={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Oi.set(n,m)),zD(p,n,m,T.state))),r&&l===null)throw Error(a(528,""));return T}if(r&&l!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(s=Rl(s),r=ke(p).hoistableScripts,l=r.get(s),l||(l={type:"script",instance:null,count:0,state:null},r.set(s,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function wl(n){return'href="'+Dn(n)+'"'}function nu(n){return'link[rel="stylesheet"]['+n+"]"}function OS(n){return D({},n,{"data-precedence":n.precedence,precedence:null})}function zD(n,r,s,l){if(r=n.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[zt]!==!0){l.loading=1;return}}else r=n.createElement("link"),r[zt]=!0,r.onload=r.onerror=nt.bind(null,r),xr(r,"link",s),Se(r),n.head.appendChild(r);l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2})}function Rl(n){return'[src="'+Dn(n)+'"]'}function ru(n){return"script[async]"+n}function AS(n,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+Dn(s.href)+'"]');if(l)return r.instance=l,Se(l),l;var p=D({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Se(l),xr(l,"style",p),kf(l,s.precedence,n),r.instance=l;case"stylesheet":p=wl(s.href);var m=n.querySelector(nu(p));if(m)return r.state.loading|=4,r.instance=m,Se(m),m;l=OS(s),(p=Oi.get(p))&&C0(l,p),m=(n.ownerDocument||n).createElement("link"),Se(m);var T=m;return T._p=new Promise(function(P,Z){T.onload=P,T.onerror=Z}),xr(m,"link",l),r.state.loading|=4,kf(m,s.precedence,n),r.instance=m;case"script":return m=Rl(s.src),(p=n.querySelector(ru(m)))?(r.instance=p,Se(p),p):(l=s,(p=Oi.get(m))&&(l=D({},s),T0(l,p)),n=n.ownerDocument||n,p=n.createElement("script"),Se(p),xr(p,"link",l),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,kf(l,s.precedence,n));return r.instance}function kf(n,r,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,m=p,T=0;T<l.length;T++){var P=l[T];if(P.dataset.precedence===r)m=P;else if(m!==p)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(n,r.firstChild))}function C0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function T0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Mf=null;function kS(n,r,s){if(Mf===null){var l=new Map,p=Mf=new Map;p.set(s,l)}else p=Mf,l=p.get(s),l||(l=new Map,p.set(s,l));if(l.has(n))return l;for(l.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var m=s[p];if(!(m[vi]||m[fn]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var T=m.getAttribute(r)||"";T=n+T;var P=l.get(T);P?P.push(m):l.set(T,[m])}}return l}function O0(n,r,s){n=n.ownerDocument||n,n.head.insertBefore(s,r==="title"?n.querySelector("head > title"):null)}function _D(n,r,s){if(s===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function MS(n,r){return n==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function NS(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function DS(n){return(n.width||100)*(n.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function jS(n,r){typeof r.decode=="function"&&(n.imgCount++,r.complete||(n.imgBytes+=DS(r),n.suspenseyImages.push(r)),n=FD.bind(n),r.decode().then(n,n))}function UD(n,r,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=wl(l.href),m=r.querySelector(nu(p));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=iu.bind(n),r.then(n,n)),s.state.loading|=4,s.instance=m,Se(m);return}m=r.ownerDocument||r,l=OS(l),(p=Oi.get(p))&&C0(l,p),m=m.createElement("link"),Se(m);var T=m;T._p=new Promise(function(P,Z){T.onload=P,T.onerror=Z}),xr(m,"link",l),s.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,r),(r=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=iu.bind(n),r.addEventListener("load",s),r.addEventListener("error",s))}}var Nf=0;function HD(n,r){return n.stylesheets&&n.count===0&&jf(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var l=setTimeout(function(){if(n.stylesheets&&jf(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&Nf===0&&(Nf=62500*iD());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&jf(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Nf?50:800)+r);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function IS(n){if(n.count===0&&(n.imgCount===0||!n.waitingForImages)){if(n.stylesheets)jf(n,n.stylesheets);else if(n.unsuspend){var r=n.unsuspend;n.unsuspend=null,r()}}}function iu(){this.count--,IS(this)}function FD(){this.imgCount--,IS(this)}var Df=null;function jf(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Df=new Map,r.forEach(BD,n),Df=null,iu.call(n))}function BD(n,r){if(!(r.state.loading&4)){var s=Df.get(n);if(s)var l=s.get(null);else{s=new Map,Df.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var T=p[m];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(s.set(T.dataset.precedence,T),l=T)}l&&s.set(null,l)}p=r.instance,T=p.getAttribute("data-precedence"),m=s.get(T)||l,m===l&&s.set(null,p),s.set(T,p),this.count++,l=iu.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),m?m.parentNode.insertBefore(p,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var Cl={$$typeof:U,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function VD(n,r,s,l,p,m,T,P,Z){this.tag=1,this.containerInfo=n,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=Et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Et(0),this.hiddenUpdates=Et(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.transitionTypes=null,this.incompleteTransitions=new Map}function PS(n,r,s,l,p,m,T,P,Z,se,pe,Ce){return n=new VD(n,r,s,T,Z,se,pe,Ce,P),r=1,m===!0&&(r|=24),m=Kr(3,null,null,r),n.current=m,m.stateNode=n,r=Bg(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:l,isDehydrated:s,cache:r},Yg(m),n}function LS(n){return n?(n=Zo,n):Zo}function zS(n,r,s,l,p,m){p=LS(p),l.context===null?l.context=p:l.pendingContext=p,l=ds(r),l.payload={element:s},m=m===void 0?null:m,m!==null&&(l.callback=m),s=fs(n,l,r),s!==null&&($r(s,n,r),Pc(s,n,r))}function _S(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function A0(n,r){_S(n,r),(n=n.alternate)&&_S(n,r)}function US(n){if(n.tag===13||n.tag===31){var r=no(n,67108864);r!==null&&$r(r,n,67108864),A0(n,67108864)}}function HS(n){if(n.tag===13||n.tag===31){var r=di();r=Bt(r);var s=no(n,r);s!==null&&$r(s,n,r),A0(n,r)}}var Tl=!0;function KD(n,r,s,l){var p=ge.T;ge.T=null;var m=ue.p;try{ue.p=2,k0(n,r,s,l)}finally{ue.p=m,ge.T=p}}function qD(n,r,s,l){var p=ge.T;ge.T=null;var m=ue.p;try{ue.p=8,k0(n,r,s,l)}finally{ue.p=m,ge.T=p}}function k0(n,r,s,l){if(Tl){var p=M0(l);if(p===null)u0(n,r,l,If,s),BS(n,l);else if(GD(p,n,r,s,l))l.stopPropagation();else if(BS(n,l),r&4&&-1<YD.indexOf(n)){for(;p!==null;){var m=hr(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var T=Ke(m.pendingLanes);if(T!==0){var P=m;for(P.pendingLanes|=2,P.entangledLanes|=2;T;){var Z=1<<31-et(T);P.entanglements[1]|=Z,T&=~Z}la(m),(cn&6)===0&&(bf=St()+500,Zc(0))}}break;case 31:case 13:P=no(m,2),P!==null&&$r(P,m,2),Ef(),A0(m,2)}if(m=M0(l),m===null&&u0(n,r,l,If,s),m===p)break;p=m}p!==null&&l.stopPropagation()}else u0(n,r,l,null,s)}}function M0(n){return n=Zs(n),N0(n)}var If=null;function N0(n){if(If=null,n=Fn(n),n!==null){var r=c(n);if(r===null)n=null;else{var s=r.tag;if(s===13){if(n=u(r),n!==null)return n;n=null}else if(s===31){if(n=d(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return If=n,null}function FS(n){switch(n){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xt()){case ht:return 2;case bt:return 8;case mt:case Ut:return 32;case un:return 268435456;default:return 32}default:return 32}}var D0=!1,Rs=null,Cs=null,Ts=null,au=new Map,su=new Map,Os=[],YD="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 BS(n,r){switch(n){case"focusin":case"focusout":Rs=null;break;case"dragenter":case"dragleave":Cs=null;break;case"mouseover":case"mouseout":Ts=null;break;case"pointerover":case"pointerout":au.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":su.delete(r.pointerId)}}function ou(n,r,s,l,p,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:s,eventSystemFlags:l,nativeEvent:m,targetContainers:[p]},r!==null&&(r=hr(r),r!==null&&US(r)),n):(n.eventSystemFlags|=l,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function GD(n,r,s,l,p){switch(r){case"focusin":return Rs=ou(Rs,n,r,s,l,p),!0;case"dragenter":return Cs=ou(Cs,n,r,s,l,p),!0;case"mouseover":return Ts=ou(Ts,n,r,s,l,p),!0;case"pointerover":var m=p.pointerId;return au.set(m,ou(au.get(m)||null,n,r,s,l,p)),!0;case"gotpointercapture":return m=p.pointerId,su.set(m,ou(su.get(m)||null,n,r,s,l,p)),!0}return!1}function VS(n){var r=Fn(n.target);if(r!==null){var s=c(r);if(s!==null){if(r=s.tag,r===13){if(r=u(s),r!==null){n.blockedOn=r,ei(n.priority,function(){HS(s)});return}}else if(r===31){if(r=d(s),r!==null){n.blockedOn=r,ei(n.priority,function(){HS(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Pf(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=M0(n.nativeEvent);if(s===null){s=n.nativeEvent;var l=new s.constructor(s.type,s);Xs=l,s.target.dispatchEvent(l),Xs=null}else return r=hr(s),r!==null&&US(r),n.blockedOn=s,!1;r.shift()}return!0}function KS(n,r,s){Pf(n)&&s.delete(r)}function $D(){D0=!1,Rs!==null&&Pf(Rs)&&(Rs=null),Cs!==null&&Pf(Cs)&&(Cs=null),Ts!==null&&Pf(Ts)&&(Ts=null),au.forEach(KS),su.forEach(KS)}function Lf(n,r){n.blockedOn===r&&(n.blockedOn=null,D0||(D0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$D)))}var zf=null;function qS(n){zf!==n&&(zf=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){zf===n&&(zf=null);for(var r=0;r<n.length;r+=3){var s=n[r],l=n[r+1],p=n[r+2];if(typeof l!="function"){if(N0(l||s)===null)continue;break}var m=hr(s);m!==null&&(n.splice(r,3),r-=3,hm(m,{pending:!0,data:p,method:s.method,action:l},l,p))}}))}function Ol(n){function r(Z){return Lf(Z,n)}Rs!==null&&Lf(Rs,n),Cs!==null&&Lf(Cs,n),Ts!==null&&Lf(Ts,n),au.forEach(r),su.forEach(r);for(var s=0;s<Os.length;s++){var l=Os[s];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Os.length&&(s=Os[0],s.blockedOn===null);)VS(s),s.blockedOn===null&&Os.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var p=s[l],m=s[l+1],T=p[kn]||null;if(typeof m=="function")T||qS(s);else if(T){var P=null;if(m&&m.hasAttribute("formAction")){if(p=m,T=m[kn]||null)P=T.formAction;else if(N0(p)!==null)continue}else P=T.action;typeof P=="function"?s[l+1]=P:(s.splice(l,3),l-=3),qS(s)}}}function YS(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(T){return p=T})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function j0(n){this._internalRoot=n}_f.prototype.render=j0.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(a(409));var s=r.current,l=di();zS(s,l,n,r,null,null)},_f.prototype.unmount=j0.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;zS(n.current,2,null,n,null,null),Ef(),r[jn]=null}};function _f(n){this._internalRoot=n}_f.prototype.unstable_scheduleHydration=function(n){if(n){var r=Tn();n={blockedOn:null,target:n,priority:r};for(var s=0;s<Os.length&&r!==0&&r<Os[s].priority;s++);Os.splice(s,0,n),s===0&&VS(n)}};var GS=t.version;if(GS!=="19.3.1")throw Error(a(527,GS,"19.3.1"));ue.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var QD={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uf.isDisabled&&Uf.supportsFiber)try{Ie=Uf.inject(QD),ze=Uf}catch{}}return cu.createRoot=function(n,r){if(!o(n))throw Error(a(299));var s=!1,l="",p=L2,m=z2,T=_2;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(T=r.onRecoverableError)),r=PS(n,1,!1,null,null,s,l,null,p,m,T,YS),n[jn]=r.current,c0(n),new j0(r)},cu.hydrateRoot=function(n,r,s){if(!o(n))throw Error(a(299));var l=!1,p="",m=L2,T=z2,P=_2,Z=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(m=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError),s.formState!==void 0&&(Z=s.formState)),r=PS(n,1,!0,r,s??null,l,p,Z,m,T,P,YS),r.context=LS(null),s=r.current,l=di(),l=Bt(l),p=ds(l),p.callback=null,fs(s,p,l),s=l,r.current.lanes=s,ft(r,s),la(r),n[jn]=r.current,c0(n),new _f(r)},cu.version="19.3.1",cu}var rE;function aj(){if(rE)return L0.exports;rE=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(),L0.exports=ij(),L0.exports}var sj=aj();const iE={};function er(e,t){const i=v.useRef(iE);return i.current===iE&&(i.current=e(t)),i}const xy=[];let Sy;function oj(){return Sy}function lj(e){xy.push(e)}function Yu(e){const t=(i,a)=>{const o=er(cj).current;let c;try{Sy=o;for(const u of xy)u.before(o);c=e(i,a);for(const u of xy)u.after(o);o.didInitialize=!0}finally{Sy=void 0}return c};return t.displayName=e.displayName||e.name,t}function dv(e){return v.forwardRef(Yu(e))}function cj(){return{didInitialize:!1}}function wn(){}const Gi=Object.freeze([]),Qt=Object.freeze({}),uj=()=>{},_e=typeof document<"u"?v.useLayoutEffect:uj;function dj(e,t){return function(a,...o){const c=new URL(e);return c.searchParams.set("code",a.toString()),o.forEach(u=>c.searchParams.append("args[]",u)),`${t} error #${a}; visit ${c} for the full message.`}}const bn=dj("https://base-ui.com/production-error","Base UI"),PR=v.createContext(void 0);function Gu(e){const t=v.useContext(PR);if(t===void 0&&!e)throw new Error(bn(72));return t}function fv(e){v.useEffect(e,Gi)}const uu=0;class ji{static create(){return new ji}currentId=uu;start(t,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=uu,i()},t)}isStarted(){return this.currentId!==uu}clear=()=>{this.currentId!==uu&&(clearTimeout(this.currentId),this.currentId=uu)};disposeEffect=()=>this.clear}function Un(){const e=er(ji.create).current;return fv(e.disposeEffect),e}function fj(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:hj,platform:pj,maxTouchPoints:gj}=fj(),lp=hj.toLowerCase(),Du=pj.toLowerCase(),cp=/^i(os$|p)/.test(Du)||Du==="macintel"&&gj>1,aE="android",Ey=Du===aE||lp.includes(aE),hv=!cp&&Du.startsWith("mac");Du.startsWith("win");const mj=hv||cp,ba=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ba&&lp.includes("firefox");!ba&&lp.includes("chrom");const yj=mj,pv=/jsdom|happydom/.test(lp);function qi(e){e.preventDefault(),e.stopPropagation()}function vj(e){return"nativeEvent"in e}function Xl(e){return e.pointerType===""&&e.isTrusted?!0:Ey&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function gv(e){return pv?!1:!Ey&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Ey||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ps(e,t){const i=["mouse","pen"];return t||i.push("",void 0),i.includes(e)}function bj(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function up(){return typeof window<"u"}function Rr(e){return mv(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xa(e){var t;return(t=(mv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mv(e){return up()?e instanceof Node||e instanceof Rn(e).Node:!1}function on(e){return up()?e instanceof Element||e instanceof Rn(e).Element:!1}function vn(e){return up()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function Mo(e){return!up()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function $u(e){const{overflow:t,overflowX:i,overflowY:a,display:o}=gi(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+i)&&o!=="inline"&&o!=="contents"}function xj(e){return/^(table|td|th)$/.test(Rr(e))}function dp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Sj=/transform|translate|scale|rotate|perspective|filter/,Ej=/paint|layout|strict|content/,So=e=>!!e&&e!=="none";let H0;function yv(e){const t=on(e)?gi(e):e;return So(t.transform)||So(t.translate)||So(t.scale)||So(t.rotate)||So(t.perspective)||!vv()&&(So(t.backdropFilter)||So(t.filter))||Sj.test(t.willChange||"")||Ej.test(t.contain||"")}function wj(e){let t=Ya(e);for(;vn(t)&&!Va(t);){if(yv(t))return t;if(dp(t))return null;t=Ya(t)}return null}function vv(){return H0==null&&(H0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),H0}function Va(e){return/^(html|body|#document)$/.test(Rr(e))}function gi(e){return Rn(e).getComputedStyle(e)}function fp(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ya(e){if(Rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mo(e)&&e.host||Xa(e);return Mo(t)?t.host:t}function LR(e){const t=Ya(e);return Va(t)?(e.ownerDocument||e).body:vn(t)&&$u(t)?t:LR(t)}function ju(e,t,i){var a;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=LR(e),c=o===((a=e.ownerDocument)==null?void 0:a.body),u=Rn(o);if(c){const d=wy(u);return t.concat(u,u.visualViewport||[],$u(o)?o:[],d&&i?ju(d):[])}else return t.concat(o,ju(o,[],i))}function wy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function it(e,t){if(!e||!t)return!1;const i=t.getRootNode?.();if(e.contains(t))return!0;if(i&&Mo(i)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function Iu(e,t){let i=e;for(;i;){if(on(i)&&i.matches(t))return i;i=i.assignedSlot??i.parentNode??(Mo(i)?i.host:null)}return null}function tr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Ry="data-base-ui-focusable",zR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",hp="ArrowLeft",pp="ArrowRight",_R="ArrowUp",bv="ArrowDown",xv="data-starting-style",Rj="data-ending-style",Cj={[xv]:""},Tj={[Rj]:""},xa={transitionStatus(e){return e==="starting"?Cj:e==="ending"?Tj:null}},Oj="data-open",Aj="data-closed",kj="data-anchor-hidden",UR="data-popup-open",Mj="data-pressed",Nj={[UR]:""},Dj={[UR]:"",[Mj]:""},jj={[Oj]:""},Ij={[Aj]:""},Pj={[kj]:""},Sv={open(e){return e?Nj:null}},Mh={open(e){return e?Dj:null}},Qu={open(e){return e?jj:Ij},anchorHidden(e){return e?Pj:null}},gp={...Qu,...xa},Cy="data-trigger-disabled";function Nh(e,t){if(!on(e))return!1;const i=e;if(t.hasElement(i))return!i.hasAttribute(Cy);for(const[,a]of t.entries())if(it(a,i))return!a.hasAttribute(Cy);return!1}function F0(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const i=e;return i.target!=null&&t.contains(i.target)}function Lj(e){return e.matches("html,body")}function Xu(e){return vn(e)&&e.matches(zR)}function zj(e){return Iu(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${zR}`)!=null}function Ty(e){return e?e.getAttribute("role")==="combobox"&&Xu(e):!1}function _j(e){if(!e||pv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Dh(e){return e?e.hasAttribute(Ry)?e:e.querySelector(`[${Ry}]`)||e:null}function Uj(e,t){return t!=null&&!Ps(t)?0:typeof e=="function"?e():e}function No(e,t,i){const a=Uj(e,i);return typeof a=="number"?a:a?.[t]}function sE(e){return typeof e=="function"?e():e}function HR(e,t){return t||e==="click"||e==="mousedown"}function Hj(e){return e?.includes("mouse")&&e!=="mousedown"}function ct(e,t,i,a){let o=!1,c=!1;const u=a??Qt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){c=!0},get isCanceled(){return o},get isPropagationAllowed(){return c},trigger:i,...u}}function Fj(e,t,i){const a=i??Qt;return{reason:e,event:t??new Event("base-ui"),...a}}const Mr="none",$i="trigger-press",Kn="trigger-hover",zl="trigger-focus",mp="outside-press",Ao="item-press",FR="close-press",zs="focus-out",Zu="escape-key",jh="list-navigation",BR="keyboard",Bj="pointer",Ev="cancel-open",mu="sibling-open",Vj="disabled",Wu="imperative-action",Kj="window-resize",VR=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ji,currentIdRef:{current:null},currentContextRef:{current:null}});function qj(e,t){e.current=t.current}function Yj(e){const{children:t,delay:i,timeoutMs:a=0}=e,o=v.useRef(i),c=v.useRef(i),u=v.useRef(null),d=v.useRef(null),f=Un();return _e(()=>{if(c.current=i,!u.current){o.current=i;return}o.current={open:No(o.current,"open"),close:No(i,"close")}},[i,u,o,c]),b.jsx(VR.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:c,currentIdRef:u,timeoutMs:a,currentContextRef:d,timeout:f}),[a,f]),children:t})}function Gj(e,t={open:!1}){const{open:i}=t,a=e.useState("floatingId"),o=v.useContext(VR),{currentIdRef:c,delayRef:u,timeoutMs:d,initialDelayRef:f,currentContextRef:g,hasProvider:y,timeout:h}=o,[x,S]=v.useState(!1),E=v.useRef(i);return _e(()=>{E.current=i},[i]),_e(()=>{function C(){g.current?.setIsInstantPhase(!1),c.current=null,g.current=null,u.current=f.current,h.clear()}if(c.current&&!i&&c.current===a){if(S(!1),d){const w=a;return h.start(d,()=>{e.select("open")||c.current&&c.current!==w||C()}),()=>{(E.current||c.current!==w)&&h.clear()}}C()}},[i,a,c,u,d,f,g,h,e]),_e(()=>{if(!i)return;const C=g.current,w=c.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:S},c.current=a,u.current={open:0,close:No(f.current,"close")},w!==null&&w!==a?(S(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,ct(Mr))):(S(!1),C?.setIsInstantPhase(!1))},[i,a,e,c,u,f,g,h]),_e(()=>()=>{if(c.current===a){if(g.current=null,!E.current)return;c.current=null,qj(u,f),h.clear()}},[g,c,u,a,f,h]),v.useMemo(()=>({activeIdRef:c,hasProvider:y,delayRef:u,isInstantPhase:x}),[c,y,u,x])}function Lt(e,t,i,a){return e.addEventListener(t,i,a),()=>{e.removeEventListener(t,i,a)}}function ga(...e){return()=>{for(let t=0;t<e.length;t+=1){const i=e[t];i&&i()}}}function Wr(e,t,i,a){const o=er(KR).current;return Qj(o,e,t,i,a)&&qR(o,[e,t,i,a]),o.callback}function $j(e){const t=er(KR).current;return Xj(t,e)&&qR(t,e),t.callback}function KR(){return{callback:null,cleanup:null,refs:[]}}function Qj(e,t,i,a,o){return e.refs[0]!==t||e.refs[1]!==i||e.refs[2]!==a||e.refs[3]!==o}function Xj(e,t){return e.refs.length!==t.length||e.refs.some((i,a)=>i!==t[a])}function qR(e,t){if(e.refs=t,t.every(i=>i==null)){e.callback=null;return}e.callback=i=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),i!=null){const a=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const c=t[o];if(c!=null)switch(typeof c){case"function":{const u=c(i);typeof u=="function"&&(a[o]=u);break}case"object":{c.current=i;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const c=t[o];if(c!=null)switch(typeof c){case"function":{const u=a[o];typeof u=="function"?u():c(null);break}case"object":{c.current=null;break}}}}}}}function Ln(e){const t=er(Zj,e).current;return t.next=e,_e(t.effect),t}function Zj(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const wv={...jR},B0=wv.useInsertionEffect,Wj=B0&&B0!==wv.useLayoutEffect?B0:e=>e();function Fe(e){const t=er(Jj).current;return t.next=e,Wj(t.effect),t.trampoline}function Jj(){const e={next:void 0,callback:e4,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function e4(){}const Hf=null;class t4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const i=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let o=0;o<i.length;o+=1)i[o]?.(t)};request(t){const i=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),i}cancel(t){const i=t-this.startId;i<0||i>=this.callbacks.length||this.callbacks[i]!==null&&(this.callbacks[i]=null,this.callbacksCount-=1)}}let Ff=new t4;class Ar{static create(){return new Ar}static request(t){return Ff.request(t)}static cancel(t){return Ff.cancel(t)}currentId=Hf;request(t){this.cancel(),this.currentId=Ff.request(()=>{this.currentId=Hf,t()})}cancel=()=>{this.currentId!==Hf&&(Ff.cancel(this.currentId),this.currentId=Hf)};disposeEffect=()=>this.cancel}function Zl(){const e=er(Ar.create).current;return fv(e.disposeEffect),e}function $t(e){return e?.ownerDocument||document}const YR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ju={...YR,position:"fixed",margin:0,top:0,left:0},yp={...YR,position:"absolute"},Wl=v.forwardRef(function(t,i){const[a,o]=v.useState();_e(()=>{yj&&ba&&o("button")},[]);const c={tabIndex:0,role:a};return b.jsx("span",{...t,ref:i,style:Ju,"aria-hidden":a?void 0:!0,...c,"data-base-ui-focus-guard":""})}),Jl=Math.min,Ka=Math.max,Ih=Math.round,Bf=Math.floor,qa=e=>({x:e,y:e}),n4={left:"right",right:"left",bottom:"top",top:"bottom"};function GR(e,t,i){return Ka(e,Jl(t,i))}function _s(e,t){return typeof e=="function"?e(t):e}function pi(e){return e.split("-")[0]}function ma(e){return e.split("-")[1]}function Rv(e){return e==="x"?"y":"x"}function Cv(e){return e==="y"?"height":"width"}function Ni(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tv(e){return Rv(Ni(e))}function r4(e,t,i){i===void 0&&(i=!1);const a=ma(e),o=Tv(e),c=Cv(o);let u=o==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=Ph(u)),[u,Ph(u)]}function i4(e){const t=Ph(e);return[Oy(e),t,Oy(t)]}function Oy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const oE=["left","right"],lE=["right","left"],a4=["top","bottom"],s4=["bottom","top"];function o4(e,t,i){switch(e){case"top":case"bottom":return i?t?lE:oE:t?oE:lE;case"left":case"right":return t?a4:s4;default:return[]}}function l4(e,t,i,a){const o=ma(e);let c=o4(pi(e),i==="start",a);return o&&(c=c.map(u=>u+"-"+o),t&&(c=c.concat(c.map(Oy)))),c}function Ph(e){const t=pi(e);return n4[t]+e.slice(t.length)}function c4(e){var t,i,a,o;return{top:(t=e.top)!=null?t:0,right:(i=e.right)!=null?i:0,bottom:(a=e.bottom)!=null?a:0,left:(o=e.left)!=null?o:0}}function $R(e){return typeof e!="number"?c4(e):{top:e,right:e,bottom:e,left:e}}function Pu(e){const{x:t,y:i,width:a,height:o}=e;return{width:a,height:o,top:i,left:t,right:t+a,bottom:i+o,x:t,y:i}}function _l(e,t){return t<0||t>=e.length}function ph(e,t){return Ul(e.current,{disabledIndices:t})}function Ay(e,t){return Ul(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function u4(e,t,i){const{decrement:a,loopFocus:o,allowEscape:c,disabledIndices:u,minIndex:d,maxIndex:f}=i,g=()=>Ul(e,{startingIndex:t,decrement:a,disabledIndices:u});let y,h=!1;if(!o)y=a?Math.max(d,g()):Math.min(f,g());else if(a?t<=d:t>=f){const x=a?-1:e.length;c&&t!==x?y=-1:(y=a?f:d,h=!0)}else y=g();return{index:_l(e,y)?-1:y,wrapped:h}}function Ul(e,{startingIndex:t=-1,decrement:i=!1,disabledIndices:a,amount:o=1}={}){let c=t;do c+=i?-o:o;while(c>=0&&c<=e.length-1&&Hl(e,c,a));return c}function Hl(e,t,i){if(typeof i=="function"?i(t):i?.includes(t)??!1)return!0;const o=e[t];return o?!vp(o)||o.matches(":disabled")?!0:!i&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!1}function d4(e){return e.visibility==="hidden"||e.visibility==="collapse"}function vp(e,t=e?gi(e):null){return!e||!e.isConnected||!t||d4(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const f4='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function h4(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const i=e.getRootNode();return Mo(i)?i.host:null}function ky(e){for(const t of Array.from(e.children))if(Rr(t)==="summary")return t;return null}function p4(e,t){const i=ky(t);return!!i&&(e===i||it(i,e))}function QR(e){const t=e?Rr(e):"";return e!=null&&e.matches(f4)&&(t!=="summary"||e.parentElement!=null&&Rr(e.parentElement)==="details"&&ky(e.parentElement)===e)&&(t!=="details"||ky(e)==null)&&(t!=="input"||e.type!=="hidden")}function Ov(e){if(!QR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=h4(t)){const i=t!==e,a=Rr(t)==="slot";if(t.hasAttribute("inert")||i&&Rr(t)==="details"&&!t.open&&!p4(e,t)||t.hasAttribute("hidden")||!a&&!g4(t,i))return!1}return!0}function g4(e,t){const i=gi(e);return t?i.display!=="none":vp(e,i)}function XR(e){const t=e.tabIndex;if(t<0){const i=Rr(e);if(i==="details"||i==="audio"||i==="video"||vn(e)&&e.isContentEditable)return 0}return t}function V0(e){if(Rr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function ZR(e,t){const i=V0(e);if(!i)return!0;const a=t.find(o=>{const c=V0(o);return c?.name===i.name&&c.form===i.form&&c.checked});return a?a===i:t.find(o=>{const c=V0(o);return c?.name===i.name&&c.form===i.form})===i}function WR(e){if(vn(e)&&Rr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return vn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Av(e,t){WR(e).forEach(i=>{QR(i)&&t.push(i),Av(i,t)})}function JR(e,t,i){WR(e).forEach(a=>{vn(a)&&a.matches(t)&&i.push(a),JR(a,t,i)})}function bp(e){return Ov(e)&&XR(e)>=0}function eC(e){const t=[];return Av(e,t),t.filter(Ov)}function xp(e){const t=eC(e);return t.filter(i=>XR(i)>=0&&ZR(i,t))}function tC(e,t){const i=xp(e),a=i.length;if(a===0)return;const o=Xr($t(e)),c=i.indexOf(o),u=c===-1?t===1?0:a-1:c+t;return i[u]}function nC(e){return tC($t(e).body,1)||e}function rC(e){return tC($t(e).body,-1)||e}function m4(e,t,i){if(!e)return null;const a=[];Av($t(e).body,a);const o=a.indexOf(e);if(o===-1)return null;const c=a.filter(Ov);for(let u=1;u<a.length;u+=1){const d=a[(o+t*u+a.length)%a.length];if(!it(i,d)&&bp(d)&&ZR(d,c))return d}return a[o]}function Fl(e,t){const i=t||e.currentTarget,a=e.relatedTarget;return!a||!it(i,a)}function y4(e){xp(e).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function cE(e){const t=[];JR(e,"[data-tabindex]",t),t.forEach(i=>{const a=i.dataset.tabindex;delete i.dataset.tabindex,a?i.setAttribute("tabindex",a):i.removeAttribute("tabindex")})}function Us(e,t,i=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!i||o.context?.open?[o]:[],...Us(e,o.id,i)])}function uE(e,t){let i=[],a=e.find(o=>o.id===t)?.parentId;for(;a;){const o=e.find(c=>c.id===a);a=o?.parentId,o&&(i=i.concat(o))}return i}function Bl(e){return`data-base-ui-${e}`}let Vf=0;function gh(e,t={}){const{preventScroll:i=!1,sync:a=!1,shouldFocus:o}=t;cancelAnimationFrame(Vf);function c(){o&&!o()||e?.focus({preventScroll:i})}if(a)return c(),wn;const u=requestAnimationFrame(c);return Vf=u,()=>{Vf===u&&(cancelAnimationFrame(u),Vf=0)}}const dE="data-base-ui-inert";let du=new WeakMap,Kf=new WeakSet,fu=new WeakMap,K0=0;function iC(e){return e?Mo(e)?e.host:iC(e.parentNode):null}const fE=(e,t)=>t.map(i=>{if(e.contains(i))return i;const a=iC(i);return e.contains(a)?a:null}).filter(i=>i!=null),hE=e=>{const t=new Set;return e.forEach(i=>{let a=i;for(;a&&!t.has(a);)t.add(a),a=a.parentNode}),t},pE=(e,t,i)=>{const a=[],o=c=>{!c||i.has(c)||Array.from(c.children).forEach(u=>{Rr(u)!=="script"&&(t.has(u)?o(u):a.push(u))})};return o(e),a};function v4(e,t,i,{mark:a=!0}){const o=fE(t,e),c=a?pE(t,hE(o),new Set(o)):[],u=[],d=[];if(i){const f=fE(t,Array.from(t.querySelectorAll("[aria-live]"))),g=o.concat(f);pE(t,hE(g),new Set(g)).forEach(h=>{const x=h.getAttribute("aria-hidden"),S=x!==null&&x!=="false",E=(du.get(h)||0)+1;du.set(h,E),u.push(h),E===1&&S&&Kf.add(h),S||h.setAttribute("aria-hidden","true")})}return a&&c.forEach(f=>{const g=(fu.get(f)||0)+1;fu.set(f,g),d.push(f),g===1&&f.setAttribute(dE,"")}),K0+=1,()=>{u.forEach(f=>{const g=(du.get(f)||0)-1;du.set(f,g),g||(Kf.has(f)||f.removeAttribute("aria-hidden"),Kf.delete(f))}),a&&d.forEach(f=>{const g=(fu.get(f)||0)-1;fu.set(f,g),g||f.removeAttribute(dE)}),K0-=1,K0||(du=new WeakMap,Kf=new WeakSet,fu=new WeakMap)}}function gE(e,t={}){const{ariaHidden:i=!1,mark:a=!0}=t,o=$t(e[0]).body;return v4(e,o,i,{mark:a})}var ur=IR();const b4=DR(ur);function aC(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let mE=0;function x4(e,t="mui"){const i=v.useRef(void 0),a=aC(),o=e??i.current;return v.useEffect(()=>{i.current==null&&(mE+=1,i.current=`${t}-${mE}`,e==null&&a())},[e,t,a]),o}const yE=wv.useId;function ic(e,t){if(yE!==void 0){const i=yE();return e??(t?`${t}-${i}`:i)}return x4(e,t)}const S4=parseInt(v.version,10);function kv(e){return S4>=e}function vE(e){if(!v.isValidElement(e))return null;const t=e,i=t.props;return(kv(19)?i?.ref:t.ref)??null}function My(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function E4(e,t){const i={};for(const a in e){const o=e[a];if(t?.hasOwnProperty(a)){const c=t[a](o);c!=null&&Object.assign(i,c);continue}o===!0?i[`data-${a.toLowerCase()}`]="":o&&(i[`data-${a.toLowerCase()}`]=o.toString())}return i}function w4(e,t){return typeof e=="function"?e(t):e}function sC(e,t){return typeof e=="function"?e(t):e}const oC={};function kr(e,t,i,a,o){if(!i&&!a&&!o&&!e)return Lh(t);let c=Lh(e);return t&&(c=yu(c,t)),i&&(c=yu(c,i)),a&&(c=yu(c,a)),o&&(c=yu(c,o)),c}function R4(e){if(e.length===0)return oC;if(e.length===1)return Lh(e[0]);let t=Lh(e[0]);for(let i=1;i<e.length;i+=1)t=yu(t,e[i]);return t}function Lh(e){return cC(e)?{...e(oC)}:C4(e)}function yu(e,t){return cC(t)?t(e):T4(e,t)}function C4(e){const t={...e};for(const i in t){const a=t[i];lC(i,a)&&(t[i]=uC(a))}return t}function T4(e,t){if(!t)return e;for(const i in t){const a=t[i];switch(i){case"style":{e[i]=My(e.style,a);break}case"className":{e[i]=dC(e.className,a);break}default:lC(i,a)?e[i]=O4(e[i],a):e[i]=a}}return e}function lC(e,t){const i=e.charCodeAt(0),a=e.charCodeAt(1),o=e.charCodeAt(2);return i===111&&a===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function cC(e){return typeof e=="function"}function O4(e,t){return t?e?(...i)=>{const a=i[0];if(fC(a)){const c=a;zh(c);const u=t(...i);return c.baseUIHandlerPrevented||e?.(...i),u}const o=t(...i);return e?.(...i),o}:uC(t):e}function uC(e){return e&&((...t)=>{const i=t[0];return fC(i)&&zh(i),e(...t)})}function zh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function dC(e,t){return t?e?t+" "+e:t:e}function fC(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function At(e,t,i={}){let a=t.render;i.enabled!==!1&&(a=Mv(a));const o=A4(t,i,a);if(i.enabled===!1)return null;const c=i.state??Qt;return N4(e,a,o,c)}function A4(e,t,i){const{className:a,style:o}=e,{state:c=Qt,ref:u,props:d,stateAttributesMapping:f,enabled:g=!0}=t,y=g?w4(a,c):void 0,h=g?sC(o,c):void 0,x=g?E4(c,f):Qt,S=g&&d?k4(d):void 0,E=g?My(x,S)??{}:Qt;return typeof document<"u"&&(g?Array.isArray(u)?E.ref=$j([E.ref,vE(i),...u]):E.ref=Wr(E.ref,vE(i),u):Wr(null,null)),g?(y!==void 0&&(E.className=dC(E.className,y)),h!==void 0&&(E.style=My(E.style,h)),E):Qt}function k4(e){return Array.isArray(e)?R4(e):kr(void 0,e)}const M4=Symbol.for("react.lazy");function Mv(e){if(e?.$$typeof!==M4)return e;const t=v.Children.toArray(e)[0];return v.isValidElement(t)?t:e}function N4(e,t,i,a){if(t){if(typeof t=="function")return t(i,a);const o=kr(i,t.props);return o.ref=i.ref,v.cloneElement(t,o)}return D4(e,i)}function D4(e,t){return e==="button"?v.createElement("button",{type:"button",...t,key:t.key}):e==="img"?v.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}const j4=500,hC=500,I4={style:{transition:"none"}},pC="data-base-ui-click-trigger",gC={fallbackAxisSide:"none"},Nv={fallbackAxisSide:"end"},P4={clipPath:"inset(50%)",position:"fixed",top:0,left:0},mC=v.createContext(null),yC=()=>v.useContext(mC),L4=Bl("portal");function vC(e={}){const{ref:t,container:i,componentProps:a=Qt,elementProps:o}=e,c=ic(),d=yC()?.portalNode,[f,g]=v.useState(null),[y,h]=v.useState(null),x=Fe(w=>{w!==null&&h(w)}),S=v.useRef(null);_e(()=>{if(i===null){S.current&&(S.current=null,h(null),g(null));return}const w=(i&&(mv(i)?i:i.current))??d??document.body;if(w==null){S.current&&(S.current=null,h(null),g(null));return}S.current!==w&&(S.current=w,h(null),g(w))},[i,d]);const E=At("div",a,{ref:[t,x],props:[{id:c,[L4]:""},o]}),C=f&&E?ur.createPortal(E,f):null;return{node:y,nodeId:v.isValidElement(E)?E.props.id:void 0,subtree:C}}const Sp=v.forwardRef(function(t,i){const{render:a,className:o,style:c,children:u,container:d,portalOwnerRole:f,...g}=t,{node:y,nodeId:h,subtree:x}=vC({container:d,ref:i,componentProps:t,elementProps:g}),S=v.useRef(null),E=v.useRef(null),C=v.useRef(null),w=v.useRef(null),[R,O]=v.useState(null),A=v.useRef(!1),k=R?.modal,N=R?.open,j=!!R&&!R.modal&&R.open&&!!y;v.useEffect(()=>{if(!y||k)return;function M(_){y&&_.relatedTarget&&Fl(_)&&(_.type==="focusin"?A.current&&(cE(y),A.current=!1):(y4(y),A.current=!0))}return ga(Lt(y,"focusin",M,!0),Lt(y,"focusout",M,!0))},[y,k]),_e(()=>{!y||N!==!0||!A.current||(cE(y),A.current=!1)},[N,y]);const D=v.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:E,beforeInsideRef:C,afterInsideRef:w,portalNode:y,setFocusManagerState:O}),[y]);return b.jsxs(v.Fragment,{children:[x,b.jsxs(mC.Provider,{value:D,children:[j&&y&&b.jsx(Wl,{"data-type":"outside",ref:S,onFocus:M=>{if(Fl(M,y))C.current?.focus();else{const _=R?R.domReference:null;rC(_)?.focus()}}}),j&&y&&b.jsx("span",{role:f,"aria-owns":h,style:P4}),y&&ur.createPortal(u,y),j&&y&&b.jsx(Wl,{"data-type":"outside",ref:E,onFocus:M=>{if(Fl(M,y))w.current?.focus();else{const _=R?R.domReference:null;nC(_)?.focus(),R?.closeOnFocusOut&&R?.onOpenChange(!1,ct(zs,M.nativeEvent))}}})]})]})});function bC(){const e=new Map;return{emit(t,i){e.get(t)?.forEach(a=>a(i))},on(t,i){e.has(t)||e.set(t,new Set),e.get(t).add(i)},off(t,i){e.get(t)?.delete(i)}}}class Dv{nodesRef={current:[]};events=bC();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const i=this.nodesRef.current.findIndex(a=>a===t);i!==-1&&this.nodesRef.current.splice(i,1)}}const xC=v.createContext(null),SC=v.createContext(null),Vs=()=>v.useContext(xC)?.id||null,Ks=e=>{const t=v.useContext(SC);return e??t};function jv(e){const t=ic(),i=Ks(e),a=Vs();return _e(()=>{if(!t)return;const o={id:t,parentId:a};return i?.addNode(o),()=>{i?.removeNode(o)}},[i,t,a]),t}function EC(e){const{children:t,id:i}=e,a=Vs();return b.jsx(xC.Provider,{value:v.useMemo(()=>({id:i,parentId:a}),[i,a]),children:t})}function wC(e){const{children:t,externalTree:i}=e,a=er(()=>i??new Dv).current;return b.jsx(SC.Provider,{value:a,children:t})}function Ua(e){return e==null?e:"current"in e?e.current:e}function z4(e,t){const i=Rn(tr(e));return e instanceof i.KeyboardEvent?"keyboard":e instanceof i.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(Xl(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof i.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const bE=20;let js=[];function Iv(){js=js.filter(e=>e.deref()?.isConnected)}function xE(e){Iv(),e&&Rr(e)!=="body"&&(js.push(new WeakRef(e)),js.length>bE&&(js=js.slice(-bE)))}function SE(){return Iv(),js[js.length-1]?.deref()}function _4(e){return e?bp(e)?e:xp(e)[0]||e:null}function EE(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const i=eC(e).filter(o=>{const c=o.getAttribute("data-tabindex")||"";return bp(o)||o.hasAttribute("data-tabindex")&&!c.startsWith("-")}),a=e.getAttribute("tabindex");i.length===0?a!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Ep(e){const{context:t,children:i,disabled:a=!1,initialFocus:o=!0,returnFocus:c=!0,explicitReturnFocus:u,restoreFocus:d=!1,modal:f=!0,closeOnFocusOut:g=!0,openInteractionType:y="",nextFocusableElement:h,previousFocusableElement:x,beforeContentFocusGuardRef:S,externalTree:E,getInsideElements:C}=e,w=t.useState("open"),R=t.useState("domReferenceElement"),O=t.useState("floatingElement"),{events:A,dataRef:k}=t.context,N=Fe(()=>k.current.floatingContext?.nodeId),j=o===!1,D=Ty(R)&&j,M=Ln(o),_=Ln(c),L=Ln(u),q=Ln(y),X=Ln(w),B=Ks(E),H=yC(),U=v.useRef(!1),z=v.useRef(!1),Q=v.useRef(!1),$=v.useRef(null),K=v.useRef(""),Y=v.useRef(""),ee=v.useRef(null),G=v.useRef(null),oe=Wr(ee,S,H?.beforeInsideRef),I=Wr(G,H?.afterInsideRef),V=Un(),J=Un(),re=Zl(),we=H!=null,le=Dh(O),me=Fe((ve=le)=>ve?xp(ve):[]),ge=Fe(()=>C?.().filter(ve=>ve!=null)??[]);v.useEffect(()=>{if(a||!f)return;function ve(Ae){Ae.key==="Tab"&&it(le,Xr($t(le)))&&me().length===0&&!D&&qi(Ae)}const Pe=$t(le);return Lt(Pe,"keydown",ve)},[a,le,f,D,me]),v.useEffect(()=>{if(a||!w)return;const ve=$t(le);function Pe(){Q.current=!1}function Ae(Be){const Oe=tr(Be),Ue=ge(),be=it(O,Oe)||it(R,Oe)||it(H?.portalNode,Oe)||Ue.some(He=>He===Oe||it(He,Oe));Q.current=!be,Y.current=Be.pointerType||"keyboard",Iu(Oe,`[${pC}]`)&&(z.current=!0,J.start(0,()=>{z.current=!1}))}function Le(){Y.current="keyboard"}return ga(Lt(ve,"pointerdown",Ae,!0),Lt(ve,"pointerup",Pe,!0),Lt(ve,"pointercancel",Pe,!0),Lt(ve,"keydown",Le,!0),Pe)},[a,O,R,le,w,H,J,ge]),v.useEffect(()=>{if(a||!g)return;const ve=$t(le);function Pe(){z.current=!0,J.start(0,()=>{z.current=!1})}function Ae(Ue){const be=tr(Ue);bp(be)&&($.current=be)}function Le(Ue){const be=Ue.relatedTarget,He=Ue.currentTarget,Ze=tr(Ue);f&&be==null&&Ze!=null&&it(O,Ze)&&xE(Ze),queueMicrotask(()=>{const st=N(),de=t.context.triggerElements,Ee=ge(),Ge=be?.hasAttribute(Bl("focus-guard"))&&[ee.current,G.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,Ua(x),Ua(h)].includes(be),Me=!(it(R,be)||it(O,be)||it(be,O)||it(H?.portalNode,be)||Ee.some(De=>De===be||it(De,be))||de.hasMatchingElement(De=>it(De,be))||Ge||B&&(Us(B.nodesRef.current,st).find(De=>it(De.context?.elements.floating,be)||it(De.context?.elements.domReference,be))||uE(B.nodesRef.current,st).find(De=>[De.context?.elements.floating,Dh(De.context?.elements.floating)].includes(be)||De.context?.elements.domReference===be)));if(He===R&&le&&EE(le),d&&He!==R&&!vp(Ze)&&Xr(ve)===ve.body){if(vn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const De=me(),vt=$.current,dt=(vt&&De.includes(vt)?vt:null)||De[De.length-1]||le;vn(dt)&&dt.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!f)&&be&&Me&&!z.current&&(D||be!==SE())&&(U.current=!0,t.setOpen(!1,ct(zs,Ue)))})}function Be(){Q.current||(k.current.insideReactTree=!0,V.start(0,()=>{k.current.insideReactTree=!1}))}const Oe=vn(R)?R:null;if(!(!O&&!Oe))return ga(Oe&&Lt(Oe,"focusout",Le),Oe&&Lt(Oe,"pointerdown",Pe),O&&Lt(O,"focusin",Ae),O&&Lt(O,"focusout",Le),O&&H&&Lt(O,"focusout",Be,!0))},[a,R,O,le,f,B,H,t,g,d,me,D,N,k,V,J,re,h,x,ge]),v.useEffect(()=>{if(a||!O||!w)return;const ve=Array.from(H?.portalNode?.querySelectorAll(`[${Bl("portal")}]`)||[]),Ae=(B?uE(B.nodesRef.current,N()):[]).find(He=>Ty(He.context?.elements.domReference||null))?.context?.elements.domReference,Be=[...[O,...ve,ee.current,G.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...ge()],Ae,Ua(x),Ua(h),D?R:null].filter(He=>He!=null),Oe=gE(Be,{ariaHidden:f||D,mark:!1}),Ue=[O,...ve].filter(He=>He!=null),be=gE(Ue);return()=>{be(),Oe()}},[w,a,R,O,f,H,D,B,N,h,x,ge]),_e(()=>{if(!w||a||!vn(le))return;K.current="",Y.current="";const ve=$t(le),Pe=Xr(ve);queueMicrotask(()=>{const Ae=M.current,Le=typeof Ae=="function"?Ae(q.current||""):Ae;if(Le===void 0||Le===!1||it(le,Pe))return;let Oe=null;const Ue=()=>(Oe==null&&(Oe=me(le)),Oe[0]||le);let be;Le===!0||Le===null?be=Ue():be=Ua(Le),be=be||Ue();const He=it(le,Xr(ve)),Ze=k.current.openEvent,st=Ze?.type==="mousedown"&&Xl(Ze);gh(be,{sync:st,preventScroll:be===le,shouldFocus(){if(!X.current)return!1;if(He)return!0;const de=Xr(ve);return!(de!==be&&it(le,de))}})})},[a,w,le,me,M,q,X,k]);const ue=v.useRef(null);_e(()=>{if(a||!le){ue.current=null;return}ue.current&&(ue.current.cancelled=!0,ue.current=null);const ve=$t(le),Pe=Xr(ve),Ae=q.current==null;xE(Pe);function Le(Oe){if(Oe.open||(K.current=z4(Oe.nativeEvent,Y.current)),(Oe.reason===zs&&Oe.triggerElement?.hasAttribute(Bl("focus-guard"))||Oe.reason===Kn&&Oe.nativeEvent.type==="mouseleave")&&(U.current=!0),Oe.reason===mp)if(Oe.nested)U.current=!1;else if(Xl(Oe.nativeEvent)||gv(Oe.nativeEvent))U.current=!1;else{let Ue=!1;$t(le).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?U.current=!1:U.current=!0}}A.on("openchange",Le);function Be(Oe){const Ue=_.current;let be=typeof Ue=="function"?Ue(Oe):Ue;if(be===void 0||be===!1)return null;be===null&&(be=!0);const He=R?.isConnected?R:null,Ze=Pe?.isConnected&&Rr(Pe)!=="body"?Pe:null;let st=Ae?Ze||He:He||Ze;return st||(st=SE()||null),typeof be=="boolean"?st:Ua(be)||st||null}return()=>{A.off("openchange",Le);const Oe=Xr(ve),Ue=ge(),be=it(O,Oe)||Ue.some(Ee=>Ee===Oe||it(Ee,Oe))||B&&Us(B.nodesRef.current,N(),!1).some(Ee=>it(Ee.context?.elements.floating,Oe)),He=_.current,Ze=K.current,st=Be(Ze),de={cancelled:!1};ue.current=de,queueMicrotask(()=>{ue.current===de&&(ue.current=null);const Ee=_4(st),Ge=L.current??typeof He!="boolean";if(!de.cancelled&&He&&!U.current&&vn(Ee)&&(!(!Ge&&Ee!==Oe&&Oe!==ve.body)||be)){const Me={preventScroll:!0};Ze==="keyboard"&&(Me.focusVisible=!0),Ee.focus(Me)}U.current=!1})}},[a,O,le,_,L,q,A,B,R,N,ge]),_e(()=>{if(!ba||w||!O)return;const ve=Xr($t(O));!vn(ve)||!Xu(ve)||it(O,ve)&&ve.blur()},[w,O]),_e(()=>{if(!(a||!H))return H.setFocusManagerState({modal:f,closeOnFocusOut:g,open:w,onOpenChange:t.setOpen,domReference:R}),()=>{H.setFocusManagerState(null)}},[a,H,f,w,t,g,R]),_e(()=>{if(!(a||!le))return EE(le),()=>{queueMicrotask(Iv)}},[a,le]);const Te=!a&&(f?!D:!0)&&(we||f);return b.jsxs(v.Fragment,{children:[Te&&b.jsx(Wl,{"data-type":"inside",ref:oe,onFocus:ve=>{if(f){const Pe=me();gh(Pe[Pe.length-1])}else H?.portalNode&&(U.current=!1,Fl(ve,H.portalNode)?nC(R)?.focus():Ua(x??H.beforeOutsideRef)?.focus())}}),i,Te&&b.jsx(Wl,{"data-type":"inside",ref:I,onFocus:ve=>{f?gh(me()[0]):H?.portalNode&&(g&&(U.current=!0),Fl(ve,H.portalNode)?rC(R)?.focus():Ua(h??H.afterOutsideRef)?.focus())}})]})}function Pv(e,t={}){const{enabled:i=!0,event:a="click",toggle:o=!0,ignoreMouse:c=!1,stickIfOpen:u=!0,touchOpenDelay:d=0,reason:f=$i}=t,g=e.context.dataRef,y=v.useRef(void 0),h=Zl(),x=Un(),S=v.useMemo(()=>{function E(w,R,O,A){const k=ct(f,R,O);w&&A==="touch"&&d>0?x.start(d,()=>{e.setOpen(!0,k)}):e.setOpen(w,k)}function C(w,R,O){const A=g.current.openEvent,k=e.select("domReferenceElement")!==R;return w&&k||!w||!o?!0:A&&(typeof u=="function"?u():u)?!O(A.type):!1}return{onPointerDown(w){y.current=Ps(w.pointerType,!0)&&gv(w.nativeEvent)?"virtual":w.pointerType},onMouseDown(w){const R=y.current,O=w.nativeEvent,A=e.select("open");if(w.button!==0||a==="click"||Ps(R,!0)&&c)return;const k=C(A,w.currentTarget,M=>M==="click"||M==="mousedown"),N=tr(O),j=Xu(N);if(j||R==="virtual"){E(k,O,j?N:w.currentTarget,R);return}const D=w.currentTarget;h.request(()=>{E(k,O,D,R)})},onClick(w){if(a==="mousedown-only")return;const R=y.current;if(a==="mousedown"&&R){y.current=void 0;return}if(Ps(R,!0)&&c)return;const O=e.select("open"),A=C(O,w.currentTarget,k=>k==="click"||k==="mousedown"||k==="keydown"||k==="keyup");E(A,w.nativeEvent,w.currentTarget,R)},onKeyDown(){y.current=void 0}}},[g,a,c,f,e,u,o,h,x,d]);return v.useMemo(()=>i?{reference:S}:Qt,[i,S])}function U4(e,t){let i=null,a=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",d=t.axis==="y"||t.axis==="both",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",g=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0;let h=c.x,x=c.y;return i==null&&t.x&&u&&(i=c.x-t.x),a==null&&t.y&&d&&(a=c.y-t.y),h-=i||0,x-=a||0,(!o||f)&&(h=u&&t.x!=null?t.x:h,x=d&&t.y!=null?t.y:x),o=!0,{width:g,height:y,x:h,y:x,top:x,right:h+g,bottom:x+y,left:h}}}}function wE(e){return e!=null&&e.clientX!=null}function H4(e,t={}){const{enabled:i=!0,axis:a="both"}=t,o=e.useState("open"),c=e.useState("floatingElement"),u=e.useState("domReferenceElement"),d=e.context.dataRef,f=v.useRef(!1),g=v.useRef(null),[y,h]=v.useState(),[x,S]=v.useState([]),E=Fe(A=>{e.set("positionReference",A)}),C=Fe((A,k,N)=>{f.current||d.current.openEvent&&!wE(d.current.openEvent)||e.set("positionReference",U4(N??u,{x:A,y:k,axis:a,dataRef:d,pointerType:y}))}),w=Fe(A=>{o?g.current||(C(A.clientX,A.clientY,A.currentTarget),S([])):C(A.clientX,A.clientY,A.currentTarget)}),R=Ps(y)?c:o;v.useEffect(()=>{if(!i){E(u);return}if(!R)return;function A(){g.current?.(),g.current=null}const k=Rn(c);function N(j){const D=tr(j);it(c,D)?A():C(j.clientX,j.clientY)}return!d.current.openEvent||wE(d.current.openEvent)?g.current=Lt(k,"mousemove",N):E(u),A},[R,i,c,d,u,e,C,E,x]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{i&&!c&&(f.current=!1)},[i,c]),v.useEffect(()=>{!i&&o&&(f.current=!0)},[i,o]);const O=v.useMemo(()=>{function A(k){h(k.pointerType)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:w,onMouseEnter:w}},[w]);return v.useMemo(()=>i?{reference:O,trigger:O}:{},[i,O])}function F4(){return!1}function B4(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ed(e,t={}){const{enabled:i=!0,escapeKey:a=!0,outsidePress:o=!0,outsidePressEvent:c="sloppy",referencePress:u=F4,bubbles:d,externalTree:f}=t,g=e.useState("open"),y=e.useState("floatingElement"),{dataRef:h,events:x}=e.context,S=Ks(f),E=Fe(typeof o=="function"?o:()=>!1),C=typeof o=="function"?E:o,w=C!==!1,R=Fe(()=>c),{escapeKey:O,outsidePress:A}=B4(d),k=v.useRef(!1),N=v.useRef(!1),j=v.useRef(!1),D=v.useRef(!1),M=v.useRef(!1),_=v.useRef(""),L=v.useRef(null),q=Un(),X=Un(),B=Un(),H=Fe(()=>{X.clear(),h.current.insideReactTree=!1}),U=Fe(I=>{const V=h.current.floatingContext?.nodeId;return(S?Us(S.nodesRef.current,V):[]).some(re=>re.context?.open&&!re.context.dataRef.current[I])}),z=Fe(I=>F0(I,e.select("floatingElement"))||F0(I,e.select("domReferenceElement"))),Q=Fe(I=>{u()&&e.setOpen(!1,ct($i,I.nativeEvent))}),$=Fe(I=>{if(!g||!i||!a||I.key!=="Escape")return;const V=vj(I)?I.nativeEvent:I;if(M.current||V.isComposing||!O&&U("__escapeKeyBubbles"))return;const J=ct(Zu,V);e.setOpen(!1,J),J.isCanceled||I.preventDefault(),!O&&!J.isPropagationAllowed&&I.stopPropagation()}),K=Fe(()=>{h.current.insideReactTree=!0,X.start(0,H)}),Y=Fe(I=>{if(!g||!i||I.button!==0)return;const V=tr(I.nativeEvent);it(e.select("floatingElement"),V)&&(k.current||(k.current=!0,N.current=!1))}),ee=Fe(I=>{!g||!i||(I.defaultPrevented||I.nativeEvent.defaultPrevented)&&k.current&&(N.current=!0)});v.useEffect(()=>{function I(V){V.open||(D.current=!1)}return x.on("openchange",I),()=>{x.off("openchange",I)}},[x]),v.useEffect(()=>H,[H]),v.useEffect(()=>{if(!g||!i)return g||(D.current=!1,M.current=!1,_.current="",L.current=null),H;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=A;const I=new ji,V=$t(y);function J(){B.clear(),M.current=!0}function re(){M.current=!0,B.start(ba?5:0,()=>{M.current=!1})}function we(){j.current=!0,I.start(0,()=>{j.current=!1})}function le(){k.current=!1,N.current=!1}function me(){const de=_.current,Ee=de==="pen"||!de?"mouse":de,Ge=R(),Me=typeof Ge=="function"?Ge():Ge;return typeof Me=="string"?Me:Me[Ee]}function ge(de){const Ee=me();return Ee==="intentional"&&de.type!=="click"||Ee==="sloppy"&&de.type==="click"}function ue(de){const Ee=h.current.floatingContext?.nodeId,Ge=S&&Us(S.nodesRef.current,Ee).some(Me=>F0(de,Me.context?.elements.floating));return z(de)||Ge}function Te(de){if(ge(de)){de.type!=="click"&&!z(de)&&(I.clear(),j.current=!1),H();return}if(h.current.insideReactTree){H();return}const Ee=tr(de),Ge=`[${Bl("inert")}]`,Me=on(Ee)?Ee.getRootNode():null,De=Array.from((Mo(Me)?Me:$t(e.select("floatingElement"))).querySelectorAll(Ge)),vt=e.context.triggerElements;if(Ee&&(vt.hasElement(Ee)||vt.hasMatchingElement(pt=>it(pt,Ee))))return;let dt=on(Ee)?Ee:null;for(;dt&&!Va(dt);){const pt=Ya(dt);if(Va(pt)||!on(pt))break;dt=pt}if(!(De.length&&on(Ee)&&!Lj(Ee)&&!it(Ee,e.select("floatingElement"))&&De.every(pt=>!it(dt,pt)))){if(vn(Ee)&&!("touches"in de)){const pt=Va(Ee),Mt=gi(Ee),jt=/auto|scroll/,en=pt||jt.test(Mt.overflowX),an=pt||jt.test(Mt.overflowY),tn=en&&Ee.clientWidth>0&&Ee.scrollWidth>Ee.clientWidth,Je=an&&Ee.clientHeight>0&&Ee.scrollHeight>Ee.clientHeight,St=Mt.direction==="rtl",Xt=Je&&(St?de.offsetX<=Ee.offsetWidth-Ee.clientWidth:de.offsetX>Ee.clientWidth),ht=tn&&de.offsetY>Ee.clientHeight;if(Xt||ht)return}if(!ue(de)){if(me()==="intentional"){if(de.detail!==0&&!Xl(de)&&!D.current)return;if(j.current){I.clear(),j.current=!1;return}}typeof C=="function"&&!C(de)||U("__outsidePressBubbles")||(e.setOpen(!1,ct(mp,de)),H())}}}function ve(de){me()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!i||z(de)||Te(de)}function Pe(de){if(me()!=="sloppy"||!e.select("open")||!i||z(de))return;const Ee=de.touches[0];Ee&&(L.current={startTime:Date.now(),startX:Ee.clientX,startY:Ee.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},q.start(1e3,()=>{L.current&&(L.current.dismissOnTouchEnd=!1,L.current.dismissOnMouseDown=!1)}))}function Ae(de,Ee){const Ge=tr(de);if(!Ge)return;const Me=Lt(Ge,de.type,()=>{Ee(de),Me()})}function Le(de){_.current="touch",Ae(de,Pe)}function Be(de){q.clear(),de.type==="pointerdown"&&(de.button===0&&(D.current=!0),_.current=de.pointerType),!(de.type==="mousedown"&&L.current&&!L.current.dismissOnMouseDown)&&Ae(de,Ee=>{Ee.type==="pointerdown"?ve(Ee):Te(Ee)})}function Oe(de){if(de.type==="pointercancel"&&(D.current=!1),!k.current)return;const Ee=N.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){Ee&&we();return}if(!ue(de)){if(Ee){we();return}typeof C=="function"&&!C(de)||(I.clear(),j.current=!0,H())}}}function Ue(de){if(me()!=="sloppy"||!L.current||z(de))return;const Ee=de.touches[0];if(!Ee)return;const Ge=Math.abs(Ee.clientX-L.current.startX),Me=Math.abs(Ee.clientY-L.current.startY),De=Math.sqrt(Ge*Ge+Me*Me);De>5&&(L.current.dismissOnTouchEnd=!0),De>10&&(Te(de),q.clear(),L.current=null)}function be(de){Ae(de,Ue)}function He(de){me()!=="sloppy"||!L.current||z(de)||(L.current.dismissOnTouchEnd&&Te(de),q.clear(),L.current=null)}function Ze(de){Ae(de,He)}const st=ga(a&&ga(Lt(V,"keydown",$),Lt(V,"compositionstart",J),Lt(V,"compositionend",re)),w&&ga(Lt(V,"click",Be,!0),Lt(V,"pointerdown",Be,!0),Lt(V,"pointerup",Oe,!0),Lt(V,"pointercancel",Oe,!0),Lt(V,"mousedown",Be,!0),Lt(V,"mouseup",Oe,!0),Lt(V,"touchstart",Le,{capture:!0,passive:!0}),Lt(V,"touchmove",be,{capture:!0,passive:!0}),Lt(V,"touchend",Ze,{capture:!0,passive:!0})));return()=>{st(),I.clear(),le(),j.current=!1}},[h,y,a,w,C,g,i,O,A,$,H,R,U,z,S,e,q,B]);const G=v.useMemo(()=>({onKeyDown:$,onPointerDown:Q,onClick:Q}),[$,Q]),oe=v.useMemo(()=>({onKeyDown:$,onPointerDown:ee,onMouseDown:ee,onClickCapture:K,onMouseDownCapture(I){K(),Y(I)},onPointerDownCapture(I){K(),Y(I)},onMouseUpCapture:K,onTouchEndCapture:K,onTouchMoveCapture:K}),[$,K,Y,ee]);return v.useMemo(()=>i?{reference:G,floating:oe,trigger:G}:{},[i,G,oe])}function RC(e){const{popupStore:t,treatPopupAsFloatingElement:i=!1,floatingRootContext:a,floatingId:o,nested:c,onOpenChange:u}=e,d=t.useState("open"),f=t.useState("activeTriggerElement"),g=t.useState(i?"popupElement":"positionerElement"),y=u;return t.useSyncedValue("floatingId",o),_e(()=>{const h={open:d,floatingId:o,referenceElement:f,floatingElement:g};on(f)&&(h.domReferenceElement=f),a.state.positionReference===a.state.referenceElement&&(h.positionReference=f),a.update(h)},[d,o,f,g,a]),a.context.onOpenChange=y,a.context.nested=c,a}function Po(e,t=!1,i=!1,a=!1){const[o,c]=v.useState(e&&t?"idle":void 0),[u,d]=v.useState(e&&!a);return e&&!u&&(d(!0),c("starting")),!e&&u&&o!=="ending"&&!i&&c("ending"),!e&&!u&&o==="ending"&&c(void 0),_e(()=>{if(!e&&u&&o!=="ending"&&i){const f=Ar.request(()=>{c("ending")});return()=>{Ar.cancel(f)}}},[e,u,o,i]),_e(()=>{if(!e||t||o===void 0)return;const f=Ar.request(()=>{c(void 0)});return()=>{Ar.cancel(f)}},[t,e,o]),_e(()=>{if(!e||!t)return;e&&u&&o!=="idle"&&c("starting");const f=Ar.request(()=>{c("idle")});return()=>{Ar.cancel(f)}},[t,e,u,o]),{mounted:u,setMounted:d,transitionStatus:o}}function RE(e,t){return e.getAnimations(t).filter(i=>{const a=i.effect?.getTiming();return a?.duration!==1/0&&a?.iterations!==1/0})}let qf=null;function V4(e){if(!qf){const t=[];qf=t,queueMicrotask(()=>{qf=null,ur.flushSync(()=>{for(const i of t)i()})})}qf.push(e)}function wp(e,t=!1,i=!1){const a=Zl();return Fe((o,c=null)=>{a.cancel();const u=Ua(e);if(u==null)return;const d=u,f=()=>{if(!i){ur.flushSync(o);return}V4(()=>{c?.aborted||o()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function g(){Promise.all(RE(d).map(y=>y.finished.then(wn))).then(()=>{c?.aborted||f()},()=>{if(c?.aborted)return;if(RE(d).some(h=>h.pending||h.playState!=="finished")){g();return}f()})}if(t){const y=xv;if(!d.hasAttribute(y)){a.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(y)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[y]}),c?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}a.request(g)})}function Ii(e){const{enabled:t=!0,open:i,ref:a,batch:o=!1,onComplete:c}=e,u=Fe(c),d=wp(a,i,o);v.useEffect(()=>{if(!t)return;const f=new AbortController;return d(u,f.signal),()=>{f.abort()}},[t,i,u,d])}function CC(e){const{open:t,ref:i,preventUnmountOnClose:a,setPreventUnmountOnClose:o,onUnmount:c,animateInitialOpen:u}=e,d=Fe(o),{mounted:f,setMounted:g,transitionStatus:y}=Po(t,!1,!1,u),h=t?!1:a;_e(()=>{t&&d(!1)},[t,d]);const x=v.useRef(f),S=v.useRef(!1),E=aC(),C=()=>{x.current=!1,g(!1),c()};_e(()=>{x.current=f,S.current&&(S.current=!1,!t&&f&&C())});const w=Fe(()=>{if(x.current){if(t){S.current=!0,E();return}C()}});return Ii({enabled:f&&!t&&!h,open:t,ref:i,onComplete(){t||w()}}),{mounted:f,transitionStatus:y,preventUnmountingOnClose:h,forceUnmount:w}}const td={tabIndex:-1,[Ry]:""};function TC(e){return t=>t==="touch"?e.current:!0}function Lv(e,t=!1){const i=ic(),a=Vs()!=null,o=er(()=>e(i,a)).current;return RC({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:i,nested:a,onOpenChange:o.setOpen}),o}function Rp({handle:e,store:t}){return _e(()=>e.attachStore(t),[e,t]),null}function CE(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function K4(e,t){const i=v.useRef(null);return Fe(a=>{const o=i.current;if(o!==null){if(o.element===a&&o.store===t&&o.id===e)return;i.current=null;const c=o.store;c.context.triggerElements.getById(o.id)===o.element&&(c.context.triggerElements.delete(o.id),CE(c))}a!==null&&e!==void 0&&(i.current={store:t,id:e,element:a},t.context.triggerElements.add(e,a),CE(t))})}function Cp(e,t,i,a=!1){let o=e.preventUnmountingOnClose;t?o=!1:a&&(o=!0);const c=i?.id??null;let u=e.activeTriggerId,d=e.activeTriggerElement;return(c||t)&&(u=c,d=i??null),{open:t,preventUnmountingOnClose:o,activeTriggerId:u,activeTriggerElement:d,openedWithoutTrigger:t?i==null:e.openedWithoutTrigger}}function Tp(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function q4(e,t,i,a={}){const o=i.reason,c=o===Kn,u=t&&o===zl,d=!t&&(o===$i||o===Zu),f=Tp(i);if(e.context.onOpenChange?.(t,i),i.isCanceled)return;a.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,i);const g=()=>{const y=Cp(e.state,t,i.trigger,f()),h={...a.extraState,...y};u?h.instantType="focus":d?h.instantType="dismiss":c&&(h.instantType=void 0),e.update(h)};c?ur.flushSync(g):g()}function zv(e,t,i,a){const o=i.useState("isMountedByTrigger",e),c=K4(e,i),u=Fe(f=>{const g=i.select("open"),y=i.select("activeTriggerId");if(y===e){const h={activeTriggerElement:f,...g?a:null};i.update(h);return}if(y==null&&g&&!i.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:f,...a};i.update(h)}}),d=Fe(f=>{c(f),f&&u(f)});return _e(()=>(d(t.current),()=>d(null)),[d,t,i,e]),_e(()=>{if(o){const f={activeTriggerElement:t.current,...a};i.update(f)}},[o,i,t,...Object.values(a)]),{registerTrigger:d,isMountedByThisTrigger:o}}function Op(e,t={}){const{closeOnActiveTriggerUnmount:i=!1}=t,a=v.useRef(null),o=e.useState("open"),c=e.useState("triggerCount"),u=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");_e(()=>{if(!o){a.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const f=e.context.triggerElements.size,g={};e.state.triggerCount!==f&&(g.triggerCount=f);const y=e.select("activeTriggerId");let h=null;if(y){const x=e.context.triggerElements.getById(y);if(x)a.current=y,x!==e.state.activeTriggerElement&&(g.activeTriggerElement=x);else{for(const[S,E]of e.context.triggerElements.entries())if(E===e.state.activeTriggerElement){g.activeTriggerId=S,g.activeTriggerElement=E,a.current=S;break}g.activeTriggerId===void 0&&(a.current===y?h=y:a.current=null)}}else a.current=null;if(!h&&!y&&!e.state.openedWithoutTrigger&&f===1){const x=e.context.triggerElements.entries().next();if(!x.done){const[S,E]=x.value;g.activeTriggerId=S,g.activeTriggerElement=E,a.current=S}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&i&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const x=ct(Mr);e.setOpen(!1,x),x.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,c,u,d,i])}function Ap(e,t,i,a){const{mounted:o,transitionStatus:c,forceUnmount:u}=CC({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>t.set("preventUnmountingOnClose",d),animateInitialOpen:a,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),i?.(),t.context.onOpenChangeComplete?.(!1)}});return er(()=>(t.set("mounted",o),null)),t.useSyncedValues({mounted:o,transitionStatus:c}),{forceUnmount:u,transitionStatus:c}}function kp(e,t){e.useSyncedValues(t),_e(()=>()=>{e.update({activeTriggerProps:Qt,inactiveTriggerProps:Qt,popupProps:Qt})},[e])}function OC(e,t){_e(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),_e(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class nd{idMap=new Map;add(t,i){this.idMap.set(t,i)}delete(t){this.idMap.delete(t)}hasElement(t){for(const i of this.idMap.values())if(i===t)return!0;return!1}hasMatchingElement(t){for(const i of this.idMap.values())if(t(i))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var q0={exports:{}},Y0={};var TE;function Y4(){if(TE)return Y0;TE=1;var e=qu();function t(h,x){return h===x&&(h!==0||1/h===1/x)||h!==h&&x!==x}var i=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function d(h,x){var S=x(),E=a({inst:{value:S,getSnapshot:x}}),C=E[0].inst,w=E[1];return c(function(){C.value=S,C.getSnapshot=x,f(C)&&w({inst:C})},[h,S,x]),o(function(){return f(C)&&w({inst:C}),h(function(){f(C)&&w({inst:C})})},[h]),u(S),S}function f(h){var x=h.getSnapshot;h=h.value;try{var S=x();return!i(h,S)}catch{return!0}}function g(h,x){return x()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return Y0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Y0}var OE;function AC(){return OE||(OE=1,q0.exports=Y4()),q0.exports}var Mp=AC(),G0={exports:{}},$0={};var AE;function G4(){if(AE)return $0;AE=1;var e=qu(),t=AC();function i(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var a=typeof Object.is=="function"?Object.is:i,o=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return $0.useSyncExternalStoreWithSelector=function(g,y,h,x,S){var E=c(null);if(E.current===null){var C={hasValue:!1,value:null};E.current=C}else C=E.current;E=d(function(){function R(j){if(!O){if(O=!0,A=j,j=x(j),S!==void 0&&C.hasValue){var D=C.value;if(S(D,j))return k=D}return k=j}if(D=k,a(A,j))return D;var M=x(j);return S!==void 0&&S(D,M)?(A=j,D):(A=j,k=M)}var O=!1,A,k,N=h===void 0?null:h;return[function(){return R(y())},N===null?void 0:function(){return R(N())}]},[y,h,x,S]);var w=o(g,E[0],E[1]);return u(function(){C.hasValue=!0,C.value=w},[w]),f(w),w},$0}var kE;function $4(){return kE||(kE=1,G0.exports=G4()),G0.exports}var Q4=$4();const X4=kv(19),Z4=X4?J4:eI;function kC(e,t,i,a,o){return Z4(e,t,i,a,o)}function W4(e,t,i,a,o){const c=v.useCallback(()=>t(e.getSnapshot(),i,a,o),[e,t,i,a,o]);return Mp.useSyncExternalStore(e.subscribe,c,c)}lj({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let i=0;i<e.syncHooks.length;i+=1){const a=e.syncHooks[i],o=a.selector(a.store.state,a.a1,a.a2,a.a3);Object.is(a.value,o)||(t=!0,a.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const i=new Set;for(const o of e.syncHooks)i.add(o.store);const a=[];for(const o of i)a.push(o.subscribe(t));return()=>{for(const o of a)o()}}),Mp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function J4(e,t,i,a,o){const c=oj();if(!c)return W4(e,t,i,a,o);const u=c.syncIndex;c.syncIndex+=1;let d;return c.didInitialize?(d=c.syncHooks[u],(d.store!==e||d.selector!==t||!Object.is(d.a1,i)||!Object.is(d.a2,a)||!Object.is(d.a3,o))&&(d.store!==e&&(c.didChangeStore=!0),d.store=e,d.selector=t,d.a1=i,d.a2=a,d.a3=o,d.value=t(e.getSnapshot(),i,a,o))):(d={store:e,selector:t,a1:i,a2:a,a3:o,value:t(e.getSnapshot(),i,a,o)},c.syncHooks.push(d)),d.value}function eI(e,t,i,a,o){return Q4.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,i,a,o))}class tI{static create(t){return new this(t)}constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const i=this.updateTick;for(const a of this.listeners){if(i!==this.updateTick)return;a(t)}}update(t){for(const i in t)if(!Object.is(this.state[i],t[i])){this.setState({...this.state,...t});return}}set(t,i){Object.is(this.state[t],i)||this.setState({...this.state,[t]:i})}notifyAll(){const t={...this.state};this.setState(t)}use(t,i,a,o){return kC(this,t,i,a,o)}}class ac extends tI{constructor(t,i={},a){super(t),this.context=i,this.selectors=a}useSyncedValue(t,i){v.useDebugValue(t);const a=this;_e(()=>{a.state[t]!==i&&a.set(t,i)},[a,t,i])}useSyncedValueWithCleanup(t,i){const a=this;_e(()=>(a.state[t]!==i&&a.set(t,i),()=>{a.set(t,void 0)}),[a,t,i])}useSyncedValues(t){const i=this,a=Object.values(t);_e(()=>{i.update(t)},[i,...a])}useControlledProp(t,i){v.useDebugValue(t);const a=this,o=i!==void 0;_e(()=>{o&&!Object.is(a.state[t],i)&&a.setState({...a.state,[t]:i})},[a,t,i,o])}select(t,i,a,o){const c=this.selectors[t];return c(this.state,i,a,o)}useState(t,i,a,o){return v.useDebugValue(t),kC(this,this.selectors[t],i,a,o)}useContextCallback(t,i){v.useDebugValue(t);const a=Fe(i??wn);this.context[t]=a}useStateSetter(t){const i=v.useRef(void 0);return i.current===void 0&&(i.current=a=>{this.set(t,a)}),i.current}observe(t,i){let a;typeof t=="function"?a=t:a=this.selectors[t];let o=a(this.state);return i(o,o,this),this.subscribe(c=>{const u=a(c);if(!Object.is(o,u)){const d=o;o=u,i(u,d,this)}})}}const nI={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class MC extends ac{constructor(t){const{syncOnly:i,nested:a,onOpenChange:o,triggerElements:c,...u}=t;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:bC(),nested:a,triggerElements:c},nI),this.syncOnly=i}syncOpenEvent=(t,i)=>{(!t||!this.state.open||i!=null&&bj(i))&&(this.context.dataRef.current.openEvent=t?i:void 0)};dispatchOpenChange=(t,i)=>{this.syncOpenEvent(t,i.event);const a={open:t,reason:i.reason,nativeEvent:i.event,nested:this.context.nested,triggerElement:i.trigger};this.context.events.emit("openchange",a)};setOpen=(t,i)=>{if(this.syncOnly){this.context.onOpenChange?.(t,i);return}this.dispatchOpenChange(t,i),this.context.onOpenChange?.(t,i)}}function Np(e,t,i=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new MC({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:i,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Qt,inactiveTriggerProps:Qt,popupProps:Qt}}const Ru=e=>e.triggerIdProp??e.activeTriggerId,_h=e=>e.openProp??e.open,ME=e=>(e.popupElement?.id??e.floatingId)||void 0;function NC(e,t){return t!==void 0&&_h(e)&&Ru(e)===t}function rI(e,t){return NC(e,t)?!0:t!==void 0&&_h(e)&&Ru(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Fa={open:_h,mounted:e=>e.mounted,transitionStatus:e=>_h(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Ru,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:ME,isTriggerActive:(e,t)=>t!==void 0&&Ru(e)===t,isOpenedByTrigger:(e,t)=>NC(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Ru(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>rI(e,t)?ME(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function _v(e){const t=v.useCallback(a=>e===void 0?wn:e.subscribeStore(a),[e]),i=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return Mp.useSyncExternalStore(t,i,()=>e?.serverStore)}function iI(e){const{open:t=!1,onOpenChange:i,elements:a={}}=e,o=ic(),c=Vs()!=null,u=er(()=>new MC({open:t,transitionStatus:void 0,onOpenChange:i,referenceElement:a.reference??null,floatingElement:a.floating??null,triggerElements:new nd,floatingId:o,syncOnly:!1,nested:c})).current;return _e(()=>{const d={open:t,floatingId:o};a.reference!==void 0&&(d.referenceElement=a.reference,d.domReferenceElement=on(a.reference)?a.reference:null),a.floating!==void 0&&(d.floatingElement=a.floating),u.update(d)},[t,o,a.reference,a.floating,u]),u.context.onOpenChange=i,u.context.nested=c,u}const Q0=hv&&ba;function DC(e,t={}){const{enabled:i=!0,delay:a}=t,{events:o,dataRef:c}=e.context,u=v.useRef(!1),d=v.useRef(null),f=v.useRef(!0),g=Un();v.useEffect(()=>{const h=e.select("domReferenceElement");if(!i)return;const x=Rn(h);function S(){const w=e.select("domReferenceElement");!e.select("open")&&vn(w)&&w===Xr($t(w))&&(u.current=!0,d.current=w)}function E(){f.current=!0}function C(){f.current=!1}return ga(Lt(x,"blur",S),Q0&&Lt(x,"keydown",E,!0),Q0&&Lt(x,"pointerdown",C,!0))},[e,i]),v.useEffect(()=>{if(!i)return;function h(x){if(x.reason===$i||x.reason===Zu){const S=e.select("domReferenceElement");on(S)&&(d.current=S,u.current=!0)}}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,i,e]);const y=v.useMemo(()=>{function h(){u.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(x){const S=x.currentTarget;if(u.current){if(d.current===S)return;h()}const E=tr(x.nativeEvent);if(on(E)){if(Q0&&!x.relatedTarget){if(!f.current&&!Xu(E))return}else if(!_j(E))return}const C=Nh(x.relatedTarget,e.context.triggerElements),{nativeEvent:w,currentTarget:R}=x;if(e.select("open")&&C||!a){e.setOpen(!0,ct(zl,w,R));return}g.start(a,()=>{u.current||e.setOpen(!0,ct(zl,w,R))})},onBlur(x){h();const S=x.relatedTarget,E=x.nativeEvent,C=on(S)&&S.hasAttribute(Bl("focus-guard"))&&S.getAttribute("data-type")==="outside";g.start(0,()=>{const w=e.select("domReferenceElement"),R=Xr($t(w));!S&&R===w||it(c.current.floatingContext?.refs.floating.current,R)||it(w,R)||C||Nh(S??R,e.context.triggerElements)||e.setOpen(!1,ct(zl,E))})}}},[c,a,e,g]);return v.useMemo(()=>i?{reference:y,trigger:y}:{},[i,y])}class Uv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new ji;restTimeout=new ji;handleCloseOptions=void 0;static create(){return new Uv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Uh=new WeakMap;function Hh(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Uh.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Uh.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function jC(e,t){const{scopeElement:i,referenceElement:a,floatingElement:o}=t,c=Uh.get(i);c&&c!==e&&Hh(c),Hh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=i,e.pointerEventsReferenceElement=a,e.pointerEventsFloatingElement=o,Uh.set(i,e),i.style.pointerEvents="none",a.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Hv(e){const t=e.context.dataRef.current,i=er(()=>t.hoverInteractionState??Uv.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=i),fv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Fv(e,t={}){const{enabled:i=!0,closeDelay:a=0,nodeId:o}=t,c=e.useState("open"),u=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:f}=e.context,g=Ks(),y=Vs(),h=Hv(e),x=Un(),S=Fe(()=>HR(f.current.openEvent?.type,h.interactedInside)),E=Fe(()=>Hj(f.current.openEvent?.type)),C=Fe(()=>{Hh(h)});_e(()=>{c||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,C())},[c,h,C]),v.useEffect(()=>C,[C]),_e(()=>{if(i&&c&&h.handleCloseOptions?.blockPointerEvents&&E()&&on(d)&&u){const w=d,R=u,O=$t(u),A=g?.nodesRef.current.find(D=>D.id===y)?.context?.elements.floating;A&&(A.style.pointerEvents="");const k=h.pointerEventsScopeElement!==R?h.pointerEventsScopeElement:null,N=A!==R?A:null,j=h.handleCloseOptions?.getScope?.()??k??N??Iu(w,"[data-rootownerid]")??O.body;return jC(h,{scopeElement:j,referenceElement:w,floatingElement:R}),()=>{C()}}},[i,c,d,u,h,E,g,y,C]),v.useEffect(()=>{if(!i)return;function w(){return!!(g&&y&&Us(g.nodesRef.current,y).length>0)}function R(D){const M=No(a,"close",h.pointerType),_=()=>{e.setOpen(!1,ct(Kn,D)),g?.events.emit("floating.closed",D)};M?h.openChangeTimeout.start(M,_):(h.openChangeTimeout.clear(),_())}function O(D){const M=tr(D);if(!zj(M)){h.interactedInside=!1;return}h.interactedInside=Iu(M,"[aria-haspopup]")!=null}function A(){h.openChangeTimeout.clear(),x.clear(),g?.events.off("floating.closed",N),C()}function k(D){if(w()&&g){g.events.on("floating.closed",N);return}if(Nh(D.relatedTarget,e.context.triggerElements))return;const M=f.current.floatingContext?.nodeId??o,_=D.relatedTarget;if(!(g&&M&&on(_)&&Us(g.nodesRef.current,M,!1).some(q=>it(q.context?.elements.floating,_)))){if(h.handler){h.handler(D);return}C(),E()&&!S()&&R(D)}}function N(D){!g||!y||w()||x.start(0,()=>{g.events.off("floating.closed",N),e.setOpen(!1,ct(Kn,D)),g.events.emit("floating.closed",D)})}const j=u;return ga(j&&Lt(j,"mouseenter",A),j&&Lt(j,"mouseleave",k),j&&Lt(j,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",N)})},[i,u,e,f,a,o,E,S,C,h,g,y,x])}const aI={current:null};function IC(e,t={}){const{enabled:i=!0,delay:a=0,handleClose:o=null,mouseOnly:c=!1,restMs:u=0,move:d=!0,triggerElementRef:f=aI,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:h,isClosing:x,shouldOpen:S,guardStaleOpen:E=!1}=t,{dataRef:C,events:w}=e.context,R=Ks(g),O=Hv(e),A=v.useRef(!1),k=Ln(o),N=Ln(a),j=Ln(u),D=Ln(i),M=Ln(S),_=Ln(x),L=Fe(()=>HR(C.current.openEvent?.type,O.interactedInside)),q=Fe(()=>M.current?.()!==!1),X=Fe((U,z,Q)=>{const $=e.context.triggerElements;if($.hasElement(z))return!U||!it(U,z);if(!on(Q))return!1;const K=Q;return $.hasMatchingElement(Y=>it(Y,K))&&(!U||!it(U,K))}),B=Fe(()=>{if(!O.handler)return;$t(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),H=Fe(()=>{Hh(O)});return y&&(O.handleCloseOptions=o?.__options),v.useEffect(()=>B,[B]),v.useEffect(()=>{if(!i)return;function U(z){z.open?A.current=!1:(A.current=z.reason===Kn,B(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return w.on("openchange",U),()=>{w.off("openchange",U)}},[i,w,O,B]),v.useEffect(()=>{if(!i)return;function U(ee,G=!0){const oe=No(N.current,"close",O.pointerType);oe?O.openChangeTimeout.start(oe,()=>{e.setOpen(!1,ct(Kn,ee)),R?.events.emit("floating.closed",ee)}):G&&(O.openChangeTimeout.clear(),e.setOpen(!1,ct(Kn,ee)),R?.events.emit("floating.closed",ee))}const z=f.current??(y?e.select("domReferenceElement"):null);if(!on(z))return;function Q(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,c&&!Ps(O.pointerType))return;const G=sE(j.current),oe=No(N.current,"open",O.pointerType),I=tr(ee),V=ee.currentTarget??null,J=e.select("domReferenceElement");let re=V;if(on(I)&&!e.context.triggerElements.hasElement(I)){for(const Ae of e.context.triggerElements.elements())if(it(Ae,I)){re=Ae;break}}on(V)&&on(J)&&!e.context.triggerElements.hasElement(V)&&it(V,J)&&(re=J);const we=re==null?!1:X(J,re,I),le=e.select("open"),me=_.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&A.current,ue=!we&&on(re)&&on(J)&&it(J,re)&&ge,Te=G>0&&!oe,ve=we&&(le||ge)||ue,Pe=!le||we;if(ve){q()&&e.setOpen(!0,ct(Kn,ee,re));return}Te||(oe?O.openChangeTimeout.start(oe,()=>{Pe&&q()&&e.setOpen(!0,ct(Kn,ee,re))}):Pe&&q()&&e.setOpen(!0,ct(Kn,ee,re)))}function $(ee){if(L()){H();return}B();const G=e.select("domReferenceElement"),oe=$t(G);O.restTimeout.clear(),O.restTimeoutPending=!1;const I=C.current.floatingContext??h?.();if(Nh(ee.relatedTarget,e.context.triggerElements))return;if(k.current&&I){e.select("open")||O.openChangeTimeout.clear();const J=f.current;O.handler=k.current({...I,tree:R,x:ee.clientX,y:ee.clientY,onClose(){H(),B(),D.current&&!L()&&J===e.select("domReferenceElement")&&U(ee,!0)}}),oe.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!it(e.select("floatingElement"),ee.relatedTarget))&&U(ee)}function K(ee){it(z,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const Y=E?Lt(z,"mouseout",K):void 0;return d?ga(Lt(z,"mousemove",Q,{once:!0}),Lt(z,"mouseenter",Q),Lt(z,"mouseleave",$),Y):ga(Lt(z,"mouseenter",Q),Lt(z,"mouseleave",$),Y)},[B,H,C,N,e,i,k,O,y,X,L,c,d,j,f,R,D,h,_,q,E]),v.useMemo(()=>{if(!i)return;function U(z){O.pointerType=z.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(z){const{nativeEvent:Q}=z,$=z.currentTarget,K=e.select("domReferenceElement"),Y=e.select("open"),ee=X(K,$,z.target);if(c&&!Ps(O.pointerType))return;if(Y&&ee&&O.handleCloseOptions?.blockPointerEvents){const I=e.select("floatingElement");if(I){const V=O.handleCloseOptions?.getScope?.()??$.ownerDocument.body;jC(O,{scopeElement:V,referenceElement:$,floatingElement:I})}}const G=sE(j.current);if(Y&&!ee||G===0||!ee&&O.restTimeoutPending&&z.movementX**2+z.movementY**2<2)return;O.restTimeout.clear();function oe(){if(O.restTimeoutPending=!1,L())return;const I=e.select("open");!O.blockMouseMove&&(!I||ee)&&q()&&e.setOpen(!0,ct(Kn,Q,$))}O.pointerType==="touch"?ur.flushSync(()=>{oe()}):ee&&Y?oe():(O.restTimeoutPending=!0,O.restTimeout.start(G,oe))}}},[i,O,L,X,c,e,j,q])}function NE(e){return ba&&e.movementX===0&&e.movementY===0}function Dp(e,t,i){switch(e){case"vertical":return t;case"horizontal":return i;default:return t||i}}function Yf(e,t){return Dp(t,e===_R||e===bv,e===hp||e===pp)}function X0(e,t,i){return Dp(t,e===bv,i?e===hp:e===pp)||e==="Enter"||e===" "||e===""}function sI(e,t,i){return Dp(t,i?e===hp:e===pp,e===bv)}function oI(e,t,i,a){const o=i?e===pp:e===hp,c=e===_R;return t==="both"||t==="horizontal"&&a?e==="Escape":Dp(t,o,c)}function PC(e,t){const{listRef:i,activeIndex:a,onNavigate:o=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loopFocus:f=!1,nested:g=!1,rtl:y=!1,virtual:h=!1,focusItemOnOpen:x="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:E=!0,disabledIndices:C=void 0,orientation:w="vertical",triggerOrientation:R=w,parentOrientation:O,id:A,resetOnPointerLeave:k=!0,externalTree:N,nestedReturnFocusRef:j,grid:D}=t,M=D!=null,_=e.useState("open"),L=e.useState("floatingElement"),q=e.useState("domReferenceElement"),X=e.context.dataRef,B=Dh(L),H=Ty(q),U=Ln(B),z=Vs(),Q=Ks(N),$=v.useRef(x),K=v.useRef(u??-1),Y=v.useRef(null),ee=v.useRef(!0),G=Fe(de=>{o(K.current===-1?null:K.current,de)}),oe=v.useRef(!!L),I=v.useRef(_),V=v.useRef(!1),J=v.useRef(!1),re=v.useRef(null),we=Ln(C),le=Ln(_),me=Ln(u),ge=Ln(k),ue=Zl(),Te=Zl(),ve=Fe(()=>{ue.cancel();function de(De){h||(re.current=gh(De,{sync:V.current,preventScroll:!0}))}const Ee=i.current[K.current],Ge=J.current;Ee&&de(Ee),(V.current?De=>De():De=>ue.request(De))(()=>{const De=i.current[K.current]||Ee;if(!De)return;Ee||de(De),Ue&&(Ge||!ee.current)&&De.scrollIntoView?.({block:"nearest",inline:"nearest"})})});_e(()=>{X.current.orientation=w},[X,w]),_e(()=>{_||(Y.current=null),(!_||x!=="auto")&&($.current=x)},[_,x]),_e(()=>{c&&(_&&L?(K.current=u??-1,$.current&&u!=null&&(J.current=!0,G())):oe.current&&(K.current=-1,G()))},[c,_,L,u,G]),_e(()=>{if(c){if(!_){V.current=!1;return}if(L)if(a==null){if(V.current=!1,me.current!=null)return;if(oe.current&&(K.current=-1,ve()),(!I.current||!oe.current)&&$.current&&(Y.current!=null||$.current===!0&&Y.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?Me=>Te.request(Me):queueMicrotask)(Ee),de+=1):(K.current=Y.current==null||X0(Y.current,R,y)||g?ph(i):Ay(i),Y.current=null,G())};Ee()}}else _l(i.current,a)||(K.current=a,ve(),J.current=!1)}},[c,_,L,a,me,g,i,R,y,G,ve,Te]),_e(()=>{if(!c||L||!Q||h||!oe.current)return;const de=Q.nodesRef.current,Ee=de.find(De=>De.id===z)?.context?.elements.floating,Ge=Xr($t(q??Ee??null)),Me=de.some(De=>De.context&&it(De.context.elements.floating,Ge));Ee&&!Me&&ee.current&&Ee.focus({preventScroll:!0})},[c,L,q,Q,z,h]),_e(()=>{I.current=_,oe.current=!!L});const Pe=a!=null,Ae=Fe(de=>{if(!le.current)return;const Ee=i.current.indexOf(de.currentTarget);Ee!==-1&&(K.current!==Ee||a!==Ee)&&(K.current=Ee,G(de))}),Le=Fe(()=>O??Q?.nodesRef.current.find(de=>de.id===z)?.context?.dataRef?.current.orientation),Be=Fe(()=>ph(i,we.current)),Oe=Fe(de=>{if(ee.current=!1,V.current=!0,de.which===229||!le.current&&de.currentTarget===U.current)return;if(g&&oI(de.key,w,y,M)){Yf(de.key,Le())||qi(de),e.setOpen(!1,ct(jh,de.nativeEvent));const De=j?.current??q;vn(De)&&De.focus();return}a!=null&&a!==K.current&&!_l(i.current,a)&&(K.current=a);const Ee=K.current,Ge=ph(i,C),Me=Ay(i,C);if(H||(de.key==="Home"&&(qi(de),K.current=Ge,G(de)),de.key==="End"&&(qi(de),K.current=Me,G(de))),D!=null){const De=D(de,K.current,i,w,f,y,C,Ge,Me);if(De!=null&&De!==K.current&&(K.current=De,G(de)),w==="both")return}if(Yf(de.key,w)){qi(de);const De=Xr(de.currentTarget.ownerDocument);if(_&&!h&&it(de.currentTarget,De)&&!i.current.some(pt=>pt!=null&&it(pt,De))){K.current=X0(de.key,w,y)?Ge:Me,G(de),a===K.current&&ve();return}const{index:vt,wrapped:dt}=u4(i.current,Ee,{decrement:!X0(de.key,w,y),loopFocus:f,allowEscape:d,disabledIndices:C,minIndex:Ge,maxIndex:Me});dt&&(V.current=!1),K.current=vt,G(de)}}),Ue=v.useMemo(()=>({onFocus(Ee){V.current=!0,Ae(Ee)},onClick({currentTarget:Ee}){h||Ee.focus({preventScroll:!0})},onMouseMove(Ee){NE(Ee)||(V.current=!0,J.current=!1,S&&Ae(Ee))},onPointerLeave(Ee){if(!le.current||!ee.current||Ee.pointerType==="touch")return;V.current=!0;const Ge=Ee.relatedTarget;if(!(!S||i.current.includes(Ge))&&ge.current&&(re.current?.(),re.current=null,K.current=-1,G(Ee),!h)){const Me=U.current,De=Xr($t(Me));Me&&it(Me,De)&&Me.focus({preventScroll:!0})}}}),[Ae,le,U,S,i,G,ge,h]),be=v.useMemo(()=>h&&_&&Pe&&{"aria-activedescendant":`${A}-${a}`},[h,_,Pe,A,a]),He=v.useMemo(()=>({...H?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&_&&!h){const Ee=tr(de.nativeEvent);if(Ee&&!it(U.current,Ee))return;qi(de);const Ge=ct(zs,de.nativeEvent);e.setOpen(!1,Ge);const Me=j?.current??q;!Ge.isCanceled&&vn(Me)&&Me.focus();return}Oe(de)},onPointerMove(de){NE(de)||(ee.current=!0)}}),[be,Oe,U,H,e,_,h,q,j]),Ze=v.useMemo(()=>{function de(Me){e.setOpen(!0,ct(jh,Me.nativeEvent,Me.currentTarget))}function Ee(Me){x==="auto"&&Xl(Me.nativeEvent)&&($.current=!h)}function Ge(Me){$.current=x,x==="auto"&&gv(Me.nativeEvent)&&($.current=!0)}return{onKeyDown(Me){const De=e.select("open");ee.current=!1;const vt=Me.key.startsWith("Arrow"),dt=sI(Me.key,Le(),y),pt=Yf(Me.key,De?w:R),Mt=(g?dt:pt)||Me.key==="Enter"||Me.key.trim()==="";if(h&&De&&(!g||Xu(Me.currentTarget)))return Oe(Me);if(!(!De&&!E&&vt)){if(Mt){const jt=Yf(Me.key,Le());Y.current=g&&jt?null:Me.key}if(g){dt&&(qi(Me),De?(K.current=Be(),G(Me),h&&U.current?.focus()):de(Me));return}pt&&(me.current!=null&&(K.current=me.current),qi(Me),!De&&E?de(Me):Oe(Me),De&&G(Me))}},onFocus(Me){Me.target===Me.currentTarget&&e.select("open")&&!h&&(K.current=-1,G(Me))},onPointerDown:Ge,onPointerEnter:Ge,onMouseDown:Ee,onClick:Ee}},[Oe,x,Be,g,G,e,E,w,R,Le,y,me,h,U]),st=v.useMemo(()=>({...be,...Ze}),[be,Ze]);return v.useMemo(()=>c?{reference:st,floating:He,item:Ue,trigger:Ze}:{},[c,st,He,Ze,Ue])}function LC(e,t){const{listRef:i,elementsRef:a,activeIndex:o,onMatch:c,disabledIndices:u,onTyping:d,enabled:f=!0,resetMs:g=750,selectedIndex:y=null}=t,h=Fe(d),x=e.useState("open"),S=Un(),E=v.useRef(""),C=v.useRef(y??o??-1),w=v.useRef(null),R=Fe(k=>{function N(H){return a?.current[H]}function j(H){const U=N(H);return U&&!vp(U)||U?.matches(":disabled")?!1:u==null||!Hl(Gi,H,u)}function D(H,U,z=0){if(H.length===0)return-1;const Q=(z%H.length+H.length)%H.length,$=U.toLowerCase();for(let K=0;K<H.length;K+=1){const Y=(Q+K)%H.length;if(!(!H[Y]?.toLowerCase().startsWith($)||!j(Y)))return Y}return-1}const M=i.current;if(E.current.length>0&&k.key===" "&&(qi(k),h?.(!0)),E.current.length>0&&E.current[0]!==" "&&D(M,E.current)===-1&&k.key!==" "&&h?.(!1),M==null||k.key.length!==1||k.ctrlKey||k.metaKey||k.altKey)return;x&&k.key!==" "&&(qi(k),h?.(!0));const _=E.current==="";_&&(C.current=y??o??-1),M.every((H,U)=>H&&j(U)?H[0]?.toLowerCase()!==H[1]?.toLowerCase():!0)&&E.current===k.key&&(E.current="",C.current=w.current),E.current+=k.key,S.start(g,()=>{E.current="",C.current=w.current,h?.(!1)});const X=((_?y??o??-1:C.current)??0)+1,B=D(M,E.current,X);B!==-1?(c?.(B,k),w.current=B):k.key!==" "&&(E.current="",h?.(!1))}),O=Fe(k=>{const N=k.relatedTarget,j=e.select("domReferenceElement"),D=e.select("floatingElement");it(j,N)||it(D,N)||(S.clear(),E.current="",C.current=w.current,h?.(!1))});_e(()=>{!x&&y!==null||(S.clear(),w.current=null,E.current!==""&&(E.current="",h?.(!1)))},[x,y,S,h]);const A=v.useMemo(()=>({onKeyDown:R,onBlur:O}),[R,O]);return v.useMemo(()=>f?{reference:A,floating:A}:{},[f,A])}const DE=.1,lI=DE*DE,En=.5;function Gf(e,t,i,a,o,c){return a>=t!=c>=t&&e<=(o-i)*(t-a)/(c-a)+i}function $f(e,t,i,a,o,c,u,d,f,g){let y=!1;return Gf(e,t,i,a,o,c)&&(y=!y),Gf(e,t,o,c,u,d)&&(y=!y),Gf(e,t,u,d,f,g)&&(y=!y),Gf(e,t,f,g,i,a)&&(y=!y),y}function cI(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}function Qf(e,t,i,a,o,c){const u=Math.min(i,o),d=Math.max(i,o),f=Math.min(a,c),g=Math.max(a,c);return e>=u&&e<=d&&t>=f&&t<=g}function zC(e={}){const{blockPointerEvents:t=!1}=e,i=new ji,a=({x:o,y:c,placement:u,elements:d,onClose:f,nodeId:g,tree:y})=>{const h=u?.split("-")[0];let x=!1,S=null,E=null,C=typeof performance<"u"?performance.now():0;function w(O,A){const k=performance.now(),N=k-C;if(S===null||E===null||N===0)return S=O,E=A,C=k,!1;const j=O-S,D=A-E,M=j*j+D*D,_=N*N*lI;return S=O,E=A,C=k,M<_}function R(){i.clear(),f()}return function(A){i.clear();const k=d.domReference,N=d.floating;if(!k||!N||h==null||o==null||c==null)return;const{clientX:j,clientY:D}=A,M=tr(A),_=A.type==="mouseleave",L=it(N,M),q=it(k,M);if(L&&(x=!0,!_))return;if(q&&(x=!1,!_)){x=!0;return}if(_&&on(A.relatedTarget)&&it(N,A.relatedTarget))return;function X(){return!!(y&&Us(y.nodesRef.current,g).length>0)}function B(){X()||R()}if(X())return;const H=k.getBoundingClientRect(),U=N.getBoundingClientRect(),z=o>U.right-U.width/2,Q=c>U.bottom-U.height/2,$=U.width>H.width,K=U.height>H.height,Y=($?H:U).left,ee=($?H:U).right,G=(K?H:U).top,oe=(K?H:U).bottom;if(h==="top"&&c>=H.bottom-1||h==="bottom"&&c<=H.top+1||h==="left"&&o>=H.right-1||h==="right"&&o<=H.left+1){B();return}let I=!1;switch(h){case"top":I=Qf(j,D,Y,H.top+1,ee,U.bottom-1);break;case"bottom":I=Qf(j,D,Y,U.top+1,ee,H.bottom-1);break;case"left":I=Qf(j,D,U.right-1,oe,H.left+1,G);break;case"right":I=Qf(j,D,H.right-1,oe,U.left+1,G);break}if(I)return;if(x&&!cI(j,D,H)){B();return}if(!_&&w(j,D)){B();return}let V=!1;switch(h){case"top":{const J=$?En/2:En*4,re=$||z?o+J:o-J,we=$?o-J:z?o+J:o-J,le=c+En+1,me=z||$?U.bottom-En:U.top,ge=z?$?U.bottom-En:U.top:U.bottom-En;V=$f(j,D,re,le,we,le,U.left,me,U.right,ge);break}case"bottom":{const J=$?En/2:En*4,re=$||z?o+J:o-J,we=$?o-J:z?o+J:o-J,le=c-En,me=z||$?U.top+En:U.bottom,ge=z?$?U.top+En:U.bottom:U.top+En;V=$f(j,D,re,le,we,le,U.left,me,U.right,ge);break}case"left":{const J=K?En/2:En*4,re=K||Q?c+J:c-J,we=K?c-J:Q?c+J:c-J,le=o+En+1,me=Q||K?U.right-En:U.left,ge=Q?K?U.right-En:U.left:U.right-En;V=$f(j,D,me,U.top,ge,U.bottom,le,re,le,we);break}case"right":{const J=K?En/2:En*4,re=K||Q?c+J:c-J,we=K?c-J:Q?c+J:c-J,le=o-En,me=Q||K?U.left+En:U.right,ge=Q?K?U.left+En:U.right:U.left+En;V=$f(j,D,le,re,le,we,me,U.top,ge,U.bottom);break}}V?x||i.start(40,B):B()}};return a.__options={...e,blockPointerEvents:t},a}function jE(e,t,i){let{reference:a,floating:o}=e;const c=Ni(t),u=Tv(t),d=Cv(u),f=pi(t),g=c==="y",y=a.x+a.width/2-o.width/2,h=a.y+a.height/2-o.height/2,x=a[d]/2-o[d]/2;let S;switch(f){case"top":S={x:y,y:a.y-o.height};break;case"bottom":S={x:y,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:h};break;case"left":S={x:a.x-o.width,y:h};break;default:S={x:a.x,y:a.y}}const E=ma(t);return E&&(S[u]+=x*(E==="end"?1:-1)*(i&&g?-1:1)),S}async function uI(e,t){var i;t===void 0&&(t={});const{x:a,y:o,platform:c,rects:u,elements:d,strategy:f}=e,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:h="floating",altBoundary:x=!1,padding:S=0}=_s(t,e),E=$R(S),w=d[x?h==="floating"?"reference":"floating":h],R=Pu(await c.getClippingRect({element:(i=await(c.isElement==null?void 0:c.isElement(w)))==null||i?w:w.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(d.floating)),boundary:g,rootBoundary:y,strategy:f})),O=h==="floating"?{x:a,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d.floating)),k=await(c.isElement==null?void 0:c.isElement(A))&&await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1},N=Pu(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:A,strategy:f}):O);return{top:(R.top-N.top+E.top)/k.y,bottom:(N.bottom-R.bottom+E.bottom)/k.y,left:(R.left-N.left+E.left)/k.x,right:(N.right-R.right+E.right)/k.x}}const dI=50,fI=async(e,t,i)=>{const{placement:a="bottom",strategy:o="absolute",middleware:c=[],platform:u}=i,d=u.detectOverflow?u:{...u,detectOverflow:uI},f=await(u.isRTL==null?void 0:u.isRTL(t));let g=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:h}=jE(g,a,f),x=a,S=0;const E={};for(let C=0;C<c.length;C++){const w=c[C];if(!w)continue;const{name:R,fn:O}=w,{x:A,y:k,data:N,reset:j}=await O({x:y,y:h,initialPlacement:a,placement:x,strategy:o,middlewareData:E,rects:g,platform:d,elements:{reference:e,floating:t}});y=A??y,h=k??h,E[R]={...E[R],...N},j&&S<dI&&(S++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(g=j.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:y,y:h}=jE(g,x,f)),C=-1)}return{x:y,y:h,placement:x,strategy:o,middlewareData:E}},hI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,a;const{placement:o,middlewareData:c,rects:u,initialPlacement:d,platform:f,elements:g}=t,{mainAxis:y=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...w}=_s(e,t);if((i=c.arrow)!=null&&i.alignmentOffset)return{};const R=pi(o),O=Ni(d),A=pi(d)===d,k=await(f.isRTL==null?void 0:f.isRTL(g.floating)),N=x||(A||!C?[Ph(d)]:i4(d)),j=E!=="none";!x&&j&&N.push(...l4(d,C,E,k));const D=[d,...N],M=await f.detectOverflow(t,w),_=[];let L=((a=c.flip)==null?void 0:a.overflows)||[];if(y&&_.push(M[R]),h){const H=r4(o,u,k);_.push(M[H[0]],M[H[1]])}if(L=[...L,{placement:o,overflows:_}],!_.every(H=>H<=0)){var q,X;const H=(((q=c.flip)==null?void 0:q.index)||0)+1,U=D[H];if(U&&(!(h==="alignment"?O!==Ni(U):!1)||L.every($=>Ni($.placement)===O?$.overflows[0]>0:!0)))return{data:{index:H,overflows:L},reset:{placement:U}};let z=(X=L.filter(Q=>Q.overflows[0]<=0).sort((Q,$)=>Q.overflows[1]-$.overflows[1])[0])==null?void 0:X.placement;if(!z)switch(S){case"bestFit":{var B;const Q=(B=L.filter($=>{if(j){const K=Ni($.placement);return K===O||K==="y"}return!0}).map($=>[$.placement,$.overflows.filter(K=>K>0).reduce((K,Y)=>K+Y,0)]).sort(($,K)=>$[1]-K[1])[0])==null?void 0:B[0];Q&&(z=Q);break}case"initialPlacement":z=d;break}if(o!==z)return{reset:{placement:z}}}return{}}}},_C=new Set(["left","top"]);async function pI(e,t){const{placement:i,platform:a,elements:o}=e,c=await(a.isRTL==null?void 0:a.isRTL(o.floating)),u=pi(i),d=ma(i),f=Ni(i)==="y",g=_C.has(u)?-1:1,y=c&&f?-1:1,h=_s(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:E}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof E=="number"&&(S=d==="end"?E*-1:E),f?{x:S*y,y:x*g}:{x:x*g,y:S*y}}const gI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,a;const{x:o,y:c,placement:u,middlewareData:d}=t,f=await pI(t,e);return u===((i=d.offset)==null?void 0:i.placement)&&(a=d.arrow)!=null&&a.alignmentOffset?{}:{x:o+f.x,y:c+f.y,data:{...f,placement:u}}}}},mI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:a,placement:o,platform:c}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:f={fn:O=>{let{x:A,y:k}=O;return{x:A,y:k}}},...g}=_s(e,t),y={x:i,y:a},h=await c.detectOverflow(t,g),x=Ni(o),S=Rv(x);let E=y[S],C=y[x];const w=(O,A)=>GR(A+h[O==="y"?"top":"left"],A,A-h[O==="y"?"bottom":"right"]);u&&(E=w(S,E)),d&&(C=w(x,C));const R=f.fn({...t,[S]:E,[x]:C});return{...R,data:{x:R.x-i,y:R.y-a,enabled:{[S]:u,[x]:d}}}}}},yI=function(e){return e===void 0&&(e={}),{options:e,fn(t){var i,a;const{x:o,y:c,placement:u,rects:d,middlewareData:f}=t,{offset:g=0,mainAxis:y=!0,crossAxis:h=!0}=_s(e,t),x={x:o,y:c},S=Ni(u),E=Rv(S);let C=x[E],w=x[S];const R=_s(g,t),O=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(i=R.mainAxis)!=null?i:0,crossAxis:(a=R.crossAxis)!=null?a:0};if(y){const N=E==="y"?"height":"width",j=d.reference[E]-d.floating[N]+O.mainAxis,D=d.reference[E]+d.reference[N]-O.mainAxis;C<j?C=j:C>D&&(C=D)}if(h){var A,k;const N=E==="y"?"width":"height",j=_C.has(pi(u)),D=d.reference[S]-d.floating[N]+(j&&((A=f.offset)==null?void 0:A[S])||0)+(j?0:O.crossAxis),M=d.reference[S]+d.reference[N]+(j?0:((k=f.offset)==null?void 0:k[S])||0)-(j?O.crossAxis:0);w<D?w=D:w>M&&(w=M)}return{[E]:C,[S]:w}}}},vI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:i,rects:a,platform:o,elements:c}=t,{apply:u=()=>{},...d}=_s(e,t),f=await o.detectOverflow(t,d),g=pi(i),y=ma(i),h=Ni(i)==="y",{width:x,height:S}=a.floating;let E,C;g==="top"||g==="bottom"?(E=g,C=y===(await(o.isRTL==null?void 0:o.isRTL(c.floating))?"start":"end")?"left":"right"):(C=g,E=y==="end"?"top":"bottom");const w=S-f.top-f.bottom,R=x-f.left-f.right,O=Jl(S-f[E],w),A=Jl(x-f[C],R),k=t.middlewareData.shift,N=!k;let j=O,D=A;k!=null&&k.enabled.x&&(D=R),k!=null&&k.enabled.y&&(j=w),N&&!y&&(h?D=x-2*Ka(f.left,f.right):j=S-2*Ka(f.top,f.bottom)),await u({...t,availableWidth:D,availableHeight:j});const M=await o.getDimensions(c.floating);return x!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function UC(e){const t=gi(e);let i=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=vn(e),c=o?e.offsetWidth:i,u=o?e.offsetHeight:a,d=Ih(i)!==c||Ih(a)!==u;return d&&(i=c,a=u),{width:i,height:a,$:d}}function Bv(e){return on(e)?e:e.contextElement}function Vl(e){const t=Bv(e);if(!vn(t))return qa(1);const i=t.getBoundingClientRect(),{width:a,height:o,$:c}=UC(t);let u=(c?Ih(i.width):i.width)/a,d=(c?Ih(i.height):i.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const bI=qa(0);function HC(e){const t=Rn(e);return!vv()||!t.visualViewport?bI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xI(e,t,i){return t===void 0&&(t=!1),!!i&&t&&i===Rn(e)}function Do(e,t,i,a){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),c=Bv(e);let u=qa(1);t&&(a?on(a)&&(u=Vl(a)):u=Vl(e));const d=xI(c,i,a)?HC(c):qa(0);let f=(o.left+d.x)/u.x,g=(o.top+d.y)/u.y,y=o.width/u.x,h=o.height/u.y;if(c&&a){const x=Rn(c),S=on(a)?Rn(a):a;let E=x,C=wy(E);for(;C&&S!==E;){const w=Vl(C),R=C.getBoundingClientRect(),O=gi(C),A=R.left+(C.clientLeft+parseFloat(O.paddingLeft))*w.x,k=R.top+(C.clientTop+parseFloat(O.paddingTop))*w.y;f*=w.x,g*=w.y,y*=w.x,h*=w.y,f+=A,g+=k,E=Rn(C),C=wy(E)}}return Pu({width:y,height:h,x:f,y:g})}function jp(e,t){const i=fp(e).scrollLeft;return t?t.left+i:Do(Xa(e)).left+i}function FC(e,t){const i=e.getBoundingClientRect(),a=i.left+t.scrollLeft-jp(e,i),o=i.top+t.scrollTop;return{x:a,y:o}}function SI(e){let{elements:t,rect:i,offsetParent:a,strategy:o}=e;const c=o==="fixed",u=Xa(a),d=t?dp(t.floating):!1;if(a===u||d&&c)return i;let f={scrollLeft:0,scrollTop:0},g=qa(1);const y=qa(0),h=vn(a);if((h||!c)&&((Rr(a)!=="body"||$u(u))&&(f=fp(a)),h)){const S=Do(a);g=Vl(a),y.x=S.x+a.clientLeft,y.y=S.y+a.clientTop}const x=u&&!h&&!c?FC(u,f):qa(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-f.scrollLeft*g.x+y.x+x.x,y:i.y*g.y-f.scrollTop*g.y+y.y+x.y}}function EI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function wI(e){const t=fp(e),i=e.ownerDocument.body,a=Ka(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Ka(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let c=-t.scrollLeft+jp(e);const u=-t.scrollTop;return gi(i).direction==="rtl"&&(c+=Ka(e.clientWidth,i.clientWidth)-a),{width:a,height:o,x:c,y:u}}const RI=25;function CI(e,t,i){i===void 0&&(i="viewport");const a=i==="layoutViewport",o=Rn(e),c=Xa(e),u=o.visualViewport;let d=c.clientWidth,f=c.clientHeight,g=0,y=0;if(u){const x=!vv()||t==="fixed";a?x||(g=-u.offsetLeft,y=-u.offsetTop):(d=u.width,f=u.height,x&&(g=u.offsetLeft,y=u.offsetTop))}if(jp(c)<=0){const x=c.ownerDocument,S=x.body,E=getComputedStyle(S),C=x.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,w=Math.abs(c.clientWidth-S.clientWidth-C),R=getComputedStyle(c).scrollbarGutter==="stable both-edges"?w/2:w;R<=RI&&(d-=R)}return{width:d,height:f,x:g,y}}function TI(e,t){const i=Do(e,!0,t==="fixed"),a=i.top+e.clientTop,o=i.left+e.clientLeft,c=Vl(e),u=e.clientWidth*c.x,d=e.clientHeight*c.y,f=o*c.x,g=a*c.y;return{width:u,height:d,x:f,y:g}}function IE(e,t,i){let a;if(t==="viewport"||t==="layoutViewport")a=CI(e,i,t);else if(t==="document")a=wI(Xa(e));else if(on(t))a=TI(t,i);else{const o=HC(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pu(a)}function OI(e,t){const i=t.get(e);if(i)return i;let a=ju(e,[],!1).filter(d=>on(d)&&Rr(d)!=="body"),o=null;const c=gi(e).position==="fixed";let u=c?Ya(e):e;for(;on(u)&&!Va(u);){const d=gi(u),f=yv(u),g=o?o.position:c?"fixed":"";!f&&(g==="fixed"||g==="absolute"&&d.position==="static")?a=a.filter(h=>h!==u):o=d,u=Ya(u)}return t.set(e,a),a}function AI(e){let{element:t,boundary:i,rootBoundary:a,strategy:o}=e;const u=[...i==="clippingAncestors"?dp(t)?[]:OI(t,this._c):[].concat(i),a],d=IE(t,u[0],o);let f=d.top,g=d.right,y=d.bottom,h=d.left;for(let x=1;x<u.length;x++){const S=IE(t,u[x],o);f=Ka(S.top,f),g=Jl(S.right,g),y=Jl(S.bottom,y),h=Ka(S.left,h)}return{width:g-h,height:y-f,x:h,y:f}}function kI(e){const{width:t,height:i}=UC(e);return{width:t,height:i}}function MI(e,t,i){const a=vn(t),o=Xa(t),c=i==="fixed",u=Do(e,!0,c,t);let d={scrollLeft:0,scrollTop:0};const f=qa(0);if((a||!c)&&((Rr(t)!=="body"||$u(o))&&(d=fp(t)),a)){const x=Do(t,!0,c,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}!a&&o&&(f.x=jp(o));const g=o&&!a&&!c?FC(o,d):qa(0),y=u.left+d.scrollLeft-f.x-g.x,h=u.top+d.scrollTop-f.y-g.y;return{x:y,y:h,width:u.width,height:u.height}}function Z0(e){return gi(e).position==="static"}function PE(e,t){if(!vn(e)||gi(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return Xa(e)===i&&(i=i.ownerDocument.body),i}function BC(e,t){const i=Rn(e);if(dp(e))return i;if(!vn(e)){let o=Ya(e);for(;o&&!Va(o);){if(on(o)&&!Z0(o))return o;o=Ya(o)}return i}let a=PE(e,t);for(;a&&xj(a)&&Z0(a);)a=PE(a,t);return a&&Va(a)&&Z0(a)&&!yv(a)?i:a||wj(e)||i}const NI=async function(e){const t=this.getOffsetParent||BC,i=this.getDimensions,a=await i(e.floating);return{reference:MI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function DI(e){return gi(e).direction==="rtl"}const VC={convertOffsetParentRelativeRectToViewportRelativeRect:SI,getDocumentElement:Xa,getClippingRect:AI,getOffsetParent:BC,getElementRects:NI,getClientRects:EI,getDimensions:kI,getScale:Vl,isElement:on,isRTL:DI};function KC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jI(e,t,i){let a=null,o;const c=Xa(e);function u(){var y;clearTimeout(o),(y=a)==null||y.disconnect(),a=null}function d(y,h){y===void 0&&(y=!1),h===void 0&&(h=1),u();const x=e.getBoundingClientRect(),{left:S,top:E,width:C,height:w}=x;if(y||t(),!C||!w)return;const R=Bf(E),O=Bf(c.clientWidth-(S+C)),A=Bf(c.clientHeight-(E+w)),k=Bf(S),j={rootMargin:-R+"px "+-O+"px "+-A+"px "+-k+"px",threshold:Ka(0,Jl(1,h))||1};let D=!0;function M(_){const L=_[0].intersectionRatio;if(!KC(x,e.getBoundingClientRect()))return d();if(L!==h){if(!D)return d();L?d(!1,L):o=setTimeout(()=>{d(!1,1e-7)},1e3)}D=!1}try{a=new IntersectionObserver(M,{...j,root:c.ownerDocument})}catch{a=new IntersectionObserver(M,j)}a.observe(e)}const f=Rn(e),g=()=>d(i);return f.addEventListener("resize",g),d(!0),()=>{f.removeEventListener("resize",g),u()}}function LE(e,t,i,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=a,g=Bv(e),y=o||c?[...g?ju(g):[],...t?ju(t):[]]:[];y.forEach(R=>{o&&R.addEventListener("scroll",i),c&&R.addEventListener("resize",i)});const h=g&&d?jI(g,i,c):null;let x=-1,S=null;u&&(S=new ResizeObserver(R=>{let[O]=R;O&&O.target===g&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=S)==null||A.observe(t)})),i()}),g&&!f&&S.observe(g),t&&S.observe(t));let E,C=f?Do(e):null;f&&w();function w(){const R=Do(e);C&&!KC(C,R)&&i(),C=R,E=requestAnimationFrame(w)}return i(),()=>{var R;y.forEach(O=>{o&&O.removeEventListener("scroll",i),c&&O.removeEventListener("resize",i)}),h?.(),(R=S)==null||R.disconnect(),S=null,f&&cancelAnimationFrame(E)}}const II=gI,PI=mI,LI=hI,zI=vI,_I=yI,UI=(e,t,i)=>{const a=new Map,o=i??{},c={...VC,...o.platform,_c:a};return fI(e,t,{...o,platform:c})};var HI=typeof document<"u",FI=function(){},mh=HI?v.useLayoutEffect:FI;function Fh(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 i,a,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(a=i;a--!==0;)if(!Fh(e[a],t[a]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(a=i;a--!==0;)if(!{}.hasOwnProperty.call(t,o[a]))return!1;for(a=i;a--!==0;){const c=o[a];if(!(c==="_owner"&&e.$$typeof)&&!Fh(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function qC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zE(e,t){const i=qC(e);return Math.round(t*i)/i}function W0(e){const t=v.useRef(e);return mh(()=>{t.current=e}),t}function BI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:a=[],platform:o,elements:{reference:c,floating:u}={},transform:d=!0,whileElementsMounted:f,open:g}=e,[y,h]=v.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=v.useState(a);Fh(x,a)||S(a);const[E,C]=v.useState(null),[w,R]=v.useState(null),O=v.useCallback($=>{$!==j.current&&(j.current=$,C($))},[]),A=v.useCallback($=>{$!==D.current&&(D.current=$,R($))},[]),k=c||E,N=u||w,j=v.useRef(null),D=v.useRef(null),M=v.useRef(y),_=f!=null,L=W0(f),q=W0(o),X=W0(g),B=v.useCallback(()=>{if(!j.current||!D.current)return;const $={placement:t,strategy:i,middleware:x};q.current&&($.platform=q.current),UI(j.current,D.current,$).then(K=>{const Y={...K,isPositioned:X.current!==!1};H.current&&!Fh(M.current,Y)&&(M.current=Y,ur.flushSync(()=>{h(Y)}))})},[x,t,i,q,X]);mh(()=>{g===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[g]);const H=v.useRef(!1);mh(()=>(H.current=!0,()=>{H.current=!1}),[]),mh(()=>{if(k&&(j.current=k),N&&(D.current=N),k&&N){if(L.current)return L.current(k,N,B);B()}},[k,N,B,L,_]);const U=v.useMemo(()=>({reference:j,floating:D,setReference:O,setFloating:A}),[O,A]),z=v.useMemo(()=>({reference:k,floating:N}),[k,N]),Q=v.useMemo(()=>{const $={position:i,left:0,top:0};if(!z.floating)return $;const K=zE(z.floating,y.x),Y=zE(z.floating,y.y);return d?{...$,transform:"translate("+K+"px, "+Y+"px)",...qC(z.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:K,top:Y}},[i,d,z.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:B,refs:U,elements:z,floatingStyles:Q}),[y,B,U,z,Q])}const VI=(e,t)=>{const i=II(e);return{name:i.name,fn:i.fn,options:[e,t]}},KI=(e,t)=>{const i=PI(e);return{name:i.name,fn:i.fn,options:[e,t]}},qI=(e,t)=>({fn:_I(e).fn,options:[e,t]}),YI=(e,t)=>{const i=LI(e);return{name:i.name,fn:i.fn,options:[e,t]}},GI=(e,t)=>{const i=zI(e);return{name:i.name,fn:i.fn,options:[e,t]}},$I={...Fa,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class QI extends ac{constructor(t,i,a){const o=new nd;super(XI(t,o,i,a),ZI(o),$I)}setOpen=(t,i)=>{q4(this,t,i,{extraState:{openChangeReason:i.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,ct($i,t))}}function XI(e,t,i,a=!1){return{...Np(t,i,a),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function ZI(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const WI=Yu(function(t){const{disabled:i=!1,defaultOpen:a=!1,open:o,disableHoverablePopup:c=!1,trackCursorAxis:u="none",actionsRef:d,onOpenChange:f,onOpenChangeComplete:g,handle:y,triggerId:h,defaultTriggerId:x=null,children:S}=t,E=Lv((q,X)=>new QI({open:a,openProp:o,activeTriggerId:x,triggerIdProp:h},q,X));E.useControlledProp("openProp",o),E.useControlledProp("triggerIdProp",h),E.useContextCallback("onOpenChange",f),E.useContextCallback("onOpenChangeComplete",g);const C=E.useState("open"),w=!i&&C,R=E.useState("activeTriggerId"),O=E.useState("mounted"),A=E.useState("payload");E.useSyncedValues({trackCursorAxis:u,disableHoverablePopup:c,disabled:i}),Op(E,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:k,transitionStatus:N}=Ap(w,E),j=E.useState("isInstantPhase"),D=E.useState("instantType"),M=E.useState("lastOpenChangeReason"),_=v.useRef(null);_e(()=>{C&&i&&E.setOpen(!1,ct(Vj))},[C,i,E]),_e(()=>{N==="ending"&&M===Mr||N!=="ending"&&j?(D!=="delay"&&(_.current=D),E.set("instantType","delay")):_.current!==null&&(E.set("instantType",_.current),_.current=null)},[N,j,M,D,E]),_e(()=>{w&&R==null&&E.set("payload",void 0)},[E,R,w]),v.useImperativeHandle(d,()=>({unmount:k,close:()=>E.setOpen(!1,ct(Wu))}),[k,E]);const L=w||O||!i&&u!=="none";return b.jsxs(PR.Provider,{value:E,children:[y&&b.jsx(Rp,{handle:y,store:E}),L&&b.jsx(JI,{store:E,disabled:i,trackCursorAxis:u}),typeof S=="function"?S({payload:A}):S]})});function JI({store:e,disabled:t,trackCursorAxis:i}){const a=e.useState("floatingRootContext"),o=ed(a,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),c=H4(a,{enabled:!t&&i!=="none",axis:i==="none"?void 0:i}),u=v.useMemo(()=>kr(c.reference,o.reference),[c.reference,o.reference]);return kp(e,{activeTriggerProps:u,inactiveTriggerProps:u,popupProps:o.floating??Qt}),null}function dr(e){return ic(e,"base-ui")}const YC=v.createContext(void 0);function e3(){return v.useContext(YC)}const t3=600,_E="data-base-ui-tooltip-trigger";function UE(e){const t=tr(e);return on(t)?t:null}const n3=dv(function(t,i){const{render:a,className:o,style:c,handle:u,payload:d,disabled:f,delay:g,closeOnClick:y=!0,closeDelay:h,id:x,...S}=t,E=Gu(!0),w=_v(u)??E;if(!w)throw new Error(bn(82));const R=dr(x),O=w.useState("isTriggerActive",R),A=w.useState("isOpenedByTrigger",R),k=w.useState("floatingRootContext"),N=v.useRef(null),j=h??0,{registerTrigger:D,isMountedByThisTrigger:M}=zv(R,N,w,{payload:d,closeOnClick:y,closeDelay:j}),_=e3(),{activeIdRef:L,delayRef:q,isInstantPhase:X,hasProvider:B}=Gj(k,{open:A}),H=Hv(k);w.useSyncedValue("isInstantPhase",X);const U=w.useState("disabled"),z=f??U,Q=Ln(z),$=w.useState("trackCursorAxis"),K=w.useState("disableHoverablePopup"),Y=v.useRef(!1),ee=Un(),G=v.useRef(void 0);function oe(){return B&&L.current!=null?0:g??_??t3}function I(ue){const Te=N.current;if(!Te||!ue)return!1;const ve=Iu(ue,`[${_E}]`);return ve!==null&&ve!==Te&&it(Te,ve)}function V(ue){const Te=I(ue);return Y.current=Te,Te&&(H.openChangeTimeout.clear(),H.restTimeout.clear(),H.restTimeoutPending=!1,ee.clear()),Te}const J=IC(k,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!K&&$!=="both"?zC():null,restMs:oe,delay(){return h==null&&B?{close:No(q.current,"close")}:{close:j}},triggerElementRef:N,isActiveTrigger:O,isClosing:()=>w.select("transitionStatus")==="ending",shouldOpen(){return!Y.current}}),re=DC(k,{enabled:!z}).reference,we=ue=>{const Te=Y.current,ve=UE(ue),Pe=V(ve),Ae=N.current,Le=Ae&&ve&&it(Ae,ve);if(Pe&&w.select("open")&&w.select("lastOpenChangeReason")===Kn){w.setOpen(!1,ct(Kn,ue));return}if(Te&&!Pe&&Le&&!Q.current&&!w.select("open")&&Ae&&Ps(G.current)){const Be=()=>{!Y.current&&!Q.current&&!w.select("open")&&w.setOpen(!0,ct(Kn,ue,Ae))},Oe=oe();Oe===0?(ee.clear(),Be()):ee.start(Oe,Be)}},le=w.useState("appliedTriggerProps",M||$!=="none");return At("button",t,{state:{open:A},ref:[i,D,N],props:[J,re,le,{onMouseOver(ue){we(ue.nativeEvent)},onFocus(ue){I(UE(ue.nativeEvent))&&ue.preventBaseUIHandler()},onMouseLeave(){Y.current=!1,ee.clear(),G.current=void 0},onPointerEnter(ue){G.current=ue.pointerType},onPointerDown(ue){G.current=ue.pointerType,w.set("closeOnClick",y),y&&!w.select("open")&&w.cancelPendingOpen(ue.nativeEvent)},onClick(ue){y&&!w.select("open")&&w.cancelPendingOpen(ue.nativeEvent)},id:R,[Cy]:z?"":void 0,[_E]:z?void 0:""},S],stateAttributesMapping:Sv})}),GC=v.createContext(void 0);function r3(){const e=v.useContext(GC);if(e===void 0)throw new Error(bn(70));return e}const i3=v.forwardRef(function(t,i){const{children:a,container:o,className:c,render:u,style:d,...f}=t,{node:g,subtree:y}=vC({container:o,ref:i,componentProps:t,elementProps:f});return!y&&!g?null:b.jsxs(v.Fragment,{children:[y,g&&ur.createPortal(a,g)]})}),a3=v.forwardRef(function(t,i){const{keepMounted:a=!1,...o}=t;return Gu().useState("mounted")||a?b.jsx(GC.Provider,{value:a,children:b.jsx(i3,{ref:i,...o})}):null}),$C=v.createContext(void 0);function QC(){const e=v.useContext($C);if(e===void 0)throw new Error(bn(71));return e}function s3(e){const{nodeId:t,externalTree:i,rootContext:a}=e,o=a.useState("referenceElement"),c=a.useState("floatingElement"),u=a.useState("domReferenceElement"),d=a.useState("open"),f=a.useState("floatingId"),[g,y]=v.useState(null),h=v.useRef(null),x=Ks(i),S=v.useMemo(()=>({reference:o,floating:c,domReference:u}),[o,c,u]),E=BI({...e,elements:{...S,...g&&{reference:g}}}),C=v.useCallback(A=>{const k=on(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;y(k),E.refs.setReference(k)},[E.refs]),w=v.useMemo(()=>({...E.refs,setPositionReference:C,domReference:h}),[E.refs,C]),R=v.useMemo(()=>({...E.elements,domReference:u}),[E.elements,u]),O=v.useMemo(()=>({...E,dataRef:a.context.dataRef,open:d,onOpenChange:a.setOpen,events:a.context.events,floatingId:f,refs:w,elements:R,nodeId:t,rootStore:a}),[E,w,R,t,a,d,f]);return _e(()=>{u&&(h.current=u)},[u]),_e(()=>{a.context.dataRef.current.floatingContext=O;const A=x?.nodesRef.current.find(k=>k.id===t);A&&(A.context=O)}),v.useMemo(()=>({...E,context:O,refs:w,elements:R,rootStore:a}),[E,w,R,O,a])}const o3=v.createContext(void 0);function Ip(){return v.useContext(o3)?.direction??"ltr"}const l3=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:a,placement:o,rects:c,platform:u,elements:d,middlewareData:f}=t,{element:g,padding:y=0}=_s(e,t)||{};if(g==null)return{};const h=$R(y),x={x:i,y:a},S=Tv(o),E=Cv(S),C=await u.getDimensions(g),w=S==="y",R=w?"top":"left",O=w?"bottom":"right",A=w?"clientHeight":"clientWidth",k=c.reference[E]+c.reference[S]-x[S]-c.floating[E],N=x[S]-c.reference[S],j=d.floating[A]||c.floating[E],D=k/2-N/2,M=j/2-C[E]/2-1,_=Math.min(h[R],M),L=Math.min(h[O],M),q=_,X=j-C[E]-L,B=j/2-C[E]/2+D,H=GR(q,B,X),U=!f.arrow&&ma(o)!=null&&B!==H&&c.reference[E]/2-(B<q?_:L)-C[E]/2<0,z=U?B<q?B-q:B-X:0;return{[S]:x[S]+z,data:{[S]:H,centerOffset:B-H-z,...U&&{alignmentOffset:z}},reset:U}}}),c3=(e,t)=>{const{name:i,fn:a}=l3(e);return{name:i,fn:a,options:[e,t]}},u3={name:"hide",async fn(e){const{width:t,height:i,x:a,y:o}=e.rects.reference,c=t===0&&i===0&&a===0&&o===0,u=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:u.top-i>=0||u.right-t>=0||u.bottom-i>=0||u.left-t>=0||c}}}},d3={sideX:"left",sideY:"top"},f3="--available-width",h3="--available-height",p3="--anchor-width",g3="--anchor-height",m3="--transform-origin",HE=f3,FE=h3;function XC(e,t,i){const a=e==="inline-start"||e==="inline-end";return{top:"top",right:a?i?"inline-start":"inline-end":"right",bottom:"bottom",left:a?i?"inline-end":"inline-start":"left"}[t]}function BE(e,t,i){const{rects:a,placement:o}=e;return{side:XC(t,pi(o),i),align:ma(o)||"center",anchor:{width:a.reference.width,height:a.reference.height},positioner:{width:a.floating.width,height:a.floating.height}}}function Pp(e){return y3(e,s3)}function y3(e,t){const{anchor:i,positionMethod:a="absolute",side:o="bottom",sideOffset:c=0,align:u="center",alignOffset:d=0,collisionBoundary:f,collisionPadding:g=5,sticky:y=!1,arrowPadding:h=5,disableAnchorTracking:x=!1,inline:S,keepMounted:E=!1,floatingRootContext:C,mounted:w,collisionAvoidance:R,shift:O,nodeId:A,adaptiveOrigin:k,lazyFlip:N=!1,externalTree:j}=e,D=R.side||"flip",M=R.align||"flip",_=R.fallbackAxisSide||"end",L=O?.crossAxis??!1,q=O?.rootBoundary,X=typeof i=="function"?i:void 0,B=Fe(X),H=X?B:i,U=Ln(i),z=Ln(w),$=Ip()==="rtl",[K,Y]=v.useState(null);!w&&K!==null&&Y(null);const ee=N==="placement",G=K?pi(K):null,oe=K&&ee?ma(K)||"center":null,I=G||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[o],V=oe||u,J=V==="center"?I:`${I}-${V}`;let re=g;typeof re=="number"?re={top:re,right:re,bottom:re,left:re}:re&&(re={top:re.top||0,right:re.right||0,bottom:re.bottom||0,left:re.left||0});const we=1,le=o==="bottom"?we:0,me=o==="top"?we:0,ge=o==="right"?we:0,ue=o==="left"?we:0,Te={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:re},ve=v.useRef(null),Pe=Ln(c),Ae=Ln(d),Le=typeof c!="function"?c:0,Be=typeof d!="function"?d:0,Oe=[];S&&Oe.push(S),Oe.push(VI(je=>{const at=BE(je,o,$),Ie=typeof Pe.current=="function"?Pe.current(at):Pe.current,ze=typeof Ae.current=="function"?Ae.current(at):Ae.current;return{mainAxis:Ie,crossAxis:ze,alignmentAxis:ze}},[Le,Be,$,o]));const Ue=M==="none"&&D!=="shift",be=!Ue&&(y||L||D==="shift"),He=D==="none"?null:YI({...Te,padding:{top:re.top+we+le,right:re.right+we+ue,bottom:re.bottom+we+me,left:re.left+we+ge},mainAxis:!L&&D==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),Ze=Ue?null:KI({...Te,rootBoundary:q,mainAxis:M!=="none",crossAxis:be,limiter:y||L?void 0:qI(je=>{if(!ve.current)return{};const{width:at,height:Ie}=ve.current.getBoundingClientRect(),ze=Ni(pi(je.placement)),$e=ze==="y"?at:Ie,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:$e/2+et/2}})},[Te,y,L,q,re,M]);D==="shift"||M==="shift"||V==="center"?Oe.push(Ze,He):Oe.push(He,Ze),Oe.push(GI({...Te,apply({elements:{floating:je},availableWidth:at,availableHeight:Ie,rects:ze}){if(!z.current)return;const $e=je.style;$e.setProperty(HE,`${at}px`),$e.setProperty(FE,`${Ie}px`);const et=Rn(je).devicePixelRatio||1,{x:Tt,y:F,width:W,height:ne}=ze.reference,ye=(Math.round((Tt+W)*et)-Math.round(Tt*et))/et,xe=(Math.round((F+ne)*et)-Math.round(F*et))/et;$e.setProperty(p3,`${ye}px`),$e.setProperty(g3,`${xe}px`)}}),c3(je=>({element:ve.current||$t(je.elements.floating).createElement("div"),padding:ve.current?h:0}),[h]),{name:"transformOrigin",fn(je){const{elements:{floating:at},middlewareData:Ie,placement:ze,platform:$e,rects:et,y:Tt}=je,F=pi(ze),W=ma(ze),ne=Ni(F)==="y",ye=ve.current,xe=typeof c=="function"?c(BE(je,o,$)):c;let Ke;if(!ye&&W&&Math.abs(ne?Ie.shift?.x||0:Ie.shift?.y||0)<=1)Ke=W==="start"===(ne&&$e.isRTL?.(at)===!0)?"100%":"0%";else{const Xe=ne?Ie.arrow?.x||0:Ie.arrow?.y||0,Qe=ne?ye?.clientWidth||0:ye?.clientHeight||0;Ke=`${Xe+Qe/2}px`}let Ve=F==="top"||F==="left"?`calc(100% + ${xe}px)`:`${-xe}px`;return be&&ne&&Math.abs(Ie.shift?.y||0)>xe&&(Ve=`${et.reference.y+et.reference.height/2-Tt}px`),at.style.setProperty(m3,ne?`${Ke} ${Ve}`:`${Ve} ${Ke}`),{}}},u3,k),_e(()=>{!w&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[w,C]);const st=v.useMemo(()=>({ancestorScroll:!x,elementResize:!x&&typeof ResizeObserver<"u",layoutShift:!x&&typeof IntersectionObserver<"u"}),[x]),{refs:de,elements:Ee,x:Ge,y:Me,middlewareData:De,update:vt,placement:dt,context:pt,isPositioned:Mt,floatingStyles:jt}=t({rootContext:C,open:E?w:void 0,placement:J,middleware:Oe,strategy:a,whileElementsMounted:E?void 0:(...je)=>LE(...je,st),nodeId:A,externalTree:j}),{sideX:en,sideY:an}=De.adaptiveOrigin||d3,tn=Mt?a:"fixed",Je=v.useMemo(()=>{let je;return Mt?k?je={position:tn,[en]:Ge,[an]:Me}:je={...jt,position:tn}:je={position:tn,top:0,left:0},je[HE]="100vw",je[FE]="100vh",Mt||(je.opacity=0),je},[k,tn,en,Ge,an,Me,jt,Mt]),St=v.useRef(null);_e(()=>{if(!w)return;const je=U.current,at=typeof je=="function"?je():je,ze=(VE(at)?at.current:at)||null||null;ze!==St.current&&(de.setPositionReference(ze),St.current=ze)},[w,de,H,U]),v.useEffect(()=>{if(!w)return;const je=U.current;typeof je!="function"&&VE(je)&&je.current!==St.current&&(de.setPositionReference(je.current),St.current=je.current)},[w,de,H,U]),v.useEffect(()=>{if(E&&w&&Ee.reference&&Ee.floating)return LE(Ee.reference,Ee.floating,vt,st)},[E,w,Ee,vt,st]);const Xt=pi(dt),ht=XC(o,Xt,$),bt=ma(dt)||"center",mt=!!De.hide?.referenceHidden;_e(()=>{N&&w&&Mt&&(Xt!==I||ee&&bt!==V)&&Y(dt)},[N,ee,w,Mt,dt,Xt,bt,I,V]);const Ut=v.useMemo(()=>({position:"absolute",top:De.arrow?.y,left:De.arrow?.x}),[De.arrow]),un=De.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Je,arrowStyles:Ut,arrowRef:ve,arrowUncentered:un,side:ht,align:bt,physicalSide:Xt,anchorHidden:mt,refs:de,context:pt,isPositioned:Mt,update:vt}),[Je,Ut,ve,un,ht,bt,Xt,mt,de,pt,Mt,vt])}function VE(e){return e!=null&&"current"in e}function rd(e){return e==="starting"?I4:Qt}function Lp(e,t,{styles:i,transitionStatus:a,props:o,refs:c,hidden:u,inert:d=!1}){const f={...i};return d&&(f.pointerEvents="none"),At("div",e,{state:t,ref:c,props:[{role:"presentation",hidden:u,style:f},rd(a),o],stateAttributesMapping:Qu})}const v3=v.forwardRef(function(t,i){const{render:a,className:o,anchor:c,positionMethod:u="absolute",side:d="top",align:f="center",sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:E=!1,disableAnchorTracking:C=!1,collisionAvoidance:w=Nv,style:R,...O}=t,A=Gu(),k=r3(),N=A.useState("open"),j=A.useState("mounted"),D=A.useState("trackCursorAxis"),M=A.useState("disableHoverablePopup"),_=A.useState("floatingRootContext"),L=A.useState("instantType"),q=A.useState("transitionStatus"),X=A.useState("adaptiveOrigin"),B=Pp({anchor:c,positionMethod:u,floatingRootContext:_,mounted:j,side:d,sideOffset:g,align:f,alignOffset:y,collisionBoundary:h,collisionPadding:x,sticky:E,arrowPadding:S,disableAnchorTracking:C,keepMounted:k,collisionAvoidance:w,adaptiveOrigin:X}),H=v.useMemo(()=>({open:N,side:B.side,align:B.align,anchorHidden:B.anchorHidden,instant:D!=="none"?"tracking-cursor":L}),[N,B.side,B.align,B.anchorHidden,D,L]),U=Lp(t,H,{styles:B.positionerStyles,transitionStatus:q,props:O,refs:[i,A.useStateSetter("positionerElement")],hidden:!j,inert:!N||D==="both"||M});return b.jsx($C.Provider,{value:B,children:U})}),b3=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,d=Gu(),{side:f,align:g}=QC(),y=d.useState("open"),h=d.useState("instantType"),x=d.useState("transitionStatus"),S=d.useState("popupProps"),E=d.useState("floatingRootContext"),C=d.useState("disabled"),w=d.useState("closeDelay");Ii({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}}),Fv(E,{enabled:!C,closeDelay:w});const R=d.useStateSetter("popupElement");return At("div",t,{state:{open:y,side:f,align:g,instant:h,transitionStatus:x},ref:[i,d.context.popupRef,R],props:[td,S,rd(x),u],stateAttributesMapping:gp})}),x3=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,d=Gu(),{arrowRef:f,side:g,align:y,arrowUncentered:h,arrowStyles:x}=QC(),S=d.useState("open"),E=d.useState("instantType");return At("div",t,{state:{open:S,side:g,align:y,uncentered:h,instant:E},ref:[i,f],props:[{style:x,"aria-hidden":!0},u],stateAttributesMapping:Qu})}),S3=function(t){const{delay:i,closeDelay:a,timeout:o=400}=t,c=v.useMemo(()=>({open:i,close:a}),[i,a]);return b.jsx(YC.Provider,{value:i,children:b.jsx(Yj,{delay:c,timeoutMs:o,children:t.children})})};function zp(e){return kv(19)?e:e?"true":void 0}function E3(e){const[t,i]=v.useState({current:e,previous:null});return Object.is(e,t.current)||i({current:e,previous:t.current}),t.previous}const ZC=48,Sa=(e,t=0)=>{const i=new Int32Array(e.length);for(let a=0;a<e.length;a++)i[a]=e.charCodeAt(a)-ZC-t;return i},_p=e=>{const t=new Int32Array(e.length+1);for(let i=0;i<e.length;i++)t[i+1]=t[i]+e[i];return t},Hs=e=>{const t=new Int32Array(e.length);let i=0;for(let a=0;a<e.length;a++){const o=e.charCodeAt(a)-ZC;i+=o>>>1^-(o&1),t[a]=i}return t},w3=384,R3=[],wo=_p(Sa("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),C3=_p(Sa(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),T3="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",O3=(()=>{const e=wo.length-1,t=new Int32Array(e);for(let o=e-1;o>=0;o--){let c=1,u=o+1;for(let d=wo[o];d<wo[o+1];d++)c+=t[u],u+=t[u];t[o]=c}const i=new Int32Array(wo[e]);let a=0;for(let o=0;o<e;o++){let c=o+1;for(let u=wo[o];u<wo[o+1];u++)i[a++]=c,c+=t[c]}return i})(),A3=Sa("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),k3=_p(Sa("123333359346463635126536711576")),M3=Sa("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),N3=Sa("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),D3=Hs("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),j3=(()=>{const e=new Int32Array(319).fill(-1),t=Hs("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=Hs("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let a=0;a<t.length;a++)e[t[a]]=i[a];return e})(),I3="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const t=e.split(" "),i=t.shift();for(let a=0;a<t.length;a++)t[a]=i+t[a];return t}),KE=Hs("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),P3=Hs("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),L3=Hs("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±"),WC=new Int32Array(987),JC=new Int32Array(987),eT=new Int32Array(987);let Ny="";const Dy=new Int32Array(1022);{const e=new Map;let t=0,i=0;for(let a=0;a<KE.length;a++)for(const o of I3[L3[a]]){let c=e.get(o);c===void 0&&(c=t++,e.set(o,c),Dy[c*2]=Ny.length,Dy[c*2+1]=o.length,Ny+=o),WC[i]=KE[a],JC[i]=P3[a],eT[i]=c,i++}}const z3=Hs("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),_3=_p(Sa("1::24444432:442:44:44>222222:44:4421322511111311111114")),U3=Hs("2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),H3=Sa("ij"),F3=Sa("—"),B3=Sa("1"),V3="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var K3={GROUP_COUNT:w3,customValidatorNames:R3,edgeStart:wo,labelStart:C3,labelText:T3,edgeTarget:O3,nodeGroup:A3,nodeVlist:j3,vlistPat:k3,vlistOps:M3,vlistRef:N3,vlistGroup:D3,litAnchor:WC,litGroup:JC,litPool:eT,poolOffsets:Dy,poolText:Ny,adjGid:z3,adjStart:_3,adjTgt:U3,patGid:H3,patTgt:F3,postfixLookupGroups:B3,orderSensitiveModifiers:V3};const q3="line"in new Error,ca=-1,Eo=-1,J0=(e,t,i)=>{let a=2166136261;for(let o=t;o<i;o++)a=Math.imul(a^e.charCodeAt(o),16777619);return a},yh=(e,t,i)=>{const a=i-t;let o=Math.imul(a,2654435761)^e.charCodeAt(t);if(a>3){const c=a>>2,u=a>>1;o=Math.imul(o^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+c),2246822507),o=Math.imul(o^e.charCodeAt(t+u)<<8^e.charCodeAt(t+u+c)<<16^e.charCodeAt(i-3),3266489909),o^=e.charCodeAt(i-2)<<8^e.charCodeAt(i-1)<<16;for(let d=t+3,f=i-4;d<t+8&&d<f;d++,f--)o=Math.imul(o^e.charCodeAt(d)^e.charCodeAt(f)<<8,16777619)}return o^o>>>15|0},Y3=(e,t,i={})=>{const{GROUP_COUNT:a,edgeStart:o,labelStart:c,labelText:u,edgeTarget:d,nodeGroup:f,nodeVlist:g,vlistPat:y,vlistOps:h,vlistRef:x,vlistGroup:S,litAnchor:E,litGroup:C,litPool:w,poolOffsets:R,poolText:O,adjGid:A,adjStart:k,adjTgt:N,patGid:j,patTgt:D,postfixLookupGroups:M,customValidatorNames:_,orderSensitiveModifiers:L}=e,q=new Int32Array(a).fill(-1);for(let he=0;he<A.length;he++)q[A[he]]=he;let X=0;for(let he=0;he+1<k.length;he++){const ke=k[he+1]-k[he];ke>X&&(X=ke)}let B=32;for(;B<2*(1+X+j.length);)B<<=1;const H=new Int32Array(x.length+1);for(let he=0;he<x.length;he++)H[he+1]=H[he]+y[x[he]+1]-y[x[he]];const U=new Uint8Array(a);for(let he=0;he<M.length;he++)U[M[he]]=1;const z=o.length-1,Q=new Uint8Array(z);let $=0,K=!0;for(let he=0;he<E.length;he++){Q[E[he]]=1;const ke=R[w[he]*2+1];ke>$&&($=ke);const Se=O.charCodeAt(R[w[he]*2]);(Se===91||Se===40)&&(K=!1)}let Y=1;for(;Y<E.length*2;)Y<<=1;const ee=new Int32Array(Y).fill(-1);for(let he=0;he<E.length;he++){const ke=R[w[he]*2];let Se=(J0(O,ke,ke+R[w[he]*2+1])^Math.imul(E[he],2654435761)|0)&Y-1;for(;ee[Se]!==-1;)Se=Se+1&Y-1;ee[Se]=he}const G=(he,ke,Se,nt)=>{let Ot=(J0(ke,Se,nt)^Math.imul(he,2654435761)|0)&Y-1;const wt=nt-Se;for(;;){const Ht=ee[Ot];if(Ht===-1)return-1;if(E[Ht]===he&&R[w[Ht]*2+1]===wt){const xn=R[w[Ht]*2];let hn=!0;for(let yt=0;yt<wt;yt++)if(O.charCodeAt(xn+yt)!==ke.charCodeAt(Se+yt)){hn=!1;break}if(hn)return C[Ht]}Ot=Ot+1&Y-1}},oe=i.cacheSize??8192,I=i.prefix??e.prefix??"",V=I===""?"":I+":",J=V.length,re=(_??[]).map(he=>{throw new Error("cn: missing validator "+he)}),we=/\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$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,me=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let ue=0,Te=-1,ve=-1,Pe=-1,Ae=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Be=he=>/\s/.test(String.fromCharCode(he)),Oe=(he,ke,Se)=>{if(ue=0,Te=-1,Se-ke<3)return;const nt=he.charCodeAt(ke),Ot=he.charCodeAt(Se-1);if(nt===91&&Ot===93)ue=1;else if(nt===40&&Ot===41)ue=2;else return;Pe=ke+1,Ae=Se-1;let wt=ke+1;if(Le(he.charCodeAt(wt))){for(wt++;wt<Se-1;){const Ht=he.charCodeAt(wt);if(!Le(Ht)&&Ht!==45)break;wt++}wt<Se-2&&he.charCodeAt(wt)===58&&(Te=ke+1,ve=wt,Pe=wt+1)}},Ue=(he,ke,Se,nt)=>{if(Se-ke!==nt.length)return!1;for(let Ot=0;Ot<nt.length;Ot++)if(he.charCodeAt(ke+Ot)!==nt.charCodeAt(Ot))return!1;return!0},be=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,He=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=he=>!!he&&!Number.isNaN(Number(he)),st=(he,ke,Se)=>{if(Se-ke<11||!Ue(he,ke,ke+10,"@container"))return!1;if(he.charCodeAt(ke+10)===47)return Se-ke>=12;const nt=he.charCodeAt(ke+11);return nt===115&&Se-ke>=17&&Ue(he,ke+10,ke+16,"-size/")||nt===110&&Se-ke>=19&&Ue(he,ke+10,ke+18,"-normal/")},de=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Ee="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(he=>he.split(" ")),Ge=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Me=(he,ke,Se,nt)=>{if(he>=10){if(he>=25)return re[he-25](ke.slice(Se,nt));const Ot=he-10;if(ue!==de[Ot])return!1;if(Te>=0){for(const wt of Ee[Ot])if(Ue(ke,Te,ve,wt))return!0;return!1}switch(Ge[Ot]){case 0:return!1;case 1:return!0;case 2:{const wt=ke.slice(Pe,Ae);return we.test(wt)&&!le.test(wt)}case 3:return Ze(ke.slice(Pe,Ae));case 4:return ge.test(ke.slice(Pe,Ae));default:return me.test(ke.slice(Pe,Ae))}}switch(he){case 0:return!0;case 1:return ue===0;case 2:return ue===1;case 3:return ue===2;case 4:return be.test(ke.slice(Se,nt));case 5:return Ze(ke.slice(Se,nt));case 6:{const Ot=ke.slice(Se,nt);return!!Ot&&Number.isInteger(Number(Ot))}case 7:return nt>Se&&ke.charCodeAt(nt-1)===37&&Ze(ke.slice(Se,nt-1));case 8:return He.test(ke.slice(Se,nt));default:return st(ke,Se,nt)}},De=new Set(typeof L=="string"?L.split(" "):L),vt=(he,ke,Se,nt,Ot,wt)=>{const Ht=J0(ke,Se,nt)^(Ot?2654435769:0)|0;let xn=he.get(Ht);if(xn!==void 0)e:for(let Dt=0;Dt<xn.length;Dt++){const sn=xn[Dt];if(!(sn.imp!==Ot||sn.k.length!==nt-Se)){for(let gt=0;gt<sn.k.length;gt++)if(sn.k.charCodeAt(gt)!==ke.charCodeAt(Se+gt))continue e;return sn.id}}else he.set(Ht,xn=[]);const hn=ke.slice(Se,nt),yt=wt(hn);return xn.push({k:hn,imp:Ot,id:yt}),yt};let dt=new Map,pt=new Map,Mt=2;const jt=4096,en=(he,ke)=>{const Se=[];let nt=0,Ot=0,wt=0;for(let yt=0;yt<he.length;yt++){const Dt=he.charCodeAt(yt);nt===0&&Ot===0&&Dt===58?(Se.push(he.slice(wt,yt)),wt=yt+1):Dt===91?nt++:Dt===93?nt--:Dt===40?Ot++:Dt===41&&Ot--}Se.push(he.slice(wt));let Ht=Se[0];if(Se.length>1){const yt=[];let Dt=[];for(const sn of Se)sn.charCodeAt(0)===91||De.has(sn)?(Dt.length&&(yt.push(...Dt.sort()),Dt=[]),yt.push(sn)):Dt.push(sn);Dt.length&&yt.push(...Dt.sort()),Ht=yt.join(":")}const xn=ke?Ht+" !":Ht;let hn=pt.get(xn);return hn===void 0&&pt.set(xn,hn=Mt++),hn};let an=new Map,tn=a;const Je=a+4096,St=()=>tn++,Xt=2097152,ht=8192,bt=new Int32Array(ht),mt=new Array(ht).fill(null),Ut=new Int32Array(ht),un=new Int32Array(ht),je=new Uint8Array(ht);let at=0;const Ie=(he,ke,Se,nt,Ot,wt,Ht,xn)=>{let hn=he;if(mt[he]!==null)if(mt[he|1]===null)hn=he|1;else if((at++&3)===0)hn=he|at>>2&1;else return;mt[hn]=ke.slice(Se,nt),bt[hn]=Ot,Ut[hn]=wt,un[hn]=Ht,je[hn]=xn},ze=()=>mt.fill(null);let $e=256,et=[new Int32Array($e),new Int32Array($e),new Int32Array($e),new Int32Array($e)],[Tt,F,W,ne]=et,ye=new Uint8Array($e),xe=new Uint8Array($e);const Ke=()=>{$e*=2,et=et.map(ke=>{const Se=new Int32Array($e);return Se.set(ke),Se}),[Tt,F,W,ne]=et;const he=new Uint8Array($e);he.set(ye),ye=he,xe=new Uint8Array($e)};let Ve=64,Xe=new Int32Array(Ve),Qe=new Int32Array(Ve);const ot=new Int32Array(a);let tt=2048,Et=21,ft=new Float64Array(tt),Kt=new Int32Array(tt),Ft=0;const An=(he,ke)=>{if(he===0&&ke<a)return ot[ke]===Ft?1:(ot[ke]=Ft,0);const Se=he*2097152+ke+1;let nt=Math.imul(Se,2654435761)>>>Et;for(;Kt[nt]===Ft;){if(ft[nt]===Se)return 1;nt=nt+1&tt-1}return ft[nt]=Se,Kt[nt]=Ft,0},qt=(he,ke,Se,nt,Ot)=>{if(Se-ke>=2&&he.charCodeAt(ke)===91&&he.charCodeAt(Se-1)===93){let wt=-1;for(let Ht=ke+1;Ht<Se-1;Ht++)if(he.charCodeAt(Ht)===58){wt=Ht;break}return wt===-1||wt===ke+1?ca:vt(an,he,ke+1,wt,0,St)}if(nt>=0&&f[nt]>=0)return f[nt];for(let wt=Ot-1;wt>=0;wt--){const Ht=Qe[wt];if(Ht>Se)continue;const xn=Xe[wt],hn=Se-Ht;if(Q[xn]===1&&hn>0&&hn<=$){const zn=he.charCodeAt(Ht);if(K===!1||zn!==91&&zn!==40){const ni=G(xn,he,Ht,Se);if(ni>=0)return ni}}const yt=g[xn];if(yt<0)continue;const Dt=x[yt],sn=y[Dt],gt=y[Dt+1];if(sn===gt)continue;Oe(he,Ht,Se);const nr=H[yt]-sn;for(let zn=sn;zn<gt;zn++)if(Me(h[zn],he,Ht,Se))return S[nr+zn]}return ca},Bt=he=>{const ke=he.length;let Se=0,nt=0,Ot=!1;(Mt>jt||dt.size>jt)&&(dt=new Map,pt=new Map,Mt=2,ze()),tn>Je&&(an=new Map,tn=a,ze());let wt=0;for(;wt<ke;){let yt=he.charCodeAt(wt);if(yt===32||yt>=9&&yt<=13||yt>=160&&Be(yt)){yt!==32&&(Ot=!0),wt++;continue}const Dt=wt;let sn=0;for(;wt<ke;){if(yt=he.charCodeAt(wt),yt<=32){if(yt===32)break;if(yt>=9&&yt<=13){Ot=!0;break}}else if(yt>=160&&Be(yt)){Ot=!0;break}sn=Math.imul(sn^yt,16777619),wt++}const gt=wt,nr=gt-Dt;Se===$e&&Ke();const zn=Se++;Tt[zn]=Dt,F[zn]=gt,nt+=nr,sn^=Math.imul(nr,2654435761);const ni=sn^sn>>>15|0,Gn=ni&8190;{let nn=-1;if(bt[Gn]===ni&&mt[Gn]!==null&&mt[Gn].length===nr?nn=Gn:bt[Gn|1]===ni&&mt[Gn|1]!==null&&mt[Gn|1].length===nr&&(nn=Gn|1),nn>=0){const ar=mt[nn];let bi=!0;for(let ai=0;ai<nr;ai++)if(ar.charCodeAt(ai)!==he.charCodeAt(Dt+ai)){bi=!1;break}if(bi){W[zn]=Ut[nn],ne[zn]=un[nn],ye[zn]=je[nn];continue}}}let $n=Dt;if(J!==0){if(gt-Dt<=J||!he.startsWith(V,Dt)){W[zn]=ca,Ie(Gn,he,Dt,gt,ni,ca,0,0);continue}$n=Dt+J}let Vo=0,yc=0,Ra=-1,Ko=-1;for(let nn=$n;nn<gt;nn++){const ar=he.charCodeAt(nn);if(Vo===0&&yc===0){if(ar===58){Ra=nn;continue}if(ar===47){Ko=nn;continue}}ar===91?Vo++:ar===93?Vo--:ar===40?yc++:ar===41&&yc--}const Sd=Ra>=$n?Ra+1:$n;let Dn=Sd,Cr=gt,ts=!1,qo=0;Cr>Dn&&he.charCodeAt(Cr-1)===33?(ts=!0,Cr--):Cr>Dn&&he.charCodeAt(Dn)===33&&(ts=!0,Dn++,qo=1);let Vr=-1;Ko>Sd&&(Vr=Ko+qo,Vr>=Cr&&(Vr=-1));let Yo=Dn;Cr-Dn>1&&he.charCodeAt(Dn)===45&&(Yo=Dn+1);let ri=0,jr=0,ns=0,vc=-1,ii=0;(g[0]>=0||Q[0]===1)&&(Xe[0]=0,Qe[0]=Yo,ii=1);let Qs=Eo,bc=0;for(let nn=Yo;nn<Cr;nn++)if(nn===Vr&&(Qs=jr<ns?Eo:ri,bc=ii),ri!==Eo){const ar=he.charCodeAt(nn);let bi=-1;if(jr<ns)u.charCodeAt(jr)===ar?(jr++,jr===ns&&(bi=ri=vc)):ri=Eo;else{const ai=o[ri],Ws=o[ri+1];let Ca=Eo;for(let gr=ai;gr<Ws;gr++){const Js=c[gr];if(u.charCodeAt(Js)===ar){c[gr+1]-Js===1?bi=Ca=d[gr]:(jr=Js+1,ns=c[gr+1],vc=d[gr],Ca=ri);break}}ri=Ca}if(bi>=0&&(g[bi]>=0||Q[bi]===1)&&nn+1<Cr&&he.charCodeAt(nn+1)===45){if(ii===Ve){Ve*=2;const ai=new Int32Array(Ve);ai.set(Xe),Xe=ai;const Ws=new Int32Array(Ve);Ws.set(Qe),Qe=Ws}Xe[ii]=bi,Qe[ii]=nn+2,ii++}}Vr===Cr&&(Qs=jr<ns?Eo:ri,bc=ii);const xc=jr<ns?Eo:ri;let pr,Ir=!1;if(Vr>=0)if(Ir=!0,pr=qt(he,Dn,Vr,Qs,bc),pr!==ca&&pr<a&&U[pr]){const nn=qt(he,Dn,Cr,xc,ii);nn!==ca&&nn!==pr&&(pr=nn,Ir=!1)}else pr===ca&&(pr=qt(he,Dn,Cr,xc,ii),Ir=!1);else pr=qt(he,Dn,Cr,xc,ii);let Xs=0,Zs=0;pr===ca?W[zn]=ca:(Zs=Ir?1:0,Xs=$n>=Ra?ts?1:0:vt(dt,he,$n,Ra,ts?1:0,nn=>en(nn,ts)),W[zn]=pr,ye[zn]=Zs,ne[zn]=Xs),Ie(Gn,he,Dt,gt,ni,pr,Xs,Zs)}if(Se===0)return"";if(Se===1)return Tt[0]===0&&F[0]===ke?he:he.slice(Tt[0],F[0]);if(Se*B>tt){for(;Se*B>tt;)tt<<=1,Et--;ft=new Float64Array(tt),Kt=new Int32Array(tt)}if(Mt>=Xt||tn>=Xt)throw new Error("cn: too many distinct classes in one merge");Ft=Ft+1|0,Ft===0&&(ot.fill(0),Kt.fill(0),Ft=1);let Ht=!1;for(let yt=Se-1;yt>=0;yt--){const Dt=W[yt];if(Dt===ca){xe[yt]=1;continue}const sn=ne[yt];if(An(sn,Dt)===1){xe[yt]=0,Ht=!0;continue}if(xe[yt]=1,Dt<a){const gt=q[Dt];if(gt>=0)for(let nr=k[gt];nr<k[gt+1];nr++)An(sn,N[nr]);if(ye[yt]&1)for(let nr=0;nr<j.length;nr++)j[nr]===Dt&&An(sn,D[nr])}}if(!Ht&&!Ot&&ke===nt+Se-1)return he;let xn="",hn=0;for(;hn<Se;){if(!xe[hn]){hn++;continue}const yt=Tt[hn];let Dt=F[hn],sn=hn+1;for(;sn<Se&&xe[sn]&&Tt[sn]===Dt+1&&he.charCodeAt(Dt)===32;)Dt=F[sn],sn++;xn.length>0&&(xn+=" "),xn+=he.slice(yt,Dt),hn=sn}return xn},Cn=16384,Tn=new Int32Array(Cn*2);let ei=0,dn=1,fn=Object.create(null),kn=Object.create(null),jn=new Map,wa=new Map,Dr=0,zi=0;const ti=()=>{ei^=Cn,dn=dn+1|0,zi=0},vi=he=>{let ke=fn[he];if(ke!==void 0)return ke;const Se=yh(he,0,he.length),nt=(Se&16383)+ei,Ot=Tn[nt]===(Se^dn)||Tn[nt^Cn]===(Se^dn-1);return Ot&&(ke=kn[he],ke!==void 0)?(fn[he]=ke,ke):(ke=Bt(he),Ot?(fn[he]=ke,++Dr>oe&&(Dr=0,kn=fn,fn=Object.create(null),ti())):(Tn[nt]=Se^dn,++zi>Cn&&ti()),ke)},zt=he=>{let ke=jn.get(he);if(ke!==void 0)return ke;const Se=yh(he,0,he.length),nt=(Se&16383)+ei,Ot=Tn[nt]===(Se^dn)||Tn[nt^Cn]===(Se^dn-1);return Ot&&(ke=wa.get(he),ke!==void 0)?(jn.set(he,ke),ke):(ke=Bt(he),Ot?(jn.set(he,ke),++Dr>oe&&(Dr=0,wa=jn,jn=new Map,ti())):(Tn[nt]=Se^dn,++zi>Cn&&ti()),ke)},qn=he=>{const ke=yh(he,0,he.length),Se=(ke&16383)+ei;return Tn[Se]===(ke^dn)||Tn[Se^Cn]===(ke^dn-1)?!0:(Tn[Se]=ke^dn,++zi>Cn&&ti(),!1)},Fn=oe===0?Bt:q3?he=>{const ke=jn.get(he);return ke!==void 0?ke:zt(he)}:vi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn($3.apply(null,arguments))},mergeString:Fn,seenBefore:oe===0?()=>!1:qn,mergeUncached:Bt}},Bh=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let i="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const a=e;for(let o=0;o<a.length;o++){const c=a[o];if(!c)continue;const u=typeof c=="string"?c:Bh(c,t);u&&(i&&(i+=" "),i+=u)}return i}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const a in e)e[a]&&(i&&(i+=" "),i+=a)}return i},G3=(e,t)=>{let i="";for(let a=0;a<e.length;a++){const o=e[a];if(!o)continue;const c=typeof o=="string"?o:Bh(o,t);c&&(i&&(i+=" "),i+=c)}return i},$3=function(){return G3(arguments,!1)},Q3=256,qE=16,X3=1024,ey=4096,Z3=(e,t)=>{const i=t===void 0?()=>!0:t.seenBefore,a=t===void 0?e:t.mergeUncached;let o=new Map,c=new Map,u=0,d=null,f=null,g=[],y=[],h=0;const x=(R,O,A)=>{f===null&&(f=new Array(ey).fill(""),g=new Array(ey).fill(""),y=new Array(ey).fill(""));const k=yh(R,0,R.length)&4094;if(f[k]===R&&g[k]===O)return y[k];if(f[k|1]===R&&g[k|1]===O)return y[k|1];const N=e(A?O+" "+R:R),j=f[k]===""?k:k|(f[k|1]===""?1:h++&1);return f[j]=R,g[j]=O,y[j]=N,N},S=(R,O,A,k)=>{let N=0;if(O){if(O!==R.a0)return!1;N=1}if(A){if(A!==(N===0?R.a0:R.a1))return!1;N++}if(k){if(k!==(N===0?R.a0:N===1?R.a1:R.a2))return!1;N++}return N===R.t},E=(R,O)=>{const A=R.a;let k=0;for(let N=0;N<O.length;N++){const j=O[N];if(j){if(j!==A[k])return!1;k++}}return k===R.t},C=(R,O)=>{const A=R.length,k=d===null?null:d.n;if(!O){if(k!==null&&E(k,R))return d=k,k.r;if(d!==null&&d!==k&&E(d,R))return d.r}let N="",j=-1,D=0,M=!1;for(let q=0;q<A;q++){let X=R[q];if(X){if(typeof X!="string"){if(X=R[q]=Bh(X,!0),!X)continue;M=!0}j<0&&(N=X,j=q),D++}}if(D===0)return"";if(D===1)return e(N);if(M){if(k!==null&&E(k,R))return d=k,k.r;if(d!==null&&d!==k&&E(d,R))return d.r}let _=o.get(N);_===void 0&&(_=c.get(N),_!==void 0&&o.set(N,_));let L=null;if(_!==void 0){if(_.skip>0){_.skip--,d=null;let X=N;for(let B=j+1;B<A;B++){const H=R[B];H&&(X+=" "+H)}return x(X,"",!1)}const q=_.e;e:for(let X=0;X<q.length;X++){const B=q[X];if(B.t!==D)continue;const H=B.a;let U=1;for(let z=j+1;z<A;z++){const Q=R[z];if(Q&&Q!==H[U++])continue e}L=B;break}L!==null&&(_.miss=0)}if(L===null){let q=N;const X=[N];for(let H=j+1;H<A;H++){const U=R[H];U&&(q+=" "+U,X.push(U))}if(!i(q))return a(q);L={r:e(q),t:X.length,a0:X[0],a1:X[1],a2:X[2]??"",a:X,n:null},_===void 0?o.set(N,_={e:[],miss:0,skip:0,at:0}):++_.miss>qE&&(_.miss=qE,_.skip=X3,_.e.length=0,_.at=0);const B=_.e;B.length<Q3?B.push(L):(B[_.at]=L,_.at=_.at+1&255),++u>1e3&&(u=0,c=o,o=new Map)}return d!==null&&d!==L&&(d.n=L),d=L,L.r},w=R=>Array.isArray(R)?C(R.slice(),!1):e(Bh(R,!0));return function(R,O,A){const k=arguments.length;if((k|1)===3){const D=d;if(D!==null){const M=D.n;if(M!==null&&S(M,R,O,A))return d=M,M.r;if(D!==M&&S(D,R,O,A))return D.r}if(k===2&&typeof O=="string"&&O!==""){const M=o.get(R);if(M!==void 0&&M.skip>0)return M.skip--,d=null,x(O,R,!0)}return C([R,O,A],!0)}if(k===1)return typeof R=="string"?e(R):w(R);const N=d;if(N!==null){const D=N.n;if(D!==null){const M=D.a;let _=0,L=!0;for(let q=0;q<k;q++){const X=arguments[q];if(X){if(X!==M[_]){L=!1;break}_++}}if(L&&_===D.t)return d=D,D.r}if(N!==D){const M=N.a;let _=0,L=!0;for(let q=0;q<k;q++){const X=arguments[q];if(X){if(X!==M[_]){L=!1;break}_++}}if(L&&_===N.t)return N.r}}const j=[];for(let D=0;D<k;D++)j.push(arguments[D]);return C(j,!0)}},YE=Y3(K3),Ye=Z3(YE.mergeString,YE);function W3({delay:e=0,...t}){return b.jsx(S3,{"data-slot":"tooltip-provider",delay:e,...t})}function Vh({...e}){return b.jsx(WI,{"data-slot":"tooltip",...e})}function Kh({...e}){return b.jsx(n3,{"data-slot":"tooltip-trigger",...e})}function qh({className:e,side:t="top",sideOffset:i=4,align:a="center",alignOffset:o=0,children:c,...u}){return b.jsx(a3,{children:b.jsx(v3,{align:a,alignOffset:o,side:t,sideOffset:i,className:"isolate z-50",children:b.jsxs(b3,{"data-slot":"tooltip-content",className:Ye("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[c,b.jsx(x3,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}var J3=(e,t,i,a,o,c,u,d)=>{let f=document.documentElement,g=["light","dark"];function y(S){(Array.isArray(e)?e:[e]).forEach(E=>{let C=E==="class",w=C&&c?o.map(R=>c[R]||R):o;C?(f.classList.remove(...w),f.classList.add(c&&c[S]?c[S]:S)):f.setAttribute(E,S)}),h(S)}function h(S){d&&g.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)y(a);else try{let S=localStorage.getItem(t)||i,E=u&&S==="system"?x():S;y(E)}catch{}},eP=v.createContext(void 0),tP={setTheme:e=>{},themes:[]},nP=()=>{var e;return(e=v.useContext(eP))!=null?e:tP};v.memo(({forcedTheme:e,storageKey:t,attribute:i,enableSystem:a,enableColorScheme:o,defaultTheme:c,value:u,themes:d,nonce:f,scriptProps:g})=>{let y=JSON.stringify([i,t,c,e,d,u,a,o]).slice(1,-1);return v.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${J3.toString()})(${y})`}})});function rP(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}const iP=e=>{switch(e){case"success":return oP;case"info":return cP;case"warning":return lP;case"error":return uP;default:return null}},aP=Array(12).fill(0),sP=({visible:e,className:t})=>Ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},aP.map((i,a)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),oP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),uP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fP=()=>{const[e,t]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const i=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",i),()=>document.removeEventListener("visibilitychange",i)},[]),e};let hP=1;const pP=100,GE=e=>{var t;return typeof e?.id=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:hP++};class gP{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(i=>t(i)),()=>{const i=this.subscribers.indexOf(t);this.subscribers.splice(i,1)}),this.publish=t=>{this.subscribers.forEach(i=>i(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-pP;t<=0||(this.toasts=this.toasts.filter(i=>t>0&&this.dismissedToasts.has(i.id)?(this.dismissedToasts.delete(i.id),t--,!1):!0))},this.create=t=>{const{message:i,...a}=t,o=GE(t),c=this.pendingDismissals.get(o);c!==void 0&&(cancelAnimationFrame(c),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const u=this.dismissedToasts.has(o),d=t.dismissible===void 0?!0:t.dismissible;return u&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(g=>g.id!==o)),(u?void 0:this.toasts.find(g=>g.id===o))?this.toasts=this.toasts.map(g=>g.id===o?(this.publish({...g,...t,id:o,title:i}),{...g,...t,id:o,dismissible:d,title:i}):g):this.addToast({title:i,...a,dismissible:d,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(a=>{this.dismissedToasts.add(a.id),this.subscribers.forEach(o=>o({id:a.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const i=this.pendingDismissals.get(t);return i!==void 0&&cancelAnimationFrame(i),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(a=>a({id:t,dismiss:!0}))})),t},this.message=(t,i)=>this.create({...i,message:t,type:void 0}),this.error=(t,i)=>this.create({...i,message:t,type:"error"}),this.success=(t,i)=>this.create({...i,type:"success",message:t}),this.info=(t,i)=>this.create({...i,type:"info",message:t}),this.warning=(t,i)=>this.create({...i,type:"warning",message:t}),this.loading=(t,i)=>this.create({...i,type:"loading",message:t}),this.promise=(t,i)=>{if(!i)return;let a;i.loading!==void 0&&(a=this.create({...i,promise:t,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let c=a!==void 0,u;const d=o.then(async g=>{if(u=["resolve",g],Ne.isValidElement(g))c=!1,this.create({id:a,type:"default",message:g});else if(yP(g)&&!g.ok){c=!1;const h=typeof i.error=="function"?await i.error(`HTTP error! status: ${g.status}`):i.error,x=typeof i.description=="function"?await i.description(`HTTP error! status: ${g.status}`):i.description,E=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:x,...E})}else if(g instanceof Error){c=!1;const h=typeof i.error=="function"?await i.error(g):i.error,x=typeof i.description=="function"?await i.description(g):i.description,E=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:x,...E})}else if(i.success!==void 0){c=!1;const h=typeof i.success=="function"?await i.success(g):i.success,x=typeof i.description=="function"?await i.description(g):i.description,E=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:a,type:"success",description:x,...E})}}).catch(async g=>{if(u=["reject",g],i.error!==void 0){c=!1;const y=typeof i.error=="function"?await i.error(g):i.error,h=typeof i.description=="function"?await i.description(g):i.description,S=typeof y=="object"&&!Ne.isValidElement(y)?y:{message:y};this.create({id:a,type:"error",description:h,...S})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),i.finally==null||i.finally.call(i)}),f=()=>new Promise((g,y)=>d.then(()=>u[0]==="reject"?y(u[1]):g(u[1])).catch(y));return typeof a!="string"&&typeof a!="number"?{unwrap:f}:Object.assign(a,{unwrap:f})},this.custom=(t,i)=>{const a=GE(i);return this.create({...i,jsx:t(a),id:a,type:void 0}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Qr=new gP,mP=(e,t)=>Qr.message(e,t),yP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vP=mP,bP=()=>Qr.toasts,xP=()=>Qr.getActiveToasts(),ln=Object.assign(vP,{success:Qr.success,info:Qr.info,warning:Qr.warning,error:Qr.error,custom:Qr.custom,message:Qr.message,promise:Qr.promise,dismiss:Qr.dismiss,loading:Qr.loading},{getHistory:bP,getToasts:xP});rP("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Xf(e){return e.label!==void 0}const SP=3,EP="24px",wP="16px",$E=4e3,RP=356,CP=14,TP=45,OP=200;function ua(...e){return e.filter(Boolean).join(" ")}function AP(e){const[t,i]=e.split("-"),a=[];return t&&a.push(t),i&&a.push(i),a}const kP=e=>{var t,i,a,o,c,u,d,f,g;const{invert:y,toast:h,unstyled:x,interacting:S,setHeights:E,visibleToasts:C,heights:w,index:R,toasts:O,expanded:A,removeToast:k,defaultRichColors:N,closeButton:j,style:D,cancelButtonStyle:M,actionButtonStyle:_,className:L="",descriptionClassName:q="",duration:X,position:B,gap:H,expandByDefault:U,classNames:z,icons:Q,closeButtonAriaLabel:$="Close toast"}=e,[K,Y]=Ne.useState(null),[ee,G]=Ne.useState(null),[oe,I]=Ne.useState(!1),[V,J]=Ne.useState(!1),[re,we]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ue]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Ae]=Ne.useState(0),Le=Ne.useRef(h.duration||X||$E),Be=Ne.useRef(null),Oe=Ne.useRef(null),Ue=R===0,be=R+1<=C,He=h.type,Ze=He??"default",st=h.dismissible!==!1,de=h.className||"",Ee=h.descriptionClassName||"",Ge=Ne.useMemo(()=>w.findIndex(je=>je.toastId===h.id)||0,[w,h.id]),Me=Ne.useMemo(()=>{var je;return(je=h.closeButton)!=null?je:j},[h.closeButton,j]),De=Ne.useMemo(()=>h.duration||X||$E,[h.duration,X]),vt=Ne.useRef(0),dt=Ne.useRef(0),pt=Ne.useRef(0),Mt=Ne.useRef(null),[jt,en]=B.split("-"),an=Ne.useMemo(()=>w.reduce((je,at,Ie)=>Ie>=Ge?je:je+at.height,0),[w,Ge]),tn=fP(),Je=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:AP(B)},[e.swipeDirections,B]),St=h.invert||y,Xt=He==="loading";dt.current=Ne.useMemo(()=>Ge*H+an,[Ge,an]),Ne.useEffect(()=>{Le.current=De},[De]),Ne.useEffect(()=>{I(!0)},[]),Ne.useEffect(()=>{const je=Oe.current;if(je){const at=je.getBoundingClientRect().height;return Ae(at),E(Ie=>[{toastId:h.id,height:at,position:h.position},...Ie]),()=>E(Ie=>Ie.filter(ze=>ze.toastId!==h.id))}},[E,h.id]),Ne.useLayoutEffect(()=>{if(!oe)return;const je=Oe.current,at=je.style.height;je.style.height="auto";const Ie=je.getBoundingClientRect().height;je.style.height=at,Ae(Ie),E(ze=>ze.find(et=>et.toastId===h.id)?ze.map(et=>et.toastId===h.id?{...et,height:Ie}:et):[{toastId:h.id,height:Ie,position:h.position},...ze])},[oe,h.title,h.description,E,h.id,h.jsx,h.action,h.cancel]);const ht=Ne.useCallback(()=>{J(!0),ve(dt.current),E(je=>je.filter(at=>at.toastId!==h.id)),setTimeout(()=>{k(h)},OP)},[h,k,E,dt]);Ne.useEffect(()=>{if(h.promise&&He==="loading"||h.duration===1/0||h.type==="loading")return;let je;return A||S||tn?(()=>{if(pt.current<vt.current){const ze=new Date().getTime()-vt.current;Le.current=Le.current-ze}pt.current=new Date().getTime()})():Le.current!==1/0&&(vt.current=new Date().getTime(),je=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ht()},Le.current)),()=>clearTimeout(je)},[A,S,h,He,tn,ht]),Ne.useEffect(()=>{h.delete&&(ht(),h.onDismiss==null||h.onDismiss.call(h,h))},[ht,h.delete]);function bt(){var je;if(Q?.loading){var at;return Ne.createElement("div",{className:ua(z?.loader,h==null||(at=h.classNames)==null?void 0:at.loader,"sonner-loader"),"data-visible":He==="loading"},Q.loading)}return Ne.createElement(sP,{className:ua(z?.loader,h==null||(je=h.classNames)==null?void 0:je.loader),visible:He==="loading"})}const mt=h.icon||Q?.[He]||iP(He);var Ut,un;return Ne.createElement("li",{tabIndex:0,ref:Oe,className:ua(L,de,z?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,z?.[Ze],h==null||(i=h.classNames)==null?void 0:i[Ze]),"data-sonner-toast":"","data-rich-colors":(Ut=h.richColors)!=null?Ut:N,"data-styled":!(h.jsx||h.unstyled||x),"data-mounted":oe,"data-promise":!!h.promise,"data-swiped":ge,"data-removed":V,"data-visible":be,"data-y-position":jt,"data-x-position":en,"data-index":R,"data-front":Ue,"data-swiping":re,"data-dismissible":st,"data-type":He,"data-invert":St,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(A||U&&oe),"data-testid":h.testId,style:{"--index":R,"--toasts-before":R,"--z-index":O.length-R,"--offset":`${V?Te:dt.current}px`,"--initial-height":U?"auto":`${Pe}px`,...D,...h.style},onDragEnd:()=>{we(!1),Y(null),Mt.current=null},onPointerDown:je=>{je.button!==2&&(Xt||!st||(Be.current=new Date,ve(dt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(we(!0),Mt.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,at,Ie;if(le||!st)return;Mt.current=null;const ze=Number(((je=Oe.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$e=Number(((at=Oe.current)==null?void 0:at.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((Ie=Be.current)==null?void 0:Ie.getTime()),Tt=K==="x"?ze:$e,F=Math.abs(Tt)/et;if((K==="x"?Je.includes(ze>0?"right":"left"):Je.includes($e>0?"bottom":"top"))&&(Math.abs(Tt)>=TP||F>.11)){ve(dt.current),h.onDismiss==null||h.onDismiss.call(h,h),G(K==="x"?ze>0?"right":"left":$e>0?"down":"up"),ht(),me(!0);return}else{var ne,ye;(ne=Oe.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ye=Oe.current)==null||ye.style.setProperty("--swipe-amount-y","0px")}ue(!1),we(!1),Y(null)},onPointerMove:je=>{var at,Ie,ze;if(!Mt.current||!st||((at=window.getSelection())==null?void 0:at.toString().length)>0)return;const et=je.clientY-Mt.current.y,Tt=je.clientX-Mt.current.x;!K&&(Math.abs(Tt)>1||Math.abs(et)>1)&&Y(Math.abs(Tt)>Math.abs(et)?"x":"y");let F={x:0,y:0};const W=ne=>1/(1.5+Math.abs(ne)/20);if(K==="y"){if(Je.includes("top")||Je.includes("bottom"))if(Je.includes("top")&&et<0||Je.includes("bottom")&&et>0)F.y=et;else{const ne=et*W(et);F.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(K==="x"&&(Je.includes("left")||Je.includes("right")))if(Je.includes("left")&&Tt<0||Je.includes("right")&&Tt>0)F.x=Tt;else{const ne=Tt*W(Tt);F.x=Math.abs(ne)<Math.abs(Tt)?ne:Tt}(Math.abs(F.x)>0||Math.abs(F.y)>0)&&ue(!0),(Ie=Oe.current)==null||Ie.style.setProperty("--swipe-amount-x",`${F.x}px`),(ze=Oe.current)==null||ze.style.setProperty("--swipe-amount-y",`${F.y}px`)}},Me&&!h.jsx&&He!=="loading"?Ne.createElement("button",{"aria-label":$,"data-disabled":Xt,"data-close-button":!0,onClick:Xt||!st?()=>{}:()=>{ht(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ua(z?.closeButton,h==null||(a=h.classNames)==null?void 0:a.closeButton)},(un=Q?.close)!=null?un:dP):null,(He||h.icon||h.promise)&&h.icon!==null&&(Q?.[He]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:ua(z?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},He==="loading"?h.icon||bt():h.promise?bt():null,He!=="loading"?mt:null):null,Ne.createElement("div",{"data-content":"",className:ua(z?.content,h==null||(c=h.classNames)==null?void 0:c.content)},Ne.createElement("div",{"data-title":"",className:ua(z?.title,h==null||(u=h.classNames)==null?void 0:u.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:ua(q,Ee,z?.description,h==null||(d=h.classNames)==null?void 0:d.description)},typeof h.description=="function"?h.description():h.description):null),Ne.isValidElement(h.cancel)?h.cancel:h.cancel&&Xf(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:je=>{Xf(h.cancel)&&st&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,je),ht())},className:ua(z?.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&Xf(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||_,onClick:je=>{Xf(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,je),!je.defaultPrevented&&ht())},className:ua(z?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function QE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function MP(e,t){const i={};return[e,t].forEach((a,o)=>{const c=o===1,u=c?"--mobile-offset":"--offset",d=c?wP:EP;function f(g){["top","right","bottom","left"].forEach(y=>{i[`${u}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof a=="number"||typeof a=="string"?f(a):typeof a=="object"?["top","right","bottom","left"].forEach(g=>{a[g]===void 0?i[`${u}-${g}`]=d:i[`${u}-${g}`]=typeof a[g]=="number"?`${a[g]}px`:a[g]}):f(d)}),i}const NP=Ne.forwardRef(function(t,i){const{id:a,invert:o,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:g,offset:y,mobileOffset:h,theme:x="light",richColors:S,duration:E,style:C,visibleToasts:w=SP,toastOptions:R,dir:O=QE(),gap:A=CP,icons:k,customAriaLabel:N,containerAriaLabel:j="Notifications"}=t,[D,M]=Ne.useState([]),_=Ne.useMemo(()=>a?D.filter(I=>I.toasterId===a):D.filter(I=>!I.toasterId),[D,a]),L=Ne.useMemo(()=>Array.from(new Set([c].concat(_.filter(I=>I.position).map(I=>I.position)))),[_,c]),[q,X]=Ne.useState([]),[B,H]=Ne.useState(!1),[U,z]=Ne.useState(!1),[Q,$]=Ne.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=Ne.useRef(null),Y=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),G=Ne.useRef(!1),oe=Ne.useCallback(I=>{M(V=>{var J;return(J=V.find(re=>re.id===I.id))!=null&&J.delete||Qr.dismiss(I.id),V.filter(({id:re})=>re!==I.id)})},[]);return Ne.useEffect(()=>Qr.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{M(V=>V.map(J=>J.id===I.id?{...J,delete:!0}:J))});return}setTimeout(()=>{b4.flushSync(()=>{M(V=>{const J=V.findIndex(re=>re.id===I.id);return J!==-1?[...V.slice(0,J),{...V[J],...I},...V.slice(J+1)]:[I,...V]})})})}),[]),Ne.useEffect(()=>{if(x!=="system"){$(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{I.addListener(({matches:J})=>{try{$(J?"dark":"light")}catch(re){console.error(re)}})}},[x]),Ne.useEffect(()=>{D.length<=1&&H(!1)},[D]),Ne.useEffect(()=>{const I=V=>{var J;if(u.length>0&&u.every(le=>V[le]||V.code===le)){var we;H(!0),(we=K.current)==null||we.focus()}V.code==="Escape"&&(document.activeElement===K.current||(J=K.current)!=null&&J.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),Ne.useEffect(()=>{if(K.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,G.current=!1)}},[K.current]),Ne.createElement("section",{ref:i,"aria-label":N??`${j} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},L.map((I,V)=>{var J;const[re,we]=I.split("-");return _.length?Ne.createElement("ol",{key:I,dir:O==="auto"?QE():O,tabIndex:-1,ref:K,className:g,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":re,"data-x-position":we,style:{"--front-toast-height":`${((J=q[0])==null?void 0:J.height)||0}px`,"--width":`${RP}px`,"--gap":`${A}px`,...C,...MP(y,h)},onBlur:le=>{G.current&&!le.currentTarget.contains(le.relatedTarget)&&(G.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||G.current||(G.current=!0,ee.current=le.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{U||H(!1)},onDragEnd:()=>H(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},_.filter(le=>!le.position&&V===0||le.position===I).map((le,me)=>{var ge,ue;return Ne.createElement(kP,{key:le.id,icons:k,index:me,toast:le,defaultRichColors:S,duration:(ge=R?.duration)!=null?ge:E,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:w,closeButton:(ue=R?.closeButton)!=null?ue:f,interacting:U,position:I,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:oe,toasts:_.filter(Te=>Te.position==le.position),heights:q.filter(Te=>Te.position==le.position),setHeights:X,expandByDefault:d,gap:A,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),DP=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function jP(e,t,i=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:DP(e),size:24,node:t,...i.length>0?{aliases:i}:{}}}const IP=e=>{let t="",i=!1;for(const a of e){if(a==="-"||a==="_"||a<=" "){i=t.length>0;continue}t.length===0?t+=a.toLowerCase():t+=i?a.toUpperCase():a,i=!1}return t},PP=e=>{const t=IP(e);return t.charAt(0).toUpperCase()+t.slice(1)},jy=(...e)=>{const t=new Set;for(const i of e)if(typeof i=="string")for(const a of i.split(/\s+/))a&&t.add(a);return[...t].join(" ")},Al={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function ty(e){return e!=null}function LP(e,t={}){const i=t.attributeNames??{},a=x=>i[x]??x,o=e.size??e.width??Al.width,c=e.size??e.height??Al.height,u=e.aliases?.filter(x=>typeof x=="string"&&x.trim()!=="").map(x=>`lucide-${x}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...u],f=t.className?.split(" ").filter(Boolean)??[],g=t.includeDefaultClasses===!1?jy(...f):jy("lucide",...d,...f);let y=t.strokeWidth??Al["stroke-width"];if(t.absoluteStrokeWidth){const x=Number(y)*Number(e.size??e.width??Al.width)/Number(t.size??t.width??Al.width);Number.isFinite(x)&&(y=x)}return["svg",{...Object.entries(Al).reduce((x,[S,E])=>(x[a(S)]=E,x),{}),..."color"in t&&t.color&&{[a("stroke")]:t.color},..."size"in t&&ty(t.size)&&{[a("width")]:t.size,[a("height")]:t.size},..."width"in t&&ty(t.width)&&{[a("width")]:t.width},..."height"in t&&ty(t.height)&&{[a("height")]:t.height},[a("stroke-width")]:y,...g&&{[a("class")]:g},[a("viewBox")]:`0 0 ${o} ${c}`,...t.hasA11yProp===!1?{[a("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(x=>{const[S,E,C]=x,w=t.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...E}:E;return C?[S,w,C]:[S,w]})]}function zP(e,t={}){return LP(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const _P=e=>{if(e==null||typeof e!="object")return!1;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith("aria-")||t==="role"||t==="title")&&e[t]!=null)return!0;return!1},UP=v.createContext({}),HP=()=>v.useContext(UP),FP=v.forwardRef(({color:e,size:t,width:i,height:a,strokeWidth:o,absoluteStrokeWidth:c,nonScalingStroke:u,className:d="",children:f,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...h},x)=>{const{size:S=24,strokeWidth:E=2,absoluteStrokeWidth:C=!1,nonScalingStroke:w=!1,color:R="currentColor",className:O=""}=HP()??{},A=!!f||_P(h),[k,N,j=[]]=zP(y,{color:e??R,width:i??t??S,height:a??t??S,strokeWidth:o??E,absoluteStrokeWidth:c??C,nonScalingStroke:u??w,className:jy(O,d),hasA11yProp:A,attributes:h});return v.createElement(k,{ref:x,...N},[...j.map(([D,M])=>v.createElement(D,M)),...Array.isArray(f)?f:[f]])});function Nt(e,t=[],i=[]){const a=typeof e=="string"?jP(e,t,i):e,o=v.forwardRef(({className:c,...u},d)=>v.createElement(FP,{ref:d,icon:a,className:c,...u}));return a.name&&(o.displayName=PP(a.name)),o}const tT={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};tT.node;const BP=Nt(tT),nT={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};nT.node;const rT=Nt(nT),iT={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};iT.node;const Up=Nt(iT),aT={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};aT.node;const Vv=Nt(aT),sT={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};sT.node;const Kv=Nt(sT),oT={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};oT.node;const VP=Nt(oT),lT={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};lT.node;const KP=Nt(lT),cT={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5",key:"1awbb0"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};cT.node;const qP=Nt(cT),uT={name:"copy",size:24,node:[["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"}]]};uT.node;const YP=Nt(uT),dT={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};dT.node;const qv=Nt(dT),fT={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};fT.node;const Yv=Nt(fT),hT={name:"eye-off",size:24,node:[["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"}]]};hT.node;const GP=Nt(hT),pT={name:"eye",size:24,node:[["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"}]]};pT.node;const $P=Nt(pT),gT={name:"file-input",size:24,node:[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1",key:"1q9hii"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]};gT.node;const mT=Nt(gT),yT={name:"file-output",size:24,node:[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]};yT.node;const vT=Nt(yT),bT={name:"file-plus",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};bT.node;const QP=Nt(bT),xT={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};xT.node;const Gv=Nt(xT),ST={name:"files",size:24,node:[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]};ST.node;const XP=Nt(ST),ET={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};ET.node;const wT=Nt(ET),RT={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};RT.node;const ZP=Nt(RT),CT={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};CT.node;const TT=Nt(CT),OT={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};OT.node;const $v=Nt(OT),AT={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};AT.node;const WP=Nt(AT),kT={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};kT.node;const JP=Nt(kT),MT={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};MT.node;const eL=Nt(MT),NT={name:"library-big",size:24,node:[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]};NT.node;const tL=Nt(NT),DT={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};DT.node;const Qi=Nt(DT),jT={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};jT.node;const nL=Nt(jT),IT={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};IT.node;const rL=Nt(IT),PT={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};PT.node;const iL=Nt(PT),LT={name:"paintbrush",size:24,node:[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]};LT.node;const aL=Nt(LT),zT={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};zT.node;const sL=Nt(zT),_T={name:"pencil",size:24,node:[["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"}]]};_T.node;const UT=Nt(_T),HT={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};HT.node;const sc=Nt(HT),FT={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};FT.node;const oL=Nt(FT),BT={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};BT.node;const VT=Nt(BT),KT={name:"save",size:24,node:[["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"}]]};KT.node;const Qv=Nt(KT),qT={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};qT.node;const lL=Nt(qT),YT={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};YT.node;const GT=Nt(YT),$T={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};$T.node;const Xv=Nt($T),QT={name:"triangle-exclamation-point",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle","triangle-alert"]};QT.node;const cL=Nt(QT),XT={name:"user-round-plus",size:24,node:[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]],aliases:["user-plus-2"]};XT.node;const uL=Nt(XT),ZT={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};ZT.node;const Iy=Nt(ZT),WT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};WT.node;const qs=Nt(WT),dL=({...e})=>{const{theme:t="system"}=nP();return b.jsx(NP,{theme:t,className:"toaster group",icons:{success:b.jsx(KP,{className:"size-4"}),info:b.jsx(WP,{className:"size-4"}),warning:b.jsx(cL,{className:"size-4"}),error:b.jsx(iL,{className:"size-4"}),loading:b.jsx(Qi,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},JT=v.createContext(void 0),mi=e=>{const t=v.useContext(JT);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},fL=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(JT.Provider,{value:e,children:t})),hL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var pL=class{#e=hL;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};const To=new pL;function gL(e){setTimeout(e,0)}const mL=typeof window>"u"||"Deno"in globalThis;function Hr(){}function yL(e,t){return typeof e=="function"?e(t):e}function eO(e){return typeof e=="number"&&e>=0&&e!==1/0}function tO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pn(e,t){return typeof e=="function"?e(t):e}function XE(e,t){const{type:i="all",exact:a,fetchStatus:o,predicate:c,queryKey:u,stale:d}=e;if(u){if(a){if(t.queryHash!==Zv(u,t.options))return!1}else if(!ec(t.queryKey,u))return!1}if(i!=="all"){const f=t.isActive();if(i==="active"&&!f||i==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||c&&!c(t))}function ZE(e,t){const{exact:i,status:a,predicate:o,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(i){if(jo(t.options.mutationKey)!==jo(c))return!1}else if(!ec(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function Zv(e,t){return(t?.queryKeyHashFn||jo)(e)}function jo(e){return JSON.stringify(e,(t,i)=>Py(i)?Object.keys(i).sort().reduce((a,o)=>(a[o]=i[o],a),{}):i)}function ec(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let a=0;a<t.length;a++)if(!ec(e[a],t[a]))return!1;return!0}const i=Object.keys(t);for(const a of i)if(!ec(e[a],t[a]))return!1;return!0}return!1}const vL=Object.prototype.hasOwnProperty;function Wv(e,t,i=0){if(e===t)return e;if(i>500)return t;const a=WE(e)&&WE(t);if(!a&&!(Py(e)&&Py(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),u=c.length,d=a?new Array(u):{};let f=0;for(let g=0;g<u;g++){const y=a?g:c[g],h=e[y],x=t[y];if(h===x){d[y]=h,(a?g<o:vL.call(e,y))&&f++;continue}if(h===null||x===null||typeof h!="object"||typeof x!="object"){d[y]=x;continue}const S=Wv(h,x,i+1);d[y]=S,S===h&&f++}return o===u&&f===o?e:d}function vh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}function WE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Py(e){if(!JE(e))return!1;const t=Object.getPrototypeOf(e),i=t?.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const a=i.prototype;return!(!JE(a)||!a.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function JE(e){return Object.prototype.toString.call(e)==="[object Object]"}function bL(e){return new Promise(t=>{To.setTimeout(t,e)})}function Ly(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?Wv(e,t):t}function xL(e,t,i=0){const a=[...e,t];return i&&a.length>i?a.slice(1):a}function SL(e,t,i=0){const a=[t,...e];return i&&a.length>i?a.slice(0,-1):a}const Jv=Symbol();function nO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Jv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function eb(e,t){return typeof e=="function"?e(...t):!!e}function EL(e,t,i){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),e}let wL=()=>mL;const tb=()=>wL();var oc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},RL=class extends oc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const nb=new RL,CL=gL;function TL(){let e=[],t=0,i=d=>{d()},a=d=>{d()},o=CL;const c=d=>{t?e.push(d):o(()=>{i(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{a(()=>{d.forEach(f=>{i(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{c(()=>{d(...f)})},schedule:c,setNotifyFunction:d=>{i=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{o=d}}}const Jn=TL();var OL=class extends oc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};const Yh=new OL;function AL(e){return Math.min(1e3*2**e,3e4)}function rO(e){return(e??"online")==="online"?Yh.isOnline():!0}var zy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function iO(e){let t=!1,i=0,a,o="pending",c,u;const d=new Promise((O,A)=>{c=O,u=A});d.catch(Hr);const f=()=>o!=="pending",g=O=>{if(!f()){const A=new zy(O);C(A),e.onCancel?.(A)}},y=()=>{t=!0},h=()=>{t=!1},x=()=>nb.isFocused()&&(e.networkMode==="always"||Yh.isOnline())&&e.canRun(),S=()=>rO(e.networkMode)&&e.canRun(),E=O=>{f()||(a?.(),o="resolved",c(O))},C=O=>{f()||(a?.(),o="rejected",u(O))},w=O=>new Promise(A=>{a=k=>{(f()||O())&&A(k)},e.onPause?.()}).then(()=>{a=void 0,f()||e.onContinue?.()}),R=()=>{if(f())return;let O;const A=i===0?e.initialPromise:void 0;try{O=A??e.fn()}catch(k){O=Promise.reject(k)}Promise.resolve(O).then(E).catch(k=>{if(f())return;const N=e.retry??(tb()?0:3),j=e.retryDelay??AL,D=typeof j=="function"?j(i,k):j,M=N===!0||typeof N=="number"&&i<N||typeof N=="function"&&N(i,k);if(t||!M){C(k);return}i++,e.onFail?.(i,k),bL(D).then(()=>x()?void 0:w(x)).then(()=>{t?C(k):R()})})};return{promise:d,status:()=>o,cancel:g,continue:()=>(a?.(),d),cancelRetry:y,continueRetry:h,canStart:S,start:()=>(S()?R():w(S).then(R),d)}}var aO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),eO(this.gcTime)&&(this.#e=To.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tb()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(To.clearTimeout(this.#e),this.#e=void 0)}};function kL(e){return{onFetch:(t,i)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const g=async()=>{let y=!1;const h=E=>{EL(E,()=>t.signal,()=>y=!0)},x=nO(t.options,t.fetchOptions),S=async(E,C,w)=>{if(y)return Promise.reject(t.signal.reason);if(C==null&&E.pages.length)return Promise.resolve(E);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:C,direction:w?"backward":"forward",meta:t.options.meta};return h(j),j})(),A=await x(O),{maxPages:k}=t.options,N=w?SL:xL;return{pages:N(E.pages,A,k),pageParams:N(E.pageParams,C,k)}};if(o&&c.length){const E=o==="backward",C=E?ML:ew,w={pages:c,pageParams:u};d=await S(w,C(a,w),E)}else{const E=e??c.length;do{const C=f===0?u[0]===void 0?a.initialPageParam:u[0]:ew(a,d);if(f>0&&C==null)break;d=await S(d,C),f++}while(f<E)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i):t.fetchFn=g}}}function ew(e,{pages:t,pageParams:i}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,i[a],i):void 0}function ML(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}var NL=class extends aO{#e;#t;#n;#r;#a;#i;#s;#l;constructor(e){super(),this.#l=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#r=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=nw(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=nw(this.options);t.data!==void 0&&(this.setState(tw(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const i=Ly(this.state.data,e,this.options);return this.#o({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Hr).catch(Hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Pn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jv||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!tO(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#i&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(g=>g.options.queryFn);f&&this.setOptions(f.options)}const i=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,i.signal)})},o=()=>{const f=nO(this.options,t),y=(()=>{const h={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(h),h})();return this.#l=!1,this.options.persister?this.options.persister(f,y,this):f(y)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(f),f})();(this.#e==="infinite"?kL(this.options.pages):this.options.behavior)?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta});const d=this.#i=iO({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof zy&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(f,g)=>{this.#o({type:"failed",failureCount:f,error:g})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await d.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#r.config.onSuccess?.(f,this),this.#r.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof zy){if(f.silent)return this.#i.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#r.config.onError?.(f,this),this.#r.config.onSettled?.(this.state.data,f,this),f}finally{this.#i===d&&(this.#i=void 0),this.scheduleGc()}}#o(e){const t=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...sO(i.data,this.options),fetchMeta:e.meta??null};case"success":const a={...i,...tw(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const o=e.error;return{...i,error:o,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=t(this.state),Jn.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function sO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,i=t!==void 0,a=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var DL=class extends oc{#e;#t=void 0;#n=void 0;#r=void 0;#a;#i;#s;#l;#o;#h;#u;#d;#c;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),rw(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _y(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _y(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!vh(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&iw(this.#t,i,this.options,t)&&this.#f(),this.updateResult(),a&&(this.#t!==i||Pn(this.options.enabled,this.#t)!==Pn(t.enabled,this.#t)||Pn(this.options.staleTime,this.#t)!==Pn(t.staleTime,this.#t))&&this.#m();const o=this.#y();a&&(this.#t!==i||Pn(this.options.enabled,this.#t)!==Pn(t.enabled,this.#t)||o!==this.#c)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(t,e);return vh(this.getCurrentResult(),i)||(this.#r=i,this.#i=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(i,a)=>(this.trackProp(a),t?.(a),Reflect.get(i,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,t);let a=()=>{},o;const c=new Promise(u=>{o=u,a=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===i.queryHash&&i.state.data!==void 0&&(a(),u(this.createResult(i,t)))})});return Promise.race([i.fetch(t).then(()=>{const u=this.createResult(i,t);return o?.(u),u}).finally(()=>{a()}),c])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Hr)),t}#g(e){return!tb()&&Pn(this.options.enabled,this.#t)!==!1&&eO(e)}#m(){this.#x();const e=Pn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const t=tO(this.#r.dataUpdatedAt,e)+1;this.#u=To.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#y(){return Pn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#c=e,!(this.#c===0||!this.#g(this.#c))&&(this.#d=To.setInterval(()=>{(this.options.refetchIntervalInBackground||nb.isFocused())&&this.#f()},this.#c))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#u!==void 0&&(To.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#d!==void 0&&(To.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const i=this.#t,a=this.options,o=this.#r,c=this.#a,u=this.#i,d=e!==i?e.state:this.#n,{state:f}=e;let g={...f},y=!1,h;if(t._optimisticResults){const N=this.hasListeners(),j=!N&&rw(e,t),D=N&&iw(e,i,t,a);(j||D)&&(g={...g,...sO(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:E}=g;h=g.data;let C=!1;if(t.placeholderData!==void 0&&h===void 0&&E==="pending"){let N;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(N=o.data,C=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,N!==void 0&&(E="success",h=Ly(o?.data,N,t),y=!0)}if(t.select&&h!==void 0&&!C)if(o&&h===c?.data&&t.select===this.#l)h=this.#o;else try{this.#l=t.select,h=t.select(h),h=Ly(o?.data,h,t),this.#o=h,this.#s=null}catch(N){this.#s=N}else h===void 0&&(this.#s=null);this.#s&&(x=this.#s,h=this.#o,S=Date.now(),E="error",y=!1);const w=g.fetchStatus==="fetching",R=E==="pending",O=E==="error",A=R&&w,k=h!==void 0;return{status:E,fetchStatus:g.fetchStatus,isPending:R,isSuccess:E==="success",isError:O,isInitialLoading:A,isLoading:A,data:h,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!R,isLoadingError:O&&!k,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:O&&k,isStale:rb(e,t),refetch:this.refetch,isEnabled:Pn(t.enabled,e)!==!1}}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#h=this.#t),vh(t,e))return;this.#r=t;const a=(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,c=typeof o=="function"?o():o;if(c==="all"||!c&&!this.#p.size)return!0;const u=new Set(c??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(d=>{const f=d;return this.#r[f]!==e[f]&&u.has(f)})})();Jn.batch(()=>{a&&this.listeners.forEach(o=>{o(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function jL(e,t){return Pn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pn(t.retryOnMount,e)===!1)}function rw(e,t){return jL(e,t)||e.state.data!==void 0&&_y(e,t,t.refetchOnMount)}function _y(e,t,i){if(Pn(t.enabled,e)!==!1&&Pn(t.staleTime,e)!=="static"){const a=Pn(i,e);return a==="always"||a!==!1&&rb(e,t)}return!1}function iw(e,t,i,a){return(e!==t||Pn(a.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&rb(e,i)}function rb(e,t){return Pn(t.enabled,e)!==!1&&e.isStaleByTime(Pn(t.staleTime,e))}var IL=class extends aO{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||oO(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const t=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},a=this.#r=iO({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",c=!a.canStart();try{if(o)t();else{this.#a({type:"pending",variables:e,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const d=await this.options.onMutate?.(e,i);d!==this.state.context&&this.#a({type:"pending",context:d,variables:e,isPaused:c})}const u=await a.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,i),await this.options.onSuccess?.(u,e,this.state.context,i),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,e,this.state.context,i),this.#a({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,i)}catch(d){Promise.reject(d)}try{await this.options.onError?.(u,e,this.state.context,i)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,i)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:u}),u}finally{this.#r===a&&(this.#r=void 0),this.#n.runNext(this)}}#a(e){const t=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Jn.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function oO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var PL=class extends oc{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,i){const a=new IL({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:i});return this.add(a),a}add(e){this.#e.add(e);const t=Zf(e);if(typeof t=="string"){const i=this.#t.get(t);i?i.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Zf(e);if(typeof t=="string"){const i=this.#t.get(t);if(i)if(i.length>1){const a=i.indexOf(e);a!==-1&&i.splice(a,1)}else i[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Zf(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(a=>a.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Zf(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Jn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(t=>{this.notify({type:"removed",mutation:t})})})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(i=>ZE(t,i))}findAll(e={}){return this.getAll().filter(t=>ZE(e,t))}notify(e){Jn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Jn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Hr))))}};function Zf(e){return e.options.scope?.id}var LL=class extends oc{#e;#t=void 0;#n;#r;constructor(t,i){super(),this.#e=t,this.setOptions(i),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const i=this.options;this.options=this.#e.defaultMutationOptions(t),vh(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&jo(i.mutationKey)!==jo(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#a())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(t,i){return this.#r=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){const t=this.#n?.state??oO();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){Jn.batch(()=>{const i=this.#r;if(i&&this.hasListeners()){const a=this.#t.variables,o=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{i.onSuccess?.(t.data,a,o,c)}catch(u){Promise.reject(u)}try{i.onSettled?.(t.data,null,a,o,c)}catch(u){Promise.reject(u)}}else if(t?.type==="error"){try{i.onError?.(t.error,a,o,c)}catch(u){Promise.reject(u)}try{i.onSettled?.(void 0,t.error,a,o,c)}catch(u){Promise.reject(u)}}}this.listeners.forEach(a=>{a(this.#t)})})}},lO=class extends oc{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,i){const a=t.queryKey,o=t.queryHash??Zv(a,t);let c=this.get(o);return c||(c=new NL({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Jn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(i=>XE(t,i))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(i=>XE(e,i)):t}notify(e){Jn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Jn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Jn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},zL=class{#e;#t;#n;#r;#a;#i;#s;#l;constructor(e={}){this.#e=e.queryCache||new lO,this.#t=e.mutationCache||new PL,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=nb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Yh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),i=this.#e.build(this,t),a=i.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Pn(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:i})=>[t,i.data])}setQueryData(e,t,i){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,c=yL(t,o);if(c!==void 0)return this.#e.build(this,a).setData(c,{...i,manual:!0})}setQueriesData(e,t,i){return Jn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,i)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Jn.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=this.#e;return Jn.batch(()=>{const a=i.findAll(e),o=new Set(a);return a.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},t)})}cancelQueries(e,t={}){const i={revert:!0,...t},a=Jn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(i)));return Promise.all(a).then(Hr).catch(Hr)}invalidateQueries(e,t={}){return Jn.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const i={...t,cancelRefetch:t.cancelRefetch??!0},a=Jn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,i);return i.throwOnError||(c=c.catch(Hr)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(Hr)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=this.#e.build(this,t),a=i.isStaleByTime(Pn(t.staleTime,i))?await i.fetch(t):i.state.data,o=t.select;return o?o(a):a}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=this.#e.build(this,t);return i.isStaleByTime(Pn(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Hr).catch(Hr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Hr).catch(Hr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Yh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(jo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],i={};return t.forEach(a=>{ec(e,a.queryKey)&&Object.assign(i,a.defaultOptions)}),i}setMutationDefaults(e,t){this.#a.set(jo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],i={};return t.forEach(a=>{ec(e,a.mutationKey)&&Object.assign(i,a.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Jv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const cO=v.createContext(!1),_L=()=>v.useContext(cO);cO.Provider;function UL(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const HL=v.createContext(UL()),FL=()=>v.useContext(HL),BL=(e,t,i)=>{const a=i?.state.status==="error"&&typeof e.throwOnError=="function"?eb(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||a)&&(t.isReset()||(e.retryOnMount=!1))},VL=e=>{v.useEffect(()=>{e.clearReset()},[e])},KL=({result:e,errorResetBoundary:t,throwOnError:i,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||eb(i,[e.error,a])),qL=e=>{if(e.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>i(a(...o)):i(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},YL=(e,t)=>e?.suspense&&t.isPending,GL=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function $L(e,t,i){const a=_L(),o=FL(),c=mi(i),u=c.defaultQueryOptions(e),d=c.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=a?"isRestoring":f?"optimistic":void 0,qL(u),BL(u,o,d),VL(o);const[g]=v.useState(()=>new t(c,u)),y=g.getOptimisticResult(u),h=!a&&f;if(v.useSyncExternalStore(v.useCallback(x=>{const S=h?g.subscribe(Jn.batchCalls(x)):Hr;return g.updateResult(),S},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),v.useEffect(()=>{g.setOptions(u)},[u,g]),YL(u,y))throw GL(u,g,o);if(KL({result:y,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw y.error;return u.notifyOnChangeProps?y:g.trackResult(y)}function Lo(e,t){return $L(e,DL,t)}function uO(e,t){const i=mi(t);return XL({filters:{...e,status:"pending"}},i).length}function QL(){let e;return(t,i)=>{let a=[],o;return()=>{const c=t.findAll(i.filters),u=c.flatMap(d=>[d,d.state]);return(!o||u.length!==a.length||u.some((d,f)=>!Object.is(d,a[f])))&&(a=u,o=Wv(e,c.map(d=>i.select?i.select(d):d.state)),e=o),o}}}function XL(e={},t){const i=mi(t).getMutationCache(),[a]=v.useState(()=>QL()),o=a(i,e);return v.useSyncExternalStore(v.useCallback(c=>i.subscribe(Jn.batchCalls(c)),[i]),o,o)}function wr(e,t){const i=mi(t),[a]=v.useState(()=>new LL(i,e));v.useEffect(()=>{a.setOptions(e)},[a,e]);const o=v.useSyncExternalStore(v.useCallback(u=>a.subscribe(Jn.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=v.useCallback((...u)=>{a.mutate(u[0],u[1]).catch(Hr)},[a]);if(o.error&&eb(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}var dO=e=>{throw TypeError(e)},fO=(e,t,i)=>t.has(e)||dO("Cannot "+i),Ai=(e,t,i)=>(fO(e,t,"read from private field"),i?i.call(e):t.get(e)),vu=(e,t,i)=>t.has(e)?dO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),da=(e,t,i,a)=>(fO(e,t,"write to private field"),t.set(e,i),i),Hp=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Fp=/^[\\/]{2}/;function hO(e,t){return t+e.replace(/\\/g,"/")}var aw="popstate";function sw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ZL(e={}){function t(o,c){let{pathname:u="/",search:d="",hash:f=""}=Wi(o.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),Lu("",{pathname:u,search:d,hash:f},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function i(o,c){let u=o.document.querySelector("base"),d="";if(u&&u.getAttribute("href")){let f=o.location.href,g=f.indexOf("#");d=g===-1?f:f.slice(0,g)}return d+"#"+(typeof c=="string"?c:Fr(c))}function a(o,c){Hn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(c)})`)}return JL(t,i,a,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function WL(){return Math.random().toString(36).substring(2,10)}function ow(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Lu(e,t,i=null,a,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wi(t):t,state:i,key:t&&t.key||a||WL(),mask:o}}function Fr({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Wi(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function JL(e,t,i,a={}){let{window:o=document.defaultView,v5Compat:c=!1}=a,u=o.history,d="POP",f=null,g=y();g==null&&(g=0,u.replaceState({...u.state,idx:g},""));function y(){return(u.state||{idx:null}).idx}function h(){d="POP";let w=y(),R=w==null?null:w-g;g=w,f&&f({action:d,location:C.location,delta:R})}function x(w,R){d="PUSH";let O=sw(w)?w:Lu(C.location,w,R);i&&i(O,w),g=y()+1;let A=ow(O,g),k=C.createHref(O.mask||O);try{u.pushState(A,"",k)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(k)}c&&f&&f({action:d,location:C.location,delta:1})}function S(w,R){d="REPLACE";let O=sw(w)?w:Lu(C.location,w,R);i&&i(O,w),g=y();let A=ow(O,g),k=C.createHref(O.mask||O);u.replaceState(A,"",k),c&&f&&f({action:d,location:C.location,delta:0})}function E(w){return pO(o,w)}let C={get action(){return d},get location(){return e(o,u)},listen(w){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(aw,h),f=w,()=>{o.removeEventListener(aw,h),f=null}},createHref(w){return t(o,w)},createURL:E,encodeLocation(w){let R=E(w);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:x,replace:S,go(w){return u.go(w)}};return C}function pO(e,t,i=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),_t(a,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Fr(t);return o=o.replace(/ $/,"%20"),!i&&Fp.test(o)&&(o=a+o),new URL(o,a)}var bu,lw=class{constructor(e){if(vu(this,bu,new Map),e)for(let[t,i]of e)this.set(t,i)}get(e){if(Ai(this,bu).has(e))return Ai(this,bu).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ai(this,bu).set(e,t)}};bu=new WeakMap;var e5=new Set(["lazy","caseSensitive","path","id","index","children"]);function t5(e){return e5.has(e)}var n5=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function r5(e){return n5.has(e)}function i5(e){return e.index===!0}function zu(e,t,i=[],a={},o=!1){return e.map((c,u)=>{let d=[...i,String(u)],f=typeof c.id=="string"?c.id:d.join("-");if(_t(c.index!==!0||!c.children,"Cannot specify children on an index route"),_t(o||!a[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),i5(c)){let g={...c,id:f};return a[f]=cw(g,t(g)),g}else{let g={...c,id:f,children:void 0};return a[f]=cw(g,t(g)),c.children&&(g.children=zu(c.children,t,d,a,o)),g}})}function cw(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function gO(e,t,i="/"){return Ki(e,t,i,!1)}function Ki(e,t,i,a,o){let c=typeof t=="string"?Wi(t):t,u=Jr(c.pathname||"/",i);if(u==null)return null;let d=o??bh(e),f=null,g=SO(u);for(let y=0;f==null&&y<d.length;++y)f=p5(d[y],g,a);return f}function mO(e,t){let{route:i,pathname:a,params:o}=e;return{id:i.id,pathname:a,params:o,data:t[i.id],loaderData:t[i.id],handle:i.handle}}function bh(e){let t=yO(e);return a5(t),t}function yO(e,t=[],i=[],a="",o=!1){let c=(u,d,f=o,g)=>{let y={relativePath:g===void 0?u.path||"":g,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&f)return;_t(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let h=Di([a,y.relativePath]),x=i.concat(y);u.children&&u.children.length>0&&(_t(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),yO(u.children,t,x,h,f)),!(u.path==null&&!u.index)&&t.push({path:h,score:f5(h,u.index),routesMeta:x.map((S,E)=>{let[C,w]=xO(S.relativePath,S.caseSensitive,E===x.length-1);return{...S,matcher:C,compiledParams:w}})})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))c(u,d);else for(let f of vO(u.path))c(u,d,!0,f)}),t}function vO(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,o=i.endsWith("?"),c=i.replace(/\?$/,"");if(a.length===0)return o?[c,""]:[c];let u=vO(a.join("/")),d=[];return d.push(...u.map(f=>f===""?c:[c,f].join("/"))),o&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function a5(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:h5(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var s5=/^:[\w-]+$/,o5=3,l5=2,c5=1,u5=10,d5=-2,uw=e=>e==="*";function f5(e,t){let i=e.split("/"),a=i.length;return i.some(uw)&&(a+=d5),t&&(a+=l5),i.filter(o=>!uw(o)).reduce((o,c)=>o+(s5.test(c)?o5:c===""?c5:u5),a)}function h5(e,t){return e.length===t.length&&e.slice(0,-1).every((a,o)=>a===t[o])?e[e.length-1]-t[t.length-1]:0}function p5(e,t,i=!1){let{routesMeta:a}=e,o={},c="/",u=[];for(let d=0;d<a.length;++d){let f=a[d],g=d===a.length-1,y=c==="/"?t:t.slice(c.length)||"/",h={path:f.relativePath,caseSensitive:f.caseSensitive,end:g},x=f.matcher&&f.compiledParams?bO(h,y,f.matcher,f.compiledParams):_u(h,y),S=f.route;if(!x&&g&&i&&!a[a.length-1].route.index&&(x=_u({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},y)),!x)return null;Object.assign(o,x.params),u.push({params:o,pathname:Di([c,x.pathname]),pathnameBase:y5(Di([c,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(c=Di([c,x.pathnameBase]))}return u}function _u(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=xO(e.path,e.caseSensitive,e.end);return bO(e,t,i,a)}function bO(e,t,i,a){let o=t.match(i);if(!o)return null;let c=o[0],u=tc(c,1),d=o.slice(1);return{params:a.reduce((g,{paramName:y,isOptional:h},x)=>{if(y==="*"){let E=d[x]||"";u=tc(c.slice(0,c.length-E.length),1)}const S=d[x];return h&&!S?g[y]=void 0:g[y]=(S||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:u,pattern:e}}function xO(e,t=!1,i=!0){Hn(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 a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f,g,y)=>{if(a.push({paramName:d,isOptional:f!=null}),f){let h=y.charAt(g+u.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),a]}function SO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hn(!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 Jr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}function g5({basename:e,pathname:t}){return t==="/"?e:Di([e,t])}var ib=e=>Hp.test(e);function m5(e,t="/"){let{pathname:i,search:a="",hash:o=""}=typeof e=="string"?Wi(e):e,c;return i?(i=ab(i),i.startsWith("/")||i.startsWith("\\")?c=dw(i.substring(1),"/"):c=dw(i,t)):c=t,{pathname:c,search:v5(a),hash:b5(o)}}function dw(e,t){let i=tc(t).split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function ny(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function EO(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Bp(e){let t=EO(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function id(e,t,i,a=!1){let o;typeof e=="string"?o=Wi(e):(o={...e},_t(!o.pathname||!o.pathname.includes("?"),ny("?","pathname","search",o)),_t(!o.pathname||!o.pathname.includes("#"),ny("#","pathname","hash",o)),_t(!o.search||!o.search.includes("#"),ny("#","search","hash",o)));let c=e===""||o.pathname==="",u=c?"/":o.pathname,d;if(u==null)d=i;else{let h=t.length-1;if(!a&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),h-=1;o.pathname=x.join("/")}d=h>=0?t[h]:"/"}let f=m5(o,d),g=u&&u!=="/"&&u.endsWith("/"),y=(c||u===".")&&i.endsWith("/");return!f.pathname.endsWith("/")&&(g||y)&&(f.pathname+="/"),f}var ab=e=>e.replace(/[\\/]{2,}/g,"/"),Di=e=>ab(e.join("/"));function tc(e,t=0){let i=e.length;for(;i>t&&e.charCodeAt(i-1)===47;)i--;return i===e.length?e:e.slice(0,i)}var y5=e=>tc(e).replace(/^\/*/,"/"),v5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,b5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,x5=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ad=class{constructor(e,t,i,a=!1){this.status=e,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Uu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function sd(e){let t=e.map(i=>i.route.path).filter(Boolean);return Di(t)||"/"}var wO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function RO(e,t){let i=e;if(typeof i!="string"||!Hp.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,o=!1;if(wO)try{let c=new URL(window.location.href),u=Fp.test(i)?new URL(hO(i,c.protocol)):new URL(i),d=Jr(u.pathname,t);u.origin===c.origin&&d!=null?i=d+u.search+u.hash:o=!0}catch{Hn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:i}}var Is=Symbol("Uninstrumented");function S5(e,t){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(c){let u=Object.keys(i);for(let d of u)c[d]&&i[d].push(c[d])}}));let a={};if(typeof t.lazy=="function"&&i.lazy.length>0){let o=Ll(i.lazy,t.lazy,()=>{});o&&(a.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(c=>{let u=o[c],d=i[`lazy.${c}`];if(typeof u=="function"&&d.length>0){let f=Ll(d,u,()=>{});f&&(a.lazy=Object.assign(a.lazy||{},{[c]:f}))}})}return["loader","action"].forEach(o=>{let c=t[o];if(typeof c=="function"&&i[o].length>0){let u=c[Is]??c,d=Ll(i[o],u,(...f)=>fw(f[0]));d&&(o==="loader"&&u.hydrate===!0&&(d.hydrate=!0),d[Is]=u,a[o]=d)}}),t.middleware&&t.middleware.length>0&&i.middleware.length>0&&(a.middleware=t.middleware.map(o=>{let c=o[Is]??o,u=Ll(i.middleware,c,(...d)=>fw(d[0]));return u?(u[Is]=c,u):o})),a}function E5(e,t){let i={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(o){let c=Object.keys(o);for(let u of c)o[u]&&i[u].push(o[u])}})),i.navigate.length>0){let a=e.navigate[Is]??e.navigate,o=Ll(i.navigate,a,(...c)=>{let[u,d]=c;return{to:typeof u=="number"||typeof u=="string"?u:u?Fr(u):".",...hw(e,d??{})}});o&&(o[Is]=a,e.navigate=o)}if(i.fetch.length>0){let a=e.fetch[Is]??e.fetch,o=Ll(i.fetch,a,(...c)=>{let[u,,d,f]=c;return{href:d??".",fetcherKey:u,...hw(e,f??{})}});o&&(o[Is]=a,e.fetch=o)}return e}function Ll(e,t,i){return e.length===0?null:async(...a)=>{let o=await CO(e,i(...a),()=>t(...a),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function CO(e,t,i,a){let o=e[a],c;if(o){let u,d=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=CO(e,t,i,a-1),c=await u,_t(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await o(d,t)}catch(f){console.error("An instrumentation function threw an error:",f)}u||await d(),await u}else try{c={type:"success",value:await i()}}catch(u){c={type:"error",value:u}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function fw(e){let{request:t,context:i,params:a,pattern:o}=e;return{request:w5(t),params:{...a},pattern:o,context:R5(i)}}function hw(e,t){return{currentUrl:Fr(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function w5(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function R5(e){if(T5(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var C5=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function T5(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===C5}var pw=new URL("http://localhost");function sb(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),pw)}catch{return pw}}function ry(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function O5(e,t){if(e.startsWith("//"))return!0;let i=t.protocol.toLowerCase();return e.toLowerCase().startsWith(i)?t.host===""||e.slice(i.length).startsWith("//"):!1}function Kl(e,t,i,a){let o=null;try{o=e==null?null:new URL(e,i)}catch{}let c=new URL(t,i),u=o!=null&&!ry(o,i),d=!ry(c,i);if(a==="reject"){if(u||d)throw new Error("External navigation is not allowed")}else if(d&&(o==null||!O5(e,o)||!ry(o,c)))throw new Error("External navigation is not allowed")}var TO=["POST","PUT","PATCH","DELETE"],A5=new Set(TO),k5=["GET",...TO],M5=new Set(k5),OO=new Set([301,302,303,307,308]),N5=new Set([307,308]),iy={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},D5={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},j5=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),AO="remix-router-transitions",kO=Symbol("ResetLoaderData"),Ro,Dl,ks,jl,I5=class{constructor(e){vu(this,Ro),vu(this,Dl),vu(this,ks),vu(this,jl),da(this,Ro,e),da(this,Dl,bh(e))}get stableRoutes(){return Ai(this,Ro)}get activeRoutes(){return Ai(this,ks)??Ai(this,Ro)}get branches(){return Ai(this,jl)??Ai(this,Dl)}get hasHMRRoutes(){return Ai(this,ks)!=null}setRoutes(e){da(this,Ro,e),da(this,Dl,bh(e))}setHmrRoutes(e){da(this,ks,e),da(this,jl,bh(e))}commitHmrRoutes(){Ai(this,ks)&&(da(this,Ro,Ai(this,ks)),da(this,Dl,Ai(this,jl)),da(this,ks,void 0),da(this,jl,void 0))}};Ro=new WeakMap;Dl=new WeakMap;ks=new WeakMap;jl=new WeakMap;function P5(e){const t=e.window?e.window:typeof window<"u"?window:void 0,i=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";_t(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],o=e.mapRouteProperties||j5,c=o;if(e.instrumentations){let F=e.instrumentations;c=W=>({...o(W),...S5(F.map(ne=>ne.route).filter(Boolean),W)})}let u={},d=new I5(zu(e.routes,c,void 0,u)),f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let g=e.dataStrategy||H5,y={...e.future},h=null,x=new Set,S=null,E=null,C=null,w=null,R=e.hydrationData!=null,O=Ki(d.activeRoutes,e.history.location,f,!1,d.branches),A=!1,k=null,N,j;if(O==null&&!e.patchRoutesOnNavigation){let F=ki(404,{pathname:e.history.location.pathname}),{matches:W,route:ne}=Wf(d.activeRoutes);N=!0,j=!N,O=W,k={[ne.id]:F}}else if(O&&!e.hydrationData&&Ie(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(F=>F.route.lazy))N=!1,j=!N;else if(!O.some(F=>ob(F.route)))N=!0,j=!N;else{let F=e.hydrationData?e.hydrationData.loaderData:null,W=e.hydrationData?e.hydrationData.errors:null,ne=O;if(W){let ye=O.findIndex(xe=>W[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}j=!1,N=!0,ne.forEach(ye=>{let xe=MO(ye.route,F,W);j=j||xe.renderFallback,N=N&&!xe.shouldLoad})}else{N=!1,j=!N,O=[];let F=Ie(null,d.activeRoutes,e.history.location.pathname);F.active&&F.matches&&(A=!0,O=F.matches)}let D,M={historyAction:e.history.action,location:e.history.location,matches:O,initialized:N,renderFallback:j,navigation:iy,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||k,fetchers:new Map,blockers:new Map},_="POP",L=null,q=!1,X,B=!1,H=new Map,U=null,z=!1,Q=!1,$=new Set,K=new Map,Y=0,ee=-1,G=new Map,oe=new Set,I=new Map,V=new Map,J=new Set,re=new Map,we,le=null;function me(){if(h=e.history.listen(({action:F,location:W,delta:ne})=>{if(we){we(),we=void 0;return}Hn(re.size===0||ne!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=bt({currentLocation:M.location,nextLocation:W,historyAction:F});if(ye&&ne!=null){let xe=new Promise(Ke=>{we=Ke});e.history.go(ne*-1),ht(ye,{state:"blocked",location:W,proceed(){ht(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),xe.then(()=>e.history.go(ne))},reset(){let Ke=new Map(M.blockers);Ke.set(ye,Nl),Te({blockers:Ke})}}),L?.resolve(),L=null;return}return Le(F,W)}),i){az(t,H);let F=()=>sz(t,H);t.addEventListener("pagehide",F),U=()=>t.removeEventListener("pagehide",F)}return M.initialized||Le("POP",M.location,{initialHydration:!0}),D}function ge(){h&&h(),U&&U(),x.clear(),X&&X.abort(),M.fetchers.forEach((F,W)=>Mt(M.fetchers,W)),M.blockers.forEach((F,W)=>Xt(W))}function ue(F){if(x.add(F),S){let{newErrors:W}=S;S=null,F(M,{deletedFetchers:[],newErrors:W,viewTransitionOpts:void 0,flushSync:!1})}return()=>x.delete(F)}function Te(F,W={}){F.matches&&(F.matches=F.matches.map(xe=>{let Ke=u[xe.route.id],Ve=xe.route;return Ve.element!==Ke.element||Ve.errorElement!==Ke.errorElement||Ve.hydrateFallbackElement!==Ke.hydrateFallbackElement?{...xe,route:Ke}:xe})),M={...M,...F};let ne=[],ye=[];M.fetchers.forEach((xe,Ke)=>{xe.state==="idle"&&(J.has(Ke)?ne.push(Ke):ye.push(Ke))}),J.forEach(xe=>{!M.fetchers.has(xe)&&!K.has(xe)&&ne.push(xe)}),x.size===0&&(S={newErrors:F.errors??null}),[...x].forEach(xe=>xe(M,{deletedFetchers:ne,newErrors:F.errors??null,viewTransitionOpts:W.viewTransitionOpts,flushSync:W.flushSync===!0})),ne.forEach(xe=>Mt(M.fetchers,xe)),ye.forEach(xe=>M.fetchers.delete(xe))}function ve(F,W,{flushSync:ne}={}){let ye=M.actionData!=null&&M.navigation.formMethod!=null&&Or(M.navigation.formMethod)&&M.navigation.state==="loading"&&F.state?._isRedirect!==!0,xe;W.actionData?Object.keys(W.actionData).length>0?xe=W.actionData:xe=null:ye?xe=M.actionData:xe=null;let Ke=W.loaderData?Rw(M.loaderData,W.loaderData,W.matches||[],W.errors):M.loaderData,Ve=M.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((tt,Et)=>Ve.set(Et,Nl)));let Xe=z?!1:at(F,W.matches||M.matches),Qe=q===!0||M.navigation.formMethod!=null&&Or(M.navigation.formMethod)&&F.state?._isRedirect!==!0;d.commitHmrRoutes(),z||_==="POP"||(_==="PUSH"?e.history.push(F,F.state):_==="REPLACE"&&e.history.replace(F,F.state));let ot;if(_==="POP"&&!z&&F!==M.location){let tt=H.get(M.location.pathname);tt&&tt.has(F.pathname)?ot={currentLocation:M.location,nextLocation:F}:H.has(F.pathname)&&(ot={currentLocation:F,nextLocation:M.location})}else if(B){let tt=H.get(M.location.pathname);tt?tt.add(F.pathname):(tt=new Set([F.pathname]),H.set(M.location.pathname,tt)),ot={currentLocation:M.location,nextLocation:F}}Te({...W,actionData:xe,loaderData:Ke,historyAction:_,location:F,initialized:!0,renderFallback:!1,navigation:iy,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:Qe,blockers:Ve},{viewTransitionOpts:ot,flushSync:ne===!0}),_="POP",q=!1,B=!1,z=!1,Q=!1,L?.resolve(),L=null,le?.resolve(),le=null}async function Pe(F,W){if(L?.resolve(),L=null,typeof F=="number"){L||(L=Aw());let Ft=L.promise;return e.history.go(F),Ft}let ne=Uy(M.location,M.matches,f,F,W?.fromRouteId,W?.relative),{path:ye,submission:xe,error:Ke}=gw(!1,ne,W),Ve;if(W?.mask){let Ft=typeof W.mask=="string"?Wi(W.mask):{...M.location.mask,...W.mask};if(Ve={pathname:Ft.pathname??"",search:Ft.search??"",hash:Ft.hash??""},Fp.test(Ve.pathname))throw new Error("External navigation is not allowed");Ve.pathname.startsWith("\\")&&(Ve.pathname=Ve.pathname.replace(/^\\+/,"/")),Kl(typeof W.mask=="string"?W.mask:Fr(W.mask),Fr(Ve),e.history.createURL("/"),"reject")}let Xe=M.location,Qe=Lu(Xe,ye,W&&W.state,void 0,Ve);Qe={...Qe,...e.history.encodeLocation(Qe)},Kl(F==null?e.history.createHref(M.location):typeof F=="string"?F:Fr(F),e.history.createHref(Qe.mask||Qe),e.history.createURL("/"),"reject");let ot=W&&W.replace!=null?W.replace:void 0,tt="PUSH";ot===!0?tt="REPLACE":ot===!1||xe!=null&&Or(xe.formMethod)&&xe.formAction===M.location.pathname+M.location.search&&(tt="REPLACE");let Et=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,ft=(W&&W.flushSync)===!0,Kt=bt({currentLocation:Xe,nextLocation:Qe,historyAction:tt});if(Kt){ht(Kt,{state:"blocked",location:Qe,proceed(){ht(Kt,{state:"proceeding",proceed:void 0,reset:void 0,location:Qe}),Pe(F,W)},reset(){let Ft=new Map(M.blockers);Ft.set(Kt,Nl),Te({blockers:Ft})}});return}await Le(tt,Qe,{submission:xe,pendingError:Ke,preventScrollReset:Et,replace:W&&W.replace,enableViewTransition:W&&W.viewTransition,flushSync:ft,callSiteDefaultShouldRevalidate:W&&W.defaultShouldRevalidate})}function Ae(){le||(le=Aw()),Me(),Te({revalidation:"loading"});let F=le.promise;return M.navigation.state==="submitting"?F:M.navigation.state==="idle"?(Le(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),F):(Le(_||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:B===!0}),F)}async function Le(F,W,ne){X&&X.abort(),X=null,_=F,z=(ne&&ne.startUninterruptedRevalidation)===!0,je(M.location,M.matches),q=(ne&&ne.preventScrollReset)===!0,B=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&M.matches&&M.matches.length>0&&!A?M.matches:Ki(ye,W,f,!1,d.branches),Ke=(ne&&ne.flushSync)===!0;if(xe&&M.initialized&&!Q&&Q5(M.location,W)&&!(ne&&ne.submission&&Or(ne.submission.formMethod))){ve(W,{matches:xe},{flushSync:Ke});return}let Ve=Ie(xe,ye,W.pathname);if(Ve.active&&Ve.matches&&(xe=Ve.matches),!xe){let{error:qt,notFoundMatches:Bt,route:Cn}=mt(W.pathname);ve(W,{matches:Bt,loaderData:{},errors:{[Cn.id]:qt}},{flushSync:Ke});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:F}:void 0;X=new AbortController;let Qe=Il(e.history,W,X.signal,ne&&ne.submission),ot=e.getContext?await e.getContext():new lw,tt;if(ne&&ne.pendingError)tt=[Ds(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Or(ne.submission.formMethod)){let qt=await Be(Qe,W,ne.submission,xe,F,ot,Ve.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:Ke});if(qt.shortCircuited)return;if(qt.pendingActionResult){let[Bt,Cn]=qt.pendingActionResult;if(hi(Cn)&&Uu(Cn.error)&&Cn.error.status===404){X=null,ve(W,{matches:qt.matches,loaderData:{},errors:{[Bt]:Cn.error}});return}}xe=qt.matches||xe,tt=qt.pendingActionResult,Xe=ay(W,xe,F,ne.submission),Ke=!1,Ve.active=!1,Qe=Il(e.history,Qe.url,Qe.signal)}let{shortCircuited:Et,matches:ft,loaderData:Kt,errors:Ft,workingFetchers:An}=await Oe(Qe,W,xe,F,ot,Ve.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,Ke,tt,ne&&ne.callSiteDefaultShouldRevalidate);Et||(X=null,ve(W,{matches:ft||xe,...Cw(tt),loaderData:Kt,errors:Ft,...An?{fetchers:An}:{}}))}async function Be(F,W,ne,ye,xe,Ke,Ve,Xe,Qe={}){Me();let ot=rz(W,ye,xe,ne);if(Te({navigation:ot},{flushSync:Qe.flushSync===!0}),Ve){let ft=await ze(ye,W.pathname,F.signal);if(ft.type==="aborted")return{shortCircuited:!0};if(ft.type==="error"){if(ft.partialMatches.length===0){let{matches:Ft,route:An}=Wf(d.activeRoutes);return{matches:Ft,pendingActionResult:[An.id,{type:"error",error:ft.error}]}}let Kt=Ds(ft.partialMatches).route.id;return{matches:ft.partialMatches,pendingActionResult:[Kt,{type:"error",error:ft.error}]}}else if(ft.matches)ye=ft.matches;else{let{notFoundMatches:Kt,error:Ft,route:An}=mt(W.pathname);return{matches:Kt,pendingActionResult:[An.id,{type:"error",error:Ft}]}}}let tt,Et=xh(ye,W);if(!Et.route.action&&!Et.route.lazy)tt={type:"error",error:ki(405,{method:F.method,pathname:W.pathname,routeId:Et.route.id})};else{let ft=ql(c,u,F,W,ye,Et,Xe?[]:a,Ke),Kt=await Ee(F,W,ft,Ke,null);if(tt=Kt[Et.route.id],!tt){for(let Ft of ye)if(Kt[Ft.route.id]){tt=Kt[Ft.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(Oo(tt)){let ft;return Qe&&Qe.replace!=null?ft=Qe.replace:ft=Sw(tt.response.headers.get("Location"),new URL(F.url),f,e.history)===M.location.pathname+M.location.search,await de(F,tt,!0,{submission:ne,replace:ft}),{shortCircuited:!0}}if(hi(tt)){let ft=Ds(ye,Et.route.id);return(Qe&&Qe.replace)!==!0&&(_="PUSH"),{matches:ye,pendingActionResult:[ft.route.id,tt,Et.route.id]}}return{matches:ye,pendingActionResult:[Et.route.id,tt]}}async function Oe(F,W,ne,ye,xe,Ke,Ve,Xe,Qe,ot,tt,Et,ft,Kt){let Ft=Ve||ay(W,ne,ye,Xe),An=Xe||Qe||Ow(Ft),qt=!z&&!tt;if(Ke){if(qt){let qn=Ue(ft);Te({navigation:Ft,...qn!==void 0?{actionData:qn}:{}},{flushSync:Et})}let zt=await ze(ne,W.pathname,F.signal);if(zt.type==="aborted")return{shortCircuited:!0};if(zt.type==="error"){if(zt.partialMatches.length===0){let{matches:Fn,route:hr}=Wf(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[hr.id]:zt.error}}}let qn=Ds(zt.partialMatches).route.id;return{matches:zt.partialMatches,loaderData:{},errors:{[qn]:zt.error}}}else if(zt.matches)ne=zt.matches;else{let{error:qn,notFoundMatches:Fn,route:hr}=mt(W.pathname);return{matches:Fn,loaderData:{},errors:{[hr.id]:qn}}}}let Bt=d.activeRoutes,{dsMatches:Cn,revalidatingFetchers:Tn}=mw(F,xe,c,u,e.history,M,ne,An,W,tt?[]:a,tt===!0,Q,$,J,I,oe,Bt,f,e.patchRoutesOnNavigation!=null,d.branches,ft,Kt);if(ee=++Y,!e.dataStrategy&&!Cn.some(zt=>zt.shouldLoad)&&!Cn.some(zt=>zt.route.middleware&&zt.route.middleware.length>0)&&Tn.length===0){let zt=new Map(M.fetchers),qn=tn(zt);return ve(W,{matches:ne,loaderData:{},errors:ft&&hi(ft[1])?{[ft[0]]:ft[1].error}:null,...Cw(ft),...qn?{fetchers:zt}:{}},{flushSync:Et}),{shortCircuited:!0}}if(qt){let zt={};if(!Ke){zt.navigation=Ft;let qn=Ue(ft);qn!==void 0&&(zt.actionData=qn)}Tn.length>0&&(zt.fetchers=be(Tn)),Te(zt,{flushSync:Et})}Tn.forEach(zt=>{en(zt.key),zt.controller&&K.set(zt.key,zt.controller)});let ei=()=>Tn.forEach(zt=>en(zt.key));X&&X.signal.addEventListener("abort",ei);let{loaderResults:dn,fetcherResults:fn}=await Ge(Cn,Tn,F,W,xe);if(F.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ei),Tn.forEach(zt=>K.delete(zt.key));let kn=Jf(dn);if(kn)return await de(F,kn.result,!0,{replace:ot}),{shortCircuited:!0};if(kn=Jf(fn),kn)return oe.add(kn.key),await de(F,kn.result,!0,{replace:ot}),{shortCircuited:!0};let jn=new Map(M.fetchers),{loaderData:wa,errors:Dr}=ww(M,ne,dn,ft,Tn,fn,jn);tt&&M.errors&&(Dr={...M.errors,...Dr});let zi=tn(jn),ti=Je(ee,jn),vi=zi||ti||Tn.length>0;return{matches:ne,loaderData:wa,errors:Dr,...vi?{workingFetchers:jn}:{}}}function Ue(F){if(F&&!hi(F[1]))return{[F[0]]:F[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function be(F){let W=new Map(M.fetchers);return F.forEach(ne=>{let ye=W.get(ne.key),xe=hu(void 0,ye?ye.data:void 0);W.set(ne.key,xe)}),W}async function He(F,W,ne,ye){en(F);let xe=(ye&&ye.flushSync)===!0,Ke=d.activeRoutes,Ve=Uy(M.location,M.matches,f,ne,W,ye?.relative),Xe=Ki(Ke,Ve,f,!1,d.branches),Qe=Ie(Xe,Ke,Ve);if(Qe.active&&Qe.matches&&(Xe=Qe.matches),!Xe){vt(F,W,ki(404,{pathname:Ve}),{flushSync:xe});return}let{path:ot,submission:tt,error:Et}=gw(!0,Ve,ye);if(Et){vt(F,W,Et,{flushSync:xe});return}let ft=e.getContext?await e.getContext():new lw,Kt=(ye&&ye.preventScrollReset)===!0;if(tt&&Or(tt.formMethod)){await Ze(F,W,ot,Xe,ft,Qe.active,xe,Kt,tt,ye&&ye.defaultShouldRevalidate);return}I.set(F,{routeId:W,path:ot}),await st(F,W,ot,Xe,ft,Qe.active,xe,Kt,tt)}async function Ze(F,W,ne,ye,xe,Ke,Ve,Xe,Qe,ot){Me(),I.delete(F);let tt=M.fetchers.get(F);De(F,iz(Qe,tt),{flushSync:Ve});let Et=new AbortController,ft=Il(e.history,ne,Et.signal,Qe);if(Ke){let Se=await ze(ye,new URL(ft.url).pathname,ft.signal,F);if(Se.type==="aborted")return;if(Se.type==="error"){vt(F,W,Se.error,{flushSync:Ve});return}else if(Se.matches)ye=Se.matches;else{vt(F,W,ki(404,{pathname:ne}),{flushSync:Ve});return}}let Kt=xh(ye,ne);if(!Kt.route.action&&!Kt.route.lazy){let Se=ki(405,{method:Qe.formMethod,pathname:ne,routeId:W});vt(F,W,Se,{flushSync:Ve});return}K.set(F,Et);let Ft=Y,An=ql(c,u,ft,ne,ye,Kt,a,xe),qt=await Ee(ft,ne,An,xe,F),Bt=qt[Kt.route.id];if(!Bt){for(let Se of An)if(qt[Se.route.id]){Bt=qt[Se.route.id];break}}if(ft.signal.aborted){K.get(F)===Et&&K.delete(F);return}if(J.has(F)){if(Oo(Bt)||hi(Bt)){De(F,fa(void 0));return}}else{if(Oo(Bt))if(K.delete(F),ee>Ft){De(F,fa(void 0));return}else return oe.add(F),De(F,hu(Qe)),de(ft,Bt,!1,{fetcherSubmission:Qe,preventScrollReset:Xe});if(hi(Bt)){vt(F,W,Bt.error);return}}let Cn=M.navigation.location||M.location,Tn=Il(e.history,Cn,Et.signal),ei=d.activeRoutes,dn=M.navigation.state!=="idle"?Ki(ei,M.navigation.location,f,!1,d.branches):M.matches;_t(dn,"Didn't find any matches after fetcher action");let fn=++Y;G.set(F,fn);let{dsMatches:kn,revalidatingFetchers:jn}=mw(Tn,xe,c,u,e.history,M,dn,Qe,Cn,a,!1,Q,$,J,I,oe,ei,f,e.patchRoutesOnNavigation!=null,d.branches,[Kt.route.id,Bt],ot),wa=hu(Qe,Bt.data),Dr=new Map(M.fetchers);Dr.set(F,wa),jn.filter(Se=>Se.key!==F).forEach(Se=>{let nt=Se.key,Ot=Dr.get(nt),wt=hu(void 0,Ot?Ot.data:void 0);Dr.set(nt,wt),en(nt),Se.controller&&K.set(nt,Se.controller)}),Te({fetchers:Dr});let zi=()=>jn.forEach(Se=>en(Se.key));Et.signal.addEventListener("abort",zi);let{loaderResults:ti,fetcherResults:vi}=await Ge(kn,jn,Tn,Cn,xe);if(Et.signal.aborted)return;Et.signal.removeEventListener("abort",zi),G.delete(F),K.delete(F),jn.forEach(Se=>K.delete(Se.key));let zt=M.fetchers.has(F),qn=Se=>{if(!zt)return Se;let nt=new Map(Se.fetchers);return nt.set(F,fa(Bt.data)),{...Se,fetchers:nt}},Fn=Jf(ti);if(Fn)return M=qn(M),de(Tn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=Jf(vi),Fn)return oe.add(Fn.key),M=qn(M),de(Tn,Fn.result,!1,{preventScrollReset:Xe});let hr=new Map(M.fetchers);zt&&hr.set(F,fa(Bt.data));let{loaderData:he,errors:ke}=ww(M,dn,ti,void 0,jn,vi,hr);Je(fn,hr),M.navigation.state==="loading"&&fn>ee?(_t(_,"Expected pending action"),X&&X.abort(),ve(M.navigation.location,{matches:dn,loaderData:he,errors:ke,fetchers:hr})):(Te({errors:ke,loaderData:Rw(M.loaderData,he,dn,ke),fetchers:hr}),Q=!1)}async function st(F,W,ne,ye,xe,Ke,Ve,Xe,Qe){let ot=M.fetchers.get(F);De(F,hu(Qe,ot?ot.data:void 0),{flushSync:Ve});let tt=new AbortController,Et=Il(e.history,ne,tt.signal);if(Ke){let Bt=await ze(ye,new URL(Et.url).pathname,Et.signal,F);if(Bt.type==="aborted")return;if(Bt.type==="error"){vt(F,W,Bt.error,{flushSync:Ve});return}else if(Bt.matches)ye=Bt.matches;else{vt(F,W,ki(404,{pathname:ne}),{flushSync:Ve});return}}let ft=xh(ye,ne);K.set(F,tt);let Kt=Y,Ft=ql(c,u,Et,ne,ye,ft,a,xe),An=await Ee(Et,ne,Ft,xe,F),qt=An[ft.route.id];if(!qt){for(let Bt of ye)if(An[Bt.route.id]){qt=An[Bt.route.id];break}}if(K.get(F)===tt&&K.delete(F),!Et.signal.aborted){if(J.has(F)){De(F,fa(void 0));return}if(Oo(qt))if(ee>Kt){De(F,fa(void 0));return}else{oe.add(F),await de(Et,qt,!1,{preventScrollReset:Xe});return}if(hi(qt)){vt(F,W,qt.error);return}De(F,fa(qt.data))}}async function de(F,W,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:Ke,replace:Ve}={}){ne||(L?.resolve(),L=null),W.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let Xe=W.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let Qe=Xe,ot=new URL(F.url);Xe=Sw(Xe,ot,f,e.history),Kl(Qe,Xe,ot,"allow-explicit");let tt=Lu(M.location,Xe,{_isRedirect:!0});if(i){let qt=!1;if(W.response.headers.has("X-Remix-Reload-Document"))qt=!0;else if(ib(Xe)){const Bt=pO(t,Xe,!0);qt=Bt.origin!==t.location.origin||Jr(Bt.pathname,f)==null}if(qt){Ve?t.location.replace(Xe):t.location.assign(Xe);return}}X=null;let Et=Ve===!0||W.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ft,formAction:Kt,formEncType:Ft}=M.navigation;!ye&&!xe&&ft&&Kt&&Ft&&(ye=Ow(M.navigation));let An=ye||xe;if(N5.has(W.response.status)&&An&&Or(An.formMethod))await Le(Et,tt,{submission:{...An,formAction:Xe},preventScrollReset:Ke||q,enableViewTransition:ne?B:void 0});else{let qt=ay(tt,[],Et,ye);await Le(Et,tt,{overrideNavigation:qt,fetcherSubmission:xe,preventScrollReset:Ke||q,enableViewTransition:ne?B:void 0})}}async function Ee(F,W,ne,ye,xe){let Ke,Ve={};try{Ke=await B5(g,F,W,ne,xe,ye,!1)}catch(Xe){return ne.filter(Qe=>Qe.shouldLoad).forEach(Qe=>{Ve[Qe.route.id]={type:"error",error:Xe}}),Ve}if(F.signal.aborted)return Ve;if(!Or(F.method))for(let Xe of ne){if(Ke[Xe.route.id]?.type==="error")break;!Ke.hasOwnProperty(Xe.route.id)&&!M.loaderData.hasOwnProperty(Xe.route.id)&&(!M.errors||!M.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(Ke[Xe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Xe.route.id}`)})}for(let[Xe,Qe]of Object.entries(Ke))if(J5(Qe)){let ot=Qe.result;Ve[Xe]={type:"redirect",response:Y5(ot,F,Xe,ne,f)}}else Ve[Xe]=await q5(Qe);return Ve}async function Ge(F,W,ne,ye,xe){let Ke=Ee(ne,ye,F,xe,null),Ve=Promise.all(W.map(async ot=>{if(ot.matches&&ot.match&&ot.request&&ot.controller){let Et=(await Ee(ot.request,ot.path,ot.matches,xe,ot.key))[ot.match.route.id];return{[ot.key]:Et}}else return Promise.resolve({[ot.key]:{type:"error",error:ki(404,{pathname:ot.path})}})})),Xe=await Ke,Qe=(await Ve).reduce((ot,tt)=>Object.assign(ot,tt),{});return{loaderResults:Xe,fetcherResults:Qe}}function Me(){Q=!0,I.forEach((F,W)=>{K.has(W)&&$.add(W),en(W)})}function De(F,W,ne={}){let ye=new Map(M.fetchers);ye.set(F,W),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function vt(F,W,ne,ye={}){let xe=Ds(M.matches,W),Ke=new Map(M.fetchers);Mt(Ke,F),Te({errors:{[xe.route.id]:ne},fetchers:Ke},{flushSync:(ye&&ye.flushSync)===!0})}function dt(F){return V.set(F,(V.get(F)||0)+1),J.has(F)&&J.delete(F),M.fetchers.get(F)||D5}function pt(F,W){en(F,W?.reason),De(F,fa(null))}function Mt(F,W){let ne=M.fetchers.get(W);K.has(W)&&!(ne&&ne.state==="loading"&&G.has(W))&&en(W),I.delete(W),G.delete(W),oe.delete(W),J.delete(W),$.delete(W),F.delete(W)}function jt(F){let W=(V.get(F)||0)-1;W<=0?(V.delete(F),J.add(F)):V.set(F,W),Te({fetchers:new Map(M.fetchers)})}function en(F,W){let ne=K.get(F);ne&&(ne.abort(W),K.delete(F))}function an(F,W){for(let ne of F){let ye=W.get(ne);_t(ye,`Expected fetcher: ${ne}`);let xe=fa(ye.data);W.set(ne,xe)}}function tn(F){let W=[],ne=!1;for(let ye of oe){let xe=F.get(ye);_t(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(oe.delete(ye),W.push(ye),ne=!0)}return an(W,F),ne}function Je(F,W){let ne=[];for(let[ye,xe]of G)if(xe<F){let Ke=W.get(ye);_t(Ke,`Expected fetcher: ${ye}`),Ke.state==="loading"&&(en(ye),G.delete(ye),ne.push(ye))}return an(ne,W),ne.length>0}function St(F,W){let ne=M.blockers.get(F)||Nl;return re.get(F)!==W&&re.set(F,W),ne}function Xt(F){M.blockers.delete(F),re.delete(F)}function ht(F,W){let ne=M.blockers.get(F)||Nl;_t(ne.state==="unblocked"&&W.state==="blocked"||ne.state==="blocked"&&W.state==="blocked"||ne.state==="blocked"&&W.state==="proceeding"||ne.state==="blocked"&&W.state==="unblocked"||ne.state==="proceeding"&&W.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${W.state}`);let ye=new Map(M.blockers);ye.set(F,W),Te({blockers:ye})}function bt({currentLocation:F,nextLocation:W,historyAction:ne}){if(re.size===0)return;re.size>1&&Hn(!1,"A router only supports one blocker at a time");let ye=Array.from(re.entries()),[xe,Ke]=ye[ye.length-1],Ve=M.blockers.get(xe);if(!(Ve&&Ve.state==="proceeding")&&Ke({currentLocation:F,nextLocation:W,historyAction:ne}))return xe}function mt(F){let W=ki(404,{pathname:F}),ne=d.activeRoutes,{matches:ye,route:xe}=Wf(ne);return{notFoundMatches:ye,route:xe,error:W}}function Ut(F,W,ne){if(E=F,w=W,C=ne||null,!R&&M.navigation===iy){R=!0;let ye=at(M.location,M.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{E=null,w=null,C=null}}function un(F,W){return C&&C(F,W.map(ye=>mO(ye,M.loaderData)))||F.key}function je(F,W){if(E&&w){let ne=un(F,W);E[ne]=w()}}function at(F,W){if(E){let ne=un(F,W),ye=E[ne];if(typeof ye=="number")return ye}return null}function Ie(F,W,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:Ki(W,ne,f,!0,ye)}}else return{active:!0,matches:Ki(W,ne,f,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(F,W,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let xe=F;for(;;){let Ke=u;try{await e.patchRoutesOnNavigation({signal:ne,path:W,matches:xe,fetcherKey:ye,patch:(ot,tt)=>{ne.aborted||yw(ot,tt,d,Ke,c,!1)}})}catch(ot){return{type:"error",error:ot,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ve=d.branches,Xe=Ki(d.activeRoutes,W,f,!1,Ve),Qe=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if(Qe=Ki(d.activeRoutes,W,f,!0,Ve),!(Qe&&xe.length<Qe.length&&$e(xe,Qe.slice(0,xe.length))))return{type:"success",matches:Xe}}if(Qe||(Qe=Ki(d.activeRoutes,W,f,!0,Ve)),!Qe||$e(xe,Qe))return{type:"success",matches:null};xe=Qe}}function $e(F,W){return F.length===W.length&&F.every((ne,ye)=>ne.route.id===W[ye].route.id)}function et(F){u={},d.setHmrRoutes(zu(F,c,void 0,u))}function Tt(F,W,ne=!1){yw(F,W,d,u,c,ne),d.hasHMRRoutes||Te({})}return D={get basename(){return f},get future(){return y},get state(){return M},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return u},get window(){return t},initialize:me,subscribe:ue,enableScrollRestoration:Ut,navigate:Pe,fetch:He,revalidate:Ae,createHref:F=>e.history.createHref(F),createURL:F=>e.history.createURL(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:dt,resetFetcher:pt,deleteFetcher:jt,dispose:ge,getBlocker:St,deleteBlocker:Xt,patchRoutes:Tt,_internalFetchControllers:K,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){Te(F)}},e.instrumentations&&(D=E5(D,e.instrumentations.map(F=>F.router).filter(Boolean))),D}function L5(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Uy(e,t,i,a,o,c){let u,d;if(o){u=[];for(let g of t)if(u.push(g),g.route.id===o){d=g;break}}else u=t,d=t[t.length-1];let f=id(a||".",Bp(u),Jr(e.pathname,i)||e.pathname,c==="path");if(a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&d){let g=cb(f.search);if(d.route.index&&!g)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let y=new URLSearchParams(f.search),h=y.getAll("index");y.delete("index"),h.filter(S=>S).forEach(S=>y.append("index",S));let x=y.toString();f.search=x?`?${x}`:""}}return i!=="/"&&(f.pathname=g5({basename:i,pathname:f.pathname})),Fr(f)}function gw(e,t,i){if(!i||!L5(i))return{path:t};if(i.formMethod&&!nz(i.formMethod))return{path:t,error:ki(405,{method:i.formMethod})};let a=()=>({path:t,error:ki(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),u=zO(t);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Or(c))return a();let h=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((x,[S,E])=>`${x}${S}=${E}
11
+ `,""):String(i.body);return{path:t,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:void 0,text:h}}}else if(i.formEncType==="application/json"){if(!Or(c))return a();try{let h=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:t,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:h,text:void 0}}}catch{return a()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,f;if(i.formData)d=By(i.formData),f=i.formData;else if(i.body instanceof FormData)d=By(i.body),f=i.body;else if(i.body instanceof URLSearchParams)d=i.body,f=Ew(d);else if(i.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(i.body),f=Ew(d)}catch{return a()}let g={formMethod:c,formAction:u,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Or(g.formMethod))return{path:t,submission:g};let y=Wi(t);return e&&y.search&&cb(y.search)&&d.append("index",""),y.search=`?${d}`,{path:Fr(y),submission:g}}function mw(e,t,i,a,o,c,u,d,f,g,y,h,x,S,E,C,w,R,O,A,k,N){let j=k?hi(k[1])?k[1].error:k[1].data:void 0,D=o.createURL(c.location),M=o.createURL(f),_;if(y&&c.errors){let z=Object.keys(c.errors)[0];_=u.findIndex(Q=>Q.route.id===z)}else if(k&&hi(k[1])){let z=k[0];_=u.findIndex(Q=>Q.route.id===z)-1}let L=k?k[1].statusCode:void 0,q=L&&L>=400,X={currentUrl:D,currentParams:c.matches[0]?.params||{},nextUrl:M,nextParams:u[0].params,...d,actionResult:j,actionStatus:L},B=sd(u),H=u.map((z,Q)=>{let{route:$}=z,K=null;if(_!=null&&Q>_)K=!1;else if($.lazy)K=!0;else if(!ob($))K=!1;else if(y){let{shouldLoad:oe}=MO($,c.loaderData,c.errors);K=oe}else z5(c.loaderData,c.matches[Q],z)&&(K=!0);if(K!==null)return Hy(i,a,e,f,B,z,g,t,K);let Y=!1;typeof N=="boolean"?Y=N:q?Y=!1:(h||D.pathname+D.search===M.pathname+M.search||D.search!==M.search||_5(c.matches[Q],z))&&(Y=!0);let ee={...X,defaultShouldRevalidate:Y},G=Cu(z,ee);return Hy(i,a,e,f,B,z,g,t,G,ee,N)}),U=[];return E.forEach((z,Q)=>{if(y||!u.some(V=>V.route.id===z.routeId)||S.has(Q))return;let $=c.fetchers.get(Q),K=$&&$.state!=="idle"&&$.data===void 0,Y=Ki(w,z.path,R??"/",!1,A);if(!Y){if(O&&K)return;U.push({key:Q,routeId:z.routeId,path:z.path,matches:null,match:null,request:null,controller:null});return}if(C.has(Q))return;let ee=xh(Y,z.path),G=new AbortController,oe=Il(o,z.path,G.signal),I=null;if(x.has(Q))x.delete(Q),I=ql(i,a,oe,z.path,Y,ee,g,t);else if(K)h&&(I=ql(i,a,oe,z.path,Y,ee,g,t));else{let V;typeof N=="boolean"?V=N:q?V=!1:V=h;let J={...X,defaultShouldRevalidate:V};Cu(ee,J)&&(I=ql(i,a,oe,z.path,Y,ee,g,t,J))}I&&U.push({key:Q,routeId:z.routeId,path:z.path,matches:I,match:ee,request:oe,controller:G})}),{dsMatches:H,revalidatingFetchers:U}}function ob(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function MO(e,t,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ob(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,o=i!=null&&i[e.id]!==void 0;if(!a&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let c=!a&&!o;return{shouldLoad:c,renderFallback:c}}function z5(e,t,i){let a=!t||i.route.id!==t.route.id,o=!e.hasOwnProperty(i.route.id);return a||o}function _5(e,t){let i=e.route.path;return e.pathname!==t.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==t.params["*"]}function Cu(e,t){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(t);if(typeof i=="boolean")return i}return t.defaultShouldRevalidate}function yw(e,t,i,a,o,c){let u;if(e){let g=a[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),u=g.children}else u=i.activeRoutes;let d=[],f=[];if(t.forEach(g=>{let y=u.find(h=>NO(g,h));y?f.push({existingRoute:y,newRoute:g}):d.push(g)}),d.length>0){let g=zu(d,o,[e||"_","patch",String(u?.length||"0")],a);u.push(...g)}if(c&&f.length>0)for(let g=0;g<f.length;g++){let{existingRoute:y,newRoute:h}=f[g],x=y,[S]=zu([h],o,[],{},!0);Object.assign(x,{element:S.element?S.element:x.element,errorElement:S.errorElement?S.errorElement:x.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:x.hydrateFallbackElement})}i.hasHMRRoutes||i.setRoutes([...i.activeRoutes])}function NO(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((i,a)=>t.children?.some(o=>NO(i,o)))??!1:!1}var vw=new WeakMap,DO=({key:e,route:t,manifest:i,mapRouteProperties:a})=>{let o=i[t.id];if(_t(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let c=o.lazy[e];if(!c)return;let u=vw.get(o);u||(u={},vw.set(o,u));let d=u[e];if(d)return d;let f=(async()=>{let g=t5(e),h=o[e]!==void 0&&e!=="hasErrorBoundary";if(g)Hn(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(h)Hn(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await c();x!=null&&(Object.assign(o,{[e]:x}),Object.assign(o,a(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(x=>x===void 0)&&(o.lazy=void 0))})();return u[e]=f,f},bw=new WeakMap;function U5(e,t,i,a,o){let c=i[e.id];if(_t(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=bw.get(c);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let h=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),S={};for(let E in x){let C=x[E];if(C===void 0)continue;let w=r5(E),O=c[E]!==void 0&&E!=="hasErrorBoundary";w?Hn(!w,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Hn(!O,`Route "${c.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):S[E]=C}Object.assign(c,S),Object.assign(c,{...a(c),lazy:void 0})})();return bw.set(c,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let u=Object.keys(e.lazy),d=[],f;for(let y of u){if(o&&o.includes(y))continue;let h=DO({key:y,route:e,manifest:i,mapRouteProperties:a});h&&(d.push(h),y===t&&(f=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:f}}async function xw(e){let t=e.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,c)=>{i[t[c].route.id]=o}),i}async function H5(e){return e.matches.some(t=>t.route.middleware)?jO(e,()=>xw(e)):xw(e)}function jO(e,t){return F5(e,t,a=>{if(tz(a))throw a;return a},Z5,i);function i(a,o,c){if(c)return Promise.resolve(Object.assign(c.value,{[o]:{type:"error",result:a}}));{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(g=>g.route.id===o),0),Math.max(u.findIndex(g=>g.shouldCallHandler()),0)),f=Ds(u,u[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:a}})}}}async function F5(e,t,i,a,o){let{matches:c,...u}=e,d=c.flatMap(g=>g.route.middleware?g.route.middleware.map(y=>[g.route.id,y]):[]);return await IO(u,d,t,i,a,o)}async function IO(e,t,i,a,o,c,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let f=t[u];if(!f)return await i();let[g,y]=f,h,x=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await IO(e,t,i,a,o,c,u+1)},h.value}catch(S){return h={value:await c(S,g,h)},h.value}};try{let S=await y(e,x),E=S!=null?a(S):void 0;return o(E)?E:h?E??h.value:(h={value:await x()},h.value)}catch(S){return await c(S,g,h)}}function PO(e,t,i,a,o){let c=DO({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=U5(a.route,Or(i.method)?"action":"loader",t,e,o);return{middleware:c,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function Hy(e,t,i,a,o,c,u,d,f,g=null,y){let h=!1,x=PO(e,t,i,c,u);return{...c,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:g,shouldCallHandler(S){return h=!0,g?typeof y=="boolean"?Cu(c,{...g,defaultShouldRevalidate:y}):typeof S=="boolean"?Cu(c,{...g,defaultShouldRevalidate:S}):Cu(c,g):f},resolve(S){let{lazy:E,loader:C,middleware:w}=c.route,R=h||f||S&&!Or(i.method)&&(E||C),O=w&&w.length>0&&!C&&!E;return R&&(Or(i.method)||!O)?V5({request:i,path:a,pattern:o,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:S,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function ql(e,t,i,a,o,c,u,d,f=null){return o.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:PO(e,t,i,g,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Hy(e,t,i,a,sd(o),g,u,d,!0,f))}async function B5(e,t,i,a,o,c,u){a.some(y=>y._lazyPromises?.middleware)&&await Promise.all(a.map(y=>y._lazyPromises?.middleware));let d={request:t,url:LO(t,i),pattern:sd(a),params:a[0].params,context:c,matches:a},g=await e({...d,fetcherKey:o,runClientMiddleware:y=>{let h=d;return jO(h,()=>y({...h,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function V5({request:e,path:t,pattern:i,match:a,lazyHandlerPromise:o,lazyRoutePromise:c,handlerOverride:u,scopedContext:d}){let f,g,y=Or(e.method),h=y?"action":"loader",x=S=>{let E,C=new Promise((O,A)=>E=A);g=()=>E(),e.signal.addEventListener("abort",g);let w=O=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${a.route.id}]`)):S({request:e,url:LO(e,t),pattern:i,params:a.params,context:d},...O!==void 0?[O]:[]),R=(async()=>{try{return{type:"data",result:await(u?u(A=>w(A)):w())}}catch(O){return{type:"error",result:O}}})();return Promise.race([R,C])};try{let S=y?a.route.action:a.route.loader;if(o||c)if(S){let E,[C]=await Promise.all([x(S).catch(w=>{E=w}),o,c]);if(E!==void 0)throw E;f=C}else{await o;let E=y?a.route.action:a.route.loader;if(E)[f]=await Promise.all([x(E),c]);else if(h==="action"){let C=new URL(e.url),w=C.pathname+C.search;throw ki(405,{method:e.method,pathname:w,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(S)f=await x(S);else{let E=new URL(e.url),C=E.pathname+E.search;throw ki(404,{pathname:C})}}catch(S){return{type:"error",result:S}}finally{g&&e.signal.removeEventListener("abort",g)}return f}async function K5(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function q5(e){let{result:t,type:i}=e;if(lb(t)){let a;try{a=await K5(t)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new ad(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return i==="error"?Tw(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:X5(t),statusCode:Uu(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Uu(t)?t.status:void 0}:Tw(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Y5(e,t,i,a,o){let c=e.headers.get("Location");if(_t(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!ib(c)){let u=a.slice(0,a.findIndex(d=>d.route.id===i)+1);c=Uy(new URL(t.url),u,o,c),e.headers.set("Location",c)}return e}var G5=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Fy(e){try{return G5.includes(new URL(e).protocol)}catch{return!1}}function Sw(e,t,i,a){if(ib(e)){let o=e,c=Fp.test(o)?new URL(hO(o,t.protocol)):new URL(o);if(Fy(c.toString()))throw new Error("Invalid redirect location");let u=Jr(c.pathname,i)!=null;if(c.origin===t.origin&&u)return ab(c.pathname)+c.search+c.hash}try{let o=a.createURL(e);if(Fy(o.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Il(e,t,i,a){let o=e.createURL(zO(t)).toString(),c={signal:i};if(a&&Or(a.formMethod)){let{formMethod:u,formEncType:d}=a;c.method=u.toUpperCase(),d==="application/json"?(c.headers=new Headers({"Content-Type":d}),c.body=JSON.stringify(a.json)):d==="text/plain"?c.body=a.text:d==="application/x-www-form-urlencoded"&&a.formData?c.body=By(a.formData):c.body=a.formData}return new Request(o,c)}function LO(e,t){let i=new URL(e.url),a=typeof t=="string"?Wi(t):t;if(i.pathname=a.pathname||"/",a.search){let o=new URLSearchParams(a.search),c=o.getAll("index");o.delete("index");for(let u of c.filter(Boolean))o.append("index",u);i.search=o.size?`?${o.toString()}`:""}else i.search="";return i.hash=a.hash||"",i}function By(e){let t=new URLSearchParams;for(let[i,a]of e.entries())t.append(i,typeof a=="string"?a:a.name);return t}function Ew(e){let t=new FormData;for(let[i,a]of e.entries())t.append(i,a);return t}function $5(e,t,i,a=!1,o=!1){let c={},u=null,d,f=!1,g={},y=i&&hi(i[1])?i[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let x=h.route.id,S=t[x];if(_t(!Oo(S),"Cannot handle redirect results in processLoaderData"),hi(S)){let E=S.error;if(y!==void 0&&(E=y,y=void 0),u=u||{},o)u[x]=E;else{let C=Ds(e,x);u[C.route.id]==null&&(u[C.route.id]=E)}a||(c[x]=kO),f||(f=!0,d=Uu(S.error)?S.error.status:500),S.headers&&(g[x]=S.headers)}else c[x]=S.data,S.statusCode&&S.statusCode!==200&&!f&&(d=S.statusCode),S.headers&&(g[x]=S.headers)}),y!==void 0&&i&&(u={[i[0]]:y},i[2]&&(c[i[2]]=void 0)),{loaderData:c,errors:u,statusCode:d||200,loaderHeaders:g}}function ww(e,t,i,a,o,c,u){let{loaderData:d,errors:f}=$5(t,i,a);return o.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:h,controller:x}=g;if(x&&x.signal.aborted)return;let S=c[y];if(_t(S,"Did not find corresponding fetcher result"),hi(S)){let E=Ds(e.matches,h?.route.id);f&&f[E.route.id]||(f={...f,[E.route.id]:S.error}),u.delete(y)}else if(Oo(S))_t(!1,"Unhandled fetcher revalidation redirect");else{let E=fa(S.data);u.set(y,E)}}),{loaderData:d,errors:f}}function Rw(e,t,i,a){let o=Object.entries(t).filter(([,c])=>c!==kO).reduce((c,[u,d])=>(c[u]=d,c),{});for(let c of i){let u=c.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&c.route.loader&&(o[u]=e[u]),a&&a.hasOwnProperty(u))break}return o}function Cw(e){return e?hi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ds(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Wf(e){let t=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ki(e,{pathname:t,routeId:i,method:a,type:o,message:c}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&i?d=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${i}" does not match URL "${t}"`):e===404?(u="Not Found",d=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&i?d=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:a&&(d=`Invalid request method "${a.toUpperCase()}"`)),new ad(e||500,u,new Error(d),!0)}function Jf(e){let t=Object.entries(e);for(let i=t.length-1;i>=0;i--){let[a,o]=t[i];if(Oo(o))return{key:a,result:o}}}function zO(e){let t=typeof e=="string"?Wi(e):e;return Fr({...t,hash:""})}function Q5(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function X5(e){return new ad(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Z5(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,i])=>typeof t=="string"&&W5(i))}function W5(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function J5(e){return lb(e.result)&&OO.has(e.result.status)}function hi(e){return e.type==="error"}function Oo(e){return(e&&e.type)==="redirect"}function Tw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function lb(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ez(e){return OO.has(e)}function tz(e){return lb(e)&&ez(e.status)&&e.headers.has("Location")}function nz(e){return M5.has(e.toUpperCase())}function Or(e){return A5.has(e.toUpperCase())}function cb(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function xh(e,t){let i=typeof t=="string"?Wi(t).search:t.search;if(e[e.length-1].route.index&&cb(i||""))return e[e.length-1];let a=EO(e);return a[a.length-1]}function Ow(e){let{formMethod:t,formAction:i,formEncType:a,text:o,formData:c,json:u}=e;if(!(!t||!i||!a)){if(o!=null)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:void 0,text:o};if(c!=null)return{formMethod:t,formAction:i,formEncType:a,formData:c,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:u,text:void 0}}}function ay(e,t,i,a){return a?{state:"loading",location:e,matches:t,historyAction:i,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,matches:t,historyAction:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function rz(e,t,i,a){return{state:"submitting",location:e,matches:t,historyAction:i,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function hu(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function iz(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function fa(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function az(e,t){try{let i=e.sessionStorage.getItem(AO);if(i){let a=JSON.parse(i);for(let[o,c]of Object.entries(a||{}))c&&Array.isArray(c)&&t.set(o,new Set(c||[]))}}catch{}}function sz(e,t){if(t.size>0){let i={};for(let[a,o]of t)i[a]=[...o];try{e.sessionStorage.setItem(AO,JSON.stringify(i))}catch(a){Hn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Aw(){let e,t,i=new Promise((a,o)=>{e=async c=>{a(c);try{await i}catch{}},t=async c=>{o(c);try{await i}catch{}}});return{promise:i,resolve:e,reject:t}}var zo=v.createContext(null);zo.displayName="DataRouter";var od=v.createContext(null);od.displayName="DataRouterState";var _O=v.createContext(!1);function UO(){return v.useContext(_O)}var ub=v.createContext({isTransitioning:!1});ub.displayName="ViewTransition";var HO=v.createContext(new Map);HO.displayName="Fetchers";var oz=v.createContext(null);oz.displayName="Await";var yi=v.createContext(null);yi.displayName="Navigation";var Vp=v.createContext(null);Vp.displayName="Location";var Pi=v.createContext({outlet:null,matches:[],isDataRoute:!1});Pi.displayName="Route";var db=v.createContext(null);db.displayName="RouteError";var FO="REACT_ROUTER_ERROR",lz="REDIRECT",cz="ROUTE_ERROR_RESPONSE";function uz(e){if(e.startsWith(`${FO}:${lz}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function dz(e){if(e.startsWith(`${FO}:${cz}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ad(t.status,t.statusText,t.data)}catch{}}function fz(e,{relative:t}={}){_t(_o(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=v.useContext(yi),{hash:o,pathname:c,search:u}=ld(e,{relative:t}),d=c;return i!=="/"&&(d=c==="/"?i:Di([i,c])),a.createHref({pathname:d,search:u,hash:o})}function _o(){return v.useContext(Vp)!=null}function Nr(){return _t(_o(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Vp).location}function hz(e){_t(_o(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Nr();return v.useMemo(()=>_u(e,SO(t)),[t,e])}var BO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function VO(e){v.useContext(yi).static||v.useLayoutEffect(e)}function lc(){let{isDataRoute:e}=v.useContext(Pi);return e?Mz():pz()}function pz(){_t(_o(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(zo),{basename:t,navigator:i}=v.useContext(yi),{matches:a}=v.useContext(Pi),{pathname:o}=Nr(),c=JSON.stringify(Bp(a)),u=v.useRef(!1);return VO(()=>{u.current=!0}),v.useCallback((f,g={})=>{if(Hn(u.current,BO),!u.current)return;if(typeof f=="number"){i.go(f);return}let y=id(f,JSON.parse(c),o,g.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Di([t,y.pathname])),Kl(typeof f=="string"?f:Fr(f),i.createHref(y),sb(i),"reject"),(g.replace?i.replace:i.push)(y,g.state,g)},[t,i,c,o,e])}var gz=v.createContext(null);function mz(e){let t=v.useContext(Pi).outlet;return v.useMemo(()=>t&&v.createElement(gz.Provider,{value:e},t),[t,e])}function yz(){let{matches:e}=v.useContext(Pi);return e[e.length-1]?.params??{}}function ld(e,{relative:t}={}){let{matches:i}=v.useContext(Pi),{pathname:a}=Nr(),o=JSON.stringify(Bp(i));return v.useMemo(()=>id(e,JSON.parse(o),a,t==="path"),[e,o,a,t])}function vz(e,t,i){_t(_o(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=v.useContext(yi),{matches:o}=v.useContext(Pi),c=o[o.length-1],u=c?c.params:{},d=c?c.pathname:"/",f=c?c.pathnameBase:"/",g=c&&c.route;{let w=g&&g.path||"";YO(d,!g||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${w}">) 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.
12
+
13
+ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let y=Nr(),h;h=y;let x=h.pathname||"/",S=x;if(f!=="/"){let w=f.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(w.length).join("/")}let E=i&&i.state.matches.length?i.state.matches.map(w=>Object.assign(w,{route:i.manifest[w.route.id]||w.route})):gO(e,{pathname:S});return Hn(g||E!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Hn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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.`),wz(E&&E.map(w=>Object.assign({},w,{params:Object.assign({},u,w.params),pathname:Di([f,a.encodeLocation?a.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?f:Di([f,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),o,i)}function bz(){let e=Oz(),t=Uu(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},c={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:c},"ErrorBoundary")," or"," ",v.createElement("code",{style:c},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),i?v.createElement("pre",{style:o},i):null,u)}var xz=v.createElement(bz,null),KO=class extends v.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){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=dz(e.digest);i&&(e=i)}let t=e!==void 0?v.createElement(Pi.Provider,{value:this.props.routeContext},v.createElement(db.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(Sz,{error:e},t):t}};KO.contextType=_O;var sy=new WeakMap;function Sz({children:e,error:t}){let{basename:i,navigator:a}=v.useContext(yi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=uz(t.digest);if(o){let c=sy.get(t);if(c)throw c;let u=RO(o.location,i),d=u.absoluteURL||u.to;if(Kl(o.location,d,sb(a),"allow-explicit"),Fy(d))throw new Error("Invalid redirect location");if(wO&&!sy.get(t))if(u.isExternal||o.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw sy.set(t,f),f}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function Ez({routeContext:e,match:t,children:i}){let a=v.useContext(zo);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Pi.Provider,{value:e},i)}function wz(e,t=[],i){let a=i?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let o=e,c=a?.errors;if(c!=null){let y=o.findIndex(h=>h.route.id&&c?.[h.route.id]!==void 0);_t(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,d=-1;if(i&&a){u=a.renderFallback;for(let y=0;y<o.length;y++){let h=o[y];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=y),h.route.id){let{loaderData:x,errors:S}=a,E=h.route.loader&&!x.hasOwnProperty(h.route.id)&&(!S||S[h.route.id]===void 0);if(h.route.lazy||E){i.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let f=i?.onError,g=a&&f?(y,h)=>{f(y,{location:a.location,params:a.matches?.[0]?.params??{},pattern:sd(a.matches),errorInfo:h})}:void 0;return o.reduceRight((y,h,x)=>{let S,E=!1,C=null,w=null;a&&(S=c&&h.route.id?c[h.route.id]:void 0,C=h.route.errorElement||xz,u&&(d<0&&x===0?(YO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,w=null):d===x&&(E=!0,w=h.route.hydrateFallbackElement||null)));let R=t.concat(o.slice(0,x+1)),O=()=>{let A;return S?A=C:E?A=w:h.route.Component?A=v.createElement(h.route.Component,null):h.route.element?A=h.route.element:A=y,v.createElement(Ez,{match:h,routeContext:{outlet:y,matches:R,isDataRoute:a!=null},children:A})};return a&&(h.route.ErrorBoundary||h.route.errorElement||x===0)?v.createElement(KO,{location:a.location,revalidation:a.revalidation,component:C,error:S,children:O(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:g}):O()},null)}function fb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qO(e){let t=v.useContext(zo);return _t(t,fb(e)),t}function hb(e){let t=v.useContext(od);return _t(t,fb(e)),t}function Rz(e){let t=v.useContext(Pi);return _t(t,fb(e)),t}function pb(e){let t=Rz(e),i=t.matches[t.matches.length-1];return _t(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function Cz(){return pb("useRouteId")}function Tz(){let{matches:e,loaderData:t}=hb("useMatches");return v.useMemo(()=>e.map(i=>mO(i,t)),[e,t])}function Oz(){let e=v.useContext(db),t=hb("useRouteError"),i=pb("useRouteError");return e!==void 0?e:t.errors?.[i]}var Az=0;function kz(e){let{router:t,basename:i}=qO("useBlocker"),a=hb("useBlocker"),[o,c]=v.useState(""),u=v.useCallback(d=>{if(typeof e!="function")return!!e;if(i==="/")return e(d);let{currentLocation:f,nextLocation:g,historyAction:y}=d;return e({currentLocation:{...f,pathname:Jr(f.pathname,i)||f.pathname},nextLocation:{...g,pathname:Jr(g.pathname,i)||g.pathname},historyAction:y})},[i,e]);return v.useEffect(()=>{let d=String(++Az);return c(d),()=>t.deleteBlocker(d)},[t]),v.useEffect(()=>{o!==""&&t.getBlocker(o,u)},[t,o,u]),o&&a.blockers.has(o)?a.blockers.get(o):Nl}function Mz(){let{router:e}=qO("useNavigate"),t=pb("useNavigate"),i=v.useRef(!1);return VO(()=>{i.current=!0}),v.useCallback(async(o,c={})=>{Hn(i.current,BO),i.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...c}))},[e,t])}var kw={};function YO(e,t,i){!t&&!kw[e]&&(kw[e]=!0,Hn(!1,i))}var Mw={};function Nw(e,t){!e&&!Mw[t]&&(Mw[t]=!0,console.warn(t))}var Nz="useOptimistic",Dw=jR[Nz],Dz=()=>{};function jz(e){return Dw?Dw(e):[e,Dz]}function Iz(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Hn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Hn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Hn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Pz=["HydrateFallback","hydrateFallbackElement"],Lz=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",t(i))}})}};function zz({router:e,flushSync:t,onError:i,useTransitions:a}){a=UO()||a;let[c,u]=v.useState(e.state),[d,f]=jz(c),[g,y]=v.useState(),[h,x]=v.useState({isTransitioning:!1}),[S,E]=v.useState(),[C,w]=v.useState(),[R,O]=v.useState(),A=v.useRef(new Map),k=v.useCallback((M,{deletedFetchers:_,newErrors:L,flushSync:q,viewTransitionOpts:X})=>{L&&i&&Object.values(L).forEach(H=>i(H,{location:M.location,params:M.matches[0]?.params??{},pattern:sd(M.matches)})),M.fetchers.forEach((H,U)=>{H.data!==void 0&&A.current.set(U,H.data)}),_.forEach(H=>A.current.delete(H)),Nw(q===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let B=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Nw(X==null||B,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!B){t&&q?t(()=>u(M)):a===!1?u(M):v.startTransition(()=>{a===!0&&f(H=>jw(H,M)),u(M)});return}if(t&&q){t(()=>{C&&(S?.resolve(),C.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let H=e.window.document.startViewTransition(()=>{t(()=>u(M))});H.finished.finally(()=>{t(()=>{E(void 0),w(void 0),y(void 0),x({isTransitioning:!1})})}),t(()=>w(H));return}C?(S?.resolve(),C.skipTransition(),O({state:M,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(y(M),x({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,C,S,a,f,i]);v.useLayoutEffect(()=>e.subscribe(k),[e,k]),v.useEffect(()=>{h.isTransitioning&&!h.flushSync&&E(new Lz)},[h]),v.useEffect(()=>{if(S&&g&&e.window){let M=g,_=S.promise,L=e.window.document.startViewTransition(async()=>{a===!1?u(M):v.startTransition(()=>{a===!0&&f(q=>jw(q,M)),u(M)}),await _});L.finished.finally(()=>{E(void 0),w(void 0),y(void 0),x({isTransitioning:!1})}),w(L)}},[g,S,e.window,a,f]),v.useEffect(()=>{S&&g&&d.location.key===g.location.key&&S.resolve()},[S,C,d.location,g]),v.useEffect(()=>{!h.isTransitioning&&R&&(y(R.state),x({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),O(void 0))},[h.isTransitioning,R]);let N=v.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:M=>e.navigate(M),push:(M,_,L)=>e.navigate(M,{state:_,preventScrollReset:L?.preventScrollReset}),replace:(M,_,L)=>e.navigate(M,{replace:!0,state:_,preventScrollReset:L?.preventScrollReset})}),[e]),j=e.basename||"/",D=v.useMemo(()=>({router:e,navigator:N,static:!1,basename:j,onError:i}),[e,N,j,i]);return v.createElement(v.Fragment,null,v.createElement(zo.Provider,{value:D},v.createElement(od.Provider,{value:d},v.createElement(HO.Provider,{value:A.current},v.createElement(ub.Provider,{value:h},v.createElement(Fz,{basename:j,location:d.location,navigationType:d.historyAction,navigator:N,useTransitions:a},v.createElement(_z,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:i})))))),null)}function jw(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var _z=v.memo(Uz);function Uz({routes:e,manifest:t,future:i,state:a,isStatic:o,onError:c}){return vz(e,void 0,{manifest:t,state:a,isStatic:o,onError:c})}function Hz({to:e,replace:t,state:i,relative:a}){_t(_o(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:c}=v.useContext(yi);Hn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=v.useContext(Pi),{pathname:d}=Nr(),f=lc(),g=id(e,Bp(u),d,a==="path");Kl(typeof e=="string"?e:Fr(e),c.createHref(g),sb(c),"reject");let y=JSON.stringify(g);return v.useEffect(()=>{f(JSON.parse(y),{replace:t,state:i,relative:a})},[f,y,a,t,i]),null}function GO(e){return mz(e.context)}function Fz({basename:e="/",children:t=null,location:i,navigationType:a="POP",navigator:o,static:c=!1,useTransitions:u}){_t(!_o(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:d,navigator:o,static:c,useTransitions:u,future:{}}),[d,o,c,u]);typeof i=="string"&&(i=Wi(i));let{pathname:g="/",search:y="",hash:h="",state:x=null,key:S="default",mask:E}=i,C=v.useMemo(()=>{let w=Jr(g,d);return w==null?null:{location:{pathname:w,search:y,hash:h,state:x,key:S,mask:E},navigationType:a}},[d,g,y,h,x,S,a,E]);return Hn(C!=null,`<Router basename="${d}"> is not able to match the URL "${g}${y}${h}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(yi.Provider,{value:f},v.createElement(Vp.Provider,{children:t,value:C}))}var Sh="get",Eh="application/x-www-form-urlencoded";function Kp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Bz(e){return Kp(e)&&e.tagName.toLowerCase()==="button"}function Vz(e){return Kp(e)&&e.tagName.toLowerCase()==="form"}function Kz(e){return Kp(e)&&e.tagName.toLowerCase()==="input"}function qz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yz(e,t){return e.button===0&&(!t||t==="_self")&&!qz(e)}function Vy(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let a=e[i];return t.concat(Array.isArray(a)?a.map(o=>[i,o]):[[i,a]])},[]))}function Gz(e,t){let i=Vy(e);return t&&t.forEach((a,o)=>{i.has(o)||t.getAll(o).forEach(c=>{i.append(o,c)})}),i}var eh=null;function $z(){if(eh===null)try{new FormData(document.createElement("form"),0),eh=!1}catch{eh=!0}return eh}var Qz=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function oy(e){return e!=null&&!Qz.has(e)?(Hn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Eh}"`),null):e}function Xz(e,t){let i,a,o,c,u;if(Vz(e)){let d=e.getAttribute("action");a=d?Jr(d,t):null,i=e.getAttribute("method")||Sh,o=oy(e.getAttribute("enctype"))||Eh,c=new FormData(e)}else if(Bz(e)||Kz(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(a=f?Jr(f,t):null,i=e.getAttribute("formmethod")||d.getAttribute("method")||Sh,o=oy(e.getAttribute("formenctype"))||oy(d.getAttribute("enctype"))||Eh,c=new FormData(d,e),!$z()){let{name:g,type:y,value:h}=e;if(y==="image"){let x=g?`${g}.`:"";c.append(`${x}x`,"0"),c.append(`${x}y`,"0")}else g&&c.append(g,h)}}else{if(Kp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Sh,a=null,o=Eh,u=e}return c&&o==="text/plain"&&(u=c,c=void 0),{action:a,method:i.toLowerCase(),encType:o,formData:c,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $O(e,t,i,a){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${a}`:o.pathname=`${o.pathname}.${a}`:o.pathname==="/"?o.pathname=`_root.${a}`:t&&Jr(o.pathname,t)==="/"?o.pathname=`${tc(t)}/_root.${a}`:o.pathname=`${tc(o.pathname)}.${a}`,o}async function Zz(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Wz(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 Jz(e,t,i){let a=await Promise.all(e.map(async o=>{let c=t.routes[o.route.id];if(c){let u=await Zz(c,i);return u.links?u.links():[]}return[]}));return r_(a.flat(1).filter(Wz).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Iw(e,t,i,a,o,c){let u=(f,g)=>i[g]?f.route.id!==i[g].route.id:!0,d=(f,g)=>i[g].pathname!==f.pathname||i[g].route.path?.endsWith("*")&&i[g].params["*"]!==f.params["*"];return c==="assets"?t.filter((f,g)=>u(f,g)||d(f,g)):c==="data"?t.filter((f,g)=>{let y=a.routes[f.route.id];if(!y||!y.hasLoader)return!1;if(u(f,g)||d(f,g))return!0;if(f.route.shouldRevalidate){let h=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function e_(e,t,{includeHydrateFallback:i}={}){return t_(e.map(a=>{let o=t.routes[a.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function t_(e){return[...new Set(e)]}function n_(e){let t={},i=Object.keys(e).sort();for(let a of i)t[a]=e[a];return t}function r_(e,t){let i=new Set;return new Set(t),e.reduce((a,o)=>{let c=JSON.stringify(n_(o));return i.has(c)||(i.add(c),a.push({key:c,link:o})),a},[])}function mb(){let e=v.useContext(zo);return gb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function i_(){let e=v.useContext(od);return gb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var yb=v.createContext(void 0);yb.displayName="FrameworkContext";function qp(){let e=v.useContext(yb);return gb(e,"You must render this element inside a <HydratedRouter> element"),e}function a_(e,t){let i=v.useContext(yb),[a,o]=v.useState(!1),[c,u]=v.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:g,onMouseLeave:y,onTouchStart:h}=t,x=v.useRef(null);v.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let C=R=>{R.forEach(O=>{u(O.isIntersecting)})},w=new IntersectionObserver(C,{threshold:.5});return x.current&&w.observe(x.current),()=>{w.disconnect()}}},[e]),v.useEffect(()=>{if(a){let C=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(C)}}},[a]);let S=()=>{o(!0)},E=()=>{o(!1),u(!1)};return i?e!=="intent"?[c,x,{}]:[c,x,{onFocus:pu(d,S),onBlur:pu(f,E),onMouseEnter:pu(g,S),onMouseLeave:pu(y,E),onTouchStart:pu(h,S)}]:[!1,x,{}]}function pu(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function s_({page:e,...t}){let i=UO(),{nonce:a}=qp(),{router:o}=mb(),c=v.useMemo(()=>gO(o.routes,e,o.basename),[o.routes,e,o.basename]);return c?(t.nonce==null&&a&&(t={...t,nonce:a}),i?v.createElement(l_,{page:e,matches:c,...t}):v.createElement(c_,{page:e,matches:c,...t})):null}function o_(e){let{manifest:t,routeModules:i}=qp(),[a,o]=v.useState([]);return v.useEffect(()=>{let c=!1;return Jz(e,t,i).then(u=>{c||o(u)}),()=>{c=!0}},[e,t,i]),a}function l_({page:e,matches:t,...i}){let a=Nr(),{future:o}=qp(),{basename:c}=mb(),u=v.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let d=$O(e,c,o.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,g=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?f=!0:g.push(y.route.id);return f&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[c,o.v8_trailingSlashAwareDataRequests,e,a,t]);return v.createElement(v.Fragment,null,u.map(d=>v.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...i})))}function c_({page:e,matches:t,...i}){let a=Nr(),{future:o,manifest:c,routeModules:u}=qp(),{basename:d}=mb(),{loaderData:f,matches:g}=i_(),y=v.useMemo(()=>Iw(e,t,g,c,a,"data"),[e,t,g,c,a]),h=v.useMemo(()=>Iw(e,t,g,c,a,"assets"),[e,t,g,c,a]),x=v.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let C=new Set,w=!1;if(t.forEach(O=>{let A=c.routes[O.route.id];!A||!A.hasLoader||(!y.some(k=>k.route.id===O.route.id)&&O.route.id in f&&u[O.route.id]?.shouldRevalidate||A.hasClientLoader?w=!0:C.add(O.route.id))}),C.size===0)return[];let R=$O(e,d,o.v8_trailingSlashAwareDataRequests,"data");return w&&C.size>0&&R.searchParams.set("_routes",t.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[R.pathname+R.search]},[d,o.v8_trailingSlashAwareDataRequests,f,a,c,y,t,e,u]),S=v.useMemo(()=>e_(h,c),[h,c]),E=o_(h);return v.createElement(v.Fragment,null,x.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...i})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...i})),E.map(({key:C,link:w})=>v.createElement("link",{key:C,nonce:i.nonce,...w,crossOrigin:w.crossOrigin??i.crossOrigin})))}function u_(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var d_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{d_&&(window.__reactRouterVersion="7.18.5")}catch{}function f_(e,t){return P5({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:ZL({window:t?.window}),hydrationData:h_(),routes:e,mapRouteProperties:Iz,hydrationRouteProperties:Pz,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function h_(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:p_(e.errors)}),e}function p_(e){if(!e)return null;let t=Object.entries(e),i={};for(let[a,o]of t)if(o&&o.__type==="RouteErrorResponse")i[a]=new ad(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(typeof o.__subType=="string"&&x5.includes(o.__subType)){let c=window[o.__subType];if(typeof c=="function")try{let u=new c(o.message);u.stack="",i[a]=u}catch{}}if(i[a]==null){let c=new Error(o.message);c.stack="",i[a]=c}}else i[a]=o;return i}var cd=v.forwardRef(function({onClick:t,discover:i="render",prefetch:a="none",relative:o,reloadDocument:c,replace:u,mask:d,state:f,target:g,to:y,preventScrollReset:h,viewTransition:x,defaultShouldRevalidate:S,...E},C){let{basename:w,navigator:R,useTransitions:O}=v.useContext(yi),A=typeof y=="string"&&Hp.test(y),k=RO(y,w);y=k.to;let N=fz(y,{relative:o}),j=Nr(),D=null;if(d){let U=id(d,[],j.mask?j.mask.pathname:"/",!0);w!=="/"&&(U.pathname=U.pathname==="/"?w:Di([w,U.pathname])),D=R.createHref(U)}let[M,_,L]=a_(a,E),q=y_(y,{replace:u,mask:d,state:f,target:g,preventScrollReset:h,relative:o,viewTransition:x,defaultShouldRevalidate:S,useTransitions:O});function X(U){t&&t(U),U.defaultPrevented||q(U)}let B=!(k.isExternal||c),H=v.createElement("a",{...E,...L,href:(B?D:void 0)||k.absoluteURL||N,onClick:B?X:t,ref:u_(C,_),target:g,"data-discover":!A&&i==="render"?"true":void 0});return M&&!A?v.createElement(v.Fragment,null,H,v.createElement(s_,{page:N})):H});cd.displayName="Link";var Tu=v.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:a="",end:o=!1,style:c,to:u,viewTransition:d,children:f,...g},y){let h=ld(u,{relative:g.relative}),x=Nr(),S=v.useContext(od),{navigator:E,basename:C}=v.useContext(yi),w=S!=null&&R_(h)&&d===!0,R=E.encodeLocation?E.encodeLocation(h).pathname:h.pathname,O=x.pathname,A=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(O=O.toLowerCase(),A=A?A.toLowerCase():null,R=R.toLowerCase()),A&&C&&(A=Jr(A,C)||A);const k=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let N=O===R||!o&&O.startsWith(R)&&O.charAt(k)==="/",j=A!=null&&(A===R||!o&&A.startsWith(R)&&A.charAt(R.length)==="/"),D={isActive:N,isPending:j,isTransitioning:w},M=N?t:void 0,_;typeof a=="function"?_=a(D):_=[a,N?"active":null,j?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let L=typeof c=="function"?c(D):c;return v.createElement(cd,{...g,"aria-current":M,className:_,ref:y,style:L,to:u,viewTransition:d},typeof f=="function"?f(D):f)});Tu.displayName="NavLink";var g_=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:a,replace:o,state:c,method:u=Sh,action:d,onSubmit:f,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:x,...S},E)=>{let{useTransitions:C}=v.useContext(yi),w=S_(),R=E_(d,{relative:g}),O=u.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&Hp.test(d),k=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let j=N.nativeEvent.submitter,D=j?.getAttribute("formmethod")||u,M=()=>w(j||N.currentTarget,{fetcherKey:t,method:D,navigate:i,replace:o,state:c,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:x});C&&i!==!1?v.startTransition(()=>M()):M()};return v.createElement("form",{ref:E,method:O,action:R,onSubmit:a?f:k,...S,"data-discover":!A&&e==="render"?"true":void 0})});g_.displayName="Form";function m_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QO(e){let t=v.useContext(zo);return _t(t,m_(e)),t}function y_(e,{target:t,replace:i,mask:a,state:o,preventScrollReset:c,relative:u,viewTransition:d,defaultShouldRevalidate:f,useTransitions:g}={}){let y=lc(),h=Nr(),x=ld(e,{relative:u});return v.useCallback(S=>{if(Yz(S,t)){S.preventDefault();let E=i!==void 0?i:Fr(h)===Fr(x),C=()=>y(e,{replace:E,mask:a,state:o,preventScrollReset:c,relative:u,viewTransition:d,defaultShouldRevalidate:f});g?v.startTransition(()=>C()):C()}},[h,y,x,i,a,o,t,e,c,u,d,f,g])}function v_(e){Hn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(Vy(e)),i=v.useRef(!1),a=Nr(),o=v.useMemo(()=>Gz(a.search,i.current?null:t.current),[a.search]),c=lc(),u=v.useCallback((d,f)=>{const g=Vy(typeof d=="function"?d(new URLSearchParams(o)):d);i.current=!0,c("?"+g,f)},[c,o]);return[o,u]}var b_=0,x_=()=>`__${String(++b_)}__`;function S_(){let{router:e}=QO("useSubmit"),{basename:t}=v.useContext(yi),i=Cz(),a=e.fetch,o=e.navigate;return v.useCallback(async(c,u={})=>{let{action:d,method:f,encType:g,formData:y,body:h}=Xz(c,t);if(u.navigate===!1){let x=u.fetcherKey||x_();await a(x,i,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:h,formMethod:u.method||f,formEncType:u.encType||g,flushSync:u.flushSync})}else await o(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:h,formMethod:u.method||f,formEncType:u.encType||g,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,o,t,i])}function E_(e,{relative:t}={}){let{basename:i}=v.useContext(yi),a=v.useContext(Pi);_t(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),c={...ld(e||".",{relative:t})},u=Nr();if(e==null){c.search=u.search;let d=new URLSearchParams(c.search),f=d.getAll("index");if(f.some(y=>y==="")){d.delete("index"),f.filter(h=>h).forEach(h=>d.append("index",h));let y=d.toString();c.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:Di([i,c.pathname])),Fr(c)}function w_(e,t){let{capture:i}={};v.useEffect(()=>{let a=i!=null?{capture:i}:void 0;return window.addEventListener("beforeunload",e,a),()=>{window.removeEventListener("beforeunload",e,a)}},[e,i])}function R_(e,{relative:t}={}){let i=v.useContext(ub);_t(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=QO("useViewTransitionState"),o=ld(e,{relative:t});if(!i.isTransitioning)return!1;let c=Jr(i.currentLocation.pathname,a)||i.currentLocation.pathname,u=Jr(i.nextLocation.pathname,a)||i.nextLocation.pathname;return _u(o.pathname,u)!=null||_u(o.pathname,c)!=null}function C_(e){return v.createElement(zz,{flushSync:ur.flushSync,...e})}function Ga({controlled:e,default:t,name:i,state:a="value"}){const{current:o}=v.useRef(e!==void 0),[c,u]=v.useState(()=>t),d=o&&e!==void 0?e:c,f=v.useCallback(g=>{o||u(g)},[]);return[d,f]}function T_(e){const{open:t,defaultOpen:i=!1,onOpenChange:a,disabled:o}=e,[c,u]=Ga({controlled:t,default:i,name:"Collapsible",state:"open"}),{mounted:d,setMounted:f,transitionStatus:g}=Po(c,!0,!0),y=dr(),[h,x]=v.useState(),S=h===null?void 0:h??y,E=Fe(C=>{const w=!c,R=ct($i,C.nativeEvent);a(w,R),!R.isCanceled&&u(w)});return v.useMemo(()=>({defaultPanelId:y,disabled:o,handleTrigger:E,mounted:d,open:c,panelId:S,setMounted:f,setOpen:u,setPanelIdState:x,transitionStatus:g}),[y,o,E,d,c,S,f,u,x,g])}const XO=v.createContext(void 0);function ZO(){const e=v.useContext(XO);if(e===void 0)throw new Error(bn(15));return e}const O_="data-open",A_="data-closed",th=xv,k_="data-panel-open",M_={[O_]:""},N_={[A_]:""},D_={open(e){return e?{[k_]:""}:null}},j_={open(e){return e?M_:N_}},WO={...j_,...xa},I_=v.forwardRef(function(t,i){const{render:a,className:o,defaultOpen:c=!1,disabled:u=!1,onOpenChange:d,open:f,style:g,...y}=t,h=Fe(d),x=T_({open:f,defaultOpen:c,onOpenChange:h,disabled:u}),S=v.useMemo(()=>({open:x.open,disabled:x.disabled,transitionStatus:x.transitionStatus}),[x.open,x.disabled,x.transitionStatus]),E=v.useMemo(()=>({...x,onOpenChange:h,state:S}),[x,h,S]),C=At("div",t,{state:S,ref:i,props:y,stateAttributesMapping:WO});return b.jsx(XO.Provider,{value:E,children:C})}),JO=v.createContext(void 0);function vb(e=!1){const t=v.useContext(JO);if(t===void 0&&!e)throw new Error(bn(16));return t}function P_(e){const{focusableWhenDisabled:t,disabled:i,composite:a=!1,tabIndex:o=0,isNativeButton:c}=e,u=a&&t!==!1,d=a&&t===!1;return{props:v.useMemo(()=>{const g={onKeyDown(y){i&&t&&y.key!=="Tab"&&y.preventDefault()}};return a||(g.tabIndex=o,!c&&i&&(g.tabIndex=t?o:-1)),(c&&(t||u)||!c&&i)&&(g["aria-disabled"]=i),c&&(!t||d)&&(g.disabled=i),g},[a,i,t,u,d,c,o])}}function ko(e,t,{detail:i=0,pointerType:a=""}={}){e.dispatchEvent(new(Rn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:i,pointerType:a,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Li(e={}){const{disabled:t=!1,focusableWhenDisabled:i,tabIndex:a=0,native:o=!0,composite:c}=e,u=v.useRef(null),d=vb(!0),f=c??d!==void 0,{props:g}=P_({focusableWhenDisabled:i,disabled:t,composite:f,tabIndex:a,isNativeButton:o}),y=v.useCallback(()=>{const S=u.current;ly(S)&&f&&t&&g.disabled===void 0&&S.disabled&&(S.disabled=!1)},[t,g.disabled,f]);_e(y,[y]);const h=v.useCallback((S={})=>{const{onClick:E,onMouseDown:C,onKeyUp:w,onKeyDown:R,onPointerDown:O,...A}=S;return kr({onClick(k){if(t){k.preventDefault();return}E?.(k)},onMouseDown(k){t||C?.(k)},onKeyDown(k){if(t||(zh(k),R?.(k),k.baseUIHandlerPrevented))return;const N=k.target===k.currentTarget,j=k.currentTarget,D=ly(j),M=!o&&L_(j),_=N&&(o?D:!M),L=k.key==="Enter",q=k.key===" ",X=j.getAttribute("role"),B=X?.startsWith("menuitem")||X==="option"||X==="gridcell";if(N&&f&&q){if(k.defaultPrevented&&B)return;k.preventDefault(),(!o||D)&&(k.preventBaseUIHandler(),ko(j,k));return}if(!_||o||!q&&!L){N&&M&&q&&k.preventDefault();return}k.defaultPrevented||(k.preventDefault(),L&&(k.preventBaseUIHandler(),ko(j,k)))},onKeyUp(k){if(!t){if(zh(k),w?.(k),k.target===k.currentTarget&&o&&f&&ly(k.currentTarget)&&k.key===" "){k.preventDefault();return}k.baseUIHandlerPrevented||k.target===k.currentTarget&&!o&&!f&&!k.defaultPrevented&&k.key===" "&&(k.preventBaseUIHandler(),ko(k.currentTarget,k))}},onPointerDown(k){if(t){k.preventDefault();return}O?.(k)}},o?{type:"button"}:{role:"button"},g,A)},[t,g,f,o]),x=Fe(S=>{u.current=S,y()});return{getButtonProps:h,buttonRef:x}}function ly(e){return vn(e)&&e.tagName==="BUTTON"}function L_(e){return vn(e)&&e.tagName==="A"&&!!e.href}const z_={...D_,...xa},__=v.forwardRef(function(t,i){const{panelId:a,open:o,handleTrigger:c,state:u,disabled:d}=ZO(),{className:f,disabled:g=d,render:y,nativeButton:h=!0,style:x,...S}=t,{getButtonProps:E,buttonRef:C}=Li({disabled:g,native:h});return At("button",t,{state:u,ref:[i,C],props:[{"aria-controls":o?a:void 0,"aria-expanded":o,onClick:c},S,E],stateAttributesMapping:z_})}),kl={height:void 0,width:void 0};function U_(e){const{externalRef:t,hiddenUntilFound:i,id:a,keepMounted:o,mounted:c,onOpenChange:u,open:d,setMounted:f,setOpen:g,transitionStatus:y}=e,h=v.useRef(null),x=v.useRef(null),[S,E]=v.useState(kl),C=v.useRef(kl),w=v.useRef(!1),R=v.useRef(d),O=v.useRef(!1),[A,k]=v.useState(!1),N=v.useRef(null),j=Wr(t,h),D=Ln(d),M=wp(h),_=!d&&!c,L=A?"idle":y,q=d&&(R.current||O.current),X=!d&&c&&x.current==="css-animation"&&S.height===void 0&&S.width===void 0?C.current:S,B=i&&_&&x.current!=="css-animation",H=Fe((K,Y=!0)=>{Y&&(C.current=K),E(K)}),U=Fe(()=>{N.current?.(),N.current=null}),z=Fe(K=>{U(),N.current=()=>{N.current=null,K()}}),Q=Fe(()=>{d&&c&&x.current==="css-animation"&&(O.current=!0)});_e(()=>{!A||y==="starting"||k(!1)},[A,y]),v.useEffect(()=>()=>{Q(),U()},[Q,U]),_e(()=>{d||(R.current=!1,O.current=!1);const K=h.current;if(!K)return;!d&&N.current&&U();const Y=H_(K,q);if(x.current=Y,d&&y==="idle"&&R.current&&Y==="css-animation"){C.current=Ml(K);return}if(d&&y==="starting"){const oe=w.current;if(w.current=!1,Y==="none"){H(Ml(K)),k(!0);return}if(Y==="css-transition"){const J=F_(K);if(H(Ml(K)),!oe)return J;const re=nh(K,"transition-duration","0s");return z(re),k(!0),J}H(Ml(K));const I=nh(K,"animation-name","none");if(!oe){I();return}const V=nh(K,"animation-duration","0s");I(),z(V),k(!0);return}if(!d&&c&&(y==="idle"||y==="starting")){if(Y==="none"){H(kl,!1),f(!1);return}H(Ml(K));return}if(y!=="ending")return;if(Y==="none"){f(!1);return}const ee=Ml(K);if(!(ee.height>0||ee.width>0)){f(!1);return}H(ee),Y==="css-animation"&&nh(K,"animation-name","none")()},[c,d,U,H,f,z,q,y]),Ii({enabled:d&&c&&L==="idle",open:!0,ref:h,onComplete(){d&&H(kl,!1)}}),v.useEffect(()=>{if(d||!c||L!=="ending")return;if(!h.current){f(!1),H(kl,!1);return}const Y=new AbortController;let ee=-1;function G(){D.current||(f(!1),H(kl,!1))}return ee=Ar.request(()=>{M(G,Y.signal)}),()=>{Ar.cancel(ee),Y.abort()}},[D,c,d,L,M,H,f]),_e(()=>{const K=h.current;!K||!i||!_||K.setAttribute("hidden","until-found")},[_,i]),v.useEffect(function(){const Y=h.current;if(!Y)return;const ee=ji.create();let G=-1;const oe=(J,re)=>{ee.start(0,()=>{D.current||(G=Ar.request(()=>{D.current||(J&&(w.current=!1),re&&Y.setAttribute(th,""),Y.setAttribute("hidden","until-found"))}))})},V=Lt(Y,"beforematch",J=>{const re=ct(Mr,J);if(u(!0,re),re.isCanceled){oe(!1,!1);return}w.current=!0;const we=Y.hasAttribute(th);Y.removeAttribute(th),g(!0),oe(!0,we)});return()=>{ee.clear(),Ar.cancel(G),V()}},[D,u,g]);const $=o||i||c||d;return{height:X.height,props:{...B?{[th]:""}:void 0,hidden:_,id:a},ref:j,shouldPreventOpenAnimation:q,shouldRender:$,transitionStatus:L,width:X.width}}function Ml(e){return{height:e.scrollHeight,width:e.scrollWidth}}function H_(e,t){const i=Rn(e).getComputedStyle(e),a=(i.animationName.split(",").map(c=>c.trim()).some(c=>c!==""&&c!=="none")||t)&&Pw(i.animationDuration),o=Pw(i.transitionDuration);return a&&o||o?"css-transition":a?"css-animation":"none"}function Pw(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function nh(e,t,i){const a=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return e.style.setProperty(t,i),()=>{if(a===""){e.style.removeProperty(t);return}e.style.setProperty(t,a,o)}}function F_(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(o=>{e.style.setProperty(o,"initial","important")});function i(){Object.entries(t).forEach(([o,c])=>{if(c===""){e.style.removeProperty(o);return}e.style.setProperty(o,c)})}const a=Ar.request(i);return()=>{Ar.cancel(a),i()}}const B_="--collapsible-panel-height",V_="--collapsible-panel-width",K_=v.forwardRef(function(t,i){const{className:a,hiddenUntilFound:o,keepMounted:c,render:u,id:d,style:f,...g}=t,{defaultPanelId:y,mounted:h,onOpenChange:x,open:S,setMounted:E,setPanelIdState:C,setOpen:w,state:R,transitionStatus:O}=ZO(),A=o??!1,k=c??!1,N=d||void 0,j=N??y;_e(()=>(C(Q=>N??(Q===null?void 0:Q)),()=>{C(Q=>Q===N?null:Q)}),[N,C]);const{height:D,props:M,ref:_,shouldPreventOpenAnimation:L,shouldRender:q,transitionStatus:X,width:B}=U_({externalRef:i,hiddenUntilFound:A,id:j,keepMounted:k,mounted:h,onOpenChange:x,open:S,setMounted:E,setOpen:w,transitionStatus:O}),H={...R,transitionStatus:X},U=sC(f,H),z=At("div",{...t,style:void 0},{state:H,ref:_,props:[M,{style:{[B_]:D===void 0?"auto":`${D}px`,[V_]:B===void 0?"auto":`${B}px`}},g,U?{style:U}:void 0,L?{style:{animationName:"none"}}:void 0],stateAttributesMapping:WO});return q?z:null});function q_({...e}){return b.jsx(I_,{"data-slot":"collapsible",...e})}function Y_({...e}){return b.jsx(__,{"data-slot":"collapsible-trigger",...e})}function G_({...e}){return b.jsx(K_,{"data-slot":"collapsible-content",...e})}const eA=v.createContext(void 0);function $_(e){const t=v.useContext(eA);if(t===void 0)throw new Error(bn(33));return t}const Yp=v.createContext(void 0);function Za(e){const t=v.useContext(Yp);if(t===void 0&&!e)throw new Error(bn(36));return t}const tA=v.createContext(void 0);function Gp(e=!0){const t=v.useContext(tA);if(t===void 0&&!e)throw new Error(bn(25));return t}const nA=v.createContext(null);function $p(e="root"){const t=v.useContext(nA),i=v.useContext(Yp);return t===null||i===void 0?null:(e==="submenu-trigger"?i.virtualFocus||i.parentVirtualFocus:i.virtualFocus)?t:null}const Q_={visible:!0,ref:null};function X_(){return Q_}function rA(e,t,i="root"){const a=$p(i),c=((i==="submenu-trigger"?a?.useSubmenuTrigger:a?.useItem)??X_)({label:e.label,children:e.children,render:e.render}),u=Wr(t,c.ref);return{visible:c.visible,ref:u,props:c.props}}function Z_(e){e.preventDefault()}function W_(e){const{closeOnClick:t,highlighted:i,id:a,nodeId:o,store:c,typingRef:u,itemRef:d,itemMetadata:f}=e,g=Za(),y=Gp(!0),h=f.type==="submenu-trigger",x=h?g.parentVirtualFocus:g.virtualFocus,E=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",i),{events:C}=c.useState("floatingTreeRoot"),w=c.useState("open"),R=y!==void 0,O=!x&&w&&i?0:-1;return v.useMemo(()=>({id:a,role:"menuitem",tabIndex:O,"aria-selected":E,onMouseDown:x?Z_:void 0,onKeyDown(A){A.key===" "&&u?.current&&A.preventDefault()},onMouseMove(A){o&&C.emit("itemhover",{nodeId:o,target:A.currentTarget})},onClick(A){t&&C.emit("close",{domEvent:A.nativeEvent,reason:Ao})},onMouseUp(A){if(y){const k=y.initialCursorPointRef.current;if(y.initialCursorPointRef.current=null,R&&k&&Math.abs(A.clientX-k.x)<=1&&Math.abs(A.clientY-k.y)<=1||R&&!hv&&A.button===2)return}d.current&&c.context.allowMouseUpTriggerRef.current&&(!R||A.button===2)&&f.type==="regular-item"&&ko(d.current,A,{detail:1,pointerType:"mouse"})}}),[t,O,a,C,o,c.context.allowMouseUpTriggerRef,u,d,y,R,f.type,E,x])}const iA={type:"regular-item"};function aA(e){const{closeOnClick:t,disabled:i,highlighted:a,id:o,store:c,typingRef:u=c.context.typingRef,nativeButton:d,itemMetadata:f,nodeId:g}=e,y=v.useRef(null),{getButtonProps:h,buttonRef:x}=Li({disabled:i,focusableWhenDisabled:!0,native:d,composite:!0}),S=W_({closeOnClick:t,highlighted:a,id:o,nodeId:g,store:c,typingRef:u,itemRef:y,itemMetadata:f}),E=v.useCallback(w=>kr(S,{onMouseEnter(R){f.type==="submenu-trigger"&&f.setActive(R.nativeEvent)}},w,h),[S,h,f]),C=Wr(y,x);return v.useMemo(()=>({getItemProps:E,itemRef:C}),[E,C])}const sA=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function J_(){return v.useContext(sA)}function Qp(e={}){const{guess:t,label:i,metadata:a,textRef:o,index:c}=e,{register:u,unregister:d,subscribeMapChange:f,nextIndexRef:g}=J_(),y=v.useRef(-1),[h,x]=v.useState(c==null&&t?()=>{if(y.current===-1){const w=g.current;g.current+=1,y.current=w}return y.current}:-1),S=c??h,E=v.useRef(null),C=v.useCallback(w=>{const R=E.current;R&&d(R),E.current=w,w&&u(w,{metadata:a??null,index:c??null,label:i,textRef:o})},[c,u,d,a,i,o]);return _e(()=>{if(c==null)return f(w=>{const R=E.current?w.get(E.current)?.index:null;R!=null&&x(R)})},[c,f]),{ref:C,index:S}}const e6="data-checked",t6="data-unchecked",oA={checked(e){return e?{[e6]:""}:{[t6]:""}},...xa},bb=v.createContext(void 0);function n6(){const e=v.useContext(bb);if(e===void 0)throw new Error(bn(31));return e}const r6=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,[d,f]=v.useState(void 0),g=At("div",t,{ref:i,props:{role:"group","aria-labelledby":d,...u}});return b.jsx(bb.Provider,{value:f,children:g})}),i6=v.forwardRef(function(t,i){const a=$p()?.Group??r6;return b.jsx(a,{...t,ref:i})}),a6=v.forwardRef(function(t,i){const{render:a,className:o,style:c,id:u,...d}=t,f=dr(u),g=n6();return _e(()=>(g(f),()=>{g(y=>y===f?void 0:y)}),[g,f]),At("div",t,{ref:i,props:{id:f,"aria-hidden":!0,...d}})}),s6=v.forwardRef(function(t,i){const{render:a,className:o,id:c,label:u,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!0,style:y,...h}=t,{store:x}=Za(),S=Qp({guess:!0,label:u}),E=dr(c),C=x.useState("disabled"),w=x.useState("isActive",S.index),R=x.useState("floatingNodeId"),O=x.useState("itemProps"),A=f||C,{getItemProps:k,itemRef:N}=aA({closeOnClick:g,disabled:A,highlighted:w,id:E,store:x,nativeButton:d,nodeId:R,itemMetadata:iA});return At("div",t,{state:{disabled:A,highlighted:w},props:[O,h,k],ref:[N,i,S.ref]})}),lA=v.forwardRef(function(t,i){const a=rA(t,i);return a.visible?b.jsx(s6,{...t,ref:a.ref}):null}),o6=v.createContext(void 0);function Xp(e){return v.useContext(o6)}const Ky="ArrowUp",qy="ArrowDown",Yy="ArrowLeft",Gy="ArrowRight",$y="Home",Qy="End",ud=new Set([Ky,qy,Yy,Gy,$y,Qy]),cA="Shift",l6=[cA,"Control","Alt","Meta"];function c6(e){return vn(e)&&e.tagName==="INPUT"}function Lw(e){return!!(c6(e)&&e.selectionStart!=null||vn(e)&&e.tagName==="TEXTAREA")}function zw(e,t,i,a){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,c=e.scrollTop;const u=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(u&&a!=="vertical"){const f=_w(e,t,"left"),g=rh(e),y=rh(t);i==="ltr"&&(f+t.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?o=f+t.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:f-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(o=f-y.scrollMarginLeft-g.scrollPaddingLeft)),i==="rtl"&&(f-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?o=f-y.scrollMarginLeft-g.scrollPaddingLeft:f+t.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(o=f+t.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&a!=="horizontal"){const f=_w(e,t,"top"),g=rh(e),y=rh(t);f-y.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?c=f-y.scrollMarginTop-g.scrollPaddingTop:f+t.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(c=f+t.offsetHeight+y.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:o,top:c,behavior:"auto"})}function _w(e,t,i){const a=i==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[a],t.offsetParent!==e);)t=t.offsetParent;return o}function rh(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const u6=v.createContext(void 0);function d6(){return v.useContext(u6)}function f6(e,t){const i=Mv(e.render);if(v.isValidElement(i)){const a=i.props;if(Object.hasOwn(a,"id"))return a.id??""}return e.id??t}function h6(e,t,i){const a=f6(e,t),o=a===t?void 0:a,c=v.useCallback(u=>i?.(u?o:void 0),[o,i]);return[a,c]}function p6(e,t,i){const a=Mv(e.render),o=v.isValidElement(a)?a.props:void 0,c=e["aria-label"]??o?.["aria-label"];let u=e["aria-labelledby"]??o?.["aria-labelledby"];return u==null&&!c&&(u=t?t.id||void 0:i||void 0),u}const g6=v.forwardRef(function(t,i){const{render:a,className:o,style:c,finalFocus:u,id:d,initialFocus:f,...g}=t,{store:y,defaultFloatingId:h,setRenderedFloatingId:x,virtualFocus:S,orientation:E}=Za(),C=d6(),{side:w,align:R}=$_(),O=Xp()!=null,A=y.useState("open"),k=y.useState("transitionStatus"),N=y.useState("popupProps"),j=y.useState("mounted"),D=y.useState("instantType"),M=y.useState("activeTriggerElement"),_=y.useState("parent"),L=y.useState("lastOpenChangeReason"),q=y.useState("rootId"),X=y.useState("floatingRootContext"),B=y.useState("floatingTreeRoot"),H=y.useState("closeDelay"),U=y.useState("hoverEnabled"),z=y.useState("disabled"),Q=y.useState("openMethod"),$=y.useState("activeTriggerId"),K=y.useState("listElement"),[Y,ee]=h6(t,h,x),G=p6(t,M,$),oe=_.type==="menu"?C:void 0,I=_.type==="context-menu";let V=f??_.type!=="menu";f===void 0&&K&&_.type!=="menu"&&(V=()=>y.state.activeIndex!==null?!1:K),Ii({open:A,ref:y.context.popupRef,onComplete(){A&&y.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function ve(Pe){y.setOpen(!1,ct(Pe.reason,Pe.domEvent))}return B.events.on("close",ve),()=>{B.events.off("close",ve)}},[B.events,y]),Fv(X,{enabled:U&&!z&&!I&&_.type!=="menubar",closeDelay:H});const J=y.useStateSetter("popupElement"),re=v.useContext(nA)?.useParentHandoff??y6,{parentVirtualFocusRef:we,handleFocus:le}=re(y,_,A,S),me={transitionStatus:k,side:w,align:R,open:A,nested:_.type==="menu",instant:D},ge=At("div",t,{state:me,ref:[i,y.context.popupRef,J,ee],stateAttributesMapping:gp,props:[N,{id:Y,...K?{role:"presentation"}:{role:"menu","aria-orientation":E==="horizontal"?"horizontal":void 0,"aria-labelledby":G},onKeyDown(ve){oe?.onPopupKeyDown?.(ve),O&&ud.has(ve.key)&&ve.stopPropagation()},onFocus:le},rd(k),g,{"data-rootownerid":q}]});let ue=_.type===void 0||I;(M||_.type==="menubar"&&L!==mp)&&(ue=!0);const Te=oe?.getReturnElement??we;return b.jsx(Ep,{context:X,openInteractionType:Q,modal:I,disabled:!j,returnFocus:u??Te??ue,explicitReturnFocus:u===void 0&&Te?!1:void 0,initialFocus:V,restoreFocus:!0,getInsideElements:_.type===void 0?()=>[y.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:_.type!=="menubar"?B:void 0,previousFocusableElement:M,nextFocusableElement:_.type===void 0?y.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.context.beforeContentFocusGuardRef,children:ge})}),m6={parentVirtualFocusRef:void 0,handleFocus:void 0};function y6(){return m6}const uA=v.forwardRef(function(t,i){const a=$p()?.Popup??g6;return b.jsx(a,{...t,ref:i})}),dA=v.createContext(void 0);function v6(){const e=v.useContext(dA);if(e===void 0)throw new Error(bn(32));return e}const fA=v.forwardRef(function(t,i){const{keepMounted:a=!1,...o}=t,{store:c,parent:u}=Za();if(!(c.useState("mounted")||a))return null;const g=u.type==="menu"||u.type==="menubar"?"group":void 0;return b.jsx(dA.Provider,{value:a,children:b.jsx(Sp,{ref:i,...o,portalOwnerRole:g})})});function xb(e){const{children:t,elementsRef:i,labelsRef:a,onMapChange:o}=e,c=Fe(o),[,u]=v.useState(0),d=er(x6).current,f=er(b6).current,g=v.useRef(0),y=v.useRef(!0),h=v.useRef(null),x=v.useRef(null),S=Fe(()=>{y.current||(y.current=!0,u(N=>N+1))}),E=Fe((N,j)=>{f.set(N,j),S()}),C=Fe(N=>{f.delete(N),S()}),w=Fe(N=>{const j=new Map;return i.current.length=0,a&&(a.current.length=0),N.forEach(D=>{j.set(D.element,{...D.registration.metadata??{},index:D.index}),i.current[D.index]=D.element,a&&(a.current[D.index]=D.registration.label!==void 0?D.registration.label:D.registration.textRef?.current?.textContent??D.element.textContent)}),g.current=i.current.length,j});function R(N){if(x.current?.disconnect(),x.current=null,typeof MutationObserver!="function"||N.length<2)return;const j=new MutationObserver(M=>{if(!w6(M))return;let _=null;for(const L of N)if(L.isConnected){if(_&&hA(_,L)>0){j.disconnect(),S();return}_=L}});x.current=j;const D=new Set;for(let M=1;M<N.length;M+=1){const _=E6(N[M-1],N[M]);_&&D.add(_)}D.forEach(M=>j.observe(M,{childList:!0}))}const O=Fe(()=>{const[N,j]=S6(f),D=w(N),M=h.current,_=!M||M.length!==N.length||N.some((L,q)=>{const X=M[q];return L.index!==X.index||L.element!==X.element||L.registration.index!==X.registration.index||L.registration.metadata!==X.registration.metadata});R(j),h.current=N,y.current=!1,_&&(d.forEach(L=>L(D)),c(D))});_e(()=>(!y.current&&h.current&&w(h.current),()=>{i.current=[],a&&(a.current=[])}),[i,a,w]),_e(()=>{y.current&&O()}),_e(()=>()=>{x.current?.disconnect(),y.current=!0},[]);const A=Fe(N=>(d.add(N),()=>{d.delete(N)})),k=v.useMemo(()=>({register:E,unregister:C,subscribeMapChange:A,nextIndexRef:g}),[E,C,A,g]);return b.jsx(sA.Provider,{value:k,children:t})}function b6(){return new Map}function x6(){return new Set}function S6(e){const t=new Set,i=[],a=[];e.forEach((c,u)=>{if(!u.isConnected)return;const d=c.index,f={index:d??-1,element:u,registration:c};d===null?a.push(f):d>=0&&(t.add(d),i.push(f))});let o=0;return a.sort((c,u)=>hA(c.element,u.element)),a.forEach(c=>{for(;t.has(o);)o+=1;c.index=o,i.push(c),o+=1}),t.size>0&&i.sort((c,u)=>c.index-u.index),[i,a.map(c=>c.element)]}function E6(e,t){let i=e.parentElement;for(;i&&!i.contains(t);)i=i.parentElement;return i}function w6(e){for(const t of e)for(let i=0;i<t.removedNodes.length;i+=1)if(t.removedNodes[i].isConnected)return!0;return!1}function hA(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Zp=v.forwardRef(function(t,i){const{cutout:a,...o}=t;let c;if(a){const u=a.getBoundingClientRect();c=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${u.left}px ${u.top}px,${u.left}px ${u.bottom}px,${u.right}px ${u.bottom}px,${u.right}px ${u.top}px,${u.left}px ${u.top}px)`}return b.jsx("div",{ref:i,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})});function pA(e){const{store:t,domReference:i,positionerElement:a,open:o}=e,c=v.useRef(null),u=v.useRef(null),d=wp(a);_e(()=>{o||(u.current?.abort(),u.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[o,t]),_e(()=>{const f=i,g=c.current;if(f&&(c.current=f),!g||!f||f===g||!t.select("open"))return;t.set("instantType",void 0);const y=new AbortController;return u.current=y,d(()=>{t.select("open")&&t.set("instantType","trigger-change")},y.signal),()=>{y.abort()}},[i,d,t])}let Uw={},Hw={},Fw="";function Wp(e,t){return $u(e)?e:t}function Bw(e,t,i){return/hidden|clip/.test(e.getComputedStyle(Wp(t,i)).overflowY)}function R6(e){if(typeof document>"u")return!1;const t=$t(e);return Rn(t).innerWidth-t.documentElement.clientWidth>0}function C6(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=$t(e),a=i.documentElement,o=i.body,c=Wp(a,o),u=c.style.overflowY,d=a.style.scrollbarGutter;a.style.scrollbarGutter="stable",c.style.overflowY="scroll";const f=c.offsetWidth;c.style.overflowY="hidden";const g=c.offsetWidth;return c.style.overflowY=u,a.style.scrollbarGutter=d,f===g}function T6(e){const t=$t(e),i=t.documentElement,a=t.body,o=Wp(i,a),c={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,c)}}function O6(e){const t=$t(e),i=t.documentElement,a=t.body,o=Rn(i);let c=0,u=0,d=!1;const f=Ar.create();if(ba&&(o.visualViewport?.scale??1)!==1)return()=>{};function g(){const S=o.getComputedStyle(i),E=o.getComputedStyle(a),R=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=i.scrollTop,u=i.scrollLeft,Uw={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},Fw=i.style.scrollBehavior,Hw={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};const O=i.scrollHeight>i.clientHeight,A=i.scrollWidth>i.clientWidth,k=S.overflowY==="scroll"||E.overflowY==="scroll",N=S.overflowX==="scroll"||E.overflowX==="scroll",j=Math.max(0,o.innerWidth-a.clientWidth),D=Math.max(0,o.innerHeight-a.clientHeight),M=parseFloat(E.marginTop)+parseFloat(E.marginBottom),_=parseFloat(E.marginLeft)+parseFloat(E.marginRight),L=Wp(i,a);if(d=C6(e),d){i.style.scrollbarGutter=R,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(i.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(O||k)&&(i.style.overflowY="scroll"),(A||N)&&(i.style.overflowX="scroll"),Object.assign(a.style,{position:"relative",height:M||D?`calc(100dvh - ${M+D}px)`:"100dvh",width:_||j?`calc(100vw - ${_+j}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),a.scrollTop=c,a.scrollLeft=u,i.setAttribute("data-base-ui-scroll-locked",""),i.style.scrollBehavior="unset"}function y(){Object.assign(i.style,Uw),Object.assign(a.style,Hw),d||(i.scrollTop=c,i.scrollLeft=u,i.removeAttribute("data-base-ui-scroll-locked"),i.style.scrollBehavior=Fw)}function h(){y(),f.request(g)}g();const x=Lt(o,"resize",h);return()=>{f.cancel(),y(),typeof o.removeEventListener=="function"&&x()}}class A6{lockCount=0;restore=null;timeoutLock=ji.create();timeoutUnlock=ji.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const i=$t(t),a=i.documentElement,o=i.body,c=Rn(a);if(Bw(c,a,o)){const d=new c.MutationObserver(()=>{Bw(c,a,o)||(d.disconnect(),this.restore=null,this.lock(t))}),f={attributes:!0};d.observe(a,f),d.observe(o,f),this.restore=()=>d.disconnect();return}const u=cp||!R6(t);this.restore=u?T6(t):O6(t)}}const k6=new A6;function gA(e=!0,t=null){_e(()=>{if(e)return k6.acquire(t)},[e,t])}const M6=20;function Sb(e,t,i,a){const[o,c]=v.useState(!1);_e(()=>{if(!e||!t||i==null){c(!1);return}const u=$t(i).documentElement.clientWidth,d=i.offsetWidth;c(u>0&&d>0&&d>=u-M6)},[e,t,i]),gA(e&&(!t||o),a)}const mA=v.forwardRef(function(t,i){const{anchor:a,positionMethod:o="absolute",className:c,render:u,side:d,align:f,sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:E=!1,disableAnchorTracking:C=!1,collisionAvoidance:w=gC,style:R,...O}=t,{store:A,virtualFocus:k,syncHighlightedItem:N}=Za(),j=v6(),D=Gp(!0),M=A.useState("parent"),_=A.useState("floatingRootContext"),L=A.useState("floatingTreeRoot"),q=A.useState("mounted"),X=A.useState("open"),B=A.useState("modal"),H=A.useState("openMethod"),U=A.useState("activeTriggerElement"),z=A.useState("transitionStatus"),Q=A.useState("positionerElement"),$=A.useState("instantType"),K=A.useState("adaptiveOrigin"),Y=A.useState("lastOpenChangeReason"),ee=A.useState("floatingNodeId"),G=A.useState("floatingParentNodeId"),oe=_.useState("domReferenceElement");let I=a,V=g,J=y,re=f,we=w;M.type==="context-menu"&&(I=a??M.context?.anchor,re=re??"start",!d&&re!=="center"&&(J=t.alignOffset??2,V=t.sideOffset??-5));let le=d,me=re;M.type==="menu"?(le=le??"inline-end",me=me??"start",we=t.collisionAvoidance??Nv):M.type==="menubar"&&(le=le??(M.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=M.type==="context-menu",ue=Pp({anchor:I,floatingRootContext:_,positionMethod:D?"fixed":o,mounted:q,side:le,sideOffset:V,align:me,alignOffset:J,arrowPadding:ge?0:S,collisionBoundary:h,collisionPadding:x,sticky:E,nodeId:ee,keepMounted:j,disableAnchorTracking:C,collisionAvoidance:we,shift:ge?{crossAxis:!("side"in we&&we.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:L,adaptiveOrigin:K,lazyFlip:k?"placement":!1});v.useEffect(()=>{function Ue(be){be.open&&(be.parentNodeId===ee&&A.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===A.select("floatingParentNodeId")&&A.setOpen(!1,ct(mu)))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[A,L.events,ee]),v.useEffect(()=>{if(A.select("floatingParentNodeId")==null)return;function Ue(be){if(be.open||be.nodeId!==A.select("floatingParentNodeId"))return;const He=be.reason??mu;A.setOpen(!1,ct(He))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[L.events,A]);const Te=Un();v.useEffect(()=>{X||Te.clear()},[X,Te]),v.useEffect(()=>{function Ue(be){if(!(!X||be.nodeId!==A.select("floatingParentNodeId")))if(be.target&&U&&U!==be.target){const He=A.select("closeDelay");He>0?Te.isStarted()||Te.start(He,()=>{A.setOpen(!1,ct(mu))}):A.setOpen(!1,ct(mu))}else Te.clear()}return L.events.on("itemhover",Ue),()=>{L.events.off("itemhover",Ue)}},[L.events,X,U,A,Te]),v.useEffect(()=>{const Ue={open:X,nodeId:ee,parentNodeId:G,reason:A.select("lastOpenChangeReason")};L.events.emit("menuopenchange",Ue)},[L.events,X,A,ee,G]),pA({store:A,domReference:oe,positionerElement:Q,open:X});const ve={open:X,side:ue.side,align:ue.align,anchorHidden:ue.anchorHidden,nested:M.type==="menu",instant:$},Pe=M.type==="menubar"&&M.context.modal;Sb(X&&(Pe||B&&Y!==Kn),H==="touch",Q,U);const Le=Lp(t,ve,{styles:ue.positionerStyles,transitionStatus:z,props:O,refs:[i,A.useStateSetter("positionerElement")],hidden:!q,inert:!X}),Be=q&&M.type!=="menu"&&(M.type!=="menubar"&&B&&Y!==Kn||M.type==="menubar"&&M.context.modal);let Oe=null;return M.type==="menubar"?Oe=M.context.contentElement:M.type===void 0&&(Oe=U),b.jsxs(eA.Provider,{value:ue,children:[Be&&b.jsx(Zp,{ref:M.type==="context-menu"||M.type==="nested-context-menu"?M.context.internalBackdropRef:null,inert:zp(!X),cutout:Oe}),b.jsx(EC,{id:ee,children:b.jsx(xb,{elementsRef:A.context.itemDomElements,labelsRef:A.context.itemLabels,onMapChange:N,children:Le})})]})}),yA=v.createContext(void 0);function N6(){const e=v.useContext(yA);if(e===void 0)throw new Error(bn(34));return e}const D6=v.forwardRef(function(t,i){const{render:a,className:o,value:c,defaultValue:u,onValueChange:d,disabled:f=!1,style:g,"aria-labelledby":y,...h}=t,[x,S]=v.useState(void 0),[E,C]=Ga({controlled:c,default:u,name:"MenuRadioGroup"}),w=Fe((k,N)=>{d?.(k,N),!N.isCanceled&&C(k)}),O=At("div",t,{state:{disabled:f},ref:i,props:{role:"group","aria-labelledby":y??x,"aria-disabled":f||void 0,...h}}),A=v.useMemo(()=>({value:E,setValue:w,disabled:f}),[E,w,f]);return b.jsx(bb.Provider,{value:S,children:b.jsx(yA.Provider,{value:A,children:O})})}),j6=v.memo(v.forwardRef(function(t,i){const a=$p()?.RadioGroup??D6;return b.jsx(a,{...t,ref:i})})),vA=v.createContext(void 0);function I6(){const e=v.useContext(vA);if(e===void 0)throw new Error(bn(35));return e}const P6=v.forwardRef(function(t,i){const{render:a,className:o,id:c,label:u,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!1,value:y,style:h,...x}=t,{store:S}=Za(),{value:E,setValue:C,disabled:w}=N6(),R=Qp({guess:!0,label:u}),O=dr(c),A=S.useState("isActive",R.index),k=S.useState("floatingNodeId"),N=S.useState("itemProps"),j=S.useState("disabled"),D=f||w||j,M=E===y,{getItemProps:_,itemRef:L}=aA({closeOnClick:g,disabled:D,highlighted:A,id:O,store:S,nativeButton:d,nodeId:k,itemMetadata:iA}),q=v.useMemo(()=>({disabled:D,highlighted:A,checked:M}),[D,A,M]);function X(H){const U=ct(Ao,H.nativeEvent,void 0,{preventUnmountOnClose:wn});C(y,U)}const B=At("div",t,{state:q,stateAttributesMapping:oA,props:[N,{role:"menuitemradio","aria-checked":M,onClick:X},x,_],ref:[L,i,R.ref]});return b.jsx(vA.Provider,{value:q,children:B})}),L6=v.forwardRef(function(t,i){const a=rA(t,i);return a.visible?b.jsx(P6,{...t,ref:a.ref}):null}),z6=v.forwardRef(function(t,i){const{render:a,className:o,style:c,keepMounted:u=!1,...d}=t,f=I6(),g=v.useRef(null),{transitionStatus:y,mounted:h,setMounted:x}=Po(f.checked);Ii({batch:!0,enabled:!f.checked,open:f.checked,ref:g,onComplete(){f.checked||x(!1)}});const S={checked:f.checked,disabled:f.disabled,highlighted:f.highlighted,transitionStatus:y};return At("span",t,{state:S,stateAttributesMapping:oA,ref:[i,g],props:{"aria-hidden":!0,...d},enabled:u||h})}),_6=v.createContext(null);function bA(e){return v.useContext(_6)}function U6(e){const t=v.useRef(""),i=v.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:v.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:i}}function cc(e,t){const i=v.useRef(e),a=Fe(t);_e(()=>{i.current!==e&&a(i.current),i.current=e},[e,a])}function xA(e,t){const i=Fe((c,u)=>{(typeof e=="function"?e():e)||t(u||(cp?"touch":""))}),{onClick:a,onPointerDown:o}=U6(i);return v.useMemo(()=>({onClick:a,onPointerDown:o}),[a,o])}function SA(e){const[t,i]=v.useState(null),a=xA(e,i);return cc(e,o=>{o&&!e&&i(null)}),v.useMemo(()=>({openMethod:t,triggerProps:a}),[t,a])}function H6(e){return e==null?Mr:e.type.startsWith("key")?BR:e.type.startsWith("mouse")||e.type.startsWith("pointer")?Bj:Mr}const F6={...Fa,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{const i=Fa.triggerPopupId(e,t);return i?e.listElement?.id||i:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>ba&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Fa.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class B6 extends ac{constructor(t,i,a=!1){const o=new nd,c=K6(o,i,a,t);super(c,V6(o),F6),this.observe("parent",u=>{u.type==="menu"?this.context.allowMouseUpTriggerRef=u.store.context.allowMouseUpTriggerRef:u.type!==void 0&&(this.context.allowMouseUpTriggerRef=u.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const t=this.state.parent;if(t.type!=="menu")return;let i=t.store.select("rootId"),a=t.store.select("floatingTreeRoot"),o=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{const c=t.store.select("rootId"),u=t.store.select("floatingTreeRoot"),d=t.store.select("keyboardEventRelay");i===c&&a===u&&o===d||(i=c,a=u,o=d,this.notifyAll())})}setOpen(t,i){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:i})}setActiveIndex(t,i,a){if(this.state.activeIndex!==t){const c=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=c?"none":i,this.context.highlightEvent=c?void 0:a}this.set("activeIndex",t)}highlightItem(t,i,a){const o=this.context.itemDomElements.current.indexOf(t);o>-1&&this.setActiveIndex(o,i,a)}}function V6(e){return{positionerRef:v.createRef(),popupRef:v.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function K6(e,t,i=!1,a){return{...Np(e,t,i),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Qt,inputProps:Qt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Dv,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Qt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...a}}const Vw=v.createContext(null);function EA(e,t){return(e===$i||e===Ao)&&t?.detail===0}function q6(e,t){return e===jh||EA(e,t)}const Y6=Yu(function(t){const{children:i,open:a,onOpenChange:o,onOpenChangeComplete:c,onItemHighlighted:u,defaultOpen:d=!1,disabled:f=!1,modal:g,loopFocus:y=!0,orientation:h="vertical",actionsRef:x,closeParentOnEsc:S=!1,handle:E,triggerId:C,defaultTriggerId:w=null,highlightItemOnHover:R=!0,isSubmenu:O=!1,virtualFocus:A=!1,virtualFocusRef:k,allowEscape:N=!0,resetOnPointerLeave:j=!0}=t,D=Gp(!0),M=Za(!0),_=bA(!0),L=M?.store,q=M?.virtualFocus??!1,X=v.useMemo(()=>O&&L?{type:"menu",store:L}:_?{type:"menubar",context:_}:D&&!L?{type:"context-menu",context:D}:{type:void 0},[D,L,_,O]),B=dr(),H=dr(),[U,z]=v.useState(void 0),Q=(U??H)||void 0,$=Vs(),K=X.type==="menu"?X.store:void 0,Y=(a??d)&&K?.state.transitionStatus==="starting",ee=er(()=>Y?K?.state.instantType:void 0).current,G=er(()=>{const Ie=new B6({open:d,openProp:a,activeTriggerId:w,triggerIdProp:C,parent:X,disabled:f,highlightItemOnHover:R,modal:X.type===void 0?g:void 0,rootId:B,instantType:ee},Q,$!=null);return Ie.context.virtualFocusRef=k,Ie}).current;G.useControlledProp("openProp",a),G.useControlledProp("triggerIdProp",C),G.useContextCallback("onOpenChangeComplete",c);const oe=G.useState("floatingTreeRoot"),I=jv(oe),V=G.useState("open"),J=G.useState("activeTriggerElement"),re=G.useState("positionerElement"),we=G.useState("hoverEnabled"),le=G.useState("disabled"),me=G.useState("lastOpenChangeReason"),ge=G.useState("parent"),ue=G.useState("activeIndex"),Te=G.useState("keyboardOpen"),ve=G.useState("payload"),Pe=G.useState("floatingParentNodeId"),Ae=v.useRef(null),Le=v.useRef(ge.type!=="context-menu"),Be=Un(),Oe=v.useRef(!0),Ue=Un(),be=Pe!=null,{openMethod:He,triggerProps:Ze}=SA(V);G.useSyncedValues({disabled:f,highlightItemOnHover:R,modal:ge.type===void 0?g:void 0,openMethod:He,rootId:B}),Op(G);const{forceUnmount:st,transitionStatus:de}=Ap(V,G,()=>{G.set("allowMouseEnter",!1)},Y),Ee=wp(G.context.popupRef);v.useEffect(()=>{if(ee===void 0)return;const Ie=()=>{G.state.instantType===ee&&G.set("instantType",void 0)};if(!V){Ie();return}if(de!==void 0)return;if(G.context.popupRef.current==null){Ie();return}const ze=new AbortController;return Ee(Ie,ze.signal),()=>{ze.abort()}},[ee,V,de,Ee,G]),_e(()=>{D&&!M?G.update({parent:{type:"context-menu",context:D},floatingNodeId:I,floatingParentNodeId:$}):(M||!G.select("activeTriggerElement"))&&G.update({floatingNodeId:I,floatingParentNodeId:$})},[D,M,I,$,J,G]),v.useEffect(()=>{if(V||(Ae.current=null),ge.type==="context-menu"){if(!V){Be.clear(),Le.current=!1;return}Be.start(500,()=>{Le.current=!0})}},[Be,V,ge.type]),_e(()=>{!V&&!we&&G.set("hoverEnabled",!0)},[V,we,G]);const Ge=Fe((Ie,ze)=>{const $e=ze.reason;if(!Ie&&!G.select("open")||V===Ie&&ze.trigger===J&&me===$e)return;const et=Tp(ze);if(!Ie&&ze.trigger==null&&(ze.trigger=J??void 0),o?.(Ie,ze),ze.isCanceled)return;G.state.floatingRootContext.dispatchOpenChange(Ie,ze);const Tt=ze.event;if(Ie===!1&&$e!==Ao&&Tt?.type==="click"&&Tt.pointerType==="touch"&&!Oe.current)return;Ie&&$e===zl?(Oe.current=!1,Ue.start(300,()=>{Oe.current=!0})):(Oe.current=!0,Ue.clear());const F=!Ie&&($e===Zu||$e==null);Ae.current=ze.event;const W=Cp(G.state,Ie,ze.trigger,et());W.openChangeReason=$e,W.keyboardOpen=Ie&&q6($e,Tt),ge.type==="menubar"&&($e===zl||$e===zs||$e===Kn||$e===jh||$e===mu)?W.instantType="group":EA($e,Tt)?W.instantType="click":F?W.instantType="dismiss":W.instantType=void 0,G.update(W)}),Me=RC({popupStore:G,floatingRootContext:G.state.floatingRootContext,floatingId:Q,nested:$!=null,onOpenChange:Ge}),De=Me.context.events;_e(()=>{const Ie=({open:ze,eventDetails:$e})=>Ge(ze,$e);return De.on("setOpen",Ie),()=>{De?.off("setOpen",Ie)}},[De,Ge]),_e(()=>G.subscribeToParentMenu(),[G]);const vt=v.useCallback(()=>{G.setOpen(!1,ct(Wu))},[G]);v.useImperativeHandle(x,()=>({unmount:st,close:vt}),[st,vt]);let dt;ge.type==="context-menu"&&(dt=ge.context),v.useImperativeHandle(dt?.positionerRef,()=>re,[re]),v.useImperativeHandle(dt?.actionsRef,()=>({setOpen:Ge}),[Ge]);const pt=ed(Me,{enabled:!le,bubbles:{escapeKey:S&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Ae.current?.type==="contextmenu"?!0:Le.current},externalTree:be?oe:void 0}),Mt=Ip(),jt=PC(Me,{enabled:!le,listRef:G.context.itemDomElements,activeIndex:ue,virtual:A,nested:ge.type==="menubar"||!A&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:y,focusItemOnOpen:A?Te:void 0,allowEscape:A&&y&&N,orientation:h,triggerOrientation:A?"vertical":h,rtl:Mt==="rtl",disabledIndices:Gi,onNavigate(Ie,ze){G.setActiveIndex(Ie,H6(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(A&&O),externalTree:!A&&be?oe:void 0,nestedReturnFocusRef:K?.context.virtualFocusRef,focusItemOnHover:R,resetOnPointerLeave:j}),en=v.useCallback(Ie=>{G.context.typingRef.current=Ie},[G]),an=LC(Me,{enabled:!le&&!A,listRef:G.context.itemLabels,elementsRef:G.context.itemDomElements,activeIndex:ue,resetMs:j4,onMatch:(Ie,ze)=>{V&&Ie!==ue&&G.setActiveIndex(Ie,BR,ze.nativeEvent)},onTyping:en}),tn=Fe(u),Je=v.useRef(-1),St=Fe(()=>{const Ie=G.state.activeIndex,ze=Ie===null?void 0:G.context.itemDomElements.current[Ie]??void 0;if(ze?.isConnected===!1)return;const $e=ze===void 0?-1:Ie;if(Je.current===$e&&G.context.reportedItem===ze)return;Je.current=$e,G.context.reportedItem=ze,A&&G.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Tt}=G.context;G.context.highlightReason=Mr,G.context.highlightEvent=void 0,u&&tn(ze,Fj(et,Tt,{label:ze===void 0?void 0:G.context.itemLabels.current[$e]??void 0}))});_e(()=>{St()},[ue,St]);const Xt=v.useMemo(()=>{if(!A)return jt.reference;if(!jt.trigger)return Qt;const{onFocus:Ie,...ze}=jt.trigger;return ze},[A,jt.reference,jt.trigger]);G.useSyncedValue("inputProps",A?jt.reference??Qt:Qt);const ht=v.useMemo(()=>{const Ie=kr(an.reference,Xt,pt.reference,{onMouseMove(){G.set("allowMouseEnter",!0)}},Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=V,Ie},[G,an.reference,Xt,pt.reference,Ze,V]),bt=v.useMemo(()=>{const Ie=kr(jt.trigger,pt.trigger,Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=!1,Ie},[jt.trigger,pt.trigger,Ze]);er(()=>(G.update({inactiveTriggerProps:bt}),null));const mt=v.useMemo(()=>kr(td,{onMouseMove(){G.set("allowMouseEnter",!0),ge.type==="menu"&&G.set("hoverEnabled",!1)},onClick(){G.select("hoverEnabled")&&G.set("hoverEnabled",!1)},onKeyDown(Ie){const ze=G.select("keyboardEventRelay");ze&&!Ie.isPropagationStopped()&&ze(Ie)}},an.floating,jt.floating,pt.floating),[ge.type,G,an.floating,jt.floating,pt.floating]),Ut=jt.item??Qt;kp(G,{floatingRootContext:Me,activeTriggerProps:ht,inactiveTriggerProps:bt,popupProps:mt,itemProps:Ut});const un=v.useMemo(()=>({store:G,parent:X,orientation:h,loopFocus:y,allowEscape:N,defaultFloatingId:H,setRenderedFloatingId:z,virtualFocus:A,parentVirtualFocus:q,syncHighlightedItem:St}),[G,X,h,y,N,H,A,q,St]),je=typeof i=="function"?i({payload:ve}):i;let at=b.jsxs(Yp.Provider,{value:un,children:[E&&b.jsx(Rp,{handle:E,store:G}),je]});return(ge.type===void 0||ge.type==="context-menu")&&(at=b.jsx(wC,{externalTree:oe,children:at})),at});function wA(e){const t=v.useContext(Vw);if(t===null)return b.jsx(Y6,{...e});const i=t.Root;return b.jsx(Vw.Provider,{value:null,children:b.jsx(i,{...t.options,...e})})}const ih=5;function RA(e,t){const i=G6(t);return e.clientX>=i.left-ih&&e.clientX<=i.right+ih&&e.clientY>=i.top-ih&&e.clientY<=i.bottom+ih}function G6(e){const t=e.getBoundingClientRect(),i=Rn(e);if(pv)return t;const a=i.getComputedStyle(e,"::before"),o=i.getComputedStyle(e,"::after");if(!(a.content!=="none"||o.content!=="none"))return t;const u=parseFloat(a.width)||0,d=parseFloat(a.height)||0,f=parseFloat(o.width)||0,g=parseFloat(o.height)||0,y=Math.max(t.width,u,f),h=Math.max(t.height,d,g),x=y-t.width,S=h-t.height;return{left:t.left-x/2,right:t.right+x/2,top:t.top-S/2,bottom:t.bottom+S/2}}function $6(e={}){const{highlightItemOnHover:t,highlightedIndex:i,onHighlightedIndexChange:a}=vb(),{ref:o,index:c}=Qp(e),u=i===c,d=v.useRef(null),f=Wr(o,d);return{compositeProps:{tabIndex:u?0:-1,onFocus(){a(c)},onMouseMove(){const y=d.current;if(!t||!y)return;const h=y.hasAttribute("disabled")||y.ariaDisabled==="true";!u&&!h&&y.focus()}},compositeRef:f,index:c}}function Eb(e){const{render:t,className:i,style:a,state:o=Qt,props:c=Gi,refs:u=Gi,metadata:d,stateAttributesMapping:f,tag:g="div",...y}=e,{compositeProps:h,compositeRef:x}=$6({metadata:d});return At(g,e,{state:o,ref:[x,...u],props:[h,...c,y],stateAttributesMapping:f})}function wb(e){if(vn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Va(e))return wb(Ya(e))}function Q6(e,t){function i(c,u,d){const f=c.currentTarget;ur.flushSync(()=>{e.setOpen(!1,ct(zs,c.nativeEvent,f))}),m4(f.isConnected?f:t.current,u,d)?.focus()}function a(c){i(c,-1,e.select("positionerElement"))}function o(c){const u=e.select("positionerElement");u&&Fl(c,u)?e.context.beforeContentFocusGuardRef.current?.focus():i(c,1,u)}return{handlePreFocusGuardFocus:a,handleFocusTargetFocus:o}}function X6(e){const{enabled:t=!0,mouseDownAction:i,open:a}=e,o=v.useRef(!1);return v.useMemo(()=>t?{onMouseDown:c=>{(i==="open"&&!a||i==="close"&&a)&&(o.current=!0,$t(c.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:c=>{o.current&&(o.current=!1,c.preventBaseUIHandler())}}:Qt,[t,i,a])}const Z6=dv(function(t,i){const{render:a,className:o,style:c,disabled:u=!1,nativeButton:d=!0,id:f,openOnHover:g,delay:y=100,closeDelay:h=0,handle:x,payload:S,...E}=t,C=Za(!0),R=_v(x)??C?.store;if(!R)throw new Error(bn(85));const O=dr(f),A=R.useState("isTriggerActive",O),k=R.useState("floatingRootContext"),N=R.useState("isOpenedByTrigger",O),j=R.useState("triggerControlsId",O),D=v.useRef(null),M=J6(),_=vb(!0),L=Ks(),q=v.useMemo(()=>L??new Dv,[L]),X=jv(q),B=Vs(),{registerTrigger:H,isMountedByThisTrigger:U}=zv(O,D,R,{payload:S,closeDelay:h,parent:M,floatingTreeRoot:q,floatingNodeId:X,floatingParentNodeId:B,keyboardEventRelay:_?.relayKeyboardEvent}),z=M.type==="menubar",Q=R.useState("disabled"),$=u||Q||z&&M.context.disabled,{getButtonProps:K,buttonRef:Y}=Li({disabled:$,native:d});v.useEffect(()=>{!N&&M.type===void 0&&(R.context.allowMouseUpTriggerRef.current=!1)},[R,N,M.type]);const ee=v.useRef(null),G=Un(),oe=Fe(Ue=>{if(!ee.current)return;G.clear(),R.context.allowMouseUpTriggerRef.current=!1;const be=Ue.target;it(ee.current,be)||it(R.select("positionerElement"),be)||be===ee.current||be!=null&&wb(be)===R.select("rootId")||RA(Ue,ee.current)||q.events.emit("close",{domEvent:Ue,reason:Ev})});v.useEffect(()=>{const Ue=$t(ee.current);if(N&&R.select("lastOpenChangeReason")===Kn)return Ue.addEventListener("mouseup",oe,{once:!0}),()=>{Ue.removeEventListener("mouseup",oe)}},[N,oe,R]);const I=z&&M.context.hasSubmenuOpen,J=IC(k,{enabled:(g??I)&&!$&&(!z||I&&!U),handleClose:zC({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:M.type===void 0?y:void 0,delay:{close:h},triggerElementRef:D,externalTree:q,isActiveTrigger:A,isClosing:()=>R.select("transitionStatus")==="ending"}),re=W6(N,R.select("lastOpenChangeReason")),we=Pv(k,{enabled:!$,event:N&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:M.type===void 0?re:!1}),le=DC(k,{enabled:!$&&I}),me=X6({open:N,enabled:z,mouseDownAction:"open"}),ge=v.useMemo(()=>kr(le.reference,we.reference),[le.reference,we.reference]),ue=R.useState("triggerProps",U),Te=R.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=Q6(R,D),Ae={disabled:$,open:N},Le=[ee,i,Y,H,D],Be=[ge,J??Qt,ue,{"aria-haspopup":"menu","aria-controls":j,id:O,onMouseDown:Ue=>{if(R.select("open"))return;G.start(200,()=>{R.context.allowMouseUpTriggerRef.current=!0}),$t(Ue.currentTarget).addEventListener("mouseup",oe,{once:!0})}},Te,z?{role:"menuitem"}:{},me,E,K],Oe=At("button",t,{enabled:!z,stateAttributesMapping:Mh,state:Ae,ref:Le,props:Be});return z?b.jsx(Eb,{tag:"button",render:a,className:o,style:c,state:Ae,refs:Le,props:Be,stateAttributesMapping:Mh}):N?b.jsxs(v.Fragment,{children:[b.jsx(Wl,{ref:R.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),b.jsx(v.Fragment,{children:Oe},O),b.jsx(Wl,{ref:R.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):b.jsx(v.Fragment,{children:Oe},O)});function W6(e,t){const i=Un(),[a,o]=v.useState(!1);return _e(()=>{e&&t===Kn?(o(!0),i.start(hC,()=>{o(!1)})):e||(i.clear(),o(!1))},[e,t,i]),a}function J6(){const e=bA();return v.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const eU=v.forwardRef(function(t,i){const{className:a,render:o,orientation:c="horizontal",style:u,...d}=t;return At("div",t,{state:{orientation:c},ref:i,props:[{role:"separator","aria-orientation":c},d]})});function CA(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Gh(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function tU(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function TA(e){return tU(e?.[0])}function nU(e){return TA(e)?e.flatMap(t=>t.items):e}function rU(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(TA(t)){for(const i of t)for(const a of i.items)if(a&&a.value==null&&a.label!=null)return!0;return!1}for(const i of t)if(i&&i.value==null&&i.label!=null)return!0;return!1}function OA(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Gh(e)}function Pl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Gh(e.value):Gh(e)}function AA(e,t,i){function a(){return OA(e,i)}if(i&&e!=null)return i(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??a();if(Array.isArray(t)){const c=nU(t);if(e==null||typeof e!="object"){const u=c.find(d=>d.value===e);return u&&u.label!=null?u.label:a()}if("value"in e){const u=c.find(d=>d&&d.value===e.value);if(u&&u.label!=null)return u.label}}return a()}function iU(e,t,i){return e.reduce((a,o,c)=>(c>0&&a.push(", "),a.push(b.jsx(v.Fragment,{children:AA(o,t,i)},c)),a),[])}function Uo({...e}){return b.jsx(wA,{"data-slot":"dropdown-menu",...e})}function Ho({...e}){return b.jsx(Z6,{"data-slot":"dropdown-menu-trigger",...e})}function Fo({align:e="start",alignOffset:t=0,side:i="bottom",sideOffset:a=4,className:o,...c}){return b.jsx(fA,{children:b.jsx(mA,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:i,sideOffset:a,children:b.jsx(uA,{"data-slot":"dropdown-menu-content",className:Ye("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",o),...c})})})}function kA({...e}){return b.jsx(i6,{"data-slot":"dropdown-menu-group",...e})}function MA({className:e,inset:t,...i}){return b.jsx(a6,{"data-slot":"dropdown-menu-label","data-inset":t,className:Ye("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...i})}function uc({className:e,inset:t,variant:i="default",...a}){return b.jsx(lA,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":i,className:Ye("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...a})}function aU({...e}){return b.jsx(j6,{"data-slot":"dropdown-menu-radio-group",...e})}function sU({className:e,children:t,inset:i,...a}){return b.jsxs(L6,{"data-slot":"dropdown-menu-radio-item","data-inset":i,className:Ye("relative flex min-h-7 cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...a,children:[b.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:b.jsx(z6,{children:b.jsx(Up,{})})}),t]})}function Rb(e){return At(e.defaultTagName??"div",e,e)}function NA(e){var t,i,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=NA(e[t]))&&(a&&(a+=" "),a+=i)}else for(i in e)e[i]&&(a&&(a+=" "),a+=i);return a}function oU(){for(var e,t,i=0,a="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=NA(e))&&(a&&(a+=" "),a+=t);return a}const Kw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qw=oU,dd=(e,t)=>i=>{var a;if(t?.variants==null)return qw(e,i?.class,i?.className);const{variants:o,defaultVariants:c}=t,u=Object.keys(o).map(g=>{const y=i?.[g],h=c?.[g];if(y===null)return null;const x=Kw(y)||Kw(h);return o[g][x]}),d=i&&Object.entries(i).reduce((g,y)=>{let[h,x]=y;return x===void 0||(g[h]=x),g},{}),f=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((g,y)=>{let{class:h,className:x,...S}=y;return Object.entries(S).every(E=>{let[C,w]=E;return Array.isArray(w)?w.includes({...c,...d}[C]):{...c,...d}[C]===w})?[...g,h,x]:g},[]);return qw(e,u,f,i?.class,i?.className)},cy=768;function DA(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const i=window.matchMedia(`(max-width: ${cy-1}px)`),a=()=>{t(window.innerWidth<cy)};return i.addEventListener("change",a),t(window.innerWidth<cy),()=>i.removeEventListener("change",a)},[]),!!e}const lU=v.forwardRef(function(t,i){const{render:a,className:o,disabled:c=!1,focusableWhenDisabled:u=!1,nativeButton:d=!0,style:f,...g}=t,{getButtonProps:y,buttonRef:h}=Li({disabled:c,focusableWhenDisabled:u,native:d});return At("button",t,{state:{disabled:c},ref:[i,h],props:[g,y]})}),jA=dd("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function ut({className:e,variant:t="default",size:i="default",...a}){return b.jsx(lU,{"data-slot":"button",className:Ye(jA({variant:t,size:i,className:e})),...a})}const cU="data-valid",uU="data-invalid",dU={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},fU={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},hU={disabled:!1,...fU},dc={valid(e){return e===null?null:e?{[cU]:""}:{[uU]:""}}},pU={invalid:void 0,name:void 0,validityData:{state:dU,errors:[],error:"",value:"",initialValue:null},setValidityData:wn,disabled:void 0,setTouched:wn,setDirty:wn,setFilled:wn,setFocused:wn,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:hU,registerFieldControl:wn,validation:{getValidationProps:(e,t=Qt)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:wn,getInputControl:()=>null,commit:async()=>{},change:wn}},gU=v.createContext(pU);function Wa(e=!0){const t=v.useContext(gU);if(t.setValidityData===wn&&!e)throw new Error(bn(28));return t}const mU=v.createContext(void 0);function yU(e=!1){const t=v.useContext(mU);if(!t&&!e)throw new Error(bn(86));return t}const vU=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:wn,validationMode:"onSubmit",submitCountRef:{current:0}});function fd(){return v.useContext(vU)}const bU=v.createContext({controlId:void 0,registerControlId:wn,resetControlId:wn,labelId:void 0,setLabelId:wn,messageIds:[],setMessageIds:wn,getDescriptionProps:e=>e});function Bo(){return v.useContext(bU)}function Cb(e,t,i,a=!0,o,c){const[u,d]=v.useState(),f=dr(o?`${o}-label`:void 0),g=!!c?.trim(),h=e??(g?void 0:t)??u;return _e(()=>{const x=e||t||g||!a?void 0:xU(i.current,f);u!==x&&d(x)}),h}function xU(e,t){const i=SU(e);if(i)return!i.id&&t&&(i.id=t),i.id||void 0}function SU(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const i=e.id;if(i){const o=e.nextElementSibling;if(o&&o.htmlFor===i)return o}const a=e.labels;return a&&a[0]}function fc(e={}){const{id:t,enabled:i=!0}=e,{controlId:a,registerControlId:o,resetControlId:c}=Bo(),u=dr(),d=er(()=>Symbol()),f=v.useRef(!1),g=v.useRef(!1),y=Fe(()=>{!f.current||o===wn||(f.current=!1,o(d.current,void 0))});return _e(()=>{if(!i||o===wn){y();return}let h;if(t!==void 0)g.current=!0,h=t;else if(g.current)h=u;else{c();return}if(h===void 0){y();return}f.current=!0,o(d.current,h)},[t,i,o,c,u,d,y]),_e(()=>y,[y]),(i?a:void 0)??t??u}function EU(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}const wU=v.createContext({disabled:!1});function IA(){return v.useContext(wU)}function hd(e,t,i){const{setFocused:a,focusOwnerRef:o}=Wa(),c=Fe(u=>{(u?!e:o.current===c)&&(o.current=u&&c,a(u))});return _e(()=>{const u=t.current;return u?.getRootNode()?.activeElement===u&&c(!0),()=>c(!1)},[e,t,c]),c}function pd(e,t,i,a,o=!0,c){const{registerFieldControl:u}=Wa(),d=er(()=>Symbol());_e(()=>{const f=d.current;if(!o){u(f,void 0);return}u(f,{controlRef:e,getValue:a,id:t,name:c,value:i})},[e,o,a,t,c,u,d,i]),_e(()=>{const f=d.current;return()=>{u(f,void 0)}},[u,d])}const RU=v.forwardRef(function(t,i){const{render:a,className:o,id:c,name:u,value:d,disabled:f=!1,onValueChange:g,defaultValue:y,autoFocus:h=!1,style:x,...S}=t,{state:E,name:C,disabled:w,setTouched:R,setDirty:O,validityData:A,setFilled:k,validationMode:N,validation:j}=Wa(),{clearErrors:D,elementRef:M,submitCountRef:_}=fd(),L=w||f,q=C??u,X={...E,disabled:L},{labelId:B}=Bo(),H=fc({id:c}),U=d!==void 0,z=d==null?void 0:String(d),Q=Fe(()=>j.inputRef.current?.value);pd(j.inputRef,H,z,Q,!L,u),_e(()=>{const G=z??j.inputRef.current?.value;G!==void 0&&k(G!=="")},[z,y,j.inputRef,k]),cc(z,()=>{z!==void 0&&(D(q),O(z!==(A.initialValue??"")),j.change(z))});const $=v.useRef(null),K=hd(L,$),Y=Un();return At("input",t,{ref:[i,$],state:X,props:[{id:H,disabled:L,name:q,ref:j.inputRef,"aria-labelledby":B,autoFocus:h,...U?{value:d}:{defaultValue:y},onChange(G){const oe=G.currentTarget.value,I=ct(Mr,G.nativeEvent);g?.(oe,I),!U&&(O(oe!==(A.initialValue??"")),k(oe!==""),!G.nativeEvent.defaultPrevented&&!I.isCanceled&&(D(q),j.change(oe)))},onFocus(){K(!0)},onBlur(G){if(R(!0),K(!1),N==="onBlur"){const oe=G.currentTarget.value;j.commit(oe),U&&queueMicrotask(()=>{const I=j.inputRef.current?.value;I!==void 0&&I!==oe&&I!==(A.initialValue??"")&&j.commit(I)})}},onKeyDown(G){if(G.currentTarget.tagName==="INPUT"&&G.key==="Enter"){R(!0);const oe=G.currentTarget.value,I=G.currentTarget.form;if(I&&I===M.current&&!G.defaultPrevented){const V=G.currentTarget,J=_.current;Y.start(0,()=>{_.current===J&&j.commit(V.value)})}else j.commit(oe)}}},S,G=>j.getValidationProps(L,G)],stateAttributesMapping:dc})}),CU=v.forwardRef(function(t,i){return b.jsx(RU,{ref:i,...t})});function Jp({className:e,type:t,...i}){return b.jsx(CU,{type:t,"data-slot":"input",className:Ye("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...i})}function PA({className:e,orientation:t="horizontal",...i}){return b.jsx(eU,{"data-slot":"separator",orientation:t,className:Ye("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...i})}const LA=v.createContext(void 0);function Ys(e){const t=v.useContext(LA);if(!e&&t===void 0)throw new Error(bn(27));return t}const zA=v.forwardRef(function(t,i){const{render:a,className:o,style:c,forceRender:u=!1,...d}=t,f=Ys(),g=f.useState("open"),y=f.useState("nested"),h=f.useState("mounted"),x=f.useState("transitionStatus");return At("div",t,{state:{open:g,transitionStatus:x},ref:[f.context.backdropRef,i],stateAttributesMapping:gp,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:u||!y})}),eg=v.forwardRef(function(t,i){const{render:a,className:o,style:c,disabled:u=!1,nativeButton:d=!0,...f}=t,g=Ys(),y=g.useState("open"),{getButtonProps:h,buttonRef:x}=Li({disabled:u,native:d}),S={disabled:u};function E(C){y&&g.setOpen(!1,ct(FR,C.nativeEvent))}return At("button",t,{state:S,ref:[i,x],props:[{onClick:E},f,h]})}),_A=v.forwardRef(function(t,i){const{render:a,className:o,style:c,id:u,...d}=t,f=Ys(),g=dr(u);return f.useSyncedValueWithCleanup("descriptionElementId",g),At("p",t,{ref:i,props:[{id:g},d]})}),UA=v.createContext(void 0);function TU(){const e=v.useContext(UA);if(e===void 0)throw new Error(bn(26));return e}const OU="--nested-dialogs",AU="data-nested-dialog-open",kU={...Qu,...xa,nestedDialogOpen(e){return e?{[AU]:""}:null}},HA=v.forwardRef(function(t,i){const{render:a,className:o,style:c,finalFocus:u,initialFocus:d,...f}=t,g=Ys(),y=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),x=g.useState("floatingRootContext"),S=g.useState("popupProps"),E=g.useState("modal"),C=g.useState("mounted"),w=g.useState("nested"),R=g.useState("nestedOpenDialogCount"),O=g.useState("open"),A=g.useState("openMethod"),k=g.useState("titleElementId"),N=g.useState("transitionStatus"),j=g.useState("role"),D=x.useState("floatingId");TU(),Ii({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const M=d===void 0?TC(g.context.popupRef):d,_=R>0,L=g.useStateSetter("popupElement"),X=At("div",t,{state:{open:O,nested:w,transitionStatus:N,nestedDialogOpen:_},props:[S,{id:D,"aria-labelledby":k,"aria-describedby":y,role:j,...td,hidden:!C,onKeyDown(B){ud.has(B.key)&&B.stopPropagation()},style:{[OU]:R}},f],ref:[i,g.context.popupRef,L],stateAttributesMapping:kU});return b.jsx(Ep,{context:x,openInteractionType:A,disabled:!C,closeOnFocusOut:!h,initialFocus:M,returnFocus:u,modal:E!==!1,restoreFocus:"popup",children:X})}),FA=v.forwardRef(function(t,i){const{keepMounted:a=!1,...o}=t,c=Ys(),u=c.useState("mounted"),d=c.useState("modal"),f=c.useState("open");return u||a?b.jsx(UA.Provider,{value:a,children:b.jsxs(Sp,{ref:i,...o,children:[u&&d===!0&&b.jsx(Zp,{ref:c.context.internalBackdropRef,inert:zp(!f)}),t.children]})}):null});function MU({store:e,parentContext:t,isDrawer:i}){const a=e.useState("open"),o=e.useState("mounted"),c=e.useState("disablePointerDismissal"),u=e.useState("modal"),d=e.useState("popupElement"),f=e.useState("floatingRootContext"),[g,y]=v.useState(0),[h,x]=v.useState(0),S=g===0,E=ed(f,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(C){if(!e.context.outsidePressEnabledRef.current||"button"in C&&C.button!==0)return!1;if("touches"in C){if(C.type==="touchend"){if(C.changedTouches.length!==1||C.touches.length!==0)return!1}else if(C.touches.length!==1)return!1}const w=tr(C);if(S&&!c){if(u){const R=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return R||O?R===w||O===w||it(w,d)&&!w?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return gA(a&&u===!0,d),e.useContextCallback("onNestedDialogOpen",(C,w)=>{!e.select("open")&&!e.select("mounted")||(y(C),x(w))}),_e(()=>{!a&&!o&&(y(0),x(0))},[a,o]),_e(()=>(t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(g+1,h+(i?1:0)),()=>{t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(0,0)}),[i,a,g,h,t]),kp(e,{activeTriggerProps:E.reference,inactiveTriggerProps:E.trigger,popupProps:E.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const NU={...Fa,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class DU extends ac{constructor(t,i,a){const o=new nd,c=jU(t,o,i,a);super(c,IU(o),NU)}setOpen=(t,i)=>{i.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&i.trigger==null&&this.state.activeTriggerId!=null&&(i.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,i),!i.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,i),this.update(Cp(this.state,t,i.trigger)))}}function jU(e,t,i,a=!1){return{...Np(t,i,a),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function IU(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function PU(e,t){const{children:i,open:a,defaultOpen:o=!1,onOpenChange:c,onOpenChangeComplete:u,disablePointerDismissal:d=!1,modal:f=!0,actionsRef:g,handle:y,triggerId:h,defaultTriggerId:x=null}=t,S=e==="drawer",E=f,C=d,w="dialog",R=Ys(!0),O=R!=null,A={modal:E,disablePointerDismissal:C,nested:O,role:w},k=Lv((L,q)=>new DU({open:o,openProp:a,activeTriggerId:x,triggerIdProp:h,...A},L,q),!0);k.useControlledProp("openProp",a),k.useControlledProp("triggerIdProp",h),k.useSyncedValues(A),k.useContextCallback("onOpenChange",c),k.useContextCallback("onOpenChangeComplete",u);const N=k.useState("open"),j=k.useState("mounted"),D=k.useState("payload");OC(k,N),Op(k);const{forceUnmount:M}=Ap(N,k);v.useImperativeHandle(g,()=>({unmount:M,close:()=>k.setOpen(!1,ct(Wu))}),[M,k]);const _=N||j||y!=null;return b.jsxs(LA.Provider,{value:k,children:[y&&b.jsx(Rp,{handle:y,store:k}),_&&b.jsx(MU,{store:k,parentContext:R?.context,isDrawer:S}),typeof i=="function"?i({payload:D}):i]})}const BA=Yu(function(t){return PU("dialog",t)}),VA=v.forwardRef(function(t,i){const{render:a,className:o,style:c,id:u,...d}=t,f=Ys(),g=dr(u);return f.useSyncedValueWithCleanup("titleElementId",g),At("h2",t,{ref:i,props:[{id:g},d]})}),LU=dv(function(t,i){const{render:a,className:o,style:c,disabled:u=!1,nativeButton:d=!0,id:f,payload:g,handle:y,...h}=t,x=Ys(!0),E=_v(y)??x;if(!E)throw new Error(bn(79));const C=dr(f),w=E.useState("floatingRootContext"),R=E.useState("isOpenedByTrigger",C),O=E.useState("triggerPopupId",C),A=v.useRef(null),{registerTrigger:k,isMountedByThisTrigger:N}=zv(C,A,E,{payload:g}),{getButtonProps:j,buttonRef:D}=Li({disabled:u,native:d}),M=Pv(w),_=xA(()=>E.select("open"),X=>{E.set("openMethod",X)}),L={disabled:u,open:R},q=E.useState("triggerProps",N);return At("button",t,{state:L,ref:[D,i,k,A],props:[M.reference,q,_,{[pC]:"",id:C,"aria-haspopup":"dialog","aria-expanded":R,"aria-controls":O},h,j],stateAttributesMapping:Sv})}),Rt=e=>typeof e=="string",gu=()=>{let e,t;const i=new Promise((a,o)=>{e=a,t=o});return i.resolve=e,i.reject=t,i},ah=e=>e==null?"":String(e),zU=(e,t,i)=>{e.forEach(a=>{t[a]&&(i[a]=t[a])})},_U=/###/g,Yw=e=>e&&e.includes("###")?e.replace(_U,"."):e,Gw=e=>!e||Rt(e),Ou=(e,t,i)=>{const a=Rt(t)?t.split("."):t;let o=0;for(;o<a.length-1;){if(Gw(e))return{};const c=Yw(a[o]);!e[c]&&i&&(e[c]=new i),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++o}return Gw(e)?{}:{obj:e,k:Yw(a[o])}},$w=(e,t,i)=>{const{obj:a,k:o}=Ou(e,t,Object);if(a!==void 0||t.length===1){a[o]=i;return}let c=t[t.length-1],u=t.slice(0,t.length-1),d=Ou(e,u,Object);for(;d.obj===void 0&&u.length;)c=`${u[u.length-1]}.${c}`,u=u.slice(0,u.length-1),d=Ou(e,u,Object),d?.obj&&typeof d.obj[`${d.k}.${c}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${c}`]=i},UU=(e,t,i,a)=>{const{obj:o,k:c}=Ou(e,t,Object);o[c]=o[c]||[],o[c].push(i)},$h=(e,t)=>{const{obj:i,k:a}=Ou(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,a))return i[a]},HU=(e,t,i)=>{const a=$h(e,i);return a!==void 0?a:$h(t,i)},KA=(e,t,i)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,a)?Rt(e[a])||e[a]instanceof String||Rt(t[a])||t[a]instanceof String?i&&(e[a]=t[a]):KA(e[a],t[a],i):e[a]=t[a]);return e},_a=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),FU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},BU=e=>Rt(e)?e.replace(/[&<>"'\/]/g,t=>FU[t]):e;class VU{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(i!==void 0)return i;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const KU=[" ",",","?","!",";"],qU=new VU(20),YU=(e,t,i)=>{t=t||"",i=i||"";const a=KU.filter(u=>!t.includes(u)&&!i.includes(u));if(a.length===0)return!0;const o=qU.getRegExp(`(${a.map(u=>u==="?"?"\\?":u).join("|")})`);let c=!o.test(e);if(!c){const u=e.indexOf(i);u>0&&!o.test(e.substring(0,u))&&(c=!0)}return c},Xy=(e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const a=t.split(i);let o=e;for(let c=0;c<a.length;){if(!o||typeof o!="object")return;let u,d="";for(let f=c;f<a.length;++f)if(f!==c&&(d+=i),d+=a[f],u=o[d],(typeof u=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(o,d)&&(u=void 0),u!==void 0){if(["string","number","boolean"].includes(typeof u)&&f<a.length-1)continue;c+=f-c+1;break}o=u}return o},nc=e=>e?.replace(/_/g,"-"),GU={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Qh{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||GU,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,a,o){return o&&!this.debug?null:(t=t.map(c=>Rt(c)?c.replace(/[\r\n\x00-\x1F\x7F]/g," "):c),Rt(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new Qh(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Qh(this.logger,t)}}var pa=new Qh;class tg{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const o=this.observers[a].get(i)||0;this.observers[a].set(i,o+1)}),this}off(t,i){if(this.observers[t]){if(!i){delete this.observers[t];return}this.observers[t].delete(i)}}once(t,i){const a=(...o)=>{i(...o),this.off(t,a)};return this.on(t,a),this}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,c])=>{for(let u=0;u<c;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,c])=>{for(let u=0;u<c;u++)o(t,...i)})}}const Qw=new WeakSet;class Xw extends tg{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,a,o={}){const c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.includes(".")?d=t.split("."):(d=[t,i],a&&(Array.isArray(a)?d.push(...a):Rt(a)&&c?d.push(...a.split(c)):d.push(a)));const f=$h(this.data,d);return f==null&&!i&&!a&&t.includes(".")&&(t=d[0],i=d[1],a=d.slice(2).join(".")),f!=null||!u||!Rt(a)?f:Xy(this.data?.[t]?.[i],a,c)}addResource(t,i,a,o,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let d=[t,i];a&&(d=d.concat(u?a.split(u):a)),t.includes(".")&&(d=t.split("."),o=i,i=d[1]),this.addNamespaces(i),$w(this.data,d,o),c.silent||this.emit("added",t,i,a,o)}addResources(t,i,a,o={silent:!1}){for(const c in a)(Rt(a[c])||Array.isArray(a[c]))&&this.addResource(t,i,c,a[c],{silent:!0});o.silent||this.emit("added",t,i,a)}addResourceBundle(t,i,a,o,c,u={silent:!1,skipCopy:!1}){let d=[t,i];t.includes(".")&&(d=t.split("."),o=a,a=i,i=d[1]),this.addNamespaces(i);let f=$h(this.data,d)||{};u.skipCopy||(a=JSON.parse(JSON.stringify(a))),o?KA(f,a,c):f={...f,...a},$w(this.data,d,f),u.silent||this.emit("added",t,i,a)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return this.getResource(t,i)!==void 0}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find(o=>{const c=i[o];return Qw.has(c)?!0:!c||Object.keys(c).length===0?!1:(typeof c=="object"&&Qw.add(c),!0)})}toJSON(){return this.data}}var qA={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,a,o){return e.forEach(c=>{t=this.processors[c]?.process(t,i,a,o)??t}),t}};const YA=Symbol("i18next/PATH_KEY");function $U(){const e=[],t=Object.create(null);let i;return t.get=(a,o)=>(i?.revoke?.(),o===YA?e:(e.push(o),i=Proxy.revocable(a,t),i.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ls(e,t){const{[YA]:i}=e($U()),a=t?.keySeparator??".",o=t?.nsSeparator??":",c=t?.enableSelector==="strict";if(i.length>1&&o){const u=t?.ns,d=c?Array.isArray(u)?u:u?[u]:null:Array.isArray(u)?u:null;if(d&&(c?d:d.length>1?d.slice(1):[]).includes(i[0]))return`${i[0]}${o}${i.slice(1).join(a)}`}return i.join(a)}const uy=e=>!Rt(e)&&typeof e!="boolean"&&typeof e!="number";class Xh extends tg{constructor(t,i={}){super(),zU(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=pa.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const a={...i};if(t==null)return!1;const o=this.resolve(t,a);if(o?.res===void 0)return!1;const c=uy(o.res);return!(a.returnObjects===!1&&c)}extractFromKey(t,i){let a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let c=i.ns||this.options.defaultNS||[];const u=a&&t.includes(a),d=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!YU(t,a,o);if(u&&!d){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:Rt(c)?[c]:c};const g=t.split(a);(a!==o||a===o&&this.options.ns.includes(g[0]))&&(c=g.shift()),t=g.join(o)}return{key:t,namespaces:Rt(c)?[c]:c}}translate(t,i,a){let o=typeof i=="object"?{...i}:i;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Ls(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(B=>typeof B=="function"?Ls(B,{...this.options,...o}):String(B));const c=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:d,namespaces:f}=this.extractFromKey(t[t.length-1],o),g=f[f.length-1];let y=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const h=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return x?c?{res:`${g}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:`${g}${y}${d}`:c?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:d;const S=this.resolve(t,o);let E=S?.res;const C=S?.usedKey||d,w=S?.exactUsedKey||d,R=["[object Number]","[object Function]","[object RegExp]"],O=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,k=o.count!==void 0&&!Rt(o.count),N=Xh.hasDefaultValue(o),j=k?this.pluralResolver.getSuffix(h,o.count,o):"",D=o.ordinal&&k?this.pluralResolver.getSuffix(h,o.count,{ordinal:!1}):"",M=k&&!o.ordinal&&o.count===0,_=M&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${j}`]||o[`defaultValue${D}`]||o.defaultValue;let L=E;A&&!E&&N&&(L=_);const q=uy(L),X=Object.prototype.toString.apply(L);if(A&&L&&q&&!R.includes(X)&&!(Rt(O)&&Array.isArray(L))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,L,{...o,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return c?(S.res=B,S.usedParams=this.getUsedParamsDetails(o),S):B}if(u){const B=Array.isArray(L),H=B?[]:{},U=B?w:C;for(const z in L)if(Object.prototype.hasOwnProperty.call(L,z)){const Q=`${U}${u}${z}`;N&&!E?H[z]=this.translate(Q,{...o,defaultValue:uy(_)?_[z]:void 0,joinArrays:!1,ns:f}):H[z]=this.translate(Q,{...o,joinArrays:!1,ns:f}),H[z]===Q&&(H[z]=L[z])}E=H}}else if(A&&Rt(O)&&Array.isArray(E))E=E.join(O),E&&(E=this.extendTranslation(E,t,o,S,a));else{let B=!1,H=!1;!this.isValidLookup(E)&&N&&(B=!0,E=_),this.isValidLookup(E)||(H=!0,E=d);const z=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:E,Q=N&&_!==E&&this.options.updateMissing;if(H||B||Q){if(this.logger.log(Q?"updateKey":"missingKey",h,g,k&&!Q?`${d}${this.pluralResolver.getSuffix(h,o.count,o)}`:d,Q?_:E),u){const ee=this.resolve(d,{...o,keySeparator:!1});ee&&ee.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let ee=0;ee<K.length;ee++)$.push(K[ee]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(o.lng||this.language):$.push(o.lng||this.language);const Y=(ee,G,oe)=>{const I=N&&oe!==E?oe:z;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,G,I,Q,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,G,I,Q,o),this.emit("missingKey",ee,g,G,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?$.forEach(ee=>{const G=this.pluralResolver.getSuffixes(ee,o);M&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!G.includes(`${this.options.pluralSeparator}zero`)&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(oe=>{Y([ee],d+oe,o[`defaultValue${oe}`]||_)})}):Y($,d,_))}E=this.extendTranslation(E,t,o,S,a),H&&E===d&&this.options.appendNamespaceToMissingKey&&(E=`${g}${y}${d}`),(H||B)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${y}${d}`:d,B?E:void 0,o))}return c?(S.res=E,S.usedParams=this.getUsedParamsDetails(o),S):E}extendTranslation(t,i,a,o,c){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const f=Rt(t)&&(a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(f){const h=t.match(this.interpolator.nestingRegexp);g=h&&h.length}let y=a.replace&&!Rt(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,a.lng||this.language||o.usedLng,a),f){const h=t.match(this.interpolator.nestingRegexp),x=h&&h.length;g<x&&(a.nest=!1)}!a.lng&&o&&o.res&&(a.lng=this.language||o.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>c?.[0]===h[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${i[0]}`),null):this.translate(...h,i),a)),a.interpolation&&this.interpolator.reset()}const u=a.postProcess||this.options.postProcess,d=Rt(u)?[u]:u;return t!=null&&d?.length&&a.applyPostProcessor!==!1&&(t=qA.handle(d,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t,i={}){let a,o,c,u,d;return Rt(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(f=>typeof f=="function"?Ls(f,{...this.options,...i}):f)),t.forEach(f=>{if(this.isValidLookup(a))return;const g=this.extractFromKey(f,i),y=g.key;o=y;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const x=i.count!==void 0&&!Rt(i.count),S=x&&!i.ordinal&&i.count===0,E=i.context!==void 0&&(Rt(i.context)||typeof i.context=="number")&&i.context!=="",C=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);h.forEach(w=>{this.isValidLookup(a)||(d=w,!this.checkedLoadedFor[`${C[0]}-${w}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${w}`]=!0,this.logger.warn(`key "${o}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(R=>{if(this.isValidLookup(a))return;u=R;const O=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,y,R,w,i);else{let k;x&&(k=this.pluralResolver.getSuffix(R,i.count,i));const N=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(i.ordinal&&k.startsWith(j)&&O.push(y+k.replace(j,this.options.pluralSeparator)),O.push(y+k),S&&O.push(y+N)),E){const D=`${y}${this.options.contextSeparator||"_"}${i.context}`;O.push(D),x&&(i.ordinal&&k.startsWith(j)&&O.push(D+k.replace(j,this.options.pluralSeparator)),O.push(D+k),S&&O.push(D+N))}}let A;for(;A=O.pop();)this.isValidLookup(a)||(c=A,a=this.getResource(R,w,A,i))}))})}),{res:a,usedKey:o,exactUsedKey:c,usedLng:u,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,a,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,a,o):this.resourceStore.getResource(t,i,a,o)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!Rt(t.replace);let o=a?t.replace:t;if(a&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!a){o={...o};for(const c of i)delete o[c]}return o}static hasDefaultValue(t){const i="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&a.startsWith(i)&&t[a]!==void 0)return!0;return!1}}class Zw{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pa.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=nc(t),!t||!t.includes("-"))return null;const i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(t){if(t=nc(t),!t||!t.includes("-"))return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(Rt(t)&&t.includes("-")){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach(a=>{if(i)return;const o=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(o))&&(i=o)}),!i&&this.options.supportedLngs&&t.forEach(a=>{if(i)return;const o=this.getScriptPartFromCode(a);if(this.isSupportedCode(o))return i=o;const c=this.getLanguagePartFromCode(a);if(this.isSupportedCode(c))return i=c;i=this.options.supportedLngs.find(u=>u===c?!0:!u.includes("-")&&!c.includes("-")?!1:!!(u.includes("-")&&!c.includes("-")&&u.slice(0,u.indexOf("-"))===c))}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),Rt(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let a=t[i];return a||(a=t[this.getScriptPartFromCode(i)]),a||(a=t[this.formatLanguageCode(i)]),a||(a=t[this.getLanguagePartFromCode(i)]),a||(a=t.default),a||[]}toResolveHierarchy(t,i){const a=this.options.fallbackLng,o=Array.isArray(a)?a.join("|"):a;o!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=o);const c=i===void 0||i===!1||Rt(i),u=i===void 0&&typeof this.options.fallbackLng=="function",d=Rt(t)&&c&&!u;let f=null;if(d){let x;i===void 0?x="undefined":i===!1?x="boolean:false":x=`string:${i}`,f=`${t.length}:${t}|${x}`}if(f!==null){const x=this.resolveHierarchyCache[f];if(x!==void 0)return x.slice()}const g=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],t),y=[],h=x=>{x&&(this.isSupportedCode(x)?y.push(x):this.logger.warn(`rejecting language code not found in supportedLngs: ${x}`))};return Rt(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(t))):Rt(t)&&h(this.formatLanguageCode(t)),g.forEach(x=>{const S=this.formatLanguageCode(x);y.includes(S)||h(S)}),f!==null?(this.resolveHierarchyCache[f]=y,y.slice()):y}}const Ww={zero:0,one:1,two:2,few:3,many:4,other:5},Jw={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class QU{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=pa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const a=nc(t==="dev"?"en":t),o=i.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:a,type:o});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(a,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Jw;if(!t.match(/-|_/))return Jw;const f=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(f,i)}return this.pluralRulesCache[c]=u,u}needsPlural(t,i={}){let a=this.getRule(t,i);return a||(a=this.getRule("dev",i)),a?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,a={}){return this.getSuffixes(t,a).map(o=>`${i}${o}`)}getSuffixes(t,i={}){let a=this.getRule(t,i);return a||(a=this.getRule("dev",i)),a?a.resolvedOptions().pluralCategories.sort((o,c)=>Ww[o]-Ww[c]).map(o=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,i,a={}){const o=this.getRule(t,a);return o?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${o.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,a))}}const eR=(e,t,i,a=".",o=!0)=>{let c=HU(e,t,i);return!c&&o&&Rt(i)&&(c=Xy(e,i,a),c===void 0&&(c=Xy(t,i,a))),c};class tR{constructor(t={}){this.logger=pa.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:a,useRawValueToEscape:o,prefix:c,prefixEscaped:u,suffix:d,suffixEscaped:f,formatSeparator:g,unescapeSuffix:y,unescapePrefix:h,nestingPrefix:x,nestingPrefixEscaped:S,nestingSuffix:E,nestingSuffixEscaped:C,nestingOptionsSeparator:w,maxReplaces:R,alwaysFormat:O}=t.interpolation;this.escape=i!==void 0?i:BU,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=c?_a(c):u||"{{",this.suffix=d?_a(d):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":h?_a(h):"-",this.unescapeSuffix=this.unescapePrefix?"":y?_a(y):"",this.nestingPrefix=x?_a(x):S||_a("$t("),this.nestingSuffix=E?_a(E):C||_a(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=R||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(i,a)=>i?.source===a?(i.lastIndex=0,i):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,i,a,o){let c,u,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const A=eR(i,f,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(A,void 0,a,{...o,...i,interpolationkey:C}):A}const w=C.split(this.formatSeparator),R=w.shift().trim(),O=w.join(this.formatSeparator).trim();return this.format(eR(i,f,R,this.options.keySeparator,this.options.ignoreJSONStructure),O,a,{...o,...i,interpolationkey:R})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const y=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],S=[];let E=0;return x.forEach(C=>{for(d=0;c=C.regex.exec(t);){const w=c.index-E,R=S.find(([k,N])=>w>=k&&w<N);if(R){C.regex.lastIndex=R[1]+E;continue}const O=c[1].trim();if(u=g(O),u===void 0)if(typeof y=="function"){const k=y(t,c,o);u=Rt(k)?k:""}else if(o&&Object.prototype.hasOwnProperty.call(o,O))u="";else if(h){u=c[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${t}`),u="";else!Rt(u)&&!this.useRawValueToEscape&&(u=ah(u));const A=ah(C.safeValue(u));if(t=t.slice(0,c.index)+A+t.slice(c.index+c[0].length),h?(C.regex===this.regexpUnescape?S.push([c.index,c.index+A.length]):E+=A.length-c[0].length,C.regex.lastIndex+=A.length,C.regex.lastIndex-=c[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,i,a={}){let o,c,u;const d=(h,x)=>{const S=this.nestingOptionsSeparator;if(!h.includes(S))return h;const E=h.split(new RegExp(`${_a(S)}[ ]*{`));let C=`{${E[1]}`;h=E[0],C=this.interpolate(C,u);const w=C.match(/'/g),R=C.match(/"/g);((w?.length??0)%2===0&&!R||(R?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{u=JSON.parse(C),x&&(u={...x,...u})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${S}${C}`}return u.defaultValue&&u.defaultValue.includes(this.prefix)&&delete u.defaultValue,h},f=new RegExp(this.nestingRegexp);let g="",y=0;for(;o=f.exec(t);){let h=[];u={...a},u=u.replace&&!Rt(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const x=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(x!==-1&&(h=o[1].slice(x).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),o[1]=o[1].slice(0,x)),c=i(d.call(this,o[1].trim(),u),u),c&&o[0]===t&&!Rt(c))return c;Rt(c)||(c=ah(c)),c||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),c=""),h.length&&(c=h.reduce((S,E)=>this.format(S,E,a.lng,{...a,interpolationkey:o[1].trim()}),c.trim())),g+=t.slice(y,o.index)+ah(c),y=f.lastIndex,this.regexp.lastIndex=0}return y?g+t.slice(y):t}}const XU=e=>{let t=e.toLowerCase().trim();const i={};if(e.includes("(")){const a=e.split("(");t=a[0].toLowerCase().trim();const o=a[1].slice(0,-1);t==="currency"&&!o.includes(":")?i.currency||(i.currency=o.trim()):t==="relativetime"&&!o.includes(":")?i.range||(i.range=o.trim()):o.split(";").forEach(u=>{if(u){const[d,...f]=u.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();i[y]||(i[y]=g),g==="false"&&(i[y]=!1),g==="true"&&(i[y]=!0),isNaN(g)||(i[y]=parseInt(g,10))}})}return{formatName:t,formatOptions:i}},nR=e=>{const t={};return(i,a,o)=>{let c=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(c={...c,[o.interpolationkey]:void 0});let u;try{u=a+JSON.stringify(c)}catch{return e(nc(a),o)(i)}let d=t[u];return d||(d=e(nc(a),o),t[u]=d),d(i)}},ZU=e=>(t,i,a)=>e(nc(i),a)(t);class WU{constructor(t={}){this.logger=pa.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const a=i.cacheInBuiltFormats?nR:ZU;this.formats={number:a((o,c)=>{const u=new Intl.NumberFormat(o,{...c});return d=>u.format(d)}),currency:a((o,c)=>{const u=new Intl.NumberFormat(o,{...c,style:"currency"});return d=>u.format(d)}),datetime:a((o,c)=>{const u=new Intl.DateTimeFormat(o,{...c});return d=>u.format(d)}),relativetime:a((o,c)=>{const u=new Intl.RelativeTimeFormat(o,{...c});return d=>u.format(d,c.range||"day")}),list:a((o,c)=>{const u=new Intl.ListFormat(o,{...c});return d=>u.format(d)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=nR(i)}format(t,i,a,o={}){if(!i||t==null)return t;const c=i.split(this.formatSeparator),u=[];for(let f=0;f<c.length;f++){let g=c[f];for(;g.indexOf("(")>-1&&!g.includes(")")&&f+1<c.length;)g=`${g}${this.formatSeparator}${c[++f]}`;u.push(g)}return u.reduce((f,g)=>{const{formatName:y,formatOptions:h}=XU(g);if(this.formats[y]){let x=f;try{const S=o?.formatParams?.[o.interpolationkey]||{},E=S.locale||S.lng||o.locale||o.lng||a;x=this.formats[y](f,E,{...h,...o,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${y}`);return f},t)}}const JU=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class e8 extends tg{constructor(t,i,a,o={}){super(),this.backend=t,this.store=i,this.services=a,this.languageUtils=a.languageUtils,this.options=o,this.logger=pa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(a,o.backend,o)}queueLoad(t,i,a,o){const c={},u={},d={},f={};return t.forEach(g=>{let y=!0;i.forEach(h=>{const x=`${g}|${h}`;!a.reload&&this.store.hasResourceBundle(g,h)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?u[x]===void 0&&(u[x]=!0):(this.state[x]=1,y=!1,u[x]===void 0&&(u[x]=!0),c[x]===void 0&&(c[x]=!0),f[h]===void 0&&(f[h]=!0)))}),y||(d[g]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(t,i,a){const o=t.split("|"),c=o[0],u=o[1];i&&this.emit("failedLoading",c,u,i),!i&&a&&this.store.addResourceBundle(c,u,a,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&a&&(this.state[t]=0);const d={};this.queue.forEach(f=>{UU(f.loaded,[c],u),JU(f,t),i&&f.errors.push(i),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{d[g]||(d[g]={});const y=f.loaded[g];y.length&&y.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(f=>!f.done)}read(t,i,a,o=0,c=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:a,tried:o,wait:c,callback:u});return}this.readingCalls++;const d=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(g&&y&&o<this.maxRetries){setTimeout(()=>{this.read(t,i,a,o+1,c*2,u)},c);return}u(g,y)},f=this.backend[a].bind(this.backend);if(f.length===2){try{const g=f(t,i);g&&typeof g.then=="function"?g.then(y=>d(null,y)).catch(d):d(null,g)}catch(g){d(g)}return}return f(t,i,d)}prepareLoading(t,i,a={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Rt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Rt(i)&&(i=[i]);const c=this.queueLoad(t,i,a,o);if(!c.toLoad.length)return c.pending.length||o(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(t,i,a){this.prepareLoading(t,i,{},a)}reload(t,i,a){this.prepareLoading(t,i,{reload:!0},a)}loadOne(t,i=""){const a=t.split("|"),o=a[0],c=a[1];this.read(o,c,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${i}loading namespace ${c} for language ${o} failed`,u),!u&&d&&this.logger.log(`${i}loaded namespace ${c} for language ${o}`,d),this.loaded(t,u,d)})}saveMissing(t,i,a,o,c,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(i)){this.logger.warn(`did not save key "${a}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend?.create){const f={...u,isUpdate:c},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(t,i,a,o,f):y=g(t,i,a,o),y&&typeof y.then=="function"?y.then(h=>d(null,h)).catch(d):d(null,y)}catch(y){d(y)}else g(t,i,a,o,d,f)}!t||!t[0]||this.store.addResource(t[0],i,a,o)}}}const dy=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Rt(e[1])&&(t.defaultValue=e[1]),Rt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(a=>{t[a]=i[a]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rR=e=>(Rt(e.ns)&&(e.ns=[e.ns]),Rt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Rt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),sh=()=>{},t8=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})};class Au extends tg{constructor(t={},i){if(super(),this.options=rR(t),this.services={},this.logger=pa,this.modules={external:[]},t8(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(Rt(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const a=dy();this.options={...a,...this.options,...rR(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=a.overloadTranslationOptionHandler);const o=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?pa.init(o(this.modules.logger),this.options):pa.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=WU;const y=new Zw(this.options);this.store=new Xw(this.options.resources,this.options);const h=this.services;h.logger=pa,h.resourceStore=this.store,h.languageUtils=y,h.pluralResolver=new QU(y,{prepend:this.options.pluralSeparator}),g&&(h.formatter=o(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new tR(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new e8(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Xh(this.services,this.options),this.translator.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,i||(i=sh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...y)=>this.store[g](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...y)=>(this.store[g](...y),this)});const d=gu(),f=()=>{const g=(y,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(h),i(y,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),d}loadResources(t,i=sh){let a=i;const o=Rt(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const c=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(c.includes(g)||c.push(g))})};o?u(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(c,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(d)})}else a(null)}reloadResources(t,i,a){const o=gu();return typeof t=="function"&&(a=t,t=void 0),typeof i=="function"&&(a=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),a||(a=sh),this.services.backendConnector.reload(t,i,c=>{o.resolve(),a(c)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&qA.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let i=0;i<this.languages.length;i++){const a=this.languages[i];if(!["cimode","dev"].includes(a)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const a=gu();this.emit("languageChanging",t);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},c=(d,f)=>{f?this.isLanguageChangingTo===t&&(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,a.resolve((...g)=>this.t(...g)),i&&i(d,(...g)=>this.t(...g))},u=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const f=Rt(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(Rt(d)?[d]:d);g&&(this.language||o(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,y=>{c(y,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),a}getFixedT(t,i,a,o){const c=o?.scopeNs,u=(d,f,...g)=>{let y;typeof f!="object"?y=this.options.overloadTranslationOptionHandler([d,f].concat(g)):y={...f},y.lng=y.lng||u.lng,y.lngs=y.lngs||u.lngs;const h=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||u.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||a||u.keyPrefix);const x={...this.options,...y};Array.isArray(c)&&!h&&(x.ns=c),typeof y.keyPrefix=="function"&&(y.keyPrefix=Ls(y.keyPrefix,x));const S=this.options.keySeparator||".";let E;return y.keyPrefix&&Array.isArray(d)?E=d.map(C=>(typeof C=="function"&&(C=Ls(C,x)),`${y.keyPrefix}${S}${C}`)):(typeof d=="function"&&(d=Ls(d,x)),E=y.keyPrefix?`${y.keyPrefix}${S}${d}`:d),this.t(E,y)};return Rt(t)?u.lng=t:u.lngs=t,u.ns=i,u.keyPrefix=a,u}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=i.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const u=(g,y)=>{const h=this.services.backendConnector.state[`${g}|${y}`];return h===-1||h===0||h===2};if(i.precheck){const g=i.precheck(this,u);if(g!==void 0)return g}if(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,f=i.lng?d.isSupportedCode(a)&&d.toResolveHierarchy(a,!1)[0]:a;return!!((!f||u(f,t))&&(!o||u(c,t)))}loadNamespaces(t,i){const a=gu();return this.options.ns?(Rt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{a.resolve(),i&&i(o)}),a):(i&&i(),Promise.resolve())}loadLanguages(t,i){const a=gu();Rt(t)&&(t=[t]);const o=this.options.preload||[],c=t.filter(u=>!o.includes(u)&&this.services.languageUtils.isSupportedCode(u));return c.length?(this.options.preload=o.concat(c),this.loadResources(u=>{a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const c=o.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services?.languageUtils||new Zw(dy());return t.toLowerCase().indexOf("-latn")>1?"ltr":i.includes(a.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const a=new Au(t,i);return a.createInstance=Au.createInstance,a}cloneInstance(t={},i=sh){const a=t.forkResourceStore;a&&delete t.forkResourceStore;const o={...this.options,preload:!1,...t,isClone:!0},c=new Au(o);if((t.debug!==void 0||t.prefix!==void 0)&&(c.logger=c.logger.clone(t)),["store","services","language"].forEach(d=>{c[d]=this[d]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},a){const d=g=>{const y=Array.isArray(g)?[...g]:{...g};return Object.keys(y).forEach(h=>{y[h]&&typeof y[h]=="object"&&(y[h]=d(y[h]))}),y},f=d(this.store.data);c.store=new Xw(f,o),c.services.resourceStore=c.store}if(t.interpolation){const f={...dy().interpolation,...this.options.interpolation,...t.interpolation},g={...o,interpolation:f};c.services.interpolator=new tR(g)}return c.translator=new Xh(c.services,o),c.translator.on("*",(d,...f)=>{c.emit(d,...f)}),c.init(o,i),c.translator.options=o,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const fr=Au.createInstance();fr.createInstance;fr.dir;fr.init;fr.loadResources;fr.reloadResources;fr.use;fr.changeLanguage;fr.getFixedT;fr.t;fr.exists;fr.setDefaultNamespace;fr.hasLoadedNamespace;fr.loadNamespaces;fr.loadLanguages;const n8={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},r8=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function iR(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=e.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(t.name=i[1],(n8[i[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){const c=e.indexOf("-->");return{type:"comment",comment:c!==-1?e.slice(4,c):""}}const a=new RegExp(r8);let o=null;for(;o=a.exec(e),o!==null;)if(o[0].trim())if(o[1]){const c=o[1].trim();let u=[c,null];const d=c.indexOf("=");d>-1&&(u=[c.slice(0,d),c.slice(d+1)]),t.attrs[u[0]]=u[1],a.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}const oh=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,i8=/<\/?([^\s]+?)[/\s>]/,a8=/^\s*$/,s8=/^(script|style)$/i,xu="\0",o8=Object.create(null);function GA(e){e.forEach(function(t){if(t.type==="text"){t.content=t.content.split(xu).join("<");return}if(t.type==="comment"){t.comment=t.comment.split(xu).join("<");return}for(const i in t.attrs){const a=t.attrs[i];typeof a=="string"&&a.indexOf(xu)>-1&&(t.attrs[i]=a.split(xu).join("<"))}t.children.length&&GA(t.children)})}function l8(e,t){const i=t&&t.components||o8,a=t&&t.allowedTags;let o=!1;if(a){const E=typeof a=="function"?a:function(O){return a.indexOf(O)>-1};let C="",w=0;oh.lastIndex=0;let R;for(;R=oh.exec(e);){const O=R[0];C+=e.slice(w,R.index);const A=O.match(i8);O.startsWith("<!--")||A&&E(A[1])?(C+=O,w=R.index+O.length):(o=!0,C+=xu,w=R.index+1,oh.lastIndex=w)}e=C+e.slice(w)}const c=[],u=[];let d,f=-1,g=!1,y=0,h;if(e.indexOf("<")!==0){const E=e.indexOf("<");c.push({type:"text",content:E===-1?e:e.substring(0,E)})}const x=[];let S;for(;S=oh.exec(e);)x.push(S);return x.forEach(function(E,C){const w=E[0];if(!w||w.startsWith("<!--"))return;let R=0,O=0,A=-1,k=null;for(let j=0;j<w.length;j++){const D=w.charAt(j);k?D===k&&(k=null):D==='"'||D==="'"?k=D:D==="<"?(R++,R===2&&(A=j)):D===">"&&O++}const N=A>-1&&/[a-zA-Z0-9\-!/]/.test(w.charAt(A+1));if(R>O&&N){const j=w.substring(0,A),D=w.substring(j.length);x[C][0]=D,x[C].index+=j.length}}),x.forEach(function(E,C){const w=E[0];if(!w)return;const R=E.index;if(R<y)return;if(g){if(w!=="</"+d.name+">")return;g=!1}const O=w.charAt(1)!=="/",A=w.startsWith("<!--"),k=R+w.length,N=e.charAt(k),j=x[C+1];let D;if(N==="<"&&j){const _=e.substring(k,j.index);D=_.split("<").length>_.split(">").length}let M;if(A){const _=iR(w);if(f<0)return c.push(_),c;M=u[f],M.children.push(_);const L=e.slice(k,j?j.index:void 0);return L.length>0&&M.children.push({type:"text",content:L}),c}if(O){f++,d=iR(w),d.type==="tag"&&i[d.name]&&(d.type="component",g=!0);let _=!1;if(!g&&!d.voidElement&&s8.test(d.name)){_=!0,h||(h=e.toLowerCase());const L=h.indexOf("</"+d.name.toLowerCase()+">",k),q=L===-1?e.length:L,X=e.slice(k,q);X&&d.children.push({type:"text",content:X}),y=q}!d.voidElement&&!g&&!_&&N&&N!=="<"&&d.children.push({type:"text",content:e.slice(k,j?j.index:void 0)}),f===0&&c.push(d),M=u[f-1],M&&M.children.push(d),u[f]=d}if((!O||d.voidElement)&&(f>-1&&(d.voidElement||d.name===w.slice(2,-1))&&(f--,d=f===-1?c:u[f]),!g&&(N!=="<"||D)&&N)){M=f===-1?c:u[f].children;const _=j?j.index:-1;let L=e.slice(k,_===-1?void 0:_);a8.test(L)&&(L=" "),(_>-1&&f+M.length>=0||L!==" ")&&M.push({type:"text",content:L})}}),o&&GA(c),c}function c8(e){const t=[];for(const i in e)e[i]===null?t.push(i):t.push(i+'="'+String(e[i]).replace(/"/g,"&quot;")+'"');return t.length?" "+t.join(" "):""}function $A(e,t){switch(t.type){case"text":return e+t.content;case"tag":{const i=t.voidElement&&t.name.toLowerCase()!=="!doctype"?"/>":">";return e+="<"+t.name+(t.attrs?c8(t.attrs):"")+i,t.voidElement?e:e+t.children.reduce($A,"")+"</"+t.name+">"}case"comment":return e+="<!--"+t.comment+"-->",e}}function u8(e){return e.reduce(function(t,i){return t+$A("",i)},"")}var d8={parse:l8,stringify:u8};const wh=(e,t,i,a)=>{const o=[i,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Zr(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},aR={},Yl=(e,t,i,a)=>{Zr(i)&&aR[i]||(Zr(i)&&(aR[i]=new Date),wh(e,t,i,a))},QA=(e,t)=>()=>{if(e.isInitialized)t();else{const i=()=>{setTimeout(()=>{e.off("initialized",i)},0),t()};e.on("initialized",i)}},Zy=(e,t,i)=>{e.loadNamespaces(t,QA(e,i))},sR=(e,t,i,a)=>{if(Zr(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Zy(e,i,a);i.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,QA(e,a))},f8=(e,t,i={})=>!t.languages||!t.languages.length?(Yl(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:i.lng,precheck:(a,o)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}),Zr=e=>typeof e=="string",ha=e=>typeof e=="object"&&e!==null,h8=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p8={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},g8=e=>p8[e],XA=e=>e.replace(h8,g8);let Wy={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:XA,transDefaultProps:void 0};const m8=(e={})=>{Wy={...Wy,...e}},Tb=()=>Wy;let ZA;const y8=e=>{ZA=e},Ob=()=>ZA,Rh=(e,t)=>{if(!e)return!1;const i=e.props?.children??e.children;return t?i.length>0:!!i},Su=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Ha(t):t},v8=e=>Ha(e).every(v.isValidElement),Ha=e=>Array.isArray(e)?e:[e],b8=(e,t)=>{const i={...t};return i.props={...t.props,...e.props},i},x8=e=>{const t={};if(!e)return t;const i=a=>{Ha(a).forEach(c=>{Zr(c)||(Rh(c)?i(Su(c)):ha(c)&&!v.isValidElement(c)&&Object.assign(t,c))})};return i(e),t},Jy=(e,t,i,a)=>{if(!e)return"";let o="";const c=Ha(e),u=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return c.forEach((d,f)=>{if(Zr(d)){o+=`${d}`;return}if(v.isValidElement(d)){const{props:g,type:y}=d,h=Object.keys(g).length,x=u.indexOf(y)>-1,S=g.children;if(!S&&x&&!h){o+=`<${y}/>`;return}if(!S&&(!x||h)||g.i18nIsDynamicList){o+=`<${f}></${f}>`;return}if(x&&h<=1){const C=Zr(S)?S:Jy(S,t,i,a);o+=`<${y}>${C}</${y}>`;return}const E=Jy(S,t,i,a);o+=`<${f}>${E}</${f}>`;return}if(d===null){wh(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:a});return}if(ha(d)){const{format:g,...y}=d,h=Object.keys(y);if(h.length===1){const x=g?`${h[0]}, ${g}`:h[0];o+=`{{${x}}}`;return}if(!h.length&&Object.keys(d).length===1&&"format"in d){o+="{{format}}";return}wh(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:a,child:d});return}wh(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:a,child:d})}),o},S8=(e,t,i,a,o,c,u)=>{if(i==="")return[];const d=o.transKeepBasicHtmlNodesFor||[],f=i&&new RegExp(d.map(A=>`<${A}`).join("|")).test(i);if(!e&&!t&&!f&&!u)return[i];const g=t??{},y=A=>{Ha(A).forEach(N=>{Zr(N)||(Rh(N)?y(Su(N)):ha(N)&&!v.isValidElement(N)&&Object.assign(g,N))})};y(e);const h=Object.keys(g),x=A=>/^\d+$/.test(A)||d.indexOf(A)>-1||h.indexOf(A)>-1,S=d8.parse(`<0>${i}</0>`,{allowedTags:x}),E={...g,...c},C=(A,k,N)=>{const j=Su(A),D=R(j,k.children,N);return v8(j)&&D.length===0||A.props?.i18nIsDynamicList?j:D},w=(A,k,N,j,D)=>{A.dummy?(A.children=k,N.push(v.cloneElement(A,{key:j},D?void 0:k))):N.push(...v.Children.map([A],M=>{if(M.type===v.Fragment||M.props?.i18nIsDynamicList!==void 0){const L={key:j};return M&&M.props&&Object.keys(M.props).forEach(q=>{q==="children"||q==="i18nIsDynamicList"||(L[q]=M.props[q])}),v.createElement(M.type,L,D?null:k)}const _={key:j};return M&&M.props&&Object.keys(M.props).forEach(L=>{L==="ref"||L==="children"||(_[L]=M.props[L])}),v.cloneElement(M,_,D?null:k)}))},R=(A,k,N)=>{const j=Ha(A),D=Ha(k),M={};return D.reduce((_,L,q)=>{const X=L.children?.[0]?.content&&a.services.interpolator.interpolate(L.children[0].content,E,a.language);if(L.type==="tag"){let B=j[parseInt(L.name,10)];!B&&t&&(B=t[L.name]),N.length===1&&!B&&ha(N[0])&&(B=N[0][L.name]),B||(B={});const H={...L.attrs};u&&Object.keys(H).forEach(Y=>{const ee=H[Y];Zr(ee)&&(H[Y]=XA(ee))});const U=Object.keys(H).length!==0?b8({props:H},B):B,z=v.isValidElement(U),Q=z&&Rh(L,!0)&&!L.voidElement,$=f&&ha(U)&&U.dummy&&!z,K=ha(t)&&Object.hasOwnProperty.call(t,L.name);if(Zr(U)){const Y=a.services.interpolator.interpolate(U,E,a.language);_.push(Y)}else if(Rh(U)||Q){const Y=C(U,L,N);w(U,Y,_,q)}else if($){const Y=R(j,L.children,N);w(U,Y,_,q)}else if(Number.isNaN(parseFloat(L.name)))if(K){const Y=C(U,L,N);w(U,Y,_,q,L.voidElement)}else if(o.transSupportBasicHtmlNodes&&d.indexOf(L.name)>-1)if(L.voidElement)_.push(v.createElement(L.name,{key:`${L.name}-${q}`}));else{const Y=M[L.name]||0;M[L.name]=Y+1;let ee,G=0;for(let V=0;V<j.length;V+=1){const J=j[V];if(v.isValidElement(J)&&J.type===L.name){if(G===Y){ee=J;break}G+=1}}const oe=ee?Ha(Su(ee)):j,I=R(oe,L.children,N);_.push(v.createElement(L.name,{key:`${L.name}-${q}`},I))}else if(L.voidElement)_.push(`<${L.name} />`);else{const Y=R(j,L.children,N);_.push(`<${L.name}>${Y}</${L.name}>`)}else if(ha(U)&&!z){const Y=L.children[0]?X:null;Y&&_.push(Y)}else w(U,X,_,q,L.children.length!==1||!X)}else if(L.type==="text"){const B=o.transWrapTextNodes,H=typeof o.unescape=="function"?o.unescape:Tb().unescape,U=u?H(a.services.interpolator.interpolate(L.content,E,a.language)):a.services.interpolator.interpolate(L.content,E,a.language);B?_.push(v.createElement(B,{key:`${L.name}-${q}`},U)):_.push(U)}return _},[])},O=R([{dummy:!0,children:e||[]}],S,Ha(e||[]));return Su(O[0])},WA=(e,t,i)=>{const a=e.key||t,o=v.cloneElement(e,{key:a});if(!o.props||!o.props.children||i.indexOf(`${t}/>`)<0&&i.indexOf(`${t} />`)<0)return o;function c(){return v.createElement(v.Fragment,null,o)}return v.createElement(c,{key:a})},E8=(e,t)=>e.map((i,a)=>WA(i,a,t)),w8=(e,t)=>{const i={};return Object.keys(e).forEach(a=>{Object.assign(i,{[a]:WA(e[a],a,t)})}),i},R8=(e,t,i,a)=>e?Array.isArray(e)?E8(e,t):ha(e)?w8(e,t):(Yl(i,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:a}),null):null,C8=e=>!ha(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,i)=>t&&Number.isNaN(Number.parseFloat(i)),!0);function T8({children:e,count:t,parent:i,i18nKey:a,context:o,tOptions:c={},values:u,defaults:d,components:f,ns:g,i18n:y,t:h,shouldUnescape:x,...S}){const E=y||Ob();if(!E)return Yl(E,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:a}),e;const C=h||E.t.bind(E)||(ee=>ee),w={...Tb(),...E.options?.react};let R=g||(C.ns?void 0:E.options?.defaultNS||"translation");Zr(R)&&(R=[R]);const{transDefaultProps:O}=w,A=O?.tOptions?{...O.tOptions,...c}:c,k=x??O?.shouldUnescape,N=O?.values?{...O.values,...u}:u,j=O?.components?{...O.components,...f}:f,D=Jy(e,w,E,a),M=Array.isArray(a)?a[a.length-1]:a,_=d||A?.defaultValue||D||w.transEmptyNodeValue||(typeof M=="function"?Ls(M):M),{hashTransKey:L}=w,q=a||(L?L(D||_):D||_);E.options?.interpolation?.defaultVariables?u={...E.options.interpolation.defaultVariables,...N}:u=N;const X=x8(e);X&&typeof X.count=="number"&&t===void 0&&(t=X.count),t===void 0&&(t=A?.count);const B=u||t!==void 0&&!E.options?.interpolation?.alwaysFormat||!e?A.interpolation:{interpolation:{...A.interpolation,prefix:"#$?",suffix:"?$#"}},H={...A,context:o||A.context,count:t,...u,...B,defaultValue:_,ns:R};let U=q?C(q,H):_;U===q&&_&&(U=_);const z=R8(j,U,E,a);let Q=z||e,$=null;C8(z)?($=z,Q=e):z&&!Array.isArray(z)&&($=z,Q=void 0);const K=S8(Q,$,U,E,w,H,k),Y=i??w.defaultTransParent;return Y?v.createElement(Y,S,K):K}const O8={type:"3rdParty",init(e){m8(e.options.react),y8(e)}},JA=v.createContext();class A8{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Ab({children:e,count:t,parent:i,i18nKey:a,context:o,tOptions:c={},values:u,defaults:d,components:f,ns:g,i18n:y,t:h,shouldUnescape:x,...S}){const{i18n:E,defaultNS:C}=v.useContext(JA)||{},w=y||E||Ob(),R=h||w?.t.bind(w);return T8({children:e,count:t,parent:i,i18nKey:a,context:o,tOptions:c,values:u,defaults:d,components:f,ns:g||(R?.ns?void 0:C||w?.options?.defaultNS),i18n:w,t:h,shouldUnescape:x,...S})}const k8=(e,t)=>{if(Zr(t))return t;if(ha(t)&&Zr(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const i=e[e.length-1];return typeof i=="function"?"":i}return e},M8={t:k8,ready:!1},N8=()=>()=>{},Ct=(e,t={})=>{const{i18n:i}=t,{i18n:a,defaultNS:o}=v.useContext(JA)||{},c=i||a||Ob();c&&!c.reportNamespaces&&(c.reportNamespaces=new A8),c||Yl(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const u=v.useMemo(()=>({...Tb(),...c?.options?.react,...t}),[c,t]),{useSuspense:d,keyPrefix:f,bindI18n:g,bindI18nStore:y}=u,h=o||c?.options?.defaultNS,x=Zr(h)?[h]:h||["translation"],S=JSON.stringify(x),E=v.useMemo(()=>x,[S]);c?.reportNamespaces?.addUsedNamespaces?.(E);const C=v.useRef(0),w=v.useCallback(H=>{if(!c)return N8;const U=()=>{C.current+=1,H()};return g&&c.on(g,U),y&&c.store.on(y,U),()=>{g&&g.split(" ").forEach(z=>c.off(z,U)),y&&y.split(" ").forEach(z=>c.store.off(z,U))}},[c,g,y]),R=v.useRef(),O=v.useCallback(()=>{if(!c)return M8;const H=!!(c.isInitialized||c.initializedStoreOnce)&&E.every(ee=>f8(ee,c,u)),U=t.lng||c.language,z=C.current,Q=typeof f=="function"?Ls(f,{...c.options,ns:E}):f,$=R.current;if($&&$.i18n===c&&$.ready===H&&$.lng===U&&$.namespaces===E&&$.keyPrefix===Q&&$.revision===z)return $;const Y={t:c.getFixedT(U,u.nsMode==="fallback"?E:E[0],f,{scopeNs:E}),i18n:c,ready:H,lng:U,namespaces:E,keyPrefix:Q,revision:z};return R.current=Y,Y},[c,E,f,u,t.lng]),[A,k]=v.useState(0);let{t:N,ready:j}=Mp.useSyncExternalStore(w,O,O),D;c&&d&&!j&&(D=new Promise(H=>{const U=()=>H();t.lng?sR(c,t.lng,E,U):Zy(c,E,U)}),{t:N,ready:j}=O()),v.useEffect(()=>{if(c&&!j&&!d){const H=()=>k(U=>U+1);t.lng?sR(c,t.lng,E,H):Zy(c,E,H)}},[c,t.lng,E,j,d,A]);const M=c||{},_=v.useRef(null),L=v.useRef(),q=H=>`${H.language}|${H.resolvedLanguage}|${H.languages?.join(",")}`,X=H=>{const U=Object.getOwnPropertyDescriptors(H);U.__original&&delete U.__original;const z=Object.create(Object.getPrototypeOf(H),U);if(!Object.prototype.hasOwnProperty.call(z,"__original"))try{Object.defineProperty(z,"__original",{value:H,writable:!1,enumerable:!1,configurable:!1})}catch{}return z},B=v.useMemo(()=>{const H=M,U=H&&q(H);let z=H;H&&(_.current&&_.current.__original===H?L.current!==U?(z=X(H),_.current=z,L.current=U):z=_.current:(z=X(H),_.current=z,L.current=U));const Q=!j&&!d?(...K)=>(Yl(c,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),N(...K)):N,$=[Q,z,j];return $.t=Q,$.i18n=z,$.ready=j,$},[N,M,j,M.resolvedLanguage,M.language,M.languages]);if(c&&d&&!j){let H=!1;try{H=!1}catch{}throw H&&Yl(c,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),D}return B};function ek({...e}){return b.jsx(BA,{"data-slot":"sheet",...e})}function D8({...e}){return b.jsx(LU,{"data-slot":"sheet-trigger",...e})}function j8({...e}){return b.jsx(FA,{"data-slot":"sheet-portal",...e})}function I8({className:e,...t}){return b.jsx(zA,{"data-slot":"sheet-overlay",className:Ye("fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function tk({className:e,children:t,side:i="right",showCloseButton:a=!0,...o}){const{t:c}=Ct();return b.jsxs(j8,{children:[b.jsx(I8,{}),b.jsxs(HA,{"data-slot":"sheet-content","data-side":i,className:Ye("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...o,children:[t,a&&b.jsxs(eg,{"data-slot":"sheet-close",render:b.jsx(ut,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:c("a11y.close")})]})]})]})}function P8({className:e,...t}){return b.jsx("div",{"data-slot":"sheet-header",className:Ye("flex flex-col gap-1.5 p-6",e),...t})}function nk({className:e,...t}){return b.jsx(VA,{"data-slot":"sheet-title",className:Ye("font-heading text-sm font-medium text-foreground",e),...t})}function L8({className:e,...t}){return b.jsx(_A,{"data-slot":"sheet-description",className:Ye("text-xs/relaxed text-muted-foreground",e),...t})}function Er({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:Ye("animate-pulse rounded-md bg-muted",e),...t})}const z8="sidebar_state",_8=3600*24*7,U8="16rem",H8="18rem",F8="3rem",B8="b",rk=v.createContext(null);function hc(){const e=v.useContext(rk);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function V8({defaultOpen:e=!0,open:t,onOpenChange:i,className:a,style:o,children:c,...u}){const d=DA(),[f,g]=v.useState(!1),[y,h]=v.useState(e),x=t??y,S=v.useCallback(R=>{const O=typeof R=="function"?R(x):R;i?i(O):h(O),document.cookie=`${z8}=${O}; path=/; max-age=${_8}`},[i,x]),E=v.useCallback(()=>d?g(R=>!R):S(R=>!R),[d,S,g]);v.useEffect(()=>{const R=O=>{O.key===B8&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),E())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[E]);const C=x?"expanded":"collapsed",w=v.useMemo(()=>({state:C,open:x,setOpen:S,isMobile:d,openMobile:f,setOpenMobile:g,toggleSidebar:E}),[C,x,S,d,f,g,E]);return b.jsx(rk.Provider,{value:w,children:b.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":U8,"--sidebar-width-icon":F8,...o},className:Ye("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...u,children:c})})}function K8({side:e="left",variant:t="sidebar",collapsible:i="offcanvas",className:a,children:o,dir:c,...u}){const{t:d}=Ct(),{isMobile:f,state:g,openMobile:y,setOpenMobile:h}=hc();return i==="none"?b.jsx("div",{"data-slot":"sidebar",className:Ye("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...u,children:o}):f?b.jsx(ek,{open:y,onOpenChange:h,...u,children:b.jsxs(tk,{dir:c,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":H8},side:e,children:[b.jsxs(P8,{className:"sr-only",children:[b.jsx(nk,{children:d("a11y.sidebar")}),b.jsx(L8,{children:d("a11y.sidebarDescription")})]}),b.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):b.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?i:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[b.jsx("div",{"data-slot":"sidebar-gap",className:Ye("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),b.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Ye("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width) data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width) md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...u,children:b.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})})]})}function q8({className:e,onClick:t,...i}){const{t:a}=Ct(),{toggleSidebar:o}=hc();return b.jsxs(ut,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Ye(e),onClick:c=>{t?.(c),o()},...i,children:[b.jsx(sL,{}),b.jsx("span",{className:"sr-only",children:a("a11y.toggleSidebar")})]})}function Y8({className:e,...t}){const{t:i}=Ct(),{toggleSidebar:a}=hc();return b.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":i("a11y.toggleSidebar"),tabIndex:-1,onClick:a,title:i("a11y.toggleSidebar"),className:Ye("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function G8({className:e,...t}){return b.jsx("main",{"data-slot":"sidebar-inset",className:Ye("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function $8({className:e,...t}){return b.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Ye("flex flex-col gap-2 p-2",e),...t})}function Q8({className:e,...t}){return b.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Ye("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function X8({className:e,...t}){return b.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Ye("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function ik({className:e,...t}){return b.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Ye("flex w-full min-w-0 flex-col gap-px",e),...t})}function Ch({className:e,...t}){return b.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Ye("group/menu-item relative",e),...t})}const Z8=dd("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Th({render:e,isActive:t=!1,variant:i="default",size:a="default",tooltip:o,className:c,...u}){const{isMobile:d,state:f}=hc(),g=Rb({defaultTagName:"button",props:kr({className:Ye(Z8({variant:i,size:a}),c)},u),render:o?b.jsx(Kh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:t}});return o?(typeof o=="string"&&(o={children:o}),b.jsxs(Vh,{children:[g,b.jsx(qh,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):g}function W8({className:e,...t}){return b.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Ye("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...t})}function J8({className:e,...t}){return b.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Ye("group/menu-sub-item relative",e),...t})}function eH({render:e,size:t="md",isActive:i=!1,className:a,...o}){return Rb({defaultTagName:"a",props:kr({className:Ye("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",a)},o),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:i}})}function tH({items:e}){const{t}=Ct(),{pathname:i}=Nr(),{isMobile:a,state:o}=hc(),c=o==="collapsed"&&!a,u=d=>i===d||i.startsWith(`${d}/`);return b.jsx(X8,{children:b.jsx(ik,{children:e.map(d=>{const f=d.icon,g=d.items?.some(y=>u(y.url))??!1;return d.items?c?b.jsx(Ch,{children:b.jsxs(Uo,{children:[b.jsxs(Ho,{render:b.jsx(Th,{tooltip:t(d.titleKey),isActive:g}),children:[b.jsx(f,{}),b.jsx("span",{children:t(d.titleKey)})]}),b.jsx(Fo,{className:"w-40",side:"right",align:"start",sideOffset:4,children:b.jsxs(kA,{children:[b.jsx(MA,{children:t(d.titleKey)}),d.items.map(y=>b.jsx(uc,{className:"cursor-pointer",render:b.jsx(Tu,{to:y.url}),children:b.jsx("span",{children:t(y.titleKey)})},y.titleKey))]})})]})},d.titleKey):b.jsxs(q_,{defaultOpen:g,className:"group/collapsible",render:b.jsx(Ch,{}),children:[b.jsxs(Y_,{render:b.jsx(Th,{tooltip:t(d.titleKey),isActive:g}),children:[b.jsx(f,{}),b.jsx("span",{children:t(d.titleKey)}),b.jsx(Kv,{className:`
14
+ ml-auto transition-transform duration-200
15
+ group-data-open/collapsible:rotate-90
16
+ `})]}),b.jsx(G_,{children:b.jsx(W8,{children:d.items.map(y=>b.jsx(J8,{children:b.jsx(eH,{isActive:u(y.url),render:b.jsx(Tu,{to:y.url}),children:b.jsx("span",{children:t(y.titleKey)})})},y.titleKey))})})]},`${d.titleKey}-${g?"active":"inactive"}`):b.jsx(Ch,{children:b.jsxs(Th,{tooltip:t(d.titleKey),isActive:i===d.url,render:b.jsx(Tu,{to:d.url??"/dashboard"}),children:[b.jsx(f,{}),b.jsx("span",{children:t(d.titleKey)})]})},d.titleKey)})})})}const kb=[{titleKey:"nav.dashboard",url:"/dashboard",icon:eL},{titleKey:"nav.library",icon:tL,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:rT,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],nH=new Map([["/settings","nav.settings"],...kb.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(t=>[t.url,t.titleKey])??[]])]);function ak(e){return e.startsWith("/library/skills/")?"nav.skills":nH.get(e)??"nav.dashboard"}const rH=kb.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(t=>t.url)??[]]),iH=rH;function aH({...e}){const{t}=Ct(),{pathname:i}=Nr(),{isMobile:a,setOpenMobile:o}=hc();return v.useEffect(()=>{a&&o(!1)},[a,i,o]),b.jsxs(K8,{collapsible:"icon",...e,children:[b.jsx(Q8,{children:b.jsx(tH,{items:kb})}),b.jsx($8,{children:b.jsx(ik,{children:b.jsx(Ch,{children:b.jsxs(Th,{tooltip:t("nav.settings"),render:b.jsx(Tu,{to:"/settings"}),children:[b.jsx(lL,{}),b.jsx("span",{children:t("nav.settings")})]})})})}),b.jsx(Y8,{})]})}function sH({className:e,...t}){return b.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:Ye(e),...t})}function oH({className:e,...t}){return b.jsx("ol",{"data-slot":"breadcrumb-list",className:Ye("flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",e),...t})}function lH({className:e,...t}){return b.jsx("li",{"data-slot":"breadcrumb-item",className:Ye("inline-flex items-center gap-1",e),...t})}function cH({className:e,render:t,...i}){return Rb({defaultTagName:"a",props:kr({className:Ye("transition-colors hover:text-foreground",e)},i),render:t,state:{slot:"breadcrumb-link"}})}function uH({className:e,...t}){return b.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Ye("font-normal text-foreground",e),...t})}function dH({children:e,className:t,...i}){return b.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Ye("[&>svg]:size-3.5",t),...i,children:e??b.jsx(Kv,{})})}function fH({items:e}){const{t}=Ct();return b.jsx(sH,{"aria-label":t("a11y.breadcrumb"),className:"min-w-0",children:b.jsx(oH,{className:"flex-nowrap text-sm font-medium text-foreground",children:e.map((i,a)=>b.jsxs(v.Fragment,{children:[a>0&&b.jsx(dH,{}),b.jsx(lH,{className:i.to?"shrink-0":"min-w-0",children:i.to?b.jsx(cH,{render:b.jsx(cd,{to:i.to}),className:"truncate",title:i.label,children:i.label}):b.jsx(uH,{className:"truncate font-medium",title:i.label,children:i.label})})]},i.to??i.label))})})}const ng=v.createContext(null);ng.displayName="PageHeaderActionsContext";function hH({children:e}){const[t,i]=v.useState(null);return b.jsx(ng,{value:{container:t,setContainer:i},children:e})}function pH(){const e=v.use(ng);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const t=e.setContainer,i=v.useCallback(a=>{t(a)},[t]);return b.jsx("div",{ref:i,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function sk({children:e}){const t=v.use(ng);return t?.container?ur.createPortal(e,t.container):null}function gH(){const{t:e}=Ct(),{pathname:t}=Nr(),i=hz("/library/skills/:name");return b.jsx(hH,{children:b.jsxs(V8,{children:[b.jsx(aH,{}),b.jsxs(G8,{className:i?"h-svh min-w-0 overflow-hidden":"min-w-0",children:[b.jsxs("header",{className:`
17
+ flex h-16 shrink-0 items-center gap-2 transition-[width,height]
18
+ ease-linear
19
+ group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
20
+ `,children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[b.jsx(q8,{size:"icon",className:"-ml-1"}),b.jsx(PA,{orientation:"vertical",className:`
21
+ mr-2
22
+ data-vertical:h-4 data-vertical:self-auto
23
+ `}),b.jsx(fH,{items:i?[{label:e("nav.skills"),to:"/library/skills"},{label:i.params.name??""}]:[{label:e(ak(t))}]})]}),b.jsx(pH,{})]}),b.jsx(GO,{})]})]})})}function mH(){const{t:e}=Ct(),{pathname:t}=Nr(),i=Tz(),a=lc();let o;for(const u of i.toReversed())if(yH(u.handle)){o=u.handle.backTo;break}const c=()=>{if(o===void 0){a(-1);return}a(o)};return b.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[b.jsx("header",{className:`
24
+ flex h-16 shrink-0 items-center gap-2 transition-[width,height]
25
+ ease-linear
26
+ `,children:b.jsxs("div",{className:"flex items-center gap-2 px-4",children:[b.jsxs(ut,{variant:"ghost",size:"icon",className:"-ml-1",onClick:c,children:[b.jsx(BP,{}),b.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),b.jsx(PA,{orientation:"vertical",className:`
27
+ mr-2
28
+ data-vertical:h-4 data-vertical:self-auto
29
+ `}),b.jsx("span",{className:"text-sm font-medium",children:e(ak(t))})]})}),b.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:b.jsx(GO,{})})]})}function yH(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"}function vH(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return v.useMemo(()=>a=>{t.forEach(o=>o(a))},t)}const rg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Mb(e){return"nodeType"in e}function Br(e){var t,i;return e?pc(e)?e:Mb(e)&&(t=(i=e.ownerDocument)==null?void 0:i.defaultView)!=null?t:window:window}function Nb(e){const{Document:t}=Br(e);return e instanceof t}function gd(e){return pc(e)?!1:e instanceof Br(e).HTMLElement}function ok(e){return e instanceof Br(e).SVGElement}function gc(e){return e?pc(e)?e.document:Mb(e)?Nb(e)?e:gd(e)||ok(e)?e.ownerDocument:document:document:document}const Xi=rg?v.useLayoutEffect:v.useEffect;function ig(e){const t=v.useRef(e);return Xi(()=>{t.current=e}),v.useCallback(function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return t.current==null?void 0:t.current(...a)},[])}function bH(){const e=v.useRef(null),t=v.useCallback((a,o)=>{e.current=setInterval(a,o)},[]),i=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,i]}function Hu(e,t){t===void 0&&(t=[e]);const i=v.useRef(e);return Xi(()=>{i.current!==e&&(i.current=e)},t),i}function md(e,t){const i=v.useRef();return v.useMemo(()=>{const a=e(i.current);return i.current=a,a},[...t])}function Zh(e){const t=ig(e),i=v.useRef(null),a=v.useCallback(o=>{o!==i.current&&t?.(o,i.current),i.current=o},[]);return[i,a]}function Wh(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let fy={};function yd(e,t){return v.useMemo(()=>{if(t)return t;const i=fy[e]==null?0:fy[e]+1;return fy[e]=i,e+"-"+i},[e,t])}function lk(e){return function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return a.reduce((c,u)=>{const d=Object.entries(u);for(const[f,g]of d){const y=c[f];y!=null&&(c[f]=y+e*g)}return c},{...t})}}const Gl=lk(1),Fu=lk(-1);function xH(e){return"clientX"in e&&"clientY"in e}function ag(e){if(!e)return!1;const{KeyboardEvent:t}=Br(e.target);return t&&e instanceof t}function SH(e){if(!e)return!1;const{TouchEvent:t}=Br(e.target);return t&&e instanceof t}function Jh(e){if(SH(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:i}=e.touches[0];return{x:t,y:i}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:i}=e.changedTouches[0];return{x:t,y:i}}}return xH(e)?{x:e.clientX,y:e.clientY}:null}const Fs=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:i}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(i?Math.round(i):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:i}=e;return"scaleX("+t+") scaleY("+i+")"}},Transform:{toString(e){if(e)return[Fs.Translate.toString(e),Fs.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:i,easing:a}=e;return t+" "+i+"ms "+a}}}),oR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function EH(e){return e.matches(oR)?e:e.querySelector(oR)}const wH={display:"none"};function RH(e){let{id:t,value:i}=e;return Ne.createElement("div",{id:t,style:wH},i)}function CH(e){let{id:t,announcement:i,ariaLiveType:a="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ne.createElement("div",{id:t,style:o,role:"status","aria-live":a,"aria-atomic":!0},i)}function TH(){const[e,t]=v.useState("");return{announce:v.useCallback(a=>{a!=null&&t(a)},[]),announcement:e}}const ck=v.createContext(null);function OH(e){const t=v.useContext(ck);v.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function AH(){const[e]=v.useState(()=>new Set),t=v.useCallback(a=>(e.add(a),()=>e.delete(a)),[e]);return[v.useCallback(a=>{let{type:o,event:c}=a;e.forEach(u=>{var d;return(d=u[o])==null?void 0:d.call(u,c)})},[e]),t]}const kH={draggable:`
30
+ To pick up a draggable item, press the space bar.
31
+ While dragging, use the arrow keys to move the item.
32
+ Press space again to drop the item in its new position, or press escape to cancel.
33
+ `},MH={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was moved over droppable area "+i.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was dropped over droppable area "+i.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function NH(e){let{announcements:t=MH,container:i,hiddenTextDescribedById:a,screenReaderInstructions:o=kH}=e;const{announce:c,announcement:u}=TH(),d=yd("DndLiveRegion"),[f,g]=v.useState(!1);if(v.useEffect(()=>{g(!0)},[]),OH(v.useMemo(()=>({onDragStart(h){let{active:x}=h;c(t.onDragStart({active:x}))},onDragMove(h){let{active:x,over:S}=h;t.onDragMove&&c(t.onDragMove({active:x,over:S}))},onDragOver(h){let{active:x,over:S}=h;c(t.onDragOver({active:x,over:S}))},onDragEnd(h){let{active:x,over:S}=h;c(t.onDragEnd({active:x,over:S}))},onDragCancel(h){let{active:x,over:S}=h;c(t.onDragCancel({active:x,over:S}))}}),[c,t])),!f)return null;const y=Ne.createElement(Ne.Fragment,null,Ne.createElement(RH,{id:a,value:o.draggable}),Ne.createElement(CH,{id:d,announcement:u}));return i?ur.createPortal(y,i):y}var ir;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ir||(ir={}));function ep(){}function hy(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function DH(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return v.useMemo(()=>[...t].filter(a=>a!=null),[...t])}const Zi=Object.freeze({x:0,y:0});function Db(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jH(e,t){const i=Jh(e);if(!i)return"0 0";const a={x:(i.x-t.left)/t.width*100,y:(i.y-t.top)/t.height*100};return a.x+"% "+a.y+"%"}function jb(e,t){let{data:{value:i}}=e,{data:{value:a}}=t;return i-a}function IH(e,t){let{data:{value:i}}=e,{data:{value:a}}=t;return a-i}function ev(e){let{left:t,top:i,height:a,width:o}=e;return[{x:t,y:i},{x:t+o,y:i},{x:t,y:i+a},{x:t+o,y:i+a}]}function uk(e,t){if(!e||e.length===0)return null;const[i]=e;return i[t]}function lR(e,t,i){return t===void 0&&(t=e.left),i===void 0&&(i=e.top),{x:t+e.width*.5,y:i+e.height*.5}}const PH=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:a}=e;const o=lR(t,t.left,t.top),c=[];for(const u of a){const{id:d}=u,f=i.get(d);if(f){const g=Db(lR(f),o);c.push({id:d,data:{droppableContainer:u,value:g}})}}return c.sort(jb)},LH=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:a}=e;const o=ev(t),c=[];for(const u of a){const{id:d}=u,f=i.get(d);if(f){const g=ev(f),y=o.reduce((x,S,E)=>x+Db(g[E],S),0),h=Number((y/4).toFixed(4));c.push({id:d,data:{droppableContainer:u,value:h}})}}return c.sort(jb)};function zH(e,t){const i=Math.max(t.top,e.top),a=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),c=Math.min(t.top+t.height,e.top+e.height),u=o-a,d=c-i;if(a<o&&i<c){const f=t.width*t.height,g=e.width*e.height,y=u*d,h=y/(f+g-y);return Number(h.toFixed(4))}return 0}const _H=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:a}=e;const o=[];for(const c of a){const{id:u}=c,d=i.get(u);if(d){const f=zH(d,t);f>0&&o.push({id:u,data:{droppableContainer:c,value:f}})}}return o.sort(IH)};function UH(e,t){const{top:i,left:a,bottom:o,right:c}=t;return i<=e.y&&e.y<=o&&a<=e.x&&e.x<=c}const HH=e=>{let{droppableContainers:t,droppableRects:i,pointerCoordinates:a}=e;if(!a)return[];const o=[];for(const c of t){const{id:u}=c,d=i.get(u);if(d&&UH(a,d)){const g=ev(d).reduce((h,x)=>h+Db(a,x),0),y=Number((g/4).toFixed(4));o.push({id:u,data:{droppableContainer:c,value:y}})}}return o.sort(jb)};function FH(e,t,i){return{...e,scaleX:t&&i?t.width/i.width:1,scaleY:t&&i?t.height/i.height:1}}function dk(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Zi}function BH(e){return function(i){for(var a=arguments.length,o=new Array(a>1?a-1:0),c=1;c<a;c++)o[c-1]=arguments[c];return o.reduce((u,d)=>({...u,top:u.top+e*d.y,bottom:u.bottom+e*d.y,left:u.left+e*d.x,right:u.right+e*d.x}),{...i})}}const VH=BH(1);function fk(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function KH(e,t,i){const a=fk(t);if(!a)return e;const{scaleX:o,scaleY:c,x:u,y:d}=a,f=e.left-u-(1-o)*parseFloat(i),g=e.top-d-(1-c)*parseFloat(i.slice(i.indexOf(" ")+1)),y=o?e.width/o:e.width,h=c?e.height/c:e.height;return{width:y,height:h,top:g,right:f+y,bottom:g+h,left:f}}const qH={ignoreTransform:!1};function mc(e,t){t===void 0&&(t=qH);let i=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:y}=Br(e).getComputedStyle(e);g&&(i=KH(i,g,y))}const{top:a,left:o,width:c,height:u,bottom:d,right:f}=i;return{top:a,left:o,width:c,height:u,bottom:d,right:f}}function cR(e){return mc(e,{ignoreTransform:!0})}function YH(e){const t=e.innerWidth,i=e.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}function GH(e,t){return t===void 0&&(t=Br(e).getComputedStyle(e)),t.position==="fixed"}function $H(e,t){t===void 0&&(t=Br(e).getComputedStyle(e));const i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const c=t[o];return typeof c=="string"?i.test(c):!1})}function sg(e,t){const i=[];function a(o){if(t!=null&&i.length>=t||!o)return i;if(Nb(o)&&o.scrollingElement!=null&&!i.includes(o.scrollingElement))return i.push(o.scrollingElement),i;if(!gd(o)||ok(o)||i.includes(o))return i;const c=Br(e).getComputedStyle(o);return o!==e&&$H(o,c)&&i.push(o),GH(o,c)?i:a(o.parentNode)}return e?a(e):i}function hk(e){const[t]=sg(e,1);return t??null}function py(e){return!rg||!e?null:pc(e)?e:Mb(e)?Nb(e)||e===gc(e).scrollingElement?window:gd(e)?e:null:null}function pk(e){return pc(e)?e.scrollX:e.scrollLeft}function gk(e){return pc(e)?e.scrollY:e.scrollTop}function tv(e){return{x:pk(e),y:gk(e)}}var cr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(cr||(cr={}));function mk(e){return!rg||!e?!1:e===document.scrollingElement}function yk(e){const t={x:0,y:0},i=mk(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},a={x:e.scrollWidth-i.width,y:e.scrollHeight-i.height},o=e.scrollTop<=t.y,c=e.scrollLeft<=t.x,u=e.scrollTop>=a.y,d=e.scrollLeft>=a.x;return{isTop:o,isLeft:c,isBottom:u,isRight:d,maxScroll:a,minScroll:t}}const QH={x:.2,y:.2};function XH(e,t,i,a,o){let{top:c,left:u,right:d,bottom:f}=i;a===void 0&&(a=10),o===void 0&&(o=QH);const{isTop:g,isBottom:y,isLeft:h,isRight:x}=yk(e),S={x:0,y:0},E={x:0,y:0},C={height:t.height*o.y,width:t.width*o.x};return!g&&c<=t.top+C.height?(S.y=cr.Backward,E.y=a*Math.abs((t.top+C.height-c)/C.height)):!y&&f>=t.bottom-C.height&&(S.y=cr.Forward,E.y=a*Math.abs((t.bottom-C.height-f)/C.height)),!x&&d>=t.right-C.width?(S.x=cr.Forward,E.x=a*Math.abs((t.right-C.width-d)/C.width)):!h&&u<=t.left+C.width&&(S.x=cr.Backward,E.x=a*Math.abs((t.left+C.width-u)/C.width)),{direction:S,speed:E}}function ZH(e){if(e===document.scrollingElement){const{innerWidth:c,innerHeight:u}=window;return{top:0,left:0,right:c,bottom:u,width:c,height:u}}const{top:t,left:i,right:a,bottom:o}=e.getBoundingClientRect();return{top:t,left:i,right:a,bottom:o,width:e.clientWidth,height:e.clientHeight}}function vk(e){return e.reduce((t,i)=>Gl(t,tv(i)),Zi)}function WH(e){return e.reduce((t,i)=>t+pk(i),0)}function JH(e){return e.reduce((t,i)=>t+gk(i),0)}function bk(e,t){if(t===void 0&&(t=mc),!e)return;const{top:i,left:a,bottom:o,right:c}=t(e);hk(e)&&(o<=0||c<=0||i>=window.innerHeight||a>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const eF=[["x",["left","right"],WH],["y",["top","bottom"],JH]];class Ib{constructor(t,i){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const a=sg(i),o=vk(a);this.rect={...t},this.width=t.width,this.height=t.height;for(const[c,u,d]of eF)for(const f of u)Object.defineProperty(this,f,{get:()=>{const g=d(a),y=o[c]-g;return this.rect[f]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ku{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(i=>{var a;return(a=this.target)==null?void 0:a.removeEventListener(...i)})},this.target=t}add(t,i,a){var o;(o=this.target)==null||o.addEventListener(t,i,a),this.listeners.push([t,i,a])}}function tF(e){const{EventTarget:t}=Br(e);return e instanceof t?e:gc(e)}function gy(e,t){const i=Math.abs(e.x),a=Math.abs(e.y);return typeof t=="number"?Math.sqrt(i**2+a**2)>t:"x"in t&&"y"in t?i>t.x&&a>t.y:"x"in t?i>t.x:"y"in t?a>t.y:!1}var Mi;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Mi||(Mi={}));function uR(e){e.preventDefault()}function nF(e){e.stopPropagation()}var Jt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Jt||(Jt={}));const xk={start:[Jt.Space,Jt.Enter],cancel:[Jt.Esc],end:[Jt.Space,Jt.Enter,Jt.Tab]},rF=(e,t)=>{let{currentCoordinates:i}=t;switch(e.code){case Jt.Right:return{...i,x:i.x+25};case Jt.Left:return{...i,x:i.x-25};case Jt.Down:return{...i,y:i.y+25};case Jt.Up:return{...i,y:i.y-25}}};class Pb{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:i}}=t;this.props=t,this.listeners=new ku(gc(i)),this.windowListeners=new ku(Br(i)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Mi.Resize,this.handleCancel),this.windowListeners.add(Mi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Mi.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:i}=this.props,a=t.node.current;a&&bk(a),i(Zi)}handleKeyDown(t){if(ag(t)){const{active:i,context:a,options:o}=this.props,{keyboardCodes:c=xk,coordinateGetter:u=rF,scrollBehavior:d="smooth"}=o,{code:f}=t;if(c.end.includes(f)){this.handleEnd(t);return}if(c.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:g}=a.current,y=g?{x:g.left,y:g.top}:Zi;this.referenceCoordinates||(this.referenceCoordinates=y);const h=u(t,{active:i,context:a.current,currentCoordinates:y});if(h){const x=Fu(h,y),S={x:0,y:0},{scrollableAncestors:E}=a.current;for(const C of E){const w=t.code,{isTop:R,isRight:O,isLeft:A,isBottom:k,maxScroll:N,minScroll:j}=yk(C),D=ZH(C),M={x:Math.min(w===Jt.Right?D.right-D.width/2:D.right,Math.max(w===Jt.Right?D.left:D.left+D.width/2,h.x)),y:Math.min(w===Jt.Down?D.bottom-D.height/2:D.bottom,Math.max(w===Jt.Down?D.top:D.top+D.height/2,h.y))},_=w===Jt.Right&&!O||w===Jt.Left&&!A,L=w===Jt.Down&&!k||w===Jt.Up&&!R;if(_&&M.x!==h.x){const q=C.scrollLeft+x.x,X=w===Jt.Right&&q<=N.x||w===Jt.Left&&q>=j.x;if(X&&!x.y){C.scrollTo({left:q,behavior:d});return}X?S.x=C.scrollLeft-q:S.x=w===Jt.Right?C.scrollLeft-N.x:C.scrollLeft-j.x,S.x&&C.scrollBy({left:-S.x,behavior:d});break}else if(L&&M.y!==h.y){const q=C.scrollTop+x.y,X=w===Jt.Down&&q<=N.y||w===Jt.Up&&q>=j.y;if(X&&!x.x){C.scrollTo({top:q,behavior:d});return}X?S.y=C.scrollTop-q:S.y=w===Jt.Down?C.scrollTop-N.y:C.scrollTop-j.y,S.y&&C.scrollBy({top:-S.y,behavior:d});break}}this.handleMove(t,Gl(Fu(h,this.referenceCoordinates),S))}}}handleMove(t,i){const{onMove:a}=this.props;t.preventDefault(),a(i)}handleEnd(t){const{onEnd:i}=this.props;t.preventDefault(),this.detach(),i()}handleCancel(t){const{onCancel:i}=this.props;t.preventDefault(),this.detach(),i()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Pb.activators=[{eventName:"onKeyDown",handler:(e,t,i)=>{let{keyboardCodes:a=xk,onActivation:o}=t,{active:c}=i;const{code:u}=e.nativeEvent;if(a.start.includes(u)){const d=c.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function dR(e){return!!(e&&"distance"in e)}function fR(e){return!!(e&&"delay"in e)}class Lb{constructor(t,i,a){var o;a===void 0&&(a=tF(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=i;const{event:c}=t,{target:u}=c;this.props=t,this.events=i,this.document=gc(u),this.documentListeners=new ku(this.document),this.listeners=new ku(a),this.windowListeners=new ku(Br(u)),this.initialCoordinates=(o=Jh(c))!=null?o:Zi,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:i,bypassActivationConstraint:a}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Mi.Resize,this.handleCancel),this.windowListeners.add(Mi.DragStart,uR),this.windowListeners.add(Mi.VisibilityChange,this.handleCancel),this.windowListeners.add(Mi.ContextMenu,uR),this.documentListeners.add(Mi.Keydown,this.handleKeydown),i){if(a!=null&&a({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(fR(i)){this.timeoutId=setTimeout(this.handleStart,i.delay),this.handlePending(i);return}if(dR(i)){this.handlePending(i);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,i){const{active:a,onPending:o}=this.props;o(a,t,this.initialCoordinates,i)}handleStart(){const{initialCoordinates:t}=this,{onStart:i}=this.props;t&&(this.activated=!0,this.documentListeners.add(Mi.Click,nF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Mi.SelectionChange,this.removeTextSelection),i(t))}handleMove(t){var i;const{activated:a,initialCoordinates:o,props:c}=this,{onMove:u,options:{activationConstraint:d}}=c;if(!o)return;const f=(i=Jh(t))!=null?i:Zi,g=Fu(o,f);if(!a&&d){if(dR(d)){if(d.tolerance!=null&&gy(g,d.tolerance))return this.handleCancel();if(gy(g,d.distance))return this.handleStart()}if(fR(d)&&gy(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}t.cancelable&&t.preventDefault(),u(f)}handleEnd(){const{onAbort:t,onEnd:i}=this.props;this.detach(),this.activated||t(this.props.active),i()}handleCancel(){const{onAbort:t,onCancel:i}=this.props;this.detach(),this.activated||t(this.props.active),i()}handleKeydown(t){t.code===Jt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const iF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Sk extends Lb{constructor(t){const{event:i}=t,a=gc(i.target);super(t,iF,a)}}Sk.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:a}=t;return!i.isPrimary||i.button!==0?!1:(a?.({event:i}),!0)}}];const aF={move:{name:"mousemove"},end:{name:"mouseup"}};var nv;(function(e){e[e.RightClick=2]="RightClick"})(nv||(nv={}));class Ek extends Lb{constructor(t){super(t,aF,gc(t.event.target))}}Ek.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:a}=t;return i.button===nv.RightClick?!1:(a?.({event:i}),!0)}}];const my={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class wk extends Lb{constructor(t){super(t,my)}static setup(){return window.addEventListener(my.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(my.move.name,t)};function t(){}}}wk.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:a}=t;const{touches:o}=i;return o.length>1?!1:(a?.({event:i}),!0)}}];var Mu;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Mu||(Mu={}));var tp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(tp||(tp={}));function sF(e){let{acceleration:t,activator:i=Mu.Pointer,canScroll:a,draggingRect:o,enabled:c,interval:u=5,order:d=tp.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:y,delta:h,threshold:x}=e;const S=lF({delta:h,disabled:!c}),[E,C]=bH(),w=v.useRef({x:0,y:0}),R=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(i){case Mu.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Mu.DraggableRect:return o}},[i,o,f]),A=v.useRef(null),k=v.useCallback(()=>{const j=A.current;if(!j)return;const D=w.current.x*R.current.x,M=w.current.y*R.current.y;j.scrollBy(D,M)},[]),N=v.useMemo(()=>d===tp.TreeOrder?[...g].reverse():g,[d,g]);v.useEffect(()=>{if(!c||!g.length||!O){C();return}for(const j of N){if(a?.(j)===!1)continue;const D=g.indexOf(j),M=y[D];if(!M)continue;const{direction:_,speed:L}=XH(j,M,O,t,x);for(const q of["x","y"])S[q][_[q]]||(L[q]=0,_[q]=0);if(L.x>0||L.y>0){C(),A.current=j,E(k,u),w.current=L,R.current=_;return}}w.current={x:0,y:0},R.current={x:0,y:0},C()},[t,k,a,C,c,u,JSON.stringify(O),JSON.stringify(S),E,g,N,y,JSON.stringify(x)])}const oF={x:{[cr.Backward]:!1,[cr.Forward]:!1},y:{[cr.Backward]:!1,[cr.Forward]:!1}};function lF(e){let{delta:t,disabled:i}=e;const a=Wh(t);return md(o=>{if(i||!a||!o)return oF;const c={x:Math.sign(t.x-a.x),y:Math.sign(t.y-a.y)};return{x:{[cr.Backward]:o.x[cr.Backward]||c.x===-1,[cr.Forward]:o.x[cr.Forward]||c.x===1},y:{[cr.Backward]:o.y[cr.Backward]||c.y===-1,[cr.Forward]:o.y[cr.Forward]||c.y===1}}},[i,t,a])}function cF(e,t){const i=t!=null?e.get(t):void 0,a=i?i.node.current:null;return md(o=>{var c;return t==null?null:(c=a??o)!=null?c:null},[a,t])}function uF(e,t){return v.useMemo(()=>e.reduce((i,a)=>{const{sensor:o}=a,c=o.activators.map(u=>({eventName:u.eventName,handler:t(u.handler,a)}));return[...i,...c]},[]),[e,t])}var Bu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Bu||(Bu={}));var rv;(function(e){e.Optimized="optimized"})(rv||(rv={}));const hR=new Map;function dF(e,t){let{dragging:i,dependencies:a,config:o}=t;const[c,u]=v.useState(null),{frequency:d,measure:f,strategy:g}=o,y=v.useRef(e),h=w(),x=Hu(h),S=v.useCallback(function(R){R===void 0&&(R=[]),!x.current&&u(O=>O===null?R:O.concat(R.filter(A=>!O.includes(A))))},[x]),E=v.useRef(null),C=md(R=>{if(h&&!i)return hR;if(!R||R===hR||y.current!==e||c!=null){const O=new Map;for(let A of e){if(!A)continue;if(c&&c.length>0&&!c.includes(A.id)&&A.rect.current){O.set(A.id,A.rect.current);continue}const k=A.node.current,N=k?new Ib(f(k),k):null;A.rect.current=N,N&&O.set(A.id,N)}return O}return R},[e,c,i,h,f]);return v.useEffect(()=>{y.current=e},[e]),v.useEffect(()=>{h||S()},[i,h]),v.useEffect(()=>{c&&c.length>0&&u(null)},[JSON.stringify(c)]),v.useEffect(()=>{h||typeof d!="number"||E.current!==null||(E.current=setTimeout(()=>{S(),E.current=null},d))},[d,h,S,...a]),{droppableRects:C,measureDroppableContainers:S,measuringScheduled:c!=null};function w(){switch(g){case Bu.Always:return!1;case Bu.BeforeDragging:return i;default:return!i}}}function zb(e,t){return md(i=>e?i||(typeof t=="function"?t(e):e):null,[t,e])}function fF(e,t){return zb(e,t)}function hF(e){let{callback:t,disabled:i}=e;const a=ig(t),o=v.useMemo(()=>{if(i||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:c}=window;return new c(a)},[a,i]);return v.useEffect(()=>()=>o?.disconnect(),[o]),o}function og(e){let{callback:t,disabled:i}=e;const a=ig(t),o=v.useMemo(()=>{if(i||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:c}=window;return new c(a)},[i]);return v.useEffect(()=>()=>o?.disconnect(),[o]),o}function pF(e){return new Ib(mc(e),e)}function pR(e,t,i){t===void 0&&(t=pF);const[a,o]=v.useState(null);function c(){o(f=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=f??i)!=null?g:null}const y=t(e);return JSON.stringify(f)===JSON.stringify(y)?f:y})}const u=hF({callback(f){if(e)for(const g of f){const{type:y,target:h}=g;if(y==="childList"&&h instanceof HTMLElement&&h.contains(e)){c();break}}}}),d=og({callback:c});return Xi(()=>{c(),e?(d?.observe(e),u?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),u?.disconnect())},[e]),a}function gF(e){const t=zb(e);return dk(e,t)}const gR=[];function mF(e){const t=v.useRef(e),i=md(a=>e?a&&a!==gR&&e&&t.current&&e.parentNode===t.current.parentNode?a:sg(e):gR,[e]);return v.useEffect(()=>{t.current=e},[e]),i}function yF(e){const[t,i]=v.useState(null),a=v.useRef(e),o=v.useCallback(c=>{const u=py(c.target);u&&i(d=>d?(d.set(u,tv(u)),new Map(d)):null)},[]);return v.useEffect(()=>{const c=a.current;if(e!==c){u(c);const d=e.map(f=>{const g=py(f);return g?(g.addEventListener("scroll",o,{passive:!0}),[g,tv(g)]):null}).filter(f=>f!=null);i(d.length?new Map(d):null),a.current=e}return()=>{u(e),u(c)};function u(d){d.forEach(f=>{const g=py(f);g?.removeEventListener("scroll",o)})}},[o,e]),v.useMemo(()=>e.length?t?Array.from(t.values()).reduce((c,u)=>Gl(c,u),Zi):vk(e):Zi,[e,t])}function mR(e,t){t===void 0&&(t=[]);const i=v.useRef(null);return v.useEffect(()=>{i.current=null},t),v.useEffect(()=>{const a=e!==Zi;a&&!i.current&&(i.current=e),!a&&i.current&&(i.current=null)},[e]),i.current?Fu(e,i.current):Zi}function vF(e){v.useEffect(()=>{if(!rg)return;const t=e.map(i=>{let{sensor:a}=i;return a.setup==null?void 0:a.setup()});return()=>{for(const i of t)i?.()}},e.map(t=>{let{sensor:i}=t;return i}))}function bF(e,t){return v.useMemo(()=>e.reduce((i,a)=>{let{eventName:o,handler:c}=a;return i[o]=u=>{c(u,t)},i},{}),[e,t])}function Rk(e){return v.useMemo(()=>e?YH(e):null,[e])}const yR=[];function xF(e,t){t===void 0&&(t=mc);const[i]=e,a=Rk(i?Br(i):null),[o,c]=v.useState(yR);function u(){c(()=>e.length?e.map(f=>mk(f)?a:new Ib(t(f),f)):yR)}const d=og({callback:u});return Xi(()=>{d?.disconnect(),u(),e.forEach(f=>d?.observe(f))},[e]),o}function Ck(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return gd(t)?t:e}function SF(e){let{measure:t}=e;const[i,a]=v.useState(null),o=v.useCallback(g=>{for(const{target:y}of g)if(gd(y)){a(h=>{const x=t(y);return h?{...h,width:x.width,height:x.height}:x});break}},[t]),c=og({callback:o}),u=v.useCallback(g=>{const y=Ck(g);c?.disconnect(),y&&c?.observe(y),a(y?t(y):null)},[t,c]),[d,f]=Zh(u);return v.useMemo(()=>({nodeRef:d,rect:i,setRef:f}),[i,d,f])}const EF=[{sensor:Sk,options:{}},{sensor:Pb,options:{}}],wF={current:{}},Oh={draggable:{measure:cR},droppable:{measure:cR,strategy:Bu.WhileDragging,frequency:rv.Optimized},dragOverlay:{measure:mc}};class Nu extends Map{get(t){var i;return t!=null&&(i=super.get(t))!=null?i:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:i}=t;return!i})}getNodeFor(t){var i,a;return(i=(a=this.get(t))==null?void 0:a.node.current)!=null?i:void 0}}const RF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ep},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Oh,measureDroppableContainers:ep,windowRect:null,measuringScheduled:!1},Tk={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ep,draggableNodes:new Map,over:null,measureDroppableContainers:ep},vd=v.createContext(Tk),Ok=v.createContext(RF);function CF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nu}}}function TF(e,t){switch(t.type){case ir.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ir.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ir.DragEnd:case ir.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ir.RegisterDroppable:{const{element:i}=t,{id:a}=i,o=new Nu(e.droppable.containers);return o.set(a,i),{...e,droppable:{...e.droppable,containers:o}}}case ir.SetDroppableDisabled:{const{id:i,key:a,disabled:o}=t,c=e.droppable.containers.get(i);if(!c||a!==c.key)return e;const u=new Nu(e.droppable.containers);return u.set(i,{...c,disabled:o}),{...e,droppable:{...e.droppable,containers:u}}}case ir.UnregisterDroppable:{const{id:i,key:a}=t,o=e.droppable.containers.get(i);if(!o||a!==o.key)return e;const c=new Nu(e.droppable.containers);return c.delete(i),{...e,droppable:{...e.droppable,containers:c}}}default:return e}}function OF(e){let{disabled:t}=e;const{active:i,activatorEvent:a,draggableNodes:o}=v.useContext(vd),c=Wh(a),u=Wh(i?.id);return v.useEffect(()=>{if(!t&&!a&&c&&u!=null){if(!ag(c)||document.activeElement===c.target)return;const d=o.get(u);if(!d)return;const{activatorNode:f,node:g}=d;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const y of[f.current,g.current]){if(!y)continue;const h=EH(y);if(h){h.focus();break}}})}},[a,t,o,u,c]),null}function Ak(e,t){let{transform:i,...a}=t;return e!=null&&e.length?e.reduce((o,c)=>c({transform:o,...a}),i):i}function AF(e){return v.useMemo(()=>({draggable:{...Oh.draggable,...e?.draggable},droppable:{...Oh.droppable,...e?.droppable},dragOverlay:{...Oh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function kF(e){let{activeNode:t,measure:i,initialRect:a,config:o=!0}=e;const c=v.useRef(!1),{x:u,y:d}=typeof o=="boolean"?{x:o,y:o}:o;Xi(()=>{if(!u&&!d||!t){c.current=!1;return}if(c.current||!a)return;const g=t?.node.current;if(!g||g.isConnected===!1)return;const y=i(g),h=dk(y,a);if(u||(h.x=0),d||(h.y=0),c.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const x=hk(g);x&&x.scrollBy({top:h.y,left:h.x})}},[t,u,d,a,i])}const lg=v.createContext({...Zi,scaleX:1,scaleY:1});var Ns;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ns||(Ns={}));const MF=v.memo(function(t){var i,a,o,c;let{id:u,accessibility:d,autoScroll:f=!0,children:g,sensors:y=EF,collisionDetection:h=_H,measuring:x,modifiers:S,...E}=t;const C=v.useReducer(TF,void 0,CF),[w,R]=C,[O,A]=AH(),[k,N]=v.useState(Ns.Uninitialized),j=k===Ns.Initialized,{draggable:{active:D,nodes:M,translate:_},droppable:{containers:L}}=w,q=D!=null?M.get(D):null,X=v.useRef({initial:null,translated:null}),B=v.useMemo(()=>{var bt;return D!=null?{id:D,data:(bt=q?.data)!=null?bt:wF,rect:X}:null},[D,q]),H=v.useRef(null),[U,z]=v.useState(null),[Q,$]=v.useState(null),K=Hu(E,Object.values(E)),Y=yd("DndDescribedBy",u),ee=v.useMemo(()=>L.getEnabled(),[L]),G=AF(x),{droppableRects:oe,measureDroppableContainers:I,measuringScheduled:V}=dF(ee,{dragging:j,dependencies:[_.x,_.y],config:G.droppable}),J=cF(M,D),re=v.useMemo(()=>Q?Jh(Q):null,[Q]),we=ht(),le=fF(J,G.draggable.measure);kF({activeNode:D!=null?M.get(D):null,config:we.layoutShiftCompensation,initialRect:le,measure:G.draggable.measure});const me=pR(J,G.draggable.measure,le),ge=pR(J?J.parentElement:null),ue=v.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=L.getNodeFor((i=ue.current.over)==null?void 0:i.id),ve=SF({measure:G.dragOverlay.measure}),Pe=(a=ve.nodeRef.current)!=null?a:J,Ae=j?(o=ve.rect)!=null?o:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Be=gF(Le?null:me),Oe=Rk(Pe?Br(Pe):null),Ue=mF(j?Te??J:null),be=xF(Ue),He=Ak(S,{transform:{x:_.x-Be.x,y:_.y-Be.y,scaleX:1,scaleY:1},activatorEvent:Q,active:B,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Ae,over:ue.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ue,scrollableAncestorRects:be,windowRect:Oe}),Ze=re?Gl(re,_):null,st=yF(Ue),de=mR(st),Ee=mR(st,[me]),Ge=Gl(He,de),Me=Ae?VH(Ae,He):null,De=B&&Me?h({active:B,collisionRect:Me,droppableRects:oe,droppableContainers:ee,pointerCoordinates:Ze}):null,vt=uk(De,"id"),[dt,pt]=v.useState(null),Mt=Le?He:Gl(He,Ee),jt=FH(Mt,(c=dt?.rect)!=null?c:null,me),en=v.useRef(null),an=v.useCallback((bt,mt)=>{let{sensor:Ut,options:un}=mt;if(H.current==null)return;const je=M.get(H.current);if(!je)return;const at=bt.nativeEvent,Ie=new Ut({active:H.current,activeNode:je,event:at,options:un,context:ue,onAbort($e){if(!M.get($e))return;const{onDragAbort:Tt}=K.current,F={id:$e};Tt?.(F),O({type:"onDragAbort",event:F})},onPending($e,et,Tt,F){if(!M.get($e))return;const{onDragPending:ne}=K.current,ye={id:$e,constraint:et,initialCoordinates:Tt,offset:F};ne?.(ye),O({type:"onDragPending",event:ye})},onStart($e){const et=H.current;if(et==null)return;const Tt=M.get(et);if(!Tt)return;const{onDragStart:F}=K.current,W={activatorEvent:at,active:{id:et,data:Tt.data,rect:X}};ur.unstable_batchedUpdates(()=>{F?.(W),N(Ns.Initializing),R({type:ir.DragStart,initialCoordinates:$e,active:et}),O({type:"onDragStart",event:W}),z(en.current),$(at)})},onMove($e){R({type:ir.DragMove,coordinates:$e})},onEnd:ze(ir.DragEnd),onCancel:ze(ir.DragCancel)});en.current=Ie;function ze($e){return async function(){const{active:Tt,collisions:F,over:W,scrollAdjustedTranslate:ne}=ue.current;let ye=null;if(Tt&&ne){const{cancelDrop:xe}=K.current;ye={activatorEvent:at,active:Tt,collisions:F,delta:ne,over:W},$e===ir.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&($e=ir.DragCancel)}H.current=null,ur.unstable_batchedUpdates(()=>{R({type:$e}),N(Ns.Uninitialized),pt(null),z(null),$(null),en.current=null;const xe=$e===ir.DragEnd?"onDragEnd":"onDragCancel";if(ye){const Ke=K.current[xe];Ke?.(ye),O({type:xe,event:ye})}})}}},[M]),tn=v.useCallback((bt,mt)=>(Ut,un)=>{const je=Ut.nativeEvent,at=M.get(un);if(H.current!==null||!at||je.dndKit||je.defaultPrevented)return;const Ie={active:at};bt(Ut,mt.options,Ie)===!0&&(je.dndKit={capturedBy:mt.sensor},H.current=un,an(Ut,mt))},[M,an]),Je=uF(y,tn);vF(y),Xi(()=>{me&&k===Ns.Initializing&&N(Ns.Initialized)},[me,k]),v.useEffect(()=>{const{onDragMove:bt}=K.current,{active:mt,activatorEvent:Ut,collisions:un,over:je}=ue.current;if(!mt||!Ut)return;const at={active:mt,activatorEvent:Ut,collisions:un,delta:{x:Ge.x,y:Ge.y},over:je};ur.unstable_batchedUpdates(()=>{bt?.(at),O({type:"onDragMove",event:at})})},[Ge.x,Ge.y]),v.useEffect(()=>{const{active:bt,activatorEvent:mt,collisions:Ut,droppableContainers:un,scrollAdjustedTranslate:je}=ue.current;if(!bt||H.current==null||!mt||!je)return;const{onDragOver:at}=K.current,Ie=un.get(vt),ze=Ie&&Ie.rect.current?{id:Ie.id,rect:Ie.rect.current,data:Ie.data,disabled:Ie.disabled}:null,$e={active:bt,activatorEvent:mt,collisions:Ut,delta:{x:je.x,y:je.y},over:ze};ur.unstable_batchedUpdates(()=>{pt(ze),at?.($e),O({type:"onDragOver",event:$e})})},[vt]),Xi(()=>{ue.current={activatorEvent:Q,active:B,activeNode:J,collisionRect:Me,collisions:De,droppableRects:oe,draggableNodes:M,draggingNode:Pe,draggingNodeRect:Ae,droppableContainers:L,over:dt,scrollableAncestors:Ue,scrollAdjustedTranslate:Ge},X.current={initial:Ae,translated:Me}},[B,J,De,Me,M,Pe,Ae,oe,L,dt,Ue,Ge]),sF({...we,delta:_,draggingRect:Me,pointerCoordinates:Ze,scrollableAncestors:Ue,scrollableAncestorRects:be});const St=v.useMemo(()=>({active:B,activeNode:J,activeNodeRect:me,activatorEvent:Q,collisions:De,containerNodeRect:ge,dragOverlay:ve,draggableNodes:M,droppableContainers:L,droppableRects:oe,over:dt,measureDroppableContainers:I,scrollableAncestors:Ue,scrollableAncestorRects:be,measuringConfiguration:G,measuringScheduled:V,windowRect:Oe}),[B,J,me,Q,De,ge,ve,M,L,oe,dt,I,Ue,be,G,V,Oe]),Xt=v.useMemo(()=>({activatorEvent:Q,activators:Je,active:B,activeNodeRect:me,ariaDescribedById:{draggable:Y},dispatch:R,draggableNodes:M,over:dt,measureDroppableContainers:I}),[Q,Je,B,me,R,Y,M,dt,I]);return Ne.createElement(ck.Provider,{value:A},Ne.createElement(vd.Provider,{value:Xt},Ne.createElement(Ok.Provider,{value:St},Ne.createElement(lg.Provider,{value:jt},g)),Ne.createElement(OF,{disabled:d?.restoreFocus===!1})),Ne.createElement(NH,{...d,hiddenTextDescribedById:Y}));function ht(){const bt=U?.autoScrollEnabled===!1,mt=typeof f=="object"?f.enabled===!1:f===!1,Ut=j&&!bt&&!mt;return typeof f=="object"?{...f,enabled:Ut}:{enabled:Ut}}}),NF=v.createContext(null),vR="button",DF="Draggable";function kk(e){let{id:t,data:i,disabled:a=!1,attributes:o}=e;const c=yd(DF),{activators:u,activatorEvent:d,active:f,activeNodeRect:g,ariaDescribedById:y,draggableNodes:h,over:x}=v.useContext(vd),{role:S=vR,roleDescription:E="draggable",tabIndex:C=0}=o??{},w=f?.id===t,R=v.useContext(w?lg:NF),[O,A]=Zh(),[k,N]=Zh(),j=bF(u,t),D=Hu(i);Xi(()=>(h.set(t,{id:t,key:c,node:O,activatorNode:k,data:D}),()=>{const _=h.get(t);_&&_.key===c&&h.delete(t)}),[h,t]);const M=v.useMemo(()=>({role:S,tabIndex:C,"aria-disabled":a,"aria-pressed":w&&S===vR?!0:void 0,"aria-roledescription":E,"aria-describedby":y.draggable}),[a,S,C,w,E,y.draggable]);return{active:f,activatorEvent:d,activeNodeRect:g,attributes:M,isDragging:w,listeners:a?void 0:j,node:O,over:x,setNodeRef:A,setActivatorNodeRef:N,transform:R}}function Mk(){return v.useContext(Ok)}const jF="Droppable",IF={timeout:25};function Nk(e){let{data:t,disabled:i=!1,id:a,resizeObserverConfig:o}=e;const c=yd(jF),{active:u,dispatch:d,over:f,measureDroppableContainers:g}=v.useContext(vd),y=v.useRef({disabled:i}),h=v.useRef(!1),x=v.useRef(null),S=v.useRef(null),{disabled:E,updateMeasurementsFor:C,timeout:w}={...IF,...o},R=Hu(C??a),O=v.useCallback(()=>{if(!h.current){h.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{g(Array.isArray(R.current)?R.current:[R.current]),S.current=null},w)},[w]),A=og({callback:O,disabled:E||!u}),k=v.useCallback((M,_)=>{A&&(_&&(A.unobserve(_),h.current=!1),M&&A.observe(M))},[A]),[N,j]=Zh(k),D=Hu(t);return v.useEffect(()=>{!A||!N.current||(A.disconnect(),h.current=!1,A.observe(N.current))},[N,A]),v.useEffect(()=>(d({type:ir.RegisterDroppable,element:{id:a,key:c,disabled:i,node:N,rect:x,data:D}}),()=>d({type:ir.UnregisterDroppable,key:c,id:a})),[a]),v.useEffect(()=>{i!==y.current.disabled&&(d({type:ir.SetDroppableDisabled,id:a,key:c,disabled:i}),y.current.disabled=i)},[a,c,i,d]),{active:u,rect:x,isOver:f?.id===a,node:N,over:f,setNodeRef:j}}function PF(e){let{animation:t,children:i}=e;const[a,o]=v.useState(null),[c,u]=v.useState(null),d=Wh(i);return!i&&!a&&d&&o(d),Xi(()=>{if(!c)return;const f=a?.key,g=a?.props.id;if(f==null||g==null){o(null);return}Promise.resolve(t(g,c)).then(()=>{o(null)})},[t,a,c]),Ne.createElement(Ne.Fragment,null,i,a?v.cloneElement(a,{ref:u}):null)}const LF={x:0,y:0,scaleX:1,scaleY:1};function zF(e){let{children:t}=e;return Ne.createElement(vd.Provider,{value:Tk},Ne.createElement(lg.Provider,{value:LF},t))}const _F={position:"fixed",touchAction:"none"},UF=e=>ag(e)?"transform 250ms ease":void 0,HF=v.forwardRef((e,t)=>{let{as:i,activatorEvent:a,adjustScale:o,children:c,className:u,rect:d,style:f,transform:g,transition:y=UF}=e;if(!d)return null;const h=o?g:{...g,scaleX:1,scaleY:1},x={..._F,width:d.width,height:d.height,top:d.top,left:d.left,transform:Fs.Transform.toString(h),transformOrigin:o&&a?jH(a,d):void 0,transition:typeof y=="function"?y(a):y,...f};return Ne.createElement(i,{className:u,style:x,ref:t},c)}),FF=e=>t=>{let{active:i,dragOverlay:a}=t;const o={},{styles:c,className:u}=e;if(c!=null&&c.active)for(const[d,f]of Object.entries(c.active))f!==void 0&&(o[d]=i.node.style.getPropertyValue(d),i.node.style.setProperty(d,f));if(c!=null&&c.dragOverlay)for(const[d,f]of Object.entries(c.dragOverlay))f!==void 0&&a.node.style.setProperty(d,f);return u!=null&&u.active&&i.node.classList.add(u.active),u!=null&&u.dragOverlay&&a.node.classList.add(u.dragOverlay),function(){for(const[f,g]of Object.entries(o))i.node.style.setProperty(f,g);u!=null&&u.active&&i.node.classList.remove(u.active)}},BF=e=>{let{transform:{initial:t,final:i}}=e;return[{transform:Fs.Transform.toString(t)},{transform:Fs.Transform.toString(i)}]},VF={duration:250,easing:"ease",keyframes:BF,sideEffects:FF({styles:{active:{opacity:"0"}}})};function KF(e){let{config:t,draggableNodes:i,droppableContainers:a,measuringConfiguration:o}=e;return ig((c,u)=>{if(t===null)return;const d=i.get(c);if(!d)return;const f=d.node.current;if(!f)return;const g=Ck(u);if(!g)return;const{transform:y}=Br(u).getComputedStyle(u),h=fk(y);if(!h)return;const x=typeof t=="function"?t:qF(t);return bk(f,o.draggable.measure),x({active:{id:c,data:d.data,node:f,rect:o.draggable.measure(f)},draggableNodes:i,dragOverlay:{node:u,rect:o.dragOverlay.measure(g)},droppableContainers:a,measuringConfiguration:o,transform:h})})}function qF(e){const{duration:t,easing:i,sideEffects:a,keyframes:o}={...VF,...e};return c=>{let{active:u,dragOverlay:d,transform:f,...g}=c;if(!t)return;const y={x:d.rect.left-u.rect.left,y:d.rect.top-u.rect.top},h={scaleX:f.scaleX!==1?u.rect.width*f.scaleX/d.rect.width:1,scaleY:f.scaleY!==1?u.rect.height*f.scaleY/d.rect.height:1},x={x:f.x-y.x,y:f.y-y.y,...h},S=o({...g,active:u,dragOverlay:d,transform:{initial:f,final:x}}),[E]=S,C=S[S.length-1];if(JSON.stringify(E)===JSON.stringify(C))return;const w=a?.({active:u,dragOverlay:d,...g}),R=d.node.animate(S,{duration:t,easing:i,fill:"forwards"});return new Promise(O=>{R.onfinish=()=>{w?.(),O()}})}}let bR=0;function YF(e){return v.useMemo(()=>{if(e!=null)return bR++,bR},[e])}const GF=Ne.memo(e=>{let{adjustScale:t=!1,children:i,dropAnimation:a,style:o,transition:c,modifiers:u,wrapperElement:d="div",className:f,zIndex:g=999}=e;const{activatorEvent:y,active:h,activeNodeRect:x,containerNodeRect:S,draggableNodes:E,droppableContainers:C,dragOverlay:w,over:R,measuringConfiguration:O,scrollableAncestors:A,scrollableAncestorRects:k,windowRect:N}=Mk(),j=v.useContext(lg),D=YF(h?.id),M=Ak(u,{activatorEvent:y,active:h,activeNodeRect:x,containerNodeRect:S,draggingNodeRect:w.rect,over:R,overlayNodeRect:w.rect,scrollableAncestors:A,scrollableAncestorRects:k,transform:j,windowRect:N}),_=zb(x),L=KF({config:a,draggableNodes:E,droppableContainers:C,measuringConfiguration:O}),q=_?w.setRef:void 0;return Ne.createElement(zF,null,Ne.createElement(PF,{animation:L},h&&D?Ne.createElement(HF,{key:D,id:h.id,ref:q,as:d,activatorEvent:y,adjustScale:t,className:f,transition:c,rect:_,style:{zIndex:g,...o},transform:M},i):null))});function _b(e,t,i){const a=e.slice();return a.splice(i<0?a.length+i:i,0,a.splice(t,1)[0]),a}function $F(e,t){return e.reduce((i,a,o)=>{const c=t.get(a);return c&&(i[o]=c),i},Array(e.length))}function lh(e){return e!==null&&e>=0}function QF(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function XF(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Dk=e=>{let{rects:t,activeIndex:i,overIndex:a,index:o}=e;const c=_b(t,a,i),u=t[o],d=c[o];return!d||!u?null:{x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height}},ch={scaleX:1,scaleY:1},ZF=e=>{var t;let{activeIndex:i,activeNodeRect:a,index:o,rects:c,overIndex:u}=e;const d=(t=c[i])!=null?t:a;if(!d)return null;if(o===i){const g=c[u];return g?{x:0,y:i<u?g.top+g.height-(d.top+d.height):g.top-d.top,...ch}:null}const f=WF(c,o,i);return o>i&&o<=u?{x:0,y:-d.height-f,...ch}:o<i&&o>=u?{x:0,y:d.height+f,...ch}:{x:0,y:0,...ch}};function WF(e,t,i){const a=e[t],o=e[t-1],c=e[t+1];return a?i<t?o?a.top-(o.top+o.height):c?c.top-(a.top+a.height):0:c?c.top-(a.top+a.height):o?a.top-(o.top+o.height):0:0}const jk="Sortable",Ik=Ne.createContext({activeIndex:-1,containerId:jk,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Dk,disabled:{draggable:!1,droppable:!1}});function JF(e){let{children:t,id:i,items:a,strategy:o=Dk,disabled:c=!1}=e;const{active:u,dragOverlay:d,droppableRects:f,over:g,measureDroppableContainers:y}=Mk(),h=yd(jk,i),x=d.rect!==null,S=v.useMemo(()=>a.map(j=>typeof j=="object"&&"id"in j?j.id:j),[a]),E=u!=null,C=u?S.indexOf(u.id):-1,w=g?S.indexOf(g.id):-1,R=v.useRef(S),O=!QF(S,R.current),A=w!==-1&&C===-1||O,k=XF(c);Xi(()=>{O&&E&&y(S)},[O,S,E,y]),v.useEffect(()=>{R.current=S},[S]);const N=v.useMemo(()=>({activeIndex:C,containerId:h,disabled:k,disableTransforms:A,items:S,overIndex:w,useDragOverlay:x,sortedRects:$F(S,f),strategy:o}),[C,h,k.draggable,k.droppable,A,S,w,f,x,o]);return Ne.createElement(Ik.Provider,{value:N},t)}const e7=e=>{let{id:t,items:i,activeIndex:a,overIndex:o}=e;return _b(i,a,o).indexOf(t)},t7=e=>{let{containerId:t,isSorting:i,wasDragging:a,index:o,items:c,newIndex:u,previousItems:d,previousContainerId:f,transition:g}=e;return!g||!a||d!==c&&o===u?!1:i?!0:u!==o&&t===f},n7={duration:200,easing:"ease"},Pk="transform",r7=Fs.Transition.toString({property:Pk,duration:0,easing:"linear"}),i7={roleDescription:"sortable"};function a7(e){let{disabled:t,index:i,node:a,rect:o}=e;const[c,u]=v.useState(null),d=v.useRef(i);return Xi(()=>{if(!t&&i!==d.current&&a.current){const f=o.current;if(f){const g=mc(a.current,{ignoreTransform:!0}),y={x:f.left-g.left,y:f.top-g.top,scaleX:f.width/g.width,scaleY:f.height/g.height};(y.x||y.y)&&u(y)}}i!==d.current&&(d.current=i)},[t,i,a,o]),v.useEffect(()=>{c&&u(null)},[c]),c}function s7(e){let{animateLayoutChanges:t=t7,attributes:i,disabled:a,data:o,getNewIndex:c=e7,id:u,strategy:d,resizeObserverConfig:f,transition:g=n7}=e;const{items:y,containerId:h,activeIndex:x,disabled:S,disableTransforms:E,sortedRects:C,overIndex:w,useDragOverlay:R,strategy:O}=v.useContext(Ik),A=o7(a,S),k=y.indexOf(u),N=v.useMemo(()=>({sortable:{containerId:h,index:k,items:y},...o}),[h,o,k,y]),j=v.useMemo(()=>y.slice(y.indexOf(u)),[y,u]),{rect:D,node:M,isOver:_,setNodeRef:L}=Nk({id:u,data:N,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...f}}),{active:q,activatorEvent:X,activeNodeRect:B,attributes:H,setNodeRef:U,listeners:z,isDragging:Q,over:$,setActivatorNodeRef:K,transform:Y}=kk({id:u,data:N,attributes:{...i7,...i},disabled:A.draggable}),ee=vH(L,U),G=!!q,oe=G&&!E&&lh(x)&&lh(w),I=!R&&Q,V=I&&oe?Y:null,re=oe?V??(d??O)({rects:C,activeNodeRect:B,activeIndex:x,overIndex:w,index:k}):null,we=lh(x)&&lh(w)?c({id:u,items:y,activeIndex:x,overIndex:w}):k,le=q?.id,me=v.useRef({activeId:le,items:y,newIndex:we,containerId:h}),ge=y!==me.current.items,ue=t({active:q,containerId:h,isDragging:Q,isSorting:G,id:u,index:k,items:y,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=a7({disabled:!ue,index:k,node:M,rect:D});return v.useEffect(()=>{G&&me.current.newIndex!==we&&(me.current.newIndex=we),h!==me.current.containerId&&(me.current.containerId=h),y!==me.current.items&&(me.current.items=y)},[G,we,h,y]),v.useEffect(()=>{if(le===me.current.activeId)return;if(le!=null&&me.current.activeId==null){me.current.activeId=le;return}const Pe=setTimeout(()=>{me.current.activeId=le},50);return()=>clearTimeout(Pe)},[le]),{active:q,activeIndex:x,attributes:H,data:N,rect:D,index:k,newIndex:we,items:y,isOver:_,isSorting:G,isDragging:Q,listeners:z,node:M,overIndex:w,over:$,setNodeRef:ee,setActivatorNodeRef:K,setDroppableNodeRef:L,setDraggableNodeRef:U,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===k)return r7;if(!(I&&!ag(X)||!g)&&(G||ue))return Fs.Transition.toString({...g,property:Pk})}}function o7(e,t){var i,a;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(i=e?.draggable)!=null?i:t.draggable,droppable:(a=e?.droppable)!=null?a:t.droppable}}function np(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const l7=[Jt.Down,Jt.Right,Jt.Up,Jt.Left],c7=(e,t)=>{let{context:{active:i,collisionRect:a,droppableRects:o,droppableContainers:c,over:u,scrollableAncestors:d}}=t;if(l7.includes(e.code)){if(e.preventDefault(),!i||!a)return;const f=[];c.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const x=o.get(h.id);if(x)switch(e.code){case Jt.Down:a.top<x.top&&f.push(h);break;case Jt.Up:a.top>x.top&&f.push(h);break;case Jt.Left:a.left>x.left&&f.push(h);break;case Jt.Right:a.left<x.left&&f.push(h);break}});const g=LH({collisionRect:a,droppableRects:o,droppableContainers:f});let y=uk(g,"id");if(y===u?.id&&g.length>1&&(y=g[1].id),y!=null){const h=c.get(i.id),x=c.get(y),S=x?o.get(x.id):null,E=x?.node.current;if(E&&S&&h&&x){const w=sg(E).some((j,D)=>d[D]!==j),R=Lk(h,x),O=u7(h,x),A=w||!R?{x:0,y:0}:{x:O?a.width-S.width:0,y:O?a.height-S.height:0},k={x:S.left,y:S.top};return A.x&&A.y?k:Fu(k,A)}}}};function Lk(e,t){return!np(e)||!np(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function u7(e,t){return!np(e)||!np(t)||!Lk(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Ba({className:e,size:t="default",...i}){return b.jsx("div",{"data-slot":"card","data-size":t,className:Ye("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",e),...i})}function d7({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:Ye("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...t})}function f7({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:Ye("px-(--card-spacing)",e),...t})}const zk=v.createContext(void 0);function h7(){const e=v.useContext(zk);if(e===void 0)throw new Error(bn(63));return e}const p7="data-checked",g7="data-unchecked",_k={...dc,checked(e){return e?{[p7]:""}:{[g7]:""}}},m7=v.forwardRef(function(t,i){const{checked:a,className:o,defaultChecked:c,"aria-labelledby":u,form:d,id:f,inputRef:g,name:y,nativeButton:h=!1,onCheckedChange:x,readOnly:S=!1,required:E=!1,disabled:C=!1,render:w,uncheckedValue:R,value:O,style:A,...k}=t,{clearErrors:N}=fd(),{state:j,setTouched:D,setDirty:M,validityData:_,setFilled:L,validationMode:q,disabled:X,name:B,validation:H}=Wa(),{labelId:U}=Bo(),z=X||C,Q=B??y,$=v.useRef(null),K=Wr($,g,H.inputRef),Y=v.useRef(null),ee=hd(z,Y),G=dr(),oe=fc({id:f}),I=h?void 0:oe,[V,J]=Ga({controlled:a,default:!!c,name:"Switch",state:"checked"});pd(Y,G,V,void 0,!z,y),_e(()=>{L(V)},[V,L]),cc(V,()=>{N(Q),M(V!==_.initialValue),H.change(V)});const{getButtonProps:re,buttonRef:we}=Li({disabled:z,native:h}),le=Cb(u,U,$,!h,I,k["aria-label"]),me={id:h?oe:G,role:"switch","aria-checked":V,"aria-readonly":S||void 0,"aria-required":E||void 0,"aria-labelledby":le,onFocus(){ee(!0)},onBlur(){const ve=$.current;!ve||z||(D(!0),ee(!1),q==="onBlur"&&H.commit(ve.checked))},onClick(ve){if(S||z)return;ve.preventDefault();const Pe=$.current;Pe&&ko(Pe,ve)}},ge={...H.getValidationProps(z),checked:V,disabled:z,form:d,id:I,name:Q,required:E,style:Q?yp:Ju,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:K,onChange(ve){if(ve.nativeEvent.defaultPrevented)return;if(S){ve.preventDefault();return}const Pe=ve.currentTarget.checked,Ae=ct(Mr,ve.nativeEvent);x?.(Pe,Ae),!Ae.isCanceled&&J(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){Y.current?.focus()},...O!==void 0?{value:O}:Qt},ue=v.useMemo(()=>({...j,checked:V,disabled:z,readOnly:S,required:E}),[j,V,z,S,E]),Te=At("span",t,{state:ue,ref:[i,Y,we],props:[me,k,re,ve=>H.getValidationProps(z,ve)],stateAttributesMapping:_k});return b.jsxs(zk.Provider,{value:ue,children:[Te,!V&&Q&&R!==void 0&&b.jsx("input",{type:"hidden",form:d,name:Q,value:R,disabled:z}),b.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),y7=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,d=h7();return At("span",t,{state:d,ref:i,stateAttributesMapping:_k,props:u})});function v7({className:e,...t}){return b.jsx(m7,{"data-slot":"switch",className:Ye(`
34
+ peer relative inline-flex h-4 w-7 shrink-0 items-center rounded-full
35
+ border border-transparent bg-input p-0.5 transition-colors outline-none
36
+ focus-visible:border-ring focus-visible:ring-2
37
+ focus-visible:ring-ring/30 disabled:cursor-not-allowed
38
+ disabled:opacity-50 data-checked:bg-primary
39
+ `,e),...t,children:b.jsx(y7,{"data-slot":"switch-thumb",className:`
40
+ pointer-events-none block size-3 rounded-full bg-background shadow-sm
41
+ transition-transform data-checked:translate-x-3
42
+ `})})}function b7(e){return`library:${e}`}function Uk(e,t){return`assigned:${e}:${t}`}function Hk(e){return`agent:${e}`}function x7(e){return String(e).startsWith("assigned:")}function iv(e){return Ub(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function $l(e){return Ub(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function xR(e){return Ub(e)&&e.type==="agent"&&typeof e.agentId=="string"}function Ub(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const S7="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",E7="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%20Code%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M20.998%2010.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6%2010.949h1.488V8.102H6v2.847zm10.51%200H18V8.102h-1.49v2.847z'%20fill='%23D97757'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e",w7={openai:{src:S7,invertInDark:!0},claudecode:{src:E7,invertInDark:!1}};function Fk({icon:e,className:t}){const i=w7[e];return b.jsx("div",{"aria-hidden":"true",className:Ye(`
43
+ flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
44
+ text-foreground
45
+ `,t),children:i?b.jsx("img",{src:i.src,alt:"",draggable:!1,className:Ye("size-4",i.invertInDark&&"dark:invert")}):b.jsx(rT,{className:"size-4"})})}function R7({agent:e,instructionsById:t,isInstructionsLoading:i,isPending:a,isReapplying:o,onRemoveInstruction:c,onToggle:u,onReapply:d,onOpenFile:f}){const{t:g}=Ct(),{isOver:y,setNodeRef:h}=Nk({id:Hk(e.id),data:{type:"agent",agentId:e.id},disabled:a}),x=e.enabled||e.instructionIds.length>0,S=e.enabled?g("agents.reapplyHint"):g("agents.reapplyDisabledHint"),E=g(x?e.enabled?"agents.toggleOnHint":"agents.toggleOffHint":"agents.enableRequiresInstruction");return b.jsxs(Ba,{"data-agent-id":e.id,ref:h,className:Ye("gap-0 py-0 transition-shadow",y&&"ring-2 ring-ring/40"),children:[b.jsxs("div",{className:"flex items-center gap-3 p-3",children:[b.jsx(Fk,{icon:e.icon}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),b.jsx("button",{type:"button",className:`
46
+ block max-w-full truncate font-mono text-[11px]
47
+ text-muted-foreground
48
+ hover:text-foreground hover:underline
49
+ `,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{f(e.id)},children:e.instructionFile})]}),b.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[b.jsxs(Vh,{children:[b.jsx(Kh,{render:b.jsx("span",{className:"inline-flex"}),children:b.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:a||!e.enabled,onClick:()=>{d(e.id)},children:b.jsx(oL,{className:Ye(o&&"animate-spin")})})}),b.jsx(qh,{children:S})]}),b.jsxs(Vh,{children:[b.jsx(Kh,{render:b.jsx("span",{className:"inline-flex"}),children:b.jsx(v7,{checked:e.enabled,disabled:a||!x,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:C=>{u(e.id,C)}})}),b.jsx(qh,{children:E})]})]})]}),b.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?b.jsx("div",{className:`
50
+ flex min-h-20 items-center justify-center rounded-md border
51
+ border-dashed border-border px-4 text-center text-xs
52
+ text-muted-foreground
53
+ `,children:g("agents.emptyAssigned")}):b.jsx(JF,{items:e.instructionIds.map(C=>Uk(e.id,C)),strategy:ZF,children:b.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((C,w)=>{const R=t.get(C),O=R?.name??C;return b.jsx(C7,{agentId:e.id,index:w,instructionId:C,instructionName:i&&!R?g("agents.loadingInstruction"):O,isPending:a,onRemove:c},C)})})})})]})}function C7({agentId:e,index:t,instructionId:i,instructionName:a,isPending:o,onRemove:c}){const{t:u}=Ct(),{attributes:d,isDragging:f,isOver:g,listeners:y,setNodeRef:h,transform:x,transition:S}=s7({id:Uk(e,i),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:i},disabled:o});return b.jsxs("li",{...d,...y,ref:h,"data-instruction-id":i,style:{transform:Fs.Transform.toString(x),transition:S},className:Ye(`
54
+ group flex items-center gap-2 rounded-md border border-transparent
55
+ bg-muted/40 px-2 py-1.5
56
+ `,g&&"border-ring bg-muted",f&&"z-10",o?"cursor-default":`
57
+ cursor-grab
58
+ active:cursor-grabbing
59
+ `),children:[b.jsx($v,{"aria-hidden":"true",className:`
60
+ size-3.5 shrink-0 text-muted-foreground
61
+ group-active:cursor-grabbing
62
+ `}),b.jsx("span",{className:`
63
+ w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
64
+ `,children:t+1}),b.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:a}),b.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":u("agents.removeInstructionAria",{name:a}),disabled:o,onClick:()=>{c(e,i)},onKeyDown:E=>{E.stopPropagation()},onPointerDown:E=>{E.stopPropagation()},children:b.jsx(qs,{})})]})}const Bk="/api/agents";class Vk extends Error{constructor(t,i){super(i),this.code=t,this.name="AgentApiError"}code}function T7(e){return bd(Bk,{signal:e})}function O7(e,t){return bd(cg(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:t})})}function A7(e,t){return bd(cg(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:t})})}function k7(e){return bd(cg(e,"reapply"),{method:"POST"})}function M7(e){return bd(cg(e,"open-file"),{method:"POST"})}function cg(e,t){return`${Bk}/${encodeURIComponent(e)}/${t}`}async function bd(e,t){const i=await fetch(e,t);if(!i.ok){const a=await N7(i);throw new Vk(a.code,a.message)}return i.json()}async function N7(e){try{const t=await e.json();return{code:t.error?.code??"AGENT_REQUEST_FAILED",message:t.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"AGENT_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const Ur=["agents"],uh=["agents","update"];function D7(){const{t:e}=Ct(),t=mi(),i=Lo({queryKey:Ur,queryFn:({signal:h})=>T7(h),retry:!1});function a(h){t.setQueryData(Ur,x=>x?.map(S=>S.id===h.id?h:S))}const o=wr({mutationKey:uh,mutationFn:({agentId:h,instructionIds:x})=>O7(h,x),onMutate:async({previous:h})=>(await t.cancelQueries({queryKey:Ur}),{previous:h}),onError:(h,x,S)=>{S?.previous&&t.setQueryData(Ur,S.previous),ln.error(e("agents.updateError"))},onSuccess:a,onSettled:()=>t.invalidateQueries({queryKey:Ur})}),c=wr({mutationKey:uh,mutationFn:({agentId:h,enabled:x})=>A7(h,x),onMutate:async({agentId:h,enabled:x})=>{await t.cancelQueries({queryKey:Ur});const S=t.getQueryData(Ur);return t.setQueryData(Ur,E=>E?.map(C=>C.id===h?{...C,enabled:x}:C)),{previous:S}},onError:(h,x,S)=>{S?.previous&&t.setQueryData(Ur,S.previous),ln.error(e("agents.enableError"))},onSuccess:h=>{a(h),ln.success(e(h.enabled?"agents.applied":"agents.removed"))},onSettled:()=>t.invalidateQueries({queryKey:Ur})}),u=wr({mutationKey:uh,mutationFn:h=>k7(h),onSuccess:h=>{a(h),ln.success(e("agents.reapplied"))},onError:()=>{ln.error(e("agents.reapplyError"))},onSettled:()=>t.invalidateQueries({queryKey:Ur})}),d=wr({mutationKey:uh,mutationFn:h=>M7(h),onError:h=>{ln.error(e(h instanceof Vk&&h.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),f=[o,c,u,d],g=new Set;for(const h of f){if(!h.isPending)continue;const x=j7(h.variables);x&&g.add(x)}const y=new Set(u.isPending&&typeof u.variables=="string"?[u.variables]:[]);return{agents:i.data??[],isLoading:i.isPending,isError:i.isError&&i.data===void 0,retry:i.refetch,pendingAgentIds:g,reapplyingAgentIds:y,updateInstructions:(h,x)=>{const S=t.getQueryData(Ur);t.setQueryData(Ur,E=>E?.map(C=>C.id===h?{...C,instructionIds:x,enabled:x.length>0&&C.enabled}:C)),o.mutate({agentId:h,instructionIds:x,previous:S})},setEnabled:(h,x)=>{c.mutate({agentId:h,enabled:x})},reapply:h=>{u.mutate(h)},openFile:h=>{d.mutate(h)}}}function j7(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"agentId"in e){const t=e.agentId;return typeof t=="string"?t:void 0}}function Vu({className:e,description:t,icon:i,title:a}){let o=null;return t!=null&&(o=b.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:t})),b.jsxs("div",{"data-slot":"empty",className:Ye(`
65
+ flex w-full flex-1 flex-col items-center justify-center gap-2 px-4
66
+ py-10 text-center
67
+ `,e),children:[i&&b.jsx("div",{className:`
68
+ flex size-8 items-center justify-center rounded-md bg-muted
69
+ text-muted-foreground
70
+ `,children:b.jsx(i,{"aria-hidden":"true",className:"size-4"})}),b.jsx("div",{className:"text-sm font-medium",children:a}),o]})}function I7(e){const[t,i]=v.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),a=v.useRef(null),o=v.useRef(null),c=v.useRef(null),u=v.useRef(null),d=v.useRef(!0),f=v.useRef(null),g=ic(),y=v.useMemo(()=>({anchor:t,setAnchor:i,actionsRef:c,backdropRef:a,internalBackdropRef:o,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:g}),[t,g]);return b.jsx(tA.Provider,{value:y,children:b.jsx(Yp.Provider,{value:void 0,children:b.jsx(wA,{...e})})})}const SR=500,P7=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,{setAnchor:d,actionsRef:f,internalBackdropRef:g,backdropRef:y,positionerRef:h,allowMouseUpTriggerRef:x,initialCursorPointRef:S,rootId:E}=Gp(!1),{store:C}=Za(!1),w=C.useState("open"),R=C.useState("disabled"),O=v.useRef(null),A=v.useRef(null),k=Un(),N=Un(),j=v.useRef(!1),D=v.useRef(null);function M(U,z,Q){const $=Q.type.startsWith("touch");S.current={x:U,y:z},d({getBoundingClientRect(){return DOMRect.fromRect({width:$?10:0,height:$?10:0,x:U,y:z})}}),j.current=!1,f.current?.setOpen(!0,ct($i,Q)),N.start(SR,()=>{j.current=!0})}function _(U){if(R)return;x.current=!0,qi(U),M(U.clientX,U.clientY,U.nativeEvent);const z=$t(O.current);D.current?.abort();const Q=new AbortController;D.current=Q,z.addEventListener("mouseup",$=>{if(x.current=!1,!j.current)return;N.clear(),j.current=!1;const K=tr($);it(h.current,K)||E&&K&&wb(K)===E||f.current?.setOpen(!1,ct(Ev,$))},{once:!0,signal:Q.signal})}function L(){k.clear(),A.current=null}function q(U){if(R){L();return}if(x.current=!1,U.touches.length!==1){L();return}U.stopPropagation();const z=U.touches[0],Q={x:z.clientX,y:z.clientY};A.current=Q,k.start(SR,()=>{M(Q.x,Q.y,U.nativeEvent)})}function X(U){if(U.touches.length!==1){L();return}if(k.isStarted()&&A.current){const z=U.touches[0],Q=10,$=Math.abs(z.clientX-A.current.x),K=Math.abs(z.clientY-A.current.y);($>Q||K>Q)&&L()}}return v.useEffect(()=>()=>{D.current?.abort()},[]),v.useEffect(()=>{function U(Q){if(R)return;const K=tr(Q);(it(O.current,K)||it(g.current,K)||it(y.current,K))&&Q.preventDefault()}const z=$t(O.current);return Lt(z,"contextmenu",U)},[y,R,g]),At("div",t,{state:{open:w},ref:[O,i],props:[{onContextMenu:_,onTouchStart:q,onTouchMove:X,onTouchEnd:L,onTouchCancel:L,style:{WebkitTouchCallout:"none"}},u],stateAttributesMapping:Mh})}),L7=mA;function ug({...e}){return b.jsx(I7,{"data-slot":"context-menu",...e})}function dg({className:e,...t}){return b.jsx(P7,{"data-slot":"context-menu-trigger",className:Ye("select-none",e),...t})}function fg({className:e,align:t="start",alignOffset:i=4,side:a="right",sideOffset:o=0,...c}){return b.jsx(fA,{children:b.jsx(L7,{className:"isolate z-50 outline-none",align:t,alignOffset:i,side:a,sideOffset:o,children:b.jsx(uA,{"data-slot":"context-menu-content",className:Ye("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c})})})}function hg({className:e,inset:t,variant:i="default",...a}){return b.jsx(lA,{"data-slot":"context-menu-item","data-inset":t,"data-variant":i,className:Ye("group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...a})}function z7({instructions:e,isLoading:t,isError:i,onRetry:a,onEdit:o,onDelete:c,onPreload:u}){const{t:d}=Ct();return t?b.jsx(Ba,{className:"gap-0 py-0",children:b.jsx("div",{className:"divide-y",children:[0,1,2].map(f=>b.jsxs("div",{className:"flex items-center gap-2 p-3",children:[b.jsx(Er,{className:"size-3.5 rounded-sm"}),b.jsx(Er,{className:"h-4 w-2/3"})]},f))})}):i?b.jsxs(Ba,{className:"items-start gap-3 p-4",children:[b.jsx("p",{className:"text-xs text-muted-foreground",children:d("instructions.loadError")}),b.jsxs(ut,{type:"button",variant:"outline",onClick:a,children:[b.jsx(VT,{}),b.jsx("span",{children:d("common.retry")})]})]}):e.length===0?b.jsx(Ba,{className:"gap-0 py-0",children:b.jsx(Vu,{icon:Gv,title:d("instructions.emptyTitle"),description:d("instructions.emptyDescription")})}):b.jsx(Ba,{className:"gap-0 py-0",children:b.jsx("ul",{"aria-label":d("instructions.listAria"),className:"divide-y",children:e.map(f=>b.jsx(_7,{instruction:f,onRequestDelete:()=>c(f),onEdit:()=>{o(f)},onPreload:u},f.id))})})}function _7({instruction:e,onEdit:t,onPreload:i,onRequestDelete:a}){const{t:o}=Ct(),{attributes:c,isDragging:u,listeners:d,setNodeRef:f}=kk({id:b7(e.id),data:{type:"library-instruction",instructionId:e.id}});return b.jsxs(ug,{children:[b.jsxs(dg,{ref:f,render:b.jsx("li",{...d,"data-instruction-id":e.id,className:Ye(`
71
+ group flex cursor-grab items-center gap-2 py-2.5 pr-1 pl-3
72
+ hover:bg-muted/40
73
+ active:cursor-grabbing
74
+ `,u&&"opacity-40")}),children:[b.jsx($v,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground"}),b.jsx("button",{...c,type:"button",className:`
75
+ flex min-w-0 flex-1 cursor-grab items-center gap-2 text-left text-xs
76
+ outline-none
77
+ focus-visible:underline focus-visible:underline-offset-3
78
+ active:cursor-grabbing
79
+ `,onClick:t,onFocus:i,onPointerEnter:i,children:b.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})}),b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":o("instructions.actionsAria",{name:e.name}),className:`
80
+ -my-1.5 shrink-0 text-muted-foreground opacity-0
81
+ transition-opacity
82
+ group-hover:opacity-100
83
+ focus-visible:opacity-100
84
+ data-popup-open:opacity-100
85
+ [@media(hover:none)]:opacity-100
86
+ `,onKeyDown:g=>{g.stopPropagation()},onMouseDown:g=>{g.stopPropagation()},onPointerDown:g=>{g.stopPropagation()},onTouchStart:g=>{g.stopPropagation()}}),children:b.jsx(Yv,{})}),b.jsx(Fo,{align:"end",className:"w-40",children:b.jsx(ER,{Item:uc,onDelete:a,onEdit:t})})]})]}),b.jsx(fg,{children:b.jsx(ER,{Item:hg,onDelete:a,onEdit:t})})]})}function ER({Item:e,onEdit:t,onDelete:i}){const{t:a}=Ct();return b.jsxs(b.Fragment,{children:[b.jsxs(e,{onClick:t,children:[b.jsx(UT,{}),b.jsx("span",{children:a("instructions.edit")})]}),b.jsxs(e,{variant:"destructive",onClick:i,children:[b.jsx(Xv,{}),b.jsx("span",{children:a("instructions.delete")})]})]})}function Kk({className:e,...t}){return b.jsx("label",{"data-slot":"label",className:Ye("flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Bs({children:e,className:t,...i}){return b.jsxs(Kk,{className:Ye("gap-1",t),...i,children:[e,b.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function Ja({...e}){return b.jsx(BA,{"data-slot":"dialog",...e})}function U7({...e}){return b.jsx(FA,{"data-slot":"dialog-portal",...e})}function pg({...e}){return b.jsx(eg,{"data-slot":"dialog-close",...e})}function H7({className:e,...t}){return b.jsx(zA,{"data-slot":"dialog-overlay",className:Ye("fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function es({className:e,children:t,showCloseButton:i=!0,...a}){return b.jsxs(U7,{children:[b.jsx(H7,{}),b.jsxs(HA,{"data-slot":"dialog-content",className:Ye("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[t,i&&b.jsxs(eg,{"data-slot":"dialog-close",render:b.jsx(ut,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ya({className:e,...t}){return b.jsx("div",{"data-slot":"dialog-header",className:Ye("flex flex-col gap-1",e),...t})}function $a({className:e,showCloseButton:t=!1,children:i,...a}){return b.jsxs("div",{"data-slot":"dialog-footer",className:Ye("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...a,children:[i,t&&b.jsx(eg,{render:b.jsx(ut,{variant:"outline"}),children:"Close"})]})}function va({className:e,...t}){return b.jsx(VA,{"data-slot":"dialog-title",className:Ye("font-heading text-sm font-medium",e),...t})}function Qa({className:e,...t}){return b.jsx(_A,{"data-slot":"dialog-description",className:Ye("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const Hb="/api/instructions";class qk extends Error{constructor(t,i){super(i),this.code=t,this.name="InstructionApiError"}code}function F7(e){return Fb(Hb,{signal:e})}function B7(e){return Fb(Hb,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function V7(e,t){return Fb(Yk(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async function K7(e){const t=await fetch(Yk(e),{method:"DELETE"});if(t.ok)return;const i=await Gk(t);throw new qk(i.code,i.message)}async function Fb(e,t){const i=await fetch(e,t);if(!i.ok){const a=await Gk(i);throw new qk(a.code,a.message)}return i.json()}function Yk(e){return`${Hb}/${encodeURIComponent(e)}`}async function Gk(e){try{const t=await e.json();return{code:t.error?.code??"INSTRUCTION_REQUEST_FAILED",message:t.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"INSTRUCTION_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const Ku=["instructions"];function q7(){const e=Lo({queryKey:Ku,queryFn:({signal:t})=>F7(t),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const Y7="modulepreload",G7=function(e){return"/"+e},wR={},$7=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let f=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=f(i.map(g=>{if(g=G7(g),g in wR)return;wR[g]=!0;const y=g.endsWith(".css"),h=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${h}`))return;const x=document.createElement("link");if(x.rel=y?"stylesheet":Y7,y||(x.as="script"),x.crossOrigin="",x.href=g,d&&x.setAttribute("nonce",d),document.head.appendChild(x),y)return new Promise((S,E)=>{x.addEventListener("load",S),x.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&c(d.reason);return t().catch(c)})},$k=()=>$7(()=>import("./code-editor-LITaffq7.js").then(e=>e.j2),__vite__mapDeps([0,1]));function yy(){$k()}const Q7=v.lazy(async()=>({default:(await $k()).CodeEditor}));function Qk(e){const{t}=Ct();return b.jsx(v.Suspense,{fallback:b.jsx("div",{style:{height:e.height??"16rem"},className:`
87
+ flex items-center justify-center text-xs text-muted-foreground
88
+ `,children:t("editor.loading")}),children:b.jsx(Q7,{...e})})}const X7="16rem";function RR({instruction:e,onClose:t}){const{t:i}=Ct(),a=mi(),o=v.useId(),c=v.useId(),u=e!==void 0,[d,f]=v.useState(e?.name??""),[g,y]=v.useState(e?.content??""),h=wr({mutationFn:A=>e?V7(e.id,A):B7(A),onSuccess:A=>{a.setQueryData(Ku,k=>[...(k??[]).filter(N=>N.id!==A.id),A].toSorted((N,j)=>j.updatedAt-N.updatedAt)),a.invalidateQueries({queryKey:Ku}),ln.success(i(u?"instructions.updated":"instructions.created")),t()},onError:()=>{ln.error(i(u?"instructions.updateError":"instructions.error"))}}),x=h.isPending,S=!!(d.trim()&&g.trim())&&!x,E=u?"instructions.editTitle":"instructions.createTitle",C=u?"instructions.updating":"instructions.creating",w=u?"instructions.updateSave":"instructions.save",R=u?Qv:sc;function O(){x||t()}return b.jsx(Ja,{open:!0,onOpenChange:A=>{A||O()},children:b.jsxs(es,{showCloseButton:!1,className:`
89
+ grid max-h-[calc(100vh-2rem)] grid-rows-[auto_minmax(0,1fr)_auto]
90
+ overflow-hidden
91
+ sm:max-w-3xl
92
+ `,children:[b.jsxs("form",{className:"contents","aria-busy":x,onSubmit:A=>{A.preventDefault(),S&&h.mutate({name:d.trim(),content:g})},children:[b.jsx(ya,{className:"pr-8",children:b.jsx(va,{children:i(E)})}),b.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{htmlFor:o,children:i("instructions.name")}),b.jsx(Jp,{id:o,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:x,placeholder:i("instructions.namePlaceholder"),onChange:A=>{f(A.target.value)}})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{id:c,children:i("instructions.content")}),b.jsx("div",{role:"group","aria-labelledby":c,"aria-required":"true",className:`
93
+ overflow-hidden rounded-md border border-input bg-input/20
94
+ focus-within:border-ring focus-within:ring-2
95
+ focus-within:ring-ring/30
96
+ `,children:b.jsx(Qk,{height:X7,value:g,ariaLabel:i("instructions.content"),placeholder:i("instructions.contentPlaceholder"),readOnly:x,onChange:y})})]})]}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:x,onClick:O,children:i("common.cancel")}),b.jsxs(ut,{type:"submit",disabled:!S,children:[x?b.jsx(Qi,{className:"animate-spin"}):b.jsx(R,{}),b.jsx("span",{children:i(x?C:w)})]})]})]}),b.jsxs(pg,{disabled:x,render:b.jsx(ut,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}function Z7({instruction:e,onClose:t}){const{t:i}=Ct(),a=mi(),o=wr({mutationFn:()=>K7(e.id),onSuccess:()=>{a.setQueryData(Ku,u=>u?.filter(({id:d})=>d!==e.id)),a.setQueryData(Ur,u=>u?.map(d=>{const f=d.instructionIds.filter(g=>g!==e.id);return{...d,instructionIds:f,enabled:f.length>0&&d.enabled}})),a.invalidateQueries({queryKey:Ku}),a.invalidateQueries({queryKey:Ur}),ln.success(i("instructions.deleted")),t()},onError:()=>ln.error(i("instructions.deleteError"))}),c=()=>{o.isPending||t()};return b.jsx(Ja,{open:!0,onOpenChange:u=>{u||c()},children:b.jsxs(es,{showCloseButton:!1,children:[b.jsxs(ya,{children:[b.jsx(va,{children:i("instructions.deleteConfirmTitle")}),b.jsx(Qa,{children:i("instructions.deleteConfirmDescription",{name:e.name})})]}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:o.isPending,onClick:c,children:i("common.cancel")}),b.jsxs(ut,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&b.jsx(Qi,{className:"animate-spin"}),b.jsx("span",{children:i("instructions.delete")})]})]})]})})}const W7=e=>{const t=e.active.data.current;if($l(t))return J7(e,t.agentId);const i=e.pointerCoordinates?HH(e):PH(e),a=i.filter(({id:o})=>x7(o));return a.length>0?a:i};function J7(e,t){const i=e.collisionRect.left+e.collisionRect.width/2,a=e.collisionRect.top+e.collisionRect.height/2,o=e.droppableRects.get(Hk(t));if(o&&(i<o.left||i>o.left+o.width||a<o.top||a>o.top+o.height))return[];let c;for(const u of e.droppableContainers){const d=u.data.current;if(!$l(d)||d.agentId!==t)continue;const f=e.droppableRects.get(u.id);if(!f)continue;const g=(f.left+f.width/2-i)**2+(f.top+f.height/2-a)**2;(!c||g<c.distance)&&(c={id:u.id,distance:g})}return c?[{id:c.id}]:[]}function eB(){const{t:e}=Ct(),[t,i]=v.useState(null),[a,o]=v.useState(!1),[c,u]=v.useState(null),[d,f]=v.useState(null),g=q7(),y=D7(),h=DH(hy(Ek,{activationConstraint:{distance:4}}),hy(wk,{activationConstraint:{delay:200,tolerance:8}}),hy(Pb,{coordinateGetter:c7})),x=v.useMemo(()=>new Map(g.instructions.map(N=>[N.id,N])),[g.instructions]),S=d?g.instructions.find(({id:N})=>N===d):void 0,E=t?.data.current,C=tB(E),w=C?x.get(C)?.name??C:"",R=t?.rect.current.initial?.width;function O(N,j,D){const M=y.agents.find(({id:q})=>q===N);if(!M||y.pendingAgentIds.has(N))return;if(M.instructionIds.includes(j)){ln.error(e("agents.duplicateError"));return}const _=[...M.instructionIds],L=D?_.indexOf(D):-1;_.splice(L<0?_.length:L,0,j),y.updateInstructions(N,_)}function A(N,j){const D=y.agents.find(({id:M})=>M===N);!D||y.pendingAgentIds.has(N)||y.updateInstructions(N,D.instructionIds.filter(M=>M!==j))}function k({active:N,over:j}){if(i(null),!j)return;const D=N.data.current,M=j.data.current;if(iv(D)){if(xR(M)){O(M.agentId,D.instructionId);return}$l(M)&&O(M.agentId,D.instructionId,M.instructionId);return}if(!$l(D))return;const _=y.agents.find(({id:H})=>H===D.agentId);if(!_||y.pendingAgentIds.has(_.id))return;const L=_.instructionIds,q=L.indexOf(D.instructionId),X=$l(M)&&M.agentId===D.agentId?L.indexOf(M.instructionId):xR(M)&&M.agentId===D.agentId?L.length-1:-1;if(q===X||q===-1||X===-1)return;const B=_b([...L],q,X);B.length===L.length&&B.every((H,U)=>H===L[U])||y.updateInstructions(_.id,B)}return b.jsxs(MF,{sensors:h,collisionDetection:W7,onDragStart:({active:N})=>{i(N)},onDragCancel:()=>{i(null)},onDragEnd:k,children:[b.jsxs("div",{className:`
97
+ grid min-h-0 flex-1 gap-4 overflow-hidden p-4
98
+ max-md:overflow-y-auto
99
+ md:grid-cols-2
100
+ `,children:[b.jsx(sk,{children:b.jsxs(ut,{type:"button",onFocus:yy,onPointerEnter:yy,onClick:()=>{o(!0)},children:[b.jsx(sc,{}),b.jsx("span",{children:e("instructions.create")})]})}),b.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[b.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),b.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),b.jsx("div",{className:`
101
+ min-h-0 flex-1 overflow-y-auto p-1
102
+ max-md:max-h-64
103
+ `,children:b.jsx(z7,{instructions:g.instructions,isLoading:g.isLoading,isError:g.isError,onRetry:()=>{g.retry()},onEdit:N=>{f(N.id)},onDelete:N=>{u(N)},onPreload:yy})})]}),b.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[b.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),b.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),b.jsxs("div",{className:`
104
+ flex min-h-0 flex-1 flex-col gap-3 p-1
105
+ max-md:pb-2
106
+ md:overflow-y-auto
107
+ `,children:[y.isLoading&&b.jsx(nB,{}),!y.isLoading&&y.isError&&b.jsxs(Ba,{className:"items-start gap-3 p-4",children:[b.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),b.jsxs(ut,{type:"button",variant:"outline",onClick:()=>{y.retry()},children:[b.jsx(VT,{}),b.jsx("span",{children:e("common.retry")})]})]}),!y.isLoading&&!y.isError&&y.agents.map(N=>b.jsx(R7,{agent:N,instructionsById:x,isInstructionsLoading:g.isLoading,isPending:y.pendingAgentIds.has(N.id),isReapplying:y.reapplyingAgentIds.has(N.id),onRemoveInstruction:A,onToggle:(j,D)=>{y.setEnabled(j,D)},onReapply:j=>{y.reapply(j)},onOpenFile:j=>{y.openFile(j)}},N.id))]})]}),c&&b.jsx(Z7,{instruction:c,onClose:()=>u(null)}),a&&b.jsx(RR,{onClose:()=>{o(!1)}}),S&&b.jsx(RR,{instruction:S,onClose:()=>{f(null)}})]}),iv(E)&&b.jsx(GF,{dropAnimation:null,children:w&&b.jsxs("div",{style:{width:R},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[b.jsx($v,{className:"size-3.5 text-muted-foreground"}),b.jsx("span",{className:"truncate",children:w})]})})]})}function tB(e){if(iv(e)||$l(e))return e.instructionId}function nB(){return b.jsx(b.Fragment,{children:[0,1].map(e=>b.jsxs(Ba,{className:"gap-0 py-0",children:[b.jsxs("div",{className:"flex items-center gap-3 p-3",children:[b.jsx(Er,{className:"size-8 rounded-md"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx(Er,{className:"h-4 w-24"}),b.jsx(Er,{className:"mt-2 h-3 w-40"})]}),b.jsx(Er,{className:"h-4 w-7 rounded-full"})]}),b.jsx("div",{className:"border-t border-border/60 p-3",children:b.jsx(Er,{className:"h-20 w-full"})})]},e))})}class rc extends Error{constructor(t,i){super(i),this.code=t,this.name="SkillApiError"}code}async function Gs(e,t){const i=await fetch(e,t);if(!i.ok){const a=await i.json();throw new rc(a.error?.code??"SKILL_REQUEST_FAILED",a.error?.message??`Request failed with status ${i.status}`)}return i.status===204?void 0:i.json()}function rB(e){return Gs("/api/skills",{signal:e})}function iB(e,t){return Gs(`/api/skills/${encodeURIComponent(e)}`,{signal:t})}function aB(e){return Gs("/api/skills",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function sB(e,t){return Gs(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}function oB(e){return Gs(`/api/skills/${encodeURIComponent(e)}`,{method:"DELETE"})}function lB(e){return Gs("/api/skills/agents/assignments",{signal:e})}function cB(e,t,i){return Gs(`/api/skills/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({assigned:i})})}const gg=["skills"],Ql=e=>["skills",e],vy=["skills","agents","assignments"];function uB(e,t){return Gs(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({files:t})})}const dB=["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD","YYYY/MM/DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MM/DD/YYYY hh:mm:ss A","HH:mm:ss"],fB=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],hB=1,pB="settings.changed",gB=64,mB=1024,yB=/^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u;function Xk(e){return e.trim().normalize("NFKC")}function vB(e){const t=Xk(e);return[...t].length<=gB&&t===t.toLowerCase()&&yB.test(t)}function bB(e){return e.length>0&&e.length<=1024&&e.split("/").every(t=>t.length>0&&t.length<=255&&t!=="."&&t!==".."&&!/[\\<>:"|?*]/u.test(t)&&!new RegExp("\\p{Cc}","u").test(t)&&!/[. ]$/u.test(t)&&!/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/iu.test(t))}function xB({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:Ye("flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}function av({skill:e,onClose:t,onSaved:i}){const{t:a}=Ct(),o=lc(),c=mi(),u=v.useId(),d=v.useId(),f=e!==void 0,[g,y]=v.useState(e?.name??""),[h,x]=v.useState(e?.description??""),S=wr({mutationFn:R=>e?sB(e.name,R):aB(R),onSuccess:R=>{const O=e?c.getQueryData(Ql(e.name)):void 0;e&&e.name!==R.name&&c.removeQueries({queryKey:Ql(e.name),exact:!0}),O?.files&&c.setQueryData(Ql(R.name),{...O,...R}),c.invalidateQueries({queryKey:gg}),ln.success(a(f?"skills.updated":"skills.created")),t(),i?.(R),f||o(`/library/skills/${encodeURIComponent(R.name)}`)},onError:R=>{R instanceof rc&&R.code==="SKILL_LINK_CONFLICT"?ln.error(a("skills.linkConflict")):R instanceof rc&&R.code==="SKILL_NAME_CONFLICT"?ln.error(a("skills.nameConflict")):ln.error(a(f?"skills.updateError":"skills.createError"))}}),E=S.isPending,C=vB(g)&&!!h.trim()&&!E;function w(){E||t()}return b.jsx(Ja,{open:!0,onOpenChange:R=>{R||w()},children:b.jsxs(es,{showCloseButton:!1,className:`
108
+ max-h-[calc(100vh-2rem)] overflow-y-auto
109
+ sm:max-w-120
110
+ `,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":E,onSubmit:R=>{R.preventDefault(),C&&S.mutate({name:Xk(g),description:h.trim()})},children:[b.jsxs(ya,{className:"pr-8",children:[b.jsx(va,{children:a(f?"skills.editTitle":"skills.createManually")}),b.jsx(Qa,{children:a(f?"skills.editDescription":"skills.createManuallyDescription")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{htmlFor:u,children:a("skills.name")}),b.jsx(Jp,{id:u,autoFocus:!0,required:!0,"aria-describedby":`${u}-hint`,placeholder:a("skills.namePlaceholder"),value:g,disabled:E,onChange:R=>{y(R.target.value)}}),b.jsx("p",{id:`${u}-hint`,className:"text-xs text-muted-foreground",children:a("skills.nameHint")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{htmlFor:d,children:a("skills.description")}),b.jsx(xB,{id:d,required:!0,rows:3,maxLength:mB,placeholder:a("skills.descriptionPlaceholder"),value:h,disabled:E,onChange:R=>{x(R.target.value)}})]}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:E,onClick:w,children:a("common.cancel")}),b.jsxs(ut,{type:"submit",disabled:!C,children:[E?b.jsx(Qi,{className:"animate-spin"}):f?b.jsx(Qv,{}):b.jsx(sc,{}),b.jsx("span",{children:a(E?f?"skills.updating":"skills.creating":f?"skills.saveChanges":"skills.create")})]})]})]}),b.jsxs(pg,{disabled:E,render:b.jsx(ut,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}const SB=[{titleKey:"skills.createManually",descriptionKey:"skills.createManuallyDescription",icon:sc},{titleKey:"skills.importLocal",descriptionKey:"skills.importLocalDescription",icon:wT},{titleKey:"skills.importUrl",descriptionKey:"skills.importUrlDescription",icon:qv}];function EB({onCreateManually:e}){const{t}=Ct();return b.jsxs(Uo,{children:[b.jsxs(Ho,{render:b.jsx(ut,{type:"button"}),children:[b.jsx(sc,{}),b.jsx("span",{children:t("skills.new")}),b.jsx(Vv,{})]}),b.jsx(Fo,{align:"end",className:"w-max max-w-[min(20rem,calc(100vw-2rem))]",children:SB.map(({titleKey:i,descriptionKey:a,icon:o})=>b.jsxs(uc,{className:"items-start gap-2 p-2",onClick:i==="skills.createManually"?e:void 0,children:[b.jsx(o,{"aria-hidden":"true",className:"mt-0.5 size-4"}),b.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5 whitespace-normal",children:[b.jsx("span",{className:"text-sm",children:t(i)}),b.jsx("span",{className:"text-xs text-muted-foreground",children:t(a)})]})]},i))})]})}const Zk=v.createContext(void 0);function wB(){return v.useContext(Zk)}const RB=v.forwardRef(function(t,i){const{className:a,defaultPressed:o=!1,disabled:c=!1,form:u,onPressedChange:d,pressed:f,render:g,type:y,value:h,nativeButton:x=!0,style:S,...E}=t,C=dr(h||void 0),w=wB(),R=w?.value??[],O=(c||w?.disabled)??!1,[A,k]=Ga({controlled:w?C!==void 0&&R.indexOf(C)>-1:f,default:o,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:j}=Li({disabled:O,native:x}),D={disabled:O,pressed:A},M=[j,i],_=[{"aria-pressed":A,onClick(X){const B=!A,H=ct(Mr,X.nativeEvent);d?.(B,H),!H.isCanceled&&(C&&w?.setGroupValue?.(C,B,H),!H.isCanceled&&k(B))}},E,N],L=At("button",t,{enabled:!w,state:D,ref:M,props:_}),q=v.useMemo(()=>({disabled:O,focusableWhenDisabled:!1}),[O]);return w?b.jsx(Eb,{tag:"button",render:g,className:a,style:S,metadata:q,state:D,refs:M,props:_}):L}),Bb="data-composite-item-active";function CB(e){const{loopFocus:t=!0,orientation:i="both",grid:a,onLoop:o,direction:c,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:f,enableHomeAndEndKeys:g=!1,stopEventPropagation:y,disabledIndices:h,modifierKeys:x=Gi}=e,[S,E]=v.useState(0),C=a!=null,w=v.useRef(null),R=Wr(w,f),O=v.useRef([]),A=v.useRef(!1),k=v.useRef(null),N=u??S,j=Fe((q,X=!1)=>{if(k.current=O.current[q]??null,(d??E)(q),X){const B=O.current[q];zw(w.current,B,c,i)}}),D=Fe(q=>{if(q.size===0)return;if(A.current){const U=O.current,z=U.indexOf(k.current);if(z===-1){const Q=U[N];!Q||Hl(U,N,h)?j(TB(U,h)):k.current=Q}else z!==N&&j(z);return}A.current=!0;const X=Array.from(q.keys()),B=X.find(U=>U?.hasAttribute(Bb))??null,H=B?q.get(B)?.index??-1:-1;if(H!==-1)j(H);else if(Hl(X,N,h)){const U=Ul(X,{disabledIndices:h});_l(X,U)||j(U)}zw(w.current,B,c,i)});_e(()=>{if(h==null||u!=null||!A.current)return;const q=O.current;if(Hl(q,N,h)){const X=Ul(q,{disabledIndices:h});_l(q,X)||j(X)}},[h,u,N,O,j]);const M=Fe((q,X,B)=>o?o(q,X,B,O):B),_=Fe(q=>{const X=q.key===$y||q.key===Qy;if(!ud.has(q.key)||!g&&X||OB(q,x)||!w.current)return;const H=c==="rtl",U=H?Yy:Gy,z=H?Gy:Yy,Q=i==="vertical"?qy:U,$=i==="vertical"?Ky:z,K=tr(q.nativeEvent);if(K!=null&&Lw(K)&&!CA(K)){const V=K.selectionStart,J=K.selectionEnd,re=K.value;if(V==null||q.shiftKey||V!==J||q.key!==$&&V<re.length||q.key!==Q&&V>0)return}let Y=N;const ee=ph(O,h),G=Ay(O,h);a!=null&&(Y=a({disabledIndices:h,elementsRef:O,event:q,highlightedIndex:N,loopFocus:t,maxIndex:G,minIndex:ee,onLoop:M,orientation:i,rtl:H}));const oe=i!=="vertical"&&q.key===U||i!=="horizontal"&&q.key===qy,I=i!=="vertical"&&q.key===z||i!=="horizontal"&&q.key===Ky;g&&(q.key===$y?Y=ee:q.key===Qy&&(Y=G)),Y===N&&(oe||I)&&(t&&Y===G&&oe?(Y=ee,o&&(Y=o(q,N,Y,O))):t&&Y===ee&&I?(Y=G,o&&(Y=o(q,N,Y,O))):Y=Ul(O.current,{startingIndex:Y,decrement:I,disabledIndices:h})),Y!==N&&!_l(O.current,Y)&&(y&&q.stopPropagation(),(C||X||oe||I)&&q.preventDefault(),j(Y,!0),queueMicrotask(()=>{O.current[Y]?.focus()}))});return{props:{ref:R,onFocus(q){const X=w.current,B=tr(q.nativeEvent);!X||B==null||!Lw(B)||B.setSelectionRange(0,B.value.length)},onKeyDown:_},highlightedIndex:N,onHighlightedIndexChange:j,elementsRef:O,onMapChange:D,relayKeyboardEvent:_}}function TB(e,t){let i=-1;for(let a=0;a<e.length;a+=1){const o=e[a];if(!(!o||Hl(e,a,t))){if(o.hasAttribute(Bb))return a;i===-1&&(i=a)}}return Math.max(i,0)}function OB(e,t){for(const i of l6)if(!t.includes(i)&&e.getModifierState(i))return!0;return!1}function Wk(e){const{render:t,className:i,style:a,refs:o=Gi,props:c=Gi,state:u=Qt,stateAttributesMapping:d,highlightedIndex:f,onHighlightedIndexChange:g,orientation:y,grid:h,loopFocus:x,onLoop:S,enableHomeAndEndKeys:E,onMapChange:C,stopEventPropagation:w=!0,rootRef:R,disabledIndices:O,modifierKeys:A,highlightItemOnHover:k=!1,tag:N="div",...j}=e,D=Ip(),{props:M,highlightedIndex:_,onHighlightedIndexChange:L,elementsRef:q,onMapChange:X,relayKeyboardEvent:B}=CB({grid:h,loopFocus:x,onLoop:S,orientation:y,highlightedIndex:f,onHighlightedIndexChange:g,rootRef:R,stopEventPropagation:w,enableHomeAndEndKeys:E,direction:D,disabledIndices:O,modifierKeys:A}),H=At(N,e,{state:u,ref:o,props:[M,...c,j],stateAttributesMapping:d}),U=v.useMemo(()=>({highlightedIndex:_,onHighlightedIndexChange:L,highlightItemOnHover:k,relayKeyboardEvent:B}),[_,L,k,B]);return b.jsx(JO.Provider,{value:U,children:b.jsx(xb,{elementsRef:q,onMapChange:z=>{C?.(z),X(z)},children:H})})}const AB=v.createContext(void 0);function kB(){return v.useContext(AB)}const MB=v.forwardRef(function(t,i){const{defaultValue:a,disabled:o=!1,loopFocus:c=!0,onValueChange:u,orientation:d="horizontal",multiple:f=!1,value:g,className:y,render:h,style:x,...S}=t,E=Xp(),C=kB(),w=a??Gi,R=g!==void 0||a!==void 0,O=(E?.disabled??!1)||(C?.disabled??!1)||o,[A,k]=Ga({controlled:g,default:w,name:"ToggleGroup",state:"value"}),N=Fe((L,q,X)=>{let B;f?(B=A.slice(),q?B.push(L):B.splice(A.indexOf(L),1)):B=q?[L]:[],u?.(B,X),!X.isCanceled&&k(B)}),j={disabled:O,multiple:f,orientation:d},D=v.useMemo(()=>({disabled:O,setGroupValue:N,value:A,isValueInitialized:R}),[O,N,A,R]),M={role:"group"},_=At("div",t,{enabled:!!E,state:j,ref:i,props:[M,S]});return b.jsx(Zk.Provider,{value:D,children:E?_:b.jsx(Wk,{render:h,className:y,style:x,state:j,refs:[i],props:[M,S],loopFocus:c,enableHomeAndEndKeys:!0,orientation:d})})}),NB=dd("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",sm:"h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}}),Jk=v.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function DB({className:e,variant:t,size:i,spacing:a=2,orientation:o="horizontal",children:c,...u}){return b.jsx(MB,{"data-slot":"toggle-group","data-variant":t,"data-size":i,"data-spacing":a,"data-orientation":o,style:{"--gap":a},className:Ye("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch",e),...u,children:b.jsx(Jk.Provider,{value:{variant:t,size:i,spacing:a,orientation:o},children:c})})}function jB({className:e,children:t,variant:i="default",size:a="default",...o}){const c=v.useContext(Jk);return b.jsx(RB,{"data-slot":"toggle-group-item","data-variant":c.variant||i,"data-size":c.size||a,"data-spacing":c.spacing,className:Ye("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",NB({variant:c.variant||i,size:c.size||a}),e),...o,children:t})}function eM({name:e}){const{t}=Ct(),i=mi(),a=Lo({queryKey:vy,queryFn:({signal:f})=>lB(f)}),o=["skill-assignment",e],c=uO({mutationKey:o})>0,u=wr({mutationKey:o,mutationFn:({id:f,assigned:g})=>cB(e,f,g),onSuccess:f=>{i.setQueryData(vy,g=>g&&{...g,skills:g.skills.map(y=>y.name===f.name?f:y)})},onError:f=>{ln.error(t(f instanceof rc&&f.code==="SKILL_LINK_CONFLICT"?"skills.linkConflict":"skills.assignmentError"))},onSettled:()=>i.invalidateQueries({queryKey:vy})});if(a.isPending)return b.jsx(Er,{className:"h-7 w-16"});if(a.isError)return b.jsx(ut,{variant:"ghost",onClick:()=>{a.refetch()},children:t("common.retry")});if(a.data.agents.length===0)return b.jsx("span",{className:"text-xs text-muted-foreground",children:t("skills.noAgents")});const d=a.data.skills.find(f=>f.name===e)?.agentIds??[];return b.jsx(DB,{multiple:!0,value:d,disabled:c,"aria-label":t("skills.assignTitle",{name:e}),onValueChange:f=>{const g=a.data.agents.find(y=>f.includes(y.id)!==d.includes(y.id))?.id;g&&!c&&u.mutate({id:g,assigned:f.includes(g)})},children:a.data.agents.map(f=>b.jsx(jB,{value:f.id,"aria-label":t("skills.assignAgentAria",{agent:f.name,name:e}),className:"size-7 p-0",children:b.jsx(Fk,{icon:f.icon,className:"size-4 rounded-none bg-transparent"})},f.id))})}function IB({skill:e,onEdit:t,onDelete:i,onAssign:a}){const{t:o}=Ct();return b.jsxs(ug,{children:[b.jsxs(dg,{render:b.jsx("div",{role:"listitem",className:`
111
+ group flex h-9 items-center rounded-md px-2 transition-colors
112
+ hover:bg-muted/50
113
+ has-aria-expanded:bg-muted/50
114
+ `}),children:[b.jsxs(cd,{to:`/library/skills/${encodeURIComponent(e.name)}`,className:`
115
+ flex min-w-0 flex-1 items-center gap-2 rounded-sm text-sm
116
+ focus-visible:outline-2 focus-visible:outline-ring
117
+ `,children:[b.jsx("span",{className:"min-w-0 truncate font-medium",children:e.name}),b.jsx("span",{className:"min-w-0 flex-1 basis-0 truncate text-muted-foreground",children:e.description})]}),b.jsx("div",{className:`
118
+ ml-2 hidden shrink-0
119
+ md:block
120
+ `,children:b.jsx(eM,{name:e.name})}),b.jsx("div",{className:`
121
+ flex w-9 shrink-0 justify-end overflow-hidden
122
+ md:w-0
123
+ md:group-focus-within:w-9
124
+ md:group-hover:w-9
125
+ md:group-has-aria-expanded:w-9
126
+ [@media(hover:none)]:w-9
127
+ `,children:b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":o("skills.actionsAria",{name:e.name}),className:"shrink-0 text-muted-foreground"}),children:b.jsx(Yv,{})}),b.jsx(Fo,{align:"end",className:"w-40",children:b.jsx(CR,{Item:uc,onEdit:t,onDelete:i,onAssign:a})})]})})]}),b.jsx(fg,{children:b.jsx(CR,{Item:hg,onEdit:t,onDelete:i,onAssign:a})})]})}function CR({Item:e,onEdit:t,onDelete:i,onAssign:a}){const{t:o}=Ct();return b.jsxs(b.Fragment,{children:[b.jsxs(e,{onClick:a,children:[b.jsx(uL,{}),b.jsx("span",{children:o("skills.assign")})]}),b.jsxs(e,{onClick:t,children:[b.jsx(UT,{}),b.jsx("span",{children:o("skills.edit")})]}),b.jsxs(e,{variant:"destructive",onClick:i,children:[b.jsx(Xv,{}),b.jsx("span",{children:o("skills.delete")})]})]})}function PB({skill:e,onClose:t}){const{t:i}=Ct(),a=mi(),o=wr({mutationFn:()=>oB(e.name),onSuccess:()=>{a.removeQueries({queryKey:Ql(e.name),exact:!0}),a.invalidateQueries({queryKey:gg}),ln.success(i("skills.deleted")),t()},onError:()=>ln.error(i("skills.deleteError"))}),c=()=>{o.isPending||t()};return b.jsx(Ja,{open:!0,onOpenChange:u=>{u||c()},children:b.jsxs(es,{showCloseButton:!1,children:[b.jsxs(ya,{children:[b.jsx(va,{children:i("skills.deleteConfirmTitle")}),b.jsx(Qa,{children:b.jsx(Ab,{i18nKey:"skills.deleteConfirmDescription",values:{name:e.name},components:{skillName:b.jsx("code",{className:`
128
+ rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
129
+ `})}})})]}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:o.isPending,onClick:c,children:i("common.cancel")}),b.jsxs(ut,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&b.jsx(Qi,{className:"animate-spin"}),b.jsx("span",{children:i("skills.delete")})]})]})]})})}function LB({skill:e,onClose:t}){const{t:i}=Ct();return b.jsx(Ja,{open:!0,onOpenChange:a=>{a||t()},children:b.jsxs(es,{children:[b.jsxs(ya,{children:[b.jsx(va,{className:"pr-6 leading-relaxed",children:b.jsx(Ab,{i18nKey:"skills.assignDialogTitle",values:{name:e.name},components:{skillName:b.jsx("code",{className:`
130
+ rounded-sm bg-muted px-1 py-0.5 font-mono text-sm
131
+ wrap-anywhere
132
+ `})}})}),b.jsx(Qa,{children:i("skills.assignDescription")})]}),b.jsx(eM,{name:e.name})]})})}function zB(){const{t:e}=Ct(),[t,i]=v.useState(!1),[a,o]=v.useState(null),[c,u]=v.useState(null),[d,f]=v.useState(null),g=Lo({queryKey:gg,queryFn:({signal:y})=>rB(y)});return b.jsxs(b.Fragment,{children:[b.jsx(sk,{children:b.jsx(EB,{onCreateManually:()=>{i(!0)}})}),b.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4",children:[g.isPending&&b.jsx(Er,{className:"h-16 w-full"}),g.isError&&b.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[b.jsx(Vu,{icon:Iy,title:e("skills.loadError"),className:"flex-none"}),b.jsx(ut,{variant:"outline",onClick:()=>{g.refetch()},children:e("common.retry")})]}),g.isSuccess&&g.data.length===0&&b.jsx(Vu,{icon:Iy,title:e("skills.emptyTitle"),description:e("skills.emptyDescription")}),g.isSuccess&&g.data.length>0&&b.jsx("div",{role:"list",children:g.data.map(y=>b.jsx(IB,{skill:y,onEdit:()=>o(y),onDelete:()=>u(y),onAssign:()=>f(y)},y.name))})]}),t&&b.jsx(av,{onClose:()=>{i(!1)}}),a&&b.jsx(av,{skill:a,onClose:()=>o(null)}),c&&b.jsx(PB,{skill:c,onClose:()=>u(null)}),d&&b.jsx(LB,{skill:d,onClose:()=>f(null)})]})}function rp(e,t){for(const i of e){if(i.path===t)return i;if(!i.children)continue;const a=rp(i.children,t);if(a)return a}}function ip(e,t,i){return e.flatMap(a=>{if(a.path===t){const o=i(a);return o?[o]:[]}return a.children?[{...a,children:ip(a.children,t,i)}]:[a]})}function _B(e,t,i){return t?ip(e,t,a=>a.children?{...a,children:[...a.children,i]}:a):[...e,i]}function UB({files:e,parent:t,kind:i,onCreate:a,onCancel:o}){const{t:c}=Ct(),[u,d]=v.useState(""),[f,g]=v.useState(!1),y=v.useRef(null),h=v.useRef(!1),x=v.useId(),S=u.trim(),E=t?`${t}/${S}`:S,C=bB(S)&&!S.includes("/"),w=S!==""&&rp(e,E)!==void 0,R=w?c("skills.fileConflict"):f&&!C?c("skills.invalidEntryName"):null;v.useEffect(()=>{const A=requestAnimationFrame(()=>y.current?.focus());return()=>cancelAnimationFrame(A)},[]);const O=()=>{h.current||(g(!0),!(!C||w)&&(h.current=!0,a(i==="directory"?{path:E,children:[]}:{path:E,content:""})))};return b.jsxs("form",{onSubmit:A=>{A.preventDefault(),O()},onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),h.current=!0,o())},children:[b.jsxs("div",{className:`
133
+ flex h-7 min-w-0 items-center gap-1.5 border-x border-transparent pl-2
134
+ `,children:[b.jsx("span",{className:"size-3 shrink-0"}),i==="directory"?b.jsx(TT,{className:"size-3.5 shrink-0"}):b.jsx(Gv,{className:"size-3.5 shrink-0"}),b.jsx(Jp,{ref:y,required:!0,"aria-label":c(i==="directory"?"skills.newFolder":"skills.newFile"),"aria-invalid":!!R,"aria-describedby":R?x:void 0,maxLength:255,value:u,className:"min-w-0 flex-1",onKeyDown:A=>{A.key==="Enter"&&A.nativeEvent.isComposing&&A.preventDefault()},onChange:A=>d(A.target.value),onBlur:()=>{S===""&&!h.current?(h.current=!0,o()):O()}})]}),R&&b.jsx("p",{id:x,role:"alert",className:"mt-1 px-2 text-xs text-destructive",children:R})]})}const tM=v.createContext(void 0);function mg(e){const t=v.useContext(tM);if(t===void 0&&!e)throw new Error(bn(47));return t}const HB={...Fa,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Fa.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===$i&&Fa.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod==="touch"&&e.openChangeReason===$i,hasTriggerFocusGuards:(e,t)=>Fa.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class FB extends ac{constructor(t,i,a){const o=new nd;super(BB(t,o,i,a),VB(o),HB)}setOpen=(t,i)=>{const a=i.reason===Kn,o=i.reason===$i&&i.event.detail===0,c=!t&&(i.reason===Zu||i.reason==null),u=Tp(i),d=this.select("activeTriggerId");if(!t&&i.reason===FR&&i.trigger==null&&d!=null&&(i.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(t,i),i.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,i);const f=()=>{const y=Cp(this.state,t,i.trigger,u());y.openChangeReason=i.reason,this.update(y)};a?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(hC,()=>{this.context.stickIfOpen=!1}),ur.flushSync(f)):f();let g;o?g="click":c?g="dismiss":i.reason===zs&&(g="focus"),this.set("instantType",g)}}function BB(e,t,i,a=!1){const o={...Np(t,i,a),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return o.open&&e?.mounted===void 0&&(o.mounted=!0),o}function VB(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new ji,stickIfOpen:!0,triggerElements:e}}const TR=Yu(function({props:t}){const{children:i,open:a,defaultOpen:o=!1,onOpenChange:c,onOpenChangeComplete:u,modal:d=!1,handle:f,triggerId:g,defaultTriggerId:y=null}=t,h=qB(f,{modal:d,open:o,openProp:a,activeTriggerId:y,triggerIdProp:g});h.useControlledProp("openProp",a),h.useControlledProp("triggerIdProp",g);const x=h.useState("open"),S=h.useState("mounted"),E=h.useState("payload");h.useContextCallback("onOpenChange",c),h.useContextCallback("onOpenChangeComplete",u),OC(h,x),Op(h);const{forceUnmount:C}=Ap(x,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),v.useEffect(()=>{x||h.context.stickIfOpenTimeout.clear()},[h,x]),v.useImperativeHandle(t.actionsRef,()=>({unmount:C,close:()=>h.setOpen(!1,ct(Wu))}),[C,h]);const w=x||S||f!=null;return b.jsxs(tM.Provider,{value:h,children:[f&&b.jsx(Rp,{handle:f,store:h}),w&&b.jsx(YB,{store:h,modal:d}),typeof i=="function"?i({payload:E}):i]})});function KB(e){return mg(!0)?b.jsx(TR,{props:e}):b.jsx(wC,{children:b.jsx(TR,{props:e})})}function qB(e,t){const i=Lv((a,o)=>new FB(t,a,o));return v.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i}function YB({store:e,modal:t}){const i=e.useState("floatingRootContext"),a=ed(i,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),o=a.reference,c=a.floating;return kp(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:c}),null}const nM=v.createContext(void 0);function GB(){const e=v.useContext(nM);if(e===void 0)throw new Error(bn(45));return e}const $B=v.forwardRef(function(t,i){const{keepMounted:a=!1,...o}=t;return mg().useState("mounted")||a?b.jsx(nM.Provider,{value:a,children:b.jsx(Sp,{ref:i,...o})}):null}),rM=v.createContext(void 0);function QB(){const e=v.useContext(rM);if(!e)throw new Error(bn(46));return e}const XB=v.forwardRef(function(t,i){const{render:a,className:o,style:c,anchor:u,positionMethod:d,side:f,align:g,sideOffset:y,alignOffset:h,collisionBoundary:x="clipping-ancestors",collisionPadding:S,arrowPadding:E,sticky:C,disableAnchorTracking:w=!1,collisionAvoidance:R=Nv,...O}=t,A=mg(),k=GB(),N=jv(),j=A.useState("floatingRootContext"),D=A.useState("mounted"),M=A.useState("open"),_=A.useState("openChangeReason"),L=A.useState("activeTriggerElement"),q=A.useState("modal"),X=A.useState("openMethod"),B=A.useState("positionerElement"),H=A.useState("instantType"),U=A.useState("transitionStatus"),z=A.useState("adaptiveOrigin"),Q=Pp({anchor:u,floatingRootContext:j,positionMethod:d,mounted:D,side:f,sideOffset:y,align:g,alignOffset:h,arrowPadding:E,collisionBoundary:x,collisionPadding:S,sticky:C,disableAnchorTracking:w,keepMounted:k,nodeId:N,collisionAvoidance:R,adaptiveOrigin:z}),$=j.useState("domReferenceElement");pA({store:A,domReference:$,positionerElement:B,open:M});const K=q===!0&&_!==Kn;Sb(M&&K,X==="touch",B,L);const Y=A.useStateSetter("positionerElement"),ee={open:M,side:Q.side,align:Q.align,anchorHidden:Q.anchorHidden,instant:H},G=Lp(t,ee,{styles:Q.positionerStyles,transitionStatus:U,props:O,refs:[i,Y],hidden:!D,inert:!M});return b.jsxs(rM.Provider,{value:Q,children:[D&&K&&b.jsx(Zp,{inert:zp(!M),cutout:L}),b.jsx(EC,{id:N,children:G})]})}),ZB=v.createContext(void 0);function WB(){const[e,t]=v.useState(0),i=Fe(()=>(t(o=>o+1),()=>{t(o=>Math.max(0,o-1))}));return{context:v.useMemo(()=>({register:i}),[i]),hasClosePart:e>0}}const JB=v.forwardRef(function(t,i){const{render:a,className:o,style:c,initialFocus:u,finalFocus:d,...f}=t,g=mg(),y=QB(),h=Xp()!=null,{context:x,hasClosePart:S}=WB(),E=g.useState("open"),C=g.useState("openMethod"),w=g.useState("instantType"),R=g.useState("transitionStatus"),O=g.useState("popupProps"),A=g.useState("titleElementId"),k=g.useState("descriptionElementId"),N=g.useState("modal"),j=g.useState("mounted"),D=g.useState("openChangeReason"),M=g.useState("activeTriggerElement"),_=g.useState("floatingRootContext"),L=_.useState("floatingId"),q=g.useState("disabled"),X=g.useState("openOnHover"),B=g.useState("closeDelay");Ii({open:E,ref:g.context.popupRef,onComplete(){E&&g.context.onOpenChangeComplete?.(!0)}}),Fv(_,{enabled:X&&!q,closeDelay:B});const H=u===void 0?TC(g.context.popupRef):u,U=N!==!1&&S;g.useSyncedValue("focusManagerModal",U);const z=g.useStateSetter("popupElement"),Q={open:E,side:y.side,align:y.align,instant:w,transitionStatus:R},$=At("div",t,{state:Q,ref:[i,g.context.popupRef,z],props:[O,{id:L,role:"dialog",...td,"aria-labelledby":A,"aria-describedby":k,onKeyDown(K){h&&ud.has(K.key)&&K.stopPropagation()}},rd(R),f],stateAttributesMapping:gp});return b.jsx(Ep,{context:_,openInteractionType:C,modal:U,disabled:!j||D===Kn,initialFocus:H,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:vn(M)?M:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:b.jsx(ZB.Provider,{value:x,children:$})})});function e9({...e}){return b.jsx(KB,{"data-slot":"popover",...e})}function t9({anchor:e,align:t="center",alignOffset:i=0,side:a="bottom",sideOffset:o=4,className:c,...u}){return b.jsx($B,{children:b.jsx(XB,{anchor:e,className:"isolate z-50 outline-none",align:t,alignOffset:i,side:a,sideOffset:o,children:b.jsx(JB,{"data-slot":"popover-content",className:Ye("z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-4 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",c),...u})})})}function n9({entry:e,anchor:t,isOpen:i,onOpenChange:a,onConfirm:o}){const{t:c}=Ct(),u=v.useId(),d=v.useId();return b.jsx(e9,{open:i,onOpenChange:a,children:b.jsx(t9,{anchor:t,align:"start","aria-labelledby":u,"aria-describedby":d,finalFocus:()=>t.current?.querySelector("button")??!1,className:"max-w-[calc(100vw-1.5rem)]",children:b.jsxs("div",{className:"flex flex-col gap-3",children:[b.jsx("h2",{id:u,className:"text-sm font-medium",children:c("skills.delete")}),b.jsx("p",{id:d,className:"text-xs wrap-anywhere text-muted-foreground",children:b.jsx(Ab,{i18nKey:"skills.deleteEntryDescription",values:{path:e.path},components:{entryPath:b.jsx("code",{className:`
135
+ rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
136
+ `})}})}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx(ut,{variant:"ghost",onClick:()=>a(!1),children:c("common.cancel")}),b.jsx(ut,{variant:"destructive",onClick:o,children:c("skills.delete")})]})]})})})}function ap({entry:e,Item:t,onAction:i}){const{t:a}=Ct(),o=e?.path??"";return b.jsxs(b.Fragment,{children:[(!e||e.children)&&b.jsxs(b.Fragment,{children:[b.jsxs(t,{onClick:()=>i({type:"create",parent:o,kind:"file"}),children:[b.jsx(QP,{}),a("skills.newFile")]}),b.jsxs(t,{onClick:()=>i({type:"create",parent:o,kind:"directory"}),children:[b.jsx(ZP,{}),a("skills.newFolder")]})]}),e&&e.path!=="SKILL.md"&&b.jsxs(t,{variant:"destructive",onClick:()=>i({type:"delete",entry:e}),children:[b.jsx(Xv,{}),a("skills.delete")]})]})}function r9({entry:e,onAction:t,children:i,isActive:a=!1}){const{t:o}=Ct(),c=v.useRef(null),[u,d]=v.useState(!1),f=y=>{y.type==="delete"?d(!0):t(y)},g=Ye(jA({variant:"ghost"}),`
137
+ group/file relative flex w-full min-w-0 justify-start p-0
138
+ data-active:bg-muted data-active:text-foreground
139
+ `);return e?.path==="SKILL.md"?b.jsx("div",{className:g,"data-active":a||void 0,children:i}):b.jsxs(b.Fragment,{children:[b.jsxs(ug,{children:[b.jsxs(dg,{render:b.jsx("div",{ref:c,className:g,"data-active":a||void 0}),children:[i,b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ut,{variant:"link",size:"icon","aria-label":o("skills.fileActions",{path:e?.path??o("skills.files")}),className:`
140
+ absolute right-0 shrink-0 text-inherit
141
+ data-popup-open:opacity-100
142
+ md:opacity-0
143
+ md:group-focus-within/file:opacity-100
144
+ md:group-hover/file:opacity-100
145
+ [@media(hover:none)]:opacity-100
146
+ `}),children:b.jsx(Yv,{})}),b.jsx(Fo,{align:"end",children:b.jsx(ap,{Item:uc,entry:e,onAction:f})})]})]}),b.jsx(fg,{children:b.jsx(ap,{Item:hg,entry:e,onAction:f})})]}),e&&b.jsx(n9,{entry:e,anchor:c,isOpen:u,onOpenChange:d,onConfirm:()=>{d(!1),t({type:"delete",entry:e})}})]})}const Vb=v.createContext({creation:null,render:()=>null});Vb.displayName="InlineEntryContext";function i9({files:e,selectedPath:t,onSelect:i,onOverview:a,onAction:o,onCreate:c,overviewDisabled:u=!1}){const{t:d}=Ct(),[f,g]=v.useState(!1),[y,h]=v.useState(null),x=DA(),S=R=>{u||(R.type==="create"?h(R):(h(null),o(R)))},E=b.jsxs(ut,{variant:"ghost",className:`
147
+ shrink-0 justify-start
148
+ md:gap-1.5 md:pl-6.5
149
+ `,"aria-haspopup":"dialog",disabled:u,onClick:()=>{g(!1),a()},children:[b.jsx(GT,{}),b.jsx("span",{children:d("skills.overview")})]}),C=()=>y&&b.jsx(UB,{files:e,parent:y.parent,kind:y.kind,onCancel:()=>h(null),onCreate:R=>{c(R,y.parent),h(null),R.children||g(!1)}},`${y.parent}/${y.kind}`),w=b.jsxs(b.Fragment,{children:[b.jsx(Vb,{value:{creation:y,render:C},children:b.jsx(iM,{parent:"",entries:e,selectedPath:t,onSelect:R=>{g(!1),i(R)},onAction:S})}),b.jsxs(ug,{children:[b.jsx(dg,{render:b.jsx("div",{className:"min-h-16 flex-1"})}),b.jsx(fg,{children:b.jsx(ap,{Item:hg,onAction:S})})]})]});return b.jsxs(b.Fragment,{children:[b.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
150
+ hidden w-56 shrink-0 flex-col gap-2 overflow-y-auto border-r p-3
151
+ md:flex
152
+ `,children:[E,!x&&w]}),b.jsxs("div",{className:`
153
+ flex shrink-0 items-center gap-2 border-b p-2
154
+ md:hidden
155
+ `,children:[E,b.jsxs(ek,{open:f,onOpenChange:R=>{g(R),R||h(null)},children:[b.jsxs(D8,{render:b.jsx(ut,{variant:"outline"}),children:[b.jsx(XP,{}),b.jsx("span",{children:d("skills.files")})]}),b.jsxs(tk,{side:"left","aria-describedby":void 0,children:[b.jsx(nk,{className:"sr-only",children:d("skills.fileNavigation")}),b.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
156
+ flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pt-14
157
+ pb-3
158
+ `,children:[b.jsxs(Uo,{children:[b.jsxs(Ho,{render:b.jsx(ut,{variant:"outline",className:"w-full shrink-0 justify-start"}),children:[b.jsx(sc,{}),b.jsx("span",{children:d("skills.newEntry")})]}),b.jsx(Fo,{align:"start",children:b.jsx(ap,{Item:uc,onAction:S})})]}),w]})]})]})]})]})}function iM({entries:e,parent:t,selectedPath:i,onSelect:a,onAction:o}){const c=v.use(Vb),u=e.toSorted((d,f)=>!!d.children==!!f.children?d.path.localeCompare(f.path):d.children?-1:1);return b.jsxs("ul",{className:"min-w-0 shrink-0",children:[c.creation?.parent===t&&b.jsx("li",{children:c.render()}),u.map(d=>b.jsx(a9,{entry:d,selectedPath:i,onSelect:a,onAction:o},d.path))]})}function a9({entry:e,selectedPath:t,onSelect:i,onAction:a}){const[o,c]=v.useState(!0),u=e.children!==void 0;return b.jsxs("li",{className:"min-w-0",children:[b.jsx(r9,{entry:e,isActive:t===e.path,onAction:d=>{d.type==="create"&&c(!0),a(d)},children:b.jsxs("button",{type:"button","aria-current":!u&&t===e.path?"page":void 0,"aria-expanded":u?o:void 0,className:`
159
+ flex h-7 w-full min-w-0 flex-1 items-center gap-1.5 rounded-md pr-9
160
+ pl-2 text-left text-xs font-normal outline-none
161
+ focus-visible:ring-2 focus-visible:ring-ring
162
+ `,onClick:()=>{u?c(!o):i(e.path)},children:[b.jsx("span",{className:"flex size-3 shrink-0 items-center justify-center",children:u&&b.jsx(Kv,{className:Ye("size-3 transition-transform",o&&`
163
+ rotate-90
164
+ `)})}),u?b.jsx(TT,{className:"size-3.5 shrink-0"}):b.jsx(Gv,{className:"size-3.5 shrink-0"}),b.jsx("span",{className:"truncate",title:e.path,children:e.path.split("/").at(-1)})]})}),u&&o&&b.jsx("div",{className:"ml-3 border-l pl-1",children:b.jsx(iM,{parent:e.path,entries:e.children,selectedPath:t,onSelect:i,onAction:a})})]})}function s9({skill:e}){const{t}=Ct(),i=lc(),a=mi(),[o,c]=v.useState(!1),[u,d]=v.useState("SKILL.md"),[f,g]=v.useState(e.files),[y,h]=v.useState(e.files),[x,S]=v.useState(!1),E=rp(f,u),C=E?.content??"",w=JSON.stringify(f)!==JSON.stringify(y),R=wr({mutationFn:()=>uB(e.name,f),onSuccess:k=>{g(k.files),h(k.files),a.setQueryData(Ql(e.name),k),a.invalidateQueries({queryKey:gg}),ln.success(t("skills.contentSaved"))},onError:()=>ln.error(t("skills.contentSaveError"))}),O=kz(w||R.isPending);w_(v.useCallback(k=>{(w||R.isPending)&&k.preventDefault()},[w,R.isPending]));const A=()=>{w&&!R.isPending&&R.mutate()};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:`
165
+ flex min-h-0 flex-1 flex-col border-t
166
+ md:flex-row
167
+ `,children:[b.jsx(i9,{files:f,overviewDisabled:R.isPending,selectedPath:u,onSelect:d,onCreate:(k,N)=>{R.isPending||(g(j=>_B(j,N,k)),k.children||d(k.path))},onAction:k=>{if(R.isPending||k.type!=="delete")return;const N=k.entry.path;g(j=>ip(j,N,()=>null)),(u===N||u.startsWith(`${N}/`))&&d("SKILL.md")},onOverview:()=>{w?S(!0):c(!0)}}),b.jsxs("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col","aria-labelledby":"skill-file-title",children:[b.jsxs("header",{className:`
168
+ flex h-10 shrink-0 items-center justify-between gap-2 border-b
169
+ px-4
170
+ `,children:[b.jsx("h1",{id:"skill-file-title",className:"min-w-0 truncate font-mono text-xs font-medium",title:u,children:u}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:t(R.isPending?"skills.contentSaving":w?"skills.unsavedChanges":"skills.allChangesSaved")}),b.jsxs(ut,{disabled:!w||R.isPending,onClick:A,children:[R.isPending?b.jsx(Qi,{className:"animate-spin"}):b.jsx(Qv,{}),b.jsx("span",{children:t("skills.saveContent")})]})]})]}),b.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:E?.content===null?b.jsx(Vu,{title:t("skills.fileNotEditable")}):b.jsx(Qk,{height:"100%",path:`foundry://skills/${encodeURIComponent(e.name)}/${u.split("/").map(k=>encodeURIComponent(k)).join("/")}`,value:C,ariaLabel:t("skills.fileEditor",{file:u}),placeholder:u==="SKILL.md"?t("skills.contentPlaceholder"):"",readOnly:R.isPending,showLineNumbers:!0,onChange:k=>g(N=>ip(N,u,j=>({path:j.path,content:k}))),onSave:A},u)})]})]}),o&&b.jsx(av,{skill:e,onClose:()=>c(!1),onSaved:k=>{k.name!==e.name&&i(`/library/skills/${encodeURIComponent(k.name)}`,{replace:!0})}}),b.jsx(Ja,{open:O.state==="blocked"||x,onOpenChange:k=>{k||(O.reset?.(),S(!1))},children:b.jsxs(es,{showCloseButton:!1,children:[b.jsxs(ya,{children:[b.jsx(va,{children:t("skills.leaveTitle")}),b.jsx(Qa,{children:t("skills.leaveDescription")})]}),b.jsxs($a,{children:[b.jsx(ut,{variant:"ghost",onClick:()=>{O.reset?.(),S(!1)},children:t("skills.keepEditing")}),b.jsx(ut,{variant:"destructive",disabled:R.isPending,onClick:()=>{g(y),rp(y,u)||d("SKILL.md"),x?(c(!0),S(!1)):O.proceed?.()},children:t("skills.discardChanges")})]})]})})]})}function o9(){const{t:e}=Ct(),{name:t=""}=yz(),i=Lo({queryKey:Ql(t),queryFn:({signal:a})=>iB(t,a),retry:(a,o)=>!(o instanceof rc&&o.code==="SKILL_NOT_FOUND")&&a<2});if(i.isPending)return b.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4","aria-busy":"true",children:[b.jsx(Er,{className:"h-7 w-48"}),b.jsx(Er,{className:"min-h-24 flex-1"})]});if(i.isError&&i.data===void 0){const a=i.error instanceof rc&&i.error.code==="SKILL_NOT_FOUND";return b.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center p-4",children:[b.jsx(Vu,{icon:Iy,title:e(a?"skills.notFound":"skills.loadError"),className:"flex-none"}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx(ut,{variant:"outline",render:b.jsx(cd,{to:"/library/skills"}),children:e("skills.backToSkills")}),!a&&b.jsx(ut,{onClick:()=>{i.refetch()},children:e("common.retry")})]})]})}return b.jsx(s9,{skill:i.data},i.data.name)}const yg="/api/settings";function l9(e){return xd({signal:e})}function c9(e){return xd({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function u9(){return xd({method:"POST"},`${yg}/config-folder/open`)}function d9(e){return xd({signal:e},`${yg}/skill-copy`)}function f9(e){return xd({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${yg}/skill-copy`)}async function xd(e,t=yg){const i=await fetch(t,e);if(!i.ok)throw new Error(await h9(i));return i.json()}async function h9(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}function $s({label:e,description:t,children:i,className:a,controlClassName:o}){return b.jsxs("div",{className:Ye(`
171
+ flex flex-col items-start gap-3 p-4
172
+ min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
173
+ min-[680px]:justify-between min-[680px]:gap-8
174
+ `,a),children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-sm font-medium",children:e}),t&&b.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t})]}),b.jsx("div",{className:Ye(`
175
+ min-w-0
176
+ max-[680px]:w-full
177
+ min-[680px]:shrink-0
178
+ `,o),children:i})]})}function p9({configFolder:e}){const{t}=Ct(),i=v.useRef(null),a=wr({mutationFn:async f=>{await navigator.clipboard.writeText(f)},onSuccess:()=>{ln.success(t("settings.configFolderCopied"))},onError:()=>{ln.error(t("settings.errors.copyConfigFolder"))}}),o=wr({mutationFn:u9,onError:()=>{ln.error(t("settings.errors.openConfigFolder"))}}),c=a.isSuccess&&a.variables===e,u=!e||a.isPending||o.isPending,d=t(c?"settings.configFolderCopied":"settings.copyConfigFolder");return b.jsx($s,{label:t("settings.configFolder"),controlClassName:"min-[680px]:shrink",children:b.jsxs("div",{className:`
179
+ flex min-w-0 items-center justify-end gap-2
180
+ max-[680px]:justify-start
181
+ `,children:[e&&b.jsx("span",{className:`
182
+ min-w-0 font-mono text-xs break-all text-muted-foreground
183
+ select-text
184
+ `,children:e}),b.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:u,"aria-busy":a.isPending,onClick:()=>{!e||u||(i.current&&clearTimeout(i.current),a.mutate(e,{onSuccess:()=>{i.current=setTimeout(()=>a.reset(),2e3)}}))},children:c?b.jsx(Up,{}):b.jsx(YP,{})}),b.jsxs(ut,{type:"button",variant:"outline",disabled:u,"aria-busy":o.isPending,onClick:()=>{u||o.mutate()},children:[o.isPending?b.jsx(Qi,{className:"animate-spin"}):b.jsx(wT,{}),b.jsx("span",{children:t("settings.openFolder")})]})]})})}function g9(e){if(!e)return null;for(const t of e.elements){const i=t.tagName;if(i==="BUTTON"||i==="INPUT"){const a=t;if(a.type==="submit")return a}}return null}const m9="data-checked",y9="data-unchecked";function aM(e){return{checked(t){return e.indeterminate?{}:t?{[m9]:""}:{[y9]:""}},...dc}}const v9=v.createContext(void 0);function b9(){return v.useContext(v9)}const sM=v.createContext(void 0);function x9(){const e=v.useContext(sM);if(e===void 0)throw new Error(bn(14));return e}const S9="data-parent",E9=v.forwardRef(function(t,i){const{checked:a,className:o,defaultChecked:c=!1,"aria-labelledby":u,disabled:d=!1,form:f,id:g,indeterminate:y=!1,inputRef:h,name:x,onCheckedChange:S,parent:E=!1,readOnly:C=!1,render:w,required:R=!1,uncheckedValue:O,value:A,nativeButton:k=!1,style:N,...j}=t,{clearErrors:D}=fd(),{disabled:M,name:_,setDirty:L,setFilled:q,setTouched:X,state:B,validationMode:H,validityData:U,validation:z}=Wa(),Q=IA(),{labelId:$,registerControlId:K,getDescriptionProps:Y}=Bo(),ee=b9(),G=ee?.allValues===void 0?void 0:ee.parent,oe=G!==void 0,I=M||Q.disabled||ee?.disabled||d,V=_??x,J=A??V,re=dr(),we=ee?.registerControlId!==K,le=fc({id:g||void 0,enabled:we}),me=k?le:re;let ge={};oe&&(E?ge=G.getParentProps():J!==void 0&&(ge=G.getChildProps(J)));const{checked:ue=a,indeterminate:Te=y,onCheckedChange:ve,...Pe}=ge,Ae=ee?.value,Le=v.useRef(null),Be=hd(I,Le),{getButtonProps:Oe,buttonRef:Ue}=Li({disabled:I,native:k}),be=ee?.validation??z,[He,Ze]=Ga({controlled:J!==void 0&&Ae!==void 0&&!E?Ae.includes(J):ue,default:c,name:"Checkbox",state:"checked"}),st=oe?!!ue:He,de=oe&&Te||y;pd(Le,re,He,void 0,!ee&&!I,x);const Ee=G?.registerChildId,Ge=v.useRef(null),Me=be.registerInput,De=ee?J:void 0,vt=v.useCallback(Je=>Me(Je,{controlRef:Le,value:De}),[Me,De]),dt=Wr(h,Ge,E?void 0:vt),pt=Cb(u,$,Ge,!k,le,j["aria-label"]);_e(()=>{Ge.current&&(Ge.current.indeterminate=de),ee||q(He)},[He,de,ee,q]),cc(He,()=>{ee||(D(V),L(He!==U.initialValue),be.change(He))});const Mt=kr({checked:He,disabled:I,form:f,name:E?void 0:V,id:k?void 0:le,required:R,ref:dt,style:V?yp:Ju,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Je){if(Je.nativeEvent.defaultPrevented)return;if(C){Je.preventDefault();return}const St=Je.currentTarget.checked,Xt=ct(Mr,Je.nativeEvent);if(S?.(St,Xt),!Xt.isCanceled&&(ve?.(St,Xt),!Xt.isCanceled&&(Ze(St),J!==void 0&&ee!==void 0&&!E&&!oe))){const ht=St?[...ee.value,J]:ee.value.filter(bt=>bt!==J);ee.setValue(ht,Xt)}},onClick(Je){Je.stopPropagation()},onFocus(){Le.current?.focus()}},A!==void 0?{value:(ee?He&&A:A)||""}:Qt,Y,Je=>be.getValidationProps(I,Je));v.useEffect(()=>{if(!G||J===void 0)return;const Je=G.disabledStatesRef.current;return Je.set(J,I),()=>{Je.delete(J)}},[G,I,J]);const jt=v.useMemo(()=>({...B,checked:st,disabled:I,readOnly:C,required:R,indeterminate:de}),[B,st,I,C,R,de]),en=aM(jt),an=At("span",t,{state:jt,ref:[Ue,Le,i],props:[{id:me,role:"checkbox","aria-checked":de?"mixed":st,"aria-readonly":C||void 0,"aria-required":R||void 0,"aria-labelledby":pt,[S9]:E?"":void 0,onFocus(){Be(!0)},onBlur(){const Je=Ge.current;Je&&(X(!0),Be(!1),H==="onBlur"&&be.commit(ee?Ae:Je.checked))},onKeyDown(Je){if(Je.key!=="Enter"||(Je.preventBaseUIHandler(),Je.defaultPrevented))return;const St=Ge.current?.form??null,Xt=Je.currentTarget,ht=Je.nativeEvent,bt=Je.preventDefault,mt=ht.preventDefault;let Ut=!1;Je.preventDefault=()=>{Ut=!0,bt.call(Je)},ht.preventDefault=()=>{Ut=!0,mt.call(ht)},mt.call(ht),Rn(Xt).queueMicrotask(()=>{Je.preventDefault=bt,ht.preventDefault=mt,Ut||g9(St)?.click()})},onClick(Je){if(C||I)return;Je.preventDefault();const St=Ge.current;St&&ko(St,Je)}},j,Pe,Oe,Y,Je=>be.getValidationProps(I,Je)],stateAttributesMapping:en}),tn=an.props.id;return _e(()=>{if(!(!Ee||E||J===void 0||tn===void 0))return Ee(J,tn)},[Ee,E,J,tn]),b.jsxs(sM.Provider,{value:jt,children:[an,!He&&!ee&&V&&!E&&O!==void 0&&b.jsx("input",{type:"hidden",form:f,name:V,value:O,disabled:I}),b.jsx("input",{...Mt,suppressHydrationWarning:!0})]})}),w9=v.forwardRef(function(t,i){const{render:a,className:o,style:c,keepMounted:u=!1,...d}=t,f=x9(),g=f.checked||f.indeterminate,{mounted:y,transitionStatus:h,setMounted:x}=Po(g),S=v.useRef(null),E={...f,transitionStatus:h};Ii({batch:!0,enabled:!g,open:g,ref:S,onComplete(){g||x(!1)}});const w={...aM(f),...xa},R=u||y,O=At("span",t,{ref:[i,S],state:E,stateAttributesMapping:w,props:d});return R?O:null});function R9({className:e,...t}){return b.jsx(E9,{"data-slot":"checkbox",className:Ye("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...t,children:b.jsx(w9,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:b.jsx(Up,{})})})}function C9({onClose:e}){const{t}=Ct(),i=v.useId(),[a,o]=v.useState(["agents"]),c=Lo({queryKey:["skill-targets"],queryFn:({signal:d})=>d9(d),retry:!1}),u=wr({mutationFn:f9,onSuccess:()=>{ln.success(t("settings.skillDownloaded")),e()},onError:()=>ln.error(t("settings.errors.downloadSkill"))});return b.jsx(Ja,{open:!0,onOpenChange:d=>{!d&&!u.isPending&&e()},children:b.jsxs(es,{showCloseButton:!1,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":u.isPending,onSubmit:d=>{d.preventDefault(),a.length>0&&c.isSuccess&&!u.isPending&&u.mutate({targets:a})},children:[b.jsxs(ya,{children:[b.jsx(va,{children:t("settings.downloadSkill")}),b.jsx(Qa,{children:t("settings.downloadSkillDescription")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{id:i,children:t("settings.skillTargets")}),c.isPending&&b.jsxs("div",{className:"space-y-2",children:[b.jsx(Er,{className:"h-12 w-full"}),b.jsx(Er,{className:"h-12 w-full"})]}),c.isError&&b.jsx(ut,{type:"button",variant:"outline",disabled:c.isFetching,onClick:()=>{c.refetch()},children:t("common.retry")}),c.data&&b.jsx("div",{role:"group","aria-labelledby":i,"aria-required":"true",className:"flex flex-col gap-2",children:c.data.targets.map(({target:d,destination:f})=>b.jsxs(Kk,{className:"flex items-start gap-3 rounded-lg border p-3",children:[b.jsx(R9,{checked:a.includes(d),disabled:u.isPending,onCheckedChange:g=>{o(y=>g?[...y,d]:y.filter(h=>h!==d))}}),b.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[b.jsx("span",{children:d==="agents"?".agents":".claude"}),b.jsx("span",{className:`
185
+ font-mono text-xs font-normal break-all
186
+ text-muted-foreground
187
+ `,children:f})]})]},d))})]}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:u.isPending,onClick:e,children:t("common.cancel")}),b.jsxs(ut,{type:"submit",disabled:a.length===0||!c.isSuccess||u.isPending,children:[u.isPending?b.jsx(Qi,{className:"animate-spin"}):b.jsx(qv,{}),b.jsx("span",{children:t(u.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),b.jsxs(pg,{disabled:u.isPending,render:b.jsx(ut,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function T9({disabled:e=!1}){const{t}=Ct(),[i,a]=v.useState(!1);return b.jsxs($s,{label:b.jsxs("span",{className:"flex items-center gap-1",children:[t("settings.downloadSkill"),b.jsxs(Vh,{children:[b.jsx(Kh,{render:b.jsx(ut,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":t("settings.aboutFoundrySkill")}),children:b.jsx(qP,{})}),b.jsx(qh,{children:t("settings.foundrySkillHint")})]})]}),children:[b.jsxs(ut,{type:"button",variant:"outline",disabled:e,onClick:()=>a(!0),children:[b.jsx(qv,{}),t("settings.downloadSkill")]}),i&&b.jsx(C9,{onClose:()=>a(!1)})]})}function O9({className:e,...t}){return b.jsx("div",{"data-slot":"input-group",role:"group",className:Ye("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}const A9=dd("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function k9({className:e,align:t="inline-start",...i}){return b.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Ye(A9({align:t}),e),onClick:a=>{a.target.closest("button")||a.currentTarget.parentElement?.querySelector("input")?.focus()},...i})}const M9=dd("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function N9({className:e,type:t="button",variant:i="ghost",size:a="xs",...o}){return b.jsx(ut,{type:t,"data-size":a,variant:i,className:Ye(M9({size:a}),e),...o})}function D9({className:e,...t}){return b.jsx(Jp,{"data-slot":"input-group-control",className:Ye("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...t})}function sv({id:e,disabled:t,...i}){const{t:a}=Ct(),o=v.useId(),c=e??o,[u,d]=v.useState(!1),f=a(u?"a11y.hidePassword":"a11y.showPassword");return b.jsxs(O9,{"data-disabled":t,children:[b.jsx(D9,{...i,id:c,type:u?"text":"password",disabled:t}),b.jsx(k9,{align:"inline-end",children:b.jsx(N9,{type:"button",size:"icon-xs","aria-label":f,"aria-controls":c,title:f,disabled:t,onClick:()=>d(g=>!g),children:u?b.jsx(GP,{}):b.jsx($P,{})})})]})}function j9(e,t){const i=URL.createObjectURL(e),a=document.createElement("a");a.href=i,a.download=t,document.body.append(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}async function I9(e){const t=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Unable to export data");const i=t.headers.get("content-disposition")??"",a=/filename="([^"]+)"/u.exec(i)?.[1]??"foundry.foundry-backup";j9(await t.blob(),a)}function P9({onClose:e}){const{t}=Ct(),i=v.useId(),a=v.useId(),[o,c]=v.useState(""),[u,d]=v.useState(""),f=wr({mutationFn:I9,onSuccess:()=>{ln.success(t("dataExport.exported")),e()},onError:()=>{ln.error(t("dataExport.error"))}});return b.jsx(Ja,{open:!0,onOpenChange:g=>{!g&&!f.isPending&&e()},children:b.jsxs(es,{showCloseButton:!1,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f.isPending,onSubmit:g=>{if(g.preventDefault(),!(!o||!u||f.isPending)){if(o!==u){ln.error(t("dataExport.passphraseMismatch"));return}f.mutate({passphrase:o})}},children:[b.jsxs(ya,{children:[b.jsx(va,{children:t("dataExport.title")}),b.jsx(Qa,{children:t("dataExport.description")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{htmlFor:i,children:t("dataExport.passphrase")}),b.jsx(sv,{id:i,autoComplete:"new-password",required:!0,value:o,disabled:f.isPending,onChange:g=>c(g.target.value)})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{htmlFor:a,children:t("dataExport.confirmPassphrase")}),b.jsx(sv,{id:a,autoComplete:"new-password",required:!0,value:u,disabled:f.isPending,"aria-invalid":u.length>0&&o!==u,onChange:g=>d(g.target.value)})]}),b.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[b.jsx(nL,{className:"size-4 shrink-0"}),b.jsx("span",{children:t("dataExport.passphraseHint")})]}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:f.isPending,onClick:e,children:t("common.cancel")}),b.jsxs(ut,{type:"submit",disabled:!o||!u||f.isPending,children:[f.isPending?b.jsx(Qi,{className:"animate-spin"}):b.jsx(vT,{}),b.jsx("span",{children:t(f.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),b.jsxs(pg,{disabled:f.isPending,render:b.jsx(ut,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function L9({disabled:e=!1}){const{t}=Ct(),[i,a]=v.useState(!1);return b.jsxs($s,{label:t("settings.export"),children:[b.jsxs(ut,{type:"button",variant:"outline",disabled:e,onClick:()=>a(!0),children:[b.jsx(vT,{}),t("settings.export")]}),i&&b.jsx(P9,{onClose:()=>a(!1)})]})}class Kb extends Error{constructor(t){super(t),this.code=t}code}async function z9(e,t){const i=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(t)},body:e});return await oM(i),i.json()}async function _9(e){const t=await fetch("/api/data-import/agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});await oM(t)}async function oM(e){if(e.ok)return;let t="IMPORT_FAILED";try{const a=(await e.json()).error?.code;(a==="INVALID_BACKUP"||a==="INVALID_PASSPHRASE"||a==="IMPORT_CHANGED"||a==="AGENT_APPLY_FAILED")&&(t=a)}catch{}throw new Kb(t)}function U9({file:e,onClose:t}){const{t:i}=Ct(),a=v.useId(),[o,c]=v.useState(""),u=wr({mutationFn:()=>z9(e,o),onSuccess:()=>c(""),onError:h=>ln.error(i(by(h)))}),d=wr({mutationFn:h=>_9({apply:h,agentRevision:u.data.agentRevision}),onSuccess:()=>location.replace(`${location.pathname}${location.search}`),onError:h=>ln.error(i(by(h)))}),f=u.isPending||d.isPending||d.isSuccess,g=d.error instanceof Kb&&d.error.code==="IMPORT_CHANGED",y=()=>{f||(g?location.replace(`${location.pathname}${location.search}`):u.isSuccess?d.mutate(!1):t())};return b.jsx(Ja,{open:!0,onOpenChange:h=>{h||y()},children:b.jsxs(es,{showCloseButton:!1,children:[u.isSuccess?b.jsxs("div",{className:"flex flex-col gap-4","aria-busy":f,children:[b.jsxs(ya,{children:[b.jsx(va,{children:i("dataImport.applyTitle")}),b.jsx(Qa,{children:i("dataImport.applyDescription")})]}),d.isError&&b.jsx("p",{role:"alert",className:"text-sm text-destructive",children:i(by(d.error))}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:f,onClick:y,children:i("dataImport.skipAgents")}),b.jsxs(ut,{type:"button",disabled:f||g,onClick:()=>d.mutate(!0),children:[d.isPending&&b.jsx(Qi,{className:"animate-spin"}),b.jsx("span",{children:i("dataImport.applyAgents")})]})]})]}):b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f,onSubmit:h=>{h.preventDefault(),!f&&o&&u.mutate()},children:[b.jsxs(ya,{children:[b.jsx(va,{children:i("dataImport.title")}),b.jsx(Qa,{className:"break-all",children:e.name})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Bs,{htmlFor:a,children:i("dataImport.passphrase")}),b.jsx(sv,{id:a,autoComplete:"current-password",required:!0,value:o,disabled:f,onChange:h=>c(h.target.value)})]}),b.jsx("p",{className:"text-xs text-muted-foreground",children:i("dataImport.replaceWarning")}),b.jsxs($a,{children:[b.jsx(ut,{type:"button",variant:"ghost",disabled:f,onClick:y,children:i("common.cancel")}),b.jsxs(ut,{type:"submit",variant:"destructive",disabled:f||!o,children:[f?b.jsx(Qi,{className:"animate-spin"}):b.jsx(mT,{}),b.jsx("span",{children:i("dataImport.replaceAction")})]})]})]}),b.jsxs(ut,{type:"button",disabled:f,onClick:y,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[b.jsx(qs,{}),b.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}function by(e){if(e instanceof Kb)switch(e.code){case"IMPORT_CHANGED":return"dataImport.changed";case"AGENT_APPLY_FAILED":return"dataImport.applyError";case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function H9({disabled:e=!1}){const{t}=Ct(),i=v.useRef(null),[a,o]=v.useState(null);return b.jsxs($s,{label:t("settings.import"),children:[b.jsx("input",{ref:i,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:c=>{o(c.target.files?.[0]??null),c.target.value=""}}),b.jsxs(ut,{type:"button",variant:"outline",disabled:e,onClick:()=>i.current?.click(),children:[b.jsx(mT,{}),t("settings.import")]}),a&&b.jsx(U9,{file:a,onClose:()=>o(null)})]})}const F9="data-checked",B9="data-unchecked",ov={checked(e){return e?{[F9]:""}:{[B9]:""}},...xa,...dc},lM=v.createContext(void 0);function V9(){return v.useContext(lM)}const cM=v.createContext(void 0);function K9(){const e=v.useContext(cM);if(e===void 0)throw new Error(bn(52));return e}const q9=v.forwardRef(function(t,i){const{render:a,className:o,disabled:c=!1,readOnly:u=!1,required:d=!1,"aria-labelledby":f,value:g,inputRef:y,nativeButton:h=!1,id:x,style:S,...E}=t,C=V9(),{disabled:w,readOnly:R,required:O,form:A,checkedValue:k,touched:N=!1,validation:j,name:D,setCheckedValue:M=wn,setTouched:_=wn,registerInputRef:L=wn}=C??{},{setTouched:q,setFilled:X,state:B,disabled:H}=Wa(),U=IA(),{labelId:z,getDescriptionProps:Q}=Bo(),$=H||U.disabled||w||c,K=R||u,Y=O||d,ee=A,G=C?k===g:g==="",oe=v.useRef(null),I=hd($,oe),V=v.useRef(null),J=j?.registerInput,re=v.useCallback(Ze=>J?.(Ze,{controlRef:oe,value:void 0}),[J]),we=Wr(y,V,L,re);_e(()=>{V.current?.checked&&X(!0)},[X]),_e(()=>{if(V.current){if($&&G){L(null);return}L(V.current)}},[G,$,L]);const le=dr(),me=fc({id:x}),ge=h?void 0:me,ue=Cb(f,z,V,!h,ge,E["aria-label"]),Te={role:"radio","aria-checked":G,"aria-labelledby":ue,[Bb]:G?"":void 0,id:h?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||$||K)return;Ze.preventDefault();const st=V.current;st&&ko(st,Ze)},onFocus(Ze){I(!0),!(Ze.defaultPrevented||$||K||!N)&&(V.current?.click(),_(!1))},onBlur(){C||I(!1)}},{getButtonProps:ve,buttonRef:Pe}=Li({disabled:$,native:h,composite:!1}),Ae={type:"radio",ref:we,form:ee,id:ge,name:D,tabIndex:-1,style:D?yp:Ju,"aria-hidden":!0,...g!==void 0?{value:Gh(g)}:Qt,disabled:$,checked:G,required:Y,readOnly:K,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||$||K||g===void 0)return;const st=ct(Mr,Ze.nativeEvent);M(g,st),!st.isCanceled&&q(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){oe.current?.focus()}},Le=v.useMemo(()=>({...B,required:Y,disabled:$,readOnly:K,checked:G}),[B,$,K,G,Y]),Be=Le,Oe=C!==void 0,Ue=[i,oe,Pe],be=[Te,E,ve,Q,j?Ze=>j.getValidationProps($,Ze):Qt],He=At("span",t,{enabled:!Oe,state:Le,ref:Ue,props:be,stateAttributesMapping:ov});return b.jsxs(cM.Provider,{value:Be,children:[Oe?b.jsx(Eb,{tag:"span",render:a,className:o,style:S,state:Le,refs:Ue,props:be,stateAttributesMapping:ov}):He,b.jsx("input",{...Ae,suppressHydrationWarning:!0})]})}),Y9=v.forwardRef(function(t,i){const{render:a,className:o,style:c,keepMounted:u=!1,...d}=t,f=K9(),g=f.checked,{mounted:y,transitionStatus:h,setMounted:x}=Po(g),S={...f,transitionStatus:h},E=v.useRef(null),C=u||y,w=At("span",t,{ref:[i,E],state:S,props:d,stateAttributesMapping:ov});return Ii({batch:!0,enabled:!g,open:g,ref:E,onComplete(){g||x(!1)}}),C?w:null}),G9=[cA],$9=v.forwardRef(function(t,i){const{render:a,className:o,disabled:c,readOnly:u,required:d,onValueChange:f,value:g,defaultValue:y,form:h,name:x,inputRef:S,id:E,style:C,...w}=t,{setTouched:R,setFocused:O,validationMode:A,name:k,disabled:N,state:j,validation:D,setDirty:M,setFilled:_,validityData:L}=Wa(),{labelId:q}=Bo(),{clearErrors:X,elementRef:B}=fd(),H=yU(!0),U=N||c,z=k??x,Q=dr(E),[$,K]=Ga({controlled:g,default:y,name:"RadioGroup",state:"value"}),[Y,ee]=v.useState(!1),G=Fe((Ae,Le)=>{f?.(Ae,Le),!Le.isCanceled&&K(Ae)}),oe=D.getInputControl,I=v.useMemo(()=>({get current(){return oe()}}),[oe]),V=v.useRef(null),J=v.useRef(null),re=Wr(V,S),we=v.useRef(re),le=Fe(Ae=>{V.current===Ae&&we.current===re||(we.current=re,re?.(Ae))});_e(()=>{le(V.current)},[re,le]);const me=Fe(Ae=>{if(Ae){if(!Ae.disabled){J.current||(J.current=Ae);const Le=V.current;(Ae.checked||Le==null||Le.disabled)&&le(Ae)}return()=>{J.current===Ae&&(J.current=null),V.current===Ae&&le(null)}}}),ge=Fe(()=>{const Ae=B.current;if(!Ae)return $??null;for(const Le of D.registeredInputs.keys())if(Le.checked&&EU(Le,Ae))return $??null;return null});pd(I,Q,$??null,ge,!U,x),cc($,()=>{X(z),M($!==L.initialValue),_($!=null),D.change($);const Ae=J.current;$==null&&Ae&&!Ae.disabled&&le(Ae)});const ue=q??H?.legendId,Te={...j,disabled:U??!1,required:d??!1,readOnly:u??!1},ve=v.useMemo(()=>({checkedValue:$,disabled:U,form:h,validation:D,name:z,readOnly:u,registerInputRef:me,required:d,setCheckedValue:G,setTouched:ee,touched:Y}),[$,U,h,D,z,u,me,d,G,ee,Y]),Pe={id:E,role:"radiogroup","aria-required":d||void 0,"aria-disabled":U||void 0,"aria-readonly":u||void 0,"aria-labelledby":ue,onBlur(Ae){it(Ae.currentTarget,Ae.relatedTarget)||(ee(!1),R(!0),O(!1),A==="onBlur"&&D.commit($))},onKeyDownCapture(Ae){Ae.key.startsWith("Arrow")&&ee(!0)}};return b.jsx(lM.Provider,{value:ve,children:b.jsx(Wk,{render:a,className:o,style:C,state:Te,props:[Pe,w,Ae=>D.getValidationProps(U??!1,Ae)],refs:[i],stateAttributesMapping:dc,enableHomeAndEndKeys:!1,modifierKeys:G9})})});function Q9({className:e,...t}){return b.jsx($9,{"data-slot":"radio-group",className:Ye("grid w-full gap-3",e),...t})}function X9({className:e,...t}){return b.jsx(q9,{"data-slot":"radio-group-item",className:Ye("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-focus-visible/field-label:ring-0 group-has-focus-visible/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",e),...t,children:b.jsx(Y9,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:b.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}const Z9=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function W9({value:e,onValueChange:t,disabled:i=!1}){const{t:a}=Ct();return b.jsx($s,{label:a("settings.colorTheme"),children:b.jsx(Q9,{"aria-label":a("settings.colorTheme"),value:e,onValueChange:t,disabled:i,"aria-busy":i,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:Z9.map(o=>b.jsxs("label",{className:Ye("flex items-center gap-2 text-sm select-none",o.value===e?"font-medium text-foreground":"text-muted-foreground",i?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[b.jsx(X9,{value:o.value,disabled:i}),b.jsx("span",{children:a(o.labelKey)})]},o.value))})})}function J9(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const uM=v.createContext(void 0),dM=v.createContext(void 0);function Ea(){const e=v.useContext(uM);if(e===void 0)throw new Error(bn(60));return e}function fM(){const e=v.useContext(dM);if(e===void 0)throw new Error(bn(61));return e}function eV(e,t,i=Object.is){const{length:a}=e;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(!i(e[o],t[o]))return!1;return!0}const hM=(e,t)=>Object.is(e,t);function Io(e,t,i){return e==null||t==null?Object.is(e,t):i(e,t)}function tV(e,t,i){return Array.isArray(e)&&Array.isArray(t)?!eV(e,t,(a,o)=>Io(a,o,i)):e!==t}function lv(e,t,i){return e?e.some(a=>a===void 0?!1:Io(t,a,i)):!1}function Ah(e,t,i){return e?e.findIndex(a=>a===void 0?!1:Io(a,t,i)):-1}function nV(e,t){if(t!==hM)return a=>lv(e,a,t);const i=new Set(e);return i.delete(void 0),a=>i.has(a)&&(a!==0||e.some(o=>Object.is(a,o)))}function pM(e,t,i,a){const o=a&&Array.isArray(t)?e.findIndex(nV(t,i)):Ah(e,t,i);return o===-1?null:o}function rV(e,t,i,a,o,c){return lv(a,t,o)?c!=null&&e>c&&lv(a,i[c],o)?c:e:e===c?pM(i,a,o,!0):c}function iV(e,t,i){return e.filter(a=>!Io(t,a,i))}const aV={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:i,itemToStringValue:a}=e;return t==null?!1:i&&Array.isArray(t)?t.length>0:Pl(t,a)!==""},hasNullItemLabel:(e,t)=>t?rU(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const i=e.isItemEqualToValue,a=e.value;return e.multiple?Array.isArray(a)&&a.some(o=>Io(t,o,i)):Io(t,a,i)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function Eu(e,t=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,i))}const Yi=1;function qb(e,t){return Math.max(0,e-t)}function sp(e,t){if(t<=0)return 0;const i=Eu(e,0,t),a=i,o=t-i,c=a<=Yi,u=o<=Yi;return c&&u?a<=o?0:t:c?0:u?t:i}function sV(e){const{id:t,value:i,defaultValue:a=null,onValueChange:o,open:c,defaultOpen:u=!1,onOpenChange:d,name:f,form:g,autoComplete:y,disabled:h=!1,readOnly:x=!1,required:S=!1,modal:E=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:R,items:O,multiple:A=!1,itemToStringLabel:k,itemToStringValue:N,isItemEqualToValue:j=hM,highlightItemOnHover:D=!0,children:M}=e,{clearErrors:_}=fd(),{setDirty:L,setTouched:q,setFocused:X,validityData:B,setFilled:H,name:U,disabled:z,validation:Q,validationMode:$}=Wa(),K=fc({id:t}),Y=z||h,ee=U??f,[G,oe]=Ga({controlled:i,default:A?a??Gi:a,name:"Select",state:"value"}),[I,V]=Ga({controlled:c,default:u,name:"Select",state:"open"}),J=v.useRef([]),re=v.useRef([]),we=v.useRef(null),le=v.useRef(null),me=v.useRef(0),ge=v.useRef(null),ue=v.useRef([]),Te=v.useRef(!1),ve=v.useRef(null),Pe=v.useRef(null),Ae=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=v.useRef(!1),Be=v.useRef(G),{openMethod:Oe,triggerProps:Ue}=SA(I),be=er(()=>new ac({id:K,labelId:void 0,modal:E,multiple:A,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,itemToStringLabel:k,itemToStringValue:N,isItemEqualToValue:j,value:G,open:I,mounted:I,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Qt,triggerProps:Qt,itemRoot:{props:Qt,multiple:A,disabled:Y,readOnly:x,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:wn,setOpen:wn,handleScrollArrowVisibility:wn,onOpenChangeComplete:wn,listRef:J,popupRef:we,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ue,labelsRef:re,typingRef:Te,selectionRef:Ae,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Be},aV)).current,[He,Ze]=v.useState(!1),{mounted:st,transitionStatus:de,forceUnmount:Ee}=CC({open:I,ref:we,preventUnmountOnClose:He,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),R?.(!1)}}),Ge=be.useState("activeIndex"),Me=be.useState("selectedIndex"),De=be.useState("triggerElement"),vt=be.useState("positionerElement"),dt=E3(Oe),pt=Oe??dt,Mt=v.useMemo(()=>A?"":Pl(G,N),[A,G,N]),jt=v.useMemo(()=>A&&Array.isArray(G)?G.map(F=>Pl(F,N)):Pl(G,N),[A,G,N]),en=Ln(De),an=Fe(()=>jt);pd(en,K,G,an,!Y,f);const tn=A?Array.isArray(G)&&G.length>0:G!=null&&Mt!=="";_e(()=>{H(tn)},[tn,H]),_e(function(){const W=pM(ue.current,G,j,A);W===null&&(Pe.current=null),!I&&be.set("selectedIndex",W)},[A,I,G,j,be]),cc(G,()=>{_(ee),L(tV(G,B.initialValue,j)),Q.change(G)});const Je=Fe((F,W)=>{const ne=W,ye=Tp(ne);d?.(F,ne),!W.isCanceled&&(F||Ze(ye()),V(F),!F&&(W.reason===zs||W.reason===mp)&&(q(!0),X(!1),$==="onBlur"&&Q.commit(G)))});v.useImperativeHandle(C,()=>({unmount:Ee,close:()=>{be.state.open&&Je(!1,ct(Wu))}}),[Ee,Je,be]);const St=Fe((F,W)=>{o?.(F,W),!W.isCanceled&&oe(F)}),Xt=Fe(F=>{const W=qb(F.scrollHeight,F.clientHeight),ne=sp(F.scrollTop,W),ye=ne>0,xe=ne<W;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ht=iI({open:I,onOpenChange:Je,elements:{reference:De,floating:vt}}),bt=Pv(ht,{enabled:!Y,event:"mousedown"}),mt=ed(ht),Ut=PC(ht,{enabled:!Y,listRef:J,activeIndex:Ge,selectedIndex:Me,disabledIndices:Gi,onNavigate(F){F===null&&!I||be.set("activeIndex",F)},focusItemOnHover:D}),un=LC(ht,{enabled:!Y&&(I||!x&&!A),listRef:re,activeIndex:Ge,selectedIndex:Me,disabledIndices:F=>CA(J.current[F]),onMatch(F){I?be.set("activeIndex",F):St(ue.current[F],ct(Mr))},onTyping(F){Te.current=F}}),je=v.useMemo(()=>kr(un.reference,Ut.reference,mt.reference,bt.reference,Ue),[bt.reference,un.reference,Ut.reference,mt.reference,Ue]),at=v.useMemo(()=>kr(td,un.floating,Ut.floating,mt.floating),[un.floating,Ut.floating,mt.floating]),Ie=Ut.item??Qt,ze=v.useMemo(()=>({props:Ie,multiple:A,disabled:Y,readOnly:x,isItemEqualToValue:j}),[Ie,A,Y,x,j]);be.useContextCallback("setValue",St),be.useContextCallback("setOpen",Je),be.useContextCallback("handleScrollArrowVisibility",Xt),be.useContextCallback("onOpenChangeComplete",R),J9(()=>{be.update({popupProps:at,triggerProps:je,itemRoot:ze})}),be.useSyncedValues({id:K,modal:E,multiple:A,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,value:G,open:I,mounted:st,transitionStatus:de,popupProps:at,triggerProps:je,itemRoot:ze,items:O,itemToStringLabel:k,itemToStringValue:N,isItemEqualToValue:j,openMethod:pt});const $e=Wr(w,Q.inputRef),et=A?void 0:ee,Tt=v.useMemo(()=>!A||!Array.isArray(G)||!ee?null:G.map(F=>{const W=Pl(F,N);return b.jsx("input",{type:"hidden",form:g,name:ee,value:W,disabled:Y},W)}),[A,G,g,ee,N,Y]);return b.jsxs(uM.Provider,{value:be,children:[b.jsx(dM.Provider,{value:ht,children:M}),b.jsx("input",{...Q.getValidationProps(Y,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(F){if(F.nativeEvent.defaultPrevented||Y||x)return;const W=F.currentTarget.value,ne=ct(Mr,F.nativeEvent);function ye(){if(A)return;const xe=W.toLowerCase();let Ke=ue.current.findIndex(Xe=>Pl(Xe,N).toLowerCase()===xe||OA(Xe,k).toLowerCase()===xe);Ke===-1&&(Ke=ue.current.findIndex((Xe,Qe)=>{const ot=re.current[Qe];return ot!=null&&ot.toLowerCase()===xe}));const Ve=ue.current[Ke];Ve!=null&&St(Ve,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:K&&et==null?`${K}-hidden-input`:void 0,form:g,name:et,autoComplete:y,value:Mt,disabled:Y,required:S&&!(A&&tn),readOnly:x,ref:$e,style:ee?yp:Ju,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Tt]})}function oV(e,t){return e??t}const lV="data-popup-side",cV=400,uV={...Mh,...dc,popupSide:e=>e?{[lV]:e}:null,value:()=>null},dV=v.forwardRef(function(t,i){const{render:a,className:o,id:c,disabled:u=!1,nativeButton:d=!0,style:f,...g}=t,{setTouched:y,validationMode:h,validation:x,state:S,disabled:E}=Wa(),{labelId:C}=Bo(),w=Ea(),R=w.useState("readOnly"),O=w.useState("required"),A=w.useState("disabled"),k=E||A||u,N=w.useState("open"),j=w.useState("mounted"),D=w.useState("value"),M=w.useState("triggerProps"),_=w.useState("positionerElement"),L=w.useState("listElement"),q=w.useState("popupSide"),X=w.useState("id"),B=w.useState("labelId"),H=w.useState("hasSelectedValue"),U=j&&_?q:null,z=c??X,Q=oV(C,B);fc({id:c});const $=Ln(_),K=v.useRef(null),Y=hd(k,K),{getButtonProps:ee,buttonRef:G}=Li({disabled:k,native:d}),oe=w.useStateSetter("triggerElement"),I=Un(),V=Un(),J=Un();v.useEffect(()=>{if(N)return J.start(cV,()=>{w.context.selectionRef.current.allowUnselectedMouseUp=!0,w.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{J.clear()};w.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[N,w,V,J]);const re=kr(M,{id:z,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?L?.id??Dh(_)?.id:void 0,"aria-labelledby":Q,"aria-readonly":R||void 0,"aria-required":O||void 0,tabIndex:k?-1:0,onFocus(me){Y(!0),N&&w.context.alignItemWithTriggerActiveRef.current&&w.context.setOpen(!1,ct(Mr,me.nativeEvent)),I.start(0,()=>{w.set("forceMount",!0)})},onBlur(me){it(_,me.relatedTarget)||(y(!0),Y(!1),h==="onBlur"&&x.commit(D))},onMouseDown(me){if(N)return;const ge=$t(me.currentTarget);function ue(Te){if(!K.current)return;const ve=Te.target;it(K.current,ve)||it($.current,ve)||RA(Te,K.current)||w.context.setOpen(!1,ct(Ev,Te))}V.start(0,()=>{ge.addEventListener("mouseup",ue,{once:!0})})}},g,ee),we=x.getValidationProps(k,re);we.role="combobox";const le={...S,open:N,disabled:k,value:D,readOnly:R,popupSide:U,placeholder:!H};return At("button",t,{ref:[i,K,G,oe],state:le,stateAttributesMapping:uV,props:we})}),fV={value:()=>null},hV=v.forwardRef(function(t,i){const{className:a,render:o,children:c,placeholder:u,style:d,...f}=t,g=Ea(),y=g.useState("value"),h=g.useState("items"),x=g.useState("itemToStringLabel"),S=g.useState("hasSelectedValue"),E=!S&&u!=null&&c==null,C=g.useState("hasNullItemLabel",E),w={value:y,placeholder:!S};let R=null;return typeof c=="function"?R=c(y):c!=null?R=c:E&&!C?R=u:Array.isArray(y)?R=iU(y,h,x):R=AA(y,h,x),At("span",t,{state:w,ref:[i,g.context.valueRef],props:[{children:R},f],stateAttributesMapping:fV})}),pV=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,g={open:Ea().useState("open")};return At("span",t,{state:g,ref:i,props:[{"aria-hidden":!0,children:"▼"},u],stateAttributesMapping:Sv})}),gV=v.forwardRef(function(t,i){const a=Ea(),o=a.useState("mounted"),c=a.useState("forceMount");return o||c?b.jsx(Sp,{ref:i,...t}):null}),gM=v.createContext(void 0);function Yb(){const e=v.useContext(gM);if(!e)throw new Error(bn(59));return e}function op(e,t){e&&Object.assign(e.style,t)}const mM={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},mV={position:"fixed"},yV=v.forwardRef(function(t,i){const{anchor:a,className:o,render:c,positionMethod:u,side:d,align:f,sideOffset:g,alignOffset:y,collisionBoundary:h="clipping-ancestors",collisionPadding:x,arrowPadding:S,sticky:E,disableAnchorTracking:C,alignItemWithTrigger:w=!0,collisionAvoidance:R=gC,style:O,...A}=t,k=Ea(),N=fM(),j=k.useState("open"),D=k.useState("mounted"),M=k.useState("modal"),_=k.useState("value"),L=k.useState("openMethod"),q=k.useState("positionerElement"),X=k.useState("triggerElement"),B=k.useState("isItemEqualToValue"),H=k.useState("transitionStatus"),U=v.useRef(null),z=v.useRef(null),[Q,$]=v.useState(w),K=D&&Q&&L!=="touch";!D&&Q!==w&&$(w),v.useImperativeHandle(k.context.alignItemWithTriggerActiveRef,()=>K),Sb((K||M)&&j,L==="touch",q,X);const Y=Pp({anchor:a,floatingRootContext:N,positionMethod:u,mounted:D,side:d,sideOffset:g,align:f,alignOffset:y,arrowPadding:S,collisionBoundary:h,collisionPadding:x,sticky:E,disableAnchorTracking:C??K,collisionAvoidance:R,keepMounted:!0}),ee=K?"none":Y.side,G=K?mV:Y.positionerStyles,oe={open:j,side:ee,align:Y.align,anchorHidden:Y.anchorHidden};_e(()=>{k.set("popupSide",Y.side)},[k,Y.side]);const I=k.useStateSetter("positionerElement"),V=Lp(t,oe,{styles:G,transitionStatus:H,props:A,refs:[i,I],hidden:!D,inert:!j}),J=v.useRef(0),re=Fe(le=>{if(k.context.valuesRef.current.length===0)return;const me=J.current;J.current=le.size;const ge=ct(Mr);if(me!==0&&!k.state.multiple&&_!==null&&Ah(k.context.valuesRef.current,_,B)===-1){const Te=k.context.initialValueRef.current,Pe=Te!=null&&Ah(k.context.valuesRef.current,Te,B)!==-1?Te:null;k.context.setValue(Pe,ge),Pe===null&&(k.set("selectedIndex",null),k.context.selectedItemTextRef.current=null)}if(me!==0&&k.state.multiple&&Array.isArray(_)){const ue=_.filter(Te=>Ah(k.context.valuesRef.current,Te,B)!==-1);ue.length!==_.length&&(k.context.setValue(ue,ge),ue.length===0&&(k.set("selectedIndex",null),k.context.selectedItemTextRef.current=null))}if(j&&K){k.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ue={height:""};op(q,ue),op(k.context.popupRef.current,ue)}}),we=v.useMemo(()=>({...Y,side:ee,alignItemWithTriggerActive:K,setControlledAlignItemWithTrigger:$,scrollUpArrowRef:U,scrollDownArrowRef:z}),[Y,ee,K,$]);return b.jsx(xb,{elementsRef:k.context.listRef,labelsRef:k.context.labelsRef,onMapChange:re,children:b.jsxs(gM.Provider,{value:we,children:[D&&M&&b.jsx(Zp,{inert:zp(!j),cutout:X}),V]})})}),dh="base-ui-disable-scrollbar",cv={className:dh,getElement(e){return b.jsx("style",{nonce:e,href:dh,precedence:"base-ui:low",children:`.${dh}{scrollbar-width:none}.${dh}::-webkit-scrollbar{display:none}`})}},vV=v.createContext(void 0),bV={disableStyleElements:!1};function xV(){return v.useContext(vV)??bV}const OR="--transform-origin",SV={...Qu,...xa},EV=v.forwardRef(function(t,i){const{render:a,className:o,style:c,finalFocus:u,...d}=t,f=Ea(),g=f.useState("multiple"),y=f.useState("readOnly"),h=f.useState("highlightItemOnHover"),x=fM(),{side:S,align:E,alignItemWithTriggerActive:C,isPositioned:w,setControlledAlignItemWithTrigger:R}=Yb(),O=Xp()!=null,A=Ip(),{nonce:k,disableStyleElements:N}=xV(),j=f.useState("id"),D=f.useState("open"),M=f.useState("openMethod"),_=f.useState("mounted"),L=f.useState("popupProps"),q=f.useState("transitionStatus"),X=f.useState("triggerElement"),B=f.useState("positionerElement"),H=f.useState("listElement"),U=v.useRef(!1),z=v.useRef(!1),Q=v.useRef({}),$=Zl(),K=Fe(oe=>{if(!B||!f.context.popupRef.current||!z.current)return;const I=B.style.top==="0px",V=B.style.bottom==="0px";if(U.current||!C||!I&&!V){f.context.handleScrollArrowVisibility(oe);return}const J=kR(B),re=wu(B.getBoundingClientRect().height,"y",J),we=$t(B),le=Rn(B),me=le.getComputedStyle(B),ge=parseFloat(me.marginTop),ue=parseFloat(me.marginBottom),Te=AR(le.getComputedStyle(f.context.popupRef.current)),ve=Math.min(we.documentElement.clientHeight-ge-ue,Te),Pe=oe.scrollTop,Ae=fh(oe);let Le=null;const Be=He=>{B.style.height=`${He}px`},Oe=I?Ae-Pe:Pe,Ue=Math.min(re+Oe,ve);if(Oe<=Yi){const He=Eu(Oe,0,ve-re);He>0&&Be(re+He),oe.scrollTop=I?Ae:0,ve-(re+He)<=Yi&&(U.current=!0),f.context.handleScrollArrowVisibility(oe);return}if(ve-Ue>Yi)Le=I?1/0:0;else if(V&&Pe<Ae){const He=re+Oe-ve;Le=Pe-(Oe-He)}const be=Math.ceil(Ue);if(be!==0&&Be(be),Le!=null){const He=Eu(Le,0,fh(oe));Math.abs(oe.scrollTop-He)>Yi&&(oe.scrollTop=He)}be>=ve-Yi&&(U.current=!0),f.context.handleScrollArrowVisibility(oe)});v.useImperativeHandle(f.context.scrollHandlerRef,()=>K,[K]),Ii({open:D,ref:f.context.popupRef,onComplete(){D&&f.context.onOpenChangeComplete(!0)}});const Y={open:D,transitionStatus:q,side:S,align:E};_e(()=>{!B||!f.context.popupRef.current||Object.keys(Q.current).length||(Q.current={top:B.style.top||"0",left:B.style.left||"0",right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[f,B]),_e(()=>{D||C||(z.current=!1,U.current=!1,op(B,Q.current))},[D,C,B]),_e(()=>{const oe=f.context.popupRef.current;if(!D||!X||!B||!oe||C&&!w||f.state.transitionStatus==="ending")return;if(z.current=!0,oe.style.removeProperty(OR),!C){$.request(()=>f.context.handleScrollArrowVisibility(H||oe));return}const I=wV(oe);try{let V=f.context.selectedItemTextRef.current;V?.isConnected||(V=!f.select("hasSelectedValue")&&f.context.firstItemTextRef.current?.isConnected?f.context.firstItemTextRef.current:null);const J=f.context.valueRef.current,re=Rn(B),we=re.getComputedStyle(B),le=re.getComputedStyle(oe),me=$t(X),ge=kR(X),ue=hh(X.getBoundingClientRect(),ge),Te=hh(B.getBoundingClientRect(),ge),ve=ue.height,Pe=H||oe,Ae=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Be=parseFloat(we.marginTop)||10,Oe=parseFloat(we.marginBottom)||10,Ue=parseFloat(we.minHeight)||100,be=AR(le),He=5,Ze=5,st=20,de=me.documentElement.clientHeight-Be-Oe,Ee=me.documentElement.clientWidth,Ge=de-ue.bottom+ve;let Me,De=A==="rtl"?ue.right-Te.width:ue.left,vt=0;if(V&&J){const ht=hh(J.getBoundingClientRect(),ge);Me=hh(V.getBoundingClientRect(),ge),De=Te.left+(A==="rtl"?ht.right-Me.right:ht.left-Me.left);const bt=ht.top-ue.top+ht.height/2;vt=Me.top-Te.top+Me.height/2-bt}const dt=Ge+vt+Oe+Le;let pt=Math.min(de,dt);const Mt=de-Be-Oe,jt=dt-pt,en=Ee-Ze;B.style.left=`${Eu(De,He,en-Te.width)}px`,B.style.height=`${pt}px`,B.style.maxHeight="none",B.style.marginTop=`${Be}px`,B.style.marginBottom=`${Oe}px`,oe.style.height="100%";const an=fh(Pe),tn=jt>=an-Yi;tn&&(pt=Math.min(de,Te.height)-(jt-an));const Je=ue.top<st||ue.bottom>de-st||Math.ceil(pt)+Yi<Math.min(Ae,Ue),St=(re.visualViewport?.scale??1)!==1&&ba;if(Je||St){op(B,Q.current),R(!1);return}const Xt=Math.max(Ue,pt);if(tn){const ht=Math.max(0,de-dt);B.style.top=Te.height>=Mt?"0":`${ht}px`,B.style.height=`${pt}px`,Pe.scrollTop=fh(Pe)}else B.style.bottom="0",Pe.scrollTop=jt;if(Me){const ht=Te.top,bt=Te.height,mt=Me.top+Me.height/2,Ut=Eu(bt>0?(mt-ht)/bt*100:50,0,100);oe.style.setProperty(OR,`50% ${Ut}%`)}(Xt===de||pt>=be)&&(U.current=!0),f.context.handleScrollArrowVisibility(Pe),h&&f.state.selectedIndex===null&&f.state.activeIndex===null&&f.context.listRef.current[0]!=null&&f.set("activeIndex",0)}finally{I()}},[f,D,B,X,C,R,$,H,h,A,w]),v.useEffect(()=>{if(!C||!B||!D)return;const oe=Rn(B);function I(V){f.context.setOpen(!1,ct(Kj,V))}return Lt(oe,"resize",I)},[f,C,B,D]);const ee={...H?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":y||void 0,id:`${j}-list`},onKeyDown(oe){O&&ud.has(oe.key)&&oe.stopPropagation()},onScroll(oe){H||K(oe.currentTarget)},...C&&{style:H?{height:"100%"}:mM},className:!H&&C?cv.className:void 0},G=At("div",t,{ref:[i,f.context.popupRef],state:Y,stateAttributesMapping:SV,props:[L,ee,rd(q),d]});return b.jsxs(v.Fragment,{children:[!N&&cv.getElement(k),b.jsx(Ep,{context:x,modal:!1,disabled:!_,openInteractionType:M,returnFocus:u,restoreFocus:!0,children:G})]})});function AR(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function fh(e){return qb(e.scrollHeight,e.clientHeight)}function kR(e){return VC.getScale(e)}function wu(e,t,i){return e/i[t]}function hh(e,t){return Pu({x:wu(e.x,"x",t),y:wu(e.y,"y",t),width:wu(e.width,"x",t),height:wu(e.height,"y",t)})}const MR=[["transform","none"],["scale","1"],["translate","0 0"]];function wV(e){const{style:t}=e,i={};for(const[a,o]of MR)i[a]=t.getPropertyValue(a),t.setProperty(a,o,"important");return()=>{for(const[a]of MR){const o=i[a];o?t.setProperty(a,o):t.removeProperty(a)}}}const RV=v.forwardRef(function(t,i){const{render:a,className:o,style:c,...u}=t,d=Ea(),f=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:y}=Yb(),h=d.useState("hasScrollArrows"),x=d.useState("openMethod"),E={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":g||void 0,onScroll(w){d.context.scrollHandlerRef.current?.(w.currentTarget)},...y&&{style:mM},className:h&&x!=="touch"?cv.className:void 0},C=d.useStateSetter("listElement");return At("div",t,{ref:[i,C],props:[E,u]})}),yM=v.createContext(void 0);function vM(){const e=v.useContext(yM);if(!e)throw new Error(bn(57));return e}const CV=v.memo(v.forwardRef(function(t,i){const{render:a,className:o,style:c,value:u=null,label:d,disabled:f=!1,nativeButton:g=!1,...y}=t,h=v.useRef(null),x=Qp({guess:!0,label:d,textRef:h}),S=Ea(),{props:E,multiple:C,disabled:w,readOnly:R,isItemEqualToValue:O}=S.useState("itemRoot"),A=w||f,k=S.useState("isActive",x.index),N=S.useState("open"),j=S.useState("isSelected",u),D=S.useState("isSelectedByFocus",x.index),M=x.index,_=v.useRef(null);_e(()=>{const Y=S.context.valuesRef.current;return Y[M]=u,()=>{delete Y[M]}},[M,u,S]),_e(()=>{const Y=S.state.value,ee=S.state.selectedIndex;let G=ee,oe;C&&Array.isArray(Y)?(G=rV(M,u,S.context.valuesRef.current,Y,O,ee),oe=G===M,M===ee&&!oe&&(S.context.selectedItemTextRef.current=null)):(oe=Y!==void 0&&Io(u,Y,O),oe&&(G=M)),S.set("selectedIndex",G),oe&&h.current&&(S.context.selectedItemTextRef.current=h.current)},[M,C,O,S,u]);const L=v.useRef("mouse"),q=v.useRef(!1),{getButtonProps:X,buttonRef:B}=Li({disabled:A,focusableWhenDisabled:!0,native:g,composite:!0}),H={disabled:A,selected:j,highlighted:k};function U(Y){if(w||R)return;const ee=S.state.value;if(C){const G=Array.isArray(ee)?ee:[],oe=j?iV(G,u,O):[...G,u];S.context.setValue(oe,ct(Ao,Y))}else S.context.setValue(u,ct(Ao,Y)),S.context.setOpen(!1,ct(Ao,Y))}function z(){S.context.selectionRef.current.dragY=0}const Q={role:"option","aria-selected":j,tabIndex:N&&k?0:-1,onKeyDown(Y){S.set("activeIndex",M),Y.key===" "&&S.context.typingRef.current&&Y.preventDefault()},onClick(Y){const ee=L.current!=="touch",G=Y.nativeEvent.pointerType,oe=ee&&Xl(Y.nativeEvent)&&(G!==void 0||k),I=ee&&!oe&&!q.current;q.current=!1,!(A||I)&&U(Y.nativeEvent)},onPointerEnter(Y){L.current=Y.pointerType},onPointerMove(Y){if(Y.pointerType==="mouse"&&Y.buttons===1){const ee=S.context.selectionRef.current;ee.dragY+=Y.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(Y){L.current=Y.pointerType,q.current=!0,z()},onMouseUp(){if(z(),A||L.current==="touch"||q.current)return;const Y=!S.context.selectionRef.current.allowSelectedMouseUp&&j,ee=!S.context.selectionRef.current.allowUnselectedMouseUp&&!j;Y||ee||(q.current=!0,_.current?.click(),q.current=!1)}},$=At("div",t,{ref:[B,i,x.ref,_],state:H,props:[E,Q,y,X]}),K=v.useMemo(()=>({selected:j,index:M,textRef:h,selectedByFocus:D}),[j,M,h,D]);return b.jsx(yM.Provider,{value:K,children:$})})),TV=v.memo(v.forwardRef(function(t,i){const{render:a,className:o,style:c,keepMounted:u,selected:d,...f}=t,g=v.useRef(null),{transitionStatus:y,setMounted:h}=Po(d),S=At("span",t,{ref:[i,g],state:{selected:d,transitionStatus:y},props:[{"aria-hidden":!0,children:"✔️"},f],stateAttributesMapping:xa});return Ii({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),S})),OV=v.forwardRef(function(t,i){const{selected:a}=vM();return t.keepMounted||a?b.jsx(TV,{...t,selected:a,ref:i}):null}),AV=v.memo(v.forwardRef(function(t,i){const{index:a,textRef:o,selectedByFocus:c}=vM(),u=Ea(),{render:d,className:f,style:g,...y}=t,h=v.useCallback(S=>{S&&(a===0&&(u.context.firstItemTextRef.current=S),c&&(u.context.selectedItemTextRef.current=S))},[u,a,c]);return At("div",t,{ref:[h,i,o],props:y})})),bM=v.forwardRef(function(t,i){const{render:a,className:o,style:c,direction:u,keepMounted:d,...f}=t,g=u==="up",y=Ea(),{side:h,scrollDownArrowRef:x,scrollUpArrowRef:S}=Yb(),E=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=y.useState(E),w=y.useState("openMethod"),R=C&&w!=="touch",O=Un(),A=g?S:x,{mounted:k,transitionStatus:N,setMounted:j}=Po(R);_e(()=>(y.context.scrollArrowsMountedCountRef.current+=1,y.set("hasScrollArrows",!0),()=>{y.context.scrollArrowsMountedCountRef.current=Math.max(0,y.context.scrollArrowsMountedCountRef.current-1),y.context.scrollArrowsMountedCountRef.current===0&&y.set("hasScrollArrows",!1)}),[y]),Ii({open:R,ref:A,onComplete(){R||j(!1)}});const _=At("div",t,{ref:[i,A],state:{direction:u,visible:R,side:h,transitionStatus:N},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||O.isStarted())return;y.set("activeIndex",null);function X(){const B=y.state.listElement??y.context.popupRef.current;if(!B)return;y.set("activeIndex",null),y.context.handleScrollArrowVisibility(B);const H=qb(B.scrollHeight,B.clientHeight),U=sp(B.scrollTop,H),z=U===(g?0:H),Q=y.context.listRef.current;if(U!==B.scrollTop&&(B.scrollTop=U),z){O.clear();return}if(Q.length>0){const $=A.current?.offsetHeight||0;B.scrollTop=kV(Q,g,U,B.clientHeight,$,H)}O.start(40,X)}O.start(40,X)},onMouseLeave(){O.clear()}},f],stateAttributesMapping:xa});return k||d?_:null});function kV(e,t,i,a,o,c){if(t){let y=0;const h=i+o-Yi;for(let E=0;E<e.length;E+=1){const C=e[E];if(C&&C.offsetTop>=h){y=E;break}}const x=Math.max(0,y-1),S=e[x];return x<y&&S?sp(S.offsetTop-o,c):0}let u=e.length-1;const d=i+a-o+Yi;for(let y=0;y<e.length;y+=1){const h=e[y];if(h&&h.offsetTop+h.offsetHeight>d){u=Math.max(0,y-1);break}}const f=Math.min(e.length-1,u+1),g=e[f];return f>u&&g?sp(g.offsetTop+g.offsetHeight-a+o,c):c}const MV=v.forwardRef(function(t,i){return b.jsx(bM,{...t,ref:i,direction:"down"})}),NV=v.forwardRef(function(t,i){return b.jsx(bM,{...t,ref:i,direction:"up"})}),Gb=sV;function $b({className:e,...t}){return b.jsx(hV,{"data-slot":"select-value",className:Ye("flex flex-1 text-left",e),...t})}function Qb({className:e,size:t="default",children:i,...a}){return b.jsxs(dV,{"data-slot":"select-trigger","data-size":t,className:Ye("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...a,children:[i,b.jsx(pV,{render:b.jsx(Vv,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function Xb({className:e,children:t,side:i="bottom",sideOffset:a=4,align:o="center",alignOffset:c=0,alignItemWithTrigger:u=!0,...d}){return b.jsx(gV,{children:b.jsx(yV,{side:i,sideOffset:a,align:o,alignOffset:c,alignItemWithTrigger:u,className:"isolate z-50",children:b.jsxs(EV,{"data-slot":"select-content","data-align-trigger":u,className:Ye("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[b.jsx(DV,{}),b.jsx(RV,{children:t}),b.jsx(jV,{})]})})})}function Zb({className:e,children:t,...i}){return b.jsxs(CV,{"data-slot":"select-item",className:Ye("relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...i,children:[b.jsx(AV,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),b.jsx(OV,{render:b.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:b.jsx(Up,{className:"pointer-events-none"})})]})}function DV({className:e,...t}){return b.jsx(NV,{"data-slot":"select-scroll-up-button",className:Ye("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...t,children:b.jsx(VP,{})})}function jV({className:e,...t}){return b.jsx(MV,{"data-slot":"select-scroll-down-button",className:Ye("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...t,children:b.jsx(Vv,{})})}const xM=["en-US","zh-CN","zh-TW","ja-JP"],IV={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},PV={"skills.invalidEntryName":"Enter a valid file or folder name without slashes.","skills.newEntry":"New","skills.newFile":"New file","skills.newFolder":"New folder","skills.fileActions":"Actions for {{path}}","skills.fileConflict":"A file or folder with this name already exists.","skills.fileOperationError":"Unable to update skill files. Please try again.","skills.deleteEntryDescription":"Remove <entryPath>{{path}}</entryPath> and its contents. Deletion takes effect when you save the skill.","skills.createEntryDescription":"Create in {{path}}. Enter a single file or folder name.","skills.entryName":"Name","skills.fileWorking":"Working…","skills.createEntry":"Create","skills.fileNotEditable":"This file is binary or exceeds the 2 MiB editing limit.","skills.fileLoadError":"Unable to load this file.","editor.loading":"Loading editor…","skills.saveContent":"Save","skills.contentSaving":"Saving…","skills.contentSaved":"Content saved.","skills.contentSaveError":"Unable to save content. Please try again.","skills.unsavedChanges":"Unsaved changes","skills.allChangesSaved":"All changes saved","skills.contentPlaceholder":"Write skill instructions in Markdown.","skills.fileEditor":"Edit {{file}}","skills.leaveTitle":"Discard unsaved changes?","skills.leaveDescription":"Your changes have not been saved. Save them before leaving, or discard them to continue.","skills.keepEditing":"Keep editing","skills.discardChanges":"Discard changes","skills.overview":"Overview","skills.files":"Files","skills.fileNavigation":"Skill files","skills.assign":"Assign","skills.assignTitle":"Assign {{name}}","skills.assignDialogTitle":"Assign <skillName>{{name}}</skillName>","skills.assignDescription":"Select agents to create skill links. Deselect an agent to remove its link. Changes apply immediately.","skills.assignAgentAria":"Assign {{name}} to {{agent}}","skills.assignmentError":"Unable to update skill assignment. Please try again.","skills.noAgents":"No agents available.","skills.linkConflict":"An unrelated skill entry exists in an agent folder. Resolve the conflict and retry.","skills.edit":"Edit","skills.editTitle":"Edit skill","skills.editDescription":"Update the name and description. Changes also sync to agents this skill is assigned to.","skills.saveChanges":"Save changes","skills.updating":"Saving…","skills.updated":"Skill updated.","skills.updateError":"Unable to update the skill. Please try again.","skills.delete":"Delete","skills.deleted":"Skill deleted.","skills.deleteError":"Unable to delete the skill. Please try again.","skills.deleteConfirmTitle":"Delete skill","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> and all files in its folder will be permanently deleted. The skill will also be removed from assigned agents.","skills.actionsAria":"Actions for {{name}}","nav.dashboard":"Dashboard","nav.library":"Library","nav.skills":"Skills","skills.name":"Name","skills.namePlaceholder":"e.g. knowledge-wiki","skills.nameHint":"Unique in your skill library. Use 1–64 Unicode letters or digits, lowercase where applicable, with single hyphens between words.","skills.description":"Description","skills.descriptionPlaceholder":"Describe when an agent should use this skill.","skills.create":"Create skill","skills.creating":"Creating…","skills.created":"Skill created.","skills.createError":"Unable to create the skill. Please try again.","skills.nameConflict":"A skill with this name already exists. Choose a different name.","skills.loadError":"Unable to load skills. Please try again.","skills.emptyTitle":"No skills yet","skills.emptyDescription":"Create a skill to start building your library.","skills.notFound":"Skill not found","skills.backToSkills":"Back to Skills","skills.content":"Content","skills.noContent":"No content yet","skills.new":"New skill","skills.createManually":"Create manually","skills.createManuallyDescription":"Start from a blank SKILL.md.","skills.importLocal":"Import from local","skills.importLocalDescription":"Pick a folder with SKILL.md, or a .skill / .zip archive.","skills.importUrl":"Import from URL","skills.importUrlDescription":"Fetch a published skill by URL.","nav.instructions":"Instructions","nav.models":"Models","nav.genesis":"Genesis","nav.explorer":"Explorer","nav.quantum":"Quantum","instructions.create":"New instruction","instructions.createTitle":"New instruction","instructions.name":"Name","instructions.namePlaceholder":"e.g. Code review checklist","instructions.content":"Content","instructions.contentPlaceholder":"Write Markdown instructions. Content is saved as Markdown.","instructions.save":"Create instruction","instructions.creating":"Creating…","instructions.created":"Instruction created.","instructions.error":"Unable to create the instruction. Please try again.","instructions.editTitle":"Edit instruction","instructions.updateSave":"Save changes","instructions.updating":"Saving…","instructions.updated":"Instruction updated. Reapply enabled agents to write the new content.","instructions.updateError":"Unable to update the instruction. Please try again.","instructions.edit":"Edit","instructions.delete":"Delete","instructions.deleted":"Instruction deleted.","instructions.deleteError":"Unable to delete the instruction. Please try again.","instructions.deleteConfirmTitle":"Delete instruction?","instructions.deleteConfirmDescription":'"{{name}}" will be removed from the library and every agent. This cannot be undone.',"instructions.dragHint":"Drag an instruction to an agent","instructions.listAria":"Instructions","instructions.actionsAria":"Actions for {{name}}","instructions.emptyTitle":"No instructions yet","instructions.emptyDescription":"Create an instruction from the New instruction action in the page header.","instructions.loadError":"Unable to load instructions. Please try again.","agents.title":"Agents","agents.orderHint":"Order controls how instructions are combined","agents.loadError":"Unable to load agents. Please try again.","agents.updateError":"Unable to update the agent instructions.","agents.enableError":"Unable to update the agent.","agents.reapplyError":"Unable to reapply the agent instructions.","agents.reapplyHint":"Rewrite the managed instruction block.","agents.reapplyDisabledHint":"Enable instructions before reapplying.","agents.openFileError":"Unable to open the instruction file.","agents.fileMissing":"The instruction file does not exist yet.","agents.duplicateError":"This instruction is already assigned to the agent.","agents.applied":"Instructions applied.","agents.removed":"Foundry instructions removed.","agents.reapplied":"Instructions reapplied.","agents.enableRequiresInstruction":"Add at least one instruction first.","agents.toggleOnHint":"Remove Foundry instructions from this file.","agents.toggleOffHint":"Write Foundry instructions to this file.","agents.emptyAssigned":"Drag instructions here","agents.loadingInstruction":"Loading instruction…","agents.openFileAria":"Open instruction file for {{name}}","agents.reapplyAria":"Reapply instructions for {{name}}","agents.toggleAria":"Apply instructions to {{name}}","agents.removeInstructionAria":"Remove {{name}} from this agent","common.retry":"Retry","settings.downloadSkill":"Download Skill","settings.skillTargets":"Install targets","settings.aboutFoundrySkill":"About the Foundry Skill","settings.foundrySkillHint":"Download the Foundry Skill to teach agents how to operate Foundry through the Foundry CLI.","settings.downloadSkillDescription":"Choose user-level folders to install the Foundry agent skill. Existing copies will be replaced.","settings.skillDownloaded":"Skill installed.","settings.errors.downloadSkill":"Unable to download the skill. Please try again.","settings.errors.skillTargets":"Unable to load skill destinations. Please try again.","settings.downloadingSkill":"Downloading…","timeZone.losAngeles":"Los Angeles","timeZone.newYork":"New York","timeZone.shanghai":"Shanghai","timeZone.taipei":"Taipei","timeZone.tokyo":"Tokyo","timeZone.utc":"Coordinated Universal Time (UTC)","dataImport.title":"Import data","dataImport.passphrase":"Backup passphrase","dataImport.replaceAction":"Replace and import","dataImport.replaceWarning":"Importing replaces local settings, Instructions, Skills, and Agent configuration with this backup. Existing data will not be merged. Agent files and links are updated only if you choose Apply after import.","dataImport.applyTitle":"Import complete. Apply Agent configuration?","dataImport.applyDescription":"Apply the imported configuration to this machine’s Agent instructions and Skill links. Choosing not to apply clears Agent configuration in Foundry and leaves existing Agent files and links in place.","dataImport.skipAgents":"Do not apply","dataImport.applyAgents":"Apply configuration","dataImport.changed":"Agent configuration has changed since this import. Close this dialog to reload the current data.","dataImport.applyError":"Data was imported, but Agent configuration could not be applied. Check file access and Skill destination conflicts, then retry.","dataImport.error":"Unable to import data. Please try again.","dataImport.invalidBackup":"This backup is invalid or unsupported.","dataImport.invalidPassphrase":"The passphrase is incorrect or the backup is corrupted.","nav.settings":"Settings","settings.workspace":"Workspace","settings.appearance":"Appearance","settings.appearanceAria":"Appearance settings","settings.languageRegion":"Language & Region","settings.languageRegionAria":"Language & Region settings","settings.advanced":"Advanced","settings.advancedAria":"Advanced settings","settings.export":"Export","dataExport.title":"Export data","dataExport.action":"Export","dataExport.description":"Download an encrypted backup of your Foundry data.","dataExport.passphrase":"Passphrase","dataExport.confirmPassphrase":"Confirm passphrase","dataExport.passphraseHint":"Keep this passphrase. You will need it to import the backup; it cannot be recovered.","dataExport.passphraseMismatch":"The passphrases do not match.","dataExport.exporting":"Exporting…","dataExport.exported":"Backup download started.","dataExport.error":"Unable to export data. Please try again.","common.cancel":"Cancel","settings.import":"Import","settings.configFolder":"Config Folder","settings.openFolder":"Open","settings.copyConfigFolder":"Copy config folder path","settings.configFolderCopied":"Config folder path copied","settings.errors.copyConfigFolder":"Unable to copy the config folder path.","settings.errors.openConfigFolder":"Unable to open the config folder.","settings.language":"Language","settings.timeFormat":"Time format","settings.timeZone":"Time zone","settings.colorTheme":"Color theme","settings.navigation":"Settings navigation","settings.openNavigation":"Open settings navigation","settings.errors.load":"Unable to load settings.","settings.errors.theme":"Unable to update the color theme.","settings.errors.language":"Unable to update the language.","settings.errors.timeFormat":"Unable to update the time format.","settings.errors.timeZone":"Unable to update the time zone.","common.system":"System","theme.light":"Light","theme.dark":"Dark","a11y.breadcrumb":"Breadcrumb","a11y.goBack":"Go back","a11y.close":"Close","a11y.showPassword":"Reveal password","a11y.hidePassword":"Hide password","a11y.sidebar":"Sidebar","a11y.sidebarDescription":"Displays the mobile sidebar.","a11y.toggleSidebar":"Toggle sidebar"},LV={"skills.invalidEntryName":"请输入有效的文件或文件夹名称,不包含斜杠。","skills.newEntry":"新建","skills.newFile":"新增文件","skills.newFolder":"新增文件夹","skills.fileActions":"{{path}} 的操作","skills.fileConflict":"已存在同名文件或文件夹。","skills.fileOperationError":"无法修改技能文件,请重试。","skills.deleteEntryDescription":"移除 <entryPath>{{path}}</entryPath> 及其中的所有内容,保存技能后才会删除并同步到 Agent。","skills.createEntryDescription":"在 {{path}} 中创建,请输入单个文件或文件夹名称。","skills.entryName":"名称","skills.fileWorking":"处理中…","skills.createEntry":"创建","skills.fileNotEditable":"此文件为二进制文件,或超过 2 MiB 编辑上限。","skills.fileLoadError":"无法加载此文件。","editor.loading":"正在加载编辑器…","skills.saveContent":"保存","skills.contentSaving":"保存中…","skills.contentSaved":"内容已保存。","skills.contentSaveError":"无法保存内容,请重试。","skills.unsavedChanges":"未保存的修改","skills.allChangesSaved":"已全部保存","skills.contentPlaceholder":"使用 Markdown 编写技能指令。","skills.fileEditor":"编辑 {{file}}","skills.leaveTitle":"放弃未保存的修改?","skills.leaveDescription":"当前修改尚未保存。请先保存,或放弃修改后继续。","skills.keepEditing":"继续编辑","skills.discardChanges":"放弃修改","skills.overview":"概览","skills.files":"文件","skills.fileNavigation":"技能文件","skills.assign":"分配","skills.assignTitle":"分配 {{name}}","skills.assignDialogTitle":"分配 <skillName>{{name}}</skillName>","skills.assignDescription":"选择 Agent 创建技能链接,取消选择则解除链接。更改立即生效。","skills.assignAgentAria":"将 {{name}} 分配给 {{agent}}","skills.assignmentError":"无法更新技能分配,请重试。","skills.noAgents":"暂无可用的 Agent。","skills.linkConflict":"Agent 技能目录中存在同名的其他内容,请处理冲突后重试。","skills.edit":"修改","skills.editTitle":"修改技能","skills.editDescription":"更新名称和描述,已分配给 Agent 的技能也会同步更新。","skills.saveChanges":"保存修改","skills.updating":"保存中…","skills.updated":"技能已更新。","skills.updateError":"无法修改技能,请重试。","skills.delete":"删除","skills.deleted":"技能已删除。","skills.deleteError":"无法删除技能,请重试。","skills.deleteConfirmTitle":"删除技能","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> 及其文件夹中的所有文件将被永久删除。已分配给 Agent 的技能也会同步移除。","skills.actionsAria":"{{name}} 的操作","nav.dashboard":"仪表盘","nav.library":"资料库","nav.skills":"技能","skills.name":"名称","skills.namePlaceholder":"例如:knowledge-wiki","skills.nameHint":"名称在技能库中必须唯一。使用 1–64 个 Unicode 字母或数字,字母有大小写时使用小写,单个连字符可用于分隔单词。","skills.description":"描述","skills.descriptionPlaceholder":"描述 Agent 应在什么情况下使用此技能。","skills.create":"创建技能","skills.creating":"创建中…","skills.created":"技能已创建。","skills.createError":"无法创建技能,请重试。","skills.nameConflict":"已存在同名技能,请使用其他名称。","skills.loadError":"无法加载技能,请重试。","skills.emptyTitle":"暂无技能","skills.emptyDescription":"创建一个技能,开始构建你的技能库。","skills.notFound":"未找到技能","skills.backToSkills":"返回技能库","skills.content":"内容","skills.noContent":"暂无内容","skills.new":"新建技能","skills.createManually":"手动创建","skills.createManuallyDescription":"从空白的 SKILL.md 开始。","skills.importLocal":"从本地导入","skills.importLocalDescription":"选择包含 SKILL.md 的文件夹,或 .skill / .zip 压缩包。","skills.importUrl":"从 URL 导入","skills.importUrlDescription":"通过 URL 获取已发布的技能。","nav.instructions":"指令","nav.models":"模型","nav.genesis":"创世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新建指令","instructions.createTitle":"新建指令","instructions.name":"名称","instructions.namePlaceholder":"例如:代码审查清单","instructions.content":"内容","instructions.contentPlaceholder":"编写 Markdown 指令。内容将以 Markdown 格式保存。","instructions.save":"创建指令","instructions.creating":"创建中…","instructions.created":"指令已创建。","instructions.error":"无法创建指令,请重试。","instructions.editTitle":"编辑指令","instructions.updateSave":"保存修改","instructions.updating":"保存中…","instructions.updated":"指令已更新。对已启用的 Agent 执行重新写入后才会使用新内容。","instructions.updateError":"无法更新指令,请重试。","instructions.edit":"编辑","instructions.delete":"删除","instructions.deleted":"指令已删除。","instructions.deleteError":"无法删除指令,请重试。","instructions.deleteConfirmTitle":"删除指令?","instructions.deleteConfirmDescription":"“{{name}}”将从指令库和所有 Agent 中移除,此操作无法撤销。","instructions.dragHint":"将指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","instructions.emptyTitle":"还没有指令","instructions.emptyDescription":"使用页面右上角的“新建指令”操作创建第一条指令。","instructions.loadError":"无法加载指令,请重试。","agents.title":"Agents","agents.orderHint":"顺序决定指令的拼接方式","agents.loadError":"无法加载 Agent,请重试。","agents.updateError":"无法更新 Agent 的指令。","agents.enableError":"无法更新 Agent。","agents.reapplyError":"无法重新写入 Agent 指令。","agents.reapplyHint":"重新生成文件中的 Foundry 指令块。","agents.reapplyDisabledHint":"启用指令后才能重新写入。","agents.openFileError":"无法打开指令文件。","agents.fileMissing":"指令文件尚不存在。","agents.duplicateError":"该指令已经添加到此 Agent。","agents.applied":"指令已写入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新写入。","agents.enableRequiresInstruction":"请先添加至少一条指令。","agents.toggleOnHint":"从文件中移除 Foundry 指令。","agents.toggleOffHint":"将 Foundry 指令写入此文件。","agents.emptyAssigned":"将指令拖到这里","agents.loadingInstruction":"正在加载指令…","agents.openFileAria":"打开 {{name}} 的指令文件","agents.reapplyAria":"重新写入 {{name}} 的指令","agents.toggleAria":"将指令应用到 {{name}}","agents.removeInstructionAria":"从此 Agent 移除 {{name}}","common.retry":"重试","settings.downloadSkill":"下载 Skill","settings.skillTargets":"安装目标","settings.aboutFoundrySkill":"关于 Foundry Skill","settings.foundrySkillHint":"下载 Foundry Skill,让 Agent 了解如何通过 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"选择用于安装 Foundry Agent Skill 的用户目录,已有副本将被替换。","settings.skillDownloaded":"Skill 已安装。","settings.errors.downloadSkill":"无法下载 Skill,请重试。","settings.errors.skillTargets":"无法加载 Skill 目标路径,请重试。","settings.downloadingSkill":"下载中…","timeZone.losAngeles":"洛杉矶","timeZone.newYork":"纽约","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"东京","timeZone.utc":"协调世界时(UTC)","dataImport.title":"导入数据","dataImport.passphrase":"备份密码","dataImport.replaceAction":"覆盖并导入","dataImport.replaceWarning":"导入会用备份替换本地设置、Instructions、Skills 和 Agent 配置,不会合并现有数据。导入后选择应用配置,才会更新本机 Agent 文件和链接。","dataImport.applyTitle":"导入完成,是否应用 Agent 配置?","dataImport.applyDescription":"应用后,将根据导入的配置更新本机 Agent 的 Instructions 和 Skill 链接。选择不应用将清空 Foundry 中的 Agent 配置,保留本机现有 Agent 文件和链接。","dataImport.skipAgents":"不应用","dataImport.applyAgents":"应用配置","dataImport.changed":"Agent 配置在本次导入后已发生变化。请关闭弹窗,重新加载当前数据。","dataImport.applyError":"数据已导入,但 Agent 配置未能应用。请检查文件访问权限和 Skill 目标位置冲突后重试。","dataImport.error":"无法导入数据,请重试。","dataImport.invalidBackup":"备份无效或不受支持。","dataImport.invalidPassphrase":"密码不正确或备份已损坏。","nav.settings":"设置","settings.workspace":"工作区","settings.appearance":"外观","settings.appearanceAria":"外观设置","settings.languageRegion":"语言和地区","settings.languageRegionAria":"语言和地区设置","settings.advanced":"高级","settings.advancedAria":"高级设置","settings.export":"导出","dataExport.title":"导出数据","dataExport.action":"导出","dataExport.description":"下载当前 Foundry 数据的加密备份。","dataExport.passphrase":"密码","dataExport.confirmPassphrase":"确认密码","dataExport.passphraseHint":"请保存此密码,导入备份时需要使用。密码无法找回。","dataExport.passphraseMismatch":"两次输入的密码不一致。","dataExport.exporting":"导出中…","dataExport.exported":"已开始下载数据备份。","dataExport.error":"无法导出数据,请重试。","common.cancel":"取消","settings.import":"导入","settings.configFolder":"配置文件夹","settings.openFolder":"打开","settings.copyConfigFolder":"复制配置文件夹路径","settings.configFolderCopied":"已复制配置文件夹路径","settings.errors.copyConfigFolder":"无法复制配置文件夹路径。","settings.errors.openConfigFolder":"无法打开配置文件夹。","settings.language":"语言","settings.timeFormat":"时间格式","settings.timeZone":"时区","settings.colorTheme":"颜色主题","settings.navigation":"设置导航","settings.openNavigation":"打开设置导航","settings.errors.load":"无法加载设置。","settings.errors.theme":"无法更新颜色主题。","settings.errors.language":"无法更新语言。","settings.errors.timeFormat":"无法更新时间格式。","settings.errors.timeZone":"无法更新时区。","common.system":"跟随系统","theme.light":"浅色","theme.dark":"深色","a11y.breadcrumb":"面包屑导航","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},zV={"skills.invalidEntryName":"請輸入有效的檔案或資料夾名稱,不包含斜線。","skills.newEntry":"新增","skills.newFile":"新增檔案","skills.newFolder":"新增資料夾","skills.fileActions":"{{path}} 的操作","skills.fileConflict":"已存在同名檔案或資料夾。","skills.fileOperationError":"無法修改技能檔案,請重試。","skills.deleteEntryDescription":"移除 <entryPath>{{path}}</entryPath> 及其中的所有內容,儲存技能後才會刪除並同步至 Agent。","skills.createEntryDescription":"在 {{path}} 中建立,請輸入單一檔案或資料夾名稱。","skills.entryName":"名稱","skills.fileWorking":"處理中…","skills.createEntry":"建立","skills.fileNotEditable":"此檔案為二進位檔案,或超過 2 MiB 編輯上限。","skills.fileLoadError":"無法載入此檔案。","editor.loading":"正在載入編輯器…","skills.saveContent":"儲存","skills.contentSaving":"儲存中…","skills.contentSaved":"內容已儲存。","skills.contentSaveError":"無法儲存內容,請重試。","skills.unsavedChanges":"未儲存的修改","skills.allChangesSaved":"已全部儲存","skills.contentPlaceholder":"使用 Markdown 編寫技能指令。","skills.fileEditor":"編輯 {{file}}","skills.leaveTitle":"放棄未儲存的修改?","skills.leaveDescription":"目前修改尚未儲存。請先儲存,或放棄修改後繼續。","skills.keepEditing":"繼續編輯","skills.discardChanges":"放棄修改","skills.overview":"概覽","skills.files":"檔案","skills.fileNavigation":"技能檔案","skills.assign":"分配","skills.assignTitle":"分配 {{name}}","skills.assignDialogTitle":"分配 <skillName>{{name}}</skillName>","skills.assignDescription":"選擇 Agent 建立技能連結,取消選擇則解除連結。變更立即生效。","skills.assignAgentAria":"將 {{name}} 分配給 {{agent}}","skills.assignmentError":"無法更新技能分配,請重試。","skills.noAgents":"暫無可用的 Agent。","skills.linkConflict":"Agent 技能目錄中存在同名的其他內容,請處理衝突後重試。","skills.edit":"修改","skills.editTitle":"修改技能","skills.editDescription":"更新名稱和描述,已分配給 Agent 的技能也會同步更新。","skills.saveChanges":"儲存修改","skills.updating":"儲存中…","skills.updated":"技能已更新。","skills.updateError":"無法修改技能,請重試。","skills.delete":"刪除","skills.deleted":"技能已刪除。","skills.deleteError":"無法刪除技能,請重試。","skills.deleteConfirmTitle":"刪除技能","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> 及其資料夾中的所有檔案將被永久刪除。已分配給 Agent 的技能也會同步移除。","skills.actionsAria":"{{name}} 的操作","nav.dashboard":"儀表板","nav.library":"資料庫","nav.skills":"技能","skills.name":"名稱","skills.namePlaceholder":"例如:knowledge-wiki","skills.nameHint":"名稱在技能庫中必須唯一。使用 1–64 個 Unicode 字母或數字,字母有大小寫時使用小寫,單一連字號可用於分隔單字。","skills.description":"描述","skills.descriptionPlaceholder":"描述 Agent 應在什麼情況下使用此技能。","skills.create":"建立技能","skills.creating":"建立中…","skills.created":"技能已建立。","skills.createError":"無法建立技能,請重試。","skills.nameConflict":"已存在同名技能,請使用其他名稱。","skills.loadError":"無法載入技能,請重試。","skills.emptyTitle":"尚無技能","skills.emptyDescription":"建立一個技能,開始建構你的技能庫。","skills.notFound":"找不到技能","skills.backToSkills":"返回技能庫","skills.content":"內容","skills.noContent":"尚無內容","skills.new":"新增技能","skills.createManually":"手動建立","skills.createManuallyDescription":"從空白的 SKILL.md 開始。","skills.importLocal":"從本機匯入","skills.importLocalDescription":"選擇包含 SKILL.md 的資料夾,或 .skill / .zip 壓縮檔。","skills.importUrl":"從 URL 匯入","skills.importUrlDescription":"透過 URL 取得已發布的技能。","nav.instructions":"指令","nav.models":"模型","nav.genesis":"創世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新增指令","instructions.createTitle":"新增指令","instructions.name":"名稱","instructions.namePlaceholder":"例如:程式碼審查清單","instructions.content":"內容","instructions.contentPlaceholder":"撰寫 Markdown 指令。內容將以 Markdown 格式儲存。","instructions.save":"建立指令","instructions.creating":"建立中…","instructions.created":"指令已建立。","instructions.error":"無法建立指令,請重試。","instructions.editTitle":"編輯指令","instructions.updateSave":"儲存修改","instructions.updating":"儲存中…","instructions.updated":"指令已更新。對已啟用的 Agent 執行重新寫入後才會使用新內容。","instructions.updateError":"無法更新指令,請重試。","instructions.edit":"編輯","instructions.delete":"刪除","instructions.deleted":"指令已刪除。","instructions.deleteError":"無法刪除指令,請重試。","instructions.deleteConfirmTitle":"刪除指令?","instructions.deleteConfirmDescription":"「{{name}}」將從指令庫和所有 Agent 中移除,此操作無法復原。","instructions.dragHint":"將指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","instructions.emptyTitle":"尚無指令","instructions.emptyDescription":"使用頁面右上角的「新增指令」操作建立第一條指令。","instructions.loadError":"無法載入指令,請重試。","agents.title":"Agents","agents.orderHint":"順序決定指令的拼接方式","agents.loadError":"無法載入 Agent,請重試。","agents.updateError":"無法更新 Agent 的指令。","agents.enableError":"無法更新 Agent。","agents.reapplyError":"無法重新寫入 Agent 指令。","agents.reapplyHint":"重新產生檔案中的 Foundry 指令區塊。","agents.reapplyDisabledHint":"啟用指令後才能重新寫入。","agents.openFileError":"無法開啟指令檔案。","agents.fileMissing":"指令檔案尚不存在。","agents.duplicateError":"此指令已經加入此 Agent。","agents.applied":"指令已寫入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新寫入。","agents.enableRequiresInstruction":"請先加入至少一條指令。","agents.toggleOnHint":"從檔案中移除 Foundry 指令。","agents.toggleOffHint":"將 Foundry 指令寫入此檔案。","agents.emptyAssigned":"將指令拖到這裡","agents.loadingInstruction":"正在載入指令…","agents.openFileAria":"開啟 {{name}} 的指令檔案","agents.reapplyAria":"重新寫入 {{name}} 的指令","agents.toggleAria":"將指令套用到 {{name}}","agents.removeInstructionAria":"從此 Agent 移除 {{name}}","common.retry":"重試","settings.downloadSkill":"下載 Skill","settings.skillTargets":"安裝目標","settings.aboutFoundrySkill":"關於 Foundry Skill","settings.foundrySkillHint":"下載 Foundry Skill,讓 Agent 瞭解如何透過 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"選擇用於安裝 Foundry Agent Skill 的使用者目錄,已有副本將被替換。","settings.skillDownloaded":"Skill 已安裝。","settings.errors.downloadSkill":"無法下載 Skill,請重試。","settings.errors.skillTargets":"無法載入 Skill 目標路徑,請重試。","settings.downloadingSkill":"下載中…","timeZone.losAngeles":"洛杉磯","timeZone.newYork":"紐約","timeZone.shanghai":"上海","timeZone.taipei":"臺北","timeZone.tokyo":"東京","timeZone.utc":"協調世界時(UTC)","dataImport.title":"匯入資料","dataImport.passphrase":"備份密碼","dataImport.replaceAction":"覆蓋並匯入","dataImport.replaceWarning":"匯入會以備份替換本機設定、Instructions、Skills 和 Agent 設定,不會合併現有資料。匯入後選擇套用設定,才會更新本機 Agent 檔案和連結。","dataImport.applyTitle":"匯入完成,是否套用 Agent 設定?","dataImport.applyDescription":"套用後,將依匯入的設定更新本機 Agent 的 Instructions 和 Skill 連結。選擇不套用將清空 Foundry 中的 Agent 設定,保留本機現有 Agent 檔案和連結。","dataImport.skipAgents":"不套用","dataImport.applyAgents":"套用設定","dataImport.changed":"Agent 設定在本次匯入後已變更。請關閉對話框,重新載入目前資料。","dataImport.applyError":"資料已匯入,但無法套用 Agent 設定。請檢查檔案存取權限與 Skill 目標位置衝突後重試。","dataImport.error":"無法匯入資料,請重試。","dataImport.invalidBackup":"備份無效或不受支援。","dataImport.invalidPassphrase":"密碼不正確或備份已損壞。","nav.settings":"設定","settings.workspace":"工作區","settings.appearance":"外觀","settings.appearanceAria":"外觀設定","settings.languageRegion":"語言與地區","settings.languageRegionAria":"語言與地區設定","settings.advanced":"進階","settings.advancedAria":"進階設定","settings.export":"匯出","dataExport.title":"匯出資料","dataExport.action":"匯出","dataExport.description":"下載目前 Foundry 資料的加密備份。","dataExport.passphrase":"密碼","dataExport.confirmPassphrase":"確認密碼","dataExport.passphraseHint":"請保留此密碼,匯入備份時需要使用。密碼無法復原。","dataExport.passphraseMismatch":"兩次輸入的密碼不一致。","dataExport.exporting":"匯出中…","dataExport.exported":"已開始下載資料備份。","dataExport.error":"無法匯出資料,請重試。","common.cancel":"取消","settings.import":"匯入","settings.configFolder":"設定資料夾","settings.openFolder":"開啟","settings.copyConfigFolder":"複製設定資料夾路徑","settings.configFolderCopied":"已複製設定資料夾路徑","settings.errors.copyConfigFolder":"無法複製設定資料夾路徑。","settings.errors.openConfigFolder":"無法開啟設定資料夾。","settings.language":"語言","settings.timeFormat":"時間格式","settings.timeZone":"時區","settings.colorTheme":"色彩主題","settings.navigation":"設定導覽","settings.openNavigation":"開啟設定導覽","settings.errors.load":"無法載入設定。","settings.errors.theme":"無法更新色彩主題。","settings.errors.language":"無法更新語言。","settings.errors.timeFormat":"無法更新時間格式。","settings.errors.timeZone":"無法更新時區。","common.system":"跟隨系統","theme.light":"淺色","theme.dark":"深色","a11y.breadcrumb":"麵包屑導覽","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},_V={"skills.invalidEntryName":"スラッシュを含まない有効なファイル名またはフォルダー名を入力してください。","skills.newEntry":"新規","skills.newFile":"新規ファイル","skills.newFolder":"新規フォルダー","skills.fileActions":"{{path}} の操作","skills.fileConflict":"同じ名前のファイルまたはフォルダーが存在します。","skills.fileOperationError":"スキルファイルを更新できませんでした。もう一度お試しください。","skills.deleteEntryDescription":"<entryPath>{{path}}</entryPath> とその内容を削除します。スキルを保存すると削除が反映されます。","skills.createEntryDescription":"{{path}} に作成します。ファイルまたはフォルダーの名前を入力してください。","skills.entryName":"名前","skills.fileWorking":"処理中…","skills.createEntry":"作成","skills.fileNotEditable":"バイナリファイル、または編集上限の 2 MiB を超えています。","skills.fileLoadError":"ファイルを読み込めませんでした。","editor.loading":"エディターを読み込み中…","skills.saveContent":"保存","skills.contentSaving":"保存中…","skills.contentSaved":"内容を保存しました。","skills.contentSaveError":"内容を保存できませんでした。もう一度お試しください。","skills.unsavedChanges":"未保存の変更","skills.allChangesSaved":"すべて保存済み","skills.contentPlaceholder":"Markdown でスキルの指示を記述します。","skills.fileEditor":"{{file}} を編集","skills.leaveTitle":"未保存の変更を破棄しますか?","skills.leaveDescription":"変更はまだ保存されていません。保存するか、変更を破棄して続行してください。","skills.keepEditing":"編集を続ける","skills.discardChanges":"変更を破棄","skills.overview":"概要","skills.files":"ファイル","skills.fileNavigation":"スキルファイル","skills.assign":"割り当て","skills.assignTitle":"{{name}} の割り当て","skills.assignDialogTitle":"<skillName>{{name}}</skillName> の割り当て","skills.assignDescription":"エージェントを選択するとスキルへのリンクを作成し、選択を解除するとリンクを削除します。変更はすぐに反映されます。","skills.assignAgentAria":"{{name}} を {{agent}} に割り当て","skills.assignmentError":"スキルの割り当てを更新できませんでした。もう一度お試しください。","skills.noAgents":"利用可能なエージェントがありません。","skills.linkConflict":"エージェントのスキルフォルダーに別の同名項目があります。競合を解消して再試行してください。","skills.edit":"編集","skills.editTitle":"スキルを編集","skills.editDescription":"名前と説明を更新します。このスキルが割り当てられているエージェントにも変更が反映されます。","skills.saveChanges":"変更を保存","skills.updating":"保存中…","skills.updated":"スキルを更新しました。","skills.updateError":"スキルを更新できません。再試行してください。","skills.delete":"削除","skills.deleted":"スキルを削除しました。","skills.deleteError":"スキルを削除できません。再試行してください。","skills.deleteConfirmTitle":"スキルを削除","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> とフォルダー内のすべてのファイルが完全に削除されます。割り当て済みのエージェントからもスキルが削除されます。","skills.actionsAria":"{{name}} の操作","nav.dashboard":"ダッシュボード","nav.library":"ライブラリ","nav.skills":"スキル","skills.name":"名前","skills.namePlaceholder":"例:knowledge-wiki","skills.nameHint":"スキルライブラリ内で一意の名前にしてください。1〜64 文字の Unicode 文字または数字を使用し、大文字・小文字がある場合は小文字にしてください。単語は単一のハイフンで区切れます。","skills.description":"説明","skills.descriptionPlaceholder":"エージェントがこのスキルを使う場面を説明してください。","skills.create":"スキルを作成","skills.creating":"作成中…","skills.created":"スキルを作成しました。","skills.createError":"スキルを作成できませんでした。もう一度お試しください。","skills.nameConflict":"同じ名前のスキルが存在します。別の名前を指定してください。","skills.loadError":"スキルを読み込めませんでした。もう一度お試しください。","skills.emptyTitle":"スキルはまだありません","skills.emptyDescription":"スキルを作成してライブラリを構築しましょう。","skills.notFound":"スキルが見つかりません","skills.backToSkills":"スキル一覧に戻る","skills.content":"内容","skills.noContent":"内容はまだありません","skills.new":"新規スキル","skills.createManually":"手動で作成","skills.createManuallyDescription":"空の SKILL.md から始めます。","skills.importLocal":"ローカルからインポート","skills.importLocalDescription":"SKILL.md を含むフォルダー、または .skill / .zip アーカイブを選択します。","skills.importUrl":"URL からインポート","skills.importUrlDescription":"URL から公開済みのスキルを取得します。","nav.instructions":"指示","nav.models":"モデル","nav.genesis":"ジェネシス","nav.explorer":"エクスプローラー","nav.quantum":"クォンタム","instructions.create":"新しい指示","instructions.createTitle":"新しい指示","instructions.name":"名前","instructions.namePlaceholder":"例:コードレビューチェックリスト","instructions.content":"内容","instructions.contentPlaceholder":"Markdown の指示を入力。内容は Markdown 形式で保存されます。","instructions.save":"指示を作成","instructions.creating":"作成中…","instructions.created":"指示を作成しました。","instructions.error":"指示を作成できませんでした。もう一度お試しください。","instructions.editTitle":"指示を編集","instructions.updateSave":"変更を保存","instructions.updating":"保存中…","instructions.updated":"指示を更新しました。有効な Agent は再書き込みすると新しい内容が反映されます。","instructions.updateError":"指示を更新できませんでした。もう一度お試しください。","instructions.edit":"編集","instructions.delete":"削除","instructions.deleted":"指示を削除しました。","instructions.deleteError":"指示を削除できませんでした。もう一度お試しください。","instructions.deleteConfirmTitle":"指示を削除しますか?","instructions.deleteConfirmDescription":"「{{name}}」はライブラリとすべての Agent から削除されます。この操作は取り消せません。","instructions.dragHint":"指示を Agent にドラッグ","instructions.listAria":"指示一覧","instructions.actionsAria":"{{name}} の操作","instructions.emptyTitle":"指示はまだありません","instructions.emptyDescription":"ページ右上の「新しい指示」から最初の指示を作成してください。","instructions.loadError":"指示を読み込めませんでした。もう一度お試しください。","agents.title":"Agents","agents.orderHint":"順序が指示の結合順になります","agents.loadError":"Agent を読み込めませんでした。もう一度お試しください。","agents.updateError":"Agent の指示を更新できませんでした。","agents.enableError":"Agent を更新できませんでした。","agents.reapplyError":"Agent の指示を再書き込みできませんでした。","agents.reapplyHint":"管理対象の指示ブロックを再生成します。","agents.reapplyDisabledHint":"再書き込みするには指示を有効にしてください。","agents.openFileError":"指示ファイルを開けませんでした。","agents.fileMissing":"指示ファイルはまだ存在しません。","agents.duplicateError":"この指示はすでに Agent に追加されています。","agents.applied":"指示を書き込みました。","agents.removed":"Foundry の指示を削除しました。","agents.reapplied":"指示を再書き込みしました。","agents.enableRequiresInstruction":"先に指示を 1 つ以上追加してください。","agents.toggleOnHint":"このファイルから Foundry の指示を削除します。","agents.toggleOffHint":"Foundry の指示をこのファイルに書き込みます。","agents.emptyAssigned":"ここに指示をドラッグ","agents.loadingInstruction":"指示を読み込み中…","agents.openFileAria":"{{name}} の指示ファイルを開く","agents.reapplyAria":"{{name}} の指示を再書き込み","agents.toggleAria":"{{name}} に指示を適用","agents.removeInstructionAria":"この Agent から {{name}} を削除","common.retry":"再試行","settings.downloadSkill":"Skill をダウンロード","settings.skillTargets":"インストール先","settings.aboutFoundrySkill":"Foundry Skill について","settings.foundrySkillHint":"Foundry Skill をダウンロードして、Agent に Foundry CLI を使った Foundry の操作方法を伝えます。","settings.downloadSkillDescription":"Foundry Agent Skill のインストール先を選択します。既存のコピーは置き換えられます。","settings.skillDownloaded":"Skill をインストールしました。","settings.errors.downloadSkill":"Skill をダウンロードできません。再試行してください。","settings.errors.skillTargets":"Skill の保存先を取得できません。再試行してください。","settings.downloadingSkill":"ダウンロード中…","timeZone.losAngeles":"ロサンゼルス","timeZone.newYork":"ニューヨーク","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"東京","timeZone.utc":"協定世界時(UTC)","dataImport.title":"データをインポート","dataImport.passphrase":"バックアップのパスフレーズ","dataImport.replaceAction":"上書きしてインポート","dataImport.replaceWarning":"バックアップでローカルの設定、Instructions、Skills、Agent 設定を置き換えます。既存データとの結合は行われません。Agent のファイルとリンクは、インポート後に適用を選んだ場合にのみ更新されます。","dataImport.applyTitle":"インポート完了。Agent 設定を適用しますか?","dataImport.applyDescription":"インポートした設定で、このマシンの Agent の Instructions と Skill リンクを更新します。適用しない場合は Foundry の Agent 設定を空にし、既存の Agent ファイルとリンクを保持します。","dataImport.skipAgents":"適用しない","dataImport.applyAgents":"設定を適用","dataImport.changed":"インポート後に Agent 設定が変更されました。このダイアログを閉じて現在のデータを再読み込みしてください。","dataImport.applyError":"データはインポートされましたが、Agent 設定を適用できませんでした。ファイルへのアクセス権限と Skill の配置先の競合を確認して再試行してください。","dataImport.error":"データをインポートできませんでした。もう一度お試しください。","dataImport.invalidBackup":"バックアップが無効または未対応です。","dataImport.invalidPassphrase":"パスフレーズが違うか、バックアップが破損しています。","nav.settings":"設定","settings.workspace":"ワークスペース","settings.appearance":"外観","settings.appearanceAria":"外観設定","settings.languageRegion":"言語と地域","settings.languageRegionAria":"言語と地域の設定","settings.advanced":"詳細設定","settings.advancedAria":"詳細設定","settings.export":"エクスポート","dataExport.title":"データをエクスポート","dataExport.action":"エクスポート","dataExport.description":"Foundry のデータを暗号化したバックアップとしてダウンロードします。","dataExport.passphrase":"パスフレーズ","dataExport.confirmPassphrase":"パスフレーズの確認","dataExport.passphraseHint":"インポート時に必要なため、このパスフレーズを保管してください。復元はできません。","dataExport.passphraseMismatch":"パスフレーズが一致しません。","dataExport.exporting":"エクスポート中…","dataExport.exported":"バックアップのダウンロードを開始しました。","dataExport.error":"データをエクスポートできませんでした。もう一度お試しください。","common.cancel":"キャンセル","settings.import":"インポート","settings.configFolder":"設定フォルダー","settings.openFolder":"開く","settings.copyConfigFolder":"設定フォルダーのパスをコピー","settings.configFolderCopied":"設定フォルダーのパスをコピーしました","settings.errors.copyConfigFolder":"設定フォルダーのパスをコピーできませんでした。","settings.errors.openConfigFolder":"設定フォルダーを開けませんでした。","settings.language":"言語","settings.timeFormat":"時刻形式","settings.timeZone":"タイムゾーン","settings.colorTheme":"カラーテーマ","settings.navigation":"設定ナビゲーション","settings.openNavigation":"設定ナビゲーションを開く","settings.errors.load":"設定を読み込めませんでした。","settings.errors.theme":"カラーテーマを更新できませんでした。","settings.errors.language":"言語を更新できませんでした。","settings.errors.timeFormat":"時刻形式を更新できませんでした。","settings.errors.timeZone":"タイムゾーンを更新できませんでした。","common.system":"システム","theme.light":"ライト","theme.dark":"ダーク","a11y.breadcrumb":"パンくずリスト","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},UV={"en-US":{translation:PV},"zh-CN":{translation:LV},"zh-TW":{translation:zV},"ja-JP":{translation:_V}};function HV({value:e,onValueChange:t,disabled:i=!1}){const{t:a}=Ct(),o=[{value:"system",label:a("common.system")},...xM.map(c=>({value:c,label:IV[c]}))];return b.jsx($s,{label:a("settings.language"),children:b.jsxs(Gb,{items:o,value:e,onValueChange:c=>{c&&t(c)},disabled:i,children:[b.jsx(Qb,{"aria-label":a("settings.language"),className:"w-52",children:b.jsx($b,{})}),b.jsx(Xb,{children:o.map(c=>b.jsx(Zb,{value:c.value,children:c.label},c.value))})]})})}const NR=dB.map(e=>({value:e,label:e}));function FV({value:e,onValueChange:t,disabled:i=!1}){const{t:a}=Ct();return b.jsx($s,{label:a("settings.timeFormat"),children:b.jsxs(Gb,{items:NR,value:e,onValueChange:o=>{o&&t(o)},disabled:i,children:[b.jsx(Qb,{"aria-label":a("settings.timeFormat"),className:"w-52",children:b.jsx($b,{})}),b.jsx(Xb,{children:NR.map(o=>b.jsx(Zb,{value:o.value,children:o.label},o.value))})]})})}const BV={"America/Los_Angeles":"timeZone.losAngeles","America/New_York":"timeZone.newYork","Asia/Shanghai":"timeZone.shanghai","Asia/Taipei":"timeZone.taipei","Asia/Tokyo":"timeZone.tokyo",UTC:"timeZone.utc"};function VV({value:e,onValueChange:t,disabled:i=!1}){const{t:a}=Ct(),o=fB.map(c=>({value:c,label:a(BV[c])}));return b.jsx($s,{label:a("settings.timeZone"),children:b.jsxs(Gb,{items:o,value:e,onValueChange:c=>{c&&t(c)},disabled:i,children:[b.jsx(Qb,{"aria-label":a("settings.timeZone"),className:"w-52",children:b.jsx($b,{})}),b.jsx(Xb,{children:o.map(c=>b.jsx(Zb,{value:c.value,children:c.label},c.value))})]})})}const Ms=["settings"],kh=["settings","update"];function Wb(){const{t:e}=Ct(),t=mi(),i=uO({mutationKey:kh})>0,a=Lo({queryKey:Ms,queryFn:({signal:h})=>l9(h),staleTime:1/0,retry:!1}),o=wr({mutationKey:kh,mutationFn:c9,onMutate:async h=>{await t.cancelQueries({queryKey:Ms});const x=t.getQueryData(Ms);return x&&t.setQueryData(Ms,KV(x,h)),{previous:x}},onSuccess:h=>{t.setQueryData(Ms,h)},onError:(h,x,S)=>{S?.previous&&t.setQueryData(Ms,S.previous),ln.error(e(qV(x)))},onSettled:()=>t.invalidateQueries({queryKey:Ms})}),c=a.data??null,u=c?.workspace.appearance["color-theme"]??"system",d=c?.workspace["language-region"].language??"system",f=c?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=c?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function y(h){!c||t.isMutating({mutationKey:kh})>0||o.mutate(h)}return{settings:c,theme:u,language:d,timeFormat:f,timeZone:g,isLoading:a.isPending,isUpdating:i,setTheme:h=>{h!==u&&y({theme:h})},setLanguage:h=>{h!==d&&y({language:h})},setTimeFormat:h=>{h!==f&&y({timeFormat:h})},setTimeZone:h=>{h!==g&&y({timezone:h})}}}function KV(e,t){const i=e.workspace,a=i["language-region"];return{...e,workspace:{appearance:{"color-theme":t.theme??i.appearance["color-theme"]},"language-region":{language:t.language??a.language,"time-format":t.timeFormat??a["time-format"],"time-zone":t.timezone??a["time-zone"]}}}}function qV(e){return e.theme!==void 0?"settings.errors.theme":e.language!==void 0?"settings.errors.language":e.timeFormat!==void 0?"settings.errors.timeFormat":"settings.errors.timeZone"}const Co=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:aL},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:JP},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:GT}];function YV(){const{t:e}=Ct(),[t,i]=v_(),a=Co.find(({id:O})=>O===t.get("panel"))?.id??Co[0].id,o=O=>{i(A=>{const k=new URLSearchParams(A);return k.set("panel",O),k})},{settings:c,theme:u,language:d,timeFormat:f,timeZone:g,isLoading:y,isUpdating:h,setTheme:x,setLanguage:S,setTimeFormat:E,setTimeZone:C}=Wb(),w=Co.find(O=>O.id===a)?.ariaKey??"settings.appearanceAria",R=Co.find(O=>O.id===a)?.labelKey??"settings.appearance";return b.jsxs("div",{className:`
188
+ grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
189
+ max-[680px]:grid-cols-1
190
+ `,children:[b.jsx("aside",{className:`
191
+ hidden min-h-0 overflow-y-auto p-4
192
+ min-[680px]:block
193
+ `,children:b.jsx(GV,{activeSection:a,onSectionChange:o})}),b.jsxs("section",{"aria-label":e(w),className:"min-h-0 overflow-y-auto p-4",children:[b.jsxs("div",{className:`
194
+ mb-3 flex items-center gap-3
195
+ min-[680px]:hidden
196
+ `,children:[b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ut,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:b.jsx(rL,{})}),b.jsx(Fo,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:b.jsxs(kA,{children:[b.jsx(MA,{children:e("settings.workspace")}),b.jsx(aU,{value:a,onValueChange:O=>{const A=Co.find(({id:k})=>k===O);A&&o(A.id)},children:Co.map(({id:O,labelKey:A,icon:k})=>b.jsxs(sU,{value:O,closeOnClick:!0,children:[b.jsx(k,{}),e(A)]},O))})]})})]}),b.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(R)})]}),b.jsxs(Ba,{className:"gap-0 py-0",children:[y&&b.jsxs("div",{className:`
197
+ flex flex-col items-start gap-3 p-4
198
+ min-[680px]:min-h-16 min-[680px]:flex-row
199
+ min-[680px]:items-center min-[680px]:justify-between
200
+ min-[680px]:gap-8
201
+ `,children:[b.jsx(Er,{className:"h-4 w-24"}),b.jsxs("div",{className:"flex items-center gap-6",children:[b.jsx(Er,{className:"h-4 w-16"}),b.jsx(Er,{className:"h-4 w-10"}),b.jsx(Er,{className:"h-4 w-10"})]})]}),!y&&a==="appearance"&&b.jsx(W9,{value:u,onValueChange:O=>{x(O)},disabled:h||!c}),!y&&a==="language-region"&&b.jsxs("div",{className:"divide-y",children:[b.jsx(HV,{value:d,onValueChange:O=>{S(O)},disabled:h||!c}),b.jsx(VV,{value:g,onValueChange:O=>{C(O)},disabled:h||!c}),b.jsx(FV,{value:f,onValueChange:O=>{E(O)},disabled:h||!c})]}),!y&&a==="advanced"&&b.jsxs("div",{className:"divide-y",children:[b.jsx(L9,{disabled:h||!c}),b.jsx(H9,{disabled:h||!c}),b.jsx(p9,{configFolder:c?.configFolder}),b.jsx(T9,{disabled:h||!c})]})]})]})]})}function GV({activeSection:e,onSectionChange:t}){const{t:i}=Ct();return b.jsx("nav",{"aria-label":i("settings.navigation"),children:b.jsxs(Ba,{size:"sm",children:[b.jsx(d7,{children:b.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:i("settings.workspace")})}),b.jsx(f7,{className:"flex flex-col gap-1",children:Co.map(({id:a,labelKey:o,icon:c})=>{const u=a===e;return b.jsxs(ut,{type:"button",variant:u?"secondary":"ghost","aria-current":u?"page":void 0,onClick:()=>{t(a)},className:"w-full justify-start gap-2",children:[b.jsx(c,{className:u?void 0:"text-muted-foreground"}),b.jsx("span",{children:i(o)})]},a)})})]})})}fr.use(O8).init({resources:UV,lng:SM(),fallbackLng:"en-US",supportedLngs:[...xM],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function SM(){const e=new Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase();return e.startsWith("zh-tw")||e.startsWith("zh-hk")||e.startsWith("zh-mo")||e.startsWith("zh-hant")?"zh-TW":e.startsWith("zh")?"zh-CN":e.startsWith("ja")?"ja-JP":"en-US"}function $V(){const e=mi();v.useEffect(()=>{const t=new EventSource("/api/events"),i=()=>{e.invalidateQueries({queryKey:Ms,refetchType:e.isMutating({mutationKey:kh})>0?"none":"active"})},a=o=>{try{const c=JSON.parse(o.data);typeof c=="object"&&c!==null&&"version"in c&&c.version===hB&&"type"in c&&c.type===pB&&i()}catch{}};return t.addEventListener("open",i),t.addEventListener("foundry",a),()=>{t.removeEventListener("open",i),t.removeEventListener("foundry",a),t.close()}},[e])}const uv=matchMedia("(prefers-color-scheme: dark)");function QV(e){return uv.addEventListener("change",e),()=>uv.removeEventListener("change",e)}function XV(){return uv.matches?"dark":"light"}function ZV({children:e}){$V();const{theme:t,language:i}=Wb(),a=v.useSyncExternalStore(QV,XV),o=t==="system"?a:t,c=i==="system"?SM():i;return v.useLayoutEffect(()=>{const u=document.documentElement;u.classList.toggle("dark",o==="dark"),u.style.colorScheme=o},[o]),v.useLayoutEffect(()=>{fr.changeLanguage(c),document.documentElement.lang=c},[c]),e}const WV=new zL({queryCache:new lO({onError:(e,t)=>{t.queryKey[0]==="skill-targets"?ln.error(fr.t("settings.errors.skillTargets")):t.queryKey[0]==="settings"&&ln.error(fr.t("settings.errors.load"))}})});function JV(){return null}function eK(e){switch(e){case"/library/instructions":return b.jsx(eB,{});case"/library/skills":return b.jsx(zB,{});default:return b.jsx(JV,{})}}const tK=f_([{element:b.jsx(gH,{}),children:[...iH.map(e=>({path:e,element:eK(e)})),{path:"/library/skills/:name",element:b.jsx(o9,{})}]},{element:b.jsx(mH,{}),children:[{path:"/settings",element:b.jsx(YV,{}),handle:{backTo:"/dashboard"}}]},{path:"*",element:b.jsx(Hz,{to:"/dashboard",replace:!0})}]);function nK(){return b.jsx(fL,{client:WV,children:b.jsx(W3,{children:b.jsx(ZV,{children:b.jsx(rK,{})})})})}function rK(){const{theme:e}=Wb();return b.jsxs(b.Fragment,{children:[b.jsx(C_,{router:tK}),b.jsx(dL,{theme:e})]})}sj.createRoot(document.getElementById("root")).render(b.jsx(v.StrictMode,{children:b.jsx(nK,{})}));export{Ne as W,$7 as _,b as j,v as r,Ct as u};