@dhzh/foundry 7.4.1 → 7.5.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 (99) hide show
  1. package/README.md +22 -9
  2. package/dist/index.mjs +7 -8
  3. package/dist/skills/foundry/SKILL.md +7 -6
  4. package/dist/skills/foundry/references/agents.md +8 -1
  5. package/dist/skills/foundry/references/backups.md +7 -4
  6. package/dist/skills/foundry/references/skills.md +198 -8
  7. package/dist/web/assets/abap-DLDM7-KI.js +1 -0
  8. package/dist/web/assets/apex-DNDY2TF8.js +1 -0
  9. package/dist/web/assets/azcli-Y6nb8tq_.js +1 -0
  10. package/dist/web/assets/bat-BwHxbl9M.js +1 -0
  11. package/dist/web/assets/bicep-CFznDFnq.js +2 -0
  12. package/dist/web/assets/cameligo-Bf6VGUru.js +1 -0
  13. package/dist/web/assets/clojure-Dnu-v4kV.js +1 -0
  14. package/dist/web/assets/code-editor-D9YqPRu9.js +1123 -0
  15. package/dist/web/assets/codicon-MIjLT6Vj.ttf +0 -0
  16. package/dist/web/assets/coffee-Bd8akH9Z.js +1 -0
  17. package/dist/web/assets/cpp-BbWJElDN.js +1 -0
  18. package/dist/web/assets/csharp-Co3qMtFm.js +1 -0
  19. package/dist/web/assets/csp-D-4FJmMZ.js +1 -0
  20. package/dist/web/assets/css-DdJfP1eB.js +3 -0
  21. package/dist/web/assets/cypher-cTPe9QuQ.js +1 -0
  22. package/dist/web/assets/dart-BOtBlQCF.js +1 -0
  23. package/dist/web/assets/dockerfile-BG73LgW2.js +1 -0
  24. package/dist/web/assets/ecl-BEgZUVRK.js +1 -0
  25. package/dist/web/assets/elixir-B99a8Jiy.js +1 -0
  26. package/dist/web/assets/flow9-BeJ5waoc.js +1 -0
  27. package/dist/web/assets/freemarker2-Cqc6DC0X.js +3 -0
  28. package/dist/web/assets/fsharp-PahG7c26.js +1 -0
  29. package/dist/web/assets/go-acbASCJo.js +1 -0
  30. package/dist/web/assets/graphql-BxJiqAUM.js +1 -0
  31. package/dist/web/assets/handlebars-vhUCOYp2.js +1 -0
  32. package/dist/web/assets/hcl-DtV1sZF8.js +1 -0
  33. package/dist/web/assets/html-B9OWsMTw.js +1 -0
  34. package/dist/web/assets/index-BLI6_UFc.css +1 -0
  35. package/dist/web/assets/index-ZHZEjBKE.js +198 -0
  36. package/dist/web/assets/ini-CWGZJIwx.js +1 -0
  37. package/dist/web/assets/java-CXBNlu9o.js +1 -0
  38. package/dist/web/assets/javascript-VVG9ORob.js +1 -0
  39. package/dist/web/assets/json.worker-DjMR4gyh.js +77 -0
  40. package/dist/web/assets/jsonMode-83eKggsx.js +56 -0
  41. package/dist/web/assets/jsonMode-Dnk_vNU4.css +1 -0
  42. package/dist/web/assets/julia-cl7-CwDS.js +1 -0
  43. package/dist/web/assets/kotlin-s7OhZKlX.js +1 -0
  44. package/dist/web/assets/less-9HpZscsL.js +2 -0
  45. package/dist/web/assets/lexon-OrD6JF1K.js +1 -0
  46. package/dist/web/assets/liquid-iK6GMLcM.js +1 -0
  47. package/dist/web/assets/lua-Cyyb5UIc.js +1 -0
  48. package/dist/web/assets/m3-B8OfTtLu.js +1 -0
  49. package/dist/web/assets/mdx-C9wUAJkS.js +1 -0
  50. package/dist/web/assets/mips-CiqrrVzr.js +1 -0
  51. package/dist/web/assets/msdax-DmeGPVcC.js +1 -0
  52. package/dist/web/assets/mysql-C_tMU-Nz.js +1 -0
  53. package/dist/web/assets/objective-c-BDtDVThU.js +1 -0
  54. package/dist/web/assets/pascal-vHIfCaH5.js +1 -0
  55. package/dist/web/assets/pascaligo-DtZ0uQbO.js +1 -0
  56. package/dist/web/assets/perl-Ub6l9XKa.js +1 -0
  57. package/dist/web/assets/pgsql-BlNEE0v7.js +1 -0
  58. package/dist/web/assets/php-BBUBE1dy.js +1 -0
  59. package/dist/web/assets/pla-DSh2-awV.js +1 -0
  60. package/dist/web/assets/postiats-CocnycG-.js +1 -0
  61. package/dist/web/assets/powerquery-tScXyioY.js +1 -0
  62. package/dist/web/assets/powershell-COWaemsV.js +1 -0
  63. package/dist/web/assets/protobuf-Brw8urJB.js +2 -0
  64. package/dist/web/assets/pug-8SOpv6rk.js +1 -0
  65. package/dist/web/assets/python-C12wwW7S.js +1 -0
  66. package/dist/web/assets/qsharp-Bw9ernYp.js +1 -0
  67. package/dist/web/assets/r-j7ic8hl3.js +1 -0
  68. package/dist/web/assets/razor-BRAlXnRe.js +1 -0
  69. package/dist/web/assets/redis-Bu5POkcn.js +1 -0
  70. package/dist/web/assets/redshift-Bs9aos_-.js +1 -0
  71. package/dist/web/assets/restructuredtext-CqXO7rUv.js +1 -0
  72. package/dist/web/assets/ruby-zBfavPgS.js +1 -0
  73. package/dist/web/assets/rust-BzKRNQWT.js +1 -0
  74. package/dist/web/assets/sb-BBc9UKZt.js +1 -0
  75. package/dist/web/assets/scala-D9hQfWCl.js +1 -0
  76. package/dist/web/assets/scheme-BPhDTwHR.js +1 -0
  77. package/dist/web/assets/scss-CBJaRo0y.js +3 -0
  78. package/dist/web/assets/shell-DiJ1NA_G.js +1 -0
  79. package/dist/web/assets/solidity-Db0IVjzk.js +1 -0
  80. package/dist/web/assets/sophia-CnS9iZB_.js +1 -0
  81. package/dist/web/assets/sparql-CJmd_6j2.js +1 -0
  82. package/dist/web/assets/sql-ClhHkBeG.js +1 -0
  83. package/dist/web/assets/st-CHwy0fLd.js +1 -0
  84. package/dist/web/assets/swift-CnmFD0ga.js +1 -0
  85. package/dist/web/assets/systemverilog-Bs9z6M-B.js +1 -0
  86. package/dist/web/assets/tcl-Dm6ycUr_.js +1 -0
  87. package/dist/web/assets/twig-Csy3S7wG.js +1 -0
  88. package/dist/web/assets/typescript-Bx_6s3Vf.js +1 -0
  89. package/dist/web/assets/typespec-Btyra-wh.js +1 -0
  90. package/dist/web/assets/vb-Db0cS2oM.js +1 -0
  91. package/dist/web/assets/wgsl-BTesnYfV.js +298 -0
  92. package/dist/web/assets/xml-CA6ArVkO.js +1 -0
  93. package/dist/web/assets/yaml-BfVk-7Da.js +1 -0
  94. package/dist/web/index.html +2 -2
  95. package/package.json +1 -1
  96. package/dist/web/assets/index-BCwzZP_O.css +0 -1
  97. package/dist/web/assets/index-huTxUjD-.js +0 -155
  98. package/dist/web/assets/markdown-editor-nKIMVkN5.js +0 -1120
  99. /package/dist/web/assets/{markdown-editor-DMeNDIaI.css → code-editor-DMeNDIaI.css} +0 -0
@@ -1,155 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-editor-nKIMVkN5.js","assets/markdown-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
2
- function GN(e,n){for(var a=0;a<n.length;a++){const o=n[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(o,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function GE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g0={exports:{}},Vu={};var dS;function $N(){if(dS)return Vu;dS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(o,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:e,type:o,key:c,ref:s!==void 0?s:null,props:u}}return Vu.Fragment=n,Vu.jsx=a,Vu.jsxs=a,Vu}var fS;function QN(){return fS||(fS=1,g0.exports=$N()),g0.exports}var x=QN(),m0={exports:{}},Tt={};var hS;function XN(){if(hS)return Tt;hS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),S=Symbol.iterator;function w(k){return k===null||typeof k!="object"?null:(k=S&&k[S]||k["@@iterator"],typeof k=="function"?k:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function O(k,B,W){this.props=k,this.context=B,this.refs=T,this.updater=W||C}O.prototype.isReactComponent={},O.prototype.setState=function(k,B){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,B,"setState")},O.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function M(){}M.prototype=O.prototype;function A(k,B,W){this.props=k,this.context=B,this.refs=T,this.updater=W||C}var N=A.prototype=new M;N.constructor=A,E(N,O.prototype),N.isPureReactComponent=!0;var P=Array.isArray;function j(){}var D={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function F(k,B,W){var re=W.ref;return{$$typeof:e,type:k,key:B,ref:re!==void 0?re:null,props:W}}function G(k,B){return F(k.type,B,k.props)}function J(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function K(k){var B={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(W){return B[W]})}var H=/\/+/g;function U(k,B){return typeof k=="object"&&k!==null&&k.key!=null?K(""+k.key):B.toString(36)}function L(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(j,j):(k.status="pending",k.then(function(B){k.status==="pending"&&(k.status="fulfilled",k.value=B)},function(B){k.status==="pending"&&(k.status="rejected",k.reason=B)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function $(k,B,W,re,Ee){var le=typeof k;(le==="undefined"||le==="boolean")&&(k=null);var me=!1;if(k===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(k.$$typeof){case e:case n:me=!0;break;case y:return me=k._init,$(me(k._payload),B,W,re,Ee)}}if(me)return Ee=Ee(k),me=re===""?"."+U(k,0):re,P(Ee)?(W="",me!=null&&(W=me.replace(H,"$&/")+"/"),$(Ee,B,W,"",function(Te){return Te})):Ee!=null&&(J(Ee)&&(Ee=G(Ee,W+(Ee.key==null||k&&k.key===Ee.key?"":(""+Ee.key).replace(H,"$&/")+"/")+me)),B.push(Ee)),1;me=0;var ge=re===""?".":re+":";if(P(k))for(var ce=0;ce<k.length;ce++)re=k[ce],le=ge+U(re,ce),me+=$(re,B,W,le,Ee);else if(ce=w(k),typeof ce=="function")for(k=ce.call(k),ce=0;!(re=k.next()).done;)re=re.value,le=ge+U(re,ce++),me+=$(re,B,W,le,Ee);else if(le==="object"){if(typeof k.then=="function")return $(L(k),B,W,re,Ee);throw B=String(k),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return me}function Y(k,B,W){if(k==null)return k;var re=[],Ee=0;return $(k,re,"","",function(le){return B.call(W,le,Ee++)}),re}function V(k){if(k._status===-1){var B=k._result,W=B();W.then(function(re){(k._status===0||k._status===-1)&&(k._status=1,k._result=re,W.status===void 0&&(W.status="fulfilled",W.value=re))},function(re){(k._status===0||k._status===-1)&&(k._status=2,k._result=re,W.status===void 0&&(W.status="rejected",W.reason=re))}),k._status===-1&&(k._status=0,k._result=W)}if(k._status===1)return k._result.default;throw k._result}var Q=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)};function ee(k){var B=D.T,W={};W.types=B!==null?B.types:null,D.T=W;try{var re=k(),Ee=D.S;Ee!==null&&Ee(W,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(j,Q)}catch(le){Q(le)}finally{B!==null&&W.types!==null&&(B.types=W.types),D.T=B}}function q(k){var B=D.T;if(B!==null){var W=B.types;W===null?B.types=[k]:W.indexOf(k)===-1&&W.push(k)}else ee(q.bind(null,k))}var se={map:Y,forEach:function(k,B,W){Y(k,function(){B.apply(this,arguments)},W)},count:function(k){var B=0;return Y(k,function(){B++}),B},toArray:function(k){return Y(k,function(B){return B})||[]},only:function(k){if(!J(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Tt.Activity=h,Tt.Children=se,Tt.Component=O,Tt.Fragment=a,Tt.Profiler=s,Tt.PureComponent=A,Tt.StrictMode=o,Tt.Suspense=p,Tt.ViewTransition=b,Tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Tt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return D.H.useMemoCache(k)}},Tt.addTransitionType=q,Tt.cache=function(k){return function(){return k.apply(null,arguments)}},Tt.cacheSignal=function(){return null},Tt.cloneElement=function(k,B,W){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var re=E({},k.props),Ee=k.key;if(B!=null)for(le in B.key!==void 0&&(Ee=""+B.key),B)!z.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(re[le]=B[le]);var le=arguments.length-2;if(le===1)re.children=W;else if(1<le){for(var me=Array(le),ge=0;ge<le;ge++)me[ge]=arguments[ge+2];re.children=me}return F(k.type,Ee,re)},Tt.createContext=function(k){return k={$$typeof:c,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},Tt.createElement=function(k,B,W){var re,Ee={},le=null;if(B!=null)for(re in B.key!==void 0&&(le=""+B.key),B)z.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(Ee[re]=B[re]);var me=arguments.length-2;if(me===1)Ee.children=W;else if(1<me){for(var ge=Array(me),ce=0;ce<me;ce++)ge[ce]=arguments[ce+2];Ee.children=ge}if(k&&k.defaultProps)for(re in me=k.defaultProps,me)Ee[re]===void 0&&(Ee[re]=me[re]);return F(k,le,Ee)},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function(k){return{$$typeof:d,render:k}},Tt.isValidElement=J,Tt.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:V}},Tt.memo=function(k,B){return{$$typeof:g,type:k,compare:B===void 0?null:B}},Tt.startTransition=ee,Tt.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Tt.use=function(k){return D.H.use(k)},Tt.useActionState=function(k,B,W){return D.H.useActionState(k,B,W)},Tt.useCallback=function(k,B){return D.H.useCallback(k,B)},Tt.useContext=function(k){return D.H.useContext(k)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function(k,B){return D.H.useDeferredValue(k,B)},Tt.useEffect=function(k,B){return D.H.useEffect(k,B)},Tt.useEffectEvent=function(k){return D.H.useEffectEvent(k)},Tt.useId=function(){return D.H.useId()},Tt.useImperativeHandle=function(k,B,W){return D.H.useImperativeHandle(k,B,W)},Tt.useInsertionEffect=function(k,B){return D.H.useInsertionEffect(k,B)},Tt.useLayoutEffect=function(k,B){return D.H.useLayoutEffect(k,B)},Tt.useMemo=function(k,B){return D.H.useMemo(k,B)},Tt.useOptimistic=function(k,B){return D.H.useOptimistic(k,B)},Tt.useReducer=function(k,B,W){return D.H.useReducer(k,B,W)},Tt.useRef=function(k){return D.H.useRef(k)},Tt.useState=function(k){return D.H.useState(k)},Tt.useSyncExternalStore=function(k,B,W){return D.H.useSyncExternalStore(k,B,W)},Tt.useTransition=function(){return D.H.useTransition()},Tt.version="19.3.1",Tt}var pS;function Cc(){return pS||(pS=1,m0.exports=XN()),m0.exports}var v=Cc();const Ne=GE(v),$E=GN({__proto__:null,default:Ne},[v]);var y0={exports:{}},qu={},v0={exports:{}},b0={};var gS;function ZN(){return gS||(gS=1,(function(e){function n(L,$){var Y=L.length;L.push($);e:for(;0<Y;){var V=Y-1>>>1,Q=L[V];if(0<s(Q,$))L[V]=$,L[Y]=Q,Y=V;else break e}}function a(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var $=L[0],Y=L.pop();if(Y!==$){L[0]=Y;e:for(var V=0,Q=L.length,ee=Q>>>1;V<ee;){var q=2*(V+1)-1,se=L[q],k=q+1,B=L[k];if(0>s(se,Y))k<Q&&0>s(B,se)?(L[V]=B,L[k]=Y,V=k):(L[V]=se,L[q]=Y,V=q);else if(k<Q&&0>s(B,Y))L[V]=B,L[k]=Y,V=k;else break e}}return $}function s(L,$){var Y=L.sortIndex-$.sortIndex;return Y!==0?Y:L.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,h=null,b=3,S=!1,w=!1,C=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var $=a(g);$!==null;){if($.callback===null)o(g);else if($.startTime<=L)o(g),$.sortIndex=$.expirationTime,n(p,$);else break;$=a(g)}}function N(L){if(C=!1,A(L),!w)if(a(p)!==null)w=!0,P||(P=!0,J());else{var $=a(g);$!==null&&U(N,$.startTime-L)}}var P=!1,j=-1,D=5,z=-1;function F(){return E?!0:!(e.unstable_now()-z<D)}function G(){if(E=!1,P){var L=e.unstable_now();z=L;var $=!0;try{e:{w=!1,C&&(C=!1,O(j),j=-1),S=!0;var Y=b;try{t:{for(A(L),h=a(p);h!==null&&!(h.expirationTime>L&&F());){var V=h.callback;if(typeof V=="function"){h.callback=null,b=h.priorityLevel;var Q=V(h.expirationTime<=L);if(L=e.unstable_now(),typeof Q=="function"){h.callback=Q,A(L),$=!0;break t}h===a(p)&&o(p),A(L)}else o(p);h=a(p)}if(h!==null)$=!0;else{var ee=a(g);ee!==null&&U(N,ee.startTime-L),$=!1}}break e}finally{h=null,b=Y,S=!1}$=void 0}}finally{$?J():P=!1}}}var J;if(typeof M=="function")J=function(){M(G)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,H=K.port2;K.port1.onmessage=G,J=function(){H.postMessage(null)}}else J=function(){T(G,0)};function U(L,$){j=T(function(){L(e.unstable_now())},$)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var Y=b;b=$;try{return L()}finally{b=Y}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(L,$){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var Y=b;b=L;try{return $()}finally{b=Y}},e.unstable_scheduleCallback=function(L,$,Y){var V=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?V+Y:V):Y=V,L){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=Y+Q,L={id:y++,callback:$,priorityLevel:L,startTime:Y,expirationTime:Q,sortIndex:-1},Y>V?(L.sortIndex=Y,n(g,L),a(p)===null&&L===a(g)&&(C?(O(j),j=-1):C=!0,U(N,Y-V))):(L.sortIndex=Q,n(p,L),w||S||(w=!0,P||(P=!0,J()))),L},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(L){var $=b;return function(){var Y=b;b=$;try{return L.apply(this,arguments)}finally{b=Y}}}})(b0)),b0}var mS;function JN(){return mS||(mS=1,v0.exports=ZN()),v0.exports}var x0={exports:{}},xr={};var yS;function WN(){if(yS)return xr;yS=1;var e=Cc();function n(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}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 a(){}var o={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function d(y,h,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:S==null?null:S===c?c:""+S,children:y,containerInfo:h,implementation:b}}var p=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 xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,xr.browser=function(y){return{$$typeof:u,_reason:y}},xr.createPortal=function(y,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return d(y,h,null,b)},xr.flushSync=function(y){var h=p.T,b=o.p;try{if(p.T=null,o.p=2,y)return y()}finally{p.T=h,o.p=b,o.d.f()}},xr.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(y,h))},xr.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},xr.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var b=h.as,S=g(b,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:w,fetchPriority:C}):b==="script"&&o.d.X(y,{crossOrigin:S,integrity:w,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xr.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=g(h.as,h.crossOrigin);o.d.M(y,{crossOrigin:b,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&&o.d.M(y)},xr.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,S=g(b,h.crossOrigin);o.d.L(y,b,{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})}},xr.preloadModule=function(y,h){if(typeof y=="string")if(h){var b=g(h.as,h.crossOrigin);o.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,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 o.d.m(y)},xr.requestFormReset=function(y){o.d.r(y)},xr.unstable_batchedUpdates=function(y,h){return y(h)},xr.useFormState=function(y,h,b){return p.H.useFormState(y,h,b)},xr.useFormStatus=function(){return p.H.useHostTransitionStatus()},xr.version="19.3.1",xr}var vS;function QE(){if(vS)return x0.exports;vS=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(n){console.error(n)}}return e(),x0.exports=WN(),x0.exports}var bS;function e4(){if(bS)return qu;bS=1;var e=JN(),n=Cc(),a=QE();function o(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var r=t,i=r;i&&!i.alternate;)r=i,(r.flags&4098)!==0&&(t=r.return),i=r.return;for(;r.return;)r=r.return;return r.tag===3?t:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(o(188))}function g(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,l=r;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){i=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return p(f),t;if(m===l)return p(f),r;m=m.sibling}throw Error(o(188))}if(i.return!==l.return)i=f,l=m;else{for(var R=!1,I=f.child;I;){if(I===i){R=!0,i=f,l=m;break}if(I===l){R=!0,l=f,i=m;break}I=I.sibling}if(!R){for(I=m.child;I;){if(I===i){R=!0,i=m,l=f;break}if(I===l){R=!0,l=m,i=f;break}I=I.sibling}if(!R)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}function h(t,r,i,l,f,m){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&i(t,l,f,m)||(t.tag!==22||t.memoizedState===null)&&(r||t.tag!==5&&t.tag!==27)&&h(t.child,r,i,l,f,m))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function S(t){var r=!1;for(t=t.return;t!==null&&(t.tag===4&&(r=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return r}function w(t){var r=[null,null],i=b(t);return i===null||C(r,t,i.child,{foundSelf:!1}),r}function C(t,r,i,l){for(;i!==null;){if(i===r)l.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(l.foundSelf)return t[1]=i,!0;t[0]=i}else if((i.tag!==22||i.memoizedState===null)&&C(t,r,i.child,l))return!0;i=i.sibling}return!1}function E(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(o(559))}}var T=null,O=null;function M(t,r,i){return t===i?!0:t===r?(T=t,!0):!1}function A(t,r,i){return t===i?(O=t,!1):t===r?(O!==null&&(T=t),!0):!1}function N(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function P(t,r,i){for(var l=0,f=t;f;f=i(f))l++;f=0;for(var m=r;m;m=i(m))f++;for(;0<l-f;)t=i(t),l--;for(;0<f-l;)r=i(r),f--;for(;l--;){if(t===r||r!==null&&t===r.alternate)return t;t=i(t),r=i(r)}return null}var j=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),U=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),q=Symbol.for("react.legacy_hidden"),se=Symbol.for("react.memo_cache_sentinel"),k=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),W=Symbol.iterator;function re(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var Ee=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ee?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case K:return"Profiler";case J:return"StrictMode";case $:return"Suspense";case Y:return"SuspenseList";case ee:return"Activity";case k:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case F:return"Portal";case U:return t.displayName||"Context";case H:return(t._context.displayName||"Context")+".Consumer";case L:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return r=t.displayName||null,r!==null?r:le(t.type)||"Memo";case Q:r=t._payload,t=t._init;try{return le(t(r))}catch{}}return null}var me=Array.isArray,ge=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},ve=[],Pe=-1;function Me(t){return{current:t}}function Le(t){0>Pe||(t.current=ve[Pe],ve[Pe]=null,Pe--)}function Fe(t,r){Pe++,ve[Pe]=t.current,t.current=r}var Oe=Me(null),Ue=Me(null),be=Me(null),He=Me(null);function Ze(t,r){switch(Fe(be,r),Fe(Ue,t),Fe(Oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?x1(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=x1(r),t=S1(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Le(Oe),Fe(Oe,t)}function it(){Le(Oe),Le(Ue),Le(be)}function de(t){var r=t.memoizedState;r!==null&&(fl._currentValue=r.memoizedState,Fe(He,t)),r=Oe.current;var i=S1(r,t.type);r!==i&&(Fe(Ue,t),Fe(Oe,i))}function we(t){Ue.current===t&&(Le(Oe),Le(Ue)),He.current===t&&(Le(He),fl._currentValue=Te)}var Ye,De;function ke(t){if(Ye===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Ye=r&&r[1]||"",De=-1<i.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+Ye+t+De}var yt=!1;function ut(t,r){if(!t||yt)return"";yt=!0;var i=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(Ke){var ae=Ke}Reflect.construct(t,[],Ce)}else{try{Ce.call()}catch(Ke){ae=Ke}Ce=!1;try{var fe=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Ce=!0,new t}finally{Ce&&(fe!==void 0?Object.defineProperty(t.prototype,"props",fe):delete t.prototype.props)}}}else{try{throw Error()}catch(Ke){ae=Ke}(Ce=t())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(Ke){if(Ke&&ae&&typeof Ke.stack=="string")return[Ke.stack,ae.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),R=m[0],I=m[1];if(R&&I){var X=R.split(`
5
- `),ie=I.split(`
6
- `);for(f=l=0;l<X.length&&!X[l].includes("DetermineComponentFrameRoot");)l++;for(;f<ie.length&&!ie[f].includes("DetermineComponentFrameRoot");)f++;if(l===X.length||f===ie.length)for(l=X.length-1,f=ie.length-1;1<=l&&0<=f&&X[l]!==ie[f];)f--;for(;1<=l&&0<=f;l--,f--)if(X[l]!==ie[f]){if(l!==1||f!==1)do if(l--,f--,0>f||X[l]!==ie[f]){var pe=`
7
- `+X[l].replace(" at new "," at ");return t.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",t.displayName)),pe}while(1<=l&&0<=f);break}}}finally{yt=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?ke(i):""}function ht(t,r){switch(t.tag){case 26:case 27:case 5:return ke(t.type);case 16:return ke("Lazy");case 13:return t.child!==r&&r!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return ut(t.type,!1);case 11:return ut(t.type.render,!1);case 1:return ut(t.type,!0);case 31:return ke("Activity");case 30:return ke("ViewTransition");default:return""}}function Ot(t){try{var r="",i=null;do r+=ht(t,i),i=t,t=t.return;while(t);return r}catch(l){return`
8
- Error generating stack: `+l.message+`
9
- `+l.stack}}var Dt=Object.prototype.hasOwnProperty,en=e.unstable_scheduleCallback,an=e.unstable_cancelCallback,tn=e.unstable_shouldYield,We=e.unstable_requestPaint,xt=e.unstable_now,Xt=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,vt=e.unstable_UserBlockingPriority,gt=e.unstable_NormalPriority,zt=e.unstable_LowPriority,un=e.unstable_IdlePriority,je=e.log,ot=e.unstable_setDisableYieldValue,Ie=null,ze=null;function Ge(t){if(typeof je=="function"&&ot(t),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Ie,t)}catch{}}var et=Math.clz32?Math.clz32:Z,Rt=Math.log,_=Math.LN2;function Z(t){return t>>>=0,t===0?32:31-(Rt(t)/_|0)|0}var ne=256,ye=262144,xe=4194304;function qe(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ve(t,r,i){var l=t.pendingLanes;if(l===0)return 0;var f=0,m=t.suspendedLanes,R=t.pingedLanes;t=t.warmLanes;var I=l&134217727;return I!==0?(l=I&~m,l!==0?f=qe(l):(R&=I,R!==0?f=qe(R):i||(i=I&~t,i!==0&&(f=qe(i))))):(I=l&~m,I!==0?f=qe(I):R!==0?f=qe(R):i||(i=l&~t,i!==0&&(f=qe(i)))),f===0?0:r!==0&&r!==f&&(r&m)===0&&(m=f&-f,i=r&-r,m>=i||m===32&&(i&4194048)!==0)?r:f}function Xe(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function $e(t,r){(r&8)!==0&&(r|=r&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=r;0<i;){var l=31-et(i),f=1<<l;r|=t[l],i&=~f}return r}function st(t,r){switch(t){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 t=xe;return xe<<=1,(xe&62914560)===0&&(xe=4194304),t}function St(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function ct(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Vt(t,r,i,l,f,m){var R=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var I=t.entanglements,X=t.expirationTimes,ie=t.hiddenUpdates;for(i=R&~i;0<i;){var pe=31-et(i),Ce=1<<pe;I[pe]=0,X[pe]=-1;var ae=ie[pe];if(ae!==null)for(ie[pe]=null,pe=0;pe<ae.length;pe++){var fe=ae[pe];fe!==null&&(fe.lane&=-536870913)}i&=~Ce}l!==0&&Ut(t,l,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(R&~r))}function Ut(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var l=31-et(r);t.entangledLanes|=r,t.entanglements[l]=t.entanglements[l]|1073741824|i&261930}function On(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var l=31-et(i),f=1<<l;f&r|t[l]&r&&(t[l]|=r),i&=~f}}function qt(t,r){var i=r&-r;return i=(i&42)!==0?1:Ht(i),(i&(t.suspendedLanes|r))!==0?0:i}function Ht(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Rn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Cn(){var t=ce.p;return t!==0?t:(t=window.event,t===void 0?32:aS(t.type))}function Zr(t,r){var i=ce.p;try{return ce.p=t,r()}finally{ce.p=i}}var cn=Math.random().toString(36).slice(2),dn="__reactFiber$"+cn,Mn="__reactProps$"+cn,jn="__reactContainer$"+cn,bo="__reactEvents$"+cn,Dr="__reactListeners$"+cn,Ia="__reactHandles$"+cn,Jr="__reactResources$"+cn,ga="__reactMarker$"+cn,Pt="__reactLoad$"+cn;function Kn(t){delete t[dn],delete t[Mn],delete t[Dr],delete t[Ia]}function Fn(t){var r;if(r=t[dn])return r;for(var i=t.parentNode;i;){if(r=i[jn]||i[dn]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=_1(t);t!==null;){if(i=t[dn])return i;t=_1(t)}return r}t=i,i=t.parentNode}return null}function fr(t){if(t=t[dn]||t[jn]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function he(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(o(33))}function Ae(t){var r=t[Jr];return r||(r=t[Jr]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(t){t[ga]=!0}function nt(t){t[Pt]=void 0}var Ct=new Set,wt={};function _t(t,r){vn(t,r),vn(t+"Capture",r)}function vn(t,r){for(wt[t]=r,t=0;t<r.length;t++)Ct.add(r[t])}var fn=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]*$"),mt={},At={};function on(t){return Dt.call(At,t)?!0:Dt.call(mt,t)?!1:fn.test(t)?At[t]=!0:(mt[t]=!0,!1)}var pt=!1;function nr(){var t=pt;return pt=!1,t}function zn(t,r,i){if(on(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,i)}}function Wr(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,i)}}function Gn(t,r,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,l)}}function $n(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ds(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Jl(t,r,i){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,m=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(R){i=""+R,m.call(this,R)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(R){i=""+R},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function xo(t){if(!t._valueTracker){var r=Ds(t)?"checked":"value";t._valueTracker=Jl(t,r,""+t[r])}}function Ns(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return t&&(l=Ds(t)?t.checked?"true":"false":t.value),t=l,t!==i?(r.setValue(t),!0):!1}var sd=/[\n"\\]/g;function Nn(t){return t.replace(sd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function wr(t,r,i,l,f,m,R,I){t.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.type=R:t.removeAttribute("type"),r!=null?R==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+$n(r)):t.value!==""+$n(r)&&(t.value=""+$n(r)):R!=="submit"&&R!=="reset"||t.removeAttribute("value"),r!=null?R==="number"&&t.value==r?ks(t,$n(t.value)):ks(t,$n(r)):i!=null?ks(t,$n(i)):l!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?t.name=""+$n(I):t.removeAttribute("name")}function Ko(t,r,i,l,f,m,R,I){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){xo(t);return}i=i!=null?""+$n(i):"",r=r!=null?""+$n(r):i,I||r===t.value||(t.value=r),t.defaultValue=r}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=I?t.checked:!!l,t.defaultChecked=!!l,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(t.name=R),xo(t)}function ks(t,r){t.defaultValue!==""+r&&(t.defaultValue=""+r)}function Br(t,r,i,l){if(t=t.options,r){r={};for(var f=0;f<i.length;f++)r["$"+i[f]]=!0;for(i=0;i<t.length;i++)f=r.hasOwnProperty("$"+t[i].value),t[i].selected!==f&&(t[i].selected=f),f&&l&&(t[i].defaultSelected=!0)}else{for(i=""+$n(i),r=null,f=0;f<t.length;f++){if(t[f].value===i){t[f].selected=!0,l&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function js(t,r,i){if(r!=null&&(r=""+$n(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+$n(i):""}function ea(t,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(o(92));if(me(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=$n(r),t.defaultValue=i,l=t.textContent,l===i&&l!==""&&l!==null&&(t.value=l),xo(t)}function Nr(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Yo=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 Wl(t,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":l?t.setProperty(r,i):typeof i!="number"||i===0||Yo.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function ta(t,r,i){if(r!=null&&typeof r!="object")throw Error(o(62));if(t=t.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="",pt=!0);for(var f in r)l=r[f],r.hasOwnProperty(f)&&i[f]!==l&&(Wl(t,f,l),pt=!0)}else for(var m in r)r.hasOwnProperty(m)&&Wl(t,m,r[m])}function Li(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var eu=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"]]),tu=/^[\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 hr(t){return tu.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function kr(){}var zi=null;function _i(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var nn=null,or=null;function ma(t){var r=fr(t);if(r&&(t=r.stateNode)){var i=t[Mn]||null;e:switch(t=r.stateNode,r.type){case"input":if(wr(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Nn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==t&&l.form===t.form){var f=l[Mn]||null;if(!f)throw Error(o(90));wr(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===t.form&&Ns(l)}break e;case"textarea":js(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&Br(t,!!i.multiple,r,!1)}}}var na=!1;function Ui(t,r,i){if(na)return t(r,i);na=!0;try{var l=t(r);return l}finally{if(na=!1,(nn!==null||or!==null)&&(lf(),nn&&(r=nn,t=or,or=nn=null,ma(r),t)))for(r=0;r<t.length;r++)ma(t[r])}}function So(t,r){var i=t.stateNode;if(i===null)return null;var l=i[Mn]||null;if(l===null)return null;i=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)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hi=!1;if(pr)try{var nu={};Object.defineProperty(nu,"passive",{get:function(){Hi=!0}}),window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch{Hi=!1}var Go=null,Wp=null,ld=null;function mb(){if(ld)return ld;var t,r=Wp,i=r.length,l,f="value"in Go?Go.value:Go.textContent,m=f.length;for(t=0;t<i&&r[t]===f[t];t++);var R=i-t;for(l=1;l<=R&&r[i-l]===f[m-l];l++);return ld=f.slice(t,1<l?1-l:void 0)}function ud(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function cd(){return!0}function yb(){return!1}function jr(t){function r(i,l,f,m,R){this._reactName=i,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=R,this.currentTarget=null;for(var I in t)t.hasOwnProperty(I)&&(i=t[I],this[I]=i?i(m):m[I]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?cd:yb,this.isPropagationStopped=yb,this}return j(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=cd)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=cd)},persist:function(){},isPersistent:cd}),r}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dd=jr($o),ru=j({},$o,{view:0,detail:0}),vA=jr(ru),eg,tg,au,fd=j({},ru,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rg,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==au&&(au&&t.type==="mousemove"?(eg=t.screenX-au.screenX,tg=t.screenY-au.screenY):tg=eg=0,au=t),eg)},movementY:function(t){return"movementY"in t?t.movementY:tg}}),vb=jr(fd),bA=j({},fd,{dataTransfer:0}),xA=jr(bA),SA=j({},ru,{relatedTarget:0}),ng=jr(SA),wA=j({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),EA=jr(wA),RA=j({},$o,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),CA=jr(RA),TA=j({},$o,{data:0}),bb=jr(TA),OA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MA={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"},AA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DA(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=AA[t])?!!r[t]:!1}function rg(){return DA}var NA=j({},ru,{key:function(t){if(t.key){var r=OA[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ud(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?MA[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rg,charCode:function(t){return t.type==="keypress"?ud(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ud(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),kA=jr(NA),jA=j({},fd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xb=jr(jA),IA=j({},$o,{submitter:0}),PA=jr(IA),LA=j({},ru,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rg}),zA=jr(LA),_A=j({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),UA=jr(_A),HA=j({},fd,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),FA=jr(HA),BA=j({},$o,{newState:0,oldState:0,source:0}),VA=jr(BA),qA=[9,13,27,32],ag=pr&&"CompositionEvent"in window,ou=null;pr&&"documentMode"in document&&(ou=document.documentMode);var KA=pr&&"TextEvent"in window&&!ou,Sb=pr&&(!ag||ou&&8<ou&&11>=ou),wb=" ",Eb=!1;function Rb(t,r){switch(t){case"keyup":return qA.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Is=!1;function YA(t,r){switch(t){case"compositionend":return Cb(r);case"keypress":return r.which!==32?null:(Eb=!0,wb);case"textInput":return t=r.data,t===wb&&Eb?null:t;default:return null}}function GA(t,r){if(Is)return t==="compositionend"||!ag&&Rb(t,r)?(t=mb(),ld=Wp=Go=null,Is=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Sb&&r.locale!=="ko"?null:r.data;default:return null}}var $A={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 Tb(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!$A[t.type]:r==="textarea"}function Ob(t,r,i,l){nn?or?or.push(l):or=[l]:nn=l,r=pf(r,"onChange"),0<r.length&&(i=new dd("onChange","change",null,i,l),t.push({event:i,listeners:r}))}var iu=null,su=null;function QA(t){p1(t,0)}function hd(t){var r=he(t);if(Ns(r))return t}function Mb(t,r){if(t==="change")return r}var Ab=!1;if(pr){var og;if(pr){var ig="oninput"in document;if(!ig){var Db=document.createElement("div");Db.setAttribute("oninput","return;"),ig=typeof Db.oninput=="function"}og=ig}else og=!1;Ab=og&&(!document.documentMode||9<document.documentMode)}function Nb(){iu&&(iu.detachEvent("onpropertychange",kb),su=iu=null)}function kb(t){if(t.propertyName==="value"&&hd(su)){var r=[];Ob(r,su,t,_i(t)),Ui(QA,r)}}function XA(t,r,i){t==="focusin"?(Nb(),iu=r,su=i,iu.attachEvent("onpropertychange",kb)):t==="focusout"&&Nb()}function ZA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return hd(su)}function JA(t,r){if(t==="click")return hd(r)}function WA(t,r){if(t==="input"||t==="change")return hd(r)}function eD(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var ra=typeof Object.is=="function"?Object.is:eD;function lu(t,r){if(ra(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var f=i[l];if(!Dt.call(r,f)||!ra(t[f],r[f]))return!1}return!0}function sg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function jb(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ib(t,r){var i=jb(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=r&&l>=r)return{node:i,offset:r-t};t=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=jb(i)}}function Pb(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Pb(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Lb(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=sg(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=sg(t.document)}return r}function lg(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var tD=pr&&"documentMode"in document&&11>=document.documentMode,Ps=null,ug=null,uu=null,cg=!1;function zb(t,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;cg||Ps==null||Ps!==sg(l)||(l=Ps,"selectionStart"in l&&lg(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}),uu&&lu(uu,l)||(uu=l,l=pf(ug,"onSelect"),0<l.length&&(r=new dd("onSelect","select",null,r,i),t.push({event:r,listeners:l}),r.target=Ps)))}function Fi(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var Ls={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},dg={},_b={};pr&&(_b=document.createElement("div").style,"AnimationEvent"in window||(delete Ls.animationend.animation,delete Ls.animationiteration.animation,delete Ls.animationstart.animation),"TransitionEvent"in window||delete Ls.transitionend.transition);function Bi(t){if(dg[t])return dg[t];if(!Ls[t])return t;var r=Ls[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in _b)return dg[t]=r[i];return t}var Ub=Bi("animationend"),Hb=Bi("animationiteration"),Fb=Bi("animationstart"),nD=Bi("transitionrun"),rD=Bi("transitionstart"),aD=Bi("transitioncancel"),Bb=Bi("transitionend"),Vb=new Map,fg="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(" ");fg.push("scrollEnd");function Pa(t,r){Vb.set(t,r),_t(r,[t])}var oD=0;function wo(t,r){if(t.name!=null&&t.name!=="auto")return t.name;if(r.autoName!==null)return r.autoName;t=Ua.identifierPrefix;var i=oD++;return t="_"+t+"t_"+i.toString(32)+"_",r.autoName=t}function qb(t){if(t==null||typeof t=="string")return t;var r=null,i=nl;if(i!==null)for(var l=0;l<i.length;l++){var f=t[i[l]];if(f!=null){if(f==="none")return"none";r=r==null?f:r+(" "+f)}}return r??t.default}function Eo(t,r){return t=qb(t),r=qb(r),r==null?t==="auto"?null:t:r==="auto"?null:r}var pd=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ya=[],zs=0,hg=0;function gd(){for(var t=zs,r=hg=zs=0;r<t;){var i=ya[r];ya[r++]=null;var l=ya[r];ya[r++]=null;var f=ya[r];ya[r++]=null;var m=ya[r];if(ya[r++]=null,l!==null&&f!==null){var R=l.pending;R===null?f.next=f:(f.next=R.next,R.next=f),l.pending=f}m!==0&&Kb(i,f,m)}}function md(t,r,i,l){ya[zs++]=t,ya[zs++]=r,ya[zs++]=i,ya[zs++]=l,hg|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function pg(t,r,i,l){return md(t,r,i,l),yd(t)}function Vi(t,r){return md(t,null,null,r),yd(t)}function Kb(t,r,i){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i);for(var f=!1,m=t.return;m!==null;)m.childLanes|=i,l=m.alternate,l!==null&&(l.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&r!==null&&(f=31-et(i),t=m.hiddenUpdates,l=t[f],l===null?t[f]=[r]:l.push(r),r.lane=i|536870912),m):null}function yd(t){if(50<Nu)throw Nu=0,sf=null,Error(o(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var _s={};function iD(t,r,i,l){this.tag=t,this.key=i,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 Vr(t,r,i,l){return new iD(t,r,i,l)}function gg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ro(t,r){var i=t.alternate;return i===null?(i=Vr(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&1206910976,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Yb(t,r){t.flags&=1206910978;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function vd(t,r,i,l,f,m){var R=0;if(l=t,typeof l=="function")gg(l)&&(R=1);else if(typeof l=="string")R=IN(t,i,Oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(l){case ee:return t=Vr(31,i,r,f),t.elementType=ee,t.lanes=m,t;case G:return qi(i.children,f,m,r);case J:R=8,f|=24;break;case K:return t=Vr(12,i,r,f|2),t.elementType=K,t.lanes=m,t;case $:return t=Vr(13,i,r,f),t.elementType=$,t.lanes=m,t;case Y:return t=Vr(19,i,r,f),t.elementType=Y,t.lanes=m,t;case q:case k:return t=f|32,t=Vr(30,i,r,t),t.elementType=k,t.lanes=m,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case U:R=10;break e;case H:R=9;break e;case L:R=11;break e;case V:R=14;break e;case Q:R=16,l=null;break e}R=29,i=Error(o(130,t===null?"null":typeof t,"")),l=null}return r=Vr(R,i,r,f),r.elementType=t,r.type=l,r.lanes=m,r}function qi(t,r,i,l){return t=Vr(7,t,l,r),t.lanes=i,t}function mg(t,r,i){return t=Vr(6,t,null,r),t.lanes=i,t}function Gb(t){var r=Vr(18,null,null,0);return r.stateNode=t,r}function yg(t,r,i){return r=Vr(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var $b=new WeakMap;function va(t,r){if(typeof t=="object"&&t!==null){var i=$b.get(t);return i!==void 0?i:(r={value:t,source:r,stack:Ot(r)},$b.set(t,r),r)}return{value:t,source:r,stack:Ot(r)}}var Us=[],Hs=0,bd=null,cu=0,ba=[],xa=0,Qo=null,$a=1,Qa="";function Co(t,r){Us[Hs++]=cu,Us[Hs++]=bd,bd=t,cu=r}function Qb(t,r,i){ba[xa++]=$a,ba[xa++]=Qa,ba[xa++]=Qo,Qo=t;var l=$a;t=Qa;var f=32-et(l)-1;l&=~(1<<f),i+=1;var m=32-et(r)+f;if(30<m){var R=f-f%5;m=(l&(1<<R)-1).toString(32),l>>=R,f-=R,$a=1<<32-et(r)+f|i<<f|l,Qa=m+t}else $a=1<<m|i<<f|l,Qa=t}function xd(t){t.return!==null&&(Co(t,1),Qb(t,1,0))}function vg(t){for(;t===bd;)bd=Us[--Hs],Us[Hs]=null,cu=Us[--Hs],Us[Hs]=null;for(;t===Qo;)Qo=ba[--xa],ba[xa]=null,Qa=ba[--xa],ba[xa]=null,$a=ba[--xa],ba[xa]=null}function Xb(t,r){ba[xa++]=$a,ba[xa++]=Qa,ba[xa++]=Qo,$a=r.id,Qa=r.overflow,Qo=t}var ir=null,An=null,Ft=!1,Xo=null,Sa=!1,bg=Error(o(519));function Zo(t){var r=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw du(va(r,t)),bg}function Zb(t){var r=t.stateNode,i=t.type,l=t.memoizedProps;switch(r[dn]=t,r[Mn]=l,i){case"dialog":Yt("cancel",r),Yt("close",r);break;case"iframe":case"object":case"embed":Yt("load",r);break;case"video":case"audio":for(i=0;i<ju.length;i++)Yt(ju[i],r);break;case"source":Yt("error",r);break;case"img":case"image":case"link":Yt("error",r),Yt("load",r);break;case"details":Yt("toggle",r);break;case"input":Yt("invalid",r),Ko(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Yt("invalid",r);break;case"textarea":Yt("invalid",r),ea(r,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||v1(r.textContent,i)?(l.popover!=null&&(Yt("beforetoggle",r),Yt("toggle",r)),l.onScroll!=null&&Yt("scroll",r),l.onScrollEnd!=null&&Yt("scrollend",r),l.onClick!=null&&(r.onclick=kr),r=!0):r=!1,r||Zo(t,!0)}function Sd(t){for(ir=t.return;ir;)switch(ir.tag){case 5:case 31:case 13:Sa=!1;return;case 27:case 3:Sa=!0;return;default:ir=ir.return}}function Fs(t){if(t!==ir)return!1;if(!Ft)return Sd(t),Ft=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||Qm(t.type,t.memoizedProps)),i=!i),i&&An&&Zo(t),Sd(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=z1(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=z1(t)}else r===27?(r=An,hi(t.type)?(t=a0,a0=null,An=t):An=r):An=ir?Ea(t.stateNode.nextSibling):null;return!0}function Ki(){An=ir=null,Ft=!1}function xg(){var t=Xo;return t!==null&&(Yr===null?Yr=t:Yr.push.apply(Yr,t),Xo=null),t}function du(t){Xo===null?Xo=[t]:Xo.push(t)}var Sg=Me(null),Yi=null,To=null;function Jo(t,r,i){Fe(Sg,r._currentValue),r._currentValue=i}function Oo(t){t._currentValue=Sg.current,Le(Sg)}function wd(t,r,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),t===i)break;t=t.return}}function wg(t,r,i,l){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var R=f.child;m=m.firstContext;e:for(;m!==null;){var I=m;m=f;for(var X=0;X<r.length;X++)if(I.context===r[X]){m.lanes|=i,I=m.alternate,I!==null&&(I.lanes|=i),wd(m.return,i,t),l||(R=null);break e}m=I.next}}else if(f.tag===18){if(R=f.return,R===null)throw Error(o(341));R.lanes|=i,m=R.alternate,m!==null&&(m.lanes|=i),wd(R,i,t),R=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=i,R=f.alternate,R!==null&&(R.lanes|=i),wd(f.return,i,t),R=f.child,R=R!==null?R.sibling:null):R=f.child;if(R!==null)R.return=f;else for(R=f;R!==null;){if(R===t){R=null;break}if(f=R.sibling,f!==null){f.return=R.return,R=f;break}R=R.return}f=R}}function Gi(t,r,i,l){t=null;for(var f=r,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var R=f.alternate;if(R===null)throw Error(o(387));if(R=R.memoizedProps,R!==null){var I=f.type;ra(f.pendingProps.value,R.value)||(t!==null?t.push(I):t=[I])}}else if(f===He.current){if(R=f.alternate,R===null)throw Error(o(387));R.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(fl):t=[fl])}f=f.return}return t!==null&&wg(r,t,i,l),r.flags|=262144,t!==null}function Ed(t){for(t=t.firstContext;t!==null;){if(!ra(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function $i(t){Yi=t,To=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gr(t){return Jb(Yi,t)}function Rd(t,r){return Yi===null&&$i(t),Jb(t,r)}function Jb(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},To===null){if(t===null)throw Error(o(308));To=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else To=To.next=r;return i}var sD=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,l){t.push(l)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},lD=e.unstable_scheduleCallback,uD=e.unstable_NormalPriority,Qn={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eg(){return{controller:new sD,data:new Map,refCount:0}}function fu(t){t.refCount--,t.refCount===0&&lD(uD,function(){t.controller.abort()})}function Wb(t,r){if((t.pendingLanes&4194048)!==0){var i=t.transitionTypes;for(i===null&&(i=t.transitionTypes=[]),t=0;t<r.length;t++){var l=r[t];i.indexOf(l)===-1&&i.push(l)}}}var hu=null;function cD(t){var r=t.transitionTypes;return t.transitionTypes=null,r}var pu=null,Rg=0,Qi=0,Bs=null;function dD(t,r){if(pu===null){var i=pu=[];Rg=0,Qi=Hm(),Bs={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Rg++,r.then(ex,ex),r}function ex(){if(--Rg===0&&(hu=null,pu!==null)){Bs!==null&&(Bs.status="fulfilled");var t=pu;pu=null,Qi=0,Bs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function fD(t,r){var i=[],l={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return t.then(function(){l.status="fulfilled",l.value=r;for(var f=0;f<i.length;f++)(0,i[f])(r)},function(f){for(l.status="rejected",l.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),l}var tx=ge.S;ge.S=function(t,r){if(G2=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&dD(t,r),hu!==null)for(var i=il;i!==null;)Wb(i,hu),i=i.next;if(i=t.types,i!==null){for(var l=il;l!==null;)Wb(l,i),l=l.next;if(Qi!==0){l=hu,l===null&&(l=hu=[]);for(var f=0;f<i.length;f++){var m=i[f];l.indexOf(m)===-1&&l.push(m)}}}tx!==null&&tx(t,r)};var Xi=Me(null);function Cg(){var t=Xi.current;return t!==null?t:Tn.pooledCache}function Cd(t,r){r===null?Fe(Xi,Xi.current):Fe(Xi,r.pool)}function nx(){var t=Cg();return t===null?null:{parent:Qn._currentValue,pool:t}}var Vs=Error(o(460)),Tg=Error(o(474)),Td=Error(o(542)),Od={then:function(){}};function rx(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ax(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(kr,kr),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,ix(t),t===void 0&&!("reason"in r)?Error(o(600)):t;default:if(typeof r.status=="string")r.then(kr,kr);else{if(t=Tn,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=r,t.status="pending",t.then(function(l){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=l}},function(l){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,ix(t),t}throw Ji=r,Vs}}function Zi(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ji=i,Vs):i}}var Ji=null;function ox(){if(Ji===null)throw Error(o(459));var t=Ji;return Ji=null,t}function ix(t){if(t===Vs||t===Td)throw Error(o(483))}var qs=null,gu=0;function Md(t){var r=gu;return gu+=1,qs===null&&(qs=[]),ax(qs,t,r)}function Wo(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Ad(t,r){throw r.$$typeof===D?Error(o(525)):(t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function sx(t){function r(oe,te){if(t){var ue=oe.deletions;ue===null?(oe.deletions=[te],oe.flags|=16):ue.push(te)}}function i(oe,te){if(!t)return null;for(;te!==null;)r(oe,te),te=te.sibling;return null}function l(oe){for(var te=new Map;oe!==null;)oe.key===null?te.set(oe.index,oe):te.set(oe.key,oe),oe=oe.sibling;return te}function f(oe,te){return oe=Ro(oe,te),oe.index=0,oe.sibling=null,oe}function m(oe,te,ue){return oe.index=ue,t?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<te?(oe.flags|=2,te):ue):(oe.flags|=134217730,te)):(oe.flags|=1048576,te)}function R(oe){return t&&oe.alternate===null&&(oe.flags|=134217730),oe}function I(oe,te,ue,Re){return te===null||te.tag!==6?(te=mg(ue,oe.mode,Re),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function X(oe,te,ue,Re){var Je=ue.type;return Je===G?(oe=pe(oe,te,ue.props.children,Re,ue.key),Wo(oe,ue),oe):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===Q&&Zi(Je)===te.type)?(te=f(te,ue.props),Wo(te,ue),te.return=oe,te):(te=vd(ue.type,ue.key,ue.props,null,oe.mode,Re),Wo(te,ue),te.return=oe,te)}function ie(oe,te,ue,Re){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=yg(ue,oe.mode,Re),te.return=oe,te):(te=f(te,ue.children||[]),te.return=oe,te)}function pe(oe,te,ue,Re,Je){return te===null||te.tag!==7?(te=qi(ue,oe.mode,Re,Je),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Ce(oe,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=mg(""+te,oe.mode,ue),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case z:return ue=vd(te.type,te.key,te.props,null,oe.mode,ue),Wo(ue,te),ue.return=oe,ue;case F:return te=yg(te,oe.mode,ue),te.return=oe,te;case Q:return te=Zi(te),Ce(oe,te,ue)}if(me(te)||re(te))return te=qi(te,oe.mode,ue,null),te.return=oe,te;if(typeof te.then=="function")return Ce(oe,Md(te),ue);if(te.$$typeof===U)return Ce(oe,Rd(oe,te),ue);Ad(oe,te)}return null}function ae(oe,te,ue,Re){var Je=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Je!==null?null:I(oe,te,""+ue,Re);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:return ue.key===Je?X(oe,te,ue,Re):null;case F:return ue.key===Je?ie(oe,te,ue,Re):null;case Q:return ue=Zi(ue),ae(oe,te,ue,Re)}if(me(ue)||re(ue))return Je!==null?null:pe(oe,te,ue,Re,null);if(typeof ue.then=="function")return ae(oe,te,Md(ue),Re);if(ue.$$typeof===U)return ae(oe,te,Rd(oe,ue),Re);Ad(oe,ue)}return null}function fe(oe,te,ue,Re,Je){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return oe=oe.get(ue)||null,I(te,oe,""+Re,Je);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case z:return oe=oe.get(Re.key===null?ue:Re.key)||null,X(te,oe,Re,Je);case F:return oe=oe.get(Re.key===null?ue:Re.key)||null,ie(te,oe,Re,Je);case Q:return Re=Zi(Re),fe(oe,te,ue,Re,Je)}if(me(Re)||re(Re))return oe=oe.get(ue)||null,pe(te,oe,Re,Je,null);if(typeof Re.then=="function")return fe(oe,te,ue,Md(Re),Je);if(Re.$$typeof===U)return fe(oe,te,ue,Rd(te,Re),Je);Ad(te,Re)}return null}function Ke(oe,te,ue,Re){for(var Je=null,Jt=null,lt=te,bt=te=0,Jn=null;lt!==null&&bt<ue.length;bt++){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var rn=ae(oe,lt,ue[bt],Re);if(rn===null){lt===null&&(lt=Jn);break}t&&lt&&rn.alternate===null&&r(oe,lt),te=m(rn,te,bt),Jt===null?Je=rn:Jt.sibling=rn,Jt=rn,lt=Jn}if(bt===ue.length)return i(oe,lt),Ft&&Co(oe,bt),Je;if(lt===null){for(;bt<ue.length;bt++)lt=Ce(oe,ue[bt],Re),lt!==null&&(te=m(lt,te,bt),Jt===null?Je=lt:Jt.sibling=lt,Jt=lt);return Ft&&Co(oe,bt),Je}for(lt=l(lt);bt<ue.length;bt++)Jn=fe(lt,oe,bt,ue[bt],Re),Jn!==null&&(t&&(rn=Jn.alternate,rn!==null&&lt.delete(rn.key===null?bt:rn.key)),te=m(Jn,te,bt),Jt===null?Je=Jn:Jt.sibling=Jn,Jt=Jn);return t&&lt.forEach(function(vi){return r(oe,vi)}),Ft&&Co(oe,bt),Je}function rt(oe,te,ue,Re){if(ue==null)throw Error(o(151));for(var Je=null,Jt=null,lt=te,bt=te=0,Jn=null,rn=ue.next();lt!==null&&!rn.done;bt++,rn=ue.next()){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var vi=ae(oe,lt,rn.value,Re);if(vi===null){lt===null&&(lt=Jn);break}t&&lt&&vi.alternate===null&&r(oe,lt),te=m(vi,te,bt),Jt===null?Je=vi:Jt.sibling=vi,Jt=vi,lt=Jn}if(rn.done)return i(oe,lt),Ft&&Co(oe,bt),Je;if(lt===null){for(;!rn.done;bt++,rn=ue.next())rn=Ce(oe,rn.value,Re),rn!==null&&(te=m(rn,te,bt),Jt===null?Je=rn:Jt.sibling=rn,Jt=rn);return Ft&&Co(oe,bt),Je}for(lt=l(lt);!rn.done;bt++,rn=ue.next())rn=fe(lt,oe,bt,rn.value,Re),rn!==null&&(t&&(Jn=rn.alternate,Jn!==null&&lt.delete(Jn.key===null?bt:Jn.key)),te=m(rn,te,bt),Jt===null?Je=rn:Jt.sibling=rn,Jt=rn);return t&&lt.forEach(function(YN){return r(oe,YN)}),Ft&&Co(oe,bt),Je}function kt(oe,te,ue,Re){if(typeof ue=="object"&&ue!==null&&ue.type===G&&ue.key===null&&ue.props.ref===void 0&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:e:{for(var Je=ue.key;te!==null;){if(te.key===Je){if(Je=ue.type,Je===G){if(te.tag===7){i(oe,te.sibling),Re=f(te,ue.props.children),Wo(Re,ue),Re.return=oe,oe=Re;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===Q&&Zi(Je)===te.type){i(oe,te.sibling),Re=f(te,ue.props),Wo(Re,ue),Re.return=oe,oe=Re;break e}i(oe,te);break}else r(oe,te);te=te.sibling}ue.type===G?(Re=qi(ue.props.children,oe.mode,Re,ue.key),Wo(Re,ue),Re.return=oe,oe=Re):(Re=vd(ue.type,ue.key,ue.props,null,oe.mode,Re),Wo(Re,ue),Re.return=oe,oe=Re)}return R(oe);case F:e:{for(Je=ue.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){i(oe,te.sibling),Re=f(te,ue.children||[]),Re.return=oe,oe=Re;break e}else{i(oe,te);break}else r(oe,te);te=te.sibling}Re=yg(ue,oe.mode,Re),Re.return=oe,oe=Re}return R(oe);case Q:return ue=Zi(ue),kt(oe,te,ue,Re)}if(me(ue))return Ke(oe,te,ue,Re);if(re(ue)){if(Je=re(ue),typeof Je!="function")throw Error(o(150));return ue=Je.call(ue),rt(oe,te,ue,Re)}if(typeof ue.then=="function")return kt(oe,te,Md(ue),Re);if(ue.$$typeof===U)return kt(oe,te,Rd(oe,ue),Re);Ad(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(i(oe,te.sibling),Re=f(te,ue),Re.return=oe,oe=Re):(i(oe,te),Re=mg(ue,oe.mode,Re),Re.return=oe,oe=Re),R(oe)):i(oe,te)}return function(oe,te,ue,Re){try{gu=0;var Je=kt(oe,te,ue,Re);return qs=null,Je}catch(lt){if(lt===Vs||lt===Td)throw lt;var Jt=Vr(29,lt,null,oe.mode);return Jt.lanes=Re,Jt.return=oe,Jt}}}var Wi=sx(!0),lx=sx(!1),ei=!1;function Og(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mg(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ti(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ni(t,r,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ln&2)!==0){var f=l.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),l.pending=r,r=yd(t),Kb(t,null,i),r}return md(t,l,r,i),yd(t)}function mu(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}function Ag(t,r){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var R={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=R:m=m.next=R,i=i.next}while(i!==null);m===null?f=m=r:m=m.next=r}else f=m=r;i={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var Dg=!1;function yu(){if(Dg){var t=Bs;if(t!==null)throw t}}function vu(t,r,i,l){Dg=!1;var f=t.updateQueue;ei=!1;var m=f.firstBaseUpdate,R=f.lastBaseUpdate,I=f.shared.pending;if(I!==null){f.shared.pending=null;var X=I,ie=X.next;X.next=null,R===null?m=ie:R.next=ie,R=X;var pe=t.alternate;pe!==null&&(pe=pe.updateQueue,I=pe.lastBaseUpdate,I!==R&&(I===null?pe.firstBaseUpdate=ie:I.next=ie,pe.lastBaseUpdate=X))}if(m!==null){var Ce=f.baseState;R=0,pe=ie=X=null,I=m;do{var ae=I.lane&-536870913,fe=ae!==I.lane;if(fe?(Zt&ae)===ae:(l&ae)===ae){ae!==0&&ae===Qi&&(Dg=!0),pe!==null&&(pe=pe.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Ke=t,rt=I;ae=r;var kt=i;switch(rt.tag){case 1:if(Ke=rt.payload,typeof Ke=="function"){Ce=Ke.call(kt,Ce,ae);break e}Ce=Ke;break e;case 3:Ke.flags=Ke.flags&-65537|128;case 0:if(Ke=rt.payload,ae=typeof Ke=="function"?Ke.call(kt,Ce,ae):Ke,ae==null)break e;Ce=j({},Ce,ae);break e;case 2:ei=!0}}ae=I.callback,ae!==null&&(t.flags|=64,fe&&(t.flags|=8192),fe=f.callbacks,fe===null?f.callbacks=[ae]:fe.push(ae))}else fe={lane:ae,tag:I.tag,payload:I.payload,callback:I.callback,next:null},pe===null?(ie=pe=fe,X=Ce):pe=pe.next=fe,R|=ae;if(I=I.next,I===null){if(I=f.shared.pending,I===null)break;fe=I,I=fe.next,fe.next=null,f.lastBaseUpdate=fe,f.shared.pending=null}}while(!0);pe===null&&(X=Ce),f.baseState=X,f.firstBaseUpdate=ie,f.lastBaseUpdate=pe,m===null&&(f.shared.lanes=0),ui|=R,t.lanes=R,t.memoizedState=Ce}}function ux(t,r){if(typeof t!="function")throw Error(o(191,t));t.call(r)}function cx(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)ux(i[t],r)}var ri=Me(null),Dd=Me(0);function dx(t,r){t=ko,Fe(Dd,t),Fe(ri,r),ko=t|r.baseLanes}function Ng(){Fe(Dd,ko),Fe(ri,ri.current)}function kg(){ko=Dd.current,Le(ri),Le(Dd)}var mr=Me(null),Er=null;function ai(t){var r=t.alternate;Fe(yr,yr.current&1),Fe(mr,t),Er===null&&(r===null||ri.current!==null||r.memoizedState!==null)&&(Er=t)}function jg(t){Fe(yr,yr.current),Fe(mr,t),Er===null&&(Er=t)}function fx(t){t.tag===22?(Fe(yr,yr.current),Fe(mr,t),Er===null&&(Er=t)):oi()}function oi(){Fe(yr,yr.current),Fe(mr,mr.current)}function aa(t){Le(mr),Er===t&&(Er=null),Le(yr)}var yr=Me(0);function bu(t,r){Fe(mr,mr.current),Fe(yr,r)}function Ig(t){Le(yr),Le(mr),Er===t&&(Er=null)}function Nd(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||n0(i)||r0(i)))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===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Mo=0,Nt=null,bn=null,Xn=null,kd=!1,Ks=!1,es=!1,jd=0,xu=0,Ys=null,hD=0;function Bn(){throw Error(o(321))}function Pg(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!ra(t[i],r[i]))return!1;return!0}function Lg(t,r,i,l,f,m){return Mo=m,Nt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=t===null||t.memoizedState===null?Qx:Xx,es=!1,m=i(l,f),es=!1,Ks&&(m=px(r,i,l,f)),hx(t),m}function hx(t){ge.H=Hd;var r=bn!==null&&bn.next!==null;if(Mo=0,Xn=bn=Nt=null,kd=!1,xu=0,Ys=null,r)throw Error(o(300));t===null||Zn||(t=t.dependencies,t!==null&&Ed(t)&&(Zn=!0))}function px(t,r,i,l){Nt=t;var f=0;do{if(Ks&&(Ys=null),xu=0,Ks=!1,25<=f)throw Error(o(301));if(f+=1,Xn=bn=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ge.H=SD,m=r(i,l)}while(Ks);return m}function pD(){var t=ge.H,r=t.useState()[0];return r=typeof r.then=="function"?Su(r):r,t=t.useState()[0],(bn!==null?bn.memoizedState:null)!==t&&(Nt.flags|=1024),r}function zg(){var t=jd!==0;return jd=0,t}function _g(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function Ug(t){if(kd){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}kd=!1}Mo=0,Xn=bn=Nt=null,Ks=!1,xu=jd=0,Ys=null}function Ir(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xn===null?Nt.memoizedState=Xn=t:Xn=Xn.next=t,Xn}function Yn(){if(bn===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=bn.next;var r=Xn===null?Nt.memoizedState:Xn.next;if(r!==null)Xn=r,bn=t;else{if(t===null)throw Nt.alternate===null?Error(o(467)):Error(o(310));bn=t,t={memoizedState:bn.memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},Xn===null?Nt.memoizedState=Xn=t:Xn=Xn.next=t}return Xn}function Id(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Su(t){var r=xu;return xu+=1,Ys===null&&(Ys=[]),t=ax(Ys,t,r),r=Nt,(Xn===null?r.memoizedState:Xn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?Qx:Xx),t}function Pd(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Su(t);if(t.$$typeof===B)return;if(t.$$typeof===U)return gr(t)}throw Error(o(438,String(t)))}function Hg(t){var r=null,i=Nt.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=Nt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Id(),Nt.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),l=0;l<t;l++)i[l]=se;return r.index++,i}function Ao(t,r){return typeof r=="function"?r(t):r}function Ld(t){var r=Yn();return Fg(r,bn,t)}function Fg(t,r,i){var l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var f=t.baseQueue,m=l.pending;if(m!==null){if(f!==null){var R=f.next;f.next=m.next,m.next=R}r.baseQueue=f=m,l.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{r=f.next;var I=R=null,X=null,ie=r,pe=!1;do{var Ce=ie.lane&-536870913;if(Ce!==ie.lane?(Zt&Ce)===Ce:(Mo&Ce)===Ce){var ae=ie.revertLane;if(ae===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),Ce===Qi&&(pe=!0);else if((Mo&ae)===ae){ie=ie.next,ae===Qi&&(pe=!0);continue}else Ce={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(I=X=Ce,R=m):X=X.next=Ce,Nt.lanes|=ae,ui|=ae;Ce=ie.action,es&&i(m,Ce),m=ie.hasEagerState?ie.eagerState:i(m,Ce)}else ae={lane:Ce,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(I=X=ae,R=m):X=X.next=ae,Nt.lanes|=Ce,ui|=Ce;ie=ie.next}while(ie!==null&&ie!==r);if(X===null?R=m:X.next=I,!ra(m,t.memoizedState)&&(Zn=!0,pe&&(i=Bs,i!==null)))throw i;t.memoizedState=m,t.baseState=R,t.baseQueue=X,l.lastRenderedState=m}return f===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Bg(t){var r=Yn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var l=i.dispatch,f=i.pending,m=r.memoizedState;if(f!==null){i.pending=null;var R=f=f.next;do m=t(m,R.action),R=R.next;while(R!==f);ra(m,r.memoizedState)||(Zn=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,l]}function gx(t,r,i){var l=Nt,f=Yn(),m=Ft;if(m){if(i===void 0)throw Error(o(407));i=i()}else i=r();var R=!ra((bn||f).memoizedState,i);if(R&&(f.memoizedState=i,Zn=!0),f=f.queue,Kg(vx.bind(null,l,f,t),[t]),t=f.getSnapshot!==r||R||Xn!==null&&(Xn.memoizedState.tag&1)!==0,Gs(t?9:8,{destroy:void 0},yx.bind(null,l,f,i,r),null),t){if(l.flags|=2048,Tn===null)throw Error(o(349));m||(Mo&127)!==0||mx(l,r,i)}return i}function mx(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=Nt.updateQueue,r===null?(r=Id(),Nt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function yx(t,r,i,l){r.value=i,r.getSnapshot=l,bx(r)&&xx(t)}function vx(t,r,i){return i(function(){bx(r)&&xx(t)})}function bx(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!ra(t,i)}catch{return!0}}function xx(t){var r=Vi(t,2);r!==null&&Gr(r,t,2)}function Vg(t){var r=Ir();if(typeof t=="function"){var i=t;if(t=i(),es){Ge(!0);try{i()}finally{Ge(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:t},r}function Sx(t,r,i,l){return t.baseState=i,Fg(t,bn,typeof l=="function"?l:Ao)}function gD(t,r,i,l,f){if(Ud(t))throw Error(o(485));if(t=r.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){m.listeners.push(R)}};ge.T!==null?i(!0):m.isTransition=!1,l(m),i=r.pending,i===null?(m.next=r.pending=m,wx(r,m)):(m.next=i.next,r.pending=i.next=m)}}function wx(t,r){var i=r.action,l=r.payload,f=t.state;if(r.isTransition){var m=ge.T,R={};R.types=m!==null?m.types:null,ge.T=R;try{var I=i(f,l),X=ge.S;X!==null&&X(R,I),Ex(t,r,I)}catch(ie){qg(t,r,ie)}finally{m!==null&&R.types!==null&&(m.types=R.types),ge.T=m}}else try{m=i(f,l),Ex(t,r,m)}catch(ie){qg(t,r,ie)}}function Ex(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Rx(t,r,l)},function(l){return qg(t,r,l)}):Rx(t,r,i)}function Rx(t,r,i){r.status="fulfilled",r.value=i,Cx(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,wx(t,i)))}function qg(t,r,i){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,Cx(r),r=r.next;while(r!==l)}t.action=null}function Cx(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Tx(t,r){return r}function Ox(t,r){if(Ft){var i=Tn.formState;if(i!==null){e:{var l=Nt;if(Ft){if(An){t:{for(var f=An,m=Sa;f.nodeType!==8;){if(!m){f=null;break t}if(f=Ea(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){An=Ea(f.nextSibling),l=f.data==="F!";break e}}Zo(l)}l=!1}l&&(r=i[0])}}return i=Ir(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tx,lastRenderedState:r},i.queue=l,i=Yx.bind(null,Nt,l),l.dispatch=i,l=Vg(!1),m=Xg.bind(null,Nt,!1,l.queue),l=Ir(),f={state:r,dispatch:null,action:t,pending:null},l.queue=f,i=gD.bind(null,Nt,f,m,i),f.dispatch=i,l.memoizedState=t,[r,i,!1]}function Mx(t){var r=Yn();return Ax(r,bn,t)}function Ax(t,r,i){if(r=Fg(t,r,Tx)[0],t=Ld(Ao)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=Su(r)}catch(R){throw R===Vs?Td:R}else l=r;r=Yn();var f=r.queue,m=f.dispatch;return i!==r.memoizedState&&(Nt.flags|=2048,Gs(9,{destroy:void 0},mD.bind(null,f,i),null)),[l,m,t]}function mD(t,r){t.action=r}function Dx(t){var r=Yn(),i=bn;if(i!==null)return Ax(r,i,t);Yn(),r=r.memoizedState,i=Yn();var l=i.queue.dispatch;return i.memoizedState=t,[r,l,!1]}function Gs(t,r,i,l){return t={tag:t,create:i,deps:l,inst:r,next:null},r=Nt.updateQueue,r===null&&(r=Id(),Nt.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,r.lastEffect=t),t}function Nx(){return Yn().memoizedState}function zd(t,r,i,l){var f=Ir();Nt.flags|=t,f.memoizedState=Gs(1|r,{destroy:void 0},i,l===void 0?null:l)}function _d(t,r,i,l){var f=Yn();l=l===void 0?null:l;var m=f.memoizedState.inst;bn!==null&&l!==null&&Pg(l,bn.memoizedState.deps)?f.memoizedState=Gs(r,m,i,l):(Nt.flags|=t,f.memoizedState=Gs(1|r,m,i,l))}function kx(t,r){zd(8390656,8,t,r)}function Kg(t,r){_d(2048,8,t,r)}function yD(t){Nt.flags|=4;var r=Nt.updateQueue;if(r===null)r=Id(),Nt.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function jx(t){var r=Yn().memoizedState;return yD({ref:r,nextImpl:t}),function(){if((ln&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}function Ix(t,r){return _d(4,2,t,r)}function Px(t,r){return _d(4,4,t,r)}function Lx(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function zx(t,r,i){i=i!=null?i.concat([t]):null,_d(4,4,Lx.bind(null,r,t),i)}function Yg(){}function _x(t,r){var i=Yn();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&Pg(r,l[1])?l[0]:(i.memoizedState=[t,r],t)}function Ux(t,r){var i=Yn();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&Pg(r,l[1]))return l[0];if(l=t(),es){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l}function Gg(t,r,i){return i===void 0||(Mo&1073741824)!==0&&(Zt&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=Q2(),Nt.lanes|=t,ui|=t,i)}function Hx(t,r,i,l){return ra(i,r)?i:ri.current!==null?(t=Gg(t,i,l),ra(t,r)||(Zn=!0),t):(Mo&106)===0||(Mo&1073741824)!==0&&(Zt&261930)===0?(Zn=!0,t.memoizedState=i):(t=Q2(),Nt.lanes|=t,ui|=t,r)}function Fx(t,r,i,l,f){var m=ce.p;ce.p=m!==0&&8>m?m:8;var R=ge.T,I={};I.types=R!==null?R.types:null,ge.T=I,Xg(t,!1,r,i);try{var X=f(),ie=ge.S;if(ie!==null&&ie(I,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var pe=fD(X,l);wu(t,r,pe,la(t))}else wu(t,r,l,la(t))}catch(Ce){wu(t,r,{then:function(){},status:"rejected",reason:Ce},la())}finally{ce.p=m,R!==null&&I.types!==null&&(R.types=I.types),ge.T=R}}function vD(){}function $g(t,r,i,l){if(t.tag!==5)throw Error(o(476));var f=Bx(t).queue;Fx(t,f,r,Te,i===null?vD:function(){return Vx(t),i(l)})}function Bx(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:Te},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Vx(t){var r=Bx(t);r.next===null&&(r=t.alternate.memoizedState),wu(t,r.next.queue,{},la())}function Qg(){return gr(fl)}function qx(){return Yn().memoizedState}function Kx(){return Yn().memoizedState}function bD(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=la();t=ti(i);var l=ni(r,t,i);l!==null&&(Gr(l,r,i),mu(l,r,i)),r={cache:Eg()},t.payload=r;return}r=r.return}}function xD(t,r,i){var l=la();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ud(t)?Gx(r,i):(i=pg(t,r,i,l),i!==null&&(Gr(i,t,l),$x(i,r,l)))}function Yx(t,r,i){var l=la();wu(t,r,i,l)}function wu(t,r,i,l){var f={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ud(t))Gx(r,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var R=r.lastRenderedState,I=m(R,i);if(f.hasEagerState=!0,f.eagerState=I,ra(I,R))return md(t,r,f,0),Tn===null&&gd(),!1}catch{}if(i=pg(t,r,f,l),i!==null)return Gr(i,t,l),$x(i,r,l),!0}return!1}function Xg(t,r,i,l){if(l={lane:2,revertLane:Hm(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ud(t)){if(r)throw Error(o(479))}else r=pg(t,i,l,2),r!==null&&Gr(r,t,2)}function Ud(t){var r=t.alternate;return t===Nt||r!==null&&r===Nt}function Gx(t,r){Ks=kd=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function $x(t,r,i){if((i&4194048)!==0){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}var Hd={readContext:gr,use:Pd,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},Qx={readContext:gr,use:Pd,useCallback:function(t,r){return Ir().memoizedState=[t,r===void 0?null:r],t},useContext:gr,useEffect:kx,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,zd(4194308,4,Lx.bind(null,r,t),i)},useLayoutEffect:function(t,r){return zd(4194308,4,t,r)},useInsertionEffect:function(t,r){zd(4,2,t,r)},useMemo:function(t,r){var i=Ir();r=r===void 0?null:r;var l=t();if(es){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l},useReducer:function(t,r,i){var l=Ir();if(i!==void 0){var f=i(r);if(es){Ge(!0);try{i(r)}finally{Ge(!1)}}}else f=r;return l.memoizedState=l.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},l.queue=t,t=t.dispatch=xD.bind(null,Nt,t),[l.memoizedState,t]},useRef:function(t){var r=Ir();return t={current:t},r.memoizedState=t},useState:function(t){t=Vg(t);var r=t.queue,i=Yx.bind(null,Nt,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:Yg,useDeferredValue:function(t,r){var i=Ir();return Gg(i,t,r)},useTransition:function(){var t=Vg(!1);return t=Fx.bind(null,Nt,t.queue,!0,!1),Ir().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var l=Nt,f=Ir();if(Ft){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Tn===null)throw Error(o(349));(Zt&127)!==0||mx(l,r,i)}f.memoizedState=i;var m={value:i,getSnapshot:r};return f.queue=m,kx(vx.bind(null,l,m,t),[t]),l.flags|=2048,Gs(9,{destroy:void 0},yx.bind(null,l,m,i,r),null),i},useId:function(){var t=Ir(),r=Tn.identifierPrefix;if(Ft){var i=Qa,l=$a;i=(l&~(1<<32-et(l)-1)).toString(32)+i,r="_"+r+"R_"+i,i=jd++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=hD++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Qg,useFormState:Ox,useActionState:Ox,useOptimistic:function(t){var r=Ir();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Xg.bind(null,Nt,!0,i),i.dispatch=r,[t,r]},useMemoCache:Hg,useCacheRefresh:function(){return Ir().memoizedState=bD.bind(null,Nt)},useEffectEvent:function(t){var r=Ir(),i={impl:t};return r.memoizedState=i,function(){if((ln&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Xx={readContext:gr,use:Pd,useCallback:_x,useContext:gr,useEffect:Kg,useImperativeHandle:zx,useInsertionEffect:Ix,useLayoutEffect:Px,useMemo:Ux,useReducer:Ld,useRef:Nx,useState:function(){return Ld(Ao)},useDebugValue:Yg,useDeferredValue:function(t,r){var i=Yn();return Hx(i,bn.memoizedState,t,r)},useTransition:function(){var t=Ld(Ao)[0],r=Yn().memoizedState;return[typeof t=="boolean"?t:Su(t),r]},useSyncExternalStore:gx,useId:qx,useHostTransitionStatus:Qg,useFormState:Mx,useActionState:Mx,useOptimistic:function(t,r){var i=Yn();return Sx(i,bn,t,r)},useMemoCache:Hg,useCacheRefresh:Kx,useEffectEvent:jx},SD={readContext:gr,use:Pd,useCallback:_x,useContext:gr,useEffect:Kg,useImperativeHandle:zx,useInsertionEffect:Ix,useLayoutEffect:Px,useMemo:Ux,useReducer:Bg,useRef:Nx,useState:function(){return Bg(Ao)},useDebugValue:Yg,useDeferredValue:function(t,r){var i=Yn();return bn===null?Gg(i,t,r):Hx(i,bn.memoizedState,t,r)},useTransition:function(){var t=Bg(Ao)[0],r=Yn().memoizedState;return[typeof t=="boolean"?t:Su(t),r]},useSyncExternalStore:gx,useId:qx,useHostTransitionStatus:Qg,useFormState:Dx,useActionState:Dx,useOptimistic:function(t,r){var i=Yn();return bn!==null?Sx(i,bn,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:Hg,useCacheRefresh:Kx,useEffectEvent:jx};function Zg(t,r,i,l){r=t.memoizedState,i=i(l,r),i=i==null?r:j({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Jg={enqueueSetState:function(t,r,i){t=t._reactInternals;var l=la(),f=ti(l);f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(Gr(r,t,l),mu(r,t,l))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var l=la(),f=ti(l);f.tag=1,f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(Gr(r,t,l),mu(r,t,l))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=la(),l=ti(i);l.tag=2,r!=null&&(l.callback=r),r=ni(t,l,i),r!==null&&(Gr(r,t,i),mu(r,t,i))}};function Zx(t,r,i,l,f,m,R){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,R):r.prototype&&r.prototype.isPureReactComponent?!lu(i,l)||!lu(f,m):!0}function Jx(t,r,i,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==t&&Jg.enqueueReplaceState(r,r.state,null)}function ts(t,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(t=t.defaultProps){i===r&&(i=j({},i));for(var f in t)i[f]===void 0&&(i[f]=t[f])}return i}function Wx(t){pd(t)}function e2(t){console.error(t)}function t2(t){pd(t)}function Fd(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function n2(t,r,i){try{var l=t.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Wg(t,r,i){return i=ti(i),i.tag=3,i.payload={element:null},i.callback=function(){Fd(t,r)},i}function r2(t){return t=ti(t),t.tag=3,t}function a2(t,r,i,l){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;t.payload=function(){return f(m)},t.callback=function(){n2(r,i,l)}}var R=i.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(t.callback=function(){n2(r,i,l),typeof f!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var I=l.stack;this.componentDidCatch(l.value,{componentStack:I!==null?I:""})})}function wD(t,r,i,l,f){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&Gi(r,i,f,!0),i=mr.current,i!==null){switch(i.tag){case 31:case 13:case 19:return Er===null?uf():i.alternate===null&&Vn===0&&(Vn=3),i.flags&=-257,i.flags|=65536,i.lanes=f,l===Od?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),zm(t,l,f)),!1;case 22:return i.flags|=65536,l===Od?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),zm(t,l,f)),!1}throw Error(o(435,i.tag))}return zm(t,l,f),uf(),!1}if(Ft)return r=mr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,l!==bg&&(t=Error(o(422),{cause:l}),du(va(t,i)))):(l!==bg&&(r=Error(o(423),{cause:l}),du(va(r,i))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,l=va(l,i),f=Wg(t.stateNode,l,f),Ag(t,f),Vn!==4&&(Vn=2)),!1;var m=Error(o(520),{cause:l});if(m=va(m,i),Du===null?Du=[m]:Du.push(m),Vn!==4&&(Vn=2),r===null)return!0;l=va(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=f&-f,i.lanes|=t,t=Wg(i.stateNode,l,t),Ag(i,t),!1;case 1:if(r=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ci===null||!ci.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=r2(f),a2(f,t,i,l),Ag(i,f),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var em=Error(o(461)),Zn=!1;function rr(t,r,i,l){r.child=t===null?lx(r,null,i,l):Wi(r,t.child,i,l)}function o2(t,r,i,l,f){i=i.render;var m=r.ref;if("ref"in l){var R={};for(var I in l)I!=="ref"&&(R[I]=l[I])}else R=l;return $i(r),l=Lg(t,r,i,R,m,f),I=zg(),t!==null&&!Zn?(_g(t,r,f),Do(t,r,f)):(Ft&&I&&xd(r),r.flags|=1,rr(t,r,l,f),r.child)}function i2(t,r,i,l,f){if(t===null){var m=i.type;return typeof m=="function"&&!gg(m)&&m.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=m,s2(t,r,m,l,f)):(t=vd(i.type,null,l,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!lm(t,f)){var R=m.memoizedProps;if(i=i.compare,i=i!==null?i:lu,i(R,l)&&t.ref===r.ref)return Do(t,r,f)}return r.flags|=1,t=Ro(m,l),t.ref=r.ref,t.return=r,r.child=t}function s2(t,r,i,l,f){if(t!==null){var m=t.memoizedProps;if(lu(m,l)&&t.ref===r.ref)if(Zn=!1,r.pendingProps=l=m,lm(t,f))(t.flags&131072)!==0&&(Zn=!0);else return r.lanes=t.lanes,Do(t,r,f)}return tm(t,r,i,l,f)}function l2(t,r,i,l){var f=l.children,m=t!==null?t.memoizedState:null;if(t===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|i:i,t!==null){for(l=r.child=t.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~m}else l=0,r.child=null;return u2(t,r,m,i,l)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Cd(r,m!==null?m.cachePool:null),m!==null?dx(r,m):Ng(),fx(r);else return l=r.lanes=536870912,u2(t,r,m!==null?m.baseLanes|i:i,i,l)}else m!==null?(Cd(r,m.cachePool),dx(r,m),oi(),r.memoizedState=null):(t!==null&&Cd(r,null),Ng(),oi());return rr(t,r,f,i),r.child}function Eu(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function u2(t,r,i,l,f){var m=Cg();return m=m===null?null:{parent:Qn._currentValue,pool:m},r.memoizedState={baseLanes:i,cachePool:m},t!==null&&Cd(r,null),Ng(),fx(r),t!==null&&Gi(t,r,l,!0),r.childLanes=f,null}function Bd(t,r){return r=Vd({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function c2(t,r,i){return Wi(r,t.child,null,i),t=Bd(r,r.pendingProps),t.flags|=2,aa(r),r.memoizedState=null,t}function ED(t,r,i){var l=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ft){if(l.mode==="hidden")return t=Bd(r,l),r.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Eu(null,t);if(jg(r),(t=An)?(t=L1(t,Sa),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Qo!==null?{id:$a,overflow:Qa}:null,retryLane:536870912,hydrationErrors:null},i=Gb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return r.lanes=536870912,null}return Bd(r,l)}var m=t.memoizedState;if(m!==null){var R=m.dehydrated;if(jg(r),f)if(r.flags&256)r.flags&=-257,r=c2(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(o(558));else if(Zn||Gi(t,r,i,!1),f=(i&t.childLanes)!==0,Zn||f){if(ri.current===null){if(l=Tn,l!==null&&(R=qt(l,i),R!==0&&R!==m.retryLane))throw m.retryLane=R,Vi(t,R),Gr(l,t,R),em;uf()}r=c2(t,r,i)}else t=m.treeContext,An=Ea(R.nextSibling),ir=r,Ft=!0,Xo=null,Sa=!1,t!==null&&Xb(r,t),r=Bd(r,l),r.flags|=134221824;return r}return t=Ro(t.child,{mode:l.mode,children:l.children}),t.ref=r.ref,r.child=t,t.return=r,t}function $s(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function tm(t,r,i,l,f){return $i(r),i=Lg(t,r,i,l,void 0,f),l=zg(),t!==null&&!Zn?(_g(t,r,f),Do(t,r,f)):(Ft&&l&&xd(r),r.flags|=1,rr(t,r,i,f),r.child)}function d2(t,r,i,l,f,m){return $i(r),r.updateQueue=null,i=px(r,l,i,f),hx(t),l=zg(),t!==null&&!Zn?(_g(t,r,m),Do(t,r,m)):(Ft&&l&&xd(r),r.flags|=1,rr(t,r,i,m),r.child)}function f2(t,r,i,l,f){if($i(r),r.stateNode===null){var m=_s,R=i.contextType;typeof R=="object"&&R!==null&&(m=gr(R)),m=new i(l,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Jg,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=l,m.state=r.memoizedState,m.refs={},Og(r),R=i.contextType,m.context=typeof R=="object"&&R!==null?gr(R):_s,m.state=r.memoizedState,R=i.getDerivedStateFromProps,typeof R=="function"&&(Zg(r,i,R,l),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(R=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),R!==m.state&&Jg.enqueueReplaceState(m,m.state,null),vu(r,l,m,f),yu(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(t===null){m=r.stateNode;var I=r.memoizedProps,X=ts(i,I);m.props=X;var ie=m.context,pe=i.contextType;R=_s,typeof pe=="object"&&pe!==null&&(R=gr(pe));var Ce=i.getDerivedStateFromProps;pe=typeof Ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",I=r.pendingProps!==I,pe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(I||ie!==R)&&Jx(r,m,l,R),ei=!1;var ae=r.memoizedState;m.state=ae,vu(r,l,m,f),yu(),ie=r.memoizedState,I||ae!==ie||ei?(typeof Ce=="function"&&(Zg(r,i,Ce,l),ie=r.memoizedState),(X=ei||Zx(r,i,X,l,ae,ie,R))?(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=ie),m.props=l,m.state=ie,m.context=R,l=X):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{m=r.stateNode,Mg(t,r),R=r.memoizedProps,pe=ts(i,R),m.props=pe,Ce=r.pendingProps,ae=m.context,ie=i.contextType,X=_s,typeof ie=="object"&&ie!==null&&(X=gr(ie)),I=i.getDerivedStateFromProps,(ie=typeof I=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(R!==Ce||ae!==X)&&Jx(r,m,l,X),ei=!1,ae=r.memoizedState,m.state=ae,vu(r,l,m,f),yu();var fe=r.memoizedState;R!==Ce||ae!==fe||ei||t!==null&&t.dependencies!==null&&Ed(t.dependencies)?(typeof I=="function"&&(Zg(r,i,I,l),fe=r.memoizedState),(pe=ei||Zx(r,i,pe,l,ae,fe,X)||t!==null&&t.dependencies!==null&&Ed(t.dependencies))?(ie||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,fe,X),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,fe,X)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||R===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=fe),m.props=l,m.state=fe,m.context=X,l=pe):(typeof m.componentDidUpdate!="function"||R===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),l=!1)}return m=l,$s(t,r),l=(r.flags&128)!==0,m||l?(m=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&l?(r.child=Wi(r,t.child,null,f),r.child=Wi(r,null,i,f)):rr(t,r,i,f),r.memoizedState=m.state,t=r.child):t=Do(t,r,f),t}function h2(t,r,i,l){return Ki(),r.flags|=256,rr(t,r,i,l),r.child}var nm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rm(t){return{baseLanes:t,cachePool:nx()}}function am(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=sa),t}function p2(t,r,i){var l=r.pendingProps,f=!1,m=(r.flags&128)!==0,R;if((R=m)||(R=t!==null&&t.memoizedState===null?!1:(yr.current&2)!==0),R&&(f=!0,r.flags&=-129),R=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ft){if(f?ai(r):oi(),(t=An)?(t=L1(t,Sa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Qo!==null?{id:$a,overflow:Qa}:null,retryLane:536870912,hydrationErrors:null},i=Gb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return r0(t)?r.lanes=32:r.lanes=536870912,null}return m=l.children,l=l.fallback,f?(oi(),f=r.mode,m=Vd({mode:"hidden",children:m},f),l=qi(l,f,i,null),m.return=r,l.return=r,m.sibling=l,r.child=m,l=r.child,l.memoizedState=rm(i),l.childLanes=am(t,R,i),r.memoizedState=nm,Eu(null,l)):(ai(r),om(r,m))}var I=t.memoizedState;if(I!==null){var X=I.dehydrated;if(X!==null)return RD(t,r,m,R,l,X,I,i)}return f?(oi(),f=l.fallback,m=r.mode,I=t.child,X=I.sibling,l=Ro(I,{mode:"hidden",children:l.children}),l.subtreeFlags=I.subtreeFlags&1206910976,X!==null?f=Ro(X,f):(f=qi(f,m,i,null),f.flags|=2),f.return=r,l.return=r,l.sibling=f,r.child=l,Eu(null,l),l=r.child,f=t.child.memoizedState,f===null?f=rm(i):(m=f.cachePool,m!==null?(I=Qn._currentValue,m=m.parent!==I?{parent:I,pool:I}:m):m=nx(),f={baseLanes:f.baseLanes|i,cachePool:m}),l.memoizedState=f,l.childLanes=am(t,R,i),r.memoizedState=nm,Eu(t.child,l)):(ai(r),i=t.child,t=i.sibling,i=Ro(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,t!==null&&(R=r.deletions,R===null?(r.deletions=[t],r.flags|=16):R.push(t)),r.child=i,r.memoizedState=null,i)}function om(t,r){return r=Vd({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Vd(t,r){return t=Vr(22,t,null,r),t.lanes=0,t}function qd(t,r,i){return Wi(r,t.child,null,i),t=om(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function RD(t,r,i,l,f,m,R,I){if(i)return r.flags&256?(ai(r),r.flags&=-257,qd(t,r,I)):r.memoizedState!==null?(oi(),r.child=t.child,r.flags|=128,null):(oi(),m=f.fallback,R=r.mode,f=Vd({mode:"visible",children:f.children},R),m=qi(m,R,I,null),m.flags|=2,f.return=r,m.return=r,f.sibling=m,r.child=f,Wi(r,t.child,null,I),f=r.child,f.memoizedState=rm(I),f.childLanes=am(t,l,I),r.memoizedState=nm,Eu(null,f));if(ai(r),r0(m)){if(l=m.nextSibling&&m.nextSibling.dataset,l)var X=l.dgst;return l=X,l!==""&&(f=Error(o(419)),f.stack="",f.digest=l,du({value:f,source:null,stack:null})),qd(t,r,I)}if(Zn||Gi(t,r,I,!1),l=(I&t.childLanes)!==0,Zn||l){if(ri.current!==null)return qd(t,r,I);if(l=Tn,l!==null&&(f=qt(l,I),f!==0&&f!==R.retryLane))throw R.retryLane=f,Vi(t,f),Gr(l,t,f),em;return n0(m)||uf(),qd(t,r,I)}return n0(m)?(r.flags|=192,r.child=t.child,null):(t=R.treeContext,An=Ea(m.nextSibling),ir=r,Ft=!0,Xo=null,Sa=!1,t!==null&&Xb(r,t),r=om(r,f.children),r.flags|=134221824,r)}function g2(t,r,i){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),wd(t.return,r,i)}function m2(t){for(var r=null;t!==null;){var i=t.alternate;i!==null&&Nd(i)===null&&(r=t),t=t.sibling}return r}function Kd(t,r,i,l,f,m){var R=t.memoizedState;R===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:f,treeForkCount:m}:(R.isBackwards=r,R.rendering=null,R.renderingStartTime=0,R.last=l,R.tail=i,R.tailMode=f,R.treeForkCount=m)}function im(t){var r=t.child;for(t.child=null;r!==null;){var i=r.sibling;r.sibling=t.child,t.child=r,r=i}}function sm(t,r,i){var l=r.pendingProps,f=l.revealOrder,m=l.tail;l=l.children;var R=yr.current;if(r.flags&128)return bu(r,R),null;var I=(R&2)!==0;if(I?(R=R&1|2,r.flags|=128):R&=1,bu(r,R),f==="backwards"&&t!==null?(im(t),rr(t,r,l,i),im(t)):rr(t,r,l,i),l=Ft?cu:0,!I&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&g2(t,i,r);else if(t.tag===19)g2(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"backwards":i=m2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null,im(r)),Kd(r,!0,f,null,m,l);break;case"unstable_legacy-backwards":for(i=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&Nd(t)===null){r.child=f;break}t=f.sibling,f.sibling=i,i=f,f=t}Kd(r,!0,i,null,m,l);break;case"together":Kd(r,!1,null,null,void 0,l);break;case"independent":r.memoizedState=null;break;default:i=m2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null),Kd(r,!1,f,i,m,l)}return r.child}function y2(t,r,i){var l=r.pendingProps;return Jo(r,r.type,l.value),rr(t,r,l.children,i),r.child}function Do(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),ui|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Gi(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=Ro(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Ro(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function lm(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&Ed(t)))}function CD(t,r,i){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),Jo(r,Qn,t.memoizedState.cache),Ki();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:Jo(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,jg(r),null;break;case 13:var l=r.memoizedState;if(l!==null){if(l.dehydrated!==null)return ai(r),r.flags|=128,null;l=Gi(t,r,i,!1);var f=r.child.childLanes;return l||(i&f)!==0?p2(t,r,i):(ai(r),t=Do(t,r,i),t!==null?t.sibling:null)}ai(r);break;case 19:if(r.flags&128)return sm(t,r,i);if(f=(t.flags&128)!==0,l=(i&r.childLanes)!==0,l||(Gi(t,r,i,!1),l=(i&r.childLanes)!==0),f){if(l)return sm(t,r,i);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),bu(r,yr.current),l)break;return null;case 22:return r.lanes=0,l2(t,r,i,r.pendingProps);case 24:Jo(r,Qn,t.memoizedState.cache)}return Do(t,r,i)}function v2(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)Zn=!0;else{if(!lm(t,i)&&(r.flags&128)===0)return Zn=!1,CD(t,r,i);Zn=(t.flags&131072)!==0}else Zn=!1,Ft&&(r.flags&1048576)!==0&&Qb(r,cu,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(t=Zi(r.elementType),r.type=t,typeof t=="function")gg(t)?(l=ts(t,l),r.tag=1,r=f2(null,r,t,l,i)):(r.tag=0,r=tm(null,r,t,l,i));else{if(t!=null){var f=t.$$typeof;if(f===L){r.tag=11,r=o2(null,r,t,l,i);break e}else if(f===V){r.tag=14,r=i2(null,r,t,l,i);break e}else if(f===U){r.tag=10,r.type=t,r=y2(null,r,i);break e}}throw r=le(t)||t,Error(o(306,r,""))}}return r;case 0:return tm(t,r,r.type,r.pendingProps,i);case 1:return l=r.type,f=ts(l,r.pendingProps),f2(t,r,l,f,i);case 3:e:{if(Ze(r,r.stateNode.containerInfo),t===null)throw Error(o(387));l=r.pendingProps;var m=r.memoizedState;f=m.element,Mg(t,r),vu(r,l,null,i);var R=r.memoizedState;if(l=R.cache,Jo(r,Qn,l),l!==m.cache&&wg(r,[Qn],i,!0),yu(),l=R.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:R.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=h2(t,r,l,i);break e}else if(l!==f){f=va(Error(o(424)),r),du(f),r=h2(t,r,l,i);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,An=Ea(t.firstChild),ir=r,Ft=!0,Xo=null,Sa=!0,i=lx(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(Ki(),l===f){r=Do(t,r,i);break e}rr(t,r,l,i)}r=r.child}return r;case 26:return $s(t,r),t===null?(i=V1(r.type,null,r.pendingProps,null))?r.memoizedState=i:Ft||(r.stateNode=w1(r.type,r.pendingProps,be.current,r)):r.memoizedState=V1(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return de(r),t===null&&Ft&&(l=r.stateNode=U1(r.type,r.pendingProps,be.current),ir=r,Sa=!0,f=An,hi(r.type)?(a0=f,An=Ea(l.firstChild)):An=f),rr(t,r,r.pendingProps.children,i),$s(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ft&&((f=l=An)&&(l=bN(l,r.type,r.pendingProps,Sa),l!==null?(r.stateNode=l,ir=r,An=Ea(l.firstChild),Sa=!1,f=!0):f=!1),f||Zo(r)),de(r),f=r.type,m=r.pendingProps,R=t!==null?t.memoizedProps:null,l=m.children,Qm(f,m)?l=null:R!==null&&Qm(f,R)&&(r.flags|=32),r.memoizedState!==null&&(f=Lg(t,r,pD,null,null,i),fl._currentValue=f),$s(t,r),rr(t,r,l,i),r.child;case 6:return t===null&&Ft&&((t=i=An)&&(i=xN(i,r.pendingProps,Sa),i!==null?(r.stateNode=i,ir=r,An=null,t=!0):t=!1),t||Zo(r)),null;case 13:return p2(t,r,i);case 4:return Ze(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Wi(r,null,l,i):rr(t,r,l,i),r.child;case 11:return o2(t,r,r.type,r.pendingProps,i);case 7:return l=r.pendingProps,$s(t,r),rr(t,r,l,i),r.child;case 8:return rr(t,r,r.pendingProps.children,i),r.child;case 12:return rr(t,r,r.pendingProps.children,i),r.child;case 10:return y2(t,r,i);case 9:return f=r.type._context,l=r.pendingProps.children,$i(r),f=gr(f),l=l(f),r.flags|=1,rr(t,r,l,i),r.child;case 14:return i2(t,r,r.type,r.pendingProps,i);case 15:return s2(t,r,r.type,r.pendingProps,i);case 19:return sm(t,r,i);case 31:return ED(t,r,i);case 22:return l2(t,r,i,r.pendingProps);case 24:return $i(r),l=gr(Qn),t===null?(f=Cg(),f===null&&(f=Tn,m=Eg(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),r.memoizedState={parent:l,cache:f},Og(r),Jo(r,Qn,f)):((t.lanes&i)!==0&&(Mg(t,r),vu(r,null,null,i),yu()),f=t.memoizedState,m=r.memoizedState,f.parent!==l?(f={parent:l,cache:l},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Jo(r,Qn,l)):(l=m.cache,Jo(r,Qn,l),l!==f.cache&&wg(r,[Qn],i,!0))),rr(t,r,r.pendingProps.children,i),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|=t===null?18882560:18874368:Ft&&xd(r),t!==null&&t.memoizedProps.name!==l.name?r.flags|=4194816:$s(t,r),rr(t,r,l.children,i),r.child;case 29:throw r.pendingProps}throw Error(o(156,r.tag))}function No(t){t.flags|=4}function um(t,r,i,l,f){var m;if((m=(t.mode&32)!==0)&&(m=i===null?G1(r,l):G1(r,l)&&(l.src!==i.src||l.srcSet!==i.srcSet)),m){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(W2())t.flags|=8192;else throw Ji=Od,Tg}else t.flags&=-16777217}function b2(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!$1(r))if(W2())t.flags|=8192;else throw Ji=Od,Tg}function Yd(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?tt():536870912,t.lanes|=r,Ws|=r)}function Ru(t,r){if(!Ft)switch(t.tailMode){case"visible":break;case"collapsed":for(var i=t.tail,l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null;break;default:for(r=t.tail,i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null}}function Dn(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(r)for(var f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags&1206910976,l|=f.flags&1206910976,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=l,t.childLanes=i,r}function TD(t,r,i){var l=r.pendingProps;switch(vg(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dn(r),null;case 1:return Dn(r),null;case 3:return i=r.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Oo(Qn),it(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Fs(r)?No(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,xg())),Dn(r),null;case 26:var f=r.type,m=r.memoizedState;return t===null?(No(r),m!==null?(Dn(r),b2(r,m)):(Dn(r),um(r,f,null,l,i))):m?m!==t.memoizedState?(No(r),Dn(r),b2(r,m)):(Dn(r),r.flags&=-16777217):(t=t.memoizedProps,t!==l&&No(r),Dn(r),um(r,f,t,l,i)),null;case 27:if(we(r),i=be.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&No(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}t=Oe.current,Fs(r)?Zb(r):(t=U1(f,l,i),r.stateNode=t,No(r))}return Dn(r),r.subtreeFlags&=-33554433,null;case 5:if(we(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&No(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}if(m=Oe.current,Fs(r))Zb(r);else{var R=Pu(be.current);switch(m){case 1:m=R.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=R.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=R.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=R.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=R.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?R.createElement("select",{is:l.is}):R.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?R.createElement(f,{is:l.is}):R.createElement(f)}}m[dn]=r,m[Mn]=l;e:for(R=r.child;R!==null;){if(R.tag===5||R.tag===6)m.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===r)break e;for(;R.sibling===null;){if(R.return===null||R.return===r)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}r.stateNode=m;e:switch(br(m,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&No(r)}}return Dn(r),r.subtreeFlags&=-33554433,um(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==l&&No(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(o(166));if(t=be.current,Fs(r)){if(t=r.stateNode,i=r.memoizedProps,l=null,f=ir,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}t[dn]=r,t=!!(t.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||v1(t.nodeValue,i)),t||Zo(r,!0)}else t=Pu(t).createTextNode(l),t[dn]=r,r.stateNode=t}return Dn(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(l=Fs(r),i!==null){if(t===null){if(!l)throw Error(o(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[dn]=r}else Ki(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),t=!1}else i=xg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(aa(r),r):(aa(r),null);if((r.flags&128)!==0)throw Error(o(558))}return Dn(r),null;case 13:if(l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=Fs(r),l!==null&&l.dehydrated!==null){if(t===null){if(!f)throw Error(o(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[dn]=r}else Ki(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),f=!1}else f=xg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(aa(r),r):(aa(r),null)}return aa(r),(r.flags&128)!==0?(r.lanes=i,r):(i=l!==null,t=t!==null&&t.memoizedState!==null,i&&(l=r.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),Yd(r,r.updateQueue),Dn(r),null);case 4:return it(),t===null&&qm(r.stateNode.containerInfo),r.flags|=67108864,Dn(r),null;case 10:return Oo(r.type),Dn(r),null;case 19:if(Ig(r),l=r.memoizedState,l===null)return Dn(r),null;if(f=(r.flags&128)!==0,m=l.rendering,m===null)if(f)Ru(l,!1);else{if(Vn!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=Nd(t),m!==null){for(r.flags|=128,Ru(l,!1),t=m.updateQueue,r.updateQueue=t,Yd(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)Yb(i,t),i=i.sibling;return bu(r,yr.current&1|2),Ft&&Co(r,l.treeForkCount),r.child}t=t.sibling}l.tail!==null&&xt()>af&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304)}else{if(!f)if(t=Nd(m),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,Yd(r,t),Ru(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!m.alternate&&!Ft)return Dn(r),null}else 2*xt()-l.renderingStartTime>af&&i!==536870912&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304);l.isBackwards?(m.sibling=r.child,r.child=m):(t=l.last,t!==null?t.sibling=m:r.child=m,l.last=m)}if(l.tail!==null){t=l.tail;e:{for(i=t;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return l.rendering=t,l.tail=t.sibling,l.renderingStartTime=xt(),t.sibling=null,m=yr.current,m=f?m&1|2:m&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!i||Ft?bu(r,m):(i=m,Fe(mr,r),Fe(yr,i),Er===null&&(Er=r)),Ft&&Co(r,l.treeForkCount),t}return Dn(r),null;case 22:case 23:return aa(r),kg(),l=r.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(Dn(r),r.subtreeFlags&6&&(r.flags|=8192)):Dn(r),i=r.updateQueue,i!==null&&Yd(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),t!==null&&Le(Xi),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),Oo(Qn),Dn(r),null;case 25:return null;case 30:return r.flags|=33554432,Dn(r),null}throw Error(o(156,r.tag))}function OD(t,r){switch(vg(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Oo(Qn),it(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return we(r),null;case 31:if(r.memoizedState!==null){if(aa(r),r.alternate===null)throw Error(o(340));Ki()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(aa(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Ki()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Ig(r),t=r.flags,t&65536?(r.flags=t&-65537|128,t=r.memoizedState,t!==null&&(t.rendering=null,t.tail=null),r.flags|=4,r):null;case 4:return it(),null;case 10:return Oo(r.type),null;case 22:case 23:return aa(r),kg(),t!==null&&Le(Xi),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Oo(Qn),null;case 25:return null;default:return null}}function x2(t,r){switch(vg(r),r.tag){case 3:Oo(Qn),it();break;case 26:case 27:case 5:we(r);break;case 4:it();break;case 31:r.memoizedState!==null&&aa(r);break;case 13:aa(r);break;case 19:Ig(r);break;case 10:Oo(r.type);break;case 22:case 23:aa(r),kg(),t!==null&&Le(Xi);break;case 24:Oo(Qn)}}function Cu(t,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var f=l.next;i=f;do{if((i.tag&t)===t){l=void 0;var m=i.create,R=i.inst;l=m(),R.destroy=l}i=i.next}while(i!==f)}}catch(I){gn(r,r.return,I)}}function ii(t,r,i){try{var l=r.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&t)===t){var R=l.inst,I=R.destroy;if(I!==void 0){R.destroy=void 0,f=r;var X=i,ie=I;try{ie()}catch(pe){gn(f,X,pe)}}}l=l.next}while(l!==m)}}catch(pe){gn(r,r.return,pe)}}function S2(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{cx(r,i)}catch(l){gn(t,t.return,l)}}}function w2(t,r,i){i.props=ts(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(l){gn(t,r,l)}}function Xa(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:var f=t.stateNode,m=wo(t.memoizedProps,f);(f.ref===null||f.ref.name!==m)&&(f.ref=A1(m)),l=f.ref;break;case 7:if(t.stateNode===null){var R=new ua(t);h(t.child,!1,yN,R,void 0,void 0),t.stateNode=R}l=t.stateNode;break;default:l=t.stateNode}typeof i=="function"?t.refCleanup=i(l):i.current=l}}catch(I){gn(t,r,I)}}function vr(t,r){var i=t.ref,l=t.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(f){gn(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){gn(t,r,f)}else i.current=null}function Gd(t,r){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&r!==null)for(var i=0;i<r.length;i++)P1(t.stateNode,r[i])}function E2(t){for(var r=t.return;r!==null&&(dm(r)&&P1(t.stateNode,r.stateNode),!cm(r));)r=r.return}function Tu(t){for(var r=t.return;r!==null&&(dm(r)&&vN(t.stateNode,r.stateNode),!cm(r));)r=r.return}function cm(t){return t.tag===5||t.tag===3||t.tag===27}function dm(t){return t&&t.tag===7&&t.stateNode!==null}function fm(t){var r=t.type,i=t.memoizedProps,l=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(f){gn(t,t.return,f)}}function hm(t,r,i){try{var l=t.stateNode;WD(l,t.type,i,r),l[Mn]=r}catch(f){gn(t,t.return,f)}}function R2(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hi(t.type)||t.tag===4}function pm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||R2(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&hi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function gm(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(f,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(f),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=kr)),Gd(t,l),pt=!0;else if(f!==4&&(f===27&&(Gd(t,l),l=null,hi(t.type)&&(i=t.stateNode,r=null)),t=t.child,t!==null))for(gm(t,r,i,l),t=t.sibling;t!==null;)gm(t,r,i,l),t=t.sibling}function $d(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?i.insertBefore(f,r):i.appendChild(f),Gd(t,l),pt=!0;else if(f!==4&&(f===27&&(Gd(t,l),l=null,hi(t.type)&&(i=t.stateNode)),t=t.child,t!==null))for($d(t,r,i,l),t=t.sibling;t!==null;)$d(t,r,i,l),t=t.sibling}function C2(t){var r=t.stateNode,i=t.memoizedProps;try{for(var l=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);br(r,l,i),r[dn]=t,r[Mn]=i}catch(m){gn(t,t.return,m)}}var Qd=!1,oa=null;function T2(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Qd=!0)}var Za=null;function O2(){var t=Za;return Za=null,t}var qr=0;function Qs(t,r,i,l,f){return qr=0,M2(t.child,r,i,l,f)}function M2(t,r,i,l,f){for(var m=!1;t!==null;){if(t.tag===5){var R=t.stateNode;if(l!==null){var I=Jm(R);l.push(I),I.view&&(m=!0)}else m||Jm(R).view&&(m=!0);Qd=!0,O1(R,qr===0?r:r+"_"+qr,i),qr++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f||M2(t.child,r,i,l,f)&&(m=!0));t=t.sibling}return m}function Ja(t,r){for(;t!==null;)t.tag===5?M1(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&r||Ja(t.child,r)),t=t.sibling}function Xd(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Xd(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var r=t.memoizedProps;if(r.name==null||r.name==="auto")throw Error(o(544));var i=r.name;r=Eo(r.default,r.share),r!=="none"&&(Qs(t,i,r,null,!1)||Ja(t.child,!1))}t=t.sibling}}function mm(t,r){if(t.tag===30){var i=t.stateNode,l=t.memoizedProps,f=wo(l,i),m=Eo(l.default,i.paired?l.share:l.enter);m!=="none"?Qs(t,f,m,null,!1)?(Xd(t),i.paired||r||rl(t,l.onEnter)):Ja(t.child,!1):Xd(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)mm(t,r),t=t.sibling;else Xd(t)}function ym(t){if(oa!==null&&oa.size!==0){var r=oa;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var i=t.memoizedProps,l=i.name;if(l!=null&&l!=="auto"){var f=r.get(l);if(f!==void 0){var m=Eo(i.default,i.share);if(m!=="none"&&(Qs(t,l,m,null,!1)?(m=t.stateNode,f.paired=m,m.paired=f,rl(t,i.onShare)):Ja(t.child,!1)),r.delete(l),r.size===0)break}}}ym(t)}t=t.sibling}}}function vm(t){if(t.tag===30){var r=t.memoizedProps,i=wo(r,t.stateNode),l=oa!==null?oa.get(i):void 0,f=Eo(r.default,l!==void 0?r.share:r.exit);f!=="none"&&(Qs(t,i,f,null,!1)?l!==void 0?(f=t.stateNode,l.paired=f,f.paired=l,oa.delete(i),rl(t,r.onShare)):rl(t,r.onExit):Ja(t.child,!1)),oa!==null&&ym(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)vm(t),t=t.sibling;else oa!==null&&ym(t)}function A2(t){for(t=t.child;t!==null;){if(t.tag===30){var r=t.memoizedProps,i=wo(r,t.stateNode);r=Eo(r.default,r.update),t.flags&=-5,r!=="none"&&Qs(t,i,r,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&A2(t);t=t.sibling}}function bm(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var r=t.stateNode;r.paired!==null&&(r.paired=null,Ja(t.child,!1))}bm(t)}t=t.sibling}}function Zd(t){if(t.tag===30)t.stateNode.paired=null,Ja(t.child,!1),bm(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Zd(t),t=t.sibling;else bm(t)}function D2(t){for(t=t.child;t!==null;)t.tag===30?Ja(t.child,!1):(t.subtreeFlags&33554432)!==0&&D2(t),t=t.sibling}function xm(t,r,i,l,f,m,R){for(var I=!1;r!==null;){if(r.tag===5){var X=r.stateNode;if(m!==null&&qr<m.length){var ie=m[qr],pe=Jm(X);(ie.view||pe.view)&&(I=!0);var Ce;if(Ce=(t.flags&4)===0)if(pe.clip)Ce=!0;else{Ce=ie.rect;var ae=pe.rect;Ce=Ce.y!==ae.y||Ce.x!==ae.x||Ce.height!==ae.height||Ce.width!==ae.width}Ce&&(t.flags|=4),pe.abs?pe=!ie.abs:(ie=ie.rect,pe=pe.rect,pe=ie.height!==pe.height||ie.width!==pe.width),pe&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&O1(X,qr===0?i:i+"_"+qr,f),I&&(t.flags&4)!==0||(Za===null&&(Za=[]),Za.push(X,qr===0?l:l+"_"+qr,r.memoizedProps)),qr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&R?t.flags|=r.flags&32:xm(t,r.child,i,l,f,m,R)&&(I=!0));r=r.sibling}return I}function N2(t,r){for(t=t.child;t!==null;){if(t.tag===30){var i=t.memoizedProps,l=t.stateNode,f=wo(i,l),m=Eo(i.default,i.update),R;R=t.memoizedState,t.memoizedState=null,l=t;var I=t.child;qr=0,f=xm(l,I,f,f,m,R,!1),(t.flags&4)!==0&&f&&rl(t,i.onUpdate)}else(t.subtreeFlags&33554432)!==0&&N2(t);t=t.sibling}}var sr=!1,hn=!1,Wa=!1,Sm=!1,k2=typeof WeakSet=="function"?WeakSet:Set,lr=null,eo=!1,Ou=!1,Jd=!1,wm=!1;function MD(t,r,i){if(t=t.containerInfo,Gm=hl,t=Lb(t),lg(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var m=f.anchorOffset,R=f.focusNode;f=f.focusOffset;try{l.nodeType,R.nodeType}catch{l=null;break e}var I=0,X=-1,ie=-1,pe=0,Ce=0,ae=t,fe=null;t:for(;;){for(var Ke;ae!==l||m!==0&&ae.nodeType!==3||(X=I+m),ae!==R||f!==0&&ae.nodeType!==3||(ie=I+f),ae.nodeType===3&&(I+=ae.nodeValue.length),(Ke=ae.firstChild)!==null;)fe=ae,ae=Ke;for(;;){if(ae===t)break t;if(fe===l&&++pe===m&&(X=I),fe===R&&++Ce===f&&(ie=I),(Ke=ae.nextSibling)!==null)break;ae=fe,fe=ae.parentNode}ae=Ke}l=X===-1||ie===-1?null:{start:X,end:ie}}else l=null}l=l||{start:0,end:0}}else l=null;for($m={focusedElem:t,selectionRange:l},hl=!1,i=(i&335544064)===i,lr=r,r=i?9270:1024;lr!==null;){if(t=lr,i&&(l=t.deletions,l!==null))for(m=0;m<l.length;m++)i&&vm(l[m]);if(t.alternate===null&&(t.flags&2)!==0)i&&T2(t),Wd(i);else{if(t.tag===22){if(l=t.alternate,t.memoizedState!==null){l!==null&&l.memoizedState===null&&i&&vm(l),Wd(i);continue}else if(l!==null&&l.memoizedState!==null){i&&T2(t),Wd(i);continue}}l=t.child,(t.subtreeFlags&r)!==0&&l!==null?(l.return=t,lr=l):(i&&A2(t),Wd(i))}}oa=null}function Wd(t){for(;lr!==null;){var r=lr,i=t,l=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&l!==null){i=void 0,f=l.memoizedProps,l=l.memoizedState;var m=r.stateNode;try{var R=ts(r.type,f);i=m.getSnapshotBeforeUpdate(R,l),m.__reactInternalSnapshotBeforeUpdate=i}catch(I){gn(r,r.return,I)}}break;case 3:if((f&1024)!==0){if(l=r.stateNode.containerInfo,i=l.nodeType,i===9)t0(l);else if(i===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":t0(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&l!==null&&(i=wo(l.memoizedProps,l.stateNode),f=r.memoizedProps,f=Eo(f.default,f.update),f!=="none"&&Qs(l,i,f,l.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(o(163))}if(l=r.sibling,l!==null){l.return=r.return,lr=l;break}lr=r.return}}function j2(t,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:to(t,i),l&4&&Cu(5,i);break;case 1:if(to(t,i),l&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(R){gn(i,i.return,R)}else{var f=ts(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(R){gn(i,i.return,R)}}l&64&&S2(i),l&512&&Xa(i,i.return);break;case 3:if(to(t,i),l&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{cx(t,r)}catch(R){gn(i,i.return,R)}}break;case 27:r===null&&l&4&&C2(i);case 26:case 5:to(t,i),r===null&&l&4&&fm(i),l&512&&Xa(i,i.return);break;case 12:to(t,i);break;case 31:to(t,i),l&4&&z2(t,i);break;case 13:to(t,i),l&4&&_2(t,i),l&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=HD.bind(null,i),SN(t,i))));break;case 22:if(l=i.memoizedState!==null||sr,!l){var m=r!==null&&r.memoizedState!==null||hn;r=sr,f=hn,sr=l,(hn=m)&&!f?(l=2,(i.subtreeFlags&8772)!==0&&(l|=1),_a(t,i,l)):to(t,i),sr=r,hn=f}break;case 30:to(t,i),l&512&&Xa(i,i.return);break;case 7:l&512&&Xa(i,i.return);default:to(t,i)}}function Em(t,r){for(t=t.child;t!==null;)I2(t,r),t=t.sibling}function I2(t,r){switch(t.tag){case 5:case 26:try{var i=t.stateNode;if(r){var l=i.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var f=t.stateNode,m=t.memoizedProps.style,R=m!=null&&m.hasOwnProperty("display")?m.display:null;f.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(X){gn(t,t.return,X)}Rm(t,r);break;case 6:try{t.stateNode.nodeValue=r?"":t.memoizedProps,pt=!0}catch(X){gn(t,t.return,X)}break;case 18:try{var I=t.stateNode;r?T1(I,!0):T1(t.stateNode,!1)}catch(X){gn(t,t.return,X)}break;case 22:case 23:t.memoizedState===null&&Em(t,r);break;default:Em(t,r)}}function Rm(t,r){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var i=t,l=r;switch(i.tag){case 4:I2(i,l);break e;case 22:i.memoizedState===null&&Rm(i,l);break e;default:Rm(i,l)}}t=t.sibling}}function P2(t){var r=t.alternate;r!==null&&(t.alternate=null,P2(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Kn(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var In=null,Kr=!1;function La(t,r,i){for(i=i.child;i!==null;)L2(t,r,i),i=i.sibling}function L2(t,r,i){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Ie,i)}catch{}switch(i.tag){case 26:hn||vr(i,r),La(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!hn&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:hn||vr(i,r),Tu(i);var l=In,f=Kr;hi(i.type)&&(In=i.stateNode,Kr=!1),La(t,r,i),H1(i.stateNode,i.type,i.memoizedProps),In=l,Kr=f;break;case 5:hn||vr(i,r),Tu(i);case 6:if(i.tag===6&&Tu(i),l=In,f=Kr,In=null,La(t,r,i),In=l,Kr=f,In!==null)if(Kr)try{(In.nodeType===9?In.body:In.nodeName==="HTML"?In.ownerDocument.body:In).removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}else try{In.removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}break;case 18:In!==null&&(Kr?(t=In,C1(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),pl(t)):C1(In,i.stateNode));break;case 4:l=In,f=Kr,In=i.stateNode.containerInfo,Kr=!0,La(t,r,i),In=l,Kr=f;break;case 0:case 11:case 14:case 15:ii(2,i,r),hn||ii(4,i,r),La(t,r,i);break;case 1:hn||(vr(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&w2(i,r,l)),La(t,r,i);break;case 21:La(t,r,i);break;case 22:hn=(l=hn)||i.memoizedState!==null,La(t,r,i),hn=l;break;case 30:vr(i,r),La(t,r,i);break;case 7:hn||vr(i,r),La(t,r,i);break;default:La(t,r,i)}}function z2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{pl(t)}catch(i){gn(r,r.return,i)}}}function _2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{pl(t)}catch(i){gn(r,r.return,i)}}function AD(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new k2),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new k2),r;default:throw Error(o(435,t.tag))}}function ef(t,r){var i=AD(t);r.forEach(function(l){if(!i.has(l)){i.add(l);var f=FD.bind(null,t,l);l.then(f,f)}})}function Pr(t,r,i){var l=r.deletions;if(l!==null)for(var f=0;f<l.length;f++){var m=l[f],R=t,I=r,X=I;e:for(;X!==null;){switch(X.tag){case 27:if(hi(X.type)){In=X.stateNode,Kr=!1;break e}break;case 5:In=X.stateNode,Kr=!1;break e;case 3:case 4:In=X.stateNode.containerInfo,Kr=!0;break e}X=X.return}if(In===null)throw Error(o(160));L2(R,I,m),In=null,Kr=!1,R=m.alternate,R!==null&&(R.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)U2(r,t,i),r=r.sibling}var za=null;function U2(t,r,i){var l=t.alternate,f=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(f&4&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(var m=0;m<l.length;m++){var R=l[m];R.ref.impl=R.nextImpl}Pr(r,t,i),Lr(t),f&4&&(ii(3,t,t.return),Cu(3,t),ii(5,t,t.return));break;case 1:Pr(r,t,i),Lr(t),f&512&&(hn||l===null||vr(l,l.return)),f&64&&sr&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:if(m=za,Pr(r,t,i),Lr(t),f&512&&(hn||l===null||vr(l,l.return)),f&4)if(f=l!==null?l.memoizedState:null,i=t.memoizedState,l===null)if(i===null)if(t.stateNode===null)if(sr)t.stateNode=w1(t.type,t.memoizedProps,r.containerInfo,t);else{e:{r=t.type,i=t.memoizedProps,f=m.ownerDocument||m;t:switch(r){case"title":l=f.getElementsByTagName("title")[0],(!l||l[ga]||l[dn]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=f.createElement(r),f.head.insertBefore(l,f.querySelector("head > title"))),br(l,r,i),l[dn]=t,Se(l),r=l;break e;case"link":if(m=Y1("link","href",f).get(r+(i.href||""))){for(R=0;R<m.length;R++)if(l=m[R],l.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&l.getAttribute("rel")===(i.rel==null?null:i.rel)&&l.getAttribute("title")===(i.title==null?null:i.title)&&l.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){m.splice(R,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;case"meta":if(m=Y1("meta","content",f).get(r+(i.content||""))){for(R=0;R<m.length;R++)if(l=m[R],l.getAttribute("content")===(i.content==null?null:""+i.content)&&l.getAttribute("name")===(i.name==null?null:i.name)&&l.getAttribute("property")===(i.property==null?null:i.property)&&l.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&l.getAttribute("charset")===(i.charSet==null?null:i.charSet)){m.splice(R,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;default:throw Error(o(468,r))}l[dn]=t,Se(l),r=l}t.stateNode=r}else sr||l0(m,t.type,t.stateNode);else t.stateNode=K1(m,i,t.memoizedProps);else f!==i?(f===null?(r=l.stateNode,r===null||hn||r.parentNode.removeChild(r)):f.count--,i===null?sr||l0(m,t.type,t.stateNode):K1(m,i,t.memoizedProps)):i===null&&t.stateNode!==null&&hm(t,t.memoizedProps,l.memoizedProps);break;case 27:Pr(r,t,i),Lr(t),f&512&&(hn||l===null||vr(l,l.return)),l!==null&&f&4&&hm(t,t.memoizedProps,l.memoizedProps);break;case 5:if(m=Wa,Wa=!1,Pr(r,t,i),Wa=m,Lr(t),f&512&&(hn||l===null||vr(l,l.return)),t.flags&32){r=t.stateNode;try{Nr(r,""),pt=!0}catch(pe){gn(t,t.return,pe)}}f&4&&t.stateNode!=null&&(r=t.memoizedProps,hm(t,r,l!==null?l.memoizedProps:r)),f&1024&&(Sm=!0);break;case 6:if(Pr(r,t,i),Lr(t),f&4){if(t.stateNode===null)throw Error(o(162));r=t.memoizedProps,i=t.stateNode;try{i.nodeValue=r,pt=!0}catch(pe){gn(t,t.return,pe)}}break;case 3:if(pt=!1,mf=null,m=za,za=Lu(r.containerInfo),Pr(r,t,i),za=m,Lr(t),f&4&&l!==null&&l.memoizedState.isDehydrated)try{pl(r.containerInfo)}catch(pe){gn(t,t.return,pe)}Sm&&(Sm=!1,H2(t)),pt=!1;break;case 4:f=Wa,Wa=sr,l=nr(),m=za,za=Lu(t.stateNode.containerInfo),Pr(r,t,i),Lr(t),za=m,pt&&Ou&&(Jd=!0),pt=l,Wa=f;break;case 12:Pr(r,t,i),Lr(t);break;case 31:Pr(r,t,i),Lr(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,ef(t,r)));break;case 13:Pr(r,t,i),Lr(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(rf=xt()),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,ef(t,r)));break;case 22:m=t.memoizedState!==null,R=l!==null&&l.memoizedState!==null;var I=sr,X=hn,ie=Wa;sr=I||m,Wa=ie||m,hn=X||R,Pr(r,t,i),hn=X,Wa=ie,sr=I,Lr(t),f&8192&&(r=t.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||l===null||R||sr||hn||(r=R||hn,i=sr,l=hn,sr=m||sr,hn=r,si(t,2),sr=i,hn=l),!m&&Wa||Em(t,m)),f&4&&(r=t.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,ef(t,i))));break;case 19:Pr(r,t,i),Lr(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,ef(t,r)));break;case 30:f&512&&(hn||l===null||vr(l,l.return)),f=nr(),m=Ou,R=(i&335544064)===i,I=t.memoizedProps,Ou=R&&Eo(I.default,I.update)!=="none",Pr(r,t,i),Lr(t),R&&l!==null&&pt&&(t.flags|=4),Ou=m,pt=f;break;case 21:break;case 7:f&512&&(hn||l===null||vr(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=t);default:Pr(r,t,i),Lr(t)}}function Lr(t){var r=t.flags;if(r&2){try{for(var i,l=t.return;l!==null;){if(R2(l)){i=l;break}l=l.return}l=null;for(var f=t.return;f!==null;){if(dm(f)){var m=f.stateNode;l===null?l=[m]:l.push(m)}if(cm(f))break;f=f.return}var R=l;if(i==null)throw Error(o(160));switch(i.tag){case 27:var I=i.stateNode,X=pm(t);$d(t,X,I,R);break;case 5:var ie=i.stateNode;i.flags&32&&(Nr(ie,""),i.flags&=-33);var pe=pm(t);$d(t,pe,ie,R);break;case 3:case 4:var Ce=i.stateNode.containerInfo,ae=pm(t);gm(t,ae,Ce,R);break;default:throw Error(o(161))}}catch(fe){gn(t,t.return,fe)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function H2(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;H2(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,hl=!0,r.reset(),hl=!1),t=t.sibling}}function Xs(t,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)F2(r,t),r=r.sibling;else N2(r)}function F2(t,r){var i=t.alternate;if(i===null)mm(t,!1);else switch(t.tag){case 3:if(wm=eo=!1,O2(),Xs(r,t),!eo&&!Jd){if(t=Za,t!==null)for(var l=0;l<t.length;l+=3){i=t[l];var f=t[l+1];M1(i,t[l+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}t=r.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),wm=!0}Za=null;break;case 5:Xs(r,t);break;case 4:l=eo,eo=!1,Xs(r,t),eo&&(Jd=!0),eo=l;break;case 22:t.memoizedState===null&&(i.memoizedState!==null?mm(t,!1):Xs(r,t));break;case 30:l=eo,f=O2(),eo=!1,Xs(r,t),eo&&(t.flags|=4);var m=t.memoizedProps,R=t.stateNode;r=wo(m,R),R=wo(i.memoizedProps,R);var I=Eo(m.default,m.update);I==="none"?r=!1:(m=i.memoizedState,i.memoizedState=null,i=t.child,qr=0,r=xm(t,i,r,R,I,m,!0),qr!==(m===null?0:m.length)&&(t.flags|=32)),(t.flags&4)!==0&&r?(rl(t,t.memoizedProps.onUpdate),Za=f):f!==null&&(f.push.apply(f,Za),Za=f),eo=(t.flags&32)!==0?!0:l;break;default:Xs(r,t)}}function to(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)j2(t,r.alternate,r),r=r.sibling}function si(t,r){for(t=t.child;t!==null;){var i=t,l=r;switch(i.tag){case 0:case 11:case 14:case 15:ii(4,i,i.return),si(i,l);break;case 1:vr(i,i.return);var f=i.stateNode;typeof f.componentWillUnmount=="function"&&w2(i,i.return,f),si(i,l);break;case 27:(l&2)!==0&&H1(i.stateNode,i.type,i.memoizedProps);case 5:vr(i,i.return),i.tag!==5&&i.tag!==27||Tu(i),si(i,l);break;case 6:Tu(i);break;case 26:vr(i,i.return),f=i.stateNode,i.memoizedState!==null||f===null||hn||f.parentNode.removeChild(f),si(i,l);break;case 22:i.memoizedState===null&&si(i,l);break;case 30:vr(i,i.return),si(i,l);break;case 7:vr(i,i.return);default:si(i,l)}t=t.sibling}}function _a(t,r,i){for(i=(r.subtreeFlags&8772)!==0?i:i&-2,r=r.child;r!==null;){var l=r.alternate,f=t,m=r,R=m.flags,I=(i&1)!==0;switch(m.tag){case 0:case 11:case 15:_a(f,m,i),Cu(4,m);break;case 1:if(_a(f,m,i),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(pe){gn(l,l.return,pe)}if(l=m,f=l.updateQueue,f!==null){var X=l.stateNode;try{var ie=f.shared.hiddenCallbacks;if(ie!==null)for(f.shared.hiddenCallbacks=null,f=0;f<ie.length;f++)ux(ie[f],X)}catch(pe){gn(l,l.return,pe)}}I&&R&64&&S2(m),Xa(m,m.return);break;case 27:(i&2)!==0&&C2(m);case 5:m.tag!==5&&m.tag!==27||E2(m),_a(f,m,i),I&&l===null&&R&4&&fm(m),Xa(m,m.return);break;case 6:E2(m);break;case 26:X=m.stateNode,m.memoizedState!==null||X===null||sr||l0(Lu(X.ownerDocument),m.type,X),_a(f,m,i),I&&l===null&&R&4&&fm(m),Xa(m,m.return);break;case 12:_a(f,m,i);break;case 31:_a(f,m,i),I&&R&4&&z2(f,m);break;case 13:_a(f,m,i),I&&R&4&&_2(f,m);break;case 22:m.memoizedState===null&&_a(f,m,i),Xa(m,m.return);break;case 30:_a(f,m,i),Xa(m,m.return);break;case 7:Xa(m,m.return);default:_a(f,m,i)}r=r.sibling}}function Cm(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&fu(i))}function Tm(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&fu(t))}function wa(t,r,i,l){var f=(i&335544064)===i;if(r.subtreeFlags&(f?10262:10256))for(r=r.child;r!==null;)B2(t,r,i,l),r=r.sibling;else f&&D2(r)}function B2(t,r,i,l){var f=(i&335544064)===i;f&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&Zd(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:wa(t,r,i,l),m&2048&&Cu(9,r);break;case 1:wa(t,r,i,l);break;case 3:wa(t,r,i,l),f&&wm&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&fu(m)));break;case 12:if(m&2048){wa(t,r,i,l),m=r.stateNode;try{var R=r.memoizedProps,I=R.id,X=R.onPostCommit;typeof X=="function"&&X(I,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(ie){gn(r,r.return,ie)}}else wa(t,r,i,l);break;case 31:wa(t,r,i,l);break;case 13:wa(t,r,i,l);break;case 23:break;case 22:R=r.stateNode,I=r.alternate,r.memoizedState!==null?(f&&I!==null&&I.memoizedState===null&&Zd(I),R._visibility&2?wa(t,r,i,l):Mu(t,r)):(f&&I!==null&&I.memoizedState!==null&&Zd(r),R._visibility&2?wa(t,r,i,l):(R._visibility|=2,Zs(t,r,i,l,(r.subtreeFlags&10256)!==0||!1))),m&2048&&Cm(I,r);break;case 24:wa(t,r,i,l),m&2048&&Tm(r.alternate,r);break;case 30:f&&(m=r.alternate,m!==null&&(Ja(m.child,!0),Ja(r.child,!0))),wa(t,r,i,l);break;default:wa(t,r,i,l)}}function Zs(t,r,i,l,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,R=r,I=i,X=l,ie=R.flags;switch(R.tag){case 0:case 11:case 15:Zs(m,R,I,X,f),Cu(8,R);break;case 23:break;case 22:var pe=R.stateNode;R.memoizedState!==null?pe._visibility&2?Zs(m,R,I,X,f):Mu(m,R):(pe._visibility|=2,Zs(m,R,I,X,f)),f&&ie&2048&&Cm(R.alternate,R);break;case 24:Zs(m,R,I,X,f),f&&ie&2048&&Tm(R.alternate,R);break;default:Zs(m,R,I,X,f)}r=r.sibling}}function Mu(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,l=r,f=l.flags;switch(l.tag){case 22:Mu(i,l),f&2048&&Cm(l.alternate,l);break;case 24:Mu(i,l),f&2048&&Tm(l.alternate,l);break;default:Mu(i,l)}r=r.sibling}}var ns=8192;function rs(t,r,i){if(t.subtreeFlags&ns)for(t=t.child;t!==null;)V2(t,r,i),t=t.sibling}function V2(t,r,i){switch(t.tag){case 26:rs(t,r,i),t.flags&ns&&(t.memoizedState!==null?PN(i,za,t.memoizedState,t.memoizedProps):(t=t.stateNode,(r&335544128)===r&&X1(i,t)));break;case 5:rs(t,r,i),t.flags&ns&&(t=t.stateNode,(r&335544128)===r&&X1(i,t));break;case 3:case 4:var l=za;za=Lu(t.stateNode.containerInfo),rs(t,r,i),za=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=ns,ns=16777216,rs(t,r,i),ns=l):rs(t,r,i));break;case 30:if((t.flags&ns)!==0&&(l=t.memoizedProps.name,l!=null&&l!=="auto")){var f=t.stateNode;f.paired=null,oa===null&&(oa=new Map),oa.set(l,f)}rs(t,r,i);break;default:rs(t,r,i)}}function q2(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Au(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,Y2(l,t)}q2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)K2(t),t=t.sibling}function K2(t){switch(t.tag){case 0:case 11:case 15:Au(t),t.flags&2048&&ii(9,t,t.return);break;case 3:Au(t);break;case 12:Au(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,tf(t)):Au(t);break;default:Au(t)}}function tf(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,Y2(l,t)}q2(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ii(8,r,r.return),tf(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,tf(r));break;default:tf(r)}t=t.sibling}}function Y2(t,r){for(;lr!==null;){var i=lr;switch(i.tag){case 0:case 11:case 15:ii(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:fu(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,lr=l;else e:for(i=t;lr!==null;){l=lr;var f=l.sibling,m=l.return;if(P2(l),l===i){lr=null;break e}if(f!==null){f.return=m,lr=f;break e}lr=m}}}var DD={getCacheForType:function(t){var r=gr(Qn),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return gr(Qn).controller.signal}},ND=typeof WeakMap=="function"?WeakMap:Map,ln=0,Tn=null,Kt=null,Zt=0,pn=0,ia=null,li=!1,Js=!1,Om=!1,ko=0,Vn=0,ui=0,as=0,nf=0,sa=0,Ws=0,Du=null,Yr=null,Mm=!1,rf=0,G2=0,af=1/0,of=null,ci=null,_n=0,Ua=null,os=null,no=0,Am=0,Dm=null,$2=null,el=null,tl=null,nl=null,Nu=0,sf=null;function la(){return(ln&2)!==0&&Zt!==0?Zt&-Zt:ge.T!==null?Hm():Cn()}function Q2(){if(sa===0)if((Zt&536870912)===0||Ft){var t=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),sa=t}else sa=536870912;return t=mr.current,t!==null&&(t.flags|=32),sa}function rl(t,r){if(r!=null){var i=t.stateNode,l=i.ref;l===null&&(l=i.ref=A1(wo(t.memoizedProps,i))),tl===null&&(tl=[]),tl.push(r.bind(null,l))}}function Gr(t,r,i){(t===Tn&&(pn===2||pn===9)||t.cancelPendingCommit!==null)&&(al(t,0),di(t,Zt,sa,!1)),ct(t,i),((ln&2)===0||t!==Tn)&&(t===Tn&&((ln&2)===0&&(as|=i),Vn===4&&di(t,Zt,sa,!1)),ro(t))}function X2(t,r,i){if((ln&6)!==0)throw Error(o(327));var l=!i&&(r&127)===0&&(r&t.expiredLanes)===0||Xe(t,r),f=l?ID(t,r):km(t,r,!0),m=l;do{if(f===0){Js&&!l&&di(t,r,0,!1);break}else{if(i=t.current.alternate,m&&!kD(i)){f=km(t,r,!1),m=!1;continue}if(f===2){if(m=r,t.errorRecoveryDisabledLanes&m)var R=0;else R=t.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){r=R;e:{var I=t;f=Du;var X=I.current.memoizedState.isDehydrated;if(X&&(al(I,R).flags|=256),R=km(I,R,!1),R!==2&&R!==6){if(Om&&!X){I.errorRecoveryDisabledLanes|=m,as|=m,f=4;break e}m=Yr,Yr=f,m!==null&&(Yr===null?Yr=m:Yr.push.apply(Yr,m))}f=R}if(m=!1,f!==2)continue}}if(f===1){al(t,0),di(t,r,0,!0);break}e:{switch(l=t,m=f,m){case 0:case 1:throw Error(o(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:di(l,r,sa,!li);break e;case 2:Yr=null;break;case 3:case 5:break;default:throw Error(o(329))}if((r&62914560)===r&&(f=rf+300-xt(),10<f)){if(di(l,r,sa,!li),Ve(l,0,!0)!==0)break e;no=r,l.timeoutHandle=Zm(Z2.bind(null,l,i,Yr,of,Mm,r,sa,as,Ws,li,m,"Throttled",-0,0),f);break e}Z2(l,i,Yr,of,Mm,r,sa,as,Ws,li,m,null,-0,0)}}break}while(!0);ro(t)}function Z2(t,r,i,l,f,m,R,I,X,ie,pe,Ce,ae,fe){t.timeoutHandle=-1;var Ke=r.subtreeFlags,rt=(m&335544064)===m;if(Ce=null,(rt||Ke&8192||(Ke&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:kr},oa=null,V2(r,m,Ce),rt&&(Ke=Ce,rt=t.containerInfo,rt=(rt.nodeType===9?rt:rt.ownerDocument).__reactViewTransition,rt!=null&&(Ke.count++,Ke.waitingForViewTransition=!0,Ke=Uu.bind(Ke),rt.finished.then(Ke,Ke))),Ke=(m&62914560)===m?rf-xt():(m&4194048)===m?G2-xt():0,Ke=LN(Ce,Ke),Ke!==null)){no=m,t.cancelPendingCommit=Ke(o1.bind(null,t,r,m,i,l,f,R,I,X,ie,pe,Ce,null,ae,fe)),di(t,m,R,!ie);return}o1(t,r,m,i,l,f,R,I,X,ie,pe,Ce)}function kD(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var f=i[l],m=f.getSnapshot;f=f.value;try{if(!ra(m(),f))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function di(t,r,i,l){r=$e(t,r),r&=~nf,r&=~as,t.suspendedLanes|=r,t.pingedLanes&=~r,l&&(t.warmLanes|=r),l=t.expirationTimes;for(var f=r;0<f;){var m=31-et(f),R=1<<m;l[m]=-1,f&=~R}i!==0&&Ut(t,i,r)}function lf(){return(ln&6)===0?(ku(0),!1):!0}function Nm(){if(Kt!==null){if(pn===0)var t=Kt.return;else t=Kt,To=Yi=null,Ug(t),qs=null,gu=0,t=Kt;for(;t!==null;)x2(t.alternate,t),t=t.return;Kt=null}}function al(t,r){var i=t.timeoutHandle;return i!==-1&&(t.timeoutHandle=-1,nN(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),no=0,Nm(),Tn=t,Kt=i=Ro(t.current,null),Zt=r,pn=0,ia=null,li=!1,Js=Xe(t,r),Om=!1,Ws=sa=nf=as=ui=Vn=0,Yr=Du=null,Mm=!1,ko=$e(t,r),gd(),i}function J2(t,r){Nt=null,ge.H=Hd,r===Vs||r===Td?(r=ox(),pn=3):r===Tg?(r=ox(),pn=4):pn=r===em?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ia=r,Kt===null&&(Vn=1,Fd(t,va(r,t.current)))}function W2(){var t=mr.current;return t===null?!0:(Zt&4194048)===Zt?Er===null:(Zt&62914560)===Zt||(Zt&536870912)!==0?t===Er:!1}function e1(){var t=ge.H;return ge.H=Hd,t===null?Hd:t}function t1(){var t=ge.A;return ge.A=DD,t}function uf(){Vn=4,li||(Zt&4194048)!==Zt&&mr.current!==null||(Js=!0),(ui&134217727)===0&&(as&134217727)===0||Tn===null||di(Tn,Zt,sa,!1)}function km(t,r,i){var l=ln;ln|=2;var f=e1(),m=t1();(Tn!==t||Zt!==r)&&(of=null,al(t,r)),r=!1;var R=Vn;e:do try{if(pn!==0&&Kt!==null){var I=Kt,X=ia;switch(pn){case 8:Nm(),R=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(r=!0);var ie=pn;if(pn=0,ia=null,ol(t,I,X,ie),i&&Js){R=0;break e}break;default:ie=pn,pn=0,ia=null,ol(t,I,X,ie)}}jD(),R=Vn;break}catch(pe){J2(t,pe)}while(!0);return r&&t.shellSuspendCounter++,To=Yi=null,ln=l,ge.H=f,ge.A=m,Kt===null&&(Tn=null,Zt=0,gd()),R}function jD(){for(;Kt!==null;)n1(Kt)}function ID(t,r){var i=ln;ln|=2;var l=e1(),f=t1();Tn!==t||Zt!==r?(of=null,af=xt()+500,al(t,r)):Js=Xe(t,r);e:do try{if(pn!==0&&Kt!==null){r=Kt;var m=ia;t:switch(pn){case 1:pn=0,ia=null,ol(t,r,m,1);break;case 2:case 9:if(rx(m)){pn=0,ia=null,r1(r);break}r=function(){pn!==2&&pn!==9||Tn!==t||(pn=7),ro(t)},m.then(r,r);break e;case 3:pn=7;break e;case 4:pn=5;break e;case 7:rx(m)?(pn=0,ia=null,r1(r)):(pn=0,ia=null,ol(t,r,m,7));break;case 5:var R=null;switch(Kt.tag){case 26:R=Kt.memoizedState;case 5:case 27:var I=Kt;if(R?$1(R):I.stateNode.complete){pn=0,ia=null;var X=I.sibling;if(X!==null)Kt=X;else{var ie=I.return;ie!==null?(Kt=ie,cf(ie)):Kt=null}break t}}pn=0,ia=null,ol(t,r,m,5);break;case 6:pn=0,ia=null,ol(t,r,m,6);break;case 8:Nm(),Vn=6;break e;default:throw Error(o(462))}}PD();break}catch(pe){J2(t,pe)}while(!0);return To=Yi=null,ge.H=l,ge.A=f,ln=i,Kt!==null?0:(Tn=null,Zt=0,gd(),Vn)}function PD(){for(;Kt!==null&&!tn();)n1(Kt)}function n1(t){var r=v2(t.alternate,t,ko);t.memoizedProps=t.pendingProps,r===null?cf(t):Kt=r}function r1(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=d2(i,r,r.pendingProps,r.type,void 0,Zt);break;case 11:r=d2(i,r,r.pendingProps,r.type.render,r.ref,Zt);break;case 5:Ug(r);var l=r;l===ir&&(Ft?(Sd(l),l.tag===5&&l.stateNode!=null&&(An=l.stateNode)):(Sd(l),Ft=!0));default:x2(i,r),r=Kt=Yb(r,ko),r=v2(i,r,ko)}t.memoizedProps=t.pendingProps,r===null?cf(t):Kt=r}function ol(t,r,i,l){To=Yi=null,Ug(r),qs=null,gu=0;var f=r.return;try{if(wD(t,f,r,i,Zt)){Vn=1,Fd(t,va(i,t.current)),Kt=null;return}}catch(m){if(f!==null)throw Kt=f,m;Vn=1,Fd(t,va(i,t.current)),Kt=null;return}r.flags&32768?(Ft||l===1?t=!0:Js||(Zt&536870912)!==0?t=!1:(li=t=!0,(l===2||l===9||l===3||l===6)&&(l=mr.current,l!==null&&l.tag===13&&(l.flags|=16384))),a1(r,t)):cf(r)}function cf(t){var r=t;do{if((r.flags&32768)!==0){a1(r,li);return}t=r.return;var i=TD(r.alternate,r,ko);if(i!==null){Kt=i;return}if(r=r.sibling,r!==null){Kt=r;return}Kt=r=t}while(r!==null);Vn===0&&(Vn=5)}function a1(t,r){do{var i=OD(t.alternate,t);if(i!==null){i.flags&=32767,Kt=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){Kt=t;return}Kt=t=i}while(t!==null);Vn=6,Kt=null}function o1(t,r,i,l,f,m,R,I,X,ie,pe,Ce){t.cancelPendingCommit=null;do df();while(_n!==0);if((ln&6)!==0)throw Error(o(327));if(r!==null){if(r===t.current)throw Error(o(177));t===Tn&&(Kt=Tn=null,Zt=0),os=r,Ua=t,no=i,Dm=f,$2=l,LD(t,r,i,R,I,X,Ce)}}function LD(t,r,i,l,f,m,R){var I=r.lanes|r.childLanes;if(Am=I,I|=hg,Vt(t,i,I,l,f,m),tl=null,(i&335544064)===i?(nl=cD(t),l=10262):(nl=null,l=10256),(r.subtreeFlags&l)!==0||(r.flags&l)!==0?(t.callbackNode=null,t.callbackPriority=0,BD(gt,function(){return Lm(),null})):(t.callbackNode=null,t.callbackPriority=0),Qd=!1,l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null,f=ce.p,ce.p=2,m=ln,ln|=4;try{MD(t,r,i)}finally{ln=m,ce.p=f,ge.T=l}}_n=1,Qd?el=lN(R,t.containerInfo,nl,jm,Im,_D,Pm,Lm,zD):(jm(),Im(),Pm())}function zD(t){if(_n!==0){var r=Ua.onRecoverableError;r(t,{componentStack:null})}}function _D(){_n===3&&(_n=0,F2(os,Ua),_n=4)}function jm(){if(_n===1){_n=0;var t=Ua,r=os,i=no,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null;var f=ce.p;ce.p=2;var m=ln;ln|=4;try{Ou=Jd=!1,U2(r,t,i),i=$m;var R=Lb(t.containerInfo),I=i.focusedElem,X=i.selectionRange;if(R!==I&&I&&I.ownerDocument&&Pb(I.ownerDocument.documentElement,I)){if(X!==null&&lg(I)){var ie=X.start,pe=X.end;if(pe===void 0&&(pe=ie),"selectionStart"in I)I.selectionStart=ie,I.selectionEnd=Math.min(pe,I.value.length);else{var Ce=I.ownerDocument||document,ae=Ce&&Ce.defaultView||window;if(ae.getSelection){var fe=ae.getSelection(),Ke=I.textContent.length,rt=Math.min(X.start,Ke),kt=X.end===void 0?rt:Math.min(X.end,Ke);!fe.extend&&rt>kt&&(R=kt,kt=rt,rt=R);var oe=Ib(I,rt),te=Ib(I,kt);if(oe&&te&&(fe.rangeCount!==1||fe.anchorNode!==oe.node||fe.anchorOffset!==oe.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ue=Ce.createRange();ue.setStart(oe.node,oe.offset),fe.removeAllRanges(),rt>kt?(fe.addRange(ue),fe.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),fe.addRange(ue))}}}}for(Ce=[],fe=I;fe=fe.parentNode;)fe.nodeType===1&&Ce.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<Ce.length;I++){var Re=Ce[I];Re.element.scrollLeft=Re.left,Re.element.scrollTop=Re.top}}hl=!!Gm,$m=Gm=null}finally{ln=m,ce.p=f,ge.T=l}}t.current=r,_n=2}}function Im(){if(_n===2){_n=0;var t=Ua,r=os,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=ge.T,ge.T=null;var l=ce.p;ce.p=2;var f=ln;ln|=4;try{j2(t,r.alternate,r)}finally{ln=f,ce.p=l,ge.T=i}}_n=3}}function Pm(){if(_n===4||_n===3){_n=0;var t=el;el=null,We();var r=Ua,i=os,l=no,f=$2,m=(l&335544064)===l?10262:10256;if((i.subtreeFlags&m)!==0||(i.flags&m)!==0?_n=5:(_n=0,os=Ua=null,i1(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(ci=null),Rn(l),i=i.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Ie,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=ge.T,m=ce.p,ce.p=2,ge.T=null;try{for(var R=r.onRecoverableError,I=0;I<f.length;I++){var X=f[I];R(X.value,{componentStack:X.stack})}}finally{ge.T=i,ce.p=m}}if(f=tl,R=nl,nl=null,f!==null&&(tl=null,R===null&&(R=[]),t!==null))for(X=0;X<f.length;X++)i=(0,f[X])(R),i!==void 0&&t.finished.finally(i);(no&3)!==0&&df(),ro(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===sf?Nu++:(Nu=0,sf=r):(Nu=0,sf=null),ku(0)}}function i1(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,fu(r)))}function df(){return el!==null&&(el.skipTransition(),el=null),jm(),Im(),Pm(),Lm()}function Lm(){if(_n!==5)return!1;var t=Ua,r=Am;Am=0;var i=Rn(no),l=ge.T,f=ce.p;try{ce.p=32>i?32:i,ge.T=null,i=Dm,Dm=null;var m=Ua,R=no;if(_n=0,os=Ua=null,no=0,(ln&6)!==0)throw Error(o(331));var I=ln;if(ln|=4,K2(m.current),B2(m,m.current,R,i),ln=I,ku(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Ie,m)}catch{}return!0}finally{ce.p=f,ge.T=l,i1(t,r)}}function s1(t,r,i){r=va(i,r),r=Wg(t.stateNode,r,2),t=ni(t,r,2),t!==null&&(ct(t,2),ro(t))}function gn(t,r,i){if(t.tag===3)s1(t,t,i);else for(;r!==null;){if(r.tag===3){s1(r,t,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ci===null||!ci.has(l))){t=va(i,t),i=r2(2),l=ni(r,i,2),l!==null&&(a2(i,l,r,t),ct(l,2),ro(l));break}}r=r.return}}function zm(t,r,i){var l=t.pingCache;if(l===null){l=t.pingCache=new ND;var f=new Set;l.set(r,f)}else f=l.get(r),f===void 0&&(f=new Set,l.set(r,f));f.has(i)||(Om=!0,f.add(i),t=UD.bind(null,t,r,i),r.then(t,t))}function UD(t,r,i){var l=t.pingCache;l!==null&&l.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Tn===t&&(Zt&i)===i&&((Vn===4||Vn===3&&(Zt&62914560)===Zt&&300>xt()-rf)&&(ln&2)===0?al(t,0):nf|=i,Ws===Zt&&(Ws=0)),ro(t)}function l1(t,r){r===0&&(r=tt()),t=Vi(t,r),t!==null&&(ct(t,r),ro(t))}function HD(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),l1(t,i)}function FD(t,r){var i=0;switch(t.tag){case 31:case 13:var l=t.stateNode,f=t.memoizedState;f!==null&&(i=f.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(r),l1(t,i)}function BD(t,r){return en(t,r)}var il=null,sl=null,_m=!1,ff=!1,Um=!1,fi=0;function ro(t){t!==sl&&t.next===null&&(sl===null?il=sl=t:sl=sl.next=t),ff=!0,_m||(_m=!0,qD())}function ku(t,r){if(!Um&&ff){Um=!0;do for(var i=!1,l=il;l!==null;){if(t!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var R=l.suspendedLanes,I=l.pingedLanes;m=(1<<31-et(42|t)+1)-1,m&=f&~(R&~I),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,f1(l,m))}else m=Zt,m=Ve(l,l===Tn?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Xe(l,m)||(i=!0,f1(l,m));l=l.next}while(i);Um=!1}}function VD(){u1()}function u1(){ff=_m=!1;var t=0;fi!==0&&tN()&&(t=fi);for(var r=xt(),i=null,l=il;l!==null;){var f=l.next,m=c1(l,r);m===0?(l.next=null,i===null?il=f:i.next=f,f===null&&(sl=i)):(i=l,(t!==0||(m&3)!==0)&&(ff=!0)),l=f}_n!==0&&_n!==5||ku(t),fi!==0&&(fi=0)}function c1(t,r){for(var i=t.suspendedLanes,l=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var R=31-et(m),I=1<<R,X=f[R];X===-1?((I&i)===0||(I&l)!==0)&&(f[R]=st(I,r)):X<=r&&(t.expiredLanes|=I),m&=~I}if(r=Tn,i=Zt,i=Ve(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,i===0||t===r&&(pn===2||pn===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&an(l),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Xe(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(l!==null&&an(l),Rn(i)){case 2:case 8:i=vt;break;case 32:i=gt;break;case 268435456:i=un;break;default:i=gt}return l=d1.bind(null,t),i=en(i,l),t.callbackPriority=r,t.callbackNode=i,r}return l!==null&&l!==null&&an(l),t.callbackPriority=2,t.callbackNode=null,2}function d1(t,r){if(_n!==0&&_n!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(df()&&t.callbackNode!==i)return null;var l=Zt;return l=Ve(t,t===Tn?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(X2(t,l,r),c1(t,xt()),t.callbackNode!=null&&t.callbackNode===i?d1.bind(null,t):null)}function f1(t,r){if(df())return null;X2(t,r,!0)}function qD(){rN(function(){(ln&6)!==0?en(ft,VD):u1()})}function Hm(){if(fi===0){var t=Qi;t===0&&(t=ne,ne<<=1,(ne&261888)===0&&(ne=256)),fi=t}return fi}function h1(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:hr(t)}function KD(t,r,i,l,f){if(r==="submit"&&i&&i.stateNode===f){var m=h1((f[Mn]||null).action),R=l.submitter;R&&(r=(r=R[Mn]||null)?h1(r.formAction):R.getAttribute("formAction"),r!==null&&(m=r,R=null));var I=new dd("action","action",null,l,f);t.push({event:I,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(fi!==0){var X=new FormData(f,R);$g(i,{pending:!0,data:X,method:f.method,action:m},null,X)}}else typeof m=="function"&&(I.preventDefault(),X=new FormData(f,R),$g(i,{pending:!0,data:X,method:f.method,action:m},m,X))},currentTarget:f}]})}}for(var Fm=0;Fm<fg.length;Fm++){var Bm=fg[Fm],YD=Bm.toLowerCase(),GD=Bm[0].toUpperCase()+Bm.slice(1);Pa(YD,"on"+GD)}Pa(Ub,"onAnimationEnd"),Pa(Hb,"onAnimationIteration"),Pa(Fb,"onAnimationStart"),Pa("dblclick","onDoubleClick"),Pa("focusin","onFocus"),Pa("focusout","onBlur"),Pa(nD,"onTransitionRun"),Pa(rD,"onTransitionStart"),Pa(aD,"onTransitionCancel"),Pa(Bb,"onTransitionEnd"),vn("onMouseEnter",["mouseout","mouseover"]),vn("onMouseLeave",["mouseout","mouseover"]),vn("onPointerEnter",["pointerout","pointerover"]),vn("onPointerLeave",["pointerout","pointerover"]),_t("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_t("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_t("onBeforeInput",["compositionend","keypress","textInput","paste"]),_t("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_t("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_t("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ju="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(" "),$D=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ju));function p1(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],f=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var R=l.length-1;0<=R;R--){var I=l[R],X=I.instance,ie=I.currentTarget;if(I=I.listener,X!==m&&f.isPropagationStopped())break e;m=I,f.currentTarget=ie;try{m(f)}catch(pe){pd(pe)}f.currentTarget=null,m=X}else for(R=0;R<l.length;R++){if(I=l[R],X=I.instance,ie=I.currentTarget,I=I.listener,X!==m&&f.isPropagationStopped())break e;m=I,f.currentTarget=ie;try{m(f)}catch(pe){pd(pe)}f.currentTarget=null,m=X}}}}function Yt(t,r){var i=r[bo];i===void 0&&(i=r[bo]=new Set);var l=t+"__bubble";i.has(l)||(g1(r,t,2,!1),i.add(l))}function Vm(t,r,i){var l=0;r&&(l|=4),g1(i,t,l,r)}var hf="_reactListening"+Math.random().toString(36).slice(2);function qm(t){if(!t[hf]){t[hf]=!0,Ct.forEach(function(i){i!=="selectionchange"&&($D.has(i)||Vm(i,!1,t),Vm(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[hf]||(r[hf]=!0,Vm("selectionchange",!1,r))}}function g1(t,r,i,l){switch(aS(r)){case 2:var f=HN;break;case 8:f=FN;break;default:f=c0}i=f.bind(null,r,i,t),f=void 0,!Hi||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),l?f!==void 0?t.addEventListener(r,i,{capture:!0,passive:f}):t.addEventListener(r,i,!0):f!==void 0?t.addEventListener(r,i,{passive:f}):t.addEventListener(r,i,!1)}function Km(t,r,i,l,f){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var R=l.tag;if(R===3||R===4){var I=l.stateNode.containerInfo;if(I===f)break;if(R===4)for(R=l.return;R!==null;){var X=R.tag;if((X===3||X===4)&&R.stateNode.containerInfo===f)return;R=R.return}for(;I!==null;){if(R=Fn(I),R===null)return;if(X=R.tag,X===5||X===6||X===26||X===27){l=m=R;continue e}I=I.parentNode}}l=l.return}Ui(function(){var ie=m,pe=_i(i),Ce=[];e:{var ae=Vb.get(t);if(ae!==void 0){var fe=dd,Ke=t;switch(t){case"keypress":if(ud(i)===0)break e;case"keydown":case"keyup":fe=kA;break;case"focusin":Ke="focus",fe=ng;break;case"focusout":Ke="blur",fe=ng;break;case"beforeblur":case"afterblur":fe=ng;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=vb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=xA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=zA;break;case Ub:case Hb:case Fb:fe=EA;break;case Bb:fe=UA;break;case"scroll":case"scrollend":fe=vA;break;case"wheel":fe=FA;break;case"copy":case"cut":case"paste":fe=CA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=xb;break;case"submit":fe=PA;break;case"toggle":case"beforetoggle":fe=VA}var rt=(r&4)!==0,kt=!rt&&(t==="scroll"||t==="scrollend"),oe=rt?ae!==null?ae+"Capture":null:ae;rt=[];for(var te=ie,ue;te!==null;){var Re=te;if(ue=Re.stateNode,Re=Re.tag,Re!==5&&Re!==26&&Re!==27||ue===null||oe===null||(Re=So(te,oe),Re!=null&&rt.push(Iu(te,Re,ue))),kt)break;te=te.return}0<rt.length&&(ae=new fe(ae,Ke,null,i,pe),Ce.push({event:ae,listeners:rt}))}}if((r&7)===0){e:{if(fe=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",fe&&i!==zi&&(Ke=i.relatedTarget||i.fromElement)&&(Fn(Ke)||Ke[jn]))break e;(ae||fe)&&(Ke=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ae?(fe=i.relatedTarget||i.toElement,ae=ie,fe=fe?Fn(fe):null,fe!==null&&(kt=u(fe),rt=fe.tag,fe!==kt||rt!==5&&rt!==27&&rt!==6)&&(fe=null)):(ae=null,fe=ie),ae!==fe&&(rt=vb,Re="onMouseLeave",oe="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(rt=xb,Re="onPointerLeave",oe="onPointerEnter",te="pointer"),kt=ae==null?Ke:he(ae),ue=fe==null?Ke:he(fe),Ke=new rt(Re,te+"leave",ae,i,pe),Ke.target=kt,Ke.relatedTarget=ue,Re=null,Fn(pe)===ie&&(rt=new rt(oe,te+"enter",fe,i,pe),rt.target=ue,rt.relatedTarget=kt,Re=rt),kt=Re,rt=ae&&fe?P(ae,fe,QD):null,ae!==null&&m1(Ce,Ke,ae,rt,!1),fe!==null&&kt!==null&&m1(Ce,kt,fe,rt,!0)))}e:{if(ae=ie?he(ie):window,fe=ae.nodeName&&ae.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ae.type==="file")var Je=Mb;else if(Tb(ae))if(Ab)Je=WA;else{Je=ZA;var Jt=XA}else fe=ae.nodeName,!fe||fe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ie&&Li(ie.elementType)&&(Je=Mb):Je=JA;if(Je&&(Je=Je(t,ie))){Ob(Ce,Je,i,pe);break e}Jt&&Jt(t,ae,ie)}switch(Jt=ie?he(ie):window,t){case"focusin":(Tb(Jt)||Jt.contentEditable==="true")&&(Ps=Jt,ug=ie,uu=null);break;case"focusout":uu=ug=Ps=null;break;case"mousedown":cg=!0;break;case"contextmenu":case"mouseup":case"dragend":cg=!1,zb(Ce,i,pe);break;case"selectionchange":if(tD)break;case"keydown":case"keyup":zb(Ce,i,pe)}var lt;if(ag)e:{switch(t){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else Is?Rb(t,i)&&(bt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(bt="onCompositionStart");bt&&(Sb&&i.locale!=="ko"&&(Is||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Is&&(lt=mb()):(Go=pe,Wp="value"in Go?Go.value:Go.textContent,Is=!0)),Jt=pf(ie,bt),0<Jt.length&&(bt=new bb(bt,t,null,i,pe),Ce.push({event:bt,listeners:Jt}),lt?bt.data=lt:(lt=Cb(i),lt!==null&&(bt.data=lt)))),(lt=KA?YA(t,i):GA(t,i))&&(bt=pf(ie,"onBeforeInput"),0<bt.length&&(Jt=new bb("onBeforeInput","beforeinput",null,i,pe),Ce.push({event:Jt,listeners:bt}),Jt.data=lt)),KD(Ce,t,ie,i,pe)}p1(Ce,r)})}function Iu(t,r,i){return{instance:t,listener:r,currentTarget:i}}function pf(t,r){for(var i=r+"Capture",l=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=So(t,i),f!=null&&l.unshift(Iu(t,f,m)),f=So(t,r),f!=null&&l.push(Iu(t,f,m))),t.tag===3)return l;t=t.return}return[]}function QD(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function m1(t,r,i,l,f){for(var m=r._reactName,R=[];i!==null&&i!==l;){var I=i,X=I.alternate,ie=I.stateNode;if(I=I.tag,X!==null&&X===l)break;I!==5&&I!==26&&I!==27||ie===null||(X=ie,f?(ie=So(i,m),ie!=null&&R.unshift(Iu(i,ie,X))):f||(ie=So(i,m),ie!=null&&R.push(Iu(i,ie,X)))),i=i.return}R.length!==0&&t.push({event:r,listeners:R})}var XD=/\r\n?/g,ZD=/\u0000|\uFFFD/g;function y1(t){return(typeof t=="string"?t:""+t).replace(XD,`
10
- `).replace(ZD,"")}function v1(t,r){return r=y1(r),y1(t)===r}function mn(t,r,i,l,f,m){switch(i){case"children":if(typeof l=="string")r==="body"||r==="textarea"&&l===""||Nr(t,l);else if(typeof l=="number"||typeof l=="bigint")r!=="body"&&Nr(t,""+l);else return;break;case"className":Wr(t,"class",l);break;case"tabIndex":Wr(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(t,i,l);break;case"style":ta(t,l,m);return;case"data":if(r!=="object"){Wr(t,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(i,"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"&&(i==="formAction"?(r!=="input"&&mn(t,r,"name",f.name,f,null),mn(t,r,"formEncType",f.formEncType,f,null),mn(t,r,"formMethod",f.formMethod,f,null),mn(t,r,"formTarget",f.formTarget,f,null)):(mn(t,r,"encType",f.encType,f,null),mn(t,r,"method",f.method,f,null),mn(t,r,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"onClick":l!=null&&(t.onclick=kr);return;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.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"){t.removeAttribute("xlink:href");break}i=hr(l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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"?t.setAttribute(i,l):t.removeAttribute(i);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"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":l===!0?t.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(i,l):t.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(i):t.setAttribute(i,l);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),zn(t,"popover",l);break;case"xlinkActuate":Gn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zn(t,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=eu.get(i)||i,zn(t,i,l);else return}pt=!0}function Ym(t,r,i,l,f,m){switch(i){case"style":ta(t,l,m);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"children":if(typeof l=="string")Nr(t,l);else if(typeof l=="number"||typeof l=="bigint")Nr(t,""+l);else return;break;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"onClick":l!=null&&(t.onclick=kr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!wt.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),m=i.slice(2,f?i.length-7:void 0),r=t[Mn]||null,r=r!=null?r[i]:null,typeof r=="function"&&t.removeEventListener(m,r,f),typeof l=="function")){typeof r!="function"&&r!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(m,l,f);break e}pt=!0,i in t?t[i]=l:l===!0?t.setAttribute(i,""):zn(t,i,l)}return}pt=!0}function br(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",t),Yt("load",t);var l=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var R=i[m];if(R!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,m,R,i,null)}}f&&mn(t,r,"srcSet",i.srcSet,i,null),l&&mn(t,r,"src",i.src,i,null);return;case"input":Yt("invalid",t);var I=m=R=f=null,X=null,ie=null;for(l in i)if(i.hasOwnProperty(l)){var pe=i[l];if(pe!=null)switch(l){case"name":f=pe;break;case"type":R=pe;break;case"checked":X=pe;break;case"defaultChecked":ie=pe;break;case"value":m=pe;break;case"defaultValue":I=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,r));break;default:mn(t,r,l,pe,i,null)}}Ko(t,m,I,X,ie,R,f,!1);return;case"select":Yt("invalid",t),l=R=m=null;for(f in i)if(i.hasOwnProperty(f)&&(I=i[f],I!=null))switch(f){case"value":m=I;break;case"defaultValue":R=I;break;case"multiple":l=I;default:mn(t,r,f,I,i,null)}r=m,i=R,t.multiple=!!l,r!=null?Br(t,!!l,r,!1):i!=null&&Br(t,!!l,i,!0);return;case"textarea":Yt("invalid",t),m=f=l=null;for(R in i)if(i.hasOwnProperty(R)&&(I=i[R],I!=null))switch(R){case"value":l=I;break;case"defaultValue":f=I;break;case"children":m=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(91));break;default:mn(t,r,R,I,i,null)}ea(t,l,f,m);return;case"option":for(X in i)i.hasOwnProperty(X)&&(l=i[X],l!=null)&&(X==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":mn(t,r,X,l,i,null));return;case"dialog":Yt("beforetoggle",t),Yt("toggle",t),Yt("cancel",t),Yt("close",t);break;case"iframe":case"object":Yt("load",t);break;case"video":case"audio":for(l=0;l<ju.length;l++)Yt(ju[l],t);break;case"image":Yt("error",t),Yt("load",t);break;case"details":Yt("toggle",t);break;case"embed":case"source":case"link":Yt("error",t),Yt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in i)if(i.hasOwnProperty(ie)&&(l=i[ie],l!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,ie,l,i,null)}return;default:if(Li(r)){for(pe in i)i.hasOwnProperty(pe)&&(l=i[pe],l!==void 0&&Ym(t,r,pe,l,i,void 0));return}}for(I in i)i.hasOwnProperty(I)&&(l=i[I],l!=null&&mn(t,r,I,l,i,null))}var JD={};function WD(t,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,R=null,I=null,X=null,ie=null,pe=null;for(fe in i){var Ce=i[fe];if(i.hasOwnProperty(fe)&&Ce!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":X=Ce;default:l.hasOwnProperty(fe)||mn(t,r,fe,null,l,Ce)}}for(var ae in l){var fe=l[ae];if(Ce=i[ae],l.hasOwnProperty(ae)&&(fe!=null||Ce!=null))switch(ae){case"type":fe!==Ce&&(pt=!0),m=fe;break;case"name":fe!==Ce&&(pt=!0),f=fe;break;case"checked":fe!==Ce&&(pt=!0),ie=fe;break;case"defaultChecked":fe!==Ce&&(pt=!0),pe=fe;break;case"value":fe!==Ce&&(pt=!0),R=fe;break;case"defaultValue":fe!==Ce&&(pt=!0),I=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,r));break;default:fe!==Ce&&mn(t,r,ae,fe,l,Ce)}}wr(t,R,I,X,ie,pe,m,f);return;case"select":fe=R=I=ae=null;for(m in i)if(X=i[m],i.hasOwnProperty(m)&&X!=null)switch(m){case"value":break;case"multiple":fe=X;default:l.hasOwnProperty(m)||mn(t,r,m,null,l,X)}for(f in l)if(m=l[f],X=i[f],l.hasOwnProperty(f)&&(m!=null||X!=null))switch(f){case"value":m!==X&&(pt=!0),ae=m;break;case"defaultValue":m!==X&&(pt=!0),I=m;break;case"multiple":m!==X&&(pt=!0),R=m;default:m!==X&&mn(t,r,f,m,l,X)}r=I,i=R,l=fe,ae!=null?Br(t,!!i,ae,!1):!!l!=!!i&&(r!=null?Br(t,!!i,r,!0):Br(t,!!i,i?[]:"",!1));return;case"textarea":fe=ae=null;for(I in i)if(f=i[I],i.hasOwnProperty(I)&&f!=null&&!l.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:mn(t,r,I,null,l,f)}for(R in l)if(f=l[R],m=i[R],l.hasOwnProperty(R)&&(f!=null||m!=null))switch(R){case"value":f!==m&&(pt=!0),ae=f;break;case"defaultValue":f!==m&&(pt=!0),fe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==m&&mn(t,r,R,f,l,m)}js(t,ae,fe);return;case"option":for(var Ke in i)ae=i[Ke],i.hasOwnProperty(Ke)&&ae!=null&&!l.hasOwnProperty(Ke)&&(Ke==="selected"?t.selected=!1:mn(t,r,Ke,null,l,ae));for(X in l)ae=l[X],fe=i[X],l.hasOwnProperty(X)&&ae!==fe&&(ae!=null||fe!=null)&&(X==="selected"?(ae!==fe&&(pt=!0),t.selected=ae&&typeof ae!="function"&&typeof ae!="symbol"):mn(t,r,X,ae,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 i)ae=i[rt],i.hasOwnProperty(rt)&&ae!=null&&!l.hasOwnProperty(rt)&&mn(t,r,rt,null,l,ae);for(ie in l)if(ae=l[ie],fe=i[ie],l.hasOwnProperty(ie)&&ae!==fe&&(ae!=null||fe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,r));break;default:mn(t,r,ie,ae,l,fe)}return;default:if(Li(r)){for(var kt in i)ae=i[kt],i.hasOwnProperty(kt)&&ae!==void 0&&!l.hasOwnProperty(kt)&&Ym(t,r,kt,void 0,l,ae);for(pe in l)ae=l[pe],fe=i[pe],!l.hasOwnProperty(pe)||ae===fe||ae===void 0&&fe===void 0||Ym(t,r,pe,ae,l,fe);return}}for(var oe in i)ae=i[oe],i.hasOwnProperty(oe)&&ae!=null&&!l.hasOwnProperty(oe)&&mn(t,r,oe,null,l,ae);for(Ce in l)ae=l[Ce],fe=i[Ce],!l.hasOwnProperty(Ce)||ae===fe||ae==null&&fe==null||mn(t,r,Ce,ae,l,fe)}function b1(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eN(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var f=i[l],m=f.transferSize,R=f.initiatorType,I=f.duration;if(m&&I&&b1(R)){for(R=0,I=f.responseEnd,l+=1;l<i.length;l++){var X=i[l],ie=X.startTime;if(ie>I)break;var pe=X.transferSize,Ce=X.initiatorType;pe&&b1(Ce)&&(X=X.responseEnd,R+=pe*(X<I?1:(I-ie)/(X-ie)))}if(--l,r+=8*(m+R)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Gm=null,$m=null;function Pu(t){return t.nodeType===9?t:t.ownerDocument}function x1(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function S1(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function w1(t,r,i,l){return i=Pu(i).createElement(t),i[dn]=l,i[Mn]=r,br(i,t,r),Se(i),i}function Qm(t,r){return t==="textarea"||t==="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 Xm=null;function tN(){var t=window.event;return t&&t.type==="popstate"?t===Xm?!1:(Xm=t,!0):(Xm=null,!1)}var Zm=typeof setTimeout=="function"?setTimeout:void 0,nN=typeof clearTimeout=="function"?clearTimeout:void 0,E1=typeof Promise=="function"?Promise:void 0,R1=typeof requestAnimationFrame=="function"?requestAnimationFrame:Zm,rN=typeof queueMicrotask=="function"?queueMicrotask:typeof E1<"u"?function(t){return E1.resolve(null).then(t).catch(aN)}:Zm;function aN(t){setTimeout(function(){throw t})}function hi(t){return t==="head"}function C1(t,r){var i=r,l=0;do{var f=i.nextSibling;if(t.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(l===0){t.removeChild(f),pl(r);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")o0(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,o0(i);for(var m=i.firstChild;m;){var R=m.nextSibling,I=m.nodeName;m[ga]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=R}}else i==="body"&&o0(t.ownerDocument.body);i=f}while(i);pl(r)}function T1(t,r){var i=t;t=0;do{var l=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=l}while(i)}function O1(t,r,i){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,t.style.viewTransitionName=r,i!=null&&(t.style.viewTransitionClass=i),i=getComputedStyle(t),i.display==="inline"){if(r=t.getClientRects(),r.length===1)var l=1;else for(var f=l=0;f<r.length;f++){var m=r[f];0<m.width&&0<m.height&&l++}l===1&&(t=t.style,t.display=r.length===1?"inline-block":"block",t.marginTop="-"+i.paddingTop,t.marginBottom="-"+i.paddingBottom)}}function M1(t,r){t=t.style,r=r.style;var i=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;t.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,t.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),t.display==="inline-block"&&(r==null?t.display=t.margin="":(i=r.display,t.display=i==null||typeof i=="boolean"?"":i,i=r.margin,i!=null?t.margin=i:(i=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],t.marginTop=i==null||typeof i=="boolean"?"":i,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],t.marginBottom=r==null||typeof r=="boolean"?"":r)))}function oN(t,r,i){return i=i.ownerDocument.defaultView,{rect:t,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<=t.bottom&&0<=t.right&&t.top<=i.innerHeight&&t.left<=i.innerWidth}}function Jm(t){var r=t.getBoundingClientRect(),i=getComputedStyle(t);return oN(r,i,t)}function iN(t){return t.documentElement.clientHeight}function sN(t){this.addEventListener("load",t),this.addEventListener("error",t)}function lN(t,r,i,l,f,m,R,I,X){var ie=r.nodeType===9?r:r.ownerDocument;try{var pe=ie.startViewTransition({update:function(){var ae=ie.defaultView,fe=ae.navigation&&ae.navigation.transition,Ke=ie.fonts.status;l();var rt=[];if(Ke==="loaded"&&(iN(ie),ie.fonts.status==="loading"&&rt.push(ie.fonts.ready)),Ke=rt.length,t!==null)for(var kt=t.suspenseyImages,oe=0,te=0;te<kt.length;te++){var ue=kt[te];if(!ue.complete){var Re=ue.getBoundingClientRect();if(0<Re.bottom&&0<Re.right&&Re.top<ae.innerHeight&&Re.left<ae.innerWidth){if(oe+=Q1(ue),oe>yf){rt.length=Ke;break}ue=new Promise(sN.bind(ue)),rt.push(ue)}}}if(0<rt.length)return ae=Promise.race([Promise.all(rt),new Promise(function(Je){return setTimeout(Je,500)})]).then(f,f),(fe?Promise.allSettled([fe.finished,ae]):ae).then(m,m);if(f(),fe)return fe.finished.then(m,m);m()},types:i});ie.__reactViewTransition=pe;var Ce=[];return pe.ready.then(function(){for(var ae=ie.documentElement.getAnimations({subtree:!0}),fe=0;fe<ae.length;fe++){var Ke=ae[fe],rt=Ke.effect,kt=rt.pseudoElement;if(kt!=null&&kt.startsWith("::view-transition")){Ce.push(Ke),Ke=rt.getKeyframes();for(var oe=kt=void 0,te=!0,ue=0;ue<Ke.length;ue++){var Re=Ke[ue],Je=Re.width;if(kt===void 0)kt=Je;else if(kt!==Je){te=!1;break}if(Je=Re.height,oe===void 0)oe=Je;else if(oe!==Je){te=!1;break}delete Re.width,delete Re.height,Re.transform==="none"&&delete Re.transform}te&&kt!==void 0&&oe!==void 0&&(rt.setKeyframes(Ke),te=getComputedStyle(rt.target,rt.pseudoElement),te.width!==kt||te.height!==oe)&&(te=Ke[0],te.width=kt,te.height=oe,te=Ke[Ke.length-1],te.width=kt,te.height=oe,rt.setKeyframes(Ke))}}R()},function(ae){ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null);try{typeof ae=="object"&&ae!==null&&ae.name==="InvalidStateError"&&(ae.message==="View transition was skipped because document visibility state is hidden."||ae.message==="Skipping view transition because document visibility state has become hidden."||ae.message==="Skipping view transition because viewport size changed."||ae.message==="Transition was aborted because of invalid state")&&(ae=null),ae!==null&&X(ae)}finally{l(),f(),R()}}),pe.finished.finally(function(){for(var ae=0;ae<Ce.length;ae++)Ce[ae].cancel();ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null),I()}),pe}catch{return l(),f(),R(),null}}function is(t,r){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+r+")"}is.prototype.animate=function(t,r){return r=typeof r=="number"?{duration:r}:j({},r),r.pseudoElement=this._selector,this._scope.animate(t,r)},is.prototype.getAnimations=function(){for(var t=this._scope,r=this._selector,i=t.getAnimations({subtree:!0}),l=[],f=0;f<i.length;f++){var m=i[f].effect;m!==null&&m.target===t&&m.pseudoElement===r&&l.push(i[f])}return l},is.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function A1(t){return{name:t,group:new is("group",t),imagePair:new is("image-pair",t),old:new is("old",t),new:new is("new",t)}}function ua(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}ua.prototype.addEventListener=function(t,r,i){var l=null,f=null;if(!(i!=null&&typeof i!="boolean"&&(l=i.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(N1(m,t,r,i)===-1){var R=this,I=r;i!=null&&typeof i!="boolean"&&i.once===!0&&(I=function(X){R.removeEventListener(t,r,i),typeof r=="function"?r.call(this,X):r.handleEvent(X)}),l!==null&&(f=R.removeEventListener.bind(R,t,r,i),l.addEventListener("abort",f,{once:!0}),f=l.removeEventListener.bind(l,"abort",f)),l=ll(i),m.push({type:t,listener:r,optionsOrUseCapture:i,attachedListener:I,cleanup:f}),h(this._fragmentFiber.child,!1,uN,t,I,l)}this._eventListeners=m}};function uN(t,r,i,l){return E(t).addEventListener(r,i,l),!1}ua.prototype.removeEventListener=function(t,r,i){var l=this._eventListeners;if(l!==null&&(r=N1(l,t,r,i),r!==-1)){var f=l[r];i=f.attachedListener;var m=f.cleanup;f=ll(f.optionsOrUseCapture),h(this._fragmentFiber.child,!1,cN,t,i,f),l.splice(r,1),m!==null&&m()}};function cN(t,r,i,l){return E(t).removeEventListener(r,i,l),!1}function ll(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function D1(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function N1(t,r,i,l){if(t.length===0)return-1;l=D1(l);for(var f=0;f<t.length;f++){var m=t[f];if(m.type===r&&m.listener===i&&D1(m.optionsOrUseCapture)===l)return f}return-1}ua.prototype.dispatchEvent=function(t){var r=b(this._fragmentFiber);if(r===null)return!0;r=E(r);var i=this._eventListeners;if(i!==null&&0<i.length||!t.bubbles){var l=r.nodeType===9?r.createComment(""):document.createTextNode("");if(i)for(var f=0;f<i.length;f++){var m=i[f];l.addEventListener(m.type,m.attachedListener,ll(m.optionsOrUseCapture))}if(r.appendChild(l),t=l.dispatchEvent(t),i)for(f=0;f<i.length;f++)m=i[f],l.removeEventListener(m.type,m.attachedListener,ll(m.optionsOrUseCapture));return r.removeChild(l),t}return r.dispatchEvent(t)},ua.prototype.focus=function(t){h(this._fragmentFiber.child,!0,k1,t,void 0,void 0)};function k1(t,r){return t.tag===6?!1:(t=E(t),wN(t,r))}ua.prototype.focusLast=function(t){var r=[];h(this._fragmentFiber.child,!0,Wm,r,void 0,void 0);for(var i=r.length-1;0<=i&&!k1(r[i],t);i--);};function Wm(t,r){return r.push(t),!1}ua.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=E(t),t=Pu(t).activeElement,t!==null&&h(this._fragmentFiber.child,!1,dN,t,void 0,void 0))};function dN(t,r){return t.tag===6?!1:(t=E(t),t===r||t.contains(r)?(r.blur(),!0):!1)}ua.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),h(this._fragmentFiber.child,!1,fN,t,void 0,void 0)};function fN(t,r){return t.tag===6||(t=E(t),r.observe(t)),!1}ua.prototype.unobserveUsing=function(t){var r=this._observers;if(r!==null&&r.has(t)){r.delete(t),h(this._fragmentFiber.child,!1,hN,t,void 0,void 0);for(var i=r=0;i<Ha.length;i++){var l=Ha[i];l.fragmentInstance===this&&l.observer===t?t.unobserve(l.instance):Ha[r++]=l}Ha.length=r}};function hN(t,r){return t.tag===6||(t=E(t),r.unobserve(t)),!1}var Ha=[],e0=!1;function pN(t,r,i){Ha.push({fragmentInstance:t,observer:r,instance:i}),e0||(e0=!0,EN(function(){e0=!1;var l=Ha;Ha=[];for(var f=0;f<l.length;f++){var m=l[f];m.observer.unobserve(m.instance)}}))}ua.prototype.getClientRects=function(){var t=[];return h(this._fragmentFiber.child,!1,gN,t,void 0,void 0),t};function gN(t,r){if(t.tag===6){t=t.stateNode;var i=t.ownerDocument.createRange();i.selectNodeContents(t),r.push.apply(r,i.getClientRects())}else t=E(t),r.push.apply(r,t.getClientRects());return!1}ua.prototype.getRootNode=function(t){var r=b(this._fragmentFiber);return r===null?this:E(r).getRootNode(t)},ua.prototype.compareDocumentPosition=function(t){var r=b(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];h(this._fragmentFiber.child,!1,Wm,i,void 0,void 0);var l=E(r);if(i.length===0){if(i=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&&(i=r)}r=this._fragmentFiber;var f=l=i.compareDocumentPosition(t);return i===t?f=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=w(r)[1],i===null?f=Node.DOCUMENT_POSITION_PRECEDING:(t=E(i).compareDocumentPosition(t),f=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=E(i[0]),f=E(i[i.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(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var R=r.compareDocumentPosition(t),I=f.compareDocumentPosition(t),X=R&Node.DOCUMENT_POSITION_CONTAINED_BY||I&Node.DOCUMENT_POSITION_CONTAINED_BY;return I=l&&m&&R&Node.DOCUMENT_POSITION_FOLLOWING&&I&Node.DOCUMENT_POSITION_PRECEDING,r=l&&r===t||m&&f===t||X||I?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&r===t||!m&&f===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:R,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||mN(r,this._fragmentFiber,i[0],i[i.length-1],t)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function mN(t,r,i,l,f){var m=Fn(f);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){i=!0;break e}m=m.return}i=!1}return i}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=f.ownerDocument,f===m||f===m.documentElement||f===m.body;e:{for(m=r,r=b(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 t&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===i)&&(r=P(i,m,N),r===null?r=!1:(h(r,!0,M,m,i),m=T,T=null,r=m!==null)),r):t&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===l)&&(r=P(l,m,N),r===null?r=!1:(h(r,!0,A,m,l),m=T,O=T=null,r=m!==null)),r):!1}function j1(t,r){var i=t.ownerDocument.createRange();i.selectNodeContents(t),t=i.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,r?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}ua.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(o(566));var r=[];h(this._fragmentFiber.child,!1,Wm,r,void 0,void 0);var i=t!==!1;if(r.length===0){var l=w(this._fragmentFiber);if(l=i?l[1]||l[0]||b(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){t=E(l),j1(t,i);return}if(l=E(l),l.nodeType!==9){if(l.nodeType===11){i="host"in l?l.host:null,i!==null&&i.scrollIntoView(t);return}l.scrollIntoView(t)}}for(l=i?r.length-1:0;l!==(i?-1:r.length);){var f=r[l];f.tag===6?(f=E(f),j1(f,i)):E(f).scrollIntoView(t),l+=i?-1:1}};function yN(t,r){return t=E(t),I1(t,r),!1}function I1(t,r){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(r)}function P1(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.addEventListener(f.type,f.attachedListener,ll(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){for(var R=0,I=0;I<Ha.length;I++){var X=Ha[I];(X.fragmentInstance!==r||X.observer!==m||X.instance!==t)&&(Ha[R++]=X)}Ha.length=R,m.observe(t)}),I1(t,r))}function vN(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.removeEventListener(f.type,f.attachedListener,ll(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){typeof m.rootMargin=="string"?pN(r,m,t):m.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(r))}function t0(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":t0(i),Kn(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function bN(t,r,i,l){for(;t.nodeType===1;){var f=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[ga])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Ea(t.nextSibling),t===null)break}return null}function xN(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Ea(t.nextSibling),t===null))return null;return t}function L1(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Ea(t.nextSibling),t===null))return null;return t}function n0(t){return t.data==="$?"||t.data==="$~"}function r0(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function SN(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Ea(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var a0=null;function z1(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return Ea(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function _1(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function wN(t,r){function i(){l=!0}if(t.ownerDocument.activeElement===t)return!0;var l=!1;try{t.ownerDocument.addEventListener("focus",i,!0),(t.focus||HTMLElement.prototype.focus).call(t,r)}finally{t.ownerDocument.removeEventListener("focus",i,!0)}return l}function EN(t){R1(function(){R1(function(r){return t(r)})})}function U1(t,r,i){switch(r=Pu(i),t){case"html":if(t=r.documentElement,!t)throw Error(o(452));return t;case"head":if(t=r.head,!t)throw Error(o(453));return t;case"body":if(t=r.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function H1(t,r,i){for(var l in i){var f=i[l];i.hasOwnProperty(l)&&f!=null&&mn(t,r,l,null,JD,f)}i.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===kr&&(t.onclick=null),Kn(t)}function o0(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Kn(t)}var Ra=new Map,F1=new Set;function Lu(t){if(typeof t.getRootNode=="function"){var r=t.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return t.nodeType===9?t:t.ownerDocument}var jo=ce.d;ce.d={f:RN,r:CN,D:TN,C:ON,L:MN,m:AN,X:NN,S:DN,M:kN};function RN(){var t=jo.f(),r=lf();return t||r}function CN(t){var r=fr(t);r!==null&&r.tag===5&&r.type==="form"?Vx(r):jo.r(t)}var ul=typeof document>"u"?null:document;function B1(t,r,i){var l=ul;if(l&&typeof r=="string"&&r){var f=Nn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),F1.has(f)||(F1.add(f),t={rel:t,crossOrigin:i,href:r},l.querySelector(f)===null&&(r=l.createElement("link"),br(r,"link",t),Se(r),l.head.appendChild(r)))}}function TN(t){jo.D(t),B1("dns-prefetch",t,null)}function ON(t,r){jo.C(t,r),B1("preconnect",t,r)}function MN(t,r,i){jo.L(t,r,i);var l=ul;if(l&&t&&r){var f='link[rel="preload"][as="'+Nn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Nn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Nn(i.imageSizes)+'"]')):f+='[href="'+Nn(t)+'"]';var m=f;switch(r){case"style":m=cl(t);break;case"script":m=dl(t)}if(!(Ra.has(m)||(t=j({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),Ra.set(m,t),l.querySelector(f)!==null||r==="style"&&l.querySelector(zu(m))||r==="script"&&l.querySelector(_u(m))))){var R=l.createElement("link");br(R,"link",t),r==="style"&&(R[Pt]=!0,R.onload=R.onerror=function(){nt(R)}),Se(R),l.head.appendChild(R)}}}function AN(t,r){jo.m(t,r);var i=ul;if(i&&t){var l=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+Nn(l)+'"][href="'+Nn(t)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=dl(t)}if(!Ra.has(m)&&(t=j({rel:"modulepreload",href:t},r),Ra.set(m,t),i.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(_u(m)))return}l=i.createElement("link"),br(l,"link",t),Se(l),i.head.appendChild(l)}}}function DN(t,r,i){jo.S(t,r,i);var l=ul;if(l&&t){var f=Ae(l).hoistableStyles,m=cl(t);r=r||"default";var R=f.get(m);if(!R){var I={loading:0,preload:null};if(R=l.querySelector(zu(m)))I.loading=5;else{t=j({rel:"stylesheet",href:t,"data-precedence":r},i),(i=Ra.get(m))&&i0(t,i);var X=R=l.createElement("link");Se(X),br(X,"link",t),X._p=new Promise(function(ie,pe){X.onload=ie,X.onerror=pe}),X.addEventListener("load",function(){I.loading|=1}),X.addEventListener("error",function(){I.loading|=2}),I.loading|=4,gf(R,r,l)}R={type:"stylesheet",instance:R,count:1,state:I},f.set(m,R)}}}function NN(t,r){jo.X(t,r);var i=ul;if(i&&t){var l=Ae(i).hoistableScripts,f=dl(t),m=l.get(f);m||(m=i.querySelector(_u(f)),m||(t=j({src:t,async:!0},r),(r=Ra.get(f))&&s0(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function kN(t,r){jo.M(t,r);var i=ul;if(i&&t){var l=Ae(i).hoistableScripts,f=dl(t),m=l.get(f);m||(m=i.querySelector(_u(f)),m||(t=j({src:t,async:!0,type:"module"},r),(r=Ra.get(f))&&s0(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function V1(t,r,i,l){var f=(f=be.current)?Lu(f):null;if(!f)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=cl(i.href),r=Ae(f).hoistableStyles,l=r.get(i),l||(l={type:"style",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=cl(i.href);var m=Ae(f).hoistableStyles,R=m.get(t);if(R||(f=f.ownerDocument||f,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,R),(m=f.querySelector(zu(t)))?m._p||(R.instance=m,R.state.loading=5):(m=Ra.get(t),m||(m={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ra.set(t,m)),jN(f,t,m,R.state))),r&&l===null)throw Error(o(528,""));return R}if(r&&l!==null)throw Error(o(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(i=dl(i),r=Ae(f).hoistableScripts,l=r.get(i),l||(l={type:"script",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function cl(t){return'href="'+Nn(t)+'"'}function zu(t){return'link[rel="stylesheet"]['+t+"]"}function q1(t){return j({},t,{"data-precedence":t.precedence,precedence:null})}function jN(t,r,i,l){if(r=t.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[Pt]!==!0){l.loading=1;return}}else r=t.createElement("link"),r[Pt]=!0,r.onload=r.onerror=nt.bind(null,r),br(r,"link",i),Se(r),t.head.appendChild(r);l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2})}function dl(t){return'[src="'+Nn(t)+'"]'}function _u(t){return"script[async]"+t}function K1(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=t.querySelector('style[data-href~="'+Nn(i.href)+'"]');if(l)return r.instance=l,Se(l),l;var f=j({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Se(l),br(l,"style",f),gf(l,i.precedence,t),r.instance=l;case"stylesheet":f=cl(i.href);var m=t.querySelector(zu(f));if(m)return r.state.loading|=4,r.instance=m,Se(m),m;l=q1(i),(f=Ra.get(f))&&i0(l,f),m=(t.ownerDocument||t).createElement("link"),Se(m);var R=m;return R._p=new Promise(function(I,X){R.onload=I,R.onerror=X}),br(m,"link",l),r.state.loading|=4,gf(m,i.precedence,t),r.instance=m;case"script":return m=dl(i.src),(f=t.querySelector(_u(m)))?(r.instance=f,Se(f),f):(l=i,(f=Ra.get(m))&&(l=j({},i),s0(l,f)),t=t.ownerDocument||t,f=t.createElement("script"),Se(f),br(f,"link",l),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(o(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,gf(l,i.precedence,t));return r.instance}function gf(t,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,R=0;R<l.length;R++){var I=l[R];if(I.dataset.precedence===r)m=I;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function i0(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function s0(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var mf=null;function Y1(t,r,i){if(mf===null){var l=new Map,f=mf=new Map;f.set(i,l)}else f=mf,l=f.get(i),l||(l=new Map,f.set(i,l));if(l.has(t))return l;for(l.set(t,null),i=i.getElementsByTagName(t),f=0;f<i.length;f++){var m=i[f];if(!(m[ga]||m[dn]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var R=m.getAttribute(r)||"";R=t+R;var I=l.get(R);I?I.push(m):l.set(R,[m])}}return l}function l0(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function IN(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){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"?(t=r.disabled,typeof r.precedence=="string"&&t==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 G1(t,r){return t==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function $1(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Q1(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function X1(t,r){typeof r.decode=="function"&&(t.imgCount++,r.complete||(t.imgBytes+=Q1(r),t.suspenseyImages.push(r)),t=zN.bind(t),r.decode().then(t,t))}function PN(t,r,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=cl(l.href),m=r.querySelector(zu(f));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Uu.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=m,Se(m);return}m=r.ownerDocument||r,l=q1(l),(f=Ra.get(f))&&i0(l,f),m=m.createElement("link"),Se(m);var R=m;R._p=new Promise(function(I,X){R.onload=I,R.onerror=X}),br(m,"link",l),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=Uu.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var yf=0;function LN(t,r){return t.stylesheets&&t.count===0&&bf(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var l=setTimeout(function(){if(t.stylesheets&&bf(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&yf===0&&(yf=62500*eN());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&bf(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>yf?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function Z1(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)bf(t,t.stylesheets);else if(t.unsuspend){var r=t.unsuspend;t.unsuspend=null,r()}}}function Uu(){this.count--,Z1(this)}function zN(){this.imgCount--,Z1(this)}var vf=null;function bf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,vf=new Map,r.forEach(_N,t),vf=null,Uu.call(t))}function _N(t,r){if(!(r.state.loading&4)){var i=vf.get(t);if(i)var l=i.get(null);else{i=new Map,vf.set(t,i);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var R=f[m];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(i.set(R.dataset.precedence,R),l=R)}l&&i.set(null,l)}f=r.instance,R=f.getAttribute("data-precedence"),m=i.get(R)||l,m===l&&i.set(null,f),i.set(R,f),this.count++,l=Uu.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var fl={$$typeof:U,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function UN(t,r,i,l,f,m,R,I,X){this.tag=1,this.containerInfo=t,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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.transitionTypes=null,this.incompleteTransitions=new Map}function J1(t,r,i,l,f,m,R,I,X,ie,pe,Ce){return t=new UN(t,r,i,R,X,ie,pe,Ce,I),r=1,m===!0&&(r|=24),m=Vr(3,null,null,r),t.current=m,m.stateNode=t,r=Eg(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:l,isDehydrated:i,cache:r},Og(m),t}function W1(t){return t?(t=_s,t):_s}function eS(t,r,i,l,f,m){f=W1(f),l.context===null?l.context=f:l.pendingContext=f,l=ti(r),l.payload={element:i},m=m===void 0?null:m,m!==null&&(l.callback=m),i=ni(t,l,r),i!==null&&(Gr(i,t,r),mu(i,t,r))}function tS(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function u0(t,r){tS(t,r),(t=t.alternate)&&tS(t,r)}function nS(t){if(t.tag===13||t.tag===31){var r=Vi(t,67108864);r!==null&&Gr(r,t,67108864),u0(t,67108864)}}function rS(t){if(t.tag===13||t.tag===31){var r=la();r=Ht(r);var i=Vi(t,r);i!==null&&Gr(i,t,r),u0(t,r)}}var hl=!0;function HN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=2,c0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function FN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=8,c0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function c0(t,r,i,l){if(hl){var f=d0(l);if(f===null)Km(t,r,l,xf,i),oS(t,l);else if(VN(f,t,r,i,l))l.stopPropagation();else if(oS(t,l),r&4&&-1<BN.indexOf(t)){for(;f!==null;){var m=fr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var R=qe(m.pendingLanes);if(R!==0){var I=m;for(I.pendingLanes|=2,I.entangledLanes|=2;R;){var X=1<<31-et(R);I.entanglements[1]|=X,R&=~X}ro(m),(ln&6)===0&&(af=xt()+500,ku(0))}}break;case 31:case 13:I=Vi(m,2),I!==null&&Gr(I,m,2),lf(),u0(m,2)}if(m=d0(l),m===null&&Km(t,r,l,xf,i),m===f)break;f=m}f!==null&&l.stopPropagation()}else Km(t,r,l,null,i)}}function d0(t){return t=_i(t),f0(t)}var xf=null;function f0(t){if(xf=null,t=Fn(t),t!==null){var r=u(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=c(r),t!==null)return t;t=null}else if(i===31){if(t=d(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return xf=t,null}function aS(t){switch(t){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 ft:return 2;case vt:return 8;case gt:case zt:return 32;case un:return 268435456;default:return 32}default:return 32}}var h0=!1,pi=null,gi=null,mi=null,Hu=new Map,Fu=new Map,yi=[],BN="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 oS(t,r){switch(t){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":Hu.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fu.delete(r.pointerId)}}function Bu(t,r,i,l,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},r!==null&&(r=fr(r),r!==null&&nS(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function VN(t,r,i,l,f){switch(r){case"focusin":return pi=Bu(pi,t,r,i,l,f),!0;case"dragenter":return gi=Bu(gi,t,r,i,l,f),!0;case"mouseover":return mi=Bu(mi,t,r,i,l,f),!0;case"pointerover":var m=f.pointerId;return Hu.set(m,Bu(Hu.get(m)||null,t,r,i,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Fu.set(m,Bu(Fu.get(m)||null,t,r,i,l,f)),!0}return!1}function iS(t){var r=Fn(t.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){t.blockedOn=r,Zr(t.priority,function(){rS(i)});return}}else if(r===31){if(r=d(i),r!==null){t.blockedOn=r,Zr(t.priority,function(){rS(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Sf(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=d0(t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);zi=l,i.target.dispatchEvent(l),zi=null}else return r=fr(i),r!==null&&nS(r),t.blockedOn=i,!1;r.shift()}return!0}function sS(t,r,i){Sf(t)&&i.delete(r)}function qN(){h0=!1,pi!==null&&Sf(pi)&&(pi=null),gi!==null&&Sf(gi)&&(gi=null),mi!==null&&Sf(mi)&&(mi=null),Hu.forEach(sS),Fu.forEach(sS)}function wf(t,r){t.blockedOn===r&&(t.blockedOn=null,h0||(h0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,qN)))}var Ef=null;function lS(t){Ef!==t&&(Ef=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ef===t&&(Ef=null);for(var r=0;r<t.length;r+=3){var i=t[r],l=t[r+1],f=t[r+2];if(typeof l!="function"){if(f0(l||i)===null)continue;break}var m=fr(i);m!==null&&(t.splice(r,3),r-=3,$g(m,{pending:!0,data:f,method:i.method,action:l},l,f))}}))}function pl(t){function r(X){return wf(X,t)}pi!==null&&wf(pi,t),gi!==null&&wf(gi,t),mi!==null&&wf(mi,t),Hu.forEach(r),Fu.forEach(r);for(var i=0;i<yi.length;i++){var l=yi[i];l.blockedOn===t&&(l.blockedOn=null)}for(;0<yi.length&&(i=yi[0],i.blockedOn===null);)iS(i),i.blockedOn===null&&yi.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var f=i[l],m=i[l+1],R=f[Mn]||null;if(typeof m=="function")R||lS(i);else if(R){var I=null;if(m&&m.hasAttribute("formAction")){if(f=m,R=m[Mn]||null)I=R.formAction;else if(f0(f)!==null)continue}else I=R.action;typeof I=="function"?i[l+1]=I:(i.splice(l,3),l-=3),lS(i)}}}function uS(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(R){return f=R})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),l||setTimeout(i,20)}function i(){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,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function p0(t){this._internalRoot=t}Rf.prototype.render=p0.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));var i=r.current,l=la();eS(i,l,t,r,null,null)},Rf.prototype.unmount=p0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;eS(t.current,2,null,t,null,null),lf(),r[jn]=null}};function Rf(t){this._internalRoot=t}Rf.prototype.unstable_scheduleHydration=function(t){if(t){var r=Cn();t={blockedOn:null,target:t,priority:r};for(var i=0;i<yi.length&&r!==0&&r<yi[i].priority;i++);yi.splice(i,0,t),i===0&&iS(t)}};var cS=n.version;if(cS!=="19.3.1")throw Error(o(527,cS,"19.3.1"));ce.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=g(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var KN={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cf.isDisabled&&Cf.supportsFiber)try{Ie=Cf.inject(KN),ze=Cf}catch{}}return qu.createRoot=function(t,r){if(!s(t))throw Error(o(299));var i=!1,l="",f=Wx,m=e2,R=t2;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(R=r.onRecoverableError)),r=J1(t,1,!1,null,null,i,l,null,f,m,R,uS),t[jn]=r.current,qm(t),new p0(r)},qu.hydrateRoot=function(t,r,i){if(!s(t))throw Error(o(299));var l=!1,f="",m=Wx,R=e2,I=t2,X=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(R=i.onCaughtError),i.onRecoverableError!==void 0&&(I=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),r=J1(t,1,!0,r,i??null,l,f,X,m,R,I,uS),r.context=W1(null),i=r.current,l=la(),l=Ht(l),f=ti(l),f.callback=null,ni(i,f,l),i=l,r.current.lanes=i,ct(r,i),ro(r),t[jn]=r.current,qm(t),new Rf(r)},qu.version="19.3.1",qu}var xS;function t4(){if(xS)return y0.exports;xS=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(n){console.error(n)}}return e(),y0.exports=e4(),y0.exports}var n4=t4();const SS={};function er(e,n){const a=v.useRef(SS);return a.current===SS&&(a.current=e(n)),a}const W0=[];let ey;function r4(){return ey}function a4(e){W0.push(e)}function Tc(e){const n=(a,o)=>{const s=er(o4).current;let u;try{ey=s;for(const c of W0)c.before(s);u=e(a,o);for(const c of W0)c.after(s);s.didInitialize=!0}finally{ey=void 0}return u};return n.displayName=e.displayName||e.name,n}function XE(e){return v.forwardRef(Tc(e))}function o4(){return{didInitialize:!1}}function Sn(){}const fo=Object.freeze([]),$t=Object.freeze({}),i4=()=>{},_e=typeof document<"u"?v.useLayoutEffect:i4;function s4(e,n){return function(o,...s){const u=new URL(e);return u.searchParams.set("code",o.toString()),s.forEach(c=>u.searchParams.append("args[]",c)),`${n} error #${o}; visit ${u} for the full message.`}}const En=s4("https://base-ui.com/production-error","Base UI"),ZE=v.createContext(void 0);function Oc(e){const n=v.useContext(ZE);if(n===void 0&&!e)throw new Error(En(72));return n}function Fy(e){v.useEffect(e,fo)}const Ku=0;class Da{static create(){return new Da}currentId=Ku;start(n,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ku,a()},n)}isStarted(){return this.currentId!==Ku}clear=()=>{this.currentId!==Ku&&(clearTimeout(this.currentId),this.currentId=Ku)};disposeEffect=()=>this.clear}function Un(){const e=er(Da.create).current;return Fy(e.disposeEffect),e}function l4(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:u4,platform:c4,maxTouchPoints:d4}=l4(),Kh=u4.toLowerCase(),fc=c4.toLowerCase(),Yh=/^i(os$|p)/.test(fc)||fc==="macintel"&&d4>1,wS="android",ty=fc===wS||Kh.includes(wS),By=!Yh&&fc.startsWith("mac");fc.startsWith("win");const f4=By||Yh,ho=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ho&&Kh.includes("firefox");!ho&&Kh.includes("chrom");const h4=f4,Vy=/jsdom|happydom/.test(Kh);function Ba(e){e.preventDefault(),e.stopPropagation()}function p4(e){return"nativeEvent"in e}function Il(e){return e.pointerType===""&&e.isTrusted?!0:ty&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function qy(e){return Vy?!1:!ty&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(ty||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ci(e,n){const a=["mouse","pen"];return n||a.push("",void 0),a.includes(e)}function g4(e){const n=e.type;return n==="click"||n==="mousedown"||n==="keydown"||n==="keyup"}function Gh(){return typeof window<"u"}function Sr(e){return Ky(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Bo(e){var n;return(n=(Ky(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Ky(e){return Gh()?e instanceof Node||e instanceof wn(e).Node:!1}function sn(e){return Gh()?e instanceof Element||e instanceof wn(e).Element:!1}function yn(e){return Gh()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function ys(e){return!Gh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Mc(e){const{overflow:n,overflowX:a,overflowY:o,display:s}=ha(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+a)&&s!=="inline"&&s!=="contents"}function m4(e){return/^(table|td|th)$/.test(Sr(e))}function $h(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const y4=/transform|translate|scale|rotate|perspective|filter/,v4=/paint|layout|strict|content/,ss=e=>!!e&&e!=="none";let S0;function Yy(e){const n=sn(e)?ha(e):e;return ss(n.transform)||ss(n.translate)||ss(n.scale)||ss(n.rotate)||ss(n.perspective)||!Gy()&&(ss(n.backdropFilter)||ss(n.filter))||y4.test(n.willChange||"")||v4.test(n.contain||"")}function b4(e){let n=Fo(e);for(;yn(n)&&!_o(n);){if(Yy(n))return n;if($h(n))return null;n=Fo(n)}return null}function Gy(){return S0==null&&(S0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),S0}function _o(e){return/^(html|body|#document)$/.test(Sr(e))}function ha(e){return wn(e).getComputedStyle(e)}function Qh(e){return sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fo(e){if(Sr(e)==="html")return e;const n=e.assignedSlot||e.parentNode||ys(e)&&e.host||Bo(e);return ys(n)?n.host:n}function JE(e){const n=Fo(e);return _o(n)?(e.ownerDocument||e).body:yn(n)&&Mc(n)?n:JE(n)}function hc(e,n,a){var o;n===void 0&&(n=[]),a===void 0&&(a=!0);const s=JE(e),u=s===((o=e.ownerDocument)==null?void 0:o.body),c=wn(s);if(u){const d=ny(c);return n.concat(c,c.visualViewport||[],Mc(s)?s:[],d&&a?hc(d):[])}else return n.concat(s,hc(s,[],a))}function ny(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qr(e){let n=e.activeElement;for(;n?.shadowRoot?.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function at(e,n){if(!e||!n)return!1;const a=n.getRootNode?.();if(e.contains(n))return!0;if(a&&ys(a)){let o=n;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function pc(e,n){let a=e;for(;a;){if(sn(a)&&a.matches(n))return a;a=a.assignedSlot??a.parentNode??(ys(a)?a.host:null)}return null}function tr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const ry="data-base-ui-focusable",WE="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Xh="ArrowLeft",Zh="ArrowRight",eR="ArrowUp",$y="ArrowDown",Qy="data-starting-style",x4="data-ending-style",S4={[Qy]:""},w4={[x4]:""},po={transitionStatus(e){return e==="starting"?S4:e==="ending"?w4:null}},E4="data-open",R4="data-closed",C4="data-anchor-hidden",tR="data-popup-open",T4="data-pressed",O4={[tR]:""},M4={[tR]:"",[T4]:""},A4={[E4]:""},D4={[R4]:""},N4={[C4]:""},nR={open(e){return e?O4:null}},ph={open(e){return e?M4:null}},Ac={open(e){return e?A4:D4},anchorHidden(e){return e?N4:null}},Jh={...Ac,...po},ay="data-trigger-disabled";function gh(e,n){if(!sn(e))return!1;const a=e;if(n.hasElement(a))return!a.hasAttribute(ay);for(const[,o]of n.entries())if(at(o,a))return!o.hasAttribute(ay);return!1}function w0(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const a=e;return a.target!=null&&n.contains(a.target)}function k4(e){return e.matches("html,body")}function Dc(e){return yn(e)&&e.matches(WE)}function j4(e){return pc(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${WE}`)!=null}function oy(e){return e?e.getAttribute("role")==="combobox"&&Dc(e):!1}function I4(e){if(!e||Vy)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function mh(e){return e?e.hasAttribute(ry)?e:e.querySelector(`[${ry}]`)||e:null}function P4(e,n){return n!=null&&!Ci(n)?0:typeof e=="function"?e():e}function vs(e,n,a){const o=P4(e,a);return typeof o=="number"?o:o?.[n]}function ES(e){return typeof e=="function"?e():e}function rR(e,n){return n||e==="click"||e==="mousedown"}function L4(e){return e?.includes("mouse")&&e!=="mousedown"}function dt(e,n,a,o){let s=!1,u=!1;const c=o??$t;return{reason:e,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){u=!0},get isCanceled(){return s},get isPropagationAllowed(){return u},trigger:a,...c}}function z4(e,n,a){const o=a??$t;return{reason:e,event:n??new Event("base-ui"),...o}}const Hr="none",qa="trigger-press",qn="trigger-hover",El="trigger-focus",Wh="outside-press",ps="item-press",aR="close-press",Ti="focus-out",Nc="escape-key",yh="list-navigation",oR="keyboard",_4="pointer",Xy="cancel-open",Ju="sibling-open",U4="disabled",kc="imperative-action",H4="window-resize",iR=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Da,currentIdRef:{current:null},currentContextRef:{current:null}});function F4(e,n){e.current=n.current}function B4(e){const{children:n,delay:a,timeoutMs:o=0}=e,s=v.useRef(a),u=v.useRef(a),c=v.useRef(null),d=v.useRef(null),p=Un();return _e(()=>{if(u.current=a,!c.current){s.current=a;return}s.current={open:vs(s.current,"open"),close:vs(a,"close")}},[a,c,s,u]),x.jsx(iR.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:s,initialDelayRef:u,currentIdRef:c,timeoutMs:o,currentContextRef:d,timeout:p}),[o,p]),children:n})}function V4(e,n={open:!1}){const{open:a}=n,o=e.useState("floatingId"),s=v.useContext(iR),{currentIdRef:u,delayRef:c,timeoutMs:d,initialDelayRef:p,currentContextRef:g,hasProvider:y,timeout:h}=s,[b,S]=v.useState(!1),w=v.useRef(a);return _e(()=>{w.current=a},[a]),_e(()=>{function C(){g.current?.setIsInstantPhase(!1),u.current=null,g.current=null,c.current=p.current,h.clear()}if(u.current&&!a&&u.current===o){if(S(!1),d){const E=o;return h.start(d,()=>{e.select("open")||u.current&&u.current!==E||C()}),()=>{(w.current||u.current!==E)&&h.clear()}}C()}},[a,o,u,c,d,p,g,h,e]),_e(()=>{if(!a)return;const C=g.current,E=u.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:S},u.current=o,c.current={open:0,close:vs(p.current,"close")},E!==null&&E!==o?(S(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,dt(Hr))):(S(!1),C?.setIsInstantPhase(!1))},[a,o,e,u,c,p,g,h]),_e(()=>()=>{if(u.current===o){if(g.current=null,!w.current)return;u.current=null,F4(c,p),h.clear()}},[g,u,c,o,p,h]),v.useMemo(()=>({activeIdRef:u,hasProvider:y,delayRef:c,isInstantPhase:b}),[u,y,c,b])}function jt(e,n,a,o){return e.addEventListener(n,a,o),()=>{e.removeEventListener(n,a,o)}}function uo(...e){return()=>{for(let n=0;n<e.length;n+=1){const a=e[n];a&&a()}}}function Xr(e,n,a,o){const s=er(sR).current;return K4(s,e,n,a,o)&&lR(s,[e,n,a,o]),s.callback}function q4(e){const n=er(sR).current;return Y4(n,e)&&lR(n,e),n.callback}function sR(){return{callback:null,cleanup:null,refs:[]}}function K4(e,n,a,o,s){return e.refs[0]!==n||e.refs[1]!==a||e.refs[2]!==o||e.refs[3]!==s}function Y4(e,n){return e.refs.length!==n.length||e.refs.some((a,o)=>a!==n[o])}function lR(e,n){if(e.refs=n,n.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const o=Array(n.length).fill(null);for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=u(a);typeof c=="function"&&(o[s]=c);break}case"object":{u.current=a;break}}}e.cleanup=()=>{for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=o[s];typeof c=="function"?c():u(null);break}case"object":{u.current=null;break}}}}}}}function Ln(e){const n=er(G4,e).current;return n.next=e,_e(n.effect),n}function G4(e){const n={current:e,next:e,effect:()=>{n.current=n.next}};return n}const Zy={...$E},E0=Zy.useInsertionEffect,$4=E0&&E0!==Zy.useLayoutEffect?E0:e=>e();function Be(e){const n=er(Q4).current;return n.next=e,$4(n.effect),n.trampoline}function Q4(){const e={next:void 0,callback:X4,trampoline:(...n)=>e.callback?.(...n),effect:()=>{e.callback=e.next}};return e}function X4(){}const Tf=null;class Z4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=n=>{this.isScheduled=!1;const a=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let s=0;s<a.length;s+=1)a[s]?.(n)};request(n){const a=this.nextId;return this.nextId+=1,this.callbacks.push(n),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(n){const a=n-this.startId;a<0||a>=this.callbacks.length||this.callbacks[a]!==null&&(this.callbacks[a]=null,this.callbacksCount-=1)}}let Of=new Z4;class Cr{static create(){return new Cr}static request(n){return Of.request(n)}static cancel(n){return Of.cancel(n)}currentId=Tf;request(n){this.cancel(),this.currentId=Of.request(()=>{this.currentId=Tf,n()})}cancel=()=>{this.currentId!==Tf&&(Of.cancel(this.currentId),this.currentId=Tf)};disposeEffect=()=>this.cancel}function Pl(){const e=er(Cr.create).current;return Fy(e.disposeEffect),e}function Gt(e){return e?.ownerDocument||document}const uR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},jc={...uR,position:"fixed",margin:0,top:0,left:0},ep={...uR,position:"absolute"},Ll=v.forwardRef(function(n,a){const[o,s]=v.useState();_e(()=>{h4&&ho&&s("button")},[]);const u={tabIndex:0,role:o};return x.jsx("span",{...n,ref:a,style:jc,"aria-hidden":o?void 0:!0,...u,"data-base-ui-focus-guard":""})}),zl=Math.min,Uo=Math.max,vh=Math.round,Mf=Math.floor,Ho=e=>({x:e,y:e}),J4={left:"right",right:"left",bottom:"top",top:"bottom"};function cR(e,n,a){return Uo(e,zl(n,a))}function Oi(e,n){return typeof e=="function"?e(n):e}function da(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function Jy(e){return e==="x"?"y":"x"}function Wy(e){return e==="y"?"height":"width"}function Ma(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function ev(e){return Jy(Ma(e))}function W4(e,n,a){a===void 0&&(a=!1);const o=co(e),s=ev(e),u=Wy(s);let c=s==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(c=bh(c)),[c,bh(c)]}function ek(e){const n=bh(e);return[iy(e),n,iy(n)]}function iy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const RS=["left","right"],CS=["right","left"],tk=["top","bottom"],nk=["bottom","top"];function rk(e,n,a){switch(e){case"top":case"bottom":return a?n?CS:RS:n?RS:CS;case"left":case"right":return n?tk:nk;default:return[]}}function ak(e,n,a,o){const s=co(e);let u=rk(da(e),a==="start",o);return s&&(u=u.map(c=>c+"-"+s),n&&(u=u.concat(u.map(iy)))),u}function bh(e){const n=da(e);return J4[n]+e.slice(n.length)}function ok(e){var n,a,o,s;return{top:(n=e.top)!=null?n:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(s=e.left)!=null?s:0}}function dR(e){return typeof e!="number"?ok(e):{top:e,right:e,bottom:e,left:e}}function gc(e){const{x:n,y:a,width:o,height:s}=e;return{width:o,height:s,top:a,left:n,right:n+o,bottom:a+s,x:n,y:a}}function Rl(e,n){return n<0||n>=e.length}function Wf(e,n){return Cl(e.current,{disabledIndices:n})}function sy(e,n){return Cl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:n})}function ik(e,n,a){const{decrement:o,loopFocus:s,allowEscape:u,disabledIndices:c,minIndex:d,maxIndex:p}=a,g=()=>Cl(e,{startingIndex:n,decrement:o,disabledIndices:c});let y,h=!1;if(!s)y=o?Math.max(d,g()):Math.min(p,g());else if(o?n<=d:n>=p){const b=o?-1:e.length;u&&n!==b?y=-1:(y=o?p:d,h=!0)}else y=g();return{index:Rl(e,y)?-1:y,wrapped:h}}function Cl(e,{startingIndex:n=-1,decrement:a=!1,disabledIndices:o,amount:s=1}={}){let u=n;do u+=a?-s:s;while(u>=0&&u<=e.length-1&&Tl(e,u,o));return u}function Tl(e,n,a){if(typeof a=="function"?a(n):a?.includes(n)??!1)return!0;const s=e[n];return s?!tp(s)||s.matches(":disabled")?!0:!a&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!1}function sk(e){return e.visibility==="hidden"||e.visibility==="collapse"}function tp(e,n=e?ha(e):null){return!e||!e.isConnected||!n||sk(n)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():n.display!=="none"&&n.display!=="contents"}const lk='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function uk(e){const n=e.assignedSlot;if(n)return n;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return ys(a)?a.host:null}function ly(e){for(const n of Array.from(e.children))if(Sr(n)==="summary")return n;return null}function ck(e,n){const a=ly(n);return!!a&&(e===a||at(a,e))}function fR(e){const n=e?Sr(e):"";return e!=null&&e.matches(lk)&&(n!=="summary"||e.parentElement!=null&&Sr(e.parentElement)==="details"&&ly(e.parentElement)===e)&&(n!=="details"||ly(e)==null)&&(n!=="input"||e.type!=="hidden")}function tv(e){if(!fR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let n=e;n;n=uk(n)){const a=n!==e,o=Sr(n)==="slot";if(n.hasAttribute("inert")||a&&Sr(n)==="details"&&!n.open&&!ck(e,n)||n.hasAttribute("hidden")||!o&&!dk(n,a))return!1}return!0}function dk(e,n){const a=ha(e);return n?a.display!=="none":tp(e,a)}function hR(e){const n=e.tabIndex;if(n<0){const a=Sr(e);if(a==="details"||a==="audio"||a==="video"||yn(e)&&e.isContentEditable)return 0}return n}function R0(e){if(Sr(e)!=="input")return null;const n=e;return n.type==="radio"&&n.name!==""?n:null}function pR(e,n){const a=R0(e);if(!a)return!0;const o=n.find(s=>{const u=R0(s);return u?.name===a.name&&u.form===a.form&&u.checked});return o?o===a:n.find(s=>{const u=R0(s);return u?.name===a.name&&u.form===a.form})===a}function gR(e){if(yn(e)&&Sr(e)==="slot"){const n=e.assignedElements({flatten:!0});if(n.length>0)return n}return yn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function nv(e,n){gR(e).forEach(a=>{fR(a)&&n.push(a),nv(a,n)})}function mR(e,n,a){gR(e).forEach(o=>{yn(o)&&o.matches(n)&&a.push(o),mR(o,n,a)})}function np(e){return tv(e)&&hR(e)>=0}function yR(e){const n=[];return nv(e,n),n.filter(tv)}function rp(e){const n=yR(e);return n.filter(a=>hR(a)>=0&&pR(a,n))}function vR(e,n){const a=rp(e),o=a.length;if(o===0)return;const s=Qr(Gt(e)),u=a.indexOf(s),c=u===-1?n===1?0:o-1:u+n;return a[c]}function bR(e){return vR(Gt(e).body,1)||e}function xR(e){return vR(Gt(e).body,-1)||e}function fk(e,n,a){if(!e)return null;const o=[];nv(Gt(e).body,o);const s=o.indexOf(e);if(s===-1)return null;const u=o.filter(tv);for(let c=1;c<o.length;c+=1){const d=o[(s+n*c+o.length)%o.length];if(!at(a,d)&&np(d)&&pR(d,u))return d}return o[s]}function Ol(e,n){const a=n||e.currentTarget,o=e.relatedTarget;return!o||!at(a,o)}function hk(e){rp(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function TS(e){const n=[];mR(e,"[data-tabindex]",n),n.forEach(a=>{const o=a.dataset.tabindex;delete a.dataset.tabindex,o?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")})}function Mi(e,n,a=!0){return e.filter(s=>s.parentId===n).flatMap(s=>[...!a||s.context?.open?[s]:[],...Mi(e,s.id,a)])}function OS(e,n){let a=[],o=e.find(s=>s.id===n)?.parentId;for(;o;){const s=e.find(u=>u.id===o);o=s?.parentId,s&&(a=a.concat(s))}return a}function Ml(e){return`data-base-ui-${e}`}let Af=0;function eh(e,n={}){const{preventScroll:a=!1,sync:o=!1,shouldFocus:s}=n;cancelAnimationFrame(Af);function u(){s&&!s()||e?.focus({preventScroll:a})}if(o)return u(),Sn;const c=requestAnimationFrame(u);return Af=c,()=>{Af===c&&(cancelAnimationFrame(c),Af=0)}}const MS="data-base-ui-inert";let Yu=new WeakMap,Df=new WeakSet,Gu=new WeakMap,C0=0;function SR(e){return e?ys(e)?e.host:SR(e.parentNode):null}const AS=(e,n)=>n.map(a=>{if(e.contains(a))return a;const o=SR(a);return e.contains(o)?o:null}).filter(a=>a!=null),DS=e=>{const n=new Set;return e.forEach(a=>{let o=a;for(;o&&!n.has(o);)n.add(o),o=o.parentNode}),n},NS=(e,n,a)=>{const o=[],s=u=>{!u||a.has(u)||Array.from(u.children).forEach(c=>{Sr(c)!=="script"&&(n.has(c)?s(c):o.push(c))})};return s(e),o};function pk(e,n,a,{mark:o=!0}){const s=AS(n,e),u=o?NS(n,DS(s),new Set(s)):[],c=[],d=[];if(a){const p=AS(n,Array.from(n.querySelectorAll("[aria-live]"))),g=s.concat(p);NS(n,DS(g),new Set(g)).forEach(h=>{const b=h.getAttribute("aria-hidden"),S=b!==null&&b!=="false",w=(Yu.get(h)||0)+1;Yu.set(h,w),c.push(h),w===1&&S&&Df.add(h),S||h.setAttribute("aria-hidden","true")})}return o&&u.forEach(p=>{const g=(Gu.get(p)||0)+1;Gu.set(p,g),d.push(p),g===1&&p.setAttribute(MS,"")}),C0+=1,()=>{c.forEach(p=>{const g=(Yu.get(p)||0)-1;Yu.set(p,g),g||(Df.has(p)||p.removeAttribute("aria-hidden"),Df.delete(p))}),o&&d.forEach(p=>{const g=(Gu.get(p)||0)-1;Gu.set(p,g),g||p.removeAttribute(MS)}),C0-=1,C0||(Yu=new WeakMap,Df=new WeakSet,Gu=new WeakMap)}}function kS(e,n={}){const{ariaHidden:a=!1,mark:o=!0}=n,s=Gt(e[0]).body;return pk(e,s,a,{mark:o})}var cr=QE();const gk=GE(cr);function wR(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let jS=0;function mk(e,n="mui"){const a=v.useRef(void 0),o=wR(),s=e??a.current;return v.useEffect(()=>{a.current==null&&(jS+=1,a.current=`${n}-${jS}`,e==null&&o())},[e,n,o]),s}const IS=Zy.useId;function Fl(e,n){if(IS!==void 0){const a=IS();return e??(n?`${n}-${a}`:a)}return mk(e,n)}const yk=parseInt(v.version,10);function rv(e){return yk>=e}function PS(e){if(!v.isValidElement(e))return null;const n=e,a=n.props;return(rv(19)?a?.ref:n.ref)??null}function uy(e,n){if(e&&!n)return e;if(!e&&n)return n;if(e||n)return{...e,...n}}function vk(e,n){const a={};for(const o in e){const s=e[o];if(n?.hasOwnProperty(o)){const u=n[o](s);u!=null&&Object.assign(a,u);continue}s===!0?a[`data-${o.toLowerCase()}`]="":s&&(a[`data-${o.toLowerCase()}`]=s.toString())}return a}function bk(e,n){return typeof e=="function"?e(n):e}function ER(e,n){return typeof e=="function"?e(n):e}const RR={};function Or(e,n,a,o,s){if(!a&&!o&&!s&&!e)return xh(n);let u=xh(e);return n&&(u=Wu(u,n)),a&&(u=Wu(u,a)),o&&(u=Wu(u,o)),s&&(u=Wu(u,s)),u}function xk(e){if(e.length===0)return RR;if(e.length===1)return xh(e[0]);let n=xh(e[0]);for(let a=1;a<e.length;a+=1)n=Wu(n,e[a]);return n}function xh(e){return TR(e)?{...e(RR)}:Sk(e)}function Wu(e,n){return TR(n)?n(e):wk(e,n)}function Sk(e){const n={...e};for(const a in n){const o=n[a];CR(a,o)&&(n[a]=OR(o))}return n}function wk(e,n){if(!n)return e;for(const a in n){const o=n[a];switch(a){case"style":{e[a]=uy(e.style,o);break}case"className":{e[a]=MR(e.className,o);break}default:CR(a,o)?e[a]=Ek(e[a],o):e[a]=o}}return e}function CR(e,n){const a=e.charCodeAt(0),o=e.charCodeAt(1),s=e.charCodeAt(2);return a===111&&o===110&&s>=65&&s<=90&&(typeof n=="function"||typeof n>"u")}function TR(e){return typeof e=="function"}function Ek(e,n){return n?e?(...a)=>{const o=a[0];if(AR(o)){const u=o;Sh(u);const c=n(...a);return u.baseUIHandlerPrevented||e?.(...a),c}const s=n(...a);return e?.(...a),s}:OR(n):e}function OR(e){return e&&((...n)=>{const a=n[0];return AR(a)&&Sh(a),e(...n)})}function Sh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function MR(e,n){return n?e?n+" "+e:n:e}function AR(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Mt(e,n,a={}){let o=n.render;a.enabled!==!1&&(o=av(o));const s=Rk(n,a,o);if(a.enabled===!1)return null;const u=a.state??$t;return Ok(e,o,s,u)}function Rk(e,n,a){const{className:o,style:s}=e,{state:u=$t,ref:c,props:d,stateAttributesMapping:p,enabled:g=!0}=n,y=g?bk(o,u):void 0,h=g?ER(s,u):void 0,b=g?vk(u,p):$t,S=g&&d?Ck(d):void 0,w=g?uy(b,S)??{}:$t;return typeof document<"u"&&(g?Array.isArray(c)?w.ref=q4([w.ref,PS(a),...c]):w.ref=Xr(w.ref,PS(a),c):Xr(null,null)),g?(y!==void 0&&(w.className=MR(w.className,y)),h!==void 0&&(w.style=uy(w.style,h)),w):$t}function Ck(e){return Array.isArray(e)?xk(e):Or(void 0,e)}const Tk=Symbol.for("react.lazy");function av(e){if(e?.$$typeof!==Tk)return e;const n=v.Children.toArray(e)[0];return v.isValidElement(n)?n:e}function Ok(e,n,a,o){if(n){if(typeof n=="function")return n(a,o);const s=Or(a,n.props);return s.ref=a.ref,v.cloneElement(n,s)}return Mk(e,a)}function Mk(e,n){return e==="button"?v.createElement("button",{type:"button",...n,key:n.key}):e==="img"?v.createElement("img",{alt:"",...n,key:n.key}):v.createElement(e,n)}const Ak=500,DR=500,Dk={style:{transition:"none"}},Nk="data-base-ui-click-trigger",NR={fallbackAxisSide:"none"},ov={fallbackAxisSide:"end"},kk={clipPath:"inset(50%)",position:"fixed",top:0,left:0},kR=v.createContext(null),jR=()=>v.useContext(kR),jk=Ml("portal");function IR(e={}){const{ref:n,container:a,componentProps:o=$t,elementProps:s}=e,u=Fl(),d=jR()?.portalNode,[p,g]=v.useState(null),[y,h]=v.useState(null),b=Be(E=>{E!==null&&h(E)}),S=v.useRef(null);_e(()=>{if(a===null){S.current&&(S.current=null,h(null),g(null));return}const E=(a&&(Ky(a)?a:a.current))??d??document.body;if(E==null){S.current&&(S.current=null,h(null),g(null));return}S.current!==E&&(S.current=E,h(null),g(E))},[a,d]);const w=Mt("div",o,{ref:[n,b],props:[{id:u,[jk]:""},s]}),C=p&&w?cr.createPortal(w,p):null;return{node:y,nodeId:v.isValidElement(w)?w.props.id:void 0,subtree:C}}const ap=v.forwardRef(function(n,a){const{render:o,className:s,style:u,children:c,container:d,portalOwnerRole:p,...g}=n,{node:y,nodeId:h,subtree:b}=IR({container:d,ref:a,componentProps:n,elementProps:g}),S=v.useRef(null),w=v.useRef(null),C=v.useRef(null),E=v.useRef(null),[T,O]=v.useState(null),M=v.useRef(!1),A=T?.modal,N=T?.open,P=!!T&&!T.modal&&T.open&&!!y;v.useEffect(()=>{if(!y||A)return;function D(z){y&&z.relatedTarget&&Ol(z)&&(z.type==="focusin"?M.current&&(TS(y),M.current=!1):(hk(y),M.current=!0))}return uo(jt(y,"focusin",D,!0),jt(y,"focusout",D,!0))},[y,A]),_e(()=>{!y||N!==!0||!M.current||(TS(y),M.current=!1)},[N,y]);const j=v.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:E,portalNode:y,setFocusManagerState:O}),[y]);return x.jsxs(v.Fragment,{children:[b,x.jsxs(kR.Provider,{value:j,children:[P&&y&&x.jsx(Ll,{"data-type":"outside",ref:S,onFocus:D=>{if(Ol(D,y))C.current?.focus();else{const z=T?T.domReference:null;xR(z)?.focus()}}}),P&&y&&x.jsx("span",{role:p,"aria-owns":h,style:kk}),y&&cr.createPortal(c,y),P&&y&&x.jsx(Ll,{"data-type":"outside",ref:w,onFocus:D=>{if(Ol(D,y))E.current?.focus();else{const z=T?T.domReference:null;bR(z)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,dt(Ti,D.nativeEvent))}}})]})]})});function PR(){const e=new Map;return{emit(n,a){e.get(n)?.forEach(o=>o(a))},on(n,a){e.has(n)||e.set(n,new Set),e.get(n).add(a)},off(n,a){e.get(n)?.delete(a)}}}class iv{nodesRef={current:[]};events=PR();addNode(n){this.nodesRef.current.push(n)}removeNode(n){const a=this.nodesRef.current.findIndex(o=>o===n);a!==-1&&this.nodesRef.current.splice(a,1)}}const LR=v.createContext(null),zR=v.createContext(null),ki=()=>v.useContext(LR)?.id||null,ji=e=>{const n=v.useContext(zR);return e??n};function sv(e){const n=Fl(),a=ji(e),o=ki();return _e(()=>{if(!n)return;const s={id:n,parentId:o};return a?.addNode(s),()=>{a?.removeNode(s)}},[a,n,o]),n}function _R(e){const{children:n,id:a}=e,o=ki();return x.jsx(LR.Provider,{value:v.useMemo(()=>({id:a,parentId:o}),[a,o]),children:n})}function UR(e){const{children:n,externalTree:a}=e,o=er(()=>a??new iv).current;return x.jsx(zR.Provider,{value:o,children:n})}function Po(e){return e==null?e:"current"in e?e.current:e}function Ik(e,n){const a=wn(tr(e));return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?n||"keyboard":"pointerType"in e?e.pointerType||(Il(e)?"keyboard":n||"mouse"):"touches"in e?"touch":e instanceof a.MouseEvent?n||(e.detail===0?"keyboard":"mouse"):""}const LS=20;let Ei=[];function lv(){Ei=Ei.filter(e=>e.deref()?.isConnected)}function zS(e){lv(),e&&Sr(e)!=="body"&&(Ei.push(new WeakRef(e)),Ei.length>LS&&(Ei=Ei.slice(-LS)))}function _S(){return lv(),Ei[Ei.length-1]?.deref()}function Pk(e){return e?np(e)?e:rp(e)[0]||e:null}function US(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const a=yR(e).filter(s=>{const u=s.getAttribute("data-tabindex")||"";return np(s)||s.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=e.getAttribute("tabindex");a.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function op(e){const{context:n,children:a,disabled:o=!1,initialFocus:s=!0,returnFocus:u=!0,explicitReturnFocus:c,restoreFocus:d=!1,modal:p=!0,closeOnFocusOut:g=!0,openInteractionType:y="",nextFocusableElement:h,previousFocusableElement:b,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:C}=e,E=n.useState("open"),T=n.useState("domReferenceElement"),O=n.useState("floatingElement"),{events:M,dataRef:A}=n.context,N=Be(()=>A.current.floatingContext?.nodeId),P=s===!1,j=oy(T)&&P,D=Ln(s),z=Ln(u),F=Ln(c),G=Ln(y),J=Ln(E),K=ji(w),H=jR(),U=v.useRef(!1),L=v.useRef(!1),$=v.useRef(!1),Y=v.useRef(null),V=v.useRef(""),Q=v.useRef(""),ee=v.useRef(null),q=v.useRef(null),se=Xr(ee,S,H?.beforeInsideRef),k=Xr(q,H?.afterInsideRef),B=Un(),W=Un(),re=Pl(),Ee=H!=null,le=mh(O),me=Be((ve=le)=>ve?rp(ve):[]),ge=Be(()=>C?.().filter(ve=>ve!=null)??[]);v.useEffect(()=>{if(o||!p)return;function ve(Me){Me.key==="Tab"&&at(le,Qr(Gt(le)))&&me().length===0&&!j&&Ba(Me)}const Pe=Gt(le);return jt(Pe,"keydown",ve)},[o,le,p,j,me]),v.useEffect(()=>{if(o||!E)return;const ve=Gt(le);function Pe(){$.current=!1}function Me(Fe){const Oe=tr(Fe),Ue=ge(),be=at(O,Oe)||at(T,Oe)||at(H?.portalNode,Oe)||Ue.some(He=>He===Oe||at(He,Oe));$.current=!be,Q.current=Fe.pointerType||"keyboard",pc(Oe,`[${Nk}]`)&&(L.current=!0,W.start(0,()=>{L.current=!1}))}function Le(){Q.current="keyboard"}return uo(jt(ve,"pointerdown",Me,!0),jt(ve,"pointerup",Pe,!0),jt(ve,"pointercancel",Pe,!0),jt(ve,"keydown",Le,!0),Pe)},[o,O,T,le,E,H,W,ge]),v.useEffect(()=>{if(o||!g)return;const ve=Gt(le);function Pe(){L.current=!0,W.start(0,()=>{L.current=!1})}function Me(Ue){const be=tr(Ue);np(be)&&(Y.current=be)}function Le(Ue){const be=Ue.relatedTarget,He=Ue.currentTarget,Ze=tr(Ue);p&&be==null&&Ze!=null&&at(O,Ze)&&zS(Ze),queueMicrotask(()=>{const it=N(),de=n.context.triggerElements,we=ge(),Ye=be?.hasAttribute(Ml("focus-guard"))&&[ee.current,q.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,Po(b),Po(h)].includes(be),De=!(at(T,be)||at(O,be)||at(be,O)||at(H?.portalNode,be)||we.some(ke=>ke===be||at(ke,be))||de.hasMatchingElement(ke=>at(ke,be))||Ye||K&&(Mi(K.nodesRef.current,it).find(ke=>at(ke.context?.elements.floating,be)||at(ke.context?.elements.domReference,be))||OS(K.nodesRef.current,it).find(ke=>[ke.context?.elements.floating,mh(ke.context?.elements.floating)].includes(be)||ke.context?.elements.domReference===be)));if(He===T&&le&&US(le),d&&He!==T&&!tp(Ze)&&Qr(ve)===ve.body){if(yn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const ke=me(),yt=Y.current,ut=(yt&&ke.includes(yt)?yt:null)||ke[ke.length-1]||le;yn(ut)&&ut.focus()}if(A.current.insideReactTree){A.current.insideReactTree=!1;return}(j||!p)&&be&&De&&!L.current&&(j||be!==_S())&&(U.current=!0,n.setOpen(!1,dt(Ti,Ue)))})}function Fe(){$.current||(A.current.insideReactTree=!0,B.start(0,()=>{A.current.insideReactTree=!1}))}const Oe=yn(T)?T:null;if(!(!O&&!Oe))return uo(Oe&&jt(Oe,"focusout",Le),Oe&&jt(Oe,"pointerdown",Pe),O&&jt(O,"focusin",Me),O&&jt(O,"focusout",Le),O&&H&&jt(O,"focusout",Fe,!0))},[o,T,O,le,p,K,H,n,g,d,me,j,N,A,B,W,re,h,b,ge]),v.useEffect(()=>{if(o||!O||!E)return;const ve=Array.from(H?.portalNode?.querySelectorAll(`[${Ml("portal")}]`)||[]),Me=(K?OS(K.nodesRef.current,N()):[]).find(He=>oy(He.context?.elements.domReference||null))?.context?.elements.domReference,Fe=[...[O,...ve,ee.current,q.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...ge()],Me,Po(b),Po(h),j?T:null].filter(He=>He!=null),Oe=kS(Fe,{ariaHidden:p||j,mark:!1}),Ue=[O,...ve].filter(He=>He!=null),be=kS(Ue);return()=>{be(),Oe()}},[E,o,T,O,p,H,j,K,N,h,b,ge]),_e(()=>{if(!E||o||!yn(le))return;V.current="",Q.current="";const ve=Gt(le),Pe=Qr(ve);queueMicrotask(()=>{const Me=D.current,Le=typeof Me=="function"?Me(G.current||""):Me;if(Le===void 0||Le===!1||at(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=Po(Le),be=be||Ue();const He=at(le,Qr(ve)),Ze=A.current.openEvent,it=Ze?.type==="mousedown"&&Il(Ze);eh(be,{sync:it,preventScroll:be===le,shouldFocus(){if(!J.current)return!1;if(He)return!0;const de=Qr(ve);return!(de!==be&&at(le,de))}})})},[o,E,le,me,D,G,J,A]);const ce=v.useRef(null);_e(()=>{if(o||!le){ce.current=null;return}ce.current&&(ce.current.cancelled=!0,ce.current=null);const ve=Gt(le),Pe=Qr(ve),Me=G.current==null;zS(Pe);function Le(Oe){if(Oe.open||(V.current=Ik(Oe.nativeEvent,Q.current)),(Oe.reason===Ti&&Oe.triggerElement?.hasAttribute(Ml("focus-guard"))||Oe.reason===qn&&Oe.nativeEvent.type==="mouseleave")&&(U.current=!0),Oe.reason===Wh)if(Oe.nested)U.current=!1;else if(Il(Oe.nativeEvent)||qy(Oe.nativeEvent))U.current=!1;else{let Ue=!1;Gt(le).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?U.current=!1:U.current=!0}}M.on("openchange",Le);function Fe(Oe){const Ue=z.current;let be=typeof Ue=="function"?Ue(Oe):Ue;if(be===void 0||be===!1)return null;be===null&&(be=!0);const He=T?.isConnected?T:null,Ze=Pe?.isConnected&&Sr(Pe)!=="body"?Pe:null;let it=Me?Ze||He:He||Ze;return it||(it=_S()||null),typeof be=="boolean"?it:Po(be)||it||null}return()=>{M.off("openchange",Le);const Oe=Qr(ve),Ue=ge(),be=at(O,Oe)||Ue.some(we=>we===Oe||at(we,Oe))||K&&Mi(K.nodesRef.current,N(),!1).some(we=>at(we.context?.elements.floating,Oe)),He=z.current,Ze=V.current,it=Fe(Ze),de={cancelled:!1};ce.current=de,queueMicrotask(()=>{ce.current===de&&(ce.current=null);const we=Pk(it),Ye=F.current??typeof He!="boolean";if(!de.cancelled&&He&&!U.current&&yn(we)&&(!(!Ye&&we!==Oe&&Oe!==ve.body)||be)){const De={preventScroll:!0};Ze==="keyboard"&&(De.focusVisible=!0),we.focus(De)}U.current=!1})}},[o,O,le,z,F,G,M,K,T,N,ge]),_e(()=>{if(!ho||E||!O)return;const ve=Qr(Gt(O));!yn(ve)||!Dc(ve)||at(O,ve)&&ve.blur()},[E,O]),_e(()=>{if(!(o||!H))return H.setFocusManagerState({modal:p,closeOnFocusOut:g,open:E,onOpenChange:n.setOpen,domReference:T}),()=>{H.setFocusManagerState(null)}},[o,H,p,E,n,g,T]),_e(()=>{if(!(o||!le))return US(le),()=>{queueMicrotask(lv)}},[o,le]);const Te=!o&&(p?!j:!0)&&(Ee||p);return x.jsxs(v.Fragment,{children:[Te&&x.jsx(Ll,{"data-type":"inside",ref:se,onFocus:ve=>{if(p){const Pe=me();eh(Pe[Pe.length-1])}else H?.portalNode&&(U.current=!1,Ol(ve,H.portalNode)?bR(T)?.focus():Po(b??H.beforeOutsideRef)?.focus())}}),a,Te&&x.jsx(Ll,{"data-type":"inside",ref:k,onFocus:ve=>{p?eh(me()[0]):H?.portalNode&&(g&&(U.current=!0),Ol(ve,H.portalNode)?xR(T)?.focus():Po(h??H.afterOutsideRef)?.focus())}})]})}function HR(e,n={}){const{enabled:a=!0,event:o="click",toggle:s=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:d=0,reason:p=qa}=n,g=e.context.dataRef,y=v.useRef(void 0),h=Pl(),b=Un(),S=v.useMemo(()=>{function w(E,T,O,M){const A=dt(p,T,O);E&&M==="touch"&&d>0?b.start(d,()=>{e.setOpen(!0,A)}):e.setOpen(E,A)}function C(E,T,O){const M=g.current.openEvent,A=e.select("domReferenceElement")!==T;return E&&A||!E||!s?!0:M&&(typeof c=="function"?c():c)?!O(M.type):!1}return{onPointerDown(E){y.current=Ci(E.pointerType,!0)&&qy(E.nativeEvent)?"virtual":E.pointerType},onMouseDown(E){const T=y.current,O=E.nativeEvent,M=e.select("open");if(E.button!==0||o==="click"||Ci(T,!0)&&u)return;const A=C(M,E.currentTarget,D=>D==="click"||D==="mousedown"),N=tr(O),P=Dc(N);if(P||T==="virtual"){w(A,O,P?N:E.currentTarget,T);return}const j=E.currentTarget;h.request(()=>{w(A,O,j,T)})},onClick(E){if(o==="mousedown-only")return;const T=y.current;if(o==="mousedown"&&T){y.current=void 0;return}if(Ci(T,!0)&&u)return;const O=e.select("open"),M=C(O,E.currentTarget,A=>A==="click"||A==="mousedown"||A==="keydown"||A==="keyup");w(M,E.nativeEvent,E.currentTarget,T)},onKeyDown(){y.current=void 0}}},[g,o,u,p,e,c,s,h,b,d]);return v.useMemo(()=>a?{reference:S}:$t,[a,S])}function Lk(e,n){let a=null,o=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const u=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=n.axis==="x"||n.axis==="both",d=n.axis==="y"||n.axis==="both",p=["mouseenter","mousemove"].includes(n.dataRef.current.openEvent?.type||"")&&n.pointerType!=="touch",g=n.axis==="y"?u.width:0,y=n.axis==="x"?u.height:0;let h=u.x,b=u.y;return a==null&&n.x&&c&&(a=u.x-n.x),o==null&&n.y&&d&&(o=u.y-n.y),h-=a||0,b-=o||0,(!s||p)&&(h=c&&n.x!=null?n.x:h,b=d&&n.y!=null?n.y:b),s=!0,{width:g,height:y,x:h,y:b,top:b,right:h+g,bottom:b+y,left:h}}}}function HS(e){return e!=null&&e.clientX!=null}function zk(e,n={}){const{enabled:a=!0,axis:o="both"}=n,s=e.useState("open"),u=e.useState("floatingElement"),c=e.useState("domReferenceElement"),d=e.context.dataRef,p=v.useRef(!1),g=v.useRef(null),[y,h]=v.useState(),[b,S]=v.useState([]),w=Be(M=>{e.set("positionReference",M)}),C=Be((M,A,N)=>{p.current||d.current.openEvent&&!HS(d.current.openEvent)||e.set("positionReference",Lk(N??c,{x:M,y:A,axis:o,dataRef:d,pointerType:y}))}),E=Be(M=>{s?g.current||(C(M.clientX,M.clientY,M.currentTarget),S([])):C(M.clientX,M.clientY,M.currentTarget)}),T=Ci(y)?u:s;v.useEffect(()=>{if(!a){w(c);return}if(!T)return;function M(){g.current?.(),g.current=null}const A=wn(u);function N(P){const j=tr(P);at(u,j)?M():C(P.clientX,P.clientY)}return!d.current.openEvent||HS(d.current.openEvent)?g.current=jt(A,"mousemove",N):w(c),M},[T,a,u,d,c,e,C,w,b]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{a&&!u&&(p.current=!1)},[a,u]),v.useEffect(()=>{!a&&s&&(p.current=!0)},[a,s]);const O=v.useMemo(()=>{function M(A){h(A.pointerType)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:E,onMouseEnter:E}},[E]);return v.useMemo(()=>a?{reference:O,trigger:O}:{},[a,O])}function _k(){return!1}function Uk(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Ic(e,n={}){const{enabled:a=!0,escapeKey:o=!0,outsidePress:s=!0,outsidePressEvent:u="sloppy",referencePress:c=_k,bubbles:d,externalTree:p}=n,g=e.useState("open"),y=e.useState("floatingElement"),{dataRef:h,events:b}=e.context,S=ji(p),w=Be(typeof s=="function"?s:()=>!1),C=typeof s=="function"?w:s,E=C!==!1,T=Be(()=>u),{escapeKey:O,outsidePress:M}=Uk(d),A=v.useRef(!1),N=v.useRef(!1),P=v.useRef(!1),j=v.useRef(!1),D=v.useRef(!1),z=v.useRef(""),F=v.useRef(null),G=Un(),J=Un(),K=Un(),H=Be(()=>{J.clear(),h.current.insideReactTree=!1}),U=Be(k=>{const B=h.current.floatingContext?.nodeId;return(S?Mi(S.nodesRef.current,B):[]).some(re=>re.context?.open&&!re.context.dataRef.current[k])}),L=Be(k=>w0(k,e.select("floatingElement"))||w0(k,e.select("domReferenceElement"))),$=Be(k=>{c()&&e.setOpen(!1,dt(qa,k.nativeEvent))}),Y=Be(k=>{if(!g||!a||!o||k.key!=="Escape")return;const B=p4(k)?k.nativeEvent:k;if(D.current||B.isComposing||!O&&U("__escapeKeyBubbles"))return;const W=dt(Nc,B);e.setOpen(!1,W),W.isCanceled||k.preventDefault(),!O&&!W.isPropagationAllowed&&k.stopPropagation()}),V=Be(()=>{h.current.insideReactTree=!0,J.start(0,H)}),Q=Be(k=>{if(!g||!a||k.button!==0)return;const B=tr(k.nativeEvent);at(e.select("floatingElement"),B)&&(A.current||(A.current=!0,N.current=!1))}),ee=Be(k=>{!g||!a||(k.defaultPrevented||k.nativeEvent.defaultPrevented)&&A.current&&(N.current=!0)});v.useEffect(()=>{function k(B){B.open||(j.current=!1)}return b.on("openchange",k),()=>{b.off("openchange",k)}},[b]),v.useEffect(()=>H,[H]),v.useEffect(()=>{if(!g||!a)return g||(j.current=!1,D.current=!1,z.current="",F.current=null),H;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=M;const k=new Da,B=Gt(y);function W(){K.clear(),D.current=!0}function re(){D.current=!0,K.start(ho?5:0,()=>{D.current=!1})}function Ee(){P.current=!0,k.start(0,()=>{P.current=!1})}function le(){A.current=!1,N.current=!1}function me(){const de=z.current,we=de==="pen"||!de?"mouse":de,Ye=T(),De=typeof Ye=="function"?Ye():Ye;return typeof De=="string"?De:De[we]}function ge(de){const we=me();return we==="intentional"&&de.type!=="click"||we==="sloppy"&&de.type==="click"}function ce(de){const we=h.current.floatingContext?.nodeId,Ye=S&&Mi(S.nodesRef.current,we).some(De=>w0(de,De.context?.elements.floating));return L(de)||Ye}function Te(de){if(ge(de)){de.type!=="click"&&!L(de)&&(k.clear(),P.current=!1),H();return}if(h.current.insideReactTree){H();return}const we=tr(de),Ye=`[${Ml("inert")}]`,De=sn(we)?we.getRootNode():null,ke=Array.from((ys(De)?De:Gt(e.select("floatingElement"))).querySelectorAll(Ye)),yt=e.context.triggerElements;if(we&&(yt.hasElement(we)||yt.hasMatchingElement(ht=>at(ht,we))))return;let ut=sn(we)?we:null;for(;ut&&!_o(ut);){const ht=Fo(ut);if(_o(ht)||!sn(ht))break;ut=ht}if(!(ke.length&&sn(we)&&!k4(we)&&!at(we,e.select("floatingElement"))&&ke.every(ht=>!at(ut,ht)))){if(yn(we)&&!("touches"in de)){const ht=_o(we),Ot=ha(we),Dt=/auto|scroll/,en=ht||Dt.test(Ot.overflowX),an=ht||Dt.test(Ot.overflowY),tn=en&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,We=an&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,xt=Ot.direction==="rtl",Xt=We&&(xt?de.offsetX<=we.offsetWidth-we.clientWidth:de.offsetX>we.clientWidth),ft=tn&&de.offsetY>we.clientHeight;if(Xt||ft)return}if(!ce(de)){if(me()==="intentional"){if(de.detail!==0&&!Il(de)&&!j.current)return;if(P.current){k.clear(),P.current=!1;return}}typeof C=="function"&&!C(de)||U("__outsidePressBubbles")||(e.setOpen(!1,dt(Wh,de)),H())}}}function ve(de){me()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!a||L(de)||Te(de)}function Pe(de){if(me()!=="sloppy"||!e.select("open")||!a||L(de))return;const we=de.touches[0];we&&(F.current={startTime:Date.now(),startX:we.clientX,startY:we.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},G.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function Me(de,we){const Ye=tr(de);if(!Ye)return;const De=jt(Ye,de.type,()=>{we(de),De()})}function Le(de){z.current="touch",Me(de,Pe)}function Fe(de){G.clear(),de.type==="pointerdown"&&(de.button===0&&(j.current=!0),z.current=de.pointerType),!(de.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&Me(de,we=>{we.type==="pointerdown"?ve(we):Te(we)})}function Oe(de){if(de.type==="pointercancel"&&(j.current=!1),!A.current)return;const we=N.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){we&&Ee();return}if(!ce(de)){if(we){Ee();return}typeof C=="function"&&!C(de)||(k.clear(),P.current=!0,H())}}}function Ue(de){if(me()!=="sloppy"||!F.current||L(de))return;const we=de.touches[0];if(!we)return;const Ye=Math.abs(we.clientX-F.current.startX),De=Math.abs(we.clientY-F.current.startY),ke=Math.sqrt(Ye*Ye+De*De);ke>5&&(F.current.dismissOnTouchEnd=!0),ke>10&&(Te(de),G.clear(),F.current=null)}function be(de){Me(de,Ue)}function He(de){me()!=="sloppy"||!F.current||L(de)||(F.current.dismissOnTouchEnd&&Te(de),G.clear(),F.current=null)}function Ze(de){Me(de,He)}const it=uo(o&&uo(jt(B,"keydown",Y),jt(B,"compositionstart",W),jt(B,"compositionend",re)),E&&uo(jt(B,"click",Fe,!0),jt(B,"pointerdown",Fe,!0),jt(B,"pointerup",Oe,!0),jt(B,"pointercancel",Oe,!0),jt(B,"mousedown",Fe,!0),jt(B,"mouseup",Oe,!0),jt(B,"touchstart",Le,{capture:!0,passive:!0}),jt(B,"touchmove",be,{capture:!0,passive:!0}),jt(B,"touchend",Ze,{capture:!0,passive:!0})));return()=>{it(),k.clear(),le(),P.current=!1}},[h,y,o,E,C,g,a,O,M,Y,H,T,U,L,S,e,G,K]);const q=v.useMemo(()=>({onKeyDown:Y,onPointerDown:$,onClick:$}),[Y,$]),se=v.useMemo(()=>({onKeyDown:Y,onPointerDown:ee,onMouseDown:ee,onClickCapture:V,onMouseDownCapture(k){V(),Q(k)},onPointerDownCapture(k){V(),Q(k)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[Y,V,Q,ee]);return v.useMemo(()=>a?{reference:q,floating:se,trigger:q}:{},[a,q,se])}function FR(e){const{popupStore:n,treatPopupAsFloatingElement:a=!1,floatingRootContext:o,floatingId:s,nested:u,onOpenChange:c}=e,d=n.useState("open"),p=n.useState("activeTriggerElement"),g=n.useState(a?"popupElement":"positionerElement"),y=c;return n.useSyncedValue("floatingId",s),_e(()=>{const h={open:d,floatingId:s,referenceElement:p,floatingElement:g};sn(p)&&(h.domReferenceElement=p),o.state.positionReference===o.state.referenceElement&&(h.positionReference=p),o.update(h)},[d,s,p,g,o]),o.context.onOpenChange=y,o.context.nested=u,o}function Rs(e,n=!1,a=!1,o=!1){const[s,u]=v.useState(e&&n?"idle":void 0),[c,d]=v.useState(e&&!o);return e&&!c&&(d(!0),u("starting")),!e&&c&&s!=="ending"&&!a&&u("ending"),!e&&!c&&s==="ending"&&u(void 0),_e(()=>{if(!e&&c&&s!=="ending"&&a){const p=Cr.request(()=>{u("ending")});return()=>{Cr.cancel(p)}}},[e,c,s,a]),_e(()=>{if(!e||n||s===void 0)return;const p=Cr.request(()=>{u(void 0)});return()=>{Cr.cancel(p)}},[n,e,s]),_e(()=>{if(!e||!n)return;e&&c&&s!=="idle"&&u("starting");const p=Cr.request(()=>{u("idle")});return()=>{Cr.cancel(p)}},[n,e,c,s]),{mounted:c,setMounted:d,transitionStatus:s}}function FS(e,n){return e.getAnimations(n).filter(a=>{const o=a.effect?.getTiming();return o?.duration!==1/0&&o?.iterations!==1/0})}let Nf=null;function Hk(e){if(!Nf){const n=[];Nf=n,queueMicrotask(()=>{Nf=null,cr.flushSync(()=>{for(const a of n)a()})})}Nf.push(e)}function ip(e,n=!1,a=!1){const o=Pl();return Be((s,u=null)=>{o.cancel();const c=Po(e);if(c==null)return;const d=c,p=()=>{if(!a){cr.flushSync(s);return}Hk(()=>{u?.aborted||s()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function g(){Promise.all(FS(d).map(y=>y.finished.then(Sn))).then(()=>{u?.aborted||p()},()=>{if(u?.aborted)return;if(FS(d).some(h=>h.pending||h.playState!=="finished")){g();return}p()})}if(n){const y=Qy;if(!d.hasAttribute(y)){o.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(y)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[y]}),u?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}o.request(g)})}function ka(e){const{enabled:n=!0,open:a,ref:o,batch:s=!1,onComplete:u}=e,c=Be(u),d=ip(o,a,s);v.useEffect(()=>{if(!n)return;const p=new AbortController;return d(c,p.signal),()=>{p.abort()}},[n,a,c,d])}function BR(e){const{open:n,ref:a,preventUnmountOnClose:o,setPreventUnmountOnClose:s,onUnmount:u,animateInitialOpen:c}=e,d=Be(s),{mounted:p,setMounted:g,transitionStatus:y}=Rs(n,!1,!1,c),h=n?!1:o;_e(()=>{n&&d(!1)},[n,d]);const b=v.useRef(p),S=v.useRef(!1),w=wR(),C=()=>{b.current=!1,g(!1),u()};_e(()=>{b.current=p,S.current&&(S.current=!1,!n&&p&&C())});const E=Be(()=>{if(b.current){if(n){S.current=!0,w();return}C()}});return ka({enabled:p&&!n&&!h,open:n,ref:a,onComplete(){n||E()}}),{mounted:p,transitionStatus:y,preventUnmountingOnClose:h,forceUnmount:E}}const Pc={tabIndex:-1,[ry]:""};function VR(e){return n=>n==="touch"?e.current:!0}function uv(e,n=!1){const a=Fl(),o=ki()!=null,s=er(()=>e(a,o)).current;return FR({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:a,nested:o,onOpenChange:s.setOpen}),s}function sp({handle:e,store:n}){return _e(()=>e.attachStore(n),[e,n]),null}function BS(e){const n=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==n&&e.set("triggerCount",n)}function Fk(e,n){const a=v.useRef(null);return Be(o=>{const s=a.current;if(s!==null){if(s.element===o&&s.store===n&&s.id===e)return;a.current=null;const u=s.store;u.context.triggerElements.getById(s.id)===s.element&&(u.context.triggerElements.delete(s.id),BS(u))}o!==null&&e!==void 0&&(a.current={store:n,id:e,element:o},n.context.triggerElements.add(e,o),BS(n))})}function lp(e,n,a,o=!1){let s=e.preventUnmountingOnClose;n?s=!1:o&&(s=!0);const u=a?.id??null;let c=e.activeTriggerId,d=e.activeTriggerElement;return(u||n)&&(c=u,d=a??null),{open:n,preventUnmountingOnClose:s,activeTriggerId:c,activeTriggerElement:d,openedWithoutTrigger:n?a==null:e.openedWithoutTrigger}}function up(e){let n=!1;return e.preventUnmountOnClose=()=>{n=!0},()=>n}function Bk(e,n,a,o={}){const s=a.reason,u=s===qn,c=n&&s===El,d=!n&&(s===qa||s===Nc),p=up(a);if(e.context.onOpenChange?.(n,a),a.isCanceled)return;o.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(n,a);const g=()=>{const y=lp(e.state,n,a.trigger,p()),h={...o.extraState,...y};c?h.instantType="focus":d?h.instantType="dismiss":u&&(h.instantType=void 0),e.update(h)};u?cr.flushSync(g):g()}function qR(e,n,a,o){const s=a.useState("isMountedByTrigger",e),u=Fk(e,a),c=Be(p=>{const g=a.select("open"),y=a.select("activeTriggerId");if(y===e){const h={activeTriggerElement:p,...g?o:null};a.update(h);return}if(y==null&&g&&!a.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:p,...o};a.update(h)}}),d=Be(p=>{u(p),p&&c(p)});return _e(()=>(d(n.current),()=>d(null)),[d,n,a,e]),_e(()=>{if(s){const p={activeTriggerElement:n.current,...o};a.update(p)}},[s,a,n,...Object.values(o)]),{registerTrigger:d,isMountedByThisTrigger:s}}function cp(e,n={}){const{closeOnActiveTriggerUnmount:a=!1}=n,o=v.useRef(null),s=e.useState("open"),u=e.useState("triggerCount"),c=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");_e(()=>{if(!s){o.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const p=e.context.triggerElements.size,g={};e.state.triggerCount!==p&&(g.triggerCount=p);const y=e.select("activeTriggerId");let h=null;if(y){const b=e.context.triggerElements.getById(y);if(b)o.current=y,b!==e.state.activeTriggerElement&&(g.activeTriggerElement=b);else{for(const[S,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){g.activeTriggerId=S,g.activeTriggerElement=w,o.current=S;break}g.activeTriggerId===void 0&&(o.current===y?h=y:o.current=null)}}else o.current=null;if(!h&&!y&&!e.state.openedWithoutTrigger&&p===1){const b=e.context.triggerElements.entries().next();if(!b.done){const[S,w]=b.value;g.activeTriggerId=S,g.activeTriggerElement=w,o.current=S}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&a&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const b=dt(Hr);e.setOpen(!1,b),b.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,u,c,d,a])}function dp(e,n,a,o){const{mounted:s,transitionStatus:u,forceUnmount:c}=BR({open:e,ref:n.context.popupRef,preventUnmountOnClose:n.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>n.set("preventUnmountingOnClose",d),animateInitialOpen:o,onUnmount(){n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),a?.(),n.context.onOpenChangeComplete?.(!1)}});return er(()=>(n.set("mounted",s),null)),n.useSyncedValues({mounted:s,transitionStatus:u}),{forceUnmount:c,transitionStatus:u}}function fp(e,n){e.useSyncedValues(n),_e(()=>()=>{e.update({activeTriggerProps:$t,inactiveTriggerProps:$t,popupProps:$t})},[e])}function KR(e,n){_e(()=>{!n&&e.state.openMethod!==null&&e.set("openMethod",null)},[n,e]),_e(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Lc{idMap=new Map;add(n,a){this.idMap.set(n,a)}delete(n){this.idMap.delete(n)}hasElement(n){for(const a of this.idMap.values())if(a===n)return!0;return!1}hasMatchingElement(n){for(const a of this.idMap.values())if(n(a))return!0;return!1}getById(n){return this.idMap.get(n)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var T0={exports:{}},O0={};var VS;function Vk(){if(VS)return O0;VS=1;var e=Cc();function n(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}var a=typeof Object.is=="function"?Object.is:n,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(h,b){var S=b(),w=o({inst:{value:S,getSnapshot:b}}),C=w[0].inst,E=w[1];return u(function(){C.value=S,C.getSnapshot=b,p(C)&&E({inst:C})},[h,S,b]),s(function(){return p(C)&&E({inst:C}),h(function(){p(C)&&E({inst:C})})},[h]),c(S),S}function p(h){var b=h.getSnapshot;h=h.value;try{var S=b();return!a(h,S)}catch{return!0}}function g(h,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return O0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,O0}var qS;function YR(){return qS||(qS=1,T0.exports=Vk()),T0.exports}var hp=YR(),M0={exports:{}},A0={};var KS;function qk(){if(KS)return A0;KS=1;var e=Cc(),n=YR();function a(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var o=typeof Object.is=="function"?Object.is:a,s=n.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return A0.useSyncExternalStoreWithSelector=function(g,y,h,b,S){var w=u(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=d(function(){function T(P){if(!O){if(O=!0,M=P,P=b(P),S!==void 0&&C.hasValue){var j=C.value;if(S(j,P))return A=j}return A=P}if(j=A,o(M,P))return j;var D=b(P);return S!==void 0&&S(j,D)?(M=P,j):(M=P,A=D)}var O=!1,M,A,N=h===void 0?null:h;return[function(){return T(y())},N===null?void 0:function(){return T(N())}]},[y,h,b,S]);var E=s(g,w[0],w[1]);return c(function(){C.hasValue=!0,C.value=E},[E]),p(E),E},A0}var YS;function Kk(){return YS||(YS=1,M0.exports=qk()),M0.exports}var Yk=Kk();const Gk=rv(19),$k=Gk?Xk:Zk;function GR(e,n,a,o,s){return $k(e,n,a,o,s)}function Qk(e,n,a,o,s){const u=v.useCallback(()=>n(e.getSnapshot(),a,o,s),[e,n,a,o,s]);return hp.useSyncExternalStore(e.subscribe,u,u)}a4({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let n=!1;for(let a=0;a<e.syncHooks.length;a+=1){const o=e.syncHooks[a],s=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,s)||(n=!0,o.value=s)}return n&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=n=>{const a=new Set;for(const s of e.syncHooks)a.add(s.store);const o=[];for(const s of a)o.push(s.subscribe(n));return()=>{for(const s of o)s()}}),hp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Xk(e,n,a,o,s){const u=r4();if(!u)return Qk(e,n,a,o,s);const c=u.syncIndex;u.syncIndex+=1;let d;return u.didInitialize?(d=u.syncHooks[c],(d.store!==e||d.selector!==n||!Object.is(d.a1,a)||!Object.is(d.a2,o)||!Object.is(d.a3,s))&&(d.store!==e&&(u.didChangeStore=!0),d.store=e,d.selector=n,d.a1=a,d.a2=o,d.a3=s,d.value=n(e.getSnapshot(),a,o,s))):(d={store:e,selector:n,a1:a,a2:o,a3:s,value:n(e.getSnapshot(),a,o,s)},u.syncHooks.push(d)),d.value}function Zk(e,n,a,o,s){return Yk.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,u=>n(u,a,o,s))}class Jk{static create(n){return new this(n)}constructor(n){this.state=n,this.listeners=new Set,this.updateTick=0}subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)});getSnapshot=()=>this.state;setState(n){if(this.state===n)return;this.state=n,this.updateTick+=1;const a=this.updateTick;for(const o of this.listeners){if(a!==this.updateTick)return;o(n)}}update(n){for(const a in n)if(!Object.is(this.state[a],n[a])){this.setState({...this.state,...n});return}}set(n,a){Object.is(this.state[n],a)||this.setState({...this.state,[n]:a})}notifyAll(){const n={...this.state};this.setState(n)}use(n,a,o,s){return GR(this,n,a,o,s)}}class Bl extends Jk{constructor(n,a={},o){super(n),this.context=a,this.selectors=o}useSyncedValue(n,a){v.useDebugValue(n);const o=this;_e(()=>{o.state[n]!==a&&o.set(n,a)},[o,n,a])}useSyncedValueWithCleanup(n,a){const o=this;_e(()=>(o.state[n]!==a&&o.set(n,a),()=>{o.set(n,void 0)}),[o,n,a])}useSyncedValues(n){const a=this,o=Object.values(n);_e(()=>{a.update(n)},[a,...o])}useControlledProp(n,a){v.useDebugValue(n);const o=this,s=a!==void 0;_e(()=>{s&&!Object.is(o.state[n],a)&&o.setState({...o.state,[n]:a})},[o,n,a,s])}select(n,a,o,s){const u=this.selectors[n];return u(this.state,a,o,s)}useState(n,a,o,s){return v.useDebugValue(n),GR(this,this.selectors[n],a,o,s)}useContextCallback(n,a){v.useDebugValue(n);const o=Be(a??Sn);this.context[n]=o}useStateSetter(n){const a=v.useRef(void 0);return a.current===void 0&&(a.current=o=>{this.set(n,o)}),a.current}observe(n,a){let o;typeof n=="function"?o=n:o=this.selectors[n];let s=o(this.state);return a(s,s,this),this.subscribe(u=>{const c=o(u);if(!Object.is(s,c)){const d=s;s=c,a(c,d,this)}})}}const Wk={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 $R extends Bl{constructor(n){const{syncOnly:a,nested:o,onOpenChange:s,triggerElements:u,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:PR(),nested:o,triggerElements:u},Wk),this.syncOnly=a}syncOpenEvent=(n,a)=>{(!n||!this.state.open||a!=null&&g4(a))&&(this.context.dataRef.current.openEvent=n?a:void 0)};dispatchOpenChange=(n,a)=>{this.syncOpenEvent(n,a.event);const o={open:n,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",o)};setOpen=(n,a)=>{if(this.syncOnly){this.context.onOpenChange?.(n,a);return}this.dispatchOpenChange(n,a),this.context.onOpenChange?.(n,a)}}function pp(e,n,a=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new $R({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:a,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:$t,inactiveTriggerProps:$t,popupProps:$t}}const ac=e=>e.triggerIdProp??e.activeTriggerId,wh=e=>e.openProp??e.open,GS=e=>(e.popupElement?.id??e.floatingId)||void 0;function QR(e,n){return n!==void 0&&wh(e)&&ac(e)===n}function ej(e,n){return QR(e,n)?!0:n!==void 0&&wh(e)&&ac(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Lo={open:wh,mounted:e=>e.mounted,transitionStatus:e=>wh(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:ac,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:GS,isTriggerActive:(e,n)=>n!==void 0&&ac(e)===n,isOpenedByTrigger:(e,n)=>QR(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&ac(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>ej(e,n)?GS(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function XR(e){const n=v.useCallback(o=>e===void 0?Sn:e.subscribeStore(o),[e]),a=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return hp.useSyncExternalStore(n,a,()=>e?.serverStore)}function tj(e){const{open:n=!1,onOpenChange:a,elements:o={}}=e,s=Fl(),u=ki()!=null,c=er(()=>new $R({open:n,transitionStatus:void 0,onOpenChange:a,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Lc,floatingId:s,syncOnly:!1,nested:u})).current;return _e(()=>{const d={open:n,floatingId:s};o.reference!==void 0&&(d.referenceElement=o.reference,d.domReferenceElement=sn(o.reference)?o.reference:null),o.floating!==void 0&&(d.floatingElement=o.floating),c.update(d)},[n,s,o.reference,o.floating,c]),c.context.onOpenChange=a,c.context.nested=u,c}const D0=By&&ho;function ZR(e,n={}){const{enabled:a=!0,delay:o}=n,{events:s,dataRef:u}=e.context,c=v.useRef(!1),d=v.useRef(null),p=v.useRef(!0),g=Un();v.useEffect(()=>{const h=e.select("domReferenceElement");if(!a)return;const b=wn(h);function S(){const E=e.select("domReferenceElement");!e.select("open")&&yn(E)&&E===Qr(Gt(E))&&(c.current=!0,d.current=E)}function w(){p.current=!0}function C(){p.current=!1}return uo(jt(b,"blur",S),D0&&jt(b,"keydown",w,!0),D0&&jt(b,"pointerdown",C,!0))},[e,a]),v.useEffect(()=>{if(!a)return;function h(b){if(b.reason===qa||b.reason===Nc){const S=e.select("domReferenceElement");sn(S)&&(d.current=S,c.current=!0)}}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,a,e]);const y=v.useMemo(()=>{function h(){c.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(b){const S=b.currentTarget;if(c.current){if(d.current===S)return;h()}const w=tr(b.nativeEvent);if(sn(w)){if(D0&&!b.relatedTarget){if(!p.current&&!Dc(w))return}else if(!I4(w))return}const C=gh(b.relatedTarget,e.context.triggerElements),{nativeEvent:E,currentTarget:T}=b;if(e.select("open")&&C||!o){e.setOpen(!0,dt(El,E,T));return}g.start(o,()=>{c.current||e.setOpen(!0,dt(El,E,T))})},onBlur(b){h();const S=b.relatedTarget,w=b.nativeEvent,C=sn(S)&&S.hasAttribute(Ml("focus-guard"))&&S.getAttribute("data-type")==="outside";g.start(0,()=>{const E=e.select("domReferenceElement"),T=Qr(Gt(E));!S&&T===E||at(u.current.floatingContext?.refs.floating.current,T)||at(E,T)||C||gh(S??T,e.context.triggerElements)||e.setOpen(!1,dt(El,w))})}}},[u,o,e,g]);return v.useMemo(()=>a?{reference:y,trigger:y}:{},[a,y])}class cv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Da;restTimeout=new Da;handleCloseOptions=void 0;static create(){return new cv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Eh=new WeakMap;function Rh(e){if(!e.performedPointerEventsMutation)return;const n=e.pointerEventsScopeElement;n&&Eh.get(n)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Eh.delete(n)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function JR(e,n){const{scopeElement:a,referenceElement:o,floatingElement:s}=n,u=Eh.get(a);u&&u!==e&&Rh(u),Rh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=a,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=s,Eh.set(a,e),a.style.pointerEvents="none",o.style.pointerEvents="auto",s.style.pointerEvents="auto"}function dv(e){const n=e.context.dataRef.current,a=er(()=>n.hoverInteractionState??cv.create()).current;return n.hoverInteractionState||(n.hoverInteractionState=a),Fy(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function fv(e,n={}){const{enabled:a=!0,closeDelay:o=0,nodeId:s}=n,u=e.useState("open"),c=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:p}=e.context,g=ji(),y=ki(),h=dv(e),b=Un(),S=Be(()=>rR(p.current.openEvent?.type,h.interactedInside)),w=Be(()=>L4(p.current.openEvent?.type)),C=Be(()=>{Rh(h)});_e(()=>{u||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,C())},[u,h,C]),v.useEffect(()=>C,[C]),_e(()=>{if(a&&u&&h.handleCloseOptions?.blockPointerEvents&&w()&&sn(d)&&c){const E=d,T=c,O=Gt(c),M=g?.nodesRef.current.find(j=>j.id===y)?.context?.elements.floating;M&&(M.style.pointerEvents="");const A=h.pointerEventsScopeElement!==T?h.pointerEventsScopeElement:null,N=M!==T?M:null,P=h.handleCloseOptions?.getScope?.()??A??N??pc(E,"[data-rootownerid]")??O.body;return JR(h,{scopeElement:P,referenceElement:E,floatingElement:T}),()=>{C()}}},[a,u,d,c,h,w,g,y,C]),v.useEffect(()=>{if(!a)return;function E(){return!!(g&&y&&Mi(g.nodesRef.current,y).length>0)}function T(j){const D=vs(o,"close",h.pointerType),z=()=>{e.setOpen(!1,dt(qn,j)),g?.events.emit("floating.closed",j)};D?h.openChangeTimeout.start(D,z):(h.openChangeTimeout.clear(),z())}function O(j){const D=tr(j);if(!j4(D)){h.interactedInside=!1;return}h.interactedInside=pc(D,"[aria-haspopup]")!=null}function M(){h.openChangeTimeout.clear(),b.clear(),g?.events.off("floating.closed",N),C()}function A(j){if(E()&&g){g.events.on("floating.closed",N);return}if(gh(j.relatedTarget,e.context.triggerElements))return;const D=p.current.floatingContext?.nodeId??s,z=j.relatedTarget;if(!(g&&D&&sn(z)&&Mi(g.nodesRef.current,D,!1).some(G=>at(G.context?.elements.floating,z)))){if(h.handler){h.handler(j);return}C(),w()&&!S()&&T(j)}}function N(j){!g||!y||E()||b.start(0,()=>{g.events.off("floating.closed",N),e.setOpen(!1,dt(qn,j)),g.events.emit("floating.closed",j)})}const P=c;return uo(P&&jt(P,"mouseenter",M),P&&jt(P,"mouseleave",A),P&&jt(P,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",N)})},[a,c,e,p,o,s,w,S,C,h,g,y,b])}const nj={current:null};function WR(e,n={}){const{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:u=!1,restMs:c=0,move:d=!0,triggerElementRef:p=nj,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:h,isClosing:b,shouldOpen:S,guardStaleOpen:w=!1}=n,{dataRef:C,events:E}=e.context,T=ji(g),O=dv(e),M=v.useRef(!1),A=Ln(s),N=Ln(o),P=Ln(c),j=Ln(a),D=Ln(S),z=Ln(b),F=Be(()=>rR(C.current.openEvent?.type,O.interactedInside)),G=Be(()=>D.current?.()!==!1),J=Be((U,L,$)=>{const Y=e.context.triggerElements;if(Y.hasElement(L))return!U||!at(U,L);if(!sn($))return!1;const V=$;return Y.hasMatchingElement(Q=>at(Q,V))&&(!U||!at(U,V))}),K=Be(()=>{if(!O.handler)return;Gt(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),H=Be(()=>{Rh(O)});return y&&(O.handleCloseOptions=s?.__options),v.useEffect(()=>K,[K]),v.useEffect(()=>{if(!a)return;function U(L){L.open?M.current=!1:(M.current=L.reason===qn,K(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return E.on("openchange",U),()=>{E.off("openchange",U)}},[a,E,O,K]),v.useEffect(()=>{if(!a)return;function U(ee,q=!0){const se=vs(N.current,"close",O.pointerType);se?O.openChangeTimeout.start(se,()=>{e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee)}):q&&(O.openChangeTimeout.clear(),e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee))}const L=p.current??(y?e.select("domReferenceElement"):null);if(!sn(L))return;function $(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,u&&!Ci(O.pointerType))return;const q=ES(P.current),se=vs(N.current,"open",O.pointerType),k=tr(ee),B=ee.currentTarget??null,W=e.select("domReferenceElement");let re=B;if(sn(k)&&!e.context.triggerElements.hasElement(k)){for(const Me of e.context.triggerElements.elements())if(at(Me,k)){re=Me;break}}sn(B)&&sn(W)&&!e.context.triggerElements.hasElement(B)&&at(B,W)&&(re=W);const Ee=re==null?!1:J(W,re,k),le=e.select("open"),me=z.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&M.current,ce=!Ee&&sn(re)&&sn(W)&&at(W,re)&&ge,Te=q>0&&!se,ve=Ee&&(le||ge)||ce,Pe=!le||Ee;if(ve){G()&&e.setOpen(!0,dt(qn,ee,re));return}Te||(se?O.openChangeTimeout.start(se,()=>{Pe&&G()&&e.setOpen(!0,dt(qn,ee,re))}):Pe&&G()&&e.setOpen(!0,dt(qn,ee,re)))}function Y(ee){if(F()){H();return}K();const q=e.select("domReferenceElement"),se=Gt(q);O.restTimeout.clear(),O.restTimeoutPending=!1;const k=C.current.floatingContext??h?.();if(gh(ee.relatedTarget,e.context.triggerElements))return;if(A.current&&k){e.select("open")||O.openChangeTimeout.clear();const W=p.current;O.handler=A.current({...k,tree:T,x:ee.clientX,y:ee.clientY,onClose(){H(),K(),j.current&&!F()&&W===e.select("domReferenceElement")&&U(ee,!0)}}),se.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!at(e.select("floatingElement"),ee.relatedTarget))&&U(ee)}function V(ee){at(L,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const Q=w?jt(L,"mouseout",V):void 0;return d?uo(jt(L,"mousemove",$,{once:!0}),jt(L,"mouseenter",$),jt(L,"mouseleave",Y),Q):uo(jt(L,"mouseenter",$),jt(L,"mouseleave",Y),Q)},[K,H,C,N,e,a,A,O,y,J,F,u,d,P,p,T,j,h,z,G,w]),v.useMemo(()=>{if(!a)return;function U(L){O.pointerType=L.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(L){const{nativeEvent:$}=L,Y=L.currentTarget,V=e.select("domReferenceElement"),Q=e.select("open"),ee=J(V,Y,L.target);if(u&&!Ci(O.pointerType))return;if(Q&&ee&&O.handleCloseOptions?.blockPointerEvents){const k=e.select("floatingElement");if(k){const B=O.handleCloseOptions?.getScope?.()??Y.ownerDocument.body;JR(O,{scopeElement:B,referenceElement:Y,floatingElement:k})}}const q=ES(P.current);if(Q&&!ee||q===0||!ee&&O.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;O.restTimeout.clear();function se(){if(O.restTimeoutPending=!1,F())return;const k=e.select("open");!O.blockMouseMove&&(!k||ee)&&G()&&e.setOpen(!0,dt(qn,$,Y))}O.pointerType==="touch"?cr.flushSync(()=>{se()}):ee&&Q?se():(O.restTimeoutPending=!0,O.restTimeout.start(q,se))}}},[a,O,F,J,u,e,P,G])}function $S(e){return ho&&e.movementX===0&&e.movementY===0}function gp(e,n,a){switch(e){case"vertical":return n;case"horizontal":return a;default:return n||a}}function kf(e,n){return gp(n,e===eR||e===$y,e===Xh||e===Zh)}function N0(e,n,a){return gp(n,e===$y,a?e===Xh:e===Zh)||e==="Enter"||e===" "||e===""}function rj(e,n,a){return gp(n,a?e===Xh:e===Zh,e===$y)}function aj(e,n,a,o){const s=a?e===Zh:e===Xh,u=e===eR;return n==="both"||n==="horizontal"&&o?e==="Escape":gp(n,s,u)}function eC(e,n){const{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:p=!1,nested:g=!1,rtl:y=!1,virtual:h=!1,focusItemOnOpen:b="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:E="vertical",triggerOrientation:T=E,parentOrientation:O,id:M,resetOnPointerLeave:A=!0,externalTree:N,nestedReturnFocusRef:P,grid:j}=n,D=j!=null,z=e.useState("open"),F=e.useState("floatingElement"),G=e.useState("domReferenceElement"),J=e.context.dataRef,K=mh(F),H=oy(G),U=Ln(K),L=ki(),$=ji(N),Y=v.useRef(b),V=v.useRef(c??-1),Q=v.useRef(null),ee=v.useRef(!0),q=Be(de=>{s(V.current===-1?null:V.current,de)}),se=v.useRef(!!F),k=v.useRef(z),B=v.useRef(!1),W=v.useRef(!1),re=v.useRef(null),Ee=Ln(C),le=Ln(z),me=Ln(c),ge=Ln(A),ce=Pl(),Te=Pl(),ve=Be(()=>{ce.cancel();function de(ke){h||(re.current=eh(ke,{sync:B.current,preventScroll:!0}))}const we=a.current[V.current],Ye=W.current;we&&de(we),(B.current?ke=>ke():ke=>ce.request(ke))(()=>{const ke=a.current[V.current]||we;if(!ke)return;we||de(ke),Ue&&(Ye||!ee.current)&&ke.scrollIntoView?.({block:"nearest",inline:"nearest"})})});_e(()=>{J.current.orientation=E},[J,E]),_e(()=>{z||(Q.current=null),(!z||b!=="auto")&&(Y.current=b)},[z,b]),_e(()=>{u&&(z&&F?(V.current=c??-1,Y.current&&c!=null&&(W.current=!0,q())):se.current&&(V.current=-1,q()))},[u,z,F,c,q]),_e(()=>{if(u){if(!z){B.current=!1;return}if(F)if(o==null){if(B.current=!1,me.current!=null)return;if(se.current&&(V.current=-1,ve()),(!k.current||!se.current)&&Y.current&&(Q.current!=null||Y.current===!0&&Q.current==null)){let de=0;const we=()=>{a.current[0]==null?(de<2&&(de?De=>Te.request(De):queueMicrotask)(we),de+=1):(V.current=Q.current==null||N0(Q.current,T,y)||g?Wf(a):sy(a),Q.current=null,q())};we()}}else Rl(a.current,o)||(V.current=o,ve(),W.current=!1)}},[u,z,F,o,me,g,a,T,y,q,ve,Te]),_e(()=>{if(!u||F||!$||h||!se.current)return;const de=$.nodesRef.current,we=de.find(ke=>ke.id===L)?.context?.elements.floating,Ye=Qr(Gt(G??we??null)),De=de.some(ke=>ke.context&&at(ke.context.elements.floating,Ye));we&&!De&&ee.current&&we.focus({preventScroll:!0})},[u,F,G,$,L,h]),_e(()=>{k.current=z,se.current=!!F});const Pe=o!=null,Me=Be(de=>{if(!le.current)return;const we=a.current.indexOf(de.currentTarget);we!==-1&&(V.current!==we||o!==we)&&(V.current=we,q(de))}),Le=Be(()=>O??$?.nodesRef.current.find(de=>de.id===L)?.context?.dataRef?.current.orientation),Fe=Be(()=>Wf(a,Ee.current)),Oe=Be(de=>{if(ee.current=!1,B.current=!0,de.which===229||!le.current&&de.currentTarget===U.current)return;if(g&&aj(de.key,E,y,D)){kf(de.key,Le())||Ba(de),e.setOpen(!1,dt(yh,de.nativeEvent));const ke=P?.current??G;yn(ke)&&ke.focus();return}o!=null&&o!==V.current&&!Rl(a.current,o)&&(V.current=o);const we=V.current,Ye=Wf(a,C),De=sy(a,C);if(H||(de.key==="Home"&&(Ba(de),V.current=Ye,q(de)),de.key==="End"&&(Ba(de),V.current=De,q(de))),j!=null){const ke=j(de,V.current,a,E,p,y,C,Ye,De);if(ke!=null&&ke!==V.current&&(V.current=ke,q(de)),E==="both")return}if(kf(de.key,E)){Ba(de);const ke=Qr(de.currentTarget.ownerDocument);if(z&&!h&&at(de.currentTarget,ke)&&!a.current.some(ht=>ht!=null&&at(ht,ke))){V.current=N0(de.key,E,y)?Ye:De,q(de),o===V.current&&ve();return}const{index:yt,wrapped:ut}=ik(a.current,we,{decrement:!N0(de.key,E,y),loopFocus:p,allowEscape:d,disabledIndices:C,minIndex:Ye,maxIndex:De});ut&&(B.current=!1),V.current=yt,q(de)}}),Ue=v.useMemo(()=>({onFocus(we){B.current=!0,Me(we)},onClick({currentTarget:we}){h||we.focus({preventScroll:!0})},onMouseMove(we){$S(we)||(B.current=!0,W.current=!1,S&&Me(we))},onPointerLeave(we){if(!le.current||!ee.current||we.pointerType==="touch")return;B.current=!0;const Ye=we.relatedTarget;if(!(!S||a.current.includes(Ye))&&ge.current&&(re.current?.(),re.current=null,V.current=-1,q(we),!h)){const De=U.current,ke=Qr(Gt(De));De&&at(De,ke)&&De.focus({preventScroll:!0})}}}),[Me,le,U,S,a,q,ge,h]),be=v.useMemo(()=>h&&z&&Pe&&{"aria-activedescendant":`${M}-${o}`},[h,z,Pe,M,o]),He=v.useMemo(()=>({...H?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&z&&!h){const we=tr(de.nativeEvent);if(we&&!at(U.current,we))return;Ba(de);const Ye=dt(Ti,de.nativeEvent);e.setOpen(!1,Ye);const De=P?.current??G;!Ye.isCanceled&&yn(De)&&De.focus();return}Oe(de)},onPointerMove(de){$S(de)||(ee.current=!0)}}),[be,Oe,U,H,e,z,h,G,P]),Ze=v.useMemo(()=>{function de(De){e.setOpen(!0,dt(yh,De.nativeEvent,De.currentTarget))}function we(De){b==="auto"&&Il(De.nativeEvent)&&(Y.current=!h)}function Ye(De){Y.current=b,b==="auto"&&qy(De.nativeEvent)&&(Y.current=!0)}return{onKeyDown(De){const ke=e.select("open");ee.current=!1;const yt=De.key.startsWith("Arrow"),ut=rj(De.key,Le(),y),ht=kf(De.key,ke?E:T),Ot=(g?ut:ht)||De.key==="Enter"||De.key.trim()==="";if(h&&ke&&(!g||Dc(De.currentTarget)))return Oe(De);if(!(!ke&&!w&&yt)){if(Ot){const Dt=kf(De.key,Le());Q.current=g&&Dt?null:De.key}if(g){ut&&(Ba(De),ke?(V.current=Fe(),q(De),h&&U.current?.focus()):de(De));return}ht&&(me.current!=null&&(V.current=me.current),Ba(De),!ke&&w?de(De):Oe(De),ke&&q(De))}},onFocus(De){De.target===De.currentTarget&&e.select("open")&&!h&&(V.current=-1,q(De))},onPointerDown:Ye,onPointerEnter:Ye,onMouseDown:we,onClick:we}},[Oe,b,Fe,g,q,e,w,E,T,Le,y,me,h,U]),it=v.useMemo(()=>({...be,...Ze}),[be,Ze]);return v.useMemo(()=>u?{reference:it,floating:He,item:Ue,trigger:Ze}:{},[u,it,He,Ze,Ue])}function tC(e,n){const{listRef:a,elementsRef:o,activeIndex:s,onMatch:u,disabledIndices:c,onTyping:d,enabled:p=!0,resetMs:g=750,selectedIndex:y=null}=n,h=Be(d),b=e.useState("open"),S=Un(),w=v.useRef(""),C=v.useRef(y??s??-1),E=v.useRef(null),T=Be(A=>{function N(H){return o?.current[H]}function P(H){const U=N(H);return U&&!tp(U)||U?.matches(":disabled")?!1:c==null||!Tl(fo,H,c)}function j(H,U,L=0){if(H.length===0)return-1;const $=(L%H.length+H.length)%H.length,Y=U.toLowerCase();for(let V=0;V<H.length;V+=1){const Q=($+V)%H.length;if(!(!H[Q]?.toLowerCase().startsWith(Y)||!P(Q)))return Q}return-1}const D=a.current;if(w.current.length>0&&A.key===" "&&(Ba(A),h?.(!0)),w.current.length>0&&w.current[0]!==" "&&j(D,w.current)===-1&&A.key!==" "&&h?.(!1),D==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;b&&A.key!==" "&&(Ba(A),h?.(!0));const z=w.current==="";z&&(C.current=y??s??-1),D.every((H,U)=>H&&P(U)?H[0]?.toLowerCase()!==H[1]?.toLowerCase():!0)&&w.current===A.key&&(w.current="",C.current=E.current),w.current+=A.key,S.start(g,()=>{w.current="",C.current=E.current,h?.(!1)});const J=((z?y??s??-1:C.current)??0)+1,K=j(D,w.current,J);K!==-1?(u?.(K,A),E.current=K):A.key!==" "&&(w.current="",h?.(!1))}),O=Be(A=>{const N=A.relatedTarget,P=e.select("domReferenceElement"),j=e.select("floatingElement");at(P,N)||at(j,N)||(S.clear(),w.current="",C.current=E.current,h?.(!1))});_e(()=>{!b&&y!==null||(S.clear(),E.current=null,w.current!==""&&(w.current="",h?.(!1)))},[b,y,S,h]);const M=v.useMemo(()=>({onKeyDown:T,onBlur:O}),[T,O]);return v.useMemo(()=>p?{reference:M,floating:M}:{},[p,M])}const QS=.1,oj=QS*QS,xn=.5;function jf(e,n,a,o,s,u){return o>=n!=u>=n&&e<=(s-a)*(n-o)/(u-o)+a}function If(e,n,a,o,s,u,c,d,p,g){let y=!1;return jf(e,n,a,o,s,u)&&(y=!y),jf(e,n,s,u,c,d)&&(y=!y),jf(e,n,c,d,p,g)&&(y=!y),jf(e,n,p,g,a,o)&&(y=!y),y}function ij(e,n,a){return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Pf(e,n,a,o,s,u){const c=Math.min(a,s),d=Math.max(a,s),p=Math.min(o,u),g=Math.max(o,u);return e>=c&&e<=d&&n>=p&&n<=g}function nC(e={}){const{blockPointerEvents:n=!1}=e,a=new Da,o=({x:s,y:u,placement:c,elements:d,onClose:p,nodeId:g,tree:y})=>{const h=c?.split("-")[0];let b=!1,S=null,w=null,C=typeof performance<"u"?performance.now():0;function E(O,M){const A=performance.now(),N=A-C;if(S===null||w===null||N===0)return S=O,w=M,C=A,!1;const P=O-S,j=M-w,D=P*P+j*j,z=N*N*oj;return S=O,w=M,C=A,D<z}function T(){a.clear(),p()}return function(M){a.clear();const A=d.domReference,N=d.floating;if(!A||!N||h==null||s==null||u==null)return;const{clientX:P,clientY:j}=M,D=tr(M),z=M.type==="mouseleave",F=at(N,D),G=at(A,D);if(F&&(b=!0,!z))return;if(G&&(b=!1,!z)){b=!0;return}if(z&&sn(M.relatedTarget)&&at(N,M.relatedTarget))return;function J(){return!!(y&&Mi(y.nodesRef.current,g).length>0)}function K(){J()||T()}if(J())return;const H=A.getBoundingClientRect(),U=N.getBoundingClientRect(),L=s>U.right-U.width/2,$=u>U.bottom-U.height/2,Y=U.width>H.width,V=U.height>H.height,Q=(Y?H:U).left,ee=(Y?H:U).right,q=(V?H:U).top,se=(V?H:U).bottom;if(h==="top"&&u>=H.bottom-1||h==="bottom"&&u<=H.top+1||h==="left"&&s>=H.right-1||h==="right"&&s<=H.left+1){K();return}let k=!1;switch(h){case"top":k=Pf(P,j,Q,H.top+1,ee,U.bottom-1);break;case"bottom":k=Pf(P,j,Q,U.top+1,ee,H.bottom-1);break;case"left":k=Pf(P,j,U.right-1,se,H.left+1,q);break;case"right":k=Pf(P,j,H.right-1,se,U.left+1,q);break}if(k)return;if(b&&!ij(P,j,H)){K();return}if(!z&&E(P,j)){K();return}let B=!1;switch(h){case"top":{const W=Y?xn/2:xn*4,re=Y||L?s+W:s-W,Ee=Y?s-W:L?s+W:s-W,le=u+xn+1,me=L||Y?U.bottom-xn:U.top,ge=L?Y?U.bottom-xn:U.top:U.bottom-xn;B=If(P,j,re,le,Ee,le,U.left,me,U.right,ge);break}case"bottom":{const W=Y?xn/2:xn*4,re=Y||L?s+W:s-W,Ee=Y?s-W:L?s+W:s-W,le=u-xn,me=L||Y?U.top+xn:U.bottom,ge=L?Y?U.top+xn:U.bottom:U.top+xn;B=If(P,j,re,le,Ee,le,U.left,me,U.right,ge);break}case"left":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Ee=V?u-W:$?u+W:u-W,le=s+xn+1,me=$||V?U.right-xn:U.left,ge=$?V?U.right-xn:U.left:U.right-xn;B=If(P,j,me,U.top,ge,U.bottom,le,re,le,Ee);break}case"right":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Ee=V?u-W:$?u+W:u-W,le=s-xn,me=$||V?U.left+xn:U.right,ge=$?V?U.left+xn:U.right:U.left+xn;B=If(P,j,le,re,le,Ee,me,U.top,ge,U.bottom);break}}B?b||a.start(40,K):K()}};return o.__options={...e,blockPointerEvents:n},o}function XS(e,n,a){let{reference:o,floating:s}=e;const u=Ma(n),c=ev(n),d=Wy(c),p=da(n),g=u==="y",y=o.x+o.width/2-s.width/2,h=o.y+o.height/2-s.height/2,b=o[d]/2-s[d]/2;let S;switch(p){case"top":S={x:y,y:o.y-s.height};break;case"bottom":S={x:y,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:h};break;case"left":S={x:o.x-s.width,y:h};break;default:S={x:o.x,y:o.y}}const w=co(n);return w&&(S[c]+=b*(w==="end"?1:-1)*(a&&g?-1:1)),S}async function sj(e,n){var a;n===void 0&&(n={});const{x:o,y:s,platform:u,rects:c,elements:d,strategy:p}=e,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:h="floating",altBoundary:b=!1,padding:S=0}=Oi(n,e),w=dR(S),E=d[b?h==="floating"?"reference":"floating":h],T=gc(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(E)))==null||a?E:E.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:g,rootBoundary:y,strategy:p})),O=h==="floating"?{x:o,y:s,width:c.floating.width,height:c.floating.height}:c.reference,M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),A=await(u.isElement==null?void 0:u.isElement(M))&&await(u.getScale==null?void 0:u.getScale(M))||{x:1,y:1},N=gc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:M,strategy:p}):O);return{top:(T.top-N.top+w.top)/A.y,bottom:(N.bottom-T.bottom+w.bottom)/A.y,left:(T.left-N.left+w.left)/A.x,right:(N.right-T.right+w.right)/A.x}}const lj=50,uj=async(e,n,a)=>{const{placement:o="bottom",strategy:s="absolute",middleware:u=[],platform:c}=a,d=c.detectOverflow?c:{...c,detectOverflow:sj},p=await(c.isRTL==null?void 0:c.isRTL(n));let g=await c.getElementRects({reference:e,floating:n,strategy:s}),{x:y,y:h}=XS(g,o,p),b=o,S=0;const w={};for(let C=0;C<u.length;C++){const E=u[C];if(!E)continue;const{name:T,fn:O}=E,{x:M,y:A,data:N,reset:P}=await O({x:y,y:h,initialPlacement:o,placement:b,strategy:s,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:n}});y=M??y,h=A??h,w[T]={...w[T],...N},P&&S<lj&&(S++,typeof P=="object"&&(P.placement&&(b=P.placement),P.rects&&(g=P.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:s}):P.rects),{x:y,y:h}=XS(g,b,p)),C=-1)}return{x:y,y:h,placement:b,strategy:s,middlewareData:w}},cj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var a,o;const{placement:s,middlewareData:u,rects:c,initialPlacement:d,platform:p,elements:g}=n,{mainAxis:y=!0,crossAxis:h=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...E}=Oi(e,n);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const T=da(s),O=Ma(d),M=da(d)===d,A=await(p.isRTL==null?void 0:p.isRTL(g.floating)),N=b||(M||!C?[bh(d)]:ek(d)),P=w!=="none";!b&&P&&N.push(...ak(d,C,w,A));const j=[d,...N],D=await p.detectOverflow(n,E),z=[];let F=((o=u.flip)==null?void 0:o.overflows)||[];if(y&&z.push(D[T]),h){const H=W4(s,c,A);z.push(D[H[0]],D[H[1]])}if(F=[...F,{placement:s,overflows:z}],!z.every(H=>H<=0)){var G,J;const H=(((G=u.flip)==null?void 0:G.index)||0)+1,U=j[H];if(U&&(!(h==="alignment"?O!==Ma(U):!1)||F.every(Y=>Ma(Y.placement)===O?Y.overflows[0]>0:!0)))return{data:{index:H,overflows:F},reset:{placement:U}};let L=(J=F.filter($=>$.overflows[0]<=0).sort(($,Y)=>$.overflows[1]-Y.overflows[1])[0])==null?void 0:J.placement;if(!L)switch(S){case"bestFit":{var K;const $=(K=F.filter(Y=>{if(P){const V=Ma(Y.placement);return V===O||V==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(V=>V>0).reduce((V,Q)=>V+Q,0)]).sort((Y,V)=>Y[1]-V[1])[0])==null?void 0:K[0];$&&(L=$);break}case"initialPlacement":L=d;break}if(s!==L)return{reset:{placement:L}}}return{}}}},rC=new Set(["left","top"]);async function dj(e,n){const{placement:a,platform:o,elements:s}=e,u=await(o.isRTL==null?void 0:o.isRTL(s.floating)),c=da(a),d=co(a),p=Ma(a)==="y",g=rC.has(c)?-1:1,y=u&&p?-1:1,h=Oi(n,e);let{mainAxis:b,crossAxis:S,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof w=="number"&&(S=d==="end"?w*-1:w),p?{x:S*y,y:b*g}:{x:b*g,y:S*y}}const fj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var a,o;const{x:s,y:u,placement:c,middlewareData:d}=n,p=await dj(n,e);return c===((a=d.offset)==null?void 0:a.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:c}}}}},hj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:a,y:o,placement:s,platform:u}=n,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:O=>{let{x:M,y:A}=O;return{x:M,y:A}}},...g}=Oi(e,n),y={x:a,y:o},h=await u.detectOverflow(n,g),b=Ma(s),S=Jy(b);let w=y[S],C=y[b];const E=(O,M)=>cR(M+h[O==="y"?"top":"left"],M,M-h[O==="y"?"bottom":"right"]);c&&(w=E(S,w)),d&&(C=E(b,C));const T=p.fn({...n,[S]:w,[b]:C});return{...T,data:{x:T.x-a,y:T.y-o,enabled:{[S]:c,[b]:d}}}}}},pj=function(e){return e===void 0&&(e={}),{options:e,fn(n){var a,o;const{x:s,y:u,placement:c,rects:d,middlewareData:p}=n,{offset:g=0,mainAxis:y=!0,crossAxis:h=!0}=Oi(e,n),b={x:s,y:u},S=Ma(c),w=Jy(S);let C=b[w],E=b[S];const T=Oi(g,n),O=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(a=T.mainAxis)!=null?a:0,crossAxis:(o=T.crossAxis)!=null?o:0};if(y){const N=w==="y"?"height":"width",P=d.reference[w]-d.floating[N]+O.mainAxis,j=d.reference[w]+d.reference[N]-O.mainAxis;C<P?C=P:C>j&&(C=j)}if(h){var M,A;const N=w==="y"?"width":"height",P=rC.has(da(c)),j=d.reference[S]-d.floating[N]+(P&&((M=p.offset)==null?void 0:M[S])||0)+(P?0:O.crossAxis),D=d.reference[S]+d.reference[N]+(P?0:((A=p.offset)==null?void 0:A[S])||0)-(P?O.crossAxis:0);E<j?E=j:E>D&&(E=D)}return{[w]:C,[S]:E}}}},gj=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:a,rects:o,platform:s,elements:u}=n,{apply:c=()=>{},...d}=Oi(e,n),p=await s.detectOverflow(n,d),g=da(a),y=co(a),h=Ma(a)==="y",{width:b,height:S}=o.floating;let w,C;g==="top"||g==="bottom"?(w=g,C=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(C=g,w=y==="end"?"top":"bottom");const E=S-p.top-p.bottom,T=b-p.left-p.right,O=zl(S-p[w],E),M=zl(b-p[C],T),A=n.middlewareData.shift,N=!A;let P=O,j=M;A!=null&&A.enabled.x&&(j=T),A!=null&&A.enabled.y&&(P=E),N&&!y&&(h?j=b-2*Uo(p.left,p.right):P=S-2*Uo(p.top,p.bottom)),await c({...n,availableWidth:j,availableHeight:P});const D=await s.getDimensions(u.floating);return b!==D.width||S!==D.height?{reset:{rects:!0}}:{}}}};function aC(e){const n=ha(e);let a=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const s=yn(e),u=s?e.offsetWidth:a,c=s?e.offsetHeight:o,d=vh(a)!==u||vh(o)!==c;return d&&(a=u,o=c),{width:a,height:o,$:d}}function hv(e){return sn(e)?e:e.contextElement}function Al(e){const n=hv(e);if(!yn(n))return Ho(1);const a=n.getBoundingClientRect(),{width:o,height:s,$:u}=aC(n);let c=(u?vh(a.width):a.width)/o,d=(u?vh(a.height):a.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const mj=Ho(0);function oC(e){const n=wn(e);return!Gy()||!n.visualViewport?mj:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function yj(e,n,a){return n===void 0&&(n=!1),!!a&&n&&a===wn(e)}function bs(e,n,a,o){n===void 0&&(n=!1),a===void 0&&(a=!1);const s=e.getBoundingClientRect(),u=hv(e);let c=Ho(1);n&&(o?sn(o)&&(c=Al(o)):c=Al(e));const d=yj(u,a,o)?oC(u):Ho(0);let p=(s.left+d.x)/c.x,g=(s.top+d.y)/c.y,y=s.width/c.x,h=s.height/c.y;if(u&&o){const b=wn(u),S=sn(o)?wn(o):o;let w=b,C=ny(w);for(;C&&S!==w;){const E=Al(C),T=C.getBoundingClientRect(),O=ha(C),M=T.left+(C.clientLeft+parseFloat(O.paddingLeft))*E.x,A=T.top+(C.clientTop+parseFloat(O.paddingTop))*E.y;p*=E.x,g*=E.y,y*=E.x,h*=E.y,p+=M,g+=A,w=wn(C),C=ny(w)}}return gc({width:y,height:h,x:p,y:g})}function mp(e,n){const a=Qh(e).scrollLeft;return n?n.left+a:bs(Bo(e)).left+a}function iC(e,n){const a=e.getBoundingClientRect(),o=a.left+n.scrollLeft-mp(e,a),s=a.top+n.scrollTop;return{x:o,y:s}}function vj(e){let{elements:n,rect:a,offsetParent:o,strategy:s}=e;const u=s==="fixed",c=Bo(o),d=n?$h(n.floating):!1;if(o===c||d&&u)return a;let p={scrollLeft:0,scrollTop:0},g=Ho(1);const y=Ho(0),h=yn(o);if((h||!u)&&((Sr(o)!=="body"||Mc(c))&&(p=Qh(o)),h)){const S=bs(o);g=Al(o),y.x=S.x+o.clientLeft,y.y=S.y+o.clientTop}const b=c&&!h&&!u?iC(c,p):Ho(0);return{width:a.width*g.x,height:a.height*g.y,x:a.x*g.x-p.scrollLeft*g.x+y.x+b.x,y:a.y*g.y-p.scrollTop*g.y+y.y+b.y}}function bj(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xj(e){const n=Qh(e),a=e.ownerDocument.body,o=Uo(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),s=Uo(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+mp(e);const c=-n.scrollTop;return ha(a).direction==="rtl"&&(u+=Uo(e.clientWidth,a.clientWidth)-o),{width:o,height:s,x:u,y:c}}const Sj=25;function wj(e,n,a){a===void 0&&(a="viewport");const o=a==="layoutViewport",s=wn(e),u=Bo(e),c=s.visualViewport;let d=u.clientWidth,p=u.clientHeight,g=0,y=0;if(c){const b=!Gy()||n==="fixed";o?b||(g=-c.offsetLeft,y=-c.offsetTop):(d=c.width,p=c.height,b&&(g=c.offsetLeft,y=c.offsetTop))}if(mp(u)<=0){const b=u.ownerDocument,S=b.body,w=getComputedStyle(S),C=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(u.clientWidth-S.clientWidth-C),T=getComputedStyle(u).scrollbarGutter==="stable both-edges"?E/2:E;T<=Sj&&(d-=T)}return{width:d,height:p,x:g,y}}function Ej(e,n){const a=bs(e,!0,n==="fixed"),o=a.top+e.clientTop,s=a.left+e.clientLeft,u=Al(e),c=e.clientWidth*u.x,d=e.clientHeight*u.y,p=s*u.x,g=o*u.y;return{width:c,height:d,x:p,y:g}}function ZS(e,n,a){let o;if(n==="viewport"||n==="layoutViewport")o=wj(e,a,n);else if(n==="document")o=xj(Bo(e));else if(sn(n))o=Ej(n,a);else{const s=oC(e);o={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return gc(o)}function Rj(e,n){const a=n.get(e);if(a)return a;let o=hc(e,[],!1).filter(d=>sn(d)&&Sr(d)!=="body"),s=null;const u=ha(e).position==="fixed";let c=u?Fo(e):e;for(;sn(c)&&!_o(c);){const d=ha(c),p=Yy(c),g=s?s.position:u?"fixed":"";!p&&(g==="fixed"||g==="absolute"&&d.position==="static")?o=o.filter(h=>h!==c):s=d,c=Fo(c)}return n.set(e,o),o}function Cj(e){let{element:n,boundary:a,rootBoundary:o,strategy:s}=e;const c=[...a==="clippingAncestors"?$h(n)?[]:Rj(n,this._c):[].concat(a),o],d=ZS(n,c[0],s);let p=d.top,g=d.right,y=d.bottom,h=d.left;for(let b=1;b<c.length;b++){const S=ZS(n,c[b],s);p=Uo(S.top,p),g=zl(S.right,g),y=zl(S.bottom,y),h=Uo(S.left,h)}return{width:g-h,height:y-p,x:h,y:p}}function Tj(e){const{width:n,height:a}=aC(e);return{width:n,height:a}}function Oj(e,n,a){const o=yn(n),s=Bo(n),u=a==="fixed",c=bs(e,!0,u,n);let d={scrollLeft:0,scrollTop:0};const p=Ho(0);if((o||!u)&&((Sr(n)!=="body"||Mc(s))&&(d=Qh(n)),o)){const b=bs(n,!0,u,n);p.x=b.x+n.clientLeft,p.y=b.y+n.clientTop}!o&&s&&(p.x=mp(s));const g=s&&!o&&!u?iC(s,d):Ho(0),y=c.left+d.scrollLeft-p.x-g.x,h=c.top+d.scrollTop-p.y-g.y;return{x:y,y:h,width:c.width,height:c.height}}function k0(e){return ha(e).position==="static"}function JS(e,n){if(!yn(e)||ha(e).position==="fixed")return null;if(n)return n(e);let a=e.offsetParent;return Bo(e)===a&&(a=a.ownerDocument.body),a}function sC(e,n){const a=wn(e);if($h(e))return a;if(!yn(e)){let s=Fo(e);for(;s&&!_o(s);){if(sn(s)&&!k0(s))return s;s=Fo(s)}return a}let o=JS(e,n);for(;o&&m4(o)&&k0(o);)o=JS(o,n);return o&&_o(o)&&k0(o)&&!Yy(o)?a:o||b4(e)||a}const Mj=async function(e){const n=this.getOffsetParent||sC,a=this.getDimensions,o=await a(e.floating);return{reference:Oj(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Aj(e){return ha(e).direction==="rtl"}const lC={convertOffsetParentRelativeRectToViewportRelativeRect:vj,getDocumentElement:Bo,getClippingRect:Cj,getOffsetParent:sC,getElementRects:Mj,getClientRects:bj,getDimensions:Tj,getScale:Al,isElement:sn,isRTL:Aj};function uC(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Dj(e,n,a){let o=null,s;const u=Bo(e);function c(){var y;clearTimeout(s),(y=o)==null||y.disconnect(),o=null}function d(y,h){y===void 0&&(y=!1),h===void 0&&(h=1),c();const b=e.getBoundingClientRect(),{left:S,top:w,width:C,height:E}=b;if(y||n(),!C||!E)return;const T=Mf(w),O=Mf(u.clientWidth-(S+C)),M=Mf(u.clientHeight-(w+E)),A=Mf(S),P={rootMargin:-T+"px "+-O+"px "+-M+"px "+-A+"px",threshold:Uo(0,zl(1,h))||1};let j=!0;function D(z){const F=z[0].intersectionRatio;if(!uC(b,e.getBoundingClientRect()))return d();if(F!==h){if(!j)return d();F?d(!1,F):s=setTimeout(()=>{d(!1,1e-7)},1e3)}j=!1}try{o=new IntersectionObserver(D,{...P,root:u.ownerDocument})}catch{o=new IntersectionObserver(D,P)}o.observe(e)}const p=wn(e),g=()=>d(a);return p.addEventListener("resize",g),d(!0),()=>{p.removeEventListener("resize",g),c()}}function WS(e,n,a,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,g=hv(e),y=s||u?[...g?hc(g):[],...n?hc(n):[]]:[];y.forEach(T=>{s&&T.addEventListener("scroll",a),u&&T.addEventListener("resize",a)});const h=g&&d?Dj(g,a,u):null;let b=-1,S=null;c&&(S=new ResizeObserver(T=>{let[O]=T;O&&O.target===g&&S&&n&&(S.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(n)})),a()}),g&&!p&&S.observe(g),n&&S.observe(n));let w,C=p?bs(e):null;p&&E();function E(){const T=bs(e);C&&!uC(C,T)&&a(),C=T,w=requestAnimationFrame(E)}return a(),()=>{var T;y.forEach(O=>{s&&O.removeEventListener("scroll",a),u&&O.removeEventListener("resize",a)}),h?.(),(T=S)==null||T.disconnect(),S=null,p&&cancelAnimationFrame(w)}}const Nj=fj,kj=hj,jj=cj,Ij=gj,Pj=pj,Lj=(e,n,a)=>{const o=new Map,s=a??{},u={...lC,...s.platform,_c:o};return uj(e,n,{...s,platform:u})};var zj=typeof document<"u",_j=function(){},th=zj?v.useLayoutEffect:_j;function Ch(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let a,o,s;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==n.length)return!1;for(o=a;o--!==0;)if(!Ch(e[o],n[o]))return!1;return!0}if(s=Object.keys(e),a=s.length,a!==Object.keys(n).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(n,s[o]))return!1;for(o=a;o--!==0;){const u=s[o];if(!(u==="_owner"&&e.$$typeof)&&!Ch(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}function cC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ew(e,n){const a=cC(e);return Math.round(n*a)/a}function j0(e){const n=v.useRef(e);return th(()=>{n.current=e}),n}function Uj(e){e===void 0&&(e={});const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:s,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:p,open:g}=e,[y,h]=v.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[b,S]=v.useState(o);Ch(b,o)||S(o);const[w,C]=v.useState(null),[E,T]=v.useState(null),O=v.useCallback(Y=>{Y!==P.current&&(P.current=Y,C(Y))},[]),M=v.useCallback(Y=>{Y!==j.current&&(j.current=Y,T(Y))},[]),A=u||w,N=c||E,P=v.useRef(null),j=v.useRef(null),D=v.useRef(y),z=p!=null,F=j0(p),G=j0(s),J=j0(g),K=v.useCallback(()=>{if(!P.current||!j.current)return;const Y={placement:n,strategy:a,middleware:b};G.current&&(Y.platform=G.current),Lj(P.current,j.current,Y).then(V=>{const Q={...V,isPositioned:J.current!==!1};H.current&&!Ch(D.current,Q)&&(D.current=Q,cr.flushSync(()=>{h(Q)}))})},[b,n,a,G,J]);th(()=>{g===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(Y=>({...Y,isPositioned:!1})))},[g]);const H=v.useRef(!1);th(()=>(H.current=!0,()=>{H.current=!1}),[]),th(()=>{if(A&&(P.current=A),N&&(j.current=N),A&&N){if(F.current)return F.current(A,N,K);K()}},[A,N,K,F,z]);const U=v.useMemo(()=>({reference:P,floating:j,setReference:O,setFloating:M}),[O,M]),L=v.useMemo(()=>({reference:A,floating:N}),[A,N]),$=v.useMemo(()=>{const Y={position:a,left:0,top:0};if(!L.floating)return Y;const V=ew(L.floating,y.x),Q=ew(L.floating,y.y);return d?{...Y,transform:"translate("+V+"px, "+Q+"px)",...cC(L.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:V,top:Q}},[a,d,L.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:K,refs:U,elements:L,floatingStyles:$}),[y,K,U,L,$])}const Hj=(e,n)=>{const a=Nj(e);return{name:a.name,fn:a.fn,options:[e,n]}},Fj=(e,n)=>{const a=kj(e);return{name:a.name,fn:a.fn,options:[e,n]}},Bj=(e,n)=>({fn:Pj(e).fn,options:[e,n]}),Vj=(e,n)=>{const a=jj(e);return{name:a.name,fn:a.fn,options:[e,n]}},qj=(e,n)=>{const a=Ij(e);return{name:a.name,fn:a.fn,options:[e,n]}},Kj={...Lo,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,n)=>n?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Yj extends Bl{constructor(n,a,o){const s=new Lc;super(Gj(n,s,a,o),$j(s),Kj)}setOpen=(n,a)=>{Bk(this,n,a,{extraState:{openChangeReason:a.reason}})};cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,dt(qa,n))}}function Gj(e,n,a,o=!1){return{...pp(n,a,o),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function $j(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const Qj=Tc(function(n){const{disabled:a=!1,defaultOpen:o=!1,open:s,disableHoverablePopup:u=!1,trackCursorAxis:c="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:g,handle:y,triggerId:h,defaultTriggerId:b=null,children:S}=n,w=uv((G,J)=>new Yj({open:o,openProp:s,activeTriggerId:b,triggerIdProp:h},G,J));w.useControlledProp("openProp",s),w.useControlledProp("triggerIdProp",h),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",g);const C=w.useState("open"),E=!a&&C,T=w.useState("activeTriggerId"),O=w.useState("mounted"),M=w.useState("payload");w.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:u,disabled:a}),cp(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:A,transitionStatus:N}=dp(E,w),P=w.useState("isInstantPhase"),j=w.useState("instantType"),D=w.useState("lastOpenChangeReason"),z=v.useRef(null);_e(()=>{C&&a&&w.setOpen(!1,dt(U4))},[C,a,w]),_e(()=>{N==="ending"&&D===Hr||N!=="ending"&&P?(j!=="delay"&&(z.current=j),w.set("instantType","delay")):z.current!==null&&(w.set("instantType",z.current),z.current=null)},[N,P,D,j,w]),_e(()=>{E&&T==null&&w.set("payload",void 0)},[w,T,E]),v.useImperativeHandle(d,()=>({unmount:A,close:()=>w.setOpen(!1,dt(kc))}),[A,w]);const F=E||O||!a&&c!=="none";return x.jsxs(ZE.Provider,{value:w,children:[y&&x.jsx(sp,{handle:y,store:w}),F&&x.jsx(Xj,{store:w,disabled:a,trackCursorAxis:c}),typeof S=="function"?S({payload:M}):S]})});function Xj({store:e,disabled:n,trackCursorAxis:a}){const o=e.useState("floatingRootContext"),s=Ic(o,{enabled:!n,referencePress:()=>e.select("closeOnClick")}),u=zk(o,{enabled:!n&&a!=="none",axis:a==="none"?void 0:a}),c=v.useMemo(()=>Or(u.reference,s.reference),[u.reference,s.reference]);return fp(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:s.floating??$t}),null}function Mr(e){return Fl(e,"base-ui")}const dC=v.createContext(void 0);function Zj(){return v.useContext(dC)}const Jj=600,tw="data-base-ui-tooltip-trigger";function nw(e){const n=tr(e);return sn(n)?n:null}const Wj=XE(function(n,a){const{render:o,className:s,style:u,handle:c,payload:d,disabled:p,delay:g,closeOnClick:y=!0,closeDelay:h,id:b,...S}=n,w=Oc(!0),E=XR(c)??w;if(!E)throw new Error(En(82));const T=Mr(b),O=E.useState("isTriggerActive",T),M=E.useState("isOpenedByTrigger",T),A=E.useState("floatingRootContext"),N=v.useRef(null),P=h??0,{registerTrigger:j,isMountedByThisTrigger:D}=qR(T,N,E,{payload:d,closeOnClick:y,closeDelay:P}),z=Zj(),{activeIdRef:F,delayRef:G,isInstantPhase:J,hasProvider:K}=V4(A,{open:M}),H=dv(A);E.useSyncedValue("isInstantPhase",J);const U=E.useState("disabled"),L=p??U,$=Ln(L),Y=E.useState("trackCursorAxis"),V=E.useState("disableHoverablePopup"),Q=v.useRef(!1),ee=Un(),q=v.useRef(void 0);function se(){return K&&F.current!=null?0:g??z??Jj}function k(ce){const Te=N.current;if(!Te||!ce)return!1;const ve=pc(ce,`[${tw}]`);return ve!==null&&ve!==Te&&at(Te,ve)}function B(ce){const Te=k(ce);return Q.current=Te,Te&&(H.openChangeTimeout.clear(),H.restTimeout.clear(),H.restTimeoutPending=!1,ee.clear()),Te}const W=WR(A,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!V&&Y!=="both"?nC():null,restMs:se,delay(){return h==null&&K?{close:vs(G.current,"close")}:{close:P}},triggerElementRef:N,isActiveTrigger:O,isClosing:()=>E.select("transitionStatus")==="ending",shouldOpen(){return!Q.current}}),re=ZR(A,{enabled:!L}).reference,Ee=ce=>{const Te=Q.current,ve=nw(ce),Pe=B(ve),Me=N.current,Le=Me&&ve&&at(Me,ve);if(Pe&&E.select("open")&&E.select("lastOpenChangeReason")===qn){E.setOpen(!1,dt(qn,ce));return}if(Te&&!Pe&&Le&&!$.current&&!E.select("open")&&Me&&Ci(q.current)){const Fe=()=>{!Q.current&&!$.current&&!E.select("open")&&E.setOpen(!0,dt(qn,ce,Me))},Oe=se();Oe===0?(ee.clear(),Fe()):ee.start(Oe,Fe)}},le=E.useState("appliedTriggerProps",D||Y!=="none");return Mt("button",n,{state:{open:M},ref:[a,j,N],props:[W,re,le,{onMouseOver(ce){Ee(ce.nativeEvent)},onFocus(ce){k(nw(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){Q.current=!1,ee.clear(),q.current=void 0},onPointerEnter(ce){q.current=ce.pointerType},onPointerDown(ce){q.current=ce.pointerType,E.set("closeOnClick",y),y&&!E.select("open")&&E.cancelPendingOpen(ce.nativeEvent)},onClick(ce){y&&!E.select("open")&&E.cancelPendingOpen(ce.nativeEvent)},id:T,[ay]:L?"":void 0,[tw]:L?void 0:""},S],stateAttributesMapping:nR})}),fC=v.createContext(void 0);function e3(){const e=v.useContext(fC);if(e===void 0)throw new Error(En(70));return e}const t3=v.forwardRef(function(n,a){const{children:o,container:s,className:u,render:c,style:d,...p}=n,{node:g,subtree:y}=IR({container:s,ref:a,componentProps:n,elementProps:p});return!y&&!g?null:x.jsxs(v.Fragment,{children:[y,g&&cr.createPortal(o,g)]})}),n3=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return Oc().useState("mounted")||o?x.jsx(fC.Provider,{value:o,children:x.jsx(t3,{ref:a,...s})}):null}),hC=v.createContext(void 0);function pC(){const e=v.useContext(hC);if(e===void 0)throw new Error(En(71));return e}function r3(e){const{nodeId:n,externalTree:a,rootContext:o}=e,s=o.useState("referenceElement"),u=o.useState("floatingElement"),c=o.useState("domReferenceElement"),d=o.useState("open"),p=o.useState("floatingId"),[g,y]=v.useState(null),h=v.useRef(null),b=ji(a),S=v.useMemo(()=>({reference:s,floating:u,domReference:c}),[s,u,c]),w=Uj({...e,elements:{...S,...g&&{reference:g}}}),C=v.useCallback(M=>{const A=sn(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;y(A),w.refs.setReference(A)},[w.refs]),E=v.useMemo(()=>({...w.refs,setPositionReference:C,domReference:h}),[w.refs,C]),T=v.useMemo(()=>({...w.elements,domReference:c}),[w.elements,c]),O=v.useMemo(()=>({...w,dataRef:o.context.dataRef,open:d,onOpenChange:o.setOpen,events:o.context.events,floatingId:p,refs:E,elements:T,nodeId:n,rootStore:o}),[w,E,T,n,o,d,p]);return _e(()=>{c&&(h.current=c)},[c]),_e(()=>{o.context.dataRef.current.floatingContext=O;const M=b?.nodesRef.current.find(A=>A.id===n);M&&(M.context=O)}),v.useMemo(()=>({...w,context:O,refs:E,elements:T,rootStore:o}),[w,E,T,O,o])}const a3=v.createContext(void 0);function yp(){return v.useContext(a3)?.direction??"ltr"}const o3=e=>({name:"arrow",options:e,async fn(n){const{x:a,y:o,placement:s,rects:u,platform:c,elements:d,middlewareData:p}=n,{element:g,padding:y=0}=Oi(e,n)||{};if(g==null)return{};const h=dR(y),b={x:a,y:o},S=ev(s),w=Wy(S),C=await c.getDimensions(g),E=S==="y",T=E?"top":"left",O=E?"bottom":"right",M=E?"clientHeight":"clientWidth",A=u.reference[w]+u.reference[S]-b[S]-u.floating[w],N=b[S]-u.reference[S],P=d.floating[M]||u.floating[w],j=A/2-N/2,D=P/2-C[w]/2-1,z=Math.min(h[T],D),F=Math.min(h[O],D),G=z,J=P-C[w]-F,K=P/2-C[w]/2+j,H=cR(G,K,J),U=!p.arrow&&co(s)!=null&&K!==H&&u.reference[w]/2-(K<G?z:F)-C[w]/2<0,L=U?K<G?K-G:K-J:0;return{[S]:b[S]+L,data:{[S]:H,centerOffset:K-H-L,...U&&{alignmentOffset:L}},reset:U}}}),i3=(e,n)=>{const{name:a,fn:o}=o3(e);return{name:a,fn:o,options:[e,n]}},s3={name:"hide",async fn(e){const{width:n,height:a,x:o,y:s}=e.rects.reference,u=n===0&&a===0&&o===0&&s===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-a>=0||c.right-n>=0||c.bottom-a>=0||c.left-n>=0||u}}}},l3={sideX:"left",sideY:"top"},u3="--available-width",c3="--available-height",d3="--anchor-width",f3="--anchor-height",h3="--transform-origin",rw=u3,aw=c3;function gC(e,n,a){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?a?"inline-start":"inline-end":"right",bottom:"bottom",left:o?a?"inline-end":"inline-start":"left"}[n]}function ow(e,n,a){const{rects:o,placement:s}=e;return{side:gC(n,da(s),a),align:co(s)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function vp(e){return p3(e,r3)}function p3(e,n){const{anchor:a,positionMethod:o="absolute",side:s="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,collisionBoundary:p,collisionPadding:g=5,sticky:y=!1,arrowPadding:h=5,disableAnchorTracking:b=!1,inline:S,keepMounted:w=!1,floatingRootContext:C,mounted:E,collisionAvoidance:T,shift:O,nodeId:M,adaptiveOrigin:A,lazyFlip:N=!1,externalTree:P}=e,j=T.side||"flip",D=T.align||"flip",z=T.fallbackAxisSide||"end",F=O?.crossAxis??!1,G=O?.rootBoundary,J=typeof a=="function"?a:void 0,K=Be(J),H=J?K:a,U=Ln(a),L=Ln(E),Y=yp()==="rtl",[V,Q]=v.useState(null);!E&&V!==null&&Q(null);const ee=N==="placement",q=V?da(V):null,se=V&&ee?co(V)||"center":null,k=q||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Y?"left":"right","inline-start":Y?"right":"left"}[s],B=se||c,W=B==="center"?k:`${k}-${B}`;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 Ee=1,le=s==="bottom"?Ee:0,me=s==="top"?Ee:0,ge=s==="right"?Ee:0,ce=s==="left"?Ee:0,Te={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:re},ve=v.useRef(null),Pe=Ln(u),Me=Ln(d),Le=typeof u!="function"?u:0,Fe=typeof d!="function"?d:0,Oe=[];S&&Oe.push(S),Oe.push(Hj(je=>{const ot=ow(je,s,Y),Ie=typeof Pe.current=="function"?Pe.current(ot):Pe.current,ze=typeof Me.current=="function"?Me.current(ot):Me.current;return{mainAxis:Ie,crossAxis:ze,alignmentAxis:ze}},[Le,Fe,Y,s]));const Ue=D==="none"&&j!=="shift",be=!Ue&&(y||F||j==="shift"),He=j==="none"?null:Vj({...Te,padding:{top:re.top+Ee+le,right:re.right+Ee+ce,bottom:re.bottom+Ee+me,left:re.left+Ee+ge},mainAxis:!F&&j==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),Ze=Ue?null:Fj({...Te,rootBoundary:G,mainAxis:D!=="none",crossAxis:be,limiter:y||F?void 0:Bj(je=>{if(!ve.current)return{};const{width:ot,height:Ie}=ve.current.getBoundingClientRect(),ze=Ma(da(je.placement)),Ge=ze==="y"?ot:Ie,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:Ge/2+et/2}})},[Te,y,F,G,re,D]);j==="shift"||D==="shift"||B==="center"?Oe.push(Ze,He):Oe.push(He,Ze),Oe.push(qj({...Te,apply({elements:{floating:je},availableWidth:ot,availableHeight:Ie,rects:ze}){if(!L.current)return;const Ge=je.style;Ge.setProperty(rw,`${ot}px`),Ge.setProperty(aw,`${Ie}px`);const et=wn(je).devicePixelRatio||1,{x:Rt,y:_,width:Z,height:ne}=ze.reference,ye=(Math.round((Rt+Z)*et)-Math.round(Rt*et))/et,xe=(Math.round((_+ne)*et)-Math.round(_*et))/et;Ge.setProperty(d3,`${ye}px`),Ge.setProperty(f3,`${xe}px`)}}),i3(je=>({element:ve.current||Gt(je.elements.floating).createElement("div"),padding:ve.current?h:0}),[h]),{name:"transformOrigin",fn(je){const{elements:{floating:ot},middlewareData:Ie,placement:ze,platform:Ge,rects:et,y:Rt}=je,_=da(ze),Z=co(ze),ne=Ma(_)==="y",ye=ve.current,xe=typeof u=="function"?u(ow(je,s,Y)):u;let qe;if(!ye&&Z&&Math.abs(ne?Ie.shift?.x||0:Ie.shift?.y||0)<=1)qe=Z==="start"===(ne&&Ge.isRTL?.(ot)===!0)?"100%":"0%";else{const Xe=ne?Ie.arrow?.x||0:Ie.arrow?.y||0,$e=ne?ye?.clientWidth||0:ye?.clientHeight||0;qe=`${Xe+$e/2}px`}let Ve=_==="top"||_==="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-Rt}px`),ot.style.setProperty(h3,ne?`${qe} ${Ve}`:`${Ve} ${qe}`),{}}},s3,A),_e(()=>{!E&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[E,C]);const it=v.useMemo(()=>({ancestorScroll:!b,elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:de,elements:we,x:Ye,y:De,middlewareData:ke,update:yt,placement:ut,context:ht,isPositioned:Ot,floatingStyles:Dt}=n({rootContext:C,open:w?E:void 0,placement:W,middleware:Oe,strategy:o,whileElementsMounted:w?void 0:(...je)=>WS(...je,it),nodeId:M,externalTree:P}),{sideX:en,sideY:an}=ke.adaptiveOrigin||l3,tn=Ot?o:"fixed",We=v.useMemo(()=>{let je;return Ot?A?je={position:tn,[en]:Ye,[an]:De}:je={...Dt,position:tn}:je={position:tn,top:0,left:0},je[rw]="100vw",je[aw]="100vh",Ot||(je.opacity=0),je},[A,tn,en,Ye,an,De,Dt,Ot]),xt=v.useRef(null);_e(()=>{if(!E)return;const je=U.current,ot=typeof je=="function"?je():je,ze=(iw(ot)?ot.current:ot)||null||null;ze!==xt.current&&(de.setPositionReference(ze),xt.current=ze)},[E,de,H,U]),v.useEffect(()=>{if(!E)return;const je=U.current;typeof je!="function"&&iw(je)&&je.current!==xt.current&&(de.setPositionReference(je.current),xt.current=je.current)},[E,de,H,U]),v.useEffect(()=>{if(w&&E&&we.reference&&we.floating)return WS(we.reference,we.floating,yt,it)},[w,E,we,yt,it]);const Xt=da(ut),ft=gC(s,Xt,Y),vt=co(ut)||"center",gt=!!ke.hide?.referenceHidden;_e(()=>{N&&E&&Ot&&(Xt!==k||ee&&vt!==B)&&Q(ut)},[N,ee,E,Ot,ut,Xt,vt,k,B]);const zt=v.useMemo(()=>({position:"absolute",top:ke.arrow?.y,left:ke.arrow?.x}),[ke.arrow]),un=ke.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:We,arrowStyles:zt,arrowRef:ve,arrowUncentered:un,side:ft,align:vt,physicalSide:Xt,anchorHidden:gt,refs:de,context:ht,isPositioned:Ot,update:yt}),[We,zt,ve,un,ft,vt,Xt,gt,de,ht,Ot,yt])}function iw(e){return e!=null&&"current"in e}function zc(e){return e==="starting"?Dk:$t}function bp(e,n,{styles:a,transitionStatus:o,props:s,refs:u,hidden:c,inert:d=!1}){const p={...a};return d&&(p.pointerEvents="none"),Mt("div",e,{state:n,ref:u,props:[{role:"presentation",hidden:c,style:p},zc(o),s],stateAttributesMapping:Ac})}const g3=v.forwardRef(function(n,a){const{render:o,className:s,anchor:u,positionMethod:c="absolute",side:d="top",align:p="center",sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:E=ov,style:T,...O}=n,M=Oc(),A=e3(),N=M.useState("open"),P=M.useState("mounted"),j=M.useState("trackCursorAxis"),D=M.useState("disableHoverablePopup"),z=M.useState("floatingRootContext"),F=M.useState("instantType"),G=M.useState("transitionStatus"),J=M.useState("adaptiveOrigin"),K=vp({anchor:u,positionMethod:c,floatingRootContext:z,mounted:P,side:d,sideOffset:g,align:p,alignOffset:y,collisionBoundary:h,collisionPadding:b,sticky:w,arrowPadding:S,disableAnchorTracking:C,keepMounted:A,collisionAvoidance:E,adaptiveOrigin:J}),H=v.useMemo(()=>({open:N,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:j!=="none"?"tracking-cursor":F}),[N,K.side,K.align,K.anchorHidden,j,F]),U=bp(n,H,{styles:K.positionerStyles,transitionStatus:G,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!P,inert:!N||j==="both"||D});return x.jsx(hC.Provider,{value:K,children:U})}),m3=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Oc(),{side:p,align:g}=pC(),y=d.useState("open"),h=d.useState("instantType"),b=d.useState("transitionStatus"),S=d.useState("popupProps"),w=d.useState("floatingRootContext"),C=d.useState("disabled"),E=d.useState("closeDelay");ka({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}}),fv(w,{enabled:!C,closeDelay:E});const T=d.useStateSetter("popupElement");return Mt("div",n,{state:{open:y,side:p,align:g,instant:h,transitionStatus:b},ref:[a,d.context.popupRef,T],props:[Pc,S,zc(b),c],stateAttributesMapping:Jh})}),y3=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Oc(),{arrowRef:p,side:g,align:y,arrowUncentered:h,arrowStyles:b}=pC(),S=d.useState("open"),w=d.useState("instantType");return Mt("div",n,{state:{open:S,side:g,align:y,uncentered:h,instant:w},ref:[a,p],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Ac})}),v3=function(n){const{delay:a,closeDelay:o,timeout:s=400}=n,u=v.useMemo(()=>({open:a,close:o}),[a,o]);return x.jsx(dC.Provider,{value:a,children:x.jsx(B4,{delay:u,timeoutMs:s,children:n.children})})};function xp(e){return rv(19)?e:e?"true":void 0}function b3(e){const[n,a]=v.useState({current:e,previous:null});return Object.is(e,n.current)||a({current:e,previous:n.current}),n.previous}const mC=48,go=(e,n=0)=>{const a=new Int32Array(e.length);for(let o=0;o<e.length;o++)a[o]=e.charCodeAt(o)-mC-n;return a},Sp=e=>{const n=new Int32Array(e.length+1);for(let a=0;a<e.length;a++)n[a+1]=n[a]+e[a];return n},Ai=e=>{const n=new Int32Array(e.length);let a=0;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o)-mC;a+=s>>>1^-(s&1),n[o]=a}return n},x3=384,S3=[],us=Sp(go("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),w3=Sp(go(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),E3="@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",R3=(()=>{const e=us.length-1,n=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,c=s+1;for(let d=us[s];d<us[s+1];d++)u+=n[c],c+=n[c];n[s]=u}const a=new Int32Array(us[e]);let o=0;for(let s=0;s<e;s++){let u=s+1;for(let c=us[s];c<us[s+1];c++)a[o++]=u,u+=n[u]}return a})(),C3=go("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),T3=Sp(go("123333359346463635126536711576")),O3=go("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),M3=go("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),A3=Ai("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),D3=(()=>{const e=new Int32Array(319).fill(-1),n=Ai("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=Ai("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let o=0;o<n.length;o++)e[n[o]]=a[o];return e})(),N3="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 n=e.split(" "),a=n.shift();for(let o=0;o<n.length;o++)n[o]=a+n[o];return n}),sw=Ai("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),k3=Ai("ɠ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"),j3=Ai("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±"),yC=new Int32Array(987),vC=new Int32Array(987),bC=new Int32Array(987);let cy="";const dy=new Int32Array(1022);{const e=new Map;let n=0,a=0;for(let o=0;o<sw.length;o++)for(const s of N3[j3[o]]){let u=e.get(s);u===void 0&&(u=n++,e.set(s,u),dy[u*2]=cy.length,dy[u*2+1]=s.length,cy+=s),yC[a]=sw[o],vC[a]=k3[o],bC[a]=u,a++}}const I3=Ai("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),P3=Sp(go("1::24444432:442:44:44>222222:44:4421322511111311111114")),L3=Ai("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"),z3=go("ij"),_3=go("—"),U3=go("1"),H3="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var F3={GROUP_COUNT:x3,customValidatorNames:S3,edgeStart:us,labelStart:w3,labelText:E3,edgeTarget:R3,nodeGroup:C3,nodeVlist:D3,vlistPat:T3,vlistOps:O3,vlistRef:M3,vlistGroup:A3,litAnchor:yC,litGroup:vC,litPool:bC,poolOffsets:dy,poolText:cy,adjGid:I3,adjStart:P3,adjTgt:L3,patGid:z3,patTgt:_3,postfixLookupGroups:U3,orderSensitiveModifiers:H3};const B3="line"in new Error,ao=-1,ls=-1,I0=(e,n,a)=>{let o=2166136261;for(let s=n;s<a;s++)o=Math.imul(o^e.charCodeAt(s),16777619);return o},nh=(e,n,a)=>{const o=a-n;let s=Math.imul(o,2654435761)^e.charCodeAt(n);if(o>3){const u=o>>2,c=o>>1;s=Math.imul(s^e.charCodeAt(n+1)<<8^e.charCodeAt(n+2)<<16^e.charCodeAt(n+u),2246822507),s=Math.imul(s^e.charCodeAt(n+c)<<8^e.charCodeAt(n+c+u)<<16^e.charCodeAt(a-3),3266489909),s^=e.charCodeAt(a-2)<<8^e.charCodeAt(a-1)<<16;for(let d=n+3,p=a-4;d<n+8&&d<p;d++,p--)s=Math.imul(s^e.charCodeAt(d)^e.charCodeAt(p)<<8,16777619)}return s^s>>>15|0},V3=(e,n,a={})=>{const{GROUP_COUNT:o,edgeStart:s,labelStart:u,labelText:c,edgeTarget:d,nodeGroup:p,nodeVlist:g,vlistPat:y,vlistOps:h,vlistRef:b,vlistGroup:S,litAnchor:w,litGroup:C,litPool:E,poolOffsets:T,poolText:O,adjGid:M,adjStart:A,adjTgt:N,patGid:P,patTgt:j,postfixLookupGroups:D,customValidatorNames:z,orderSensitiveModifiers:F}=e,G=new Int32Array(o).fill(-1);for(let he=0;he<M.length;he++)G[M[he]]=he;let J=0;for(let he=0;he+1<A.length;he++){const Ae=A[he+1]-A[he];Ae>J&&(J=Ae)}let K=32;for(;K<2*(1+J+P.length);)K<<=1;const H=new Int32Array(b.length+1);for(let he=0;he<b.length;he++)H[he+1]=H[he]+y[b[he]+1]-y[b[he]];const U=new Uint8Array(o);for(let he=0;he<D.length;he++)U[D[he]]=1;const L=s.length-1,$=new Uint8Array(L);let Y=0,V=!0;for(let he=0;he<w.length;he++){$[w[he]]=1;const Ae=T[E[he]*2+1];Ae>Y&&(Y=Ae);const Se=O.charCodeAt(T[E[he]*2]);(Se===91||Se===40)&&(V=!1)}let Q=1;for(;Q<w.length*2;)Q<<=1;const ee=new Int32Array(Q).fill(-1);for(let he=0;he<w.length;he++){const Ae=T[E[he]*2];let Se=(I0(O,Ae,Ae+T[E[he]*2+1])^Math.imul(w[he],2654435761)|0)&Q-1;for(;ee[Se]!==-1;)Se=Se+1&Q-1;ee[Se]=he}const q=(he,Ae,Se,nt)=>{let Ct=(I0(Ae,Se,nt)^Math.imul(he,2654435761)|0)&Q-1;const wt=nt-Se;for(;;){const _t=ee[Ct];if(_t===-1)return-1;if(w[_t]===he&&T[E[_t]*2+1]===wt){const vn=T[E[_t]*2];let fn=!0;for(let mt=0;mt<wt;mt++)if(O.charCodeAt(vn+mt)!==Ae.charCodeAt(Se+mt)){fn=!1;break}if(fn)return C[_t]}Ct=Ct+1&Q-1}},se=a.cacheSize??8192,k=a.prefix??e.prefix??"",B=k===""?"":k+":",W=B.length,re=(z??[]).map(he=>{throw new Error("cn: missing validator "+he)}),Ee=/\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 ce=0,Te=-1,ve=-1,Pe=-1,Me=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Fe=he=>/\s/.test(String.fromCharCode(he)),Oe=(he,Ae,Se)=>{if(ce=0,Te=-1,Se-Ae<3)return;const nt=he.charCodeAt(Ae),Ct=he.charCodeAt(Se-1);if(nt===91&&Ct===93)ce=1;else if(nt===40&&Ct===41)ce=2;else return;Pe=Ae+1,Me=Se-1;let wt=Ae+1;if(Le(he.charCodeAt(wt))){for(wt++;wt<Se-1;){const _t=he.charCodeAt(wt);if(!Le(_t)&&_t!==45)break;wt++}wt<Se-2&&he.charCodeAt(wt)===58&&(Te=Ae+1,ve=wt,Pe=wt+1)}},Ue=(he,Ae,Se,nt)=>{if(Se-Ae!==nt.length)return!1;for(let Ct=0;Ct<nt.length;Ct++)if(he.charCodeAt(Ae+Ct)!==nt.charCodeAt(Ct))return!1;return!0},be=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,He=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=he=>!!he&&!Number.isNaN(Number(he)),it=(he,Ae,Se)=>{if(Se-Ae<11||!Ue(he,Ae,Ae+10,"@container"))return!1;if(he.charCodeAt(Ae+10)===47)return Se-Ae>=12;const nt=he.charCodeAt(Ae+11);return nt===115&&Se-Ae>=17&&Ue(he,Ae+10,Ae+16,"-size/")||nt===110&&Se-Ae>=19&&Ue(he,Ae+10,Ae+18,"-normal/")},de=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],we="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(" ")),Ye=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],De=(he,Ae,Se,nt)=>{if(he>=10){if(he>=25)return re[he-25](Ae.slice(Se,nt));const Ct=he-10;if(ce!==de[Ct])return!1;if(Te>=0){for(const wt of we[Ct])if(Ue(Ae,Te,ve,wt))return!0;return!1}switch(Ye[Ct]){case 0:return!1;case 1:return!0;case 2:{const wt=Ae.slice(Pe,Me);return Ee.test(wt)&&!le.test(wt)}case 3:return Ze(Ae.slice(Pe,Me));case 4:return ge.test(Ae.slice(Pe,Me));default:return me.test(Ae.slice(Pe,Me))}}switch(he){case 0:return!0;case 1:return ce===0;case 2:return ce===1;case 3:return ce===2;case 4:return be.test(Ae.slice(Se,nt));case 5:return Ze(Ae.slice(Se,nt));case 6:{const Ct=Ae.slice(Se,nt);return!!Ct&&Number.isInteger(Number(Ct))}case 7:return nt>Se&&Ae.charCodeAt(nt-1)===37&&Ze(Ae.slice(Se,nt-1));case 8:return He.test(Ae.slice(Se,nt));default:return it(Ae,Se,nt)}},ke=new Set(typeof F=="string"?F.split(" "):F),yt=(he,Ae,Se,nt,Ct,wt)=>{const _t=I0(Ae,Se,nt)^(Ct?2654435769:0)|0;let vn=he.get(_t);if(vn!==void 0)e:for(let At=0;At<vn.length;At++){const on=vn[At];if(!(on.imp!==Ct||on.k.length!==nt-Se)){for(let pt=0;pt<on.k.length;pt++)if(on.k.charCodeAt(pt)!==Ae.charCodeAt(Se+pt))continue e;return on.id}}else he.set(_t,vn=[]);const fn=Ae.slice(Se,nt),mt=wt(fn);return vn.push({k:fn,imp:Ct,id:mt}),mt};let ut=new Map,ht=new Map,Ot=2;const Dt=4096,en=(he,Ae)=>{const Se=[];let nt=0,Ct=0,wt=0;for(let mt=0;mt<he.length;mt++){const At=he.charCodeAt(mt);nt===0&&Ct===0&&At===58?(Se.push(he.slice(wt,mt)),wt=mt+1):At===91?nt++:At===93?nt--:At===40?Ct++:At===41&&Ct--}Se.push(he.slice(wt));let _t=Se[0];if(Se.length>1){const mt=[];let At=[];for(const on of Se)on.charCodeAt(0)===91||ke.has(on)?(At.length&&(mt.push(...At.sort()),At=[]),mt.push(on)):At.push(on);At.length&&mt.push(...At.sort()),_t=mt.join(":")}const vn=Ae?_t+" !":_t;let fn=ht.get(vn);return fn===void 0&&ht.set(vn,fn=Ot++),fn};let an=new Map,tn=o;const We=o+4096,xt=()=>tn++,Xt=2097152,ft=8192,vt=new Int32Array(ft),gt=new Array(ft).fill(null),zt=new Int32Array(ft),un=new Int32Array(ft),je=new Uint8Array(ft);let ot=0;const Ie=(he,Ae,Se,nt,Ct,wt,_t,vn)=>{let fn=he;if(gt[he]!==null)if(gt[he|1]===null)fn=he|1;else if((ot++&3)===0)fn=he|ot>>2&1;else return;gt[fn]=Ae.slice(Se,nt),vt[fn]=Ct,zt[fn]=wt,un[fn]=_t,je[fn]=vn},ze=()=>gt.fill(null);let Ge=256,et=[new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge)],[Rt,_,Z,ne]=et,ye=new Uint8Array(Ge),xe=new Uint8Array(Ge);const qe=()=>{Ge*=2,et=et.map(Ae=>{const Se=new Int32Array(Ge);return Se.set(Ae),Se}),[Rt,_,Z,ne]=et;const he=new Uint8Array(Ge);he.set(ye),ye=he,xe=new Uint8Array(Ge)};let Ve=64,Xe=new Int32Array(Ve),$e=new Int32Array(Ve);const st=new Int32Array(o);let tt=2048,St=21,ct=new Float64Array(tt),Vt=new Int32Array(tt),Ut=0;const On=(he,Ae)=>{if(he===0&&Ae<o)return st[Ae]===Ut?1:(st[Ae]=Ut,0);const Se=he*2097152+Ae+1;let nt=Math.imul(Se,2654435761)>>>St;for(;Vt[nt]===Ut;){if(ct[nt]===Se)return 1;nt=nt+1&tt-1}return ct[nt]=Se,Vt[nt]=Ut,0},qt=(he,Ae,Se,nt,Ct)=>{if(Se-Ae>=2&&he.charCodeAt(Ae)===91&&he.charCodeAt(Se-1)===93){let wt=-1;for(let _t=Ae+1;_t<Se-1;_t++)if(he.charCodeAt(_t)===58){wt=_t;break}return wt===-1||wt===Ae+1?ao:yt(an,he,Ae+1,wt,0,xt)}if(nt>=0&&p[nt]>=0)return p[nt];for(let wt=Ct-1;wt>=0;wt--){const _t=$e[wt];if(_t>Se)continue;const vn=Xe[wt],fn=Se-_t;if($[vn]===1&&fn>0&&fn<=Y){const zn=he.charCodeAt(_t);if(V===!1||zn!==91&&zn!==40){const Wr=q(vn,he,_t,Se);if(Wr>=0)return Wr}}const mt=g[vn];if(mt<0)continue;const At=b[mt],on=y[At],pt=y[At+1];if(on===pt)continue;Oe(he,_t,Se);const nr=H[mt]-on;for(let zn=on;zn<pt;zn++)if(De(h[zn],he,_t,Se))return S[nr+zn]}return ao},Ht=he=>{const Ae=he.length;let Se=0,nt=0,Ct=!1;(Ot>Dt||ut.size>Dt)&&(ut=new Map,ht=new Map,Ot=2,ze()),tn>We&&(an=new Map,tn=o,ze());let wt=0;for(;wt<Ae;){let mt=he.charCodeAt(wt);if(mt===32||mt>=9&&mt<=13||mt>=160&&Fe(mt)){mt!==32&&(Ct=!0),wt++;continue}const At=wt;let on=0;for(;wt<Ae;){if(mt=he.charCodeAt(wt),mt<=32){if(mt===32)break;if(mt>=9&&mt<=13){Ct=!0;break}}else if(mt>=160&&Fe(mt)){Ct=!0;break}on=Math.imul(on^mt,16777619),wt++}const pt=wt,nr=pt-At;Se===Ge&&qe();const zn=Se++;Rt[zn]=At,_[zn]=pt,nt+=nr,on^=Math.imul(nr,2654435761);const Wr=on^on>>>15|0,Gn=Wr&8190;{let nn=-1;if(vt[Gn]===Wr&&gt[Gn]!==null&&gt[Gn].length===nr?nn=Gn:vt[Gn|1]===Wr&&gt[Gn|1]!==null&&gt[Gn|1].length===nr&&(nn=Gn|1),nn>=0){const or=gt[nn];let ma=!0;for(let na=0;na<nr;na++)if(or.charCodeAt(na)!==he.charCodeAt(At+na)){ma=!1;break}if(ma){Z[zn]=zt[nn],ne[zn]=un[nn],ye[zn]=je[nn];continue}}}let $n=At;if(W!==0){if(pt-At<=W||!he.startsWith(B,At)){Z[zn]=ao,Ie(Gn,he,At,pt,Wr,ao,0,0);continue}$n=At+W}let Ds=0,Jl=0,xo=-1,Ns=-1;for(let nn=$n;nn<pt;nn++){const or=he.charCodeAt(nn);if(Ds===0&&Jl===0){if(or===58){xo=nn;continue}if(or===47){Ns=nn;continue}}or===91?Ds++:or===93?Ds--:or===40?Jl++:or===41&&Jl--}const sd=xo>=$n?xo+1:$n;let Nn=sd,wr=pt,Ko=!1,ks=0;wr>Nn&&he.charCodeAt(wr-1)===33?(Ko=!0,wr--):wr>Nn&&he.charCodeAt(Nn)===33&&(Ko=!0,Nn++,ks=1);let Br=-1;Ns>sd&&(Br=Ns+ks,Br>=wr&&(Br=-1));let js=Nn;wr-Nn>1&&he.charCodeAt(Nn)===45&&(js=Nn+1);let ea=0,Nr=0,Yo=0,Wl=-1,ta=0;(g[0]>=0||$[0]===1)&&(Xe[0]=0,$e[0]=js,ta=1);let Li=ls,eu=0;for(let nn=js;nn<wr;nn++)if(nn===Br&&(Li=Nr<Yo?ls:ea,eu=ta),ea!==ls){const or=he.charCodeAt(nn);let ma=-1;if(Nr<Yo)c.charCodeAt(Nr)===or?(Nr++,Nr===Yo&&(ma=ea=Wl)):ea=ls;else{const na=s[ea],Ui=s[ea+1];let So=ls;for(let pr=na;pr<Ui;pr++){const Hi=u[pr];if(c.charCodeAt(Hi)===or){u[pr+1]-Hi===1?ma=So=d[pr]:(Nr=Hi+1,Yo=u[pr+1],Wl=d[pr],So=ea);break}}ea=So}if(ma>=0&&(g[ma]>=0||$[ma]===1)&&nn+1<wr&&he.charCodeAt(nn+1)===45){if(ta===Ve){Ve*=2;const na=new Int32Array(Ve);na.set(Xe),Xe=na;const Ui=new Int32Array(Ve);Ui.set($e),$e=Ui}Xe[ta]=ma,$e[ta]=nn+2,ta++}}Br===wr&&(Li=Nr<Yo?ls:ea,eu=ta);const tu=Nr<Yo?ls:ea;let hr,kr=!1;if(Br>=0)if(kr=!0,hr=qt(he,Nn,Br,Li,eu),hr!==ao&&hr<o&&U[hr]){const nn=qt(he,Nn,wr,tu,ta);nn!==ao&&nn!==hr&&(hr=nn,kr=!1)}else hr===ao&&(hr=qt(he,Nn,wr,tu,ta),kr=!1);else hr=qt(he,Nn,wr,tu,ta);let zi=0,_i=0;hr===ao?Z[zn]=ao:(_i=kr?1:0,zi=$n>=xo?Ko?1:0:yt(ut,he,$n,xo,Ko?1:0,nn=>en(nn,Ko)),Z[zn]=hr,ye[zn]=_i,ne[zn]=zi),Ie(Gn,he,At,pt,Wr,hr,zi,_i)}if(Se===0)return"";if(Se===1)return Rt[0]===0&&_[0]===Ae?he:he.slice(Rt[0],_[0]);if(Se*K>tt){for(;Se*K>tt;)tt<<=1,St--;ct=new Float64Array(tt),Vt=new Int32Array(tt)}if(Ot>=Xt||tn>=Xt)throw new Error("cn: too many distinct classes in one merge");Ut=Ut+1|0,Ut===0&&(st.fill(0),Vt.fill(0),Ut=1);let _t=!1;for(let mt=Se-1;mt>=0;mt--){const At=Z[mt];if(At===ao){xe[mt]=1;continue}const on=ne[mt];if(On(on,At)===1){xe[mt]=0,_t=!0;continue}if(xe[mt]=1,At<o){const pt=G[At];if(pt>=0)for(let nr=A[pt];nr<A[pt+1];nr++)On(on,N[nr]);if(ye[mt]&1)for(let nr=0;nr<P.length;nr++)P[nr]===At&&On(on,j[nr])}}if(!_t&&!Ct&&Ae===nt+Se-1)return he;let vn="",fn=0;for(;fn<Se;){if(!xe[fn]){fn++;continue}const mt=Rt[fn];let At=_[fn],on=fn+1;for(;on<Se&&xe[on]&&Rt[on]===At+1&&he.charCodeAt(At)===32;)At=_[on],on++;vn.length>0&&(vn+=" "),vn+=he.slice(mt,At),fn=on}return vn},Rn=16384,Cn=new Int32Array(Rn*2);let Zr=0,cn=1,dn=Object.create(null),Mn=Object.create(null),jn=new Map,bo=new Map,Dr=0,Ia=0;const Jr=()=>{Zr^=Rn,cn=cn+1|0,Ia=0},ga=he=>{let Ae=dn[he];if(Ae!==void 0)return Ae;const Se=nh(he,0,he.length),nt=(Se&16383)+Zr,Ct=Cn[nt]===(Se^cn)||Cn[nt^Rn]===(Se^cn-1);return Ct&&(Ae=Mn[he],Ae!==void 0)?(dn[he]=Ae,Ae):(Ae=Ht(he),Ct?(dn[he]=Ae,++Dr>se&&(Dr=0,Mn=dn,dn=Object.create(null),Jr())):(Cn[nt]=Se^cn,++Ia>Rn&&Jr()),Ae)},Pt=he=>{let Ae=jn.get(he);if(Ae!==void 0)return Ae;const Se=nh(he,0,he.length),nt=(Se&16383)+Zr,Ct=Cn[nt]===(Se^cn)||Cn[nt^Rn]===(Se^cn-1);return Ct&&(Ae=bo.get(he),Ae!==void 0)?(jn.set(he,Ae),Ae):(Ae=Ht(he),Ct?(jn.set(he,Ae),++Dr>se&&(Dr=0,bo=jn,jn=new Map,Jr())):(Cn[nt]=Se^cn,++Ia>Rn&&Jr()),Ae)},Kn=he=>{const Ae=nh(he,0,he.length),Se=(Ae&16383)+Zr;return Cn[Se]===(Ae^cn)||Cn[Se^Rn]===(Ae^cn-1)?!0:(Cn[Se]=Ae^cn,++Ia>Rn&&Jr(),!1)},Fn=se===0?Ht:B3?he=>{const Ae=jn.get(he);return Ae!==void 0?Ae:Pt(he)}:ga;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(K3.apply(null,arguments))},mergeString:Fn,seenBefore:se===0?()=>!1:Kn,mergeUncached:Ht}},Th=(e,n)=>{if(!e)return"";if(typeof e=="string")return e;let a="";if(typeof e.length=="number"&&(!n||Array.isArray(e))){const o=e;for(let s=0;s<o.length;s++){const u=o[s];if(!u)continue;const c=typeof u=="string"?u:Th(u,n);c&&(a&&(a+=" "),a+=c)}return a}if(n){if(typeof e=="number")return""+e;if(typeof e=="object")for(const o in e)e[o]&&(a&&(a+=" "),a+=o)}return a},q3=(e,n)=>{let a="";for(let o=0;o<e.length;o++){const s=e[o];if(!s)continue;const u=typeof s=="string"?s:Th(s,n);u&&(a&&(a+=" "),a+=u)}return a},K3=function(){return q3(arguments,!1)},Y3=256,lw=16,G3=1024,P0=4096,$3=(e,n)=>{const a=n===void 0?()=>!0:n.seenBefore,o=n===void 0?e:n.mergeUncached;let s=new Map,u=new Map,c=0,d=null,p=null,g=[],y=[],h=0;const b=(T,O,M)=>{p===null&&(p=new Array(P0).fill(""),g=new Array(P0).fill(""),y=new Array(P0).fill(""));const A=nh(T,0,T.length)&4094;if(p[A]===T&&g[A]===O)return y[A];if(p[A|1]===T&&g[A|1]===O)return y[A|1];const N=e(M?O+" "+T:T),P=p[A]===""?A:A|(p[A|1]===""?1:h++&1);return p[P]=T,g[P]=O,y[P]=N,N},S=(T,O,M,A)=>{let N=0;if(O){if(O!==T.a0)return!1;N=1}if(M){if(M!==(N===0?T.a0:T.a1))return!1;N++}if(A){if(A!==(N===0?T.a0:N===1?T.a1:T.a2))return!1;N++}return N===T.t},w=(T,O)=>{const M=T.a;let A=0;for(let N=0;N<O.length;N++){const P=O[N];if(P){if(P!==M[A])return!1;A++}}return A===T.t},C=(T,O)=>{const M=T.length,A=d===null?null:d.n;if(!O){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let N="",P=-1,j=0,D=!1;for(let G=0;G<M;G++){let J=T[G];if(J){if(typeof J!="string"){if(J=T[G]=Th(J,!0),!J)continue;D=!0}P<0&&(N=J,P=G),j++}}if(j===0)return"";if(j===1)return e(N);if(D){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let z=s.get(N);z===void 0&&(z=u.get(N),z!==void 0&&s.set(N,z));let F=null;if(z!==void 0){if(z.skip>0){z.skip--,d=null;let J=N;for(let K=P+1;K<M;K++){const H=T[K];H&&(J+=" "+H)}return b(J,"",!1)}const G=z.e;e:for(let J=0;J<G.length;J++){const K=G[J];if(K.t!==j)continue;const H=K.a;let U=1;for(let L=P+1;L<M;L++){const $=T[L];if($&&$!==H[U++])continue e}F=K;break}F!==null&&(z.miss=0)}if(F===null){let G=N;const J=[N];for(let H=P+1;H<M;H++){const U=T[H];U&&(G+=" "+U,J.push(U))}if(!a(G))return o(G);F={r:e(G),t:J.length,a0:J[0],a1:J[1],a2:J[2]??"",a:J,n:null},z===void 0?s.set(N,z={e:[],miss:0,skip:0,at:0}):++z.miss>lw&&(z.miss=lw,z.skip=G3,z.e.length=0,z.at=0);const K=z.e;K.length<Y3?K.push(F):(K[z.at]=F,z.at=z.at+1&255),++c>1e3&&(c=0,u=s,s=new Map)}return d!==null&&d!==F&&(d.n=F),d=F,F.r},E=T=>Array.isArray(T)?C(T.slice(),!1):e(Th(T,!0));return function(T,O,M){const A=arguments.length;if((A|1)===3){const j=d;if(j!==null){const D=j.n;if(D!==null&&S(D,T,O,M))return d=D,D.r;if(j!==D&&S(j,T,O,M))return j.r}if(A===2&&typeof O=="string"&&O!==""){const D=s.get(T);if(D!==void 0&&D.skip>0)return D.skip--,d=null,b(O,T,!0)}return C([T,O,M],!0)}if(A===1)return typeof T=="string"?e(T):E(T);const N=d;if(N!==null){const j=N.n;if(j!==null){const D=j.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===j.t)return d=j,j.r}if(N!==j){const D=N.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===N.t)return N.r}}const P=[];for(let j=0;j<A;j++)P.push(arguments[j]);return C(P,!0)}},uw=V3(F3),Qe=$3(uw.mergeString,uw);function Q3({delay:e=0,...n}){return x.jsx(v3,{"data-slot":"tooltip-provider",delay:e,...n})}function Oh({...e}){return x.jsx(Qj,{"data-slot":"tooltip",...e})}function Mh({...e}){return x.jsx(Wj,{"data-slot":"tooltip-trigger",...e})}function Ah({className:e,side:n="top",sideOffset:a=4,align:o="center",alignOffset:s=0,children:u,...c}){return x.jsx(n3,{children:x.jsx(g3,{align:o,alignOffset:s,side:n,sideOffset:a,className:"isolate z-50",children:x.jsxs(m3,{"data-slot":"tooltip-content",className:Qe("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),...c,children:[u,x.jsx(y3,{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 X3=(e,n,a,o,s,u,c,d)=>{let p=document.documentElement,g=["light","dark"];function y(S){(Array.isArray(e)?e:[e]).forEach(w=>{let C=w==="class",E=C&&u?s.map(T=>u[T]||T):s;C?(p.classList.remove(...E),p.classList.add(u&&u[S]?u[S]:S)):p.setAttribute(w,S)}),h(S)}function h(S){d&&g.includes(S)&&(p.style.colorScheme=S)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)y(o);else try{let S=localStorage.getItem(n)||a,w=c&&S==="system"?b():S;y(w)}catch{}},Z3=v.createContext(void 0),J3={setTheme:e=>{},themes:[]},W3=()=>{var e;return(e=v.useContext(Z3))!=null?e:J3};v.memo(({forcedTheme:e,storageKey:n,attribute:a,enableSystem:o,enableColorScheme:s,defaultTheme:u,value:c,themes:d,nonce:p,scriptProps:g})=>{let y=JSON.stringify([a,n,u,e,d,c,o,s]).slice(1,-1);return v.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${X3.toString()})(${y})`}})});function eI(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const tI=e=>{switch(e){case"success":return aI;case"info":return iI;case"warning":return oI;case"error":return sI;default:return null}},nI=Array(12).fill(0),rI=({visible:e,className:n})=>Ne.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},nI.map((a,o)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),aI=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"})),oI=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"})),iI=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"})),sI=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"})),lI=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"})),uI=()=>{const[e,n]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const a=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[]),e};let cI=1;const dI=100,cw=e=>{var n;return typeof e?.id=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:cI++};class fI{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(a=>n(a)),()=>{const a=this.subscribers.indexOf(n);this.subscribers.splice(a,1)}),this.publish=n=>{this.subscribers.forEach(a=>a(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-dI;n<=0||(this.toasts=this.toasts.filter(a=>n>0&&this.dismissedToasts.has(a.id)?(this.dismissedToasts.delete(a.id),n--,!1):!0))},this.create=n=>{const{message:a,...o}=n,s=cw(n),u=this.pendingDismissals.get(s);u!==void 0&&(cancelAnimationFrame(u),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const c=this.dismissedToasts.has(s),d=n.dismissible===void 0?!0:n.dismissible;return c&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(g=>g.id!==s)),(c?void 0:this.toasts.find(g=>g.id===s))?this.toasts=this.toasts.map(g=>g.id===s?(this.publish({...g,...n,id:s,title:a}),{...g,...n,id:s,dismissible:d,title:a}):g):this.addToast({title:a,...o,dismissible:d,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(o=>{this.dismissedToasts.add(o.id),this.subscribers.forEach(s=>s({id:o.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const a=this.pendingDismissals.get(n);return a!==void 0&&cancelAnimationFrame(a),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(o=>o({id:n,dismiss:!0}))})),n},this.message=(n,a)=>this.create({...a,message:n,type:void 0}),this.error=(n,a)=>this.create({...a,message:n,type:"error"}),this.success=(n,a)=>this.create({...a,type:"success",message:n}),this.info=(n,a)=>this.create({...a,type:"info",message:n}),this.warning=(n,a)=>this.create({...a,type:"warning",message:n}),this.loading=(n,a)=>this.create({...a,type:"loading",message:n}),this.promise=(n,a)=>{if(!a)return;let o;a.loading!==void 0&&(o=this.create({...a,promise:n,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let u=o!==void 0,c;const d=s.then(async g=>{if(c=["resolve",g],Ne.isValidElement(g))u=!1,this.create({id:o,type:"default",message:g});else if(pI(g)&&!g.ok){u=!1;const h=typeof a.error=="function"?await a.error(`HTTP error! status: ${g.status}`):a.error,b=typeof a.description=="function"?await a.description(`HTTP error! status: ${g.status}`):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(g instanceof Error){u=!1;const h=typeof a.error=="function"?await a.error(g):a.error,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(a.success!==void 0){u=!1;const h=typeof a.success=="function"?await a.success(g):a.success,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"success",description:b,...w})}}).catch(async g=>{if(c=["reject",g],a.error!==void 0){u=!1;const y=typeof a.error=="function"?await a.error(g):a.error,h=typeof a.description=="function"?await a.description(g):a.description,S=typeof y=="object"&&!Ne.isValidElement(y)?y:{message:y};this.create({id:o,type:"error",description:h,...S})}}).finally(()=>{u&&(this.dismiss(o),o=void 0),a.finally==null||a.finally.call(a)}),p=()=>new Promise((g,y)=>d.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(n,a)=>{const o=cw(a);return this.create({...a,jsx:n(o),id:o,type:void 0}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const $r=new fI,hI=(e,n)=>$r.message(e,n),pI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gI=hI,mI=()=>$r.toasts,yI=()=>$r.getActiveToasts(),kn=Object.assign(gI,{success:$r.success,info:$r.info,warning:$r.warning,error:$r.error,custom:$r.custom,message:$r.message,promise:$r.promise,dismiss:$r.dismiss,loading:$r.loading},{getHistory:mI,getToasts:yI});eI("[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 Lf(e){return e.label!==void 0}const vI=3,bI="24px",xI="16px",dw=4e3,SI=356,wI=14,EI=45,RI=200;function oo(...e){return e.filter(Boolean).join(" ")}function CI(e){const[n,a]=e.split("-"),o=[];return n&&o.push(n),a&&o.push(a),o}const TI=e=>{var n,a,o,s,u,c,d,p,g;const{invert:y,toast:h,unstyled:b,interacting:S,setHeights:w,visibleToasts:C,heights:E,index:T,toasts:O,expanded:M,removeToast:A,defaultRichColors:N,closeButton:P,style:j,cancelButtonStyle:D,actionButtonStyle:z,className:F="",descriptionClassName:G="",duration:J,position:K,gap:H,expandByDefault:U,classNames:L,icons:$,closeButtonAriaLabel:Y="Close toast"}=e,[V,Q]=Ne.useState(null),[ee,q]=Ne.useState(null),[se,k]=Ne.useState(!1),[B,W]=Ne.useState(!1),[re,Ee]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ce]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Me]=Ne.useState(0),Le=Ne.useRef(h.duration||J||dw),Fe=Ne.useRef(null),Oe=Ne.useRef(null),Ue=T===0,be=T+1<=C,He=h.type,Ze=He??"default",it=h.dismissible!==!1,de=h.className||"",we=h.descriptionClassName||"",Ye=Ne.useMemo(()=>E.findIndex(je=>je.toastId===h.id)||0,[E,h.id]),De=Ne.useMemo(()=>{var je;return(je=h.closeButton)!=null?je:P},[h.closeButton,P]),ke=Ne.useMemo(()=>h.duration||J||dw,[h.duration,J]),yt=Ne.useRef(0),ut=Ne.useRef(0),ht=Ne.useRef(0),Ot=Ne.useRef(null),[Dt,en]=K.split("-"),an=Ne.useMemo(()=>E.reduce((je,ot,Ie)=>Ie>=Ye?je:je+ot.height,0),[E,Ye]),tn=uI(),We=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:CI(K)},[e.swipeDirections,K]),xt=h.invert||y,Xt=He==="loading";ut.current=Ne.useMemo(()=>Ye*H+an,[Ye,an]),Ne.useEffect(()=>{Le.current=ke},[ke]),Ne.useEffect(()=>{k(!0)},[]),Ne.useEffect(()=>{const je=Oe.current;if(je){const ot=je.getBoundingClientRect().height;return Me(ot),w(Ie=>[{toastId:h.id,height:ot,position:h.position},...Ie]),()=>w(Ie=>Ie.filter(ze=>ze.toastId!==h.id))}},[w,h.id]),Ne.useLayoutEffect(()=>{if(!se)return;const je=Oe.current,ot=je.style.height;je.style.height="auto";const Ie=je.getBoundingClientRect().height;je.style.height=ot,Me(Ie),w(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])},[se,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ft=Ne.useCallback(()=>{W(!0),ve(ut.current),w(je=>je.filter(ot=>ot.toastId!==h.id)),setTimeout(()=>{A(h)},RI)},[h,A,w,ut]);Ne.useEffect(()=>{if(h.promise&&He==="loading"||h.duration===1/0||h.type==="loading")return;let je;return M||S||tn?(()=>{if(ht.current<yt.current){const ze=new Date().getTime()-yt.current;Le.current=Le.current-ze}ht.current=new Date().getTime()})():Le.current!==1/0&&(yt.current=new Date().getTime(),je=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ft()},Le.current)),()=>clearTimeout(je)},[M,S,h,He,tn,ft]),Ne.useEffect(()=>{h.delete&&(ft(),h.onDismiss==null||h.onDismiss.call(h,h))},[ft,h.delete]);function vt(){var je;if($?.loading){var ot;return Ne.createElement("div",{className:oo(L?.loader,h==null||(ot=h.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":He==="loading"},$.loading)}return Ne.createElement(rI,{className:oo(L?.loader,h==null||(je=h.classNames)==null?void 0:je.loader),visible:He==="loading"})}const gt=h.icon||$?.[He]||tI(He);var zt,un;return Ne.createElement("li",{tabIndex:0,ref:Oe,className:oo(F,de,L?.toast,h==null||(n=h.classNames)==null?void 0:n.toast,L?.[Ze],h==null||(a=h.classNames)==null?void 0:a[Ze]),"data-sonner-toast":"","data-rich-colors":(zt=h.richColors)!=null?zt:N,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":ge,"data-removed":B,"data-visible":be,"data-y-position":Dt,"data-x-position":en,"data-index":T,"data-front":Ue,"data-swiping":re,"data-dismissible":it,"data-type":He,"data-invert":xt,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(M||U&&se),"data-testid":h.testId,style:{"--index":T,"--toasts-before":T,"--z-index":O.length-T,"--offset":`${B?Te:ut.current}px`,"--initial-height":U?"auto":`${Pe}px`,...j,...h.style},onDragEnd:()=>{Ee(!1),Q(null),Ot.current=null},onPointerDown:je=>{je.button!==2&&(Xt||!it||(Fe.current=new Date,ve(ut.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Ee(!0),Ot.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,ot,Ie;if(le||!it)return;Ot.current=null;const ze=Number(((je=Oe.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ge=Number(((ot=Oe.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((Ie=Fe.current)==null?void 0:Ie.getTime()),Rt=V==="x"?ze:Ge,_=Math.abs(Rt)/et;if((V==="x"?We.includes(ze>0?"right":"left"):We.includes(Ge>0?"bottom":"top"))&&(Math.abs(Rt)>=EI||_>.11)){ve(ut.current),h.onDismiss==null||h.onDismiss.call(h,h),q(V==="x"?ze>0?"right":"left":Ge>0?"down":"up"),ft(),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")}ce(!1),Ee(!1),Q(null)},onPointerMove:je=>{var ot,Ie,ze;if(!Ot.current||!it||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const et=je.clientY-Ot.current.y,Rt=je.clientX-Ot.current.x;!V&&(Math.abs(Rt)>1||Math.abs(et)>1)&&Q(Math.abs(Rt)>Math.abs(et)?"x":"y");let _={x:0,y:0};const Z=ne=>1/(1.5+Math.abs(ne)/20);if(V==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&et<0||We.includes("bottom")&&et>0)_.y=et;else{const ne=et*Z(et);_.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(V==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Rt<0||We.includes("right")&&Rt>0)_.x=Rt;else{const ne=Rt*Z(Rt);_.x=Math.abs(ne)<Math.abs(Rt)?ne:Rt}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&ce(!0),(Ie=Oe.current)==null||Ie.style.setProperty("--swipe-amount-x",`${_.x}px`),(ze=Oe.current)==null||ze.style.setProperty("--swipe-amount-y",`${_.y}px`)}},De&&!h.jsx&&He!=="loading"?Ne.createElement("button",{"aria-label":Y,"data-disabled":Xt,"data-close-button":!0,onClick:Xt||!it?()=>{}:()=>{ft(),h.onDismiss==null||h.onDismiss.call(h,h)},className:oo(L?.closeButton,h==null||(o=h.classNames)==null?void 0:o.closeButton)},(un=$?.close)!=null?un:lI):null,(He||h.icon||h.promise)&&h.icon!==null&&($?.[He]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:oo(L?.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},He==="loading"?h.icon||vt():h.promise?vt():null,He!=="loading"?gt:null):null,Ne.createElement("div",{"data-content":"",className:oo(L?.content,h==null||(u=h.classNames)==null?void 0:u.content)},Ne.createElement("div",{"data-title":"",className:oo(L?.title,h==null||(c=h.classNames)==null?void 0:c.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:oo(G,we,L?.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&&Lf(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:je=>{Lf(h.cancel)&&it&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,je),ft())},className:oo(L?.cancelButton,h==null||(p=h.classNames)==null?void 0:p.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&Lf(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:je=>{Lf(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,je),!je.defaultPrevented&&ft())},className:oo(L?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function fw(){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 OI(e,n){const a={};return[e,n].forEach((o,s)=>{const u=s===1,c=u?"--mobile-offset":"--offset",d=u?xI:bI;function p(g){["top","right","bottom","left"].forEach(y=>{a[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof o=="number"||typeof o=="string"?p(o):typeof o=="object"?["top","right","bottom","left"].forEach(g=>{o[g]===void 0?a[`${c}-${g}`]=d:a[`${c}-${g}`]=typeof o[g]=="number"?`${o[g]}px`:o[g]}):p(d)}),a}const MI=Ne.forwardRef(function(n,a){const{id:o,invert:s,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:g,offset:y,mobileOffset:h,theme:b="light",richColors:S,duration:w,style:C,visibleToasts:E=vI,toastOptions:T,dir:O=fw(),gap:M=wI,icons:A,customAriaLabel:N,containerAriaLabel:P="Notifications"}=n,[j,D]=Ne.useState([]),z=Ne.useMemo(()=>o?j.filter(k=>k.toasterId===o):j.filter(k=>!k.toasterId),[j,o]),F=Ne.useMemo(()=>Array.from(new Set([u].concat(z.filter(k=>k.position).map(k=>k.position)))),[z,u]),[G,J]=Ne.useState([]),[K,H]=Ne.useState(!1),[U,L]=Ne.useState(!1),[$,Y]=Ne.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=Ne.useRef(null),Q=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),q=Ne.useRef(!1),se=Ne.useCallback(k=>{D(B=>{var W;return(W=B.find(re=>re.id===k.id))!=null&&W.delete||$r.dismiss(k.id),B.filter(({id:re})=>re!==k.id)})},[]);return Ne.useEffect(()=>$r.subscribe(k=>{if(k.dismiss){requestAnimationFrame(()=>{D(B=>B.map(W=>W.id===k.id?{...W,delete:!0}:W))});return}setTimeout(()=>{gk.flushSync(()=>{D(B=>{const W=B.findIndex(re=>re.id===k.id);return W!==-1?[...B.slice(0,W),{...B[W],...k},...B.slice(W+1)]:[k,...B]})})})}),[]),Ne.useEffect(()=>{if(b!=="system"){Y(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const k=window.matchMedia("(prefers-color-scheme: dark)");try{k.addEventListener("change",({matches:B})=>{Y(B?"dark":"light")})}catch{k.addListener(({matches:W})=>{try{Y(W?"dark":"light")}catch(re){console.error(re)}})}},[b]),Ne.useEffect(()=>{j.length<=1&&H(!1)},[j]),Ne.useEffect(()=>{const k=B=>{var W;if(c.length>0&&c.every(le=>B[le]||B.code===le)){var Ee;H(!0),(Ee=V.current)==null||Ee.focus()}B.code==="Escape"&&(document.activeElement===V.current||(W=V.current)!=null&&W.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[c]),Ne.useEffect(()=>{if(V.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,q.current=!1)}},[V.current]),Ne.createElement("section",{ref:a,"aria-label":N??`${P} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},F.map((k,B)=>{var W;const[re,Ee]=k.split("-");return z.length?Ne.createElement("ol",{key:k,dir:O==="auto"?fw():O,tabIndex:-1,ref:V,className:g,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":re,"data-x-position":Ee,style:{"--front-toast-height":`${((W=G[0])==null?void 0:W.height)||0}px`,"--width":`${SI}px`,"--gap":`${M}px`,...C,...OI(y,h)},onBlur:le=>{q.current&&!le.currentTarget.contains(le.relatedTarget)&&(q.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||q.current||(q.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"||L(!0)},onPointerUp:()=>L(!1)},z.filter(le=>!le.position&&B===0||le.position===k).map((le,me)=>{var ge,ce;return Ne.createElement(TI,{key:le.id,icons:A,index:me,toast:le,defaultRichColors:S,duration:(ge=T?.duration)!=null?ge:w,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:s,visibleToasts:E,closeButton:(ce=T?.closeButton)!=null?ce:p,interacting:U,position:k,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:se,toasts:z.filter(Te=>Te.position==le.position),heights:G.filter(Te=>Te.position==le.position),setHeights:J,expandByDefault:d,gap:M,expanded:K,swipeDirections:n.swipeDirections})})):null}))}),AI=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function DI(e,n,a=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:AI(e),size:24,node:n,...a.length>0?{aliases:a}:{}}}const NI=e=>{let n="",a=!1;for(const o of e){if(o==="-"||o==="_"||o<=" "){a=n.length>0;continue}n.length===0?n+=o.toLowerCase():n+=a?o.toUpperCase():o,a=!1}return n},kI=e=>{const n=NI(e);return n.charAt(0).toUpperCase()+n.slice(1)},fy=(...e)=>{const n=new Set;for(const a of e)if(typeof a=="string")for(const o of a.split(/\s+/))o&&n.add(o);return[...n].join(" ")},gl={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 L0(e){return e!=null}function jI(e,n={}){const a=n.attributeNames??{},o=b=>a[b]??b,s=e.size??e.width??gl.width,u=e.size??e.height??gl.height,c=e.aliases?.filter(b=>typeof b=="string"&&b.trim()!=="").map(b=>`lucide-${b}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...c],p=n.className?.split(" ").filter(Boolean)??[],g=n.includeDefaultClasses===!1?fy(...p):fy("lucide",...d,...p);let y=n.strokeWidth??gl["stroke-width"];if(n.absoluteStrokeWidth){const b=Number(y)*Number(e.size??e.width??gl.width)/Number(n.size??n.width??gl.width);Number.isFinite(b)&&(y=b)}return["svg",{...Object.entries(gl).reduce((b,[S,w])=>(b[o(S)]=w,b),{}),..."color"in n&&n.color&&{[o("stroke")]:n.color},..."size"in n&&L0(n.size)&&{[o("width")]:n.size,[o("height")]:n.size},..."width"in n&&L0(n.width)&&{[o("width")]:n.width},..."height"in n&&L0(n.height)&&{[o("height")]:n.height},[o("stroke-width")]:y,...g&&{[o("class")]:g},[o("viewBox")]:`0 0 ${s} ${u}`,...n.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(b=>{const[S,w,C]=b,E=n.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[S,E,C]:[S,E]})]}function II(e,n={}){return jI(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const PI=e=>{if(e==null||typeof e!="object")return!1;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&(n.startsWith("aria-")||n==="role"||n==="title")&&e[n]!=null)return!0;return!1},LI=v.createContext({}),zI=()=>v.useContext(LI),_I=v.forwardRef(({color:e,size:n,width:a,height:o,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:p,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...h},b)=>{const{size:S=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:E=!1,color:T="currentColor",className:O=""}=zI()??{},M=!!p||PI(h),[A,N,P=[]]=II(y,{color:e??T,width:a??n??S,height:o??n??S,strokeWidth:s??w,absoluteStrokeWidth:u??C,nonScalingStroke:c??E,className:fy(O,d),hasA11yProp:M,attributes:h});return v.createElement(A,{ref:b,...N},[...P.map(([j,D])=>v.createElement(j,D)),...Array.isArray(p)?p:[p]])});function Bt(e,n=[],a=[]){const o=typeof e=="string"?DI(e,n,a):e,s=v.forwardRef(({className:u,...c},d)=>v.createElement(_I,{ref:d,icon:o,className:u,...c}));return o.name&&(s.displayName=kI(o.name)),s}const xC={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};xC.node;const UI=Bt(xC),SC={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"}]]};SC.node;const wC=Bt(SC),EC={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};EC.node;const wp=Bt(EC),RC={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};RC.node;const pv=Bt(RC),CC={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};CC.node;const TC=Bt(CC),OC={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};OC.node;const HI=Bt(OC),MC={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"]};MC.node;const FI=Bt(MC),AC={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"]};AC.node;const BI=Bt(AC),DC={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"}]]};DC.node;const VI=Bt(DC),NC={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"}]]};NC.node;const gv=Bt(NC),kC={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"]};kC.node;const qI=Bt(kC),jC={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"}]]};jC.node;const KI=Bt(jC),IC={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"}]]};IC.node;const YI=Bt(IC),PC={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"}]]};PC.node;const LC=Bt(PC),zC={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"}]]};zC.node;const _C=Bt(zC),UC={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"}]]};UC.node;const GI=Bt(UC),HC={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"}]]};HC.node;const FC=Bt(HC),BC={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"}]]};BC.node;const mv=Bt(BC),VC={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"}]]};VC.node;const $I=Bt(VC),qC={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"}]]};qC.node;const QI=Bt(qC),KC={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"}]]};KC.node;const XI=Bt(KC),YC={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"}]]};YC.node;const ZI=Bt(YC),GC={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};GC.node;const Cs=Bt(GC),$C={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"}]]};$C.node;const JI=Bt($C),QC={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};QC.node;const WI=Bt(QC),XC={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"]};XC.node;const eP=Bt(XC),ZC={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"}]]};ZC.node;const tP=Bt(ZC),JC={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"]};JC.node;const nP=Bt(JC),WC={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"}]]};WC.node;const rP=Bt(WC),eT={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};eT.node;const _c=Bt(eT),tT={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"}]]};tT.node;const aP=Bt(tT),nT={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"}]]};nT.node;const rT=Bt(nT),aT={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"}]]};aT.node;const oP=Bt(aT),oT={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"}]]};oT.node;const iP=Bt(oT),iT={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"}]]};iT.node;const sP=Bt(iT),sT={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"]};sT.node;const lP=Bt(sT),lT={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"]};lT.node;const uP=Bt(lT),uT={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"}]]};uT.node;const Dh=Bt(uT),cT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};cT.node;const Ii=Bt(cT),cP=({...e})=>{const{theme:n="system"}=W3();return x.jsx(MI,{theme:n,className:"toaster group",icons:{success:x.jsx(FI,{className:"size-4"}),info:x.jsx($I,{className:"size-4"}),warning:x.jsx(uP,{className:"size-4"}),error:x.jsx(eP,{className:"size-4"}),loading:x.jsx(Cs,{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})},dT=v.createContext(void 0),mo=e=>{const n=v.useContext(dT);if(e)return e;if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},dP=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(dT.Provider,{value:e,children:n})),fP={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var hP=class{#e=fP;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}};const fs=new hP;function pP(e){setTimeout(e,0)}const gP=typeof window>"u"||"Deno"in globalThis;function _r(){}function mP(e,n){return typeof e=="function"?e(n):e}function fT(e){return typeof e=="number"&&e>=0&&e!==1/0}function hT(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Pn(e,n){return typeof e=="function"?e(n):e}function hw(e,n){const{type:a="all",exact:o,fetchStatus:s,predicate:u,queryKey:c,stale:d}=e;if(c){if(o){if(n.queryHash!==yv(c,n.options))return!1}else if(!_l(n.queryKey,c))return!1}if(a!=="all"){const p=n.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||s&&s!==n.state.fetchStatus||u&&!u(n))}function pw(e,n){const{exact:a,status:o,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(a){if(xs(n.options.mutationKey)!==xs(u))return!1}else if(!_l(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||s&&!s(n))}function yv(e,n){return(n?.queryKeyHashFn||xs)(e)}function xs(e){return JSON.stringify(e,(n,a)=>hy(a)?Object.keys(a).sort().reduce((o,s)=>(o[s]=a[s],o),{}):a)}function _l(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let o=0;o<n.length;o++)if(!_l(e[o],n[o]))return!1;return!0}const a=Object.keys(n);for(const o of a)if(!_l(e[o],n[o]))return!1;return!0}return!1}const yP=Object.prototype.hasOwnProperty;function vv(e,n,a=0){if(e===n)return e;if(a>500)return n;const o=gw(e)&&gw(n);if(!o&&!(hy(e)&&hy(n)))return n;const s=(o?e:Object.keys(e)).length,u=o?n:Object.keys(n),c=u.length,d=o?new Array(c):{};let p=0;for(let g=0;g<c;g++){const y=o?g:u[g],h=e[y],b=n[y];if(h===b){d[y]=h,(o?g<s:yP.call(e,y))&&p++;continue}if(h===null||b===null||typeof h!="object"||typeof b!="object"){d[y]=b;continue}const S=vv(h,b,a+1);d[y]=S,S===h&&p++}return s===c&&p===s?e:d}function rh(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const a in e)if(e[a]!==n[a])return!1;return!0}function gw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function hy(e){if(!mw(e))return!1;const n=Object.getPrototypeOf(e),a=n?.constructor;if(a===void 0)return!0;if(typeof a!="function")return!1;const o=a.prototype;return!(!mw(o)||!o.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function mw(e){return Object.prototype.toString.call(e)==="[object Object]"}function vP(e){return new Promise(n=>{fs.setTimeout(n,e)})}function py(e,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,n):a.structuralSharing!==!1?vv(e,n):n}function bP(e,n,a=0){const o=[...e,n];return a&&o.length>a?o.slice(1):o}function xP(e,n,a=0){const o=[n,...e];return a&&o.length>a?o.slice(0,-1):o}const bv=Symbol();function pT(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===bv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xv(e,n){return typeof e=="function"?e(...n):!!e}function SP(e,n,a){let o=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=n(),o||(o=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}let wP=()=>gP;const Sv=()=>wP();var Vl=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(){}},EP=class extends Vl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}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(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const wv=new EP,RP=pP;function CP(){let e=[],n=0,a=d=>{d()},o=d=>{d()},s=RP;const u=d=>{n?e.push(d):s(()=>{a(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{o(()=>{d.forEach(p=>{a(p)})})})};return{batch:d=>{let p;n++;try{p=d()}finally{n--,n||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{s=d}}}const Wn=CP();var TP=class extends Vl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}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(n=>{n(e)}))}isOnline(){return this.#e}};const Nh=new TP;function OP(e){return Math.min(1e3*2**e,3e4)}function gT(e){return(e??"online")==="online"?Nh.isOnline():!0}var gy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mT(e){let n=!1,a=0,o,s="pending",u,c;const d=new Promise((O,M)=>{u=O,c=M});d.catch(_r);const p=()=>s!=="pending",g=O=>{if(!p()){const M=new gy(O);C(M),e.onCancel?.(M)}},y=()=>{n=!0},h=()=>{n=!1},b=()=>wv.isFocused()&&(e.networkMode==="always"||Nh.isOnline())&&e.canRun(),S=()=>gT(e.networkMode)&&e.canRun(),w=O=>{p()||(o?.(),s="resolved",u(O))},C=O=>{p()||(o?.(),s="rejected",c(O))},E=O=>new Promise(M=>{o=A=>{(p()||O())&&M(A)},e.onPause?.()}).then(()=>{o=void 0,p()||e.onContinue?.()}),T=()=>{if(p())return;let O;const M=a===0?e.initialPromise:void 0;try{O=M??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(w).catch(A=>{if(p())return;const N=e.retry??(Sv()?0:3),P=e.retryDelay??OP,j=typeof P=="function"?P(a,A):P,D=N===!0||typeof N=="number"&&a<N||typeof N=="function"&&N(a,A);if(n||!D){C(A);return}a++,e.onFail?.(a,A),vP(j).then(()=>b()?void 0:E(b)).then(()=>{n?C(A):T()})})};return{promise:d,status:()=>s,cancel:g,continue:()=>(o?.(),d),cancelRetry:y,continueRetry:h,canStart:S,start:()=>(S()?T():E(S).then(T),d)}}var yT=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fT(this.gcTime)&&(this.#e=fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sv()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(fs.clearTimeout(this.#e),this.#e=void 0)}};function MP(e){return{onFetch:(n,a)=>{const o=n.options,s=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const h=w=>{SP(w,()=>n.signal,()=>y=!0)},b=pT(n.options,n.fetchOptions),S=async(w,C,E)=>{if(y)return Promise.reject(n.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const P={client:n.client,queryKey:n.queryKey,pageParam:C,direction:E?"backward":"forward",meta:n.options.meta};return h(P),P})(),M=await b(O),{maxPages:A}=n.options,N=E?xP:bP;return{pages:N(w.pages,M,A),pageParams:N(w.pageParams,C,A)}};if(s&&u.length){const w=s==="backward",C=w?AP:yw,E={pages:u,pageParams:c};d=await S(E,C(o,E),w)}else{const w=e??u.length;do{const C=p===0?c[0]===void 0?o.initialPageParam:c[0]:yw(o,d);if(p>0&&C==null)break;d=await S(d,C),p++}while(p<w)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=g}}}function yw(e,{pages:n,pageParams:a}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,a[o],a):void 0}function AP(e,{pages:n,pageParams:a}){return n.length>0?e.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var DP=class extends yT{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e){super(),this.#l=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#r=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=bw(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.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=bw(this.options);n.data!==void 0&&(this.setState(vw(n.data,n.dataUpdatedAt)),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,n){const a=py(this.state.data,e,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(e){this.#s({type:"setState",state:e})}cancel(e){const n=this.#a?.promise;return this.#a?.cancel(e),n?n.then(_r).catch(_r):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===bv||!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:!hT(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.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 n=this.observers.indexOf(e);n!==-1&&(this.observers.splice(n,1),this.observers.length||(this.#a&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const a=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#l=!0,a.signal)})},s=()=>{const p=pT(this.options,n),y=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(h),h})();return this.#l=!1,this.options.persister?this.options.persister(p,y,this):p(y)},c=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return o(p),p})();(this.#e==="infinite"?MP(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#s({type:"fetch",meta:c.fetchOptions?.meta});const d=this.#a=mT({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:p=>{p instanceof gy&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),a.abort()},onFail:(p,g)=>{this.#s({type:"failed",failureCount:p,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const p=await d.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#r.config.onSuccess?.(p,this),this.#r.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof gy){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#r.config.onError?.(p,this),this.#r.config.onSettled?.(this.state.data,p,this),p}finally{this.#a===d&&(this.#a=void 0),this.scheduleGc()}}#s(e){const n=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...vT(a.data,this.options),fetchMeta:e.meta??null};case"success":const o={...a,...vw(e.data,e.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?o:void 0,o;case"error":const s=e.error;return{...a,error:s,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=n(this.state),Wn.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function vT(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gT(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vw(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bw(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,a=n!==void 0,o=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var NP=class extends Vl{#e;#t=void 0;#n=void 0;#r=void 0;#o;#a;#i;#l;#s;#h;#c;#d;#u;#p=new Set;constructor(e,n){super(),this.options=n,this.#e=e,this.#i=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xw(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return my(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return my(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,a=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.#w(),this.#t.setOptions(this.options),n._defaulted&&!rh(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&Sw(this.#t,a,this.options,n)&&this.#f(),this.updateResult(),o&&(this.#t!==a||Pn(this.options.enabled,this.#t)!==Pn(n.enabled,this.#t)||Pn(this.options.staleTime,this.#t)!==Pn(n.staleTime,this.#t))&&this.#m();const s=this.#y();o&&(this.#t!==a||Pn(this.options.enabled,this.#t)!==Pn(n.enabled,this.#t)||s!==this.#u)&&this.#v(s)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(n,e);return rh(this.getCurrentResult(),a)||(this.#r=a,this.#a=this.options,this.#o=this.#t.state),a}getCurrentResult(){return this.#r}trackResult(e,n){return new Proxy(e,{get:(a,o)=>(this.trackProp(o),n?.(o),Reflect.get(a,o))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),a=this.#e.getQueryCache().build(this.#e,n);let o=()=>{},s;const u=new Promise(c=>{s=c,o=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===a.queryHash&&a.state.data!==void 0&&(o(),c(this.createResult(a,n)))})});return Promise.race([a.fetch(n).then(()=>{const c=this.createResult(a,n);return s?.(c),c}).finally(()=>{o()}),u])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(_r)),n}#g(e){return!Sv()&&Pn(this.options.enabled,this.#t)!==!1&&fT(e)}#m(){this.#x();const e=Pn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const n=hT(this.#r.dataUpdatedAt,e)+1;this.#c=fs.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return Pn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#u=e,!(this.#u===0||!this.#g(this.#u))&&(this.#d=fs.setInterval(()=>{(this.options.refetchIntervalInBackground||wv.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#c!==void 0&&(fs.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#d!==void 0&&(fs.clearInterval(this.#d),this.#d=void 0)}createResult(e,n){const a=this.#t,o=this.options,s=this.#r,u=this.#o,c=this.#a,d=e!==a?e.state:this.#n,{state:p}=e;let g={...p},y=!1,h;if(n._optimisticResults){const N=this.hasListeners(),P=!N&&xw(e,n),j=N&&Sw(e,a,n,o);(P||j)&&(g={...g,...vT(p.data,e.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:S,status:w}=g;h=g.data;let C=!1;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let N;s?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(N=s.data,C=!0):N=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,N!==void 0&&(w="success",h=py(s?.data,N,n),y=!0)}if(n.select&&h!==void 0&&!C)if(s&&h===u?.data&&n.select===this.#l)h=this.#s;else try{this.#l=n.select,h=n.select(h),h=py(s?.data,h,n),this.#s=h,this.#i=null}catch(N){this.#i=N}else h===void 0&&(this.#i=null);this.#i&&(b=this.#i,h=this.#s,S=Date.now(),w="error",y=!1);const E=g.fetchStatus==="fetching",T=w==="pending",O=w==="error",M=T&&E,A=h!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:T,isSuccess:w==="success",isError:O,isInitialLoading:M,isLoading:M,data:h,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&!T,isLoadingError:O&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:O&&A,isStale:Ev(e,n),refetch:this.refetch,isEnabled:Pn(n.enabled,e)!==!1}}updateResult(){const e=this.#r,n=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#a=this.options,this.#o.data!==void 0&&(this.#h=this.#t),rh(n,e))return;this.#r=n;const o=(()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,u=typeof s=="function"?s():s;if(u==="all"||!u&&!this.#p.size)return!0;const c=new Set(u??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const p=d;return this.#r[p]!==e[p]&&c.has(p)})})();Wn.batch(()=>{o&&this.listeners.forEach(s=>{s(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function kP(e,n){return Pn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pn(n.retryOnMount,e)===!1)}function xw(e,n){return kP(e,n)||e.state.data!==void 0&&my(e,n,n.refetchOnMount)}function my(e,n,a){if(Pn(n.enabled,e)!==!1&&Pn(n.staleTime,e)!=="static"){const o=Pn(a,e);return o==="always"||o!==!1&&Ev(e,n)}return!1}function Sw(e,n,a,o){return(e!==n||Pn(o.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&Ev(e,a)}function Ev(e,n){return Pn(n.enabled,e)!==!1&&e.isStaleByTime(Pn(n.staleTime,e))}var jP=class extends yT{#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||bT(),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(n=>n!==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 n=()=>{this.#o({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},o=this.#r=mT({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#o({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),s=this.state.status==="pending",u=!o.canStart();try{if(s)n();else{this.#o({type:"pending",variables:e,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,a);const d=await this.options.onMutate?.(e,a);d!==this.state.context&&this.#o({type:"pending",context:d,variables:e,isPaused:u})}const c=await o.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,a),await this.options.onSuccess?.(c,e,this.state.context,a),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(c,null,e,this.state.context,a),this.#o({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,e,this.state.context,a)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,a)}catch(d){Promise.reject(d)}throw this.#o({type:"error",error:c}),c}finally{this.#r===o&&(this.#r=void 0),this.#n.runNext(this)}}#o(e){const n=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wn.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function bT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var IP=class extends Vl{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,n,a){const o=new jP({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:a});return this.add(o),o}add(e){this.#e.add(e);const n=zf(e);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=zf(e);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const o=a.indexOf(e);o!==-1&&a.splice(o,1)}else a[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=zf(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=zf(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(n=>{this.notify({type:"removed",mutation:n})})})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(a=>pw(n,a))}findAll(e={}){return this.getAll().filter(n=>pw(e,n))}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Wn.batch(()=>Promise.all(e.map(n=>n.continue().catch(_r))))}};function zf(e){return e.options.scope?.id}var PP=class extends Vl{#e;#t=void 0;#n;#r;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),rh(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),a?.mutationKey&&this.options.mutationKey&&xs(a.mutationKey)!==xs(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.#o())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#o(),this.#a(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#a()}mutate(n,a){return this.#r=a,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#o(){const n=this.#n?.state??bT();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#a(n){Wn.batch(()=>{const a=this.#r;if(a&&this.hasListeners()){const o=this.#t.variables,s=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{a.onSuccess?.(n.data,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(n.data,null,o,s,u)}catch(c){Promise.reject(c)}}else if(n?.type==="error"){try{a.onError?.(n.error,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(void 0,n.error,o,s,u)}catch(c){Promise.reject(c)}}}this.listeners.forEach(o=>{o(this.#t)})})}},xT=class extends Vl{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,n,a){const o=n.queryKey,s=n.queryHash??yv(o,n);let u=this.get(s);return u||(u=new DP({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(n),state:a,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}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(){Wn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(a=>hw(n,a))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(a=>hw(e,a)):n}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},LP=class{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new xT,this.#t=e.mutationCache||new IP,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Nh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=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 n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),a=this.#e.build(this,n),o=a.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(Pn(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:a})=>[n,a.data])}setQueryData(e,n,a){const o=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(o.queryHash)?.state.data,u=mP(n,s);if(u!==void 0)return this.#e.build(this,o).setData(u,{...a,manual:!0})}setQueriesData(e,n,a){return Wn.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,a)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Wn.batch(()=>{n.findAll(e).forEach(a=>{n.remove(a)})})}resetQueries(e,n){const a=this.#e;return Wn.batch(()=>{const o=a.findAll(e),s=new Set(o);return o.forEach(u=>{u.reset()}),this.refetchQueries({type:"active",predicate:u=>s.has(u)},n)})}cancelQueries(e,n={}){const a={revert:!0,...n},o=Wn.batch(()=>this.#e.findAll(e).map(s=>s.cancel(a)));return Promise.all(o).then(_r).catch(_r)}invalidateQueries(e,n={}){return Wn.batch(()=>(this.#e.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},o=Wn.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,a);return a.throwOnError||(u=u.catch(_r)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(_r)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n),o=a.isStaleByTime(Pn(n.staleTime,a))?await a.fetch(n):a.state.data,s=n.select;return s?s(o):o}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(Pn(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_r).catch(_r)}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(_r).catch(_r)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Nh.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,n){this.#r.set(xs(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],a={};return n.forEach(o=>{_l(e,o.queryKey)&&Object.assign(a,o.defaultOptions)}),a}setMutationDefaults(e,n){this.#o.set(xs(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#o.values()],a={};return n.forEach(o=>{_l(e,o.mutationKey)&&Object.assign(a,o.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=yv(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===bv&&(n.enabled=!1),n}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 ST=v.createContext(!1),zP=()=>v.useContext(ST);ST.Provider;function _P(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const UP=v.createContext(_P()),HP=()=>v.useContext(UP),FP=(e,n,a)=>{const o=a?.state.status==="error"&&typeof e.throwOnError=="function"?xv(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||o)&&(n.isReset()||(e.retryOnMount=!1))},BP=e=>{v.useEffect(()=>{e.clearReset()},[e])},VP=({result:e,errorResetBoundary:n,throwOnError:a,query:o,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(s&&e.data===void 0||xv(a,[e.error,o])),qP=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...s)=>a(o(...s)):a(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},KP=(e,n)=>e?.suspense&&n.isPending,YP=(e,n,a)=>n.fetchOptimistic(e).catch(()=>{a.clearReset()});function GP(e,n,a){const o=zP(),s=HP(),u=mo(a),c=u.defaultQueryOptions(e),d=u.getQueryCache().get(c.queryHash),p=e.subscribed!==!1;c._optimisticResults=o?"isRestoring":p?"optimistic":void 0,qP(c),FP(c,s,d),BP(s);const[g]=v.useState(()=>new n(u,c)),y=g.getOptimisticResult(c),h=!o&&p;if(v.useSyncExternalStore(v.useCallback(b=>{const S=h?g.subscribe(Wn.batchCalls(b)):_r;return g.updateResult(),S},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),v.useEffect(()=>{g.setOptions(c)},[c,g]),KP(c,y))throw YP(c,g,s);if(VP({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;return c.notifyOnChangeProps?y:g.trackResult(y)}function ql(e,n){return GP(e,NP,n)}function $P(e,n){const a=mo(n);return XP({filters:{...e,status:"pending"}},a).length}function QP(){let e;return(n,a)=>{let o=[],s;return()=>{const u=n.findAll(a.filters),c=u.flatMap(d=>[d,d.state]);return(!s||c.length!==o.length||c.some((d,p)=>!Object.is(d,o[p])))&&(o=c,s=vv(e,u.map(d=>a.select?a.select(d):d.state)),e=s),s}}}function XP(e={},n){const a=mo(n).getMutationCache(),[o]=v.useState(()=>QP()),s=o(a,e);return v.useSyncExternalStore(v.useCallback(u=>a.subscribe(Wn.batchCalls(u)),[a]),s,s)}function fa(e,n){const a=mo(n),[o]=v.useState(()=>new PP(a,e));v.useEffect(()=>{o.setOptions(e)},[o,e]);const s=v.useSyncExternalStore(v.useCallback(c=>o.subscribe(Wn.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=v.useCallback((...c)=>{o.mutate(c[0],c[1]).catch(_r)},[o]);if(s.error&&xv(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}var wT=e=>{throw TypeError(e)},ET=(e,n,a)=>n.has(e)||wT("Cannot "+a),Ca=(e,n,a)=>(ET(e,n,"read from private field"),a?a.call(e):n.get(e)),ec=(e,n,a)=>n.has(e)?wT("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),io=(e,n,a,o)=>(ET(e,n,"write to private field"),n.set(e,a),a),Ep=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Rp=/^[\\/]{2}/;function RT(e,n){return n+e.replace(/\\/g,"/")}var ww="popstate";function Ew(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ZP(e={}){function n(s,u){let{pathname:c="/",search:d="",hash:p=""}=Ga(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),mc("",{pathname:c,search:d,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(s,u){let c=s.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let p=s.location.href,g=p.indexOf("#");d=g===-1?p:p.slice(0,g)}return d+"#"+(typeof u=="string"?u:Ur(u))}function o(s,u){Hn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return WP(n,a,o,e)}function Lt(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Hn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function JP(){return Math.random().toString(36).substring(2,10)}function Rw(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mc(e,n,a=null,o,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Ga(n):n,state:a,key:n&&n.key||o||JP(),mask:s}}function Ur({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Ga(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function WP(e,n,a,o={}){let{window:s=document.defaultView,v5Compat:u=!1}=o,c=s.history,d="POP",p=null,g=y();g==null&&(g=0,c.replaceState({...c.state,idx:g},""));function y(){return(c.state||{idx:null}).idx}function h(){d="POP";let E=y(),T=E==null?null:E-g;g=E,p&&p({action:d,location:C.location,delta:T})}function b(E,T){d="PUSH";let O=Ew(E)?E:mc(C.location,E,T);a&&a(O,E),g=y()+1;let M=Rw(O,g),A=C.createHref(O.mask||O);try{c.pushState(M,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;s.location.assign(A)}u&&p&&p({action:d,location:C.location,delta:1})}function S(E,T){d="REPLACE";let O=Ew(E)?E:mc(C.location,E,T);a&&a(O,E),g=y();let M=Rw(O,g),A=C.createHref(O.mask||O);c.replaceState(M,"",A),u&&p&&p({action:d,location:C.location,delta:0})}function w(E){return CT(s,E)}let C={get action(){return d},get location(){return e(s,c)},listen(E){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(ww,h),p=E,()=>{s.removeEventListener(ww,h),p=null}},createHref(E){return n(s,E)},createURL:w,encodeLocation(E){let T=w(E);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:S,go(E){return c.go(E)}};return C}function CT(e,n,a=!1){let o="http://localhost";e&&(o=e.location.origin!=="null"?e.location.origin:e.location.href),Lt(o,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Ur(n);return s=s.replace(/ $/,"%20"),!a&&Rp.test(s)&&(s=o+s),new URL(s,o)}var tc,Cw=class{constructor(e){if(ec(this,tc,new Map),e)for(let[n,a]of e)this.set(n,a)}get(e){if(Ca(this,tc).has(e))return Ca(this,tc).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Ca(this,tc).set(e,n)}};tc=new WeakMap;var eL=new Set(["lazy","caseSensitive","path","id","index","children"]);function tL(e){return eL.has(e)}var nL=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function rL(e){return nL.has(e)}function aL(e){return e.index===!0}function yc(e,n,a=[],o={},s=!1){return e.map((u,c)=>{let d=[...a,String(c)],p=typeof u.id=="string"?u.id:d.join("-");if(Lt(u.index!==!0||!u.children,"Cannot specify children on an index route"),Lt(s||!o[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),aL(u)){let g={...u,id:p};return o[p]=Tw(g,n(g)),g}else{let g={...u,id:p,children:void 0};return o[p]=Tw(g,n(g)),u.children&&(g.children=yc(u.children,n,d,o,s)),g}})}function Tw(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function TT(e,n,a="/"){return Fa(e,n,a,!1)}function Fa(e,n,a,o,s){let u=typeof n=="string"?Ga(n):n,c=Na(u.pathname||"/",a);if(c==null)return null;let d=s??ah(e),p=null,g=kT(c);for(let y=0;p==null&&y<d.length;++y)p=pL(d[y],g,o);return p}function OT(e,n){let{route:a,pathname:o,params:s}=e;return{id:a.id,pathname:o,params:s,data:n[a.id],loaderData:n[a.id],handle:a.handle}}function ah(e){let n=MT(e);return oL(n),n}function MT(e,n=[],a=[],o="",s=!1){let u=(c,d,p=s,g)=>{let y={relativePath:g===void 0?c.path||"":g,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;Lt(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let h=Aa([o,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(Lt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),MT(c.children,n,b,h,p)),!(c.path==null&&!c.index)&&n.push({path:h,score:fL(h,c.index),routesMeta:b.map((S,w)=>{let[C,E]=NT(S.relativePath,S.caseSensitive,w===b.length-1);return{...S,matcher:C,compiledParams:E}})})};return e.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let p of AT(c.path))u(c,d,!0,p)}),n}function AT(e){let n=e.split("/");if(n.length===0)return[];let[a,...o]=n,s=a.endsWith("?"),u=a.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let c=AT(o.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),s&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function oL(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:hL(n.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var iL=/^:[\w-]+$/,sL=3,lL=2,uL=1,cL=10,dL=-2,Ow=e=>e==="*";function fL(e,n){let a=e.split("/"),o=a.length;return a.some(Ow)&&(o+=dL),n&&(o+=lL),a.filter(s=>!Ow(s)).reduce((s,u)=>s+(iL.test(u)?sL:u===""?uL:cL),o)}function hL(e,n){return e.length===n.length&&e.slice(0,-1).every((o,s)=>o===n[s])?e[e.length-1]-n[n.length-1]:0}function pL(e,n,a=!1){let{routesMeta:o}=e,s={},u="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],g=d===o.length-1,y=u==="/"?n:n.slice(u.length)||"/",h={path:p.relativePath,caseSensitive:p.caseSensitive,end:g},b=p.matcher&&p.compiledParams?DT(h,y,p.matcher,p.compiledParams):vc(h,y),S=p.route;if(!b&&g&&a&&!o[o.length-1].route.index&&(b=vc({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(s,b.params),c.push({params:s,pathname:Aa([u,b.pathname]),pathnameBase:yL(Aa([u,b.pathnameBase])),route:S}),b.pathnameBase!=="/"&&(u=Aa([u,b.pathnameBase]))}return c}function vc(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,o]=NT(e.path,e.caseSensitive,e.end);return DT(e,n,a,o)}function DT(e,n,a,o){let s=n.match(a);if(!s)return null;let u=s[0],c=Ul(u,1),d=s.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:h},b)=>{if(y==="*"){let w=d[b]||"";c=Ul(u.slice(0,u.length-w.length),1)}const S=d[b];return h&&!S?g[y]=void 0:g[y]=(S||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:c,pattern:e}}function NT(e,n=!1,a=!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 o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,g,y)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let h=y.charAt(g+c.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),o]}function kT(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){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 (${n}).`),e}}function Na(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,o=e.charAt(a);return o&&o!=="/"?null:e.slice(a)||"/"}function gL({basename:e,pathname:n}){return n==="/"?e:Aa([e,n])}var Rv=e=>Ep.test(e);function mL(e,n="/"){let{pathname:a,search:o="",hash:s=""}=typeof e=="string"?Ga(e):e,u;return a?(a=Cv(a),a.startsWith("/")||a.startsWith("\\")?u=Mw(a.substring(1),"/"):u=Mw(a,n)):u=n,{pathname:u,search:vL(o),hash:bL(s)}}function Mw(e,n){let a=Ul(n).split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function z0(e,n,a,o){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jT(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function Cp(e){let n=jT(e);return n.map((a,o)=>o===n.length-1?a.pathname:a.pathnameBase)}function Uc(e,n,a,o=!1){let s;typeof e=="string"?s=Ga(e):(s={...e},Lt(!s.pathname||!s.pathname.includes("?"),z0("?","pathname","search",s)),Lt(!s.pathname||!s.pathname.includes("#"),z0("#","pathname","hash",s)),Lt(!s.search||!s.search.includes("#"),z0("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,d;if(c==null)d=a;else{let h=n.length-1;if(!o&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),h-=1;s.pathname=b.join("/")}d=h>=0?n[h]:"/"}let p=mL(s,d),g=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var Cv=e=>e.replace(/[\\/]{2,}/g,"/"),Aa=e=>Cv(e.join("/"));function Ul(e,n=0){let a=e.length;for(;a>n&&e.charCodeAt(a-1)===47;)a--;return a===e.length?e:e.slice(0,a)}var yL=e=>Ul(e).replace(/^\/*/,"/"),vL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,xL=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Hc=class{constructor(e,n,a,o=!1){this.status=e,this.statusText=n||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function bc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Fc(e){let n=e.map(a=>a.route.path).filter(Boolean);return Aa(n)||"/"}var IT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function PT(e,n){let a=e;if(typeof a!="string"||!Ep.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,s=!1;if(IT)try{let u=new URL(window.location.href),c=Rp.test(a)?new URL(RT(a,u.protocol)):new URL(a),d=Na(c.pathname,n);c.origin===u.origin&&d!=null?a=d+c.search+c.hash:s=!0}catch{Hn(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:s,to:a}}var Ri=Symbol("Uninstrumented");function SL(e,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:n.id,index:n.index,path:n.path,instrument(u){let c=Object.keys(a);for(let d of c)u[d]&&a[d].push(u[d])}}));let o={};if(typeof n.lazy=="function"&&a.lazy.length>0){let s=wl(a.lazy,n.lazy,()=>{});s&&(o.lazy=s)}if(typeof n.lazy=="object"){let s=n.lazy;["middleware","loader","action"].forEach(u=>{let c=s[u],d=a[`lazy.${u}`];if(typeof c=="function"&&d.length>0){let p=wl(d,c,()=>{});p&&(o.lazy=Object.assign(o.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(s=>{let u=n[s];if(typeof u=="function"&&a[s].length>0){let c=u[Ri]??u,d=wl(a[s],c,(...p)=>Aw(p[0]));d&&(s==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Ri]=c,o[s]=d)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(o.middleware=n.middleware.map(s=>{let u=s[Ri]??s,c=wl(a.middleware,u,(...d)=>Aw(d[0]));return c?(c[Ri]=u,c):s})),o}function wL(e,n){let a={navigate:[],fetch:[]};if(n.forEach(o=>o({instrument(s){let u=Object.keys(s);for(let c of u)s[c]&&a[c].push(s[c])}})),a.navigate.length>0){let o=e.navigate[Ri]??e.navigate,s=wl(a.navigate,o,(...u)=>{let[c,d]=u;return{to:typeof c=="number"||typeof c=="string"?c:c?Ur(c):".",...Dw(e,d??{})}});s&&(s[Ri]=o,e.navigate=s)}if(a.fetch.length>0){let o=e.fetch[Ri]??e.fetch,s=wl(a.fetch,o,(...u)=>{let[c,,d,p]=u;return{href:d??".",fetcherKey:c,...Dw(e,p??{})}});s&&(s[Ri]=o,e.fetch=s)}return e}function wl(e,n,a){return e.length===0?null:async(...o)=>{let s=await LT(e,a(...o),()=>n(...o),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function LT(e,n,a,o){let s=e[o],u;if(s){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=LT(e,n,a,o-1),u=await c,Lt(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await s(d,n)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{u={type:"success",value:await a()}}catch(c){u={type:"error",value:c}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Aw(e){let{request:n,context:a,params:o,pattern:s}=e;return{request:EL(n),params:{...o},pattern:s,context:RL(a)}}function Dw(e,n){return{currentUrl:Ur(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function EL(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function RL(e){if(TL(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var CL=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function TL(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===CL}var Nw=new URL("http://localhost");function Tv(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Nw)}catch{return Nw}}function _0(e,n){return e.origin===n.origin&&(e.origin!=="null"||e.protocol===n.protocol&&e.host===n.host)}function OL(e,n){if(e.startsWith("//"))return!0;let a=n.protocol.toLowerCase();return e.toLowerCase().startsWith(a)?n.host===""||e.slice(a.length).startsWith("//"):!1}function Dl(e,n,a,o){let s=null;try{s=e==null?null:new URL(e,a)}catch{}let u=new URL(n,a),c=s!=null&&!_0(s,a),d=!_0(u,a);if(o==="reject"){if(c||d)throw new Error("External navigation is not allowed")}else if(d&&(s==null||!OL(e,s)||!_0(s,u)))throw new Error("External navigation is not allowed")}var zT=["POST","PUT","PATCH","DELETE"],ML=new Set(zT),AL=["GET",...zT],DL=new Set(AL),_T=new Set([301,302,303,307,308]),NL=new Set([307,308]),U0={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},kL={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$u={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jL=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),UT="remix-router-transitions",HT=Symbol("ResetLoaderData"),cs,vl,bi,bl,IL=class{constructor(e){ec(this,cs),ec(this,vl),ec(this,bi),ec(this,bl),io(this,cs,e),io(this,vl,ah(e))}get stableRoutes(){return Ca(this,cs)}get activeRoutes(){return Ca(this,bi)??Ca(this,cs)}get branches(){return Ca(this,bl)??Ca(this,vl)}get hasHMRRoutes(){return Ca(this,bi)!=null}setRoutes(e){io(this,cs,e),io(this,vl,ah(e))}setHmrRoutes(e){io(this,bi,e),io(this,bl,ah(e))}commitHmrRoutes(){Ca(this,bi)&&(io(this,cs,Ca(this,bi)),io(this,vl,Ca(this,bl)),io(this,bi,void 0),io(this,bl,void 0))}};cs=new WeakMap;vl=new WeakMap;bi=new WeakMap;bl=new WeakMap;function PL(e){const n=e.window?e.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";Lt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=e.hydrationRouteProperties||[],s=e.mapRouteProperties||jL,u=s;if(e.instrumentations){let _=e.instrumentations;u=Z=>({...s(Z),...SL(_.map(ne=>ne.route).filter(Boolean),Z)})}let c={},d=new IL(yc(e.routes,u,void 0,c)),p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||HL,y={...e.future},h=null,b=new Set,S=null,w=null,C=null,E=null,T=e.hydrationData!=null,O=Fa(d.activeRoutes,e.history.location,p,!1,d.branches),M=!1,A=null,N,P;if(O==null&&!e.patchRoutesOnNavigation){let _=Ta(404,{pathname:e.history.location.pathname}),{matches:Z,route:ne}=_f(d.activeRoutes);N=!0,P=!N,O=Z,A={[ne.id]:_}}else if(O&&!e.hydrationData&&Ie(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(_=>_.route.lazy))N=!1,P=!N;else if(!O.some(_=>Ov(_.route)))N=!0,P=!N;else{let _=e.hydrationData?e.hydrationData.loaderData:null,Z=e.hydrationData?e.hydrationData.errors:null,ne=O;if(Z){let ye=O.findIndex(xe=>Z[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}P=!1,N=!0,ne.forEach(ye=>{let xe=FT(ye.route,_,Z);P=P||xe.renderFallback,N=N&&!xe.shouldLoad})}else{N=!1,P=!N,O=[];let _=Ie(null,d.activeRoutes,e.history.location.pathname);_.active&&_.matches&&(M=!0,O=_.matches)}let j,D={historyAction:e.history.action,location:e.history.location,matches:O,initialized:N,renderFallback:P,navigation:U0,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||A,fetchers:new Map,blockers:new Map},z="POP",F=null,G=!1,J,K=!1,H=new Map,U=null,L=!1,$=!1,Y=new Set,V=new Map,Q=0,ee=-1,q=new Map,se=new Set,k=new Map,B=new Map,W=new Set,re=new Map,Ee,le=null;function me(){if(h=e.history.listen(({action:_,location:Z,delta:ne})=>{if(Ee){Ee(),Ee=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=vt({currentLocation:D.location,nextLocation:Z,historyAction:_});if(ye&&ne!=null){let xe=new Promise(qe=>{Ee=qe});e.history.go(ne*-1),ft(ye,{state:"blocked",location:Z,proceed(){ft(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),xe.then(()=>e.history.go(ne))},reset(){let qe=new Map(D.blockers);qe.set(ye,$u),Te({blockers:qe})}}),F?.resolve(),F=null;return}return Le(_,Z)}),a){o5(n,H);let _=()=>i5(n,H);n.addEventListener("pagehide",_),U=()=>n.removeEventListener("pagehide",_)}return D.initialized||Le("POP",D.location,{initialHydration:!0}),j}function ge(){h&&h(),U&&U(),b.clear(),J&&J.abort(),D.fetchers.forEach((_,Z)=>Ot(D.fetchers,Z)),D.blockers.forEach((_,Z)=>Xt(Z))}function ce(_){if(b.add(_),S){let{newErrors:Z}=S;S=null,_(D,{deletedFetchers:[],newErrors:Z,viewTransitionOpts:void 0,flushSync:!1})}return()=>b.delete(_)}function Te(_,Z={}){_.matches&&(_.matches=_.matches.map(xe=>{let qe=c[xe.route.id],Ve=xe.route;return Ve.element!==qe.element||Ve.errorElement!==qe.errorElement||Ve.hydrateFallbackElement!==qe.hydrateFallbackElement?{...xe,route:qe}:xe})),D={...D,..._};let ne=[],ye=[];D.fetchers.forEach((xe,qe)=>{xe.state==="idle"&&(W.has(qe)?ne.push(qe):ye.push(qe))}),W.forEach(xe=>{!D.fetchers.has(xe)&&!V.has(xe)&&ne.push(xe)}),b.size===0&&(S={newErrors:_.errors??null}),[...b].forEach(xe=>xe(D,{deletedFetchers:ne,newErrors:_.errors??null,viewTransitionOpts:Z.viewTransitionOpts,flushSync:Z.flushSync===!0})),ne.forEach(xe=>Ot(D.fetchers,xe)),ye.forEach(xe=>D.fetchers.delete(xe))}function ve(_,Z,{flushSync:ne}={}){let ye=D.actionData!=null&&D.navigation.formMethod!=null&&Rr(D.navigation.formMethod)&&D.navigation.state==="loading"&&_.state?._isRedirect!==!0,xe;Z.actionData?Object.keys(Z.actionData).length>0?xe=Z.actionData:xe=null:ye?xe=D.actionData:xe=null;let qe=Z.loaderData?Fw(D.loaderData,Z.loaderData,Z.matches||[],Z.errors):D.loaderData,Ve=D.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((tt,St)=>Ve.set(St,$u)));let Xe=L?!1:ot(_,Z.matches||D.matches),$e=G===!0||D.navigation.formMethod!=null&&Rr(D.navigation.formMethod)&&_.state?._isRedirect!==!0;d.commitHmrRoutes(),L||z==="POP"||(z==="PUSH"?e.history.push(_,_.state):z==="REPLACE"&&e.history.replace(_,_.state));let st;if(z==="POP"&&!L&&_!==D.location){let tt=H.get(D.location.pathname);tt&&tt.has(_.pathname)?st={currentLocation:D.location,nextLocation:_}:H.has(_.pathname)&&(st={currentLocation:_,nextLocation:D.location})}else if(K){let tt=H.get(D.location.pathname);tt?tt.add(_.pathname):(tt=new Set([_.pathname]),H.set(D.location.pathname,tt)),st={currentLocation:D.location,nextLocation:_}}Te({...Z,actionData:xe,loaderData:qe,historyAction:z,location:_,initialized:!0,renderFallback:!1,navigation:U0,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:$e,blockers:Ve},{viewTransitionOpts:st,flushSync:ne===!0}),z="POP",G=!1,K=!1,L=!1,$=!1,F?.resolve(),F=null,le?.resolve(),le=null}async function Pe(_,Z){if(F?.resolve(),F=null,typeof _=="number"){F||(F=Kw());let Ut=F.promise;return e.history.go(_),Ut}let ne=yy(D.location,D.matches,p,_,Z?.fromRouteId,Z?.relative),{path:ye,submission:xe,error:qe}=kw(!1,ne,Z),Ve;if(Z?.mask){let Ut=typeof Z.mask=="string"?Ga(Z.mask):{...D.location.mask,...Z.mask};if(Ve={pathname:Ut.pathname??"",search:Ut.search??"",hash:Ut.hash??""},Rp.test(Ve.pathname))throw new Error("External navigation is not allowed");Ve.pathname.startsWith("\\")&&(Ve.pathname=Ve.pathname.replace(/^\\+/,"/")),Dl(typeof Z.mask=="string"?Z.mask:Ur(Z.mask),Ur(Ve),e.history.createURL("/"),"reject")}let Xe=D.location,$e=mc(Xe,ye,Z&&Z.state,void 0,Ve);$e={...$e,...e.history.encodeLocation($e)},Dl(_==null?e.history.createHref(D.location):typeof _=="string"?_:Ur(_),e.history.createHref($e.mask||$e),e.history.createURL("/"),"reject");let st=Z&&Z.replace!=null?Z.replace:void 0,tt="PUSH";st===!0?tt="REPLACE":st===!1||xe!=null&&Rr(xe.formMethod)&&xe.formAction===D.location.pathname+D.location.search&&(tt="REPLACE");let St=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,ct=(Z&&Z.flushSync)===!0,Vt=vt({currentLocation:Xe,nextLocation:$e,historyAction:tt});if(Vt){ft(Vt,{state:"blocked",location:$e,proceed(){ft(Vt,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),Pe(_,Z)},reset(){let Ut=new Map(D.blockers);Ut.set(Vt,$u),Te({blockers:Ut})}});return}await Le(tt,$e,{submission:xe,pendingError:qe,preventScrollReset:St,replace:Z&&Z.replace,enableViewTransition:Z&&Z.viewTransition,flushSync:ct,callSiteDefaultShouldRevalidate:Z&&Z.defaultShouldRevalidate})}function Me(){le||(le=Kw()),De(),Te({revalidation:"loading"});let _=le.promise;return D.navigation.state==="submitting"?_:D.navigation.state==="idle"?(Le(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),_):(Le(z||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:K===!0}),_)}async function Le(_,Z,ne){J&&J.abort(),J=null,z=_,L=(ne&&ne.startUninterruptedRevalidation)===!0,je(D.location,D.matches),G=(ne&&ne.preventScrollReset)===!0,K=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&D.matches&&D.matches.length>0&&!M?D.matches:Fa(ye,Z,p,!1,d.branches),qe=(ne&&ne.flushSync)===!0;if(xe&&D.initialized&&!$&&QL(D.location,Z)&&!(ne&&ne.submission&&Rr(ne.submission.formMethod))){ve(Z,{matches:xe},{flushSync:qe});return}let Ve=Ie(xe,ye,Z.pathname);if(Ve.active&&Ve.matches&&(xe=Ve.matches),!xe){let{error:qt,notFoundMatches:Ht,route:Rn}=gt(Z.pathname);ve(Z,{matches:Ht,loaderData:{},errors:{[Rn.id]:qt}},{flushSync:qe});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:_}:void 0;J=new AbortController;let $e=xl(e.history,Z,J.signal,ne&&ne.submission),st=e.getContext?await e.getContext():new Cw,tt;if(ne&&ne.pendingError)tt=[wi(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Rr(ne.submission.formMethod)){let qt=await Fe($e,Z,ne.submission,xe,_,st,Ve.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:qe});if(qt.shortCircuited)return;if(qt.pendingActionResult){let[Ht,Rn]=qt.pendingActionResult;if(ca(Rn)&&bc(Rn.error)&&Rn.error.status===404){J=null,ve(Z,{matches:qt.matches,loaderData:{},errors:{[Ht]:Rn.error}});return}}xe=qt.matches||xe,tt=qt.pendingActionResult,Xe=H0(Z,xe,_,ne.submission),qe=!1,Ve.active=!1,$e=xl(e.history,$e.url,$e.signal)}let{shortCircuited:St,matches:ct,loaderData:Vt,errors:Ut,workingFetchers:On}=await Oe($e,Z,xe,_,st,Ve.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,qe,tt,ne&&ne.callSiteDefaultShouldRevalidate);St||(J=null,ve(Z,{matches:ct||xe,...Bw(tt),loaderData:Vt,errors:Ut,...On?{fetchers:On}:{}}))}async function Fe(_,Z,ne,ye,xe,qe,Ve,Xe,$e={}){De();let st=r5(Z,ye,xe,ne);if(Te({navigation:st},{flushSync:$e.flushSync===!0}),Ve){let ct=await ze(ye,Z.pathname,_.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){if(ct.partialMatches.length===0){let{matches:Ut,route:On}=_f(d.activeRoutes);return{matches:Ut,pendingActionResult:[On.id,{type:"error",error:ct.error}]}}let Vt=wi(ct.partialMatches).route.id;return{matches:ct.partialMatches,pendingActionResult:[Vt,{type:"error",error:ct.error}]}}else if(ct.matches)ye=ct.matches;else{let{notFoundMatches:Vt,error:Ut,route:On}=gt(Z.pathname);return{matches:Vt,pendingActionResult:[On.id,{type:"error",error:Ut}]}}}let tt,St=oh(ye,Z);if(!St.route.action&&!St.route.lazy)tt={type:"error",error:Ta(405,{method:_.method,pathname:Z.pathname,routeId:St.route.id})};else{let ct=Nl(u,c,_,Z,ye,St,Xe?[]:o,qe),Vt=await we(_,Z,ct,qe,null);if(tt=Vt[St.route.id],!tt){for(let Ut of ye)if(Vt[Ut.route.id]){tt=Vt[Ut.route.id];break}}if(_.signal.aborted)return{shortCircuited:!0}}if(hs(tt)){let ct;return $e&&$e.replace!=null?ct=$e.replace:ct=_w(tt.response.headers.get("Location"),new URL(_.url),p,e.history)===D.location.pathname+D.location.search,await de(_,tt,!0,{submission:ne,replace:ct}),{shortCircuited:!0}}if(ca(tt)){let ct=wi(ye,St.route.id);return($e&&$e.replace)!==!0&&(z="PUSH"),{matches:ye,pendingActionResult:[ct.route.id,tt,St.route.id]}}return{matches:ye,pendingActionResult:[St.route.id,tt]}}async function Oe(_,Z,ne,ye,xe,qe,Ve,Xe,$e,st,tt,St,ct,Vt){let Ut=Ve||H0(Z,ne,ye,Xe),On=Xe||$e||qw(Ut),qt=!L&&!tt;if(qe){if(qt){let Kn=Ue(ct);Te({navigation:Ut,...Kn!==void 0?{actionData:Kn}:{}},{flushSync:St})}let Pt=await ze(ne,Z.pathname,_.signal);if(Pt.type==="aborted")return{shortCircuited:!0};if(Pt.type==="error"){if(Pt.partialMatches.length===0){let{matches:Fn,route:fr}=_f(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[fr.id]:Pt.error}}}let Kn=wi(Pt.partialMatches).route.id;return{matches:Pt.partialMatches,loaderData:{},errors:{[Kn]:Pt.error}}}else if(Pt.matches)ne=Pt.matches;else{let{error:Kn,notFoundMatches:Fn,route:fr}=gt(Z.pathname);return{matches:Fn,loaderData:{},errors:{[fr.id]:Kn}}}}let Ht=d.activeRoutes,{dsMatches:Rn,revalidatingFetchers:Cn}=jw(_,xe,u,c,e.history,D,ne,On,Z,tt?[]:o,tt===!0,$,Y,W,k,se,Ht,p,e.patchRoutesOnNavigation!=null,d.branches,ct,Vt);if(ee=++Q,!e.dataStrategy&&!Rn.some(Pt=>Pt.shouldLoad)&&!Rn.some(Pt=>Pt.route.middleware&&Pt.route.middleware.length>0)&&Cn.length===0){let Pt=new Map(D.fetchers),Kn=tn(Pt);return ve(Z,{matches:ne,loaderData:{},errors:ct&&ca(ct[1])?{[ct[0]]:ct[1].error}:null,...Bw(ct),...Kn?{fetchers:Pt}:{}},{flushSync:St}),{shortCircuited:!0}}if(qt){let Pt={};if(!qe){Pt.navigation=Ut;let Kn=Ue(ct);Kn!==void 0&&(Pt.actionData=Kn)}Cn.length>0&&(Pt.fetchers=be(Cn)),Te(Pt,{flushSync:St})}Cn.forEach(Pt=>{en(Pt.key),Pt.controller&&V.set(Pt.key,Pt.controller)});let Zr=()=>Cn.forEach(Pt=>en(Pt.key));J&&J.signal.addEventListener("abort",Zr);let{loaderResults:cn,fetcherResults:dn}=await Ye(Rn,Cn,_,Z,xe);if(_.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",Zr),Cn.forEach(Pt=>V.delete(Pt.key));let Mn=Uf(cn);if(Mn)return await de(_,Mn.result,!0,{replace:st}),{shortCircuited:!0};if(Mn=Uf(dn),Mn)return se.add(Mn.key),await de(_,Mn.result,!0,{replace:st}),{shortCircuited:!0};let jn=new Map(D.fetchers),{loaderData:bo,errors:Dr}=Hw(D,ne,cn,ct,Cn,dn,jn);tt&&D.errors&&(Dr={...D.errors,...Dr});let Ia=tn(jn),Jr=We(ee,jn),ga=Ia||Jr||Cn.length>0;return{matches:ne,loaderData:bo,errors:Dr,...ga?{workingFetchers:jn}:{}}}function Ue(_){if(_&&!ca(_[1]))return{[_[0]]:_[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function be(_){let Z=new Map(D.fetchers);return _.forEach(ne=>{let ye=Z.get(ne.key),xe=Qu(void 0,ye?ye.data:void 0);Z.set(ne.key,xe)}),Z}async function He(_,Z,ne,ye){en(_);let xe=(ye&&ye.flushSync)===!0,qe=d.activeRoutes,Ve=yy(D.location,D.matches,p,ne,Z,ye?.relative),Xe=Fa(qe,Ve,p,!1,d.branches),$e=Ie(Xe,qe,Ve);if($e.active&&$e.matches&&(Xe=$e.matches),!Xe){yt(_,Z,Ta(404,{pathname:Ve}),{flushSync:xe});return}let{path:st,submission:tt,error:St}=kw(!0,Ve,ye);if(St){yt(_,Z,St,{flushSync:xe});return}let ct=e.getContext?await e.getContext():new Cw,Vt=(ye&&ye.preventScrollReset)===!0;if(tt&&Rr(tt.formMethod)){await Ze(_,Z,st,Xe,ct,$e.active,xe,Vt,tt,ye&&ye.defaultShouldRevalidate);return}k.set(_,{routeId:Z,path:st}),await it(_,Z,st,Xe,ct,$e.active,xe,Vt,tt)}async function Ze(_,Z,ne,ye,xe,qe,Ve,Xe,$e,st){De(),k.delete(_);let tt=D.fetchers.get(_);ke(_,a5($e,tt),{flushSync:Ve});let St=new AbortController,ct=xl(e.history,ne,St.signal,$e);if(qe){let Se=await ze(ye,new URL(ct.url).pathname,ct.signal,_);if(Se.type==="aborted")return;if(Se.type==="error"){yt(_,Z,Se.error,{flushSync:Ve});return}else if(Se.matches)ye=Se.matches;else{yt(_,Z,Ta(404,{pathname:ne}),{flushSync:Ve});return}}let Vt=oh(ye,ne);if(!Vt.route.action&&!Vt.route.lazy){let Se=Ta(405,{method:$e.formMethod,pathname:ne,routeId:Z});yt(_,Z,Se,{flushSync:Ve});return}V.set(_,St);let Ut=Q,On=Nl(u,c,ct,ne,ye,Vt,o,xe),qt=await we(ct,ne,On,xe,_),Ht=qt[Vt.route.id];if(!Ht){for(let Se of On)if(qt[Se.route.id]){Ht=qt[Se.route.id];break}}if(ct.signal.aborted){V.get(_)===St&&V.delete(_);return}if(W.has(_)){if(hs(Ht)||ca(Ht)){ke(_,so(void 0));return}}else{if(hs(Ht))if(V.delete(_),ee>Ut){ke(_,so(void 0));return}else return se.add(_),ke(_,Qu($e)),de(ct,Ht,!1,{fetcherSubmission:$e,preventScrollReset:Xe});if(ca(Ht)){yt(_,Z,Ht.error);return}}let Rn=D.navigation.location||D.location,Cn=xl(e.history,Rn,St.signal),Zr=d.activeRoutes,cn=D.navigation.state!=="idle"?Fa(Zr,D.navigation.location,p,!1,d.branches):D.matches;Lt(cn,"Didn't find any matches after fetcher action");let dn=++Q;q.set(_,dn);let{dsMatches:Mn,revalidatingFetchers:jn}=jw(Cn,xe,u,c,e.history,D,cn,$e,Rn,o,!1,$,Y,W,k,se,Zr,p,e.patchRoutesOnNavigation!=null,d.branches,[Vt.route.id,Ht],st),bo=Qu($e,Ht.data),Dr=new Map(D.fetchers);Dr.set(_,bo),jn.filter(Se=>Se.key!==_).forEach(Se=>{let nt=Se.key,Ct=Dr.get(nt),wt=Qu(void 0,Ct?Ct.data:void 0);Dr.set(nt,wt),en(nt),Se.controller&&V.set(nt,Se.controller)}),Te({fetchers:Dr});let Ia=()=>jn.forEach(Se=>en(Se.key));St.signal.addEventListener("abort",Ia);let{loaderResults:Jr,fetcherResults:ga}=await Ye(Mn,jn,Cn,Rn,xe);if(St.signal.aborted)return;St.signal.removeEventListener("abort",Ia),q.delete(_),V.delete(_),jn.forEach(Se=>V.delete(Se.key));let Pt=D.fetchers.has(_),Kn=Se=>{if(!Pt)return Se;let nt=new Map(Se.fetchers);return nt.set(_,so(Ht.data)),{...Se,fetchers:nt}},Fn=Uf(Jr);if(Fn)return D=Kn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=Uf(ga),Fn)return se.add(Fn.key),D=Kn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});let fr=new Map(D.fetchers);Pt&&fr.set(_,so(Ht.data));let{loaderData:he,errors:Ae}=Hw(D,cn,Jr,void 0,jn,ga,fr);We(dn,fr),D.navigation.state==="loading"&&dn>ee?(Lt(z,"Expected pending action"),J&&J.abort(),ve(D.navigation.location,{matches:cn,loaderData:he,errors:Ae,fetchers:fr})):(Te({errors:Ae,loaderData:Fw(D.loaderData,he,cn,Ae),fetchers:fr}),$=!1)}async function it(_,Z,ne,ye,xe,qe,Ve,Xe,$e){let st=D.fetchers.get(_);ke(_,Qu($e,st?st.data:void 0),{flushSync:Ve});let tt=new AbortController,St=xl(e.history,ne,tt.signal);if(qe){let Ht=await ze(ye,new URL(St.url).pathname,St.signal,_);if(Ht.type==="aborted")return;if(Ht.type==="error"){yt(_,Z,Ht.error,{flushSync:Ve});return}else if(Ht.matches)ye=Ht.matches;else{yt(_,Z,Ta(404,{pathname:ne}),{flushSync:Ve});return}}let ct=oh(ye,ne);V.set(_,tt);let Vt=Q,Ut=Nl(u,c,St,ne,ye,ct,o,xe),On=await we(St,ne,Ut,xe,_),qt=On[ct.route.id];if(!qt){for(let Ht of ye)if(On[Ht.route.id]){qt=On[Ht.route.id];break}}if(V.get(_)===tt&&V.delete(_),!St.signal.aborted){if(W.has(_)){ke(_,so(void 0));return}if(hs(qt))if(ee>Vt){ke(_,so(void 0));return}else{se.add(_),await de(St,qt,!1,{preventScrollReset:Xe});return}if(ca(qt)){yt(_,Z,qt.error);return}ke(_,so(qt.data))}}async function de(_,Z,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:qe,replace:Ve}={}){ne||(F?.resolve(),F=null),Z.response.headers.has("X-Remix-Revalidate")&&($=!0);let Xe=Z.response.headers.get("Location");Lt(Xe,"Expected a Location header on the redirect Response");let $e=Xe,st=new URL(_.url);Xe=_w(Xe,st,p,e.history),Dl($e,Xe,st,"allow-explicit");let tt=mc(D.location,Xe,{_isRedirect:!0});if(a){let qt=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))qt=!0;else if(Rv(Xe)){const Ht=CT(n,Xe,!0);qt=Ht.origin!==n.location.origin||Na(Ht.pathname,p)==null}if(qt){Ve?n.location.replace(Xe):n.location.assign(Xe);return}}J=null;let St=Ve===!0||Z.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ct,formAction:Vt,formEncType:Ut}=D.navigation;!ye&&!xe&&ct&&Vt&&Ut&&(ye=qw(D.navigation));let On=ye||xe;if(NL.has(Z.response.status)&&On&&Rr(On.formMethod))await Le(St,tt,{submission:{...On,formAction:Xe},preventScrollReset:qe||G,enableViewTransition:ne?K:void 0});else{let qt=H0(tt,[],St,ye);await Le(St,tt,{overrideNavigation:qt,fetcherSubmission:xe,preventScrollReset:qe||G,enableViewTransition:ne?K:void 0})}}async function we(_,Z,ne,ye,xe){let qe,Ve={};try{qe=await BL(g,_,Z,ne,xe,ye,!1)}catch(Xe){return ne.filter($e=>$e.shouldLoad).forEach($e=>{Ve[$e.route.id]={type:"error",error:Xe}}),Ve}if(_.signal.aborted)return Ve;if(!Rr(_.method))for(let Xe of ne){if(qe[Xe.route.id]?.type==="error")break;!qe.hasOwnProperty(Xe.route.id)&&!D.loaderData.hasOwnProperty(Xe.route.id)&&(!D.errors||!D.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(qe[Xe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Xe.route.id}`)})}for(let[Xe,$e]of Object.entries(qe))if(WL($e)){let st=$e.result;Ve[Xe]={type:"redirect",response:YL(st,_,Xe,ne,p)}}else Ve[Xe]=await KL($e);return Ve}async function Ye(_,Z,ne,ye,xe){let qe=we(ne,ye,_,xe,null),Ve=Promise.all(Z.map(async st=>{if(st.matches&&st.match&&st.request&&st.controller){let St=(await we(st.request,st.path,st.matches,xe,st.key))[st.match.route.id];return{[st.key]:St}}else return Promise.resolve({[st.key]:{type:"error",error:Ta(404,{pathname:st.path})}})})),Xe=await qe,$e=(await Ve).reduce((st,tt)=>Object.assign(st,tt),{});return{loaderResults:Xe,fetcherResults:$e}}function De(){$=!0,k.forEach((_,Z)=>{V.has(Z)&&Y.add(Z),en(Z)})}function ke(_,Z,ne={}){let ye=new Map(D.fetchers);ye.set(_,Z),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function yt(_,Z,ne,ye={}){let xe=wi(D.matches,Z),qe=new Map(D.fetchers);Ot(qe,_),Te({errors:{[xe.route.id]:ne},fetchers:qe},{flushSync:(ye&&ye.flushSync)===!0})}function ut(_){return B.set(_,(B.get(_)||0)+1),W.has(_)&&W.delete(_),D.fetchers.get(_)||kL}function ht(_,Z){en(_,Z?.reason),ke(_,so(null))}function Ot(_,Z){let ne=D.fetchers.get(Z);V.has(Z)&&!(ne&&ne.state==="loading"&&q.has(Z))&&en(Z),k.delete(Z),q.delete(Z),se.delete(Z),W.delete(Z),Y.delete(Z),_.delete(Z)}function Dt(_){let Z=(B.get(_)||0)-1;Z<=0?(B.delete(_),W.add(_)):B.set(_,Z),Te({fetchers:new Map(D.fetchers)})}function en(_,Z){let ne=V.get(_);ne&&(ne.abort(Z),V.delete(_))}function an(_,Z){for(let ne of _){let ye=Z.get(ne);Lt(ye,`Expected fetcher: ${ne}`);let xe=so(ye.data);Z.set(ne,xe)}}function tn(_){let Z=[],ne=!1;for(let ye of se){let xe=_.get(ye);Lt(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(se.delete(ye),Z.push(ye),ne=!0)}return an(Z,_),ne}function We(_,Z){let ne=[];for(let[ye,xe]of q)if(xe<_){let qe=Z.get(ye);Lt(qe,`Expected fetcher: ${ye}`),qe.state==="loading"&&(en(ye),q.delete(ye),ne.push(ye))}return an(ne,Z),ne.length>0}function xt(_,Z){let ne=D.blockers.get(_)||$u;return re.get(_)!==Z&&re.set(_,Z),ne}function Xt(_){D.blockers.delete(_),re.delete(_)}function ft(_,Z){let ne=D.blockers.get(_)||$u;Lt(ne.state==="unblocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="proceeding"||ne.state==="blocked"&&Z.state==="unblocked"||ne.state==="proceeding"&&Z.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${Z.state}`);let ye=new Map(D.blockers);ye.set(_,Z),Te({blockers:ye})}function vt({currentLocation:_,nextLocation:Z,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,qe]=ye[ye.length-1],Ve=D.blockers.get(xe);if(!(Ve&&Ve.state==="proceeding")&&qe({currentLocation:_,nextLocation:Z,historyAction:ne}))return xe}function gt(_){let Z=Ta(404,{pathname:_}),ne=d.activeRoutes,{matches:ye,route:xe}=_f(ne);return{notFoundMatches:ye,route:xe,error:Z}}function zt(_,Z,ne){if(w=_,E=Z,C=ne||null,!T&&D.navigation===U0){T=!0;let ye=ot(D.location,D.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{w=null,E=null,C=null}}function un(_,Z){return C&&C(_,Z.map(ye=>OT(ye,D.loaderData)))||_.key}function je(_,Z){if(w&&E){let ne=un(_,Z);w[ne]=E()}}function ot(_,Z){if(w){let ne=un(_,Z),ye=w[ne];if(typeof ye=="number")return ye}return null}function Ie(_,Z,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:Fa(Z,ne,p,!0,ye)}}else return{active:!0,matches:Fa(Z,ne,p,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(_,Z,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:_};let xe=_;for(;;){let qe=c;try{await e.patchRoutesOnNavigation({signal:ne,path:Z,matches:xe,fetcherKey:ye,patch:(st,tt)=>{ne.aborted||Iw(st,tt,d,qe,u,!1)}})}catch(st){return{type:"error",error:st,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ve=d.branches,Xe=Fa(d.activeRoutes,Z,p,!1,Ve),$e=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if($e=Fa(d.activeRoutes,Z,p,!0,Ve),!($e&&xe.length<$e.length&&Ge(xe,$e.slice(0,xe.length))))return{type:"success",matches:Xe}}if($e||($e=Fa(d.activeRoutes,Z,p,!0,Ve)),!$e||Ge(xe,$e))return{type:"success",matches:null};xe=$e}}function Ge(_,Z){return _.length===Z.length&&_.every((ne,ye)=>ne.route.id===Z[ye].route.id)}function et(_){c={},d.setHmrRoutes(yc(_,u,void 0,c))}function Rt(_,Z,ne=!1){Iw(_,Z,d,c,u,ne),d.hasHMRRoutes||Te({})}return j={get basename(){return p},get future(){return y},get state(){return D},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return c},get window(){return n},initialize:me,subscribe:ce,enableScrollRestoration:zt,navigate:Pe,fetch:He,revalidate:Me,createHref:_=>e.history.createHref(_),createURL:_=>e.history.createURL(_),encodeLocation:_=>e.history.encodeLocation(_),getFetcher:ut,resetFetcher:ht,deleteFetcher:Dt,dispose:ge,getBlocker:xt,deleteBlocker:Xt,patchRoutes:Rt,_internalFetchControllers:V,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(_){Te(_)}},e.instrumentations&&(j=wL(j,e.instrumentations.map(_=>_.router).filter(Boolean))),j}function LL(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function yy(e,n,a,o,s,u){let c,d;if(s){c=[];for(let g of n)if(c.push(g),g.route.id===s){d=g;break}}else c=n,d=n[n.length-1];let p=Uc(o||".",Cp(c),Na(e.pathname,a)||e.pathname,u==="path");if(o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&d){let g=Av(p.search);if(d.route.index&&!g)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let y=new URLSearchParams(p.search),h=y.getAll("index");y.delete("index"),h.filter(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=gL({basename:a,pathname:p.pathname})),Ur(p)}function kw(e,n,a){if(!a||!LL(a))return{path:n};if(a.formMethod&&!n5(a.formMethod))return{path:n,error:Ta(405,{method:a.formMethod})};let o=()=>({path:n,error:Ta(400,{type:"invalid-body"})}),u=(a.formMethod||"get").toUpperCase(),c=$T(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Rr(u))return o();let h=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[S,w])=>`${b}${S}=${w}
11
- `,""):String(a.body);return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:h}}}else if(a.formEncType==="application/json"){if(!Rr(u))return o();try{let h=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}Lt(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=xy(a.formData),p=a.formData;else if(a.body instanceof FormData)d=xy(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=Uw(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=Uw(d)}catch{return o()}let g={formMethod:u,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Rr(g.formMethod))return{path:n,submission:g};let y=Ga(n);return e&&y.search&&Av(y.search)&&d.append("index",""),y.search=`?${d}`,{path:Ur(y),submission:g}}function jw(e,n,a,o,s,u,c,d,p,g,y,h,b,S,w,C,E,T,O,M,A,N){let P=A?ca(A[1])?A[1].error:A[1].data:void 0,j=s.createURL(u.location),D=s.createURL(p),z;if(y&&u.errors){let L=Object.keys(u.errors)[0];z=c.findIndex($=>$.route.id===L)}else if(A&&ca(A[1])){let L=A[0];z=c.findIndex($=>$.route.id===L)-1}let F=A?A[1].statusCode:void 0,G=F&&F>=400,J={currentUrl:j,currentParams:u.matches[0]?.params||{},nextUrl:D,nextParams:c[0].params,...d,actionResult:P,actionStatus:F},K=Fc(c),H=c.map((L,$)=>{let{route:Y}=L,V=null;if(z!=null&&$>z)V=!1;else if(Y.lazy)V=!0;else if(!Ov(Y))V=!1;else if(y){let{shouldLoad:se}=FT(Y,u.loaderData,u.errors);V=se}else zL(u.loaderData,u.matches[$],L)&&(V=!0);if(V!==null)return vy(a,o,e,p,K,L,g,n,V);let Q=!1;typeof N=="boolean"?Q=N:G?Q=!1:(h||j.pathname+j.search===D.pathname+D.search||j.search!==D.search||_L(u.matches[$],L))&&(Q=!0);let ee={...J,defaultShouldRevalidate:Q},q=oc(L,ee);return vy(a,o,e,p,K,L,g,n,q,ee,N)}),U=[];return w.forEach((L,$)=>{if(y||!c.some(B=>B.route.id===L.routeId)||S.has($))return;let Y=u.fetchers.get($),V=Y&&Y.state!=="idle"&&Y.data===void 0,Q=Fa(E,L.path,T??"/",!1,M);if(!Q){if(O&&V)return;U.push({key:$,routeId:L.routeId,path:L.path,matches:null,match:null,request:null,controller:null});return}if(C.has($))return;let ee=oh(Q,L.path),q=new AbortController,se=xl(s,L.path,q.signal),k=null;if(b.has($))b.delete($),k=Nl(a,o,se,L.path,Q,ee,g,n);else if(V)h&&(k=Nl(a,o,se,L.path,Q,ee,g,n));else{let B;typeof N=="boolean"?B=N:G?B=!1:B=h;let W={...J,defaultShouldRevalidate:B};oc(ee,W)&&(k=Nl(a,o,se,L.path,Q,ee,g,n,W))}k&&U.push({key:$,routeId:L.routeId,path:L.path,matches:k,match:ee,request:se,controller:q})}),{dsMatches:H,revalidatingFetchers:U}}function Ov(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function FT(e,n,a){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ov(e))return{shouldLoad:!1,renderFallback:!1};let o=n!=null&&e.id in n,s=a!=null&&a[e.id]!==void 0;if(!o&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let u=!o&&!s;return{shouldLoad:u,renderFallback:u}}function zL(e,n,a){let o=!n||a.route.id!==n.route.id,s=!e.hasOwnProperty(a.route.id);return o||s}function _L(e,n){let a=e.route.path;return e.pathname!==n.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==n.params["*"]}function oc(e,n){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Iw(e,n,a,o,s,u){let c;if(e){let g=o[e];Lt(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),c=g.children}else c=a.activeRoutes;let d=[],p=[];if(n.forEach(g=>{let y=c.find(h=>BT(g,h));y?p.push({existingRoute:y,newRoute:g}):d.push(g)}),d.length>0){let g=yc(d,s,[e||"_","patch",String(c?.length||"0")],o);c.push(...g)}if(u&&p.length>0)for(let g=0;g<p.length;g++){let{existingRoute:y,newRoute:h}=p[g],b=y,[S]=yc([h],s,[],{},!0);Object.assign(b,{element:S.element?S.element:b.element,errorElement:S.errorElement?S.errorElement:b.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:b.hydrateFallbackElement})}a.hasHMRRoutes||a.setRoutes([...a.activeRoutes])}function BT(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((a,o)=>n.children?.some(s=>BT(a,s)))??!1:!1}var Pw=new WeakMap,VT=({key:e,route:n,manifest:a,mapRouteProperties:o})=>{let s=a[n.id];if(Lt(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[e];if(!u)return;let c=Pw.get(s);c||(c={},Pw.set(s,c));let d=c[e];if(d)return d;let p=(async()=>{let g=tL(e),h=s[e]!==void 0&&e!=="hasErrorBoundary";if(g)Hn(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(h)Hn(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await u();b!=null&&(Object.assign(s,{[e]:b}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(b=>b===void 0)&&(s.lazy=void 0))})();return c[e]=p,p},Lw=new WeakMap;function UL(e,n,a,o,s){let u=a[e.id];if(Lt(u,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=Lw.get(u);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let h=(async()=>{Lt(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),S={};for(let w in b){let C=b[w];if(C===void 0)continue;let E=rL(w),O=u[w]!==void 0&&w!=="hasErrorBoundary";E?Hn(!E,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Hn(!O,`Route "${u.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):S[w]=C}Object.assign(u,S),Object.assign(u,{...o(u),lazy:void 0})})();return Lw.set(u,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let c=Object.keys(e.lazy),d=[],p;for(let y of c){if(s&&s.includes(y))continue;let h=VT({key:y,route:e,manifest:a,mapRouteProperties:o});h&&(d.push(h),y===n&&(p=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:p}}async function zw(e){let n=e.matches.filter(s=>s.shouldLoad),a={};return(await Promise.all(n.map(s=>s.resolve()))).forEach((s,u)=>{a[n[u].route.id]=s}),a}async function HL(e){return e.matches.some(n=>n.route.middleware)?qT(e,()=>zw(e)):zw(e)}function qT(e,n){return FL(e,n,o=>{if(t5(o))throw o;return o},ZL,a);function a(o,s,u){if(u)return Promise.resolve(Object.assign(u.value,{[s]:{type:"error",result:o}}));{let{matches:c}=e,d=Math.min(Math.max(c.findIndex(g=>g.route.id===s),0),Math.max(c.findIndex(g=>g.shouldCallHandler()),0)),p=wi(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:o}})}}}async function FL(e,n,a,o,s){let{matches:u,...c}=e,d=u.flatMap(g=>g.route.middleware?g.route.middleware.map(y=>[g.route.id,y]):[]);return await KT(c,d,n,a,o,s)}async function KT(e,n,a,o,s,u,c=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=n[c];if(!p)return await a();let[g,y]=p,h,b=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await KT(e,n,a,o,s,u,c+1)},h.value}catch(S){return h={value:await u(S,g,h)},h.value}};try{let S=await y(e,b),w=S!=null?o(S):void 0;return s(w)?w:h?w??h.value:(h={value:await b()},h.value)}catch(S){return await u(S,g,h)}}function YT(e,n,a,o,s){let u=VT({key:"middleware",route:o.route,manifest:n,mapRouteProperties:e}),c=UL(o.route,Rr(a.method)?"action":"loader",n,e,s);return{middleware:u,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function vy(e,n,a,o,s,u,c,d,p,g=null,y){let h=!1,b=YT(e,n,a,u,c);return{...u,_lazyPromises:b,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(S){return h=!0,g?typeof y=="boolean"?oc(u,{...g,defaultShouldRevalidate:y}):typeof S=="boolean"?oc(u,{...g,defaultShouldRevalidate:S}):oc(u,g):p},resolve(S){let{lazy:w,loader:C,middleware:E}=u.route,T=h||p||S&&!Rr(a.method)&&(w||C),O=E&&E.length>0&&!C&&!w;return T&&(Rr(a.method)||!O)?VL({request:a,path:o,pattern:s,match:u,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:S,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Nl(e,n,a,o,s,u,c,d,p=null){return s.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:YT(e,n,a,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:vy(e,n,a,o,Fc(s),g,c,d,!0,p))}async function BL(e,n,a,o,s,u,c){o.some(y=>y._lazyPromises?.middleware)&&await Promise.all(o.map(y=>y._lazyPromises?.middleware));let d={request:n,url:GT(n,a),pattern:Fc(o),params:o[0].params,context:u,matches:o},g=await e({...d,fetcherKey:s,runClientMiddleware:y=>{let h=d;return qT(h,()=>y({...h,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function VL({request:e,path:n,pattern:a,match:o,lazyHandlerPromise:s,lazyRoutePromise:u,handlerOverride:c,scopedContext:d}){let p,g,y=Rr(e.method),h=y?"action":"loader",b=S=>{let w,C=new Promise((O,M)=>w=M);g=()=>w(),e.signal.addEventListener("abort",g);let E=O=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${o.route.id}]`)):S({request:e,url:GT(e,n),pattern:a,params:o.params,context:d},...O!==void 0?[O]:[]),T=(async()=>{try{return{type:"data",result:await(c?c(M=>E(M)):E())}}catch(O){return{type:"error",result:O}}})();return Promise.race([T,C])};try{let S=y?o.route.action:o.route.loader;if(s||u)if(S){let w,[C]=await Promise.all([b(S).catch(E=>{w=E}),s,u]);if(w!==void 0)throw w;p=C}else{await s;let w=y?o.route.action:o.route.loader;if(w)[p]=await Promise.all([b(w),u]);else if(h==="action"){let C=new URL(e.url),E=C.pathname+C.search;throw Ta(405,{method:e.method,pathname:E,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(S)p=await b(S);else{let w=new URL(e.url),C=w.pathname+w.search;throw Ta(404,{pathname:C})}}catch(S){return{type:"error",result:S}}finally{g&&e.signal.removeEventListener("abort",g)}return p}async function qL(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function KL(e){let{result:n,type:a}=e;if(Mv(n)){let o;try{o=await qL(n)}catch(s){return{type:"error",error:s}}return a==="error"?{type:"error",error:new Hc(n.status,n.statusText,o),statusCode:n.status,headers:n.headers}:{type:"data",data:o,statusCode:n.status,headers:n.headers}}return a==="error"?Vw(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:XL(n),statusCode:bc(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:bc(n)?n.status:void 0}:Vw(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function YL(e,n,a,o,s){let u=e.headers.get("Location");if(Lt(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!Rv(u)){let c=o.slice(0,o.findIndex(d=>d.route.id===a)+1);u=yy(new URL(n.url),c,s,u),e.headers.set("Location",u)}return e}var GL=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function by(e){try{return GL.includes(new URL(e).protocol)}catch{return!1}}function _w(e,n,a,o){if(Rv(e)){let s=e,u=Rp.test(s)?new URL(RT(s,n.protocol)):new URL(s);if(by(u.toString()))throw new Error("Invalid redirect location");let c=Na(u.pathname,a)!=null;if(u.origin===n.origin&&c)return Cv(u.pathname)+u.search+u.hash}try{let s=o.createURL(e);if(by(s.toString()))throw new Error("Invalid redirect location")}catch{}return e}function xl(e,n,a,o){let s=e.createURL($T(n)).toString(),u={signal:a};if(o&&Rr(o.formMethod)){let{formMethod:c,formEncType:d}=o;u.method=c.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(o.json)):d==="text/plain"?u.body=o.text:d==="application/x-www-form-urlencoded"&&o.formData?u.body=xy(o.formData):u.body=o.formData}return new Request(s,u)}function GT(e,n){let a=new URL(e.url),o=typeof n=="string"?Ga(n):n;if(a.pathname=o.pathname||"/",o.search){let s=new URLSearchParams(o.search),u=s.getAll("index");s.delete("index");for(let c of u.filter(Boolean))s.append("index",c);a.search=s.size?`?${s.toString()}`:""}else a.search="";return a.hash=o.hash||"",a}function xy(e){let n=new URLSearchParams;for(let[a,o]of e.entries())n.append(a,typeof o=="string"?o:o.name);return n}function Uw(e){let n=new FormData;for(let[a,o]of e.entries())n.append(a,o);return n}function $L(e,n,a,o=!1,s=!1){let u={},c=null,d,p=!1,g={},y=a&&ca(a[1])?a[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in n))return;let b=h.route.id,S=n[b];if(Lt(!hs(S),"Cannot handle redirect results in processLoaderData"),ca(S)){let w=S.error;if(y!==void 0&&(w=y,y=void 0),c=c||{},s)c[b]=w;else{let C=wi(e,b);c[C.route.id]==null&&(c[C.route.id]=w)}o||(u[b]=HT),p||(p=!0,d=bc(S.error)?S.error.status:500),S.headers&&(g[b]=S.headers)}else u[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(g[b]=S.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(u[a[2]]=void 0)),{loaderData:u,errors:c,statusCode:d||200,loaderHeaders:g}}function Hw(e,n,a,o,s,u,c){let{loaderData:d,errors:p}=$L(n,a,o);return s.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:h,controller:b}=g;if(b&&b.signal.aborted)return;let S=u[y];if(Lt(S,"Did not find corresponding fetcher result"),ca(S)){let w=wi(e.matches,h?.route.id);p&&p[w.route.id]||(p={...p,[w.route.id]:S.error}),c.delete(y)}else if(hs(S))Lt(!1,"Unhandled fetcher revalidation redirect");else{let w=so(S.data);c.set(y,w)}}),{loaderData:d,errors:p}}function Fw(e,n,a,o){let s=Object.entries(n).filter(([,u])=>u!==HT).reduce((u,[c,d])=>(u[c]=d,u),{});for(let u of a){let c=u.route.id;if(!n.hasOwnProperty(c)&&e.hasOwnProperty(c)&&u.route.loader&&(s[c]=e[c]),o&&o.hasOwnProperty(c))break}return s}function Bw(e){return e?ca(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wi(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function _f(e){let n=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Ta(e,{pathname:n,routeId:a,method:o,type:s,message:u}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="Bad Request",o&&n&&a?d=`You made a ${o} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):e===403?(c="Forbidden",d=`Route "${a}" does not match URL "${n}"`):e===404?(c="Not Found",d=`No route matches URL "${n}"`):e===405&&(c="Method Not Allowed",o&&n&&a?d=`You made a ${o.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:o&&(d=`Invalid request method "${o.toUpperCase()}"`)),new Hc(e||500,c,new Error(d),!0)}function Uf(e){let n=Object.entries(e);for(let a=n.length-1;a>=0;a--){let[o,s]=n[a];if(hs(s))return{key:o,result:s}}}function $T(e){let n=typeof e=="string"?Ga(e):e;return Ur({...n,hash:""})}function QL(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function XL(e){return new Hc(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ZL(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,a])=>typeof n=="string"&&JL(a))}function JL(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function WL(e){return Mv(e.result)&&_T.has(e.result.status)}function ca(e){return e.type==="error"}function hs(e){return(e&&e.type)==="redirect"}function Vw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Mv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function e5(e){return _T.has(e)}function t5(e){return Mv(e)&&e5(e.status)&&e.headers.has("Location")}function n5(e){return DL.has(e.toUpperCase())}function Rr(e){return ML.has(e.toUpperCase())}function Av(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function oh(e,n){let a=typeof n=="string"?Ga(n).search:n.search;if(e[e.length-1].route.index&&Av(a||""))return e[e.length-1];let o=jT(e);return o[o.length-1]}function qw(e){let{formMethod:n,formAction:a,formEncType:o,text:s,formData:u,json:c}=e;if(!(!n||!a||!o)){if(s!=null)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:n,formAction:a,formEncType:o,formData:u,json:void 0,text:void 0};if(c!==void 0)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:c,text:void 0}}}function H0(e,n,a,o){return o?{state:"loading",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:e,matches:n,historyAction:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r5(e,n,a,o){return{state:"submitting",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function Qu(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function a5(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function so(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 o5(e,n){try{let a=e.sessionStorage.getItem(UT);if(a){let o=JSON.parse(a);for(let[s,u]of Object.entries(o||{}))u&&Array.isArray(u)&&n.set(s,new Set(u||[]))}}catch{}}function i5(e,n){if(n.size>0){let a={};for(let[o,s]of n)a[o]=[...s];try{e.sessionStorage.setItem(UT,JSON.stringify(a))}catch(o){Hn(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Kw(){let e,n,a=new Promise((o,s)=>{e=async u=>{o(u);try{await a}catch{}},n=async u=>{s(u);try{await a}catch{}}});return{promise:a,resolve:e,reject:n}}var Ts=v.createContext(null);Ts.displayName="DataRouter";var Bc=v.createContext(null);Bc.displayName="DataRouterState";var QT=v.createContext(!1);function XT(){return v.useContext(QT)}var Dv=v.createContext({isTransitioning:!1});Dv.displayName="ViewTransition";var ZT=v.createContext(new Map);ZT.displayName="Fetchers";var s5=v.createContext(null);s5.displayName="Await";var pa=v.createContext(null);pa.displayName="Navigation";var Tp=v.createContext(null);Tp.displayName="Location";var ja=v.createContext({outlet:null,matches:[],isDataRoute:!1});ja.displayName="Route";var Nv=v.createContext(null);Nv.displayName="RouteError";var JT="REACT_ROUTER_ERROR",l5="REDIRECT",u5="ROUTE_ERROR_RESPONSE";function c5(e){if(e.startsWith(`${JT}:${l5}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function d5(e){if(e.startsWith(`${JT}:${u5}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new Hc(n.status,n.statusText,n.data)}catch{}}function f5(e,{relative:n}={}){Lt(Os(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=v.useContext(pa),{hash:s,pathname:u,search:c}=qc(e,{relative:n}),d=u;return a!=="/"&&(d=u==="/"?a:Aa([a,u])),o.createHref({pathname:d,search:c,hash:s})}function Os(){return v.useContext(Tp)!=null}function Ar(){return Lt(Os(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Tp).location}function h5(e){Lt(Os(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:n}=Ar();return v.useMemo(()=>vc(e,kT(n)),[n,e])}var WT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eO(e){v.useContext(pa).static||v.useLayoutEffect(e)}function Vc(){let{isDataRoute:e}=v.useContext(ja);return e?A5():p5()}function p5(){Lt(Os(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(Ts),{basename:n,navigator:a}=v.useContext(pa),{matches:o}=v.useContext(ja),{pathname:s}=Ar(),u=JSON.stringify(Cp(o)),c=v.useRef(!1);return eO(()=>{c.current=!0}),v.useCallback((p,g={})=>{if(Hn(c.current,WT),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=Uc(p,JSON.parse(u),s,g.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:Aa([n,y.pathname])),Dl(typeof p=="string"?p:Ur(p),a.createHref(y),Tv(a),"reject"),(g.replace?a.replace:a.push)(y,g.state,g)},[n,a,u,s,e])}var g5=v.createContext(null);function m5(e){let n=v.useContext(ja).outlet;return v.useMemo(()=>n&&v.createElement(g5.Provider,{value:e},n),[n,e])}function y5(){let{matches:e}=v.useContext(ja);return e[e.length-1]?.params??{}}function qc(e,{relative:n}={}){let{matches:a}=v.useContext(ja),{pathname:o}=Ar(),s=JSON.stringify(Cp(a));return v.useMemo(()=>Uc(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function v5(e,n,a){Lt(Os(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(pa),{matches:s}=v.useContext(ja),u=s[s.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let E=g&&g.path||"";rO(d,!g||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) 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="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=Ar(),h;h=y;let b=h.pathname||"/",S=b;if(p!=="/"){let E=p.replace(/^\//,"").split("/");S="/"+b.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=a&&a.state.matches.length?a.state.matches.map(E=>Object.assign(E,{route:a.manifest[E.route.id]||E.route})):TT(e,{pathname:S});return Hn(g||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Hn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.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.`),E5(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},c,E.params),pathname:Aa([p,o.encodeLocation?o.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?p:Aa([p,o.encodeLocation?o.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,a)}function b5(){let e=M5(),n=bc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=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:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),a?v.createElement("pre",{style:s},a):null,c)}var x5=v.createElement(b5,null),tO=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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):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 a=d5(e.digest);a&&(e=a)}let n=e!==void 0?v.createElement(ja.Provider,{value:this.props.routeContext},v.createElement(Nv.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(S5,{error:e},n):n}};tO.contextType=QT;var F0=new WeakMap;function S5({children:e,error:n}){let{basename:a,navigator:o}=v.useContext(pa);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=c5(n.digest);if(s){let u=F0.get(n);if(u)throw u;let c=PT(s.location,a),d=c.absoluteURL||c.to;if(Dl(s.location,d,Tv(o),"allow-explicit"),by(d))throw new Error("Invalid redirect location");if(IT&&!F0.get(n))if(c.isExternal||s.reloadDocument)window.location.href=d;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw F0.set(n,p),p}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function w5({routeContext:e,match:n,children:a}){let o=v.useContext(Ts);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ja.Provider,{value:e},a)}function E5(e,n=[],a){let o=a?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let s=e,u=o?.errors;if(u!=null){let y=s.findIndex(h=>h.route.id&&u?.[h.route.id]!==void 0);Lt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,d=-1;if(a&&o){c=o.renderFallback;for(let y=0;y<s.length;y++){let h=s[y];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=y),h.route.id){let{loaderData:b,errors:S}=o,w=h.route.loader&&!b.hasOwnProperty(h.route.id)&&(!S||S[h.route.id]===void 0);if(h.route.lazy||w){a.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let p=a?.onError,g=o&&p?(y,h)=>{p(y,{location:o.location,params:o.matches?.[0]?.params??{},pattern:Fc(o.matches),errorInfo:h})}:void 0;return s.reduceRight((y,h,b)=>{let S,w=!1,C=null,E=null;o&&(S=u&&h.route.id?u[h.route.id]:void 0,C=h.route.errorElement||x5,c&&(d<0&&b===0?(rO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):d===b&&(w=!0,E=h.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,b+1)),O=()=>{let M;return S?M=C:w?M=E:h.route.Component?M=v.createElement(h.route.Component,null):h.route.element?M=h.route.element:M=y,v.createElement(w5,{match:h,routeContext:{outlet:y,matches:T,isDataRoute:o!=null},children:M})};return o&&(h.route.ErrorBoundary||h.route.errorElement||b===0)?v.createElement(tO,{location:o.location,revalidation:o.revalidation,component:C,error:S,children:O(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:g}):O()},null)}function kv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R5(e){let n=v.useContext(Ts);return Lt(n,kv(e)),n}function nO(e){let n=v.useContext(Bc);return Lt(n,kv(e)),n}function C5(e){let n=v.useContext(ja);return Lt(n,kv(e)),n}function jv(e){let n=C5(e),a=n.matches[n.matches.length-1];return Lt(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function T5(){return jv("useRouteId")}function O5(){let{matches:e,loaderData:n}=nO("useMatches");return v.useMemo(()=>e.map(a=>OT(a,n)),[e,n])}function M5(){let e=v.useContext(Nv),n=nO("useRouteError"),a=jv("useRouteError");return e!==void 0?e:n.errors?.[a]}function A5(){let{router:e}=R5("useNavigate"),n=jv("useNavigate"),a=v.useRef(!1);return eO(()=>{a.current=!0}),v.useCallback(async(s,u={})=>{Hn(a.current,WT),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var Yw={};function rO(e,n,a){!n&&!Yw[e]&&(Yw[e]=!0,Hn(!1,a))}var Gw={};function $w(e,n){!e&&!Gw[n]&&(Gw[n]=!0,console.warn(n))}var D5="useOptimistic",Qw=$E[D5],N5=()=>{};function k5(e){return Qw?Qw(e):[e,N5]}function j5(e){let n={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(n,{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(n,{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(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var I5=["HydrateFallback","hydrateFallbackElement"],P5=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function L5({router:e,flushSync:n,onError:a,useTransitions:o}){o=XT()||o;let[u,c]=v.useState(e.state),[d,p]=k5(u),[g,y]=v.useState(),[h,b]=v.useState({isTransitioning:!1}),[S,w]=v.useState(),[C,E]=v.useState(),[T,O]=v.useState(),M=v.useRef(new Map),A=v.useCallback((D,{deletedFetchers:z,newErrors:F,flushSync:G,viewTransitionOpts:J})=>{F&&a&&Object.values(F).forEach(H=>a(H,{location:D.location,params:D.matches[0]?.params??{},pattern:Fc(D.matches)})),D.fetchers.forEach((H,U)=>{H.data!==void 0&&M.current.set(U,H.data)}),z.forEach(H=>M.current.delete(H)),$w(G===!1||n!=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 K=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if($w(J==null||K,"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."),!J||!K){n&&G?n(()=>c(D)):o===!1?c(D):v.startTransition(()=>{o===!0&&p(H=>Xw(H,D)),c(D)});return}if(n&&G){n(()=>{C&&(S?.resolve(),C.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:J.currentLocation,nextLocation:J.nextLocation})});let H=e.window.document.startViewTransition(()=>{n(()=>c(D))});H.finished.finally(()=>{n(()=>{w(void 0),E(void 0),y(void 0),b({isTransitioning:!1})})}),n(()=>E(H));return}C?(S?.resolve(),C.skipTransition(),O({state:D,currentLocation:J.currentLocation,nextLocation:J.nextLocation})):(y(D),b({isTransitioning:!0,flushSync:!1,currentLocation:J.currentLocation,nextLocation:J.nextLocation}))},[e.window,n,C,S,o,p,a]);v.useLayoutEffect(()=>e.subscribe(A),[e,A]),v.useEffect(()=>{h.isTransitioning&&!h.flushSync&&w(new P5)},[h]),v.useEffect(()=>{if(S&&g&&e.window){let D=g,z=S.promise,F=e.window.document.startViewTransition(async()=>{o===!1?c(D):v.startTransition(()=>{o===!0&&p(G=>Xw(G,D)),c(D)}),await z});F.finished.finally(()=>{w(void 0),E(void 0),y(void 0),b({isTransitioning:!1})}),E(F)}},[g,S,e.window,o,p]),v.useEffect(()=>{S&&g&&d.location.key===g.location.key&&S.resolve()},[S,C,d.location,g]),v.useEffect(()=>{!h.isTransitioning&&T&&(y(T.state),b({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),O(void 0))},[h.isTransitioning,T]);let N=v.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,z,F)=>e.navigate(D,{state:z,preventScrollReset:F?.preventScrollReset}),replace:(D,z,F)=>e.navigate(D,{replace:!0,state:z,preventScrollReset:F?.preventScrollReset})}),[e]),P=e.basename||"/",j=v.useMemo(()=>({router:e,navigator:N,static:!1,basename:P,onError:a}),[e,N,P,a]);return v.createElement(v.Fragment,null,v.createElement(Ts.Provider,{value:j},v.createElement(Bc.Provider,{value:d},v.createElement(ZT.Provider,{value:M.current},v.createElement(Dv.Provider,{value:h},v.createElement(H5,{basename:P,location:d.location,navigationType:d.historyAction,navigator:N,useTransitions:o},v.createElement(z5,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:a})))))),null)}function Xw(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var z5=v.memo(_5);function _5({routes:e,manifest:n,future:a,state:o,isStatic:s,onError:u}){return v5(e,void 0,{manifest:n,state:o,isStatic:s,onError:u})}function U5({to:e,replace:n,state:a,relative:o}){Lt(Os(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s,navigator:u}=v.useContext(pa);Hn(!s,"<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:c}=v.useContext(ja),{pathname:d}=Ar(),p=Vc(),g=Uc(e,Cp(c),d,o==="path");Dl(typeof e=="string"?e:Ur(e),u.createHref(g),Tv(u),"reject");let y=JSON.stringify(g);return v.useEffect(()=>{p(JSON.parse(y),{replace:n,state:a,relative:o})},[p,y,o,n,a]),null}function aO(e){return m5(e.context)}function H5({basename:e="/",children:n=null,location:a,navigationType:o="POP",navigator:s,static:u=!1,useTransitions:c}){Lt(!Os(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:d,navigator:s,static:u,useTransitions:c,future:{}}),[d,s,u,c]);typeof a=="string"&&(a=Ga(a));let{pathname:g="/",search:y="",hash:h="",state:b=null,key:S="default",mask:w}=a,C=v.useMemo(()=>{let E=Na(g,d);return E==null?null:{location:{pathname:E,search:y,hash:h,state:b,key:S,mask:w},navigationType:o}},[d,g,y,h,b,S,o,w]);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(pa.Provider,{value:p},v.createElement(Tp.Provider,{children:n,value:C}))}var ih="get",sh="application/x-www-form-urlencoded";function Op(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function F5(e){return Op(e)&&e.tagName.toLowerCase()==="button"}function B5(e){return Op(e)&&e.tagName.toLowerCase()==="form"}function V5(e){return Op(e)&&e.tagName.toLowerCase()==="input"}function q5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function K5(e,n){return e.button===0&&(!n||n==="_self")&&!q5(e)}function Sy(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,a)=>{let o=e[a];return n.concat(Array.isArray(o)?o.map(s=>[a,s]):[[a,o]])},[]))}function Y5(e,n){let a=Sy(e);return n&&n.forEach((o,s)=>{a.has(s)||n.getAll(s).forEach(u=>{a.append(s,u)})}),a}var Hf=null;function G5(){if(Hf===null)try{new FormData(document.createElement("form"),0),Hf=!1}catch{Hf=!0}return Hf}var $5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function B0(e){return e!=null&&!$5.has(e)?(Hn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${sh}"`),null):e}function Q5(e,n){let a,o,s,u,c;if(B5(e)){let d=e.getAttribute("action");o=d?Na(d,n):null,a=e.getAttribute("method")||ih,s=B0(e.getAttribute("enctype"))||sh,u=new FormData(e)}else if(F5(e)||V5(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 p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?Na(p,n):null,a=e.getAttribute("formmethod")||d.getAttribute("method")||ih,s=B0(e.getAttribute("formenctype"))||B0(d.getAttribute("enctype"))||sh,u=new FormData(d,e),!G5()){let{name:g,type:y,value:h}=e;if(y==="image"){let b=g?`${g}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else g&&u.append(g,h)}}else{if(Op(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=ih,o=null,s=sh,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:o,method:a.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Iv(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function oO(e,n,a,o){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${o}`:s.pathname=`${s.pathname}.${o}`:s.pathname==="/"?s.pathname=`_root.${o}`:n&&Na(s.pathname,n)==="/"?s.pathname=`${Ul(n)}/_root.${o}`:s.pathname=`${Ul(s.pathname)}.${o}`,s}async function X5(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Z5(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 J5(e,n,a){let o=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await X5(u,a);return c.links?c.links():[]}return[]}));return nz(o.flat(1).filter(Z5).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Zw(e,n,a,o,s,u){let c=(p,g)=>a[g]?p.route.id!==a[g].route.id:!0,d=(p,g)=>a[g].pathname!==p.pathname||a[g].route.path?.endsWith("*")&&a[g].params["*"]!==p.params["*"];return u==="assets"?n.filter((p,g)=>c(p,g)||d(p,g)):u==="data"?n.filter((p,g)=>{let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,g)||d(p,g))return!0;if(p.route.shouldRevalidate){let h=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function W5(e,n,{includeHydrateFallback:a}={}){return ez(e.map(o=>{let s=n.routes[o.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function ez(e){return[...new Set(e)]}function tz(e){let n={},a=Object.keys(e).sort();for(let o of a)n[o]=e[o];return n}function nz(e,n){let a=new Set;return new Set(n),e.reduce((o,s)=>{let u=JSON.stringify(tz(s));return a.has(u)||(a.add(u),o.push({key:u,link:s})),o},[])}function Pv(){let e=v.useContext(Ts);return Iv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function rz(){let e=v.useContext(Bc);return Iv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Lv=v.createContext(void 0);Lv.displayName="FrameworkContext";function Mp(){let e=v.useContext(Lv);return Iv(e,"You must render this element inside a <HydratedRouter> element"),e}function az(e,n){let a=v.useContext(Lv),[o,s]=v.useState(!1),[u,c]=v.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:h}=n,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=T=>{T.forEach(O=>{c(O.isIntersecting)})},E=new IntersectionObserver(C,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),v.useEffect(()=>{if(o){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[o]);let S=()=>{s(!0)},w=()=>{s(!1),c(!1)};return a?e!=="intent"?[u,b,{}]:[u,b,{onFocus:Xu(d,S),onBlur:Xu(p,w),onMouseEnter:Xu(g,S),onMouseLeave:Xu(y,w),onTouchStart:Xu(h,S)}]:[!1,b,{}]}function Xu(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function oz({page:e,...n}){let a=XT(),{nonce:o}=Mp(),{router:s}=Pv(),u=v.useMemo(()=>TT(s.routes,e,s.basename),[s.routes,e,s.basename]);return u?(n.nonce==null&&o&&(n={...n,nonce:o}),a?v.createElement(sz,{page:e,matches:u,...n}):v.createElement(lz,{page:e,matches:u,...n})):null}function iz(e){let{manifest:n,routeModules:a}=Mp(),[o,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return J5(e,n,a).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,a]),o}function sz({page:e,matches:n,...a}){let o=Ar(),{future:s}=Mp(),{basename:u}=Pv(),c=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let d=oO(e,u,s.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let y of n)typeof y.route.shouldRevalidate=="function"?p=!0:g.push(y.route.id);return p&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[u,s.v8_trailingSlashAwareDataRequests,e,o,n]);return v.createElement(v.Fragment,null,c.map(d=>v.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...a})))}function lz({page:e,matches:n,...a}){let o=Ar(),{future:s,manifest:u,routeModules:c}=Mp(),{basename:d}=Pv(),{loaderData:p,matches:g}=rz(),y=v.useMemo(()=>Zw(e,n,g,u,o,"data"),[e,n,g,u,o]),h=v.useMemo(()=>Zw(e,n,g,u,o,"assets"),[e,n,g,u,o]),b=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let C=new Set,E=!1;if(n.forEach(O=>{let M=u.routes[O.route.id];!M||!M.hasLoader||(!y.some(A=>A.route.id===O.route.id)&&O.route.id in p&&c[O.route.id]?.shouldRevalidate||M.hasClientLoader?E=!0:C.add(O.route.id))}),C.size===0)return[];let T=oO(e,d,s.v8_trailingSlashAwareDataRequests,"data");return E&&C.size>0&&T.searchParams.set("_routes",n.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[T.pathname+T.search]},[d,s.v8_trailingSlashAwareDataRequests,p,o,u,y,n,e,c]),S=v.useMemo(()=>W5(h,u),[h,u]),w=iz(h);return v.createElement(v.Fragment,null,b.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),w.map(({key:C,link:E})=>v.createElement("link",{key:C,nonce:a.nonce,...E,crossOrigin:E.crossOrigin??a.crossOrigin})))}function uz(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var cz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cz&&(window.__reactRouterVersion="7.18.5")}catch{}function dz(e,n){return PL({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:ZP({window:n?.window}),hydrationData:fz(),routes:e,mapRouteProperties:j5,hydrationRouteProperties:I5,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,instrumentations:n?.instrumentations}).initialize()}function fz(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:hz(e.errors)}),e}function hz(e){if(!e)return null;let n=Object.entries(e),a={};for(let[o,s]of n)if(s&&s.__type==="RouteErrorResponse")a[o]=new Hc(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(typeof s.__subType=="string"&&xL.includes(s.__subType)){let u=window[s.__subType];if(typeof u=="function")try{let c=new u(s.message);c.stack="",a[o]=c}catch{}}if(a[o]==null){let u=new Error(s.message);u.stack="",a[o]=u}}else a[o]=s;return a}var Kc=v.forwardRef(function({onClick:n,discover:a="render",prefetch:o="none",relative:s,reloadDocument:u,replace:c,mask:d,state:p,target:g,to:y,preventScrollReset:h,viewTransition:b,defaultShouldRevalidate:S,...w},C){let{basename:E,navigator:T,useTransitions:O}=v.useContext(pa),M=typeof y=="string"&&Ep.test(y),A=PT(y,E);y=A.to;let N=f5(y,{relative:s}),P=Ar(),j=null;if(d){let U=Uc(d,[],P.mask?P.mask.pathname:"/",!0);E!=="/"&&(U.pathname=U.pathname==="/"?E:Aa([E,U.pathname])),j=T.createHref(U)}let[D,z,F]=az(o,w),G=mz(y,{replace:c,mask:d,state:p,target:g,preventScrollReset:h,relative:s,viewTransition:b,defaultShouldRevalidate:S,useTransitions:O});function J(U){n&&n(U),U.defaultPrevented||G(U)}let K=!(A.isExternal||u),H=v.createElement("a",{...w,...F,href:(K?j:void 0)||A.absoluteURL||N,onClick:K?J:n,ref:uz(C,z),target:g,"data-discover":!M&&a==="render"?"true":void 0});return D&&!M?v.createElement(v.Fragment,null,H,v.createElement(oz,{page:N})):H});Kc.displayName="Link";var ic=v.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:o="",end:s=!1,style:u,to:c,viewTransition:d,children:p,...g},y){let h=qc(c,{relative:g.relative}),b=Ar(),S=v.useContext(Bc),{navigator:w,basename:C}=v.useContext(pa),E=S!=null&&wz(h)&&d===!0,T=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=b.pathname,M=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(O=O.toLowerCase(),M=M?M.toLowerCase():null,T=T.toLowerCase()),M&&C&&(M=Na(M,C)||M);const A=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let N=O===T||!s&&O.startsWith(T)&&O.charAt(A)==="/",P=M!=null&&(M===T||!s&&M.startsWith(T)&&M.charAt(T.length)==="/"),j={isActive:N,isPending:P,isTransitioning:E},D=N?n:void 0,z;typeof o=="function"?z=o(j):z=[o,N?"active":null,P?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let F=typeof u=="function"?u(j):u;return v.createElement(Kc,{...g,"aria-current":D,className:z,ref:y,style:F,to:c,viewTransition:d},typeof p=="function"?p(j):p)});ic.displayName="NavLink";var pz=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:o,replace:s,state:u,method:c=ih,action:d,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b,...S},w)=>{let{useTransitions:C}=v.useContext(pa),E=xz(),T=Sz(d,{relative:g}),O=c.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&Ep.test(d),A=N=>{if(p&&p(N),N.defaultPrevented)return;N.preventDefault();let P=N.nativeEvent.submitter,j=P?.getAttribute("formmethod")||c,D=()=>E(P||N.currentTarget,{fetcherKey:n,method:j,navigate:a,replace:s,state:u,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b});C&&a!==!1?v.startTransition(()=>D()):D()};return v.createElement("form",{ref:w,method:O,action:T,onSubmit:o?p:A,...S,"data-discover":!M&&e==="render"?"true":void 0})});pz.displayName="Form";function gz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iO(e){let n=v.useContext(Ts);return Lt(n,gz(e)),n}function mz(e,{target:n,replace:a,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p,useTransitions:g}={}){let y=Vc(),h=Ar(),b=qc(e,{relative:c});return v.useCallback(S=>{if(K5(S,n)){S.preventDefault();let w=a!==void 0?a:Ur(h)===Ur(b),C=()=>y(e,{replace:w,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p});g?v.startTransition(()=>C()):C()}},[h,y,b,a,o,s,n,e,u,c,d,p,g])}function yz(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 n=v.useRef(Sy(e)),a=v.useRef(!1),o=Ar(),s=v.useMemo(()=>Y5(o.search,a.current?null:n.current),[o.search]),u=Vc(),c=v.useCallback((d,p)=>{const g=Sy(typeof d=="function"?d(new URLSearchParams(s)):d);a.current=!0,u("?"+g,p)},[u,s]);return[s,c]}var vz=0,bz=()=>`__${String(++vz)}__`;function xz(){let{router:e}=iO("useSubmit"),{basename:n}=v.useContext(pa),a=T5(),o=e.fetch,s=e.navigate;return v.useCallback(async(u,c={})=>{let{action:d,method:p,encType:g,formData:y,body:h}=Q5(u,n);if(c.navigate===!1){let b=c.fetcherKey||bz();await o(b,a,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,flushSync:c.flushSync})}else await s(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,s,n,a])}function Sz(e,{relative:n}={}){let{basename:a}=v.useContext(pa),o=v.useContext(ja);Lt(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),u={...qc(e||".",{relative:n})},c=Ar();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(h=>h).forEach(h=>d.append("index",h));let y=d.toString();u.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:Aa([a,u.pathname])),Ur(u)}function wz(e,{relative:n}={}){let a=v.useContext(Dv);Lt(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=iO("useViewTransitionState"),s=qc(e,{relative:n});if(!a.isTransitioning)return!1;let u=Na(a.currentLocation.pathname,o)||a.currentLocation.pathname,c=Na(a.nextLocation.pathname,o)||a.nextLocation.pathname;return vc(s.pathname,c)!=null||vc(s.pathname,u)!=null}function Ez(e){return v.createElement(L5,{flushSync:cr.flushSync,...e})}function Ss({controlled:e,default:n,name:a,state:o="value"}){const{current:s}=v.useRef(e!==void 0),[u,c]=v.useState(()=>n),d=s&&e!==void 0?e:u,p=v.useCallback(g=>{s||c(g)},[]);return[d,p]}function Rz(e){const{open:n,defaultOpen:a=!1,onOpenChange:o,disabled:s}=e,[u,c]=Ss({controlled:n,default:a,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:g}=Rs(u,!0,!0),y=Mr(),[h,b]=v.useState(),S=h===null?void 0:h??y,w=Be(C=>{const E=!u,T=dt(qa,C.nativeEvent);o(E,T),!T.isCanceled&&c(E)});return v.useMemo(()=>({defaultPanelId:y,disabled:s,handleTrigger:w,mounted:d,open:u,panelId:S,setMounted:p,setOpen:c,setPanelIdState:b,transitionStatus:g}),[y,s,w,d,u,S,p,c,b,g])}const sO=v.createContext(void 0);function lO(){const e=v.useContext(sO);if(e===void 0)throw new Error(En(15));return e}const Cz="data-open",Tz="data-closed",Ff=Qy,Oz="data-panel-open",Mz={[Cz]:""},Az={[Tz]:""},Dz={open(e){return e?{[Oz]:""}:null}},Nz={open(e){return e?Mz:Az}},uO={...Nz,...po},kz=v.forwardRef(function(n,a){const{render:o,className:s,defaultOpen:u=!1,disabled:c=!1,onOpenChange:d,open:p,style:g,...y}=n,h=Be(d),b=Rz({open:p,defaultOpen:u,onOpenChange:h,disabled:c}),S=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),w=v.useMemo(()=>({...b,onOpenChange:h,state:S}),[b,h,S]),C=Mt("div",n,{state:S,ref:a,props:y,stateAttributesMapping:uO});return x.jsx(sO.Provider,{value:w,children:C})}),cO=v.createContext(void 0);function zv(e=!1){const n=v.useContext(cO);if(n===void 0&&!e)throw new Error(En(16));return n}function jz(e){const{focusableWhenDisabled:n,disabled:a,composite:o=!1,tabIndex:s=0,isNativeButton:u}=e,c=o&&n!==!1,d=o&&n===!1;return{props:v.useMemo(()=>{const g={onKeyDown(y){a&&n&&y.key!=="Tab"&&y.preventDefault()}};return o||(g.tabIndex=s,!u&&a&&(g.tabIndex=n?s:-1)),(u&&(n||c)||!u&&a)&&(g["aria-disabled"]=a),u&&(!n||d)&&(g.disabled=a),g},[o,a,n,c,d,u,s])}}function gs(e,n,{detail:a=0,pointerType:o=""}={}){e.dispatchEvent(new(wn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:a,pointerType:o,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,altKey:n.altKey,metaKey:n.metaKey}))}function yo(e={}){const{disabled:n=!1,focusableWhenDisabled:a,tabIndex:o=0,native:s=!0,composite:u}=e,c=v.useRef(null),d=zv(!0),p=u??d!==void 0,{props:g}=jz({focusableWhenDisabled:a,disabled:n,composite:p,tabIndex:o,isNativeButton:s}),y=v.useCallback(()=>{const S=c.current;V0(S)&&p&&n&&g.disabled===void 0&&S.disabled&&(S.disabled=!1)},[n,g.disabled,p]);_e(y,[y]);const h=v.useCallback((S={})=>{const{onClick:w,onMouseDown:C,onKeyUp:E,onKeyDown:T,onPointerDown:O,...M}=S;return Or({onClick(A){if(n){A.preventDefault();return}w?.(A)},onMouseDown(A){n||C?.(A)},onKeyDown(A){if(n||(Sh(A),T?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,P=A.currentTarget,j=V0(P),D=!s&&Iz(P),z=N&&(s?j:!D),F=A.key==="Enter",G=A.key===" ",J=P.getAttribute("role"),K=J?.startsWith("menuitem")||J==="option"||J==="gridcell";if(N&&p&&G){if(A.defaultPrevented&&K)return;A.preventDefault(),(!s||j)&&(A.preventBaseUIHandler(),gs(P,A));return}if(!z||s||!G&&!F){N&&D&&G&&A.preventDefault();return}A.defaultPrevented||(A.preventDefault(),F&&(A.preventBaseUIHandler(),gs(P,A)))},onKeyUp(A){if(!n){if(Sh(A),E?.(A),A.target===A.currentTarget&&s&&p&&V0(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!p&&!A.defaultPrevented&&A.key===" "&&(A.preventBaseUIHandler(),gs(A.currentTarget,A))}},onPointerDown(A){if(n){A.preventDefault();return}O?.(A)}},s?{type:"button"}:{role:"button"},g,M)},[n,g,p,s]),b=Be(S=>{c.current=S,y()});return{getButtonProps:h,buttonRef:b}}function V0(e){return yn(e)&&e.tagName==="BUTTON"}function Iz(e){return yn(e)&&e.tagName==="A"&&!!e.href}const Pz={...Dz,...po},Lz=v.forwardRef(function(n,a){const{panelId:o,open:s,handleTrigger:u,state:c,disabled:d}=lO(),{className:p,disabled:g=d,render:y,nativeButton:h=!0,style:b,...S}=n,{getButtonProps:w,buttonRef:C}=yo({disabled:g,native:h});return Mt("button",n,{state:c,ref:[a,C],props:[{"aria-controls":s?o:void 0,"aria-expanded":s,onClick:u},S,w],stateAttributesMapping:Pz})}),ml={height:void 0,width:void 0};function zz(e){const{externalRef:n,hiddenUntilFound:a,id:o,keepMounted:s,mounted:u,onOpenChange:c,open:d,setMounted:p,setOpen:g,transitionStatus:y}=e,h=v.useRef(null),b=v.useRef(null),[S,w]=v.useState(ml),C=v.useRef(ml),E=v.useRef(!1),T=v.useRef(d),O=v.useRef(!1),[M,A]=v.useState(!1),N=v.useRef(null),P=Xr(n,h),j=Ln(d),D=ip(h),z=!d&&!u,F=M?"idle":y,G=d&&(T.current||O.current),J=!d&&u&&b.current==="css-animation"&&S.height===void 0&&S.width===void 0?C.current:S,K=a&&z&&b.current!=="css-animation",H=Be((V,Q=!0)=>{Q&&(C.current=V),w(V)}),U=Be(()=>{N.current?.(),N.current=null}),L=Be(V=>{U(),N.current=()=>{N.current=null,V()}}),$=Be(()=>{d&&u&&b.current==="css-animation"&&(O.current=!0)});_e(()=>{!M||y==="starting"||A(!1)},[M,y]),v.useEffect(()=>()=>{$(),U()},[$,U]),_e(()=>{d||(T.current=!1,O.current=!1);const V=h.current;if(!V)return;!d&&N.current&&U();const Q=_z(V,G);if(b.current=Q,d&&y==="idle"&&T.current&&Q==="css-animation"){C.current=yl(V);return}if(d&&y==="starting"){const se=E.current;if(E.current=!1,Q==="none"){H(yl(V)),A(!0);return}if(Q==="css-transition"){const W=Uz(V);if(H(yl(V)),!se)return W;const re=Bf(V,"transition-duration","0s");return L(re),A(!0),W}H(yl(V));const k=Bf(V,"animation-name","none");if(!se){k();return}const B=Bf(V,"animation-duration","0s");k(),L(B),A(!0);return}if(!d&&u&&(y==="idle"||y==="starting")){if(Q==="none"){H(ml,!1),p(!1);return}H(yl(V));return}if(y!=="ending")return;if(Q==="none"){p(!1);return}const ee=yl(V);if(!(ee.height>0||ee.width>0)){p(!1);return}H(ee),Q==="css-animation"&&Bf(V,"animation-name","none")()},[u,d,U,H,p,L,G,y]),ka({enabled:d&&u&&F==="idle",open:!0,ref:h,onComplete(){d&&H(ml,!1)}}),v.useEffect(()=>{if(d||!u||F!=="ending")return;if(!h.current){p(!1),H(ml,!1);return}const Q=new AbortController;let ee=-1;function q(){j.current||(p(!1),H(ml,!1))}return ee=Cr.request(()=>{D(q,Q.signal)}),()=>{Cr.cancel(ee),Q.abort()}},[j,u,d,F,D,H,p]),_e(()=>{const V=h.current;!V||!a||!z||V.setAttribute("hidden","until-found")},[z,a]),v.useEffect(function(){const Q=h.current;if(!Q)return;const ee=Da.create();let q=-1;const se=(W,re)=>{ee.start(0,()=>{j.current||(q=Cr.request(()=>{j.current||(W&&(E.current=!1),re&&Q.setAttribute(Ff,""),Q.setAttribute("hidden","until-found"))}))})},B=jt(Q,"beforematch",W=>{const re=dt(Hr,W);if(c(!0,re),re.isCanceled){se(!1,!1);return}E.current=!0;const Ee=Q.hasAttribute(Ff);Q.removeAttribute(Ff),g(!0),se(!0,Ee)});return()=>{ee.clear(),Cr.cancel(q),B()}},[j,c,g]);const Y=s||a||u||d;return{height:J.height,props:{...K?{[Ff]:""}:void 0,hidden:z,id:o},ref:P,shouldPreventOpenAnimation:G,shouldRender:Y,transitionStatus:F,width:J.width}}function yl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function _z(e,n){const a=wn(e).getComputedStyle(e),o=(a.animationName.split(",").map(u=>u.trim()).some(u=>u!==""&&u!=="none")||n)&&Jw(a.animationDuration),s=Jw(a.transitionDuration);return o&&s||s?"css-transition":o?"css-animation":"none"}function Jw(e){return e.split(",").map(n=>n.trim()).some(n=>n!==""&&Number.parseFloat(n)>0)}function Bf(e,n,a){const o=e.style.getPropertyValue(n),s=e.style.getPropertyPriority(n);return e.style.setProperty(n,a),()=>{if(o===""){e.style.removeProperty(n);return}e.style.setProperty(n,o,s)}}function Uz(e){const n={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(n).forEach(s=>{e.style.setProperty(s,"initial","important")});function a(){Object.entries(n).forEach(([s,u])=>{if(u===""){e.style.removeProperty(s);return}e.style.setProperty(s,u)})}const o=Cr.request(a);return()=>{Cr.cancel(o),a()}}const Hz="--collapsible-panel-height",Fz="--collapsible-panel-width",Bz=v.forwardRef(function(n,a){const{className:o,hiddenUntilFound:s,keepMounted:u,render:c,id:d,style:p,...g}=n,{defaultPanelId:y,mounted:h,onOpenChange:b,open:S,setMounted:w,setPanelIdState:C,setOpen:E,state:T,transitionStatus:O}=lO(),M=s??!1,A=u??!1,N=d||void 0,P=N??y;_e(()=>(C($=>N??($===null?void 0:$)),()=>{C($=>$===N?null:$)}),[N,C]);const{height:j,props:D,ref:z,shouldPreventOpenAnimation:F,shouldRender:G,transitionStatus:J,width:K}=zz({externalRef:a,hiddenUntilFound:M,id:P,keepMounted:A,mounted:h,onOpenChange:b,open:S,setMounted:w,setOpen:E,transitionStatus:O}),H={...T,transitionStatus:J},U=ER(p,H),L=Mt("div",{...n,style:void 0},{state:H,ref:z,props:[D,{style:{[Hz]:j===void 0?"auto":`${j}px`,[Fz]:K===void 0?"auto":`${K}px`}},g,U?{style:U}:void 0,F?{style:{animationName:"none"}}:void 0],stateAttributesMapping:uO});return G?L:null});function Vz({...e}){return x.jsx(kz,{"data-slot":"collapsible",...e})}function qz({...e}){return x.jsx(Lz,{"data-slot":"collapsible-trigger",...e})}function Kz({...e}){return x.jsx(Bz,{"data-slot":"collapsible-content",...e})}const dO=v.createContext(void 0);function Yz(e){const n=v.useContext(dO);if(n===void 0)throw new Error(En(33));return n}const Ap=v.createContext(void 0);function Vo(e){const n=v.useContext(Ap);if(n===void 0&&!e)throw new Error(En(36));return n}const fO=v.createContext(void 0);function Dp(e=!0){const n=v.useContext(fO);if(n===void 0&&!e)throw new Error(En(25));return n}const hO=v.createContext(null);function Np(e="root"){const n=v.useContext(hO),a=v.useContext(Ap);return n===null||a===void 0?null:(e==="submenu-trigger"?a.virtualFocus||a.parentVirtualFocus:a.virtualFocus)?n:null}const Gz={visible:!0,ref:null};function $z(){return Gz}function pO(e,n,a="root"){const o=Np(a),u=((a==="submenu-trigger"?o?.useSubmenuTrigger:o?.useItem)??$z)({label:e.label,children:e.children,render:e.render}),c=Xr(n,u.ref);return{visible:u.visible,ref:c,props:u.props}}function Qz(e){e.preventDefault()}function Xz(e){const{closeOnClick:n,highlighted:a,id:o,nodeId:s,store:u,typingRef:c,itemRef:d,itemMetadata:p}=e,g=Vo(),y=Dp(!0),h=p.type==="submenu-trigger",b=h?g.parentVirtualFocus:g.virtualFocus,w=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",a),{events:C}=u.useState("floatingTreeRoot"),E=u.useState("open"),T=y!==void 0,O=!b&&E&&a?0:-1;return v.useMemo(()=>({id:o,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:b?Qz:void 0,onKeyDown(M){M.key===" "&&c?.current&&M.preventDefault()},onMouseMove(M){s&&C.emit("itemhover",{nodeId:s,target:M.currentTarget})},onClick(M){n&&C.emit("close",{domEvent:M.nativeEvent,reason:ps})},onMouseUp(M){if(y){const A=y.initialCursorPointRef.current;if(y.initialCursorPointRef.current=null,T&&A&&Math.abs(M.clientX-A.x)<=1&&Math.abs(M.clientY-A.y)<=1||T&&!By&&M.button===2)return}d.current&&u.context.allowMouseUpTriggerRef.current&&(!T||M.button===2)&&p.type==="regular-item"&&gs(d.current,M,{detail:1,pointerType:"mouse"})}}),[n,O,o,C,s,u.context.allowMouseUpTriggerRef,c,d,y,T,p.type,w,b])}const gO={type:"regular-item"};function mO(e){const{closeOnClick:n,disabled:a,highlighted:o,id:s,store:u,typingRef:c=u.context.typingRef,nativeButton:d,itemMetadata:p,nodeId:g}=e,y=v.useRef(null),{getButtonProps:h,buttonRef:b}=yo({disabled:a,focusableWhenDisabled:!0,native:d,composite:!0}),S=Xz({closeOnClick:n,highlighted:o,id:s,nodeId:g,store:u,typingRef:c,itemRef:y,itemMetadata:p}),w=v.useCallback(E=>Or(S,{onMouseEnter(T){p.type==="submenu-trigger"&&p.setActive(T.nativeEvent)}},E,h),[S,h,p]),C=Xr(y,b);return v.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const yO=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Zz(){return v.useContext(yO)}function kp(e={}){const{guess:n,label:a,metadata:o,textRef:s,index:u}=e,{register:c,unregister:d,subscribeMapChange:p,nextIndexRef:g}=Zz(),y=v.useRef(-1),[h,b]=v.useState(u==null&&n?()=>{if(y.current===-1){const E=g.current;g.current+=1,y.current=E}return y.current}:-1),S=u??h,w=v.useRef(null),C=v.useCallback(E=>{const T=w.current;T&&d(T),w.current=E,E&&c(E,{metadata:o??null,index:u??null,label:a,textRef:s})},[u,c,d,o,a,s]);return _e(()=>{if(u==null)return p(E=>{const T=w.current?E.get(w.current)?.index:null;T!=null&&b(T)})},[u,p]),{ref:C,index:S}}const Jz="data-checked",Wz="data-unchecked",vO={checked(e){return e?{[Jz]:""}:{[Wz]:""}},...po},_v=v.createContext(void 0);function e_(){const e=v.useContext(_v);if(e===void 0)throw new Error(En(31));return e}const t_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,[d,p]=v.useState(void 0),g=Mt("div",n,{ref:a,props:{role:"group","aria-labelledby":d,...c}});return x.jsx(_v.Provider,{value:p,children:g})}),n_=v.forwardRef(function(n,a){const o=Np()?.Group??t_;return x.jsx(o,{...n,ref:a})}),r_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Mr(c),g=e_();return _e(()=>(g(p),()=>{g(y=>y===p?void 0:y)}),[g,p]),Mt("div",n,{ref:a,props:{id:p,"aria-hidden":!0,...d}})}),a_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!0,style:y,...h}=n,{store:b}=Vo(),S=kp({guess:!0,label:c}),w=Mr(u),C=b.useState("disabled"),E=b.useState("isActive",S.index),T=b.useState("floatingNodeId"),O=b.useState("itemProps"),M=p||C,{getItemProps:A,itemRef:N}=mO({closeOnClick:g,disabled:M,highlighted:E,id:w,store:b,nativeButton:d,nodeId:T,itemMetadata:gO});return Mt("div",n,{state:{disabled:M,highlighted:E},props:[O,h,A],ref:[N,a,S.ref]})}),bO=v.forwardRef(function(n,a){const o=pO(n,a);return o.visible?x.jsx(a_,{...n,ref:o.ref}):null}),o_=v.createContext(void 0);function Uv(e){return v.useContext(o_)}const wy="ArrowUp",Ey="ArrowDown",Ry="ArrowLeft",Cy="ArrowRight",Ty="Home",Oy="End",Yc=new Set([wy,Ey,Ry,Cy,Ty,Oy]),xO="Shift",i_=[xO,"Control","Alt","Meta"];function s_(e){return yn(e)&&e.tagName==="INPUT"}function Ww(e){return!!(s_(e)&&e.selectionStart!=null||yn(e)&&e.tagName==="TEXTAREA")}function eE(e,n,a,o){if(!e||!n||!n.scrollTo)return;let s=e.scrollLeft,u=e.scrollTop;const c=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(c&&o!=="vertical"){const p=tE(e,n,"left"),g=Vf(e),y=Vf(n);a==="ltr"&&(p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(s=p-y.scrollMarginLeft-g.scrollPaddingLeft)),a==="rtl"&&(p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?s=p-y.scrollMarginLeft-g.scrollPaddingLeft:p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&o!=="horizontal"){const p=tE(e,n,"top"),g=Vf(e),y=Vf(n);p-y.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?u=p-y.scrollMarginTop-g.scrollPaddingTop:p+n.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(u=p+n.offsetHeight+y.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:s,top:u,behavior:"auto"})}function tE(e,n,a){const o=a==="left"?"offsetLeft":"offsetTop";let s=0;for(;n.offsetParent&&(s+=n[o],n.offsetParent!==e);)n=n.offsetParent;return s}function Vf(e){const n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}const l_=v.createContext(void 0);function u_(){return v.useContext(l_)}function c_(e,n){const a=av(e.render);if(v.isValidElement(a)){const o=a.props;if(Object.hasOwn(o,"id"))return o.id??""}return e.id??n}function d_(e,n,a){const o=c_(e,n),s=o===n?void 0:o,u=v.useCallback(c=>a?.(c?s:void 0),[s,a]);return[o,u]}function f_(e,n,a){const o=av(e.render),s=v.isValidElement(o)?o.props:void 0,u=e["aria-label"]??s?.["aria-label"];let c=e["aria-labelledby"]??s?.["aria-labelledby"];return c==null&&!u&&(c=n?n.id||void 0:a||void 0),c}const h_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,id:d,initialFocus:p,...g}=n,{store:y,defaultFloatingId:h,setRenderedFloatingId:b,virtualFocus:S,orientation:w}=Vo(),C=u_(),{side:E,align:T}=Yz(),O=Uv()!=null,M=y.useState("open"),A=y.useState("transitionStatus"),N=y.useState("popupProps"),P=y.useState("mounted"),j=y.useState("instantType"),D=y.useState("activeTriggerElement"),z=y.useState("parent"),F=y.useState("lastOpenChangeReason"),G=y.useState("rootId"),J=y.useState("floatingRootContext"),K=y.useState("floatingTreeRoot"),H=y.useState("closeDelay"),U=y.useState("hoverEnabled"),L=y.useState("disabled"),$=y.useState("openMethod"),Y=y.useState("activeTriggerId"),V=y.useState("listElement"),[Q,ee]=d_(n,h,b),q=f_(n,D,Y),se=z.type==="menu"?C:void 0,k=z.type==="context-menu";let B=p??z.type!=="menu";p===void 0&&V&&z.type!=="menu"&&(B=()=>y.state.activeIndex!==null?!1:V),ka({open:M,ref:y.context.popupRef,onComplete(){M&&y.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function ve(Pe){y.setOpen(!1,dt(Pe.reason,Pe.domEvent))}return K.events.on("close",ve),()=>{K.events.off("close",ve)}},[K.events,y]),fv(J,{enabled:U&&!L&&!k&&z.type!=="menubar",closeDelay:H});const W=y.useStateSetter("popupElement"),re=v.useContext(hO)?.useParentHandoff??g_,{parentVirtualFocusRef:Ee,handleFocus:le}=re(y,z,M,S),me={transitionStatus:A,side:E,align:T,open:M,nested:z.type==="menu",instant:j},ge=Mt("div",n,{state:me,ref:[a,y.context.popupRef,W,ee],stateAttributesMapping:Jh,props:[N,{id:Q,...V?{role:"presentation"}:{role:"menu","aria-orientation":w==="horizontal"?"horizontal":void 0,"aria-labelledby":q},onKeyDown(ve){se?.onPopupKeyDown?.(ve),O&&Yc.has(ve.key)&&ve.stopPropagation()},onFocus:le},zc(A),g,{"data-rootownerid":G}]});let ce=z.type===void 0||k;(D||z.type==="menubar"&&F!==Wh)&&(ce=!0);const Te=se?.getReturnElement??Ee;return x.jsx(op,{context:J,openInteractionType:$,modal:k,disabled:!P,returnFocus:c??Te??ce,explicitReturnFocus:c===void 0&&Te?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:z.type===void 0?()=>[y.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:z.type!=="menubar"?K:void 0,previousFocusableElement:D,nextFocusableElement:z.type===void 0?y.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.context.beforeContentFocusGuardRef,children:ge})}),p_={parentVirtualFocusRef:void 0,handleFocus:void 0};function g_(){return p_}const SO=v.forwardRef(function(n,a){const o=Np()?.Popup??h_;return x.jsx(o,{...n,ref:a})}),wO=v.createContext(void 0);function m_(){const e=v.useContext(wO);if(e===void 0)throw new Error(En(32));return e}const EO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,{store:u,parent:c}=Vo();if(!(u.useState("mounted")||o))return null;const g=c.type==="menu"||c.type==="menubar"?"group":void 0;return x.jsx(wO.Provider,{value:o,children:x.jsx(ap,{ref:a,...s,portalOwnerRole:g})})});function Hv(e){const{children:n,elementsRef:a,labelsRef:o,onMapChange:s}=e,u=Be(s),[,c]=v.useState(0),d=er(v_).current,p=er(y_).current,g=v.useRef(0),y=v.useRef(!0),h=v.useRef(null),b=v.useRef(null),S=Be(()=>{y.current||(y.current=!0,c(N=>N+1))}),w=Be((N,P)=>{p.set(N,P),S()}),C=Be(N=>{p.delete(N),S()}),E=Be(N=>{const P=new Map;return a.current.length=0,o&&(o.current.length=0),N.forEach(j=>{P.set(j.element,{...j.registration.metadata??{},index:j.index}),a.current[j.index]=j.element,o&&(o.current[j.index]=j.registration.label!==void 0?j.registration.label:j.registration.textRef?.current?.textContent??j.element.textContent)}),g.current=a.current.length,P});function T(N){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||N.length<2)return;const P=new MutationObserver(D=>{if(!S_(D))return;let z=null;for(const F of N)if(F.isConnected){if(z&&RO(z,F)>0){P.disconnect(),S();return}z=F}});b.current=P;const j=new Set;for(let D=1;D<N.length;D+=1){const z=x_(N[D-1],N[D]);z&&j.add(z)}j.forEach(D=>P.observe(D,{childList:!0}))}const O=Be(()=>{const[N,P]=b_(p),j=E(N),D=h.current,z=!D||D.length!==N.length||N.some((F,G)=>{const J=D[G];return F.index!==J.index||F.element!==J.element||F.registration.index!==J.registration.index||F.registration.metadata!==J.registration.metadata});T(P),h.current=N,y.current=!1,z&&(d.forEach(F=>F(j)),u(j))});_e(()=>(!y.current&&h.current&&E(h.current),()=>{a.current=[],o&&(o.current=[])}),[a,o,E]),_e(()=>{y.current&&O()}),_e(()=>()=>{b.current?.disconnect(),y.current=!0},[]);const M=Be(N=>(d.add(N),()=>{d.delete(N)})),A=v.useMemo(()=>({register:w,unregister:C,subscribeMapChange:M,nextIndexRef:g}),[w,C,M,g]);return x.jsx(yO.Provider,{value:A,children:n})}function y_(){return new Map}function v_(){return new Set}function b_(e){const n=new Set,a=[],o=[];e.forEach((u,c)=>{if(!c.isConnected)return;const d=u.index,p={index:d??-1,element:c,registration:u};d===null?o.push(p):d>=0&&(n.add(d),a.push(p))});let s=0;return o.sort((u,c)=>RO(u.element,c.element)),o.forEach(u=>{for(;n.has(s);)s+=1;u.index=s,a.push(u),s+=1}),n.size>0&&a.sort((u,c)=>u.index-c.index),[a,o.map(u=>u.element)]}function x_(e,n){let a=e.parentElement;for(;a&&!a.contains(n);)a=a.parentElement;return a}function S_(e){for(const n of e)for(let a=0;a<n.removedNodes.length;a+=1)if(n.removedNodes[a].isConnected)return!0;return!1}function RO(e,n){return e.nextElementSibling===n?-1:n.nextElementSibling===e?1:e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const jp=v.forwardRef(function(n,a){const{cutout:o,...s}=n;let u;if(o){const c=o.getBoundingClientRect();u=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return x.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:u}})});function CO(e){const{store:n,domReference:a,positionerElement:o,open:s}=e,u=v.useRef(null),c=v.useRef(null),d=ip(o);_e(()=>{s||(c.current?.abort(),c.current=null,n.state.instantType==="trigger-change"&&n.set("instantType",void 0))},[s,n]),_e(()=>{const p=a,g=u.current;if(p&&(u.current=p),!g||!p||p===g||!n.select("open"))return;n.set("instantType",void 0);const y=new AbortController;return c.current=y,d(()=>{n.select("open")&&n.set("instantType","trigger-change")},y.signal),()=>{y.abort()}},[a,d,n])}let nE={},rE={},aE="";function Ip(e,n){return Mc(e)?e:n}function oE(e,n,a){return/hidden|clip/.test(e.getComputedStyle(Ip(n,a)).overflowY)}function w_(e){if(typeof document>"u")return!1;const n=Gt(e);return wn(n).innerWidth-n.documentElement.clientWidth>0}function E_(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const a=Gt(e),o=a.documentElement,s=a.body,u=Ip(o,s),c=u.style.overflowY,d=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",u.style.overflowY="scroll";const p=u.offsetWidth;u.style.overflowY="hidden";const g=u.offsetWidth;return u.style.overflowY=c,o.style.scrollbarGutter=d,p===g}function R_(e){const n=Gt(e),a=n.documentElement,o=n.body,s=Ip(a,o),u={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,u)}}function C_(e){const n=Gt(e),a=n.documentElement,o=n.body,s=wn(a);let u=0,c=0,d=!1;const p=Cr.create();if(ho&&(s.visualViewport?.scale??1)!==1)return()=>{};function g(){const S=s.getComputedStyle(a),w=s.getComputedStyle(o),T=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";u=a.scrollTop,c=a.scrollLeft,nE={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},aE=a.style.scrollBehavior,rE={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const O=a.scrollHeight>a.clientHeight,M=a.scrollWidth>a.clientWidth,A=S.overflowY==="scroll"||w.overflowY==="scroll",N=S.overflowX==="scroll"||w.overflowX==="scroll",P=Math.max(0,s.innerWidth-o.clientWidth),j=Math.max(0,s.innerHeight-o.clientHeight),D=parseFloat(w.marginTop)+parseFloat(w.marginBottom),z=parseFloat(w.marginLeft)+parseFloat(w.marginRight),F=Ip(a,o);if(d=E_(e),d){a.style.scrollbarGutter=T,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(O||A)&&(a.style.overflowY="scroll"),(M||N)&&(a.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:D||j?`calc(100dvh - ${D+j}px)`:"100dvh",width:z||P?`calc(100vw - ${z+P}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),o.scrollTop=u,o.scrollLeft=c,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,nE),Object.assign(o.style,rE),d||(a.scrollTop=u,a.scrollLeft=c,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=aE)}function h(){y(),p.request(g)}g();const b=jt(s,"resize",h);return()=>{p.cancel(),y(),typeof s.removeEventListener=="function"&&b()}}class T_{lockCount=0;restore=null;timeoutLock=Da.create();timeoutUnlock=Da.create();acquire(n){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(n)),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(n){if(this.lockCount===0||this.restore!==null)return;const a=Gt(n),o=a.documentElement,s=a.body,u=wn(o);if(oE(u,o,s)){const d=new u.MutationObserver(()=>{oE(u,o,s)||(d.disconnect(),this.restore=null,this.lock(n))}),p={attributes:!0};d.observe(o,p),d.observe(s,p),this.restore=()=>d.disconnect();return}const c=Yh||!w_(n);this.restore=c?R_(n):C_(n)}}const O_=new T_;function TO(e=!0,n=null){_e(()=>{if(e)return O_.acquire(n)},[e,n])}const M_=20;function Fv(e,n,a,o){const[s,u]=v.useState(!1);_e(()=>{if(!e||!n||a==null){u(!1);return}const c=Gt(a).documentElement.clientWidth,d=a.offsetWidth;u(c>0&&d>0&&d>=c-M_)},[e,n,a]),TO(e&&(!n||s),o)}const OO=v.forwardRef(function(n,a){const{anchor:o,positionMethod:s="absolute",className:u,render:c,side:d,align:p,sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:E=NR,style:T,...O}=n,{store:M,virtualFocus:A,syncHighlightedItem:N}=Vo(),P=m_(),j=Dp(!0),D=M.useState("parent"),z=M.useState("floatingRootContext"),F=M.useState("floatingTreeRoot"),G=M.useState("mounted"),J=M.useState("open"),K=M.useState("modal"),H=M.useState("openMethod"),U=M.useState("activeTriggerElement"),L=M.useState("transitionStatus"),$=M.useState("positionerElement"),Y=M.useState("instantType"),V=M.useState("adaptiveOrigin"),Q=M.useState("lastOpenChangeReason"),ee=M.useState("floatingNodeId"),q=M.useState("floatingParentNodeId"),se=z.useState("domReferenceElement");let k=o,B=g,W=y,re=p,Ee=E;D.type==="context-menu"&&(k=o??D.context?.anchor,re=re??"start",!d&&re!=="center"&&(W=n.alignOffset??2,B=n.sideOffset??-5));let le=d,me=re;D.type==="menu"?(le=le??"inline-end",me=me??"start",Ee=n.collisionAvoidance??ov):D.type==="menubar"&&(le=le??(D.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=D.type==="context-menu",ce=vp({anchor:k,floatingRootContext:z,positionMethod:j?"fixed":s,mounted:G,side:le,sideOffset:B,align:me,alignOffset:W,arrowPadding:ge?0:S,collisionBoundary:h,collisionPadding:b,sticky:w,nodeId:ee,keepMounted:P,disableAnchorTracking:C,collisionAvoidance:Ee,shift:ge?{crossAxis:!("side"in Ee&&Ee.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:F,adaptiveOrigin:V,lazyFlip:A?"placement":!1});v.useEffect(()=>{function Ue(be){be.open&&(be.parentNodeId===ee&&M.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,dt(Ju)))}return F.events.on("menuopenchange",Ue),()=>{F.events.off("menuopenchange",Ue)}},[M,F.events,ee]),v.useEffect(()=>{if(M.select("floatingParentNodeId")==null)return;function Ue(be){if(be.open||be.nodeId!==M.select("floatingParentNodeId"))return;const He=be.reason??Ju;M.setOpen(!1,dt(He))}return F.events.on("menuopenchange",Ue),()=>{F.events.off("menuopenchange",Ue)}},[F.events,M]);const Te=Un();v.useEffect(()=>{J||Te.clear()},[J,Te]),v.useEffect(()=>{function Ue(be){if(!(!J||be.nodeId!==M.select("floatingParentNodeId")))if(be.target&&U&&U!==be.target){const He=M.select("closeDelay");He>0?Te.isStarted()||Te.start(He,()=>{M.setOpen(!1,dt(Ju))}):M.setOpen(!1,dt(Ju))}else Te.clear()}return F.events.on("itemhover",Ue),()=>{F.events.off("itemhover",Ue)}},[F.events,J,U,M,Te]),v.useEffect(()=>{const Ue={open:J,nodeId:ee,parentNodeId:q,reason:M.select("lastOpenChangeReason")};F.events.emit("menuopenchange",Ue)},[F.events,J,M,ee,q]),CO({store:M,domReference:se,positionerElement:$,open:J});const ve={open:J,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:D.type==="menu",instant:Y},Pe=D.type==="menubar"&&D.context.modal;Fv(J&&(Pe||K&&Q!==qn),H==="touch",$,U);const Le=bp(n,ve,{styles:ce.positionerStyles,transitionStatus:L,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!G,inert:!J}),Fe=G&&D.type!=="menu"&&(D.type!=="menubar"&&K&&Q!==qn||D.type==="menubar"&&D.context.modal);let Oe=null;return D.type==="menubar"?Oe=D.context.contentElement:D.type===void 0&&(Oe=U),x.jsxs(dO.Provider,{value:ce,children:[Fe&&x.jsx(jp,{ref:D.type==="context-menu"||D.type==="nested-context-menu"?D.context.internalBackdropRef:null,inert:xp(!J),cutout:Oe}),x.jsx(_R,{id:ee,children:x.jsx(Hv,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,onMapChange:N,children:Le})})]})}),MO=v.createContext(void 0);function A_(){const e=v.useContext(MO);if(e===void 0)throw new Error(En(34));return e}const D_=v.forwardRef(function(n,a){const{render:o,className:s,value:u,defaultValue:c,onValueChange:d,disabled:p=!1,style:g,"aria-labelledby":y,...h}=n,[b,S]=v.useState(void 0),[w,C]=Ss({controlled:u,default:c,name:"MenuRadioGroup"}),E=Be((A,N)=>{d?.(A,N),!N.isCanceled&&C(A)}),O=Mt("div",n,{state:{disabled:p},ref:a,props:{role:"group","aria-labelledby":y??b,"aria-disabled":p||void 0,...h}}),M=v.useMemo(()=>({value:w,setValue:E,disabled:p}),[w,E,p]);return x.jsx(_v.Provider,{value:S,children:x.jsx(MO.Provider,{value:M,children:O})})}),N_=v.memo(v.forwardRef(function(n,a){const o=Np()?.RadioGroup??D_;return x.jsx(o,{...n,ref:a})})),AO=v.createContext(void 0);function k_(){const e=v.useContext(AO);if(e===void 0)throw new Error(En(35));return e}const j_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!1,value:y,style:h,...b}=n,{store:S}=Vo(),{value:w,setValue:C,disabled:E}=A_(),T=kp({guess:!0,label:c}),O=Mr(u),M=S.useState("isActive",T.index),A=S.useState("floatingNodeId"),N=S.useState("itemProps"),P=S.useState("disabled"),j=p||E||P,D=w===y,{getItemProps:z,itemRef:F}=mO({closeOnClick:g,disabled:j,highlighted:M,id:O,store:S,nativeButton:d,nodeId:A,itemMetadata:gO}),G=v.useMemo(()=>({disabled:j,highlighted:M,checked:D}),[j,M,D]);function J(H){const U=dt(ps,H.nativeEvent,void 0,{preventUnmountOnClose:Sn});C(y,U)}const K=Mt("div",n,{state:G,stateAttributesMapping:vO,props:[N,{role:"menuitemradio","aria-checked":D,onClick:J},b,z],ref:[F,a,T.ref]});return x.jsx(AO.Provider,{value:G,children:K})}),I_=v.forwardRef(function(n,a){const o=pO(n,a);return o.visible?x.jsx(j_,{...n,ref:o.ref}):null}),P_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=k_(),g=v.useRef(null),{transitionStatus:y,mounted:h,setMounted:b}=Rs(p.checked);ka({batch:!0,enabled:!p.checked,open:p.checked,ref:g,onComplete(){p.checked||b(!1)}});const S={checked:p.checked,disabled:p.disabled,highlighted:p.highlighted,transitionStatus:y};return Mt("span",n,{state:S,stateAttributesMapping:vO,ref:[a,g],props:{"aria-hidden":!0,...d},enabled:c||h})}),L_=v.createContext(null);function DO(e){return v.useContext(L_)}function z_(e){const n=v.useRef(""),a=v.useCallback(s=>{s.defaultPrevented||(n.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,n.current),n.current=""},[e]),onPointerDown:a}}function Kl(e,n){const a=v.useRef(e),o=Be(n);_e(()=>{a.current!==e&&o(a.current),a.current=e},[e,o])}function __(e,n){const a=Be((u,c)=>{(typeof e=="function"?e():e)||n(c||(Yh?"touch":""))}),{onClick:o,onPointerDown:s}=z_(a);return v.useMemo(()=>({onClick:o,onPointerDown:s}),[o,s])}function NO(e){const[n,a]=v.useState(null),o=__(e,a);return Kl(e,s=>{s&&!e&&a(null)}),v.useMemo(()=>({openMethod:n,triggerProps:o}),[n,o])}function U_(e){return e==null?Hr:e.type.startsWith("key")?oR:e.type.startsWith("mouse")||e.type.startsWith("pointer")?_4:Hr}const H_={...Lo,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,n)=>{const a=Lo.triggerPopupId(e,n);return a?e.listElement?.id||a:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,n)=>ho&&e.inputFocused&&n?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,n)=>e.activeIndex===n,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Lo.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 F_ extends Bl{constructor(n,a,o=!1){const s=new Lc,u=V_(s,a,o,n);super(u,B_(s),H_),this.observe("parent",c=>{c.type==="menu"?this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef:c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const n=this.state.parent;if(n.type!=="menu")return;let a=n.store.select("rootId"),o=n.store.select("floatingTreeRoot"),s=n.store.select("keyboardEventRelay");return n.store.subscribe(()=>{const u=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),d=n.store.select("keyboardEventRelay");a===u&&o===c&&s===d||(a=u,o=c,s=d,this.notifyAll())})}setOpen(n,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:a})}setActiveIndex(n,a,o){if(this.state.activeIndex!==n){const u=(n===null?void 0:this.context.itemDomElements.current[n])===this.context.reportedItem;this.context.highlightReason=u?"none":a,this.context.highlightEvent=u?void 0:o}this.set("activeIndex",n)}highlightItem(n,a,o){const s=this.context.itemDomElements.current.indexOf(n);s>-1&&this.setActiveIndex(s,a,o)}}function B_(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 V_(e,n,a=!1,o){return{...pp(e,n,a),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:$t,inputProps:$t,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new iv,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:$t,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}const iE=v.createContext(null);function kO(e,n){return(e===qa||e===ps)&&n?.detail===0}function q_(e,n){return e===yh||kO(e,n)}const K_=Tc(function(n){const{children:a,open:o,onOpenChange:s,onOpenChangeComplete:u,onItemHighlighted:c,defaultOpen:d=!1,disabled:p=!1,modal:g,loopFocus:y=!0,orientation:h="vertical",actionsRef:b,closeParentOnEsc:S=!1,handle:w,triggerId:C,defaultTriggerId:E=null,highlightItemOnHover:T=!0,isSubmenu:O=!1,virtualFocus:M=!1,virtualFocusRef:A,allowEscape:N=!0,resetOnPointerLeave:P=!0}=n,j=Dp(!0),D=Vo(!0),z=DO(!0),F=D?.store,G=D?.virtualFocus??!1,J=v.useMemo(()=>O&&F?{type:"menu",store:F}:z?{type:"menubar",context:z}:j&&!F?{type:"context-menu",context:j}:{type:void 0},[j,F,z,O]),K=Mr(),H=Mr(),[U,L]=v.useState(void 0),$=(U??H)||void 0,Y=ki(),V=J.type==="menu"?J.store:void 0,Q=(o??d)&&V?.state.transitionStatus==="starting",ee=er(()=>Q?V?.state.instantType:void 0).current,q=er(()=>{const Ie=new F_({open:d,openProp:o,activeTriggerId:E,triggerIdProp:C,parent:J,disabled:p,highlightItemOnHover:T,modal:J.type===void 0?g:void 0,rootId:K,instantType:ee},$,Y!=null);return Ie.context.virtualFocusRef=A,Ie}).current;q.useControlledProp("openProp",o),q.useControlledProp("triggerIdProp",C),q.useContextCallback("onOpenChangeComplete",u);const se=q.useState("floatingTreeRoot"),k=sv(se),B=q.useState("open"),W=q.useState("activeTriggerElement"),re=q.useState("positionerElement"),Ee=q.useState("hoverEnabled"),le=q.useState("disabled"),me=q.useState("lastOpenChangeReason"),ge=q.useState("parent"),ce=q.useState("activeIndex"),Te=q.useState("keyboardOpen"),ve=q.useState("payload"),Pe=q.useState("floatingParentNodeId"),Me=v.useRef(null),Le=v.useRef(ge.type!=="context-menu"),Fe=Un(),Oe=v.useRef(!0),Ue=Un(),be=Pe!=null,{openMethod:He,triggerProps:Ze}=NO(B);q.useSyncedValues({disabled:p,highlightItemOnHover:T,modal:ge.type===void 0?g:void 0,openMethod:He,rootId:K}),cp(q);const{forceUnmount:it,transitionStatus:de}=dp(B,q,()=>{q.set("allowMouseEnter",!1)},Q),we=ip(q.context.popupRef);v.useEffect(()=>{if(ee===void 0)return;const Ie=()=>{q.state.instantType===ee&&q.set("instantType",void 0)};if(!B){Ie();return}if(de!==void 0)return;if(q.context.popupRef.current==null){Ie();return}const ze=new AbortController;return we(Ie,ze.signal),()=>{ze.abort()}},[ee,B,de,we,q]),_e(()=>{j&&!D?q.update({parent:{type:"context-menu",context:j},floatingNodeId:k,floatingParentNodeId:Y}):(D||!q.select("activeTriggerElement"))&&q.update({floatingNodeId:k,floatingParentNodeId:Y})},[j,D,k,Y,W,q]),v.useEffect(()=>{if(B||(Me.current=null),ge.type==="context-menu"){if(!B){Fe.clear(),Le.current=!1;return}Fe.start(500,()=>{Le.current=!0})}},[Fe,B,ge.type]),_e(()=>{!B&&!Ee&&q.set("hoverEnabled",!0)},[B,Ee,q]);const Ye=Be((Ie,ze)=>{const Ge=ze.reason;if(!Ie&&!q.select("open")||B===Ie&&ze.trigger===W&&me===Ge)return;const et=up(ze);if(!Ie&&ze.trigger==null&&(ze.trigger=W??void 0),s?.(Ie,ze),ze.isCanceled)return;q.state.floatingRootContext.dispatchOpenChange(Ie,ze);const Rt=ze.event;if(Ie===!1&&Ge!==ps&&Rt?.type==="click"&&Rt.pointerType==="touch"&&!Oe.current)return;Ie&&Ge===El?(Oe.current=!1,Ue.start(300,()=>{Oe.current=!0})):(Oe.current=!0,Ue.clear());const _=!Ie&&(Ge===Nc||Ge==null);Me.current=ze.event;const Z=lp(q.state,Ie,ze.trigger,et());Z.openChangeReason=Ge,Z.keyboardOpen=Ie&&q_(Ge,Rt),ge.type==="menubar"&&(Ge===El||Ge===Ti||Ge===qn||Ge===yh||Ge===Ju)?Z.instantType="group":kO(Ge,Rt)?Z.instantType="click":_?Z.instantType="dismiss":Z.instantType=void 0,q.update(Z)}),De=FR({popupStore:q,floatingRootContext:q.state.floatingRootContext,floatingId:$,nested:Y!=null,onOpenChange:Ye}),ke=De.context.events;_e(()=>{const Ie=({open:ze,eventDetails:Ge})=>Ye(ze,Ge);return ke.on("setOpen",Ie),()=>{ke?.off("setOpen",Ie)}},[ke,Ye]),_e(()=>q.subscribeToParentMenu(),[q]);const yt=v.useCallback(()=>{q.setOpen(!1,dt(kc))},[q]);v.useImperativeHandle(b,()=>({unmount:it,close:yt}),[it,yt]);let ut;ge.type==="context-menu"&&(ut=ge.context),v.useImperativeHandle(ut?.positionerRef,()=>re,[re]),v.useImperativeHandle(ut?.actionsRef,()=>({setOpen:Ye}),[Ye]);const ht=Ic(De,{enabled:!le,bubbles:{escapeKey:S&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Me.current?.type==="contextmenu"?!0:Le.current},externalTree:be?se:void 0}),Ot=yp(),Dt=eC(De,{enabled:!le,listRef:q.context.itemDomElements,activeIndex:ce,virtual:M,nested:ge.type==="menubar"||!M&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:y,focusItemOnOpen:M?Te:void 0,allowEscape:M&&y&&N,orientation:h,triggerOrientation:M?"vertical":h,rtl:Ot==="rtl",disabledIndices:fo,onNavigate(Ie,ze){q.setActiveIndex(Ie,U_(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(M&&O),externalTree:!M&&be?se:void 0,nestedReturnFocusRef:V?.context.virtualFocusRef,focusItemOnHover:T,resetOnPointerLeave:P}),en=v.useCallback(Ie=>{q.context.typingRef.current=Ie},[q]),an=tC(De,{enabled:!le&&!M,listRef:q.context.itemLabels,elementsRef:q.context.itemDomElements,activeIndex:ce,resetMs:Ak,onMatch:(Ie,ze)=>{B&&Ie!==ce&&q.setActiveIndex(Ie,oR,ze.nativeEvent)},onTyping:en}),tn=Be(c),We=v.useRef(-1),xt=Be(()=>{const Ie=q.state.activeIndex,ze=Ie===null?void 0:q.context.itemDomElements.current[Ie]??void 0;if(ze?.isConnected===!1)return;const Ge=ze===void 0?-1:Ie;if(We.current===Ge&&q.context.reportedItem===ze)return;We.current=Ge,q.context.reportedItem=ze,M&&q.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Rt}=q.context;q.context.highlightReason=Hr,q.context.highlightEvent=void 0,c&&tn(ze,z4(et,Rt,{label:ze===void 0?void 0:q.context.itemLabels.current[Ge]??void 0}))});_e(()=>{xt()},[ce,xt]);const Xt=v.useMemo(()=>{if(!M)return Dt.reference;if(!Dt.trigger)return $t;const{onFocus:Ie,...ze}=Dt.trigger;return ze},[M,Dt.reference,Dt.trigger]);q.useSyncedValue("inputProps",M?Dt.reference??$t:$t);const ft=v.useMemo(()=>{const Ie=Or(an.reference,Xt,ht.reference,{onMouseMove(){q.set("allowMouseEnter",!0)}},Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=B,Ie},[q,an.reference,Xt,ht.reference,Ze,B]),vt=v.useMemo(()=>{const Ie=Or(Dt.trigger,ht.trigger,Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=!1,Ie},[Dt.trigger,ht.trigger,Ze]);er(()=>(q.update({inactiveTriggerProps:vt}),null));const gt=v.useMemo(()=>Or(Pc,{onMouseMove(){q.set("allowMouseEnter",!0),ge.type==="menu"&&q.set("hoverEnabled",!1)},onClick(){q.select("hoverEnabled")&&q.set("hoverEnabled",!1)},onKeyDown(Ie){const ze=q.select("keyboardEventRelay");ze&&!Ie.isPropagationStopped()&&ze(Ie)}},an.floating,Dt.floating,ht.floating),[ge.type,q,an.floating,Dt.floating,ht.floating]),zt=Dt.item??$t;fp(q,{floatingRootContext:De,activeTriggerProps:ft,inactiveTriggerProps:vt,popupProps:gt,itemProps:zt});const un=v.useMemo(()=>({store:q,parent:J,orientation:h,loopFocus:y,allowEscape:N,defaultFloatingId:H,setRenderedFloatingId:L,virtualFocus:M,parentVirtualFocus:G,syncHighlightedItem:xt}),[q,J,h,y,N,H,M,G,xt]),je=typeof a=="function"?a({payload:ve}):a;let ot=x.jsxs(Ap.Provider,{value:un,children:[w&&x.jsx(sp,{handle:w,store:q}),je]});return(ge.type===void 0||ge.type==="context-menu")&&(ot=x.jsx(UR,{externalTree:se,children:ot})),ot});function jO(e){const n=v.useContext(iE);if(n===null)return x.jsx(K_,{...e});const a=n.Root;return x.jsx(iE.Provider,{value:null,children:x.jsx(a,{...n.options,...e})})}const qf=5;function IO(e,n){const a=Y_(n);return e.clientX>=a.left-qf&&e.clientX<=a.right+qf&&e.clientY>=a.top-qf&&e.clientY<=a.bottom+qf}function Y_(e){const n=e.getBoundingClientRect(),a=wn(e);if(Vy)return n;const o=a.getComputedStyle(e,"::before"),s=a.getComputedStyle(e,"::after");if(!(o.content!=="none"||s.content!=="none"))return n;const c=parseFloat(o.width)||0,d=parseFloat(o.height)||0,p=parseFloat(s.width)||0,g=parseFloat(s.height)||0,y=Math.max(n.width,c,p),h=Math.max(n.height,d,g),b=y-n.width,S=h-n.height;return{left:n.left-b/2,right:n.right+b/2,top:n.top-S/2,bottom:n.bottom+S/2}}function G_(e={}){const{highlightItemOnHover:n,highlightedIndex:a,onHighlightedIndexChange:o}=zv(),{ref:s,index:u}=kp(e),c=a===u,d=v.useRef(null),p=Xr(s,d);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(u)},onMouseMove(){const y=d.current;if(!n||!y)return;const h=y.hasAttribute("disabled")||y.ariaDisabled==="true";!c&&!h&&y.focus()}},compositeRef:p,index:u}}function PO(e){const{render:n,className:a,style:o,state:s=$t,props:u=fo,refs:c=fo,metadata:d,stateAttributesMapping:p,tag:g="div",...y}=e,{compositeProps:h,compositeRef:b}=G_({metadata:d});return Mt(g,e,{state:s,ref:[b,...c],props:[h,...u,y],stateAttributesMapping:p})}function Bv(e){if(yn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!_o(e))return Bv(Fo(e))}function $_(e,n){function a(u,c,d){const p=u.currentTarget;cr.flushSync(()=>{e.setOpen(!1,dt(Ti,u.nativeEvent,p))}),fk(p.isConnected?p:n.current,c,d)?.focus()}function o(u){a(u,-1,e.select("positionerElement"))}function s(u){const c=e.select("positionerElement");c&&Ol(u,c)?e.context.beforeContentFocusGuardRef.current?.focus():a(u,1,c)}return{handlePreFocusGuardFocus:o,handleFocusTargetFocus:s}}function Q_(e){const{enabled:n=!0,mouseDownAction:a,open:o}=e,s=v.useRef(!1);return v.useMemo(()=>n?{onMouseDown:u=>{(a==="open"&&!o||a==="close"&&o)&&(s.current=!0,Gt(u.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:u=>{s.current&&(s.current=!1,u.preventBaseUIHandler())}}:$t,[n,a,o])}const X_=XE(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,id:p,openOnHover:g,delay:y=100,closeDelay:h=0,handle:b,payload:S,...w}=n,C=Vo(!0),T=XR(b)??C?.store;if(!T)throw new Error(En(85));const O=Mr(p),M=T.useState("isTriggerActive",O),A=T.useState("floatingRootContext"),N=T.useState("isOpenedByTrigger",O),P=T.useState("triggerControlsId",O),j=v.useRef(null),D=J_(),z=zv(!0),F=ji(),G=v.useMemo(()=>F??new iv,[F]),J=sv(G),K=ki(),{registerTrigger:H,isMountedByThisTrigger:U}=qR(O,j,T,{payload:S,closeDelay:h,parent:D,floatingTreeRoot:G,floatingNodeId:J,floatingParentNodeId:K,keyboardEventRelay:z?.relayKeyboardEvent}),L=D.type==="menubar",$=T.useState("disabled"),Y=c||$||L&&D.context.disabled,{getButtonProps:V,buttonRef:Q}=yo({disabled:Y,native:d});v.useEffect(()=>{!N&&D.type===void 0&&(T.context.allowMouseUpTriggerRef.current=!1)},[T,N,D.type]);const ee=v.useRef(null),q=Un(),se=Be(Ue=>{if(!ee.current)return;q.clear(),T.context.allowMouseUpTriggerRef.current=!1;const be=Ue.target;at(ee.current,be)||at(T.select("positionerElement"),be)||be===ee.current||be!=null&&Bv(be)===T.select("rootId")||IO(Ue,ee.current)||G.events.emit("close",{domEvent:Ue,reason:Xy})});v.useEffect(()=>{const Ue=Gt(ee.current);if(N&&T.select("lastOpenChangeReason")===qn)return Ue.addEventListener("mouseup",se,{once:!0}),()=>{Ue.removeEventListener("mouseup",se)}},[N,se,T]);const k=L&&D.context.hasSubmenuOpen,W=WR(A,{enabled:(g??k)&&!Y&&(!L||k&&!U),handleClose:nC({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:D.type===void 0?y:void 0,delay:{close:h},triggerElementRef:j,externalTree:G,isActiveTrigger:M,isClosing:()=>T.select("transitionStatus")==="ending"}),re=Z_(N,T.select("lastOpenChangeReason")),Ee=HR(A,{enabled:!Y,event:N&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:D.type===void 0?re:!1}),le=ZR(A,{enabled:!Y&&k}),me=Q_({open:N,enabled:L,mouseDownAction:"open"}),ge=v.useMemo(()=>Or(le.reference,Ee.reference),[le.reference,Ee.reference]),ce=T.useState("triggerProps",U),Te=T.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=$_(T,j),Me={disabled:Y,open:N},Le=[ee,a,Q,H,j],Fe=[ge,W??$t,ce,{"aria-haspopup":"menu","aria-controls":P,id:O,onMouseDown:Ue=>{if(T.select("open"))return;q.start(200,()=>{T.context.allowMouseUpTriggerRef.current=!0}),Gt(Ue.currentTarget).addEventListener("mouseup",se,{once:!0})}},Te,L?{role:"menuitem"}:{},me,w,V],Oe=Mt("button",n,{enabled:!L,stateAttributesMapping:ph,state:Me,ref:Le,props:Fe});return L?x.jsx(PO,{tag:"button",render:o,className:s,style:u,state:Me,refs:Le,props:Fe,stateAttributesMapping:ph}):N?x.jsxs(v.Fragment,{children:[x.jsx(Ll,{ref:T.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),x.jsx(v.Fragment,{children:Oe},O),x.jsx(Ll,{ref:T.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):x.jsx(v.Fragment,{children:Oe},O)});function Z_(e,n){const a=Un(),[o,s]=v.useState(!1);return _e(()=>{e&&n===qn?(s(!0),a.start(DR,()=>{s(!1)})):e||(a.clear(),s(!1))},[e,n,a]),o}function J_(){const e=DO();return v.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const W_=v.forwardRef(function(n,a){const{className:o,render:s,orientation:u="horizontal",style:c,...d}=n;return Mt("div",n,{state:{orientation:u},ref:a,props:[{role:"separator","aria-orientation":u},d]})});function LO(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function kh(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function e6(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function zO(e){return e6(e?.[0])}function t6(e){return zO(e)?e.flatMap(n=>n.items):e}function n6(e){if(!Array.isArray(e))return e!=null&&"null"in e;const n=e;if(zO(n)){for(const a of n)for(const o of a.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const a of n)if(a&&a.value==null&&a.label!=null)return!0;return!1}function _O(e,n){if(n&&e!=null)return n(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 kh(e)}function Sl(e,n){return n&&e!=null?n(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?kh(e.value):kh(e)}function UO(e,n,a){function o(){return _O(e,a)}if(a&&e!=null)return a(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(n&&!Array.isArray(n))return(Object.hasOwn(n,e)?n[e]:void 0)??o();if(Array.isArray(n)){const u=t6(n);if(e==null||typeof e!="object"){const c=u.find(d=>d.value===e);return c&&c.label!=null?c.label:o()}if("value"in e){const c=u.find(d=>d&&d.value===e.value);if(c&&c.label!=null)return c.label}}return o()}function r6(e,n,a){return e.reduce((o,s,u)=>(u>0&&o.push(", "),o.push(x.jsx(v.Fragment,{children:UO(s,n,a)},u)),o),[])}function Pp({...e}){return x.jsx(jO,{"data-slot":"dropdown-menu",...e})}function Lp({...e}){return x.jsx(X_,{"data-slot":"dropdown-menu-trigger",...e})}function zp({align:e="start",alignOffset:n=0,side:a="bottom",sideOffset:o=4,className:s,...u}){return x.jsx(EO,{children:x.jsx(OO,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:a,sideOffset:o,children:x.jsx(SO,{"data-slot":"dropdown-menu-content",className:Qe("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",s),...u})})})}function HO({...e}){return x.jsx(n_,{"data-slot":"dropdown-menu-group",...e})}function FO({className:e,inset:n,...a}){return x.jsx(r_,{"data-slot":"dropdown-menu-label","data-inset":n,className:Qe("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...a})}function Vv({className:e,inset:n,variant:a="default",...o}){return x.jsx(bO,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":a,className:Qe("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),...o})}function a6({...e}){return x.jsx(N_,{"data-slot":"dropdown-menu-radio-group",...e})}function o6({className:e,children:n,inset:a,...o}){return x.jsxs(I_,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:Qe("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),...o,children:[x.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:x.jsx(P_,{children:x.jsx(wp,{})})}),n]})}function qv(e){return Mt(e.defaultTagName??"div",e,e)}function BO(e){var n,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(a=BO(e[n]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function i6(){for(var e,n,a=0,o="",s=arguments.length;a<s;a++)(e=arguments[a])&&(n=BO(e))&&(o&&(o+=" "),o+=n);return o}const sE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lE=i6,_p=(e,n)=>a=>{var o;if(n?.variants==null)return lE(e,a?.class,a?.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(g=>{const y=a?.[g],h=u?.[g];if(y===null)return null;const b=sE(y)||sE(h);return s[g][b]}),d=a&&Object.entries(a).reduce((g,y)=>{let[h,b]=y;return b===void 0||(g[h]=b),g},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((g,y)=>{let{class:h,className:b,...S}=y;return Object.entries(S).every(w=>{let[C,E]=w;return Array.isArray(E)?E.includes({...u,...d}[C]):{...u,...d}[C]===E})?[...g,h,b]:g},[]);return lE(e,c,p,a?.class,a?.className)},q0=768;function s6(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const a=window.matchMedia(`(max-width: ${q0-1}px)`),o=()=>{n(window.innerWidth<q0)};return a.addEventListener("change",o),n(window.innerWidth<q0),()=>a.removeEventListener("change",o)},[]),!!e}const l6=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,focusableWhenDisabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{getButtonProps:y,buttonRef:h}=yo({disabled:u,focusableWhenDisabled:c,native:d});return Mt("button",n,{state:{disabled:u},ref:[a,h],props:[g,y]})}),u6=_p("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 It({className:e,variant:n="default",size:a="default",...o}){return x.jsx(l6,{"data-slot":"button",className:Qe(u6({variant:n,size:a,className:e})),...o})}const c6="data-valid",d6="data-invalid",f6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},h6={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},p6={disabled:!1,...h6},Yl={valid(e){return e===null?null:e?{[c6]:""}:{[d6]:""}}},g6={invalid:void 0,name:void 0,validityData:{state:f6,errors:[],error:"",value:"",initialValue:null},setValidityData:Sn,disabled:void 0,setTouched:Sn,setDirty:Sn,setFilled:Sn,setFocused:Sn,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:p6,registerFieldControl:Sn,validation:{getValidationProps:(e,n=$t)=>n,inputRef:{current:null},registeredInputs:new Map,registerInput:Sn,getInputControl:()=>null,commit:async()=>{},change:Sn}},m6=v.createContext(g6);function qo(e=!0){const n=v.useContext(m6);if(n.setValidityData===Sn&&!e)throw new Error(En(28));return n}const y6=v.createContext(void 0);function v6(e=!1){const n=v.useContext(y6);if(!n&&!e)throw new Error(En(86));return n}const b6=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Sn,validationMode:"onSubmit",submitCountRef:{current:0}});function Gc(){return v.useContext(b6)}const x6=v.createContext({controlId:void 0,registerControlId:Sn,resetControlId:Sn,labelId:void 0,setLabelId:Sn,messageIds:[],setMessageIds:Sn,getDescriptionProps:e=>e});function Ms(){return v.useContext(x6)}function Kv(e,n,a,o=!0,s,u){const[c,d]=v.useState(),p=Mr(s?`${s}-label`:void 0),g=!!u?.trim(),h=e??(g?void 0:n)??c;return _e(()=>{const b=e||n||g||!o?void 0:S6(a.current,p);c!==b&&d(b)}),h}function S6(e,n){const a=w6(e);if(a)return!a.id&&n&&(a.id=n),a.id||void 0}function w6(e){if(!e)return;const n=e.parentElement;if(n&&n.tagName==="LABEL")return n;const a=e.id;if(a){const s=e.nextElementSibling;if(s&&s.htmlFor===a)return s}const o=e.labels;return o&&o[0]}function Gl(e={}){const{id:n,enabled:a=!0}=e,{controlId:o,registerControlId:s,resetControlId:u}=Ms(),c=Mr(),d=er(()=>Symbol()),p=v.useRef(!1),g=v.useRef(!1),y=Be(()=>{!p.current||s===Sn||(p.current=!1,s(d.current,void 0))});return _e(()=>{if(!a||s===Sn){y();return}let h;if(n!==void 0)g.current=!0,h=n;else if(g.current)h=c;else{u();return}if(h===void 0){y();return}p.current=!0,s(d.current,h)},[n,a,s,u,c,d,y]),_e(()=>y,[y]),(a?o:void 0)??n??c}function E6(e,n){return e.matches(":disabled")?!1:!n||e.form===n?!0:e.form===null&&!e.hasAttribute("form")}const R6=v.createContext({disabled:!1});function VO(){return v.useContext(R6)}function $c(e,n,a){const{setFocused:o,focusOwnerRef:s}=qo(),u=Be(c=>{(c?!e:s.current===u)&&(s.current=c&&u,o(c))});return _e(()=>{const c=n.current;return c?.getRootNode()?.activeElement===c&&u(!0),()=>u(!1)},[e,n,u]),u}function Qc(e,n,a,o,s=!0,u){const{registerFieldControl:c}=qo(),d=er(()=>Symbol());_e(()=>{const p=d.current;if(!s){c(p,void 0);return}c(p,{controlRef:e,getValue:o,id:n,name:u,value:a})},[e,s,o,n,u,c,d,a]),_e(()=>{const p=d.current;return()=>{c(p,void 0)}},[c,d])}const C6=v.forwardRef(function(n,a){const{render:o,className:s,id:u,name:c,value:d,disabled:p=!1,onValueChange:g,defaultValue:y,autoFocus:h=!1,style:b,...S}=n,{state:w,name:C,disabled:E,setTouched:T,setDirty:O,validityData:M,setFilled:A,validationMode:N,validation:P}=qo(),{clearErrors:j,elementRef:D,submitCountRef:z}=Gc(),F=E||p,G=C??c,J={...w,disabled:F},{labelId:K}=Ms(),H=Gl({id:u}),U=d!==void 0,L=d==null?void 0:String(d),$=Be(()=>P.inputRef.current?.value);Qc(P.inputRef,H,L,$,!F,c),_e(()=>{const q=L??P.inputRef.current?.value;q!==void 0&&A(q!=="")},[L,y,P.inputRef,A]),Kl(L,()=>{L!==void 0&&(j(G),O(L!==(M.initialValue??"")),P.change(L))});const Y=v.useRef(null),V=$c(F,Y),Q=Un();return Mt("input",n,{ref:[a,Y],state:J,props:[{id:H,disabled:F,name:G,ref:P.inputRef,"aria-labelledby":K,autoFocus:h,...U?{value:d}:{defaultValue:y},onChange(q){const se=q.currentTarget.value,k=dt(Hr,q.nativeEvent);g?.(se,k),!U&&(O(se!==(M.initialValue??"")),A(se!==""),!q.nativeEvent.defaultPrevented&&!k.isCanceled&&(j(G),P.change(se)))},onFocus(){V(!0)},onBlur(q){if(T(!0),V(!1),N==="onBlur"){const se=q.currentTarget.value;P.commit(se),U&&queueMicrotask(()=>{const k=P.inputRef.current?.value;k!==void 0&&k!==se&&k!==(M.initialValue??"")&&P.commit(k)})}},onKeyDown(q){if(q.currentTarget.tagName==="INPUT"&&q.key==="Enter"){T(!0);const se=q.currentTarget.value,k=q.currentTarget.form;if(k&&k===D.current&&!q.defaultPrevented){const B=q.currentTarget,W=z.current;Q.start(0,()=>{z.current===W&&P.commit(B.value)})}else P.commit(se)}}},S,q=>P.getValidationProps(F,q)],stateAttributesMapping:Yl})}),T6=v.forwardRef(function(n,a){return x.jsx(C6,{ref:a,...n})});function Yv({className:e,type:n,...a}){return x.jsx(T6,{type:n,"data-slot":"input",className:Qe("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),...a})}function qO({className:e,orientation:n="horizontal",...a}){return x.jsx(W_,{"data-slot":"separator",orientation:n,className:Qe("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...a})}const KO=v.createContext(void 0);function As(e){const n=v.useContext(KO);if(!e&&n===void 0)throw new Error(En(27));return n}const YO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,forceRender:c=!1,...d}=n,p=As(),g=p.useState("open"),y=p.useState("nested"),h=p.useState("mounted"),b=p.useState("transitionStatus");return Mt("div",n,{state:{open:g,transitionStatus:b},ref:[p.context.backdropRef,a],stateAttributesMapping:Jh,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!y})}),Up=v.forwardRef(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,...p}=n,g=As(),y=g.useState("open"),{getButtonProps:h,buttonRef:b}=yo({disabled:c,native:d}),S={disabled:c};function w(C){y&&g.setOpen(!1,dt(aR,C.nativeEvent))}return Mt("button",n,{state:S,ref:[a,b],props:[{onClick:w},p,h]})}),GO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=As(),g=Mr(c);return p.useSyncedValueWithCleanup("descriptionElementId",g),Mt("p",n,{ref:a,props:[{id:g},d]})}),$O=v.createContext(void 0);function O6(){const e=v.useContext($O);if(e===void 0)throw new Error(En(26));return e}const M6="--nested-dialogs",A6="data-nested-dialog-open",D6={...Ac,...po,nestedDialogOpen(e){return e?{[A6]:""}:null}},QO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,initialFocus:d,...p}=n,g=As(),y=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),b=g.useState("floatingRootContext"),S=g.useState("popupProps"),w=g.useState("modal"),C=g.useState("mounted"),E=g.useState("nested"),T=g.useState("nestedOpenDialogCount"),O=g.useState("open"),M=g.useState("openMethod"),A=g.useState("titleElementId"),N=g.useState("transitionStatus"),P=g.useState("role"),j=b.useState("floatingId");O6(),ka({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const D=d===void 0?VR(g.context.popupRef):d,z=T>0,F=g.useStateSetter("popupElement"),J=Mt("div",n,{state:{open:O,nested:E,transitionStatus:N,nestedDialogOpen:z},props:[S,{id:j,"aria-labelledby":A,"aria-describedby":y,role:P,...Pc,hidden:!C,onKeyDown(K){Yc.has(K.key)&&K.stopPropagation()},style:{[M6]:T}},p],ref:[a,g.context.popupRef,F],stateAttributesMapping:D6});return x.jsx(op,{context:b,openInteractionType:M,disabled:!C,closeOnFocusOut:!h,initialFocus:D,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:J})}),XO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,u=As(),c=u.useState("mounted"),d=u.useState("modal"),p=u.useState("open");return c||o?x.jsx($O.Provider,{value:o,children:x.jsxs(ap,{ref:a,...s,children:[c&&d===!0&&x.jsx(jp,{ref:u.context.internalBackdropRef,inert:xp(!p)}),n.children]})}):null});function N6({store:e,parentContext:n,isDrawer:a}){const o=e.useState("open"),s=e.useState("mounted"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[g,y]=v.useState(0),[h,b]=v.useState(0),S=g===0,w=Ic(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="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 E=tr(C);if(S&&!u){if(c){const T=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return T||O?T===E||O===E||at(E,d)&&!E?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return TO(o&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(C,E)=>{!e.select("open")&&!e.select("mounted")||(y(C),b(E))}),_e(()=>{!o&&!s&&(y(0),b(0))},[o,s]),_e(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(g+1,h+(a?1:0)),()=>{n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(0,0)}),[a,o,g,h,n]),fp(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const k6={...Lo,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 j6 extends Bl{constructor(n,a,o){const s=new Lc,u=I6(n,s,a,o);super(u,P6(s),k6)}setOpen=(n,a)=>{a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(n,a),!a.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,a),this.update(lp(this.state,n,a.trigger)))}}function I6(e,n,a,o=!1){return{...pp(n,a,o),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function P6(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function L6(e,n){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:g,handle:y,triggerId:h,defaultTriggerId:b=null}=n,S=e==="drawer",w=p,C=d,E="dialog",T=As(!0),O=T!=null,M={modal:w,disablePointerDismissal:C,nested:O,role:E},A=uv((F,G)=>new j6({open:s,openProp:o,activeTriggerId:b,triggerIdProp:h,...M},F,G),!0);A.useControlledProp("openProp",o),A.useControlledProp("triggerIdProp",h),A.useSyncedValues(M),A.useContextCallback("onOpenChange",u),A.useContextCallback("onOpenChangeComplete",c);const N=A.useState("open"),P=A.useState("mounted"),j=A.useState("payload");KR(A,N),cp(A);const{forceUnmount:D}=dp(N,A);v.useImperativeHandle(g,()=>({unmount:D,close:()=>A.setOpen(!1,dt(kc))}),[D,A]);const z=N||P||y!=null;return x.jsxs(KO.Provider,{value:A,children:[y&&x.jsx(sp,{handle:y,store:A}),z&&x.jsx(N6,{store:A,parentContext:T?.context,isDrawer:S}),typeof a=="function"?a({payload:j}):a]})}const ZO=Tc(function(n){return L6("dialog",n)}),JO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=As(),g=Mr(c);return p.useSyncedValueWithCleanup("titleElementId",g),Mt("h2",n,{ref:a,props:[{id:g},d]})}),Et=e=>typeof e=="string",Zu=()=>{let e,n;const a=new Promise((o,s)=>{e=o,n=s});return a.resolve=e,a.reject=n,a},Kf=e=>e==null?"":String(e),z6=(e,n,a)=>{e.forEach(o=>{n[o]&&(a[o]=n[o])})},_6=/###/g,uE=e=>e&&e.includes("###")?e.replace(_6,"."):e,cE=e=>!e||Et(e),sc=(e,n,a)=>{const o=Et(n)?n.split("."):n;let s=0;for(;s<o.length-1;){if(cE(e))return{};const u=uE(o[s]);!e[u]&&a&&(e[u]=new a),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return cE(e)?{}:{obj:e,k:uE(o[s])}},dE=(e,n,a)=>{const{obj:o,k:s}=sc(e,n,Object);if(o!==void 0||n.length===1){o[s]=a;return}let u=n[n.length-1],c=n.slice(0,n.length-1),d=sc(e,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=sc(e,c,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=a},U6=(e,n,a,o)=>{const{obj:s,k:u}=sc(e,n,Object);s[u]=s[u]||[],s[u].push(a)},jh=(e,n)=>{const{obj:a,k:o}=sc(e,n);if(a&&Object.prototype.hasOwnProperty.call(a,o))return a[o]},H6=(e,n,a)=>{const o=jh(e,a);return o!==void 0?o:jh(n,a)},WO=(e,n,a)=>{for(const o in n)o!=="__proto__"&&o!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,o)?Et(e[o])||e[o]instanceof String||Et(n[o])||n[o]instanceof String?a&&(e[o]=n[o]):WO(e[o],n[o],a):e[o]=n[o]);return e},Io=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),F6={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},B6=e=>Et(e)?e.replace(/[&<>"'\/]/g,n=>F6[n]):e;class V6{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const a=this.regExpMap.get(n);if(a!==void 0)return a;const o=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,o),this.regExpQueue.push(n),o}}const q6=[" ",",","?","!",";"],K6=new V6(20),Y6=(e,n,a)=>{n=n||"",a=a||"";const o=q6.filter(c=>!n.includes(c)&&!a.includes(c));if(o.length===0)return!0;const s=K6.getRegExp(`(${o.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!s.test(e);if(!u){const c=e.indexOf(a);c>0&&!s.test(e.substring(0,c))&&(u=!0)}return u},My=(e,n,a=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const o=n.split(a);let s=e;for(let u=0;u<o.length;){if(!s||typeof s!="object")return;let c,d="";for(let p=u;p<o.length;++p)if(p!==u&&(d+=a),d+=o[p],c=s[d],(typeof c=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(s,d)&&(c=void 0),c!==void 0){if(["string","number","boolean"].includes(typeof c)&&p<o.length-1)continue;u+=p-u+1;break}s=c}return s},Hl=e=>e?.replace(/_/g,"-"),G6={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class Ih{constructor(n,a={}){this.init(n,a)}init(n,a={}){this.prefix=a.prefix||"i18next:",this.logger=n||G6,this.options=a,this.debug=a.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,a,o,s){return s&&!this.debug?null:(n=n.map(u=>Et(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),Et(n[0])&&(n[0]=`${o}${this.prefix} ${n[0]}`),this.logger[a](n))}create(n){return new Ih(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Ih(this.logger,n)}}var lo=new Ih;class Hp{constructor(){this.observers={}}on(n,a){return n.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const s=this.observers[o].get(a)||0;this.observers[o].set(a,s+1)}),this}off(n,a){if(this.observers[n]){if(!a){delete this.observers[n];return}this.observers[n].delete(a)}}once(n,a){const o=(...s)=>{a(...s),this.off(n,o)};return this.on(n,o),this}emit(n,...a){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(n,...a)})}}const fE=new WeakSet;class hE extends Hp{constructor(n,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.includes(n)||this.options.ns.push(n)}removeNamespaces(n){const a=this.options.ns.indexOf(n);a>-1&&this.options.ns.splice(a,1)}getResource(n,a,o,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.includes(".")?d=n.split("."):(d=[n,a],o&&(Array.isArray(o)?d.push(...o):Et(o)&&u?d.push(...o.split(u)):d.push(o)));const p=jh(this.data,d);return p==null&&!a&&!o&&n.includes(".")&&(n=d[0],a=d[1],o=d.slice(2).join(".")),p!=null||!c||!Et(o)?p:My(this.data?.[n]?.[a],o,u)}addResource(n,a,o,s,u={silent:!1}){const c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[n,a];o&&(d=d.concat(c?o.split(c):o)),n.includes(".")&&(d=n.split("."),s=a,a=d[1]),this.addNamespaces(a),dE(this.data,d,s),u.silent||this.emit("added",n,a,o,s)}addResources(n,a,o,s={silent:!1}){for(const u in o)(Et(o[u])||Array.isArray(o[u]))&&this.addResource(n,a,u,o[u],{silent:!0});s.silent||this.emit("added",n,a,o)}addResourceBundle(n,a,o,s,u,c={silent:!1,skipCopy:!1}){let d=[n,a];n.includes(".")&&(d=n.split("."),s=o,o=a,a=d[1]),this.addNamespaces(a);let p=jh(this.data,d)||{};c.skipCopy||(o=JSON.parse(JSON.stringify(o))),s?WO(p,o,u):p={...p,...o},dE(this.data,d,p),c.silent||this.emit("added",n,a,o)}removeResourceBundle(n,a){this.hasResourceBundle(n,a)&&delete this.data[n][a],this.removeNamespaces(a),this.emit("removed",n,a)}hasResourceBundle(n,a){return this.getResource(n,a)!==void 0}getResourceBundle(n,a){return a||(a=this.options.defaultNS),this.getResource(n,a)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const a=this.getDataByLanguage(n);return!!(a&&Object.keys(a)||[]).find(s=>{const u=a[s];return fE.has(u)?!0:!u||Object.keys(u).length===0?!1:(typeof u=="object"&&fE.add(u),!0)})}toJSON(){return this.data}}var eM={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,a,o,s){return e.forEach(u=>{n=this.processors[u]?.process(n,a,o,s)??n}),n}};const tM=Symbol("i18next/PATH_KEY");function $6(){const e=[],n=Object.create(null);let a;return n.get=(o,s)=>(a?.revoke?.(),s===tM?e:(e.push(s),a=Proxy.revocable(o,n),a.proxy)),Proxy.revocable(Object.create(null),n).proxy}function ms(e,n){const{[tM]:a}=e($6()),o=n?.keySeparator??".",s=n?.nsSeparator??":",u=n?.enableSelector==="strict";if(a.length>1&&s){const c=n?.ns,d=u?Array.isArray(c)?c:c?[c]:null:Array.isArray(c)?c:null;if(d&&(u?d:d.length>1?d.slice(1):[]).includes(a[0]))return`${a[0]}${s}${a.slice(1).join(o)}`}return a.join(o)}const K0=e=>!Et(e)&&typeof e!="boolean"&&typeof e!="number";class Ph extends Hp{constructor(n,a={}){super(),z6(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lo.create("translator"),this.checkedLoadedFor={}}changeLanguage(n){n&&(this.language=n)}exists(n,a={interpolation:{}}){const o={...a};if(n==null)return!1;const s=this.resolve(n,o);if(s?.res===void 0)return!1;const u=K0(s.res);return!(o.returnObjects===!1&&u)}extractFromKey(n,a){let o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=a.ns||this.options.defaultNS||[];const c=o&&n.includes(o),d=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!Y6(n,o,s);if(c&&!d){const p=n.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:n,namespaces:Et(u)?[u]:u};const g=n.split(o);(o!==s||o===s&&this.options.ns.includes(g[0]))&&(u=g.shift()),n=g.join(s)}return{key:n,namespaces:Et(u)?[u]:u}}translate(n,a,o){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";typeof n=="function"&&(n=ms(n,{...this.options,...s})),Array.isArray(n)||(n=[String(n)]),n=n.map(K=>typeof K=="function"?ms(K,{...this.options,...s}):String(K));const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(n[n.length-1],s),g=p[p.length-1];let y=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const h=s.lng||this.language,b=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return b?u?{res:`${g}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${y}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:d;const S=this.resolve(n,s);let w=S?.res;const C=S?.usedKey||d,E=S?.exactUsedKey||d,T=["[object Number]","[object Function]","[object RegExp]"],O=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,A=s.count!==void 0&&!Et(s.count),N=Ph.hasDefaultValue(s),P=A?this.pluralResolver.getSuffix(h,s.count,s):"",j=s.ordinal&&A?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",D=A&&!s.ordinal&&s.count===0,z=D&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${P}`]||s[`defaultValue${j}`]||s.defaultValue;let F=w;M&&!w&&N&&(F=z);const G=K0(F),J=Object.prototype.toString.apply(F);if(M&&F&&G&&!T.includes(J)&&!(Et(O)&&Array.isArray(F))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,F,{...s,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(S.res=K,S.usedParams=this.getUsedParamsDetails(s),S):K}if(c){const K=Array.isArray(F),H=K?[]:{},U=K?E:C;for(const L in F)if(Object.prototype.hasOwnProperty.call(F,L)){const $=`${U}${c}${L}`;N&&!w?H[L]=this.translate($,{...s,defaultValue:K0(z)?z[L]:void 0,joinArrays:!1,ns:p}):H[L]=this.translate($,{...s,joinArrays:!1,ns:p}),H[L]===$&&(H[L]=F[L])}w=H}}else if(M&&Et(O)&&Array.isArray(w))w=w.join(O),w&&(w=this.extendTranslation(w,n,s,S,o));else{let K=!1,H=!1;!this.isValidLookup(w)&&N&&(K=!0,w=z),this.isValidLookup(w)||(H=!0,w=d);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:w,$=N&&z!==w&&this.options.updateMissing;if(H||K||$){if(this.logger.log($?"updateKey":"missingKey",h,g,A&&!$?`${d}${this.pluralResolver.getSuffix(h,s.count,s)}`:d,$?z:w),c){const ee=this.resolve(d,{...s,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 Y=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let ee=0;ee<V.length;ee++)Y.push(V[ee]);else this.options.saveMissingTo==="all"?Y=this.languageUtils.toResolveHierarchy(s.lng||this.language):Y.push(s.lng||this.language);const Q=(ee,q,se)=>{const k=N&&se!==w?se:L;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,q,k,$,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,q,k,$,s),this.emit("missingKey",ee,g,q,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?Y.forEach(ee=>{const q=this.pluralResolver.getSuffixes(ee,s);D&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(se=>{Q([ee],d+se,s[`defaultValue${se}`]||z)})}):Q(Y,d,z))}w=this.extendTranslation(w,n,s,S,o),H&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${y}${d}`),(H||K)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${y}${d}`:d,K?w:void 0,s))}return u?(S.res=w,S.usedParams=this.getUsedParamsDetails(s),S):w}extendTranslation(n,a,o,s,u){if(this.i18nFormat?.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const p=Et(n)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(p){const h=n.match(this.interpolator.nestingRegexp);g=h&&h.length}let y=o.replace&&!Et(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),n=this.interpolator.interpolate(n,y,o.lng||this.language||s.usedLng,o),p){const h=n.match(this.interpolator.nestingRegexp),b=h&&h.length;g<b&&(o.nest=!1)}!o.lng&&s&&s.res&&(o.lng=this.language||s.usedLng),o.nest!==!1&&(n=this.interpolator.nest(n,(...h)=>u?.[0]===h[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${a[0]}`),null):this.translate(...h,a),o)),o.interpolation&&this.interpolator.reset()}const c=o.postProcess||this.options.postProcess,d=Et(c)?[c]:c;return n!=null&&d?.length&&o.applyPostProcessor!==!1&&(n=eM.handle(d,n,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),n}resolve(n,a={}){let o,s,u,c,d;return Et(n)&&(n=[n]),Array.isArray(n)&&(n=n.map(p=>typeof p=="function"?ms(p,{...this.options,...a}):p)),n.forEach(p=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(p,a),y=g.key;s=y;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const b=a.count!==void 0&&!Et(a.count),S=b&&!a.ordinal&&a.count===0,w=a.context!==void 0&&(Et(a.context)||typeof a.context=="number")&&a.context!=="",C=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);h.forEach(E=>{this.isValidLookup(o)||(d=E,!this.checkedLoadedFor[`${C[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${E}`]=!0,this.logger.warn(`key "${s}" 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(T=>{if(this.isValidLookup(o))return;c=T;const O=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,y,T,E,a);else{let A;b&&(A=this.pluralResolver.getSuffix(T,a.count,a));const N=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(a.ordinal&&A.startsWith(P)&&O.push(y+A.replace(P,this.options.pluralSeparator)),O.push(y+A),S&&O.push(y+N)),w){const j=`${y}${this.options.contextSeparator||"_"}${a.context}`;O.push(j),b&&(a.ordinal&&A.startsWith(P)&&O.push(j+A.replace(P,this.options.pluralSeparator)),O.push(j+A),S&&O.push(j+N))}}let M;for(;M=O.pop();)this.isValidLookup(o)||(u=M,o=this.getResource(T,E,M,a))}))})}),{res:o,usedKey:s,exactUsedKey:u,usedLng:c,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,a,o,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(n,a,o,s):this.resourceStore.getResource(n,a,o,s)}getUsedParamsDetails(n={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=n.replace&&!Et(n.replace);let s=o?n.replace:n;if(o&&typeof n.count<"u"&&(s={...s,count:n.count}),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!o){s={...s};for(const u of a)delete s[u]}return s}static hasDefaultValue(n){const a="defaultValue";for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&o.startsWith(a)&&n[o]!==void 0)return!0;return!1}}class pE{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lo.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(n){if(n=Hl(n),!n||!n.includes("-"))return null;const a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(n){if(n=Hl(n),!n||!n.includes("-"))return n;const a=n.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(n){if(Et(n)&&n.includes("-")){let a;try{a=Intl.getCanonicalLocales(n)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(n)}getBestMatchFromCodes(n){if(!n)return null;let a;return n.forEach(o=>{if(a)return;const s=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&n.forEach(o=>{if(a)return;const s=this.getScriptPartFromCode(o);if(this.isSupportedCode(s))return a=s;const u=this.getLanguagePartFromCode(o);if(this.isSupportedCode(u))return a=u;a=this.options.supportedLngs.find(c=>c===u?!0:!c.includes("-")&&!u.includes("-")?!1:!!(c.includes("-")&&!u.includes("-")&&c.slice(0,c.indexOf("-"))===u))}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),Et(n)&&(n=[n]),Array.isArray(n))return n;if(!a)return n.default||[];let o=n[a];return o||(o=n[this.getScriptPartFromCode(a)]),o||(o=n[this.formatLanguageCode(a)]),o||(o=n[this.getLanguagePartFromCode(a)]),o||(o=n.default),o||[]}toResolveHierarchy(n,a){const o=this.options.fallbackLng,s=Array.isArray(o)?o.join("|"):o;s!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=s);const u=a===void 0||a===!1||Et(a),c=a===void 0&&typeof this.options.fallbackLng=="function",d=Et(n)&&u&&!c;let p=null;if(d){let b;a===void 0?b="undefined":a===!1?b="boolean:false":b=`string:${a}`,p=`${n.length}:${n}|${b}`}if(p!==null){const b=this.resolveHierarchyCache[p];if(b!==void 0)return b.slice()}const g=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],n),y=[],h=b=>{b&&(this.isSupportedCode(b)?y.push(b):this.logger.warn(`rejecting language code not found in supportedLngs: ${b}`))};return Et(n)&&(n.includes("-")||n.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(n))):Et(n)&&h(this.formatLanguageCode(n)),g.forEach(b=>{const S=this.formatLanguageCode(b);y.includes(S)||h(S)}),p!==null?(this.resolveHierarchyCache[p]=y,y.slice()):y}}const gE={zero:0,one:1,two:2,few:3,many:4,other:5},mE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Q6{constructor(n,a={}){this.languageUtils=n,this.options=a,this.logger=lo.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,a={}){const o=Hl(n==="dev"?"en":n),s=a.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:o,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let c;try{c=new Intl.PluralRules(o,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),mE;if(!n.match(/-|_/))return mE;const p=this.languageUtils.getLanguagePartFromCode(n);c=this.getRule(p,a)}return this.pluralRulesCache[u]=c,c}needsPlural(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(n,a,o={}){return this.getSuffixes(n,o).map(s=>`${a}${s}`)}getSuffixes(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?o.resolvedOptions().pluralCategories.sort((s,u)=>gE[s]-gE[u]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(n,a,o={}){const s=this.getRule(n,o);return s?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",a,o))}}const yE=(e,n,a,o=".",s=!0)=>{let u=H6(e,n,a);return!u&&s&&Et(a)&&(u=My(e,a,o),u===void 0&&(u=My(n,a,o))),u};class vE{constructor(n={}){this.logger=lo.create("interpolator"),this.options=n,this.format=n?.interpolation?.format||(a=>a),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:a,escapeValue:o,useRawValueToEscape:s,prefix:u,prefixEscaped:c,suffix:d,suffixEscaped:p,formatSeparator:g,unescapeSuffix:y,unescapePrefix:h,nestingPrefix:b,nestingPrefixEscaped:S,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:E,maxReplaces:T,alwaysFormat:O}=n.interpolation;this.escape=a!==void 0?a:B6,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?Io(u):c||"{{",this.suffix=d?Io(d):p||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":h?Io(h):"-",this.unescapeSuffix=this.unescapePrefix?"":y?Io(y):"",this.nestingPrefix=b?Io(b):S||Io("$t("),this.nestingSuffix=w?Io(w):C||Io(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=T||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(a,o)=>a?.source===o?(a.lastIndex=0,a):new RegExp(o,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,a,o,s){let u,c,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const M=yE(a,p,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,o,{...s,...a,interpolationkey:C}):M}const E=C.split(this.formatSeparator),T=E.shift().trim(),O=E.join(this.formatSeparator).trim();return this.format(yE(a,p,T,this.options.keySeparator,this.options.ignoreJSONStructure),O,o,{...s,...a,interpolationkey:T})};this.resetRegExp(),!this.escapeValue&&typeof n=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(n)&&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=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],S=[];let w=0;return b.forEach(C=>{for(d=0;u=C.regex.exec(n);){const E=u.index-w,T=S.find(([A,N])=>E>=A&&E<N);if(T){C.regex.lastIndex=T[1]+w;continue}const O=u[1].trim();if(c=g(O),c===void 0)if(typeof y=="function"){const A=y(n,u,s);c=Et(A)?A:""}else if(s&&Object.prototype.hasOwnProperty.call(s,O))c="";else if(h){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${n}`),c="";else!Et(c)&&!this.useRawValueToEscape&&(c=Kf(c));const M=Kf(C.safeValue(c));if(n=n.slice(0,u.index)+M+n.slice(u.index+u[0].length),h?(C.regex===this.regexpUnescape?S.push([u.index,u.index+M.length]):w+=M.length-u[0].length,C.regex.lastIndex+=M.length,C.regex.lastIndex-=u[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,a,o={}){let s,u,c;const d=(h,b)=>{const S=this.nestingOptionsSeparator;if(!h.includes(S))return h;const w=h.split(new RegExp(`${Io(S)}[ ]*{`));let C=`{${w[1]}`;h=w[0],C=this.interpolate(C,c);const E=C.match(/'/g),T=C.match(/"/g);((E?.length??0)%2===0&&!T||(T?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),b&&(c={...b,...c})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${S}${C}`}return c.defaultValue&&c.defaultValue.includes(this.prefix)&&delete c.defaultValue,h},p=new RegExp(this.nestingRegexp);let g="",y=0;for(;s=p.exec(n);){let h=[];c={...o},c=c.replace&&!Et(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const b=/{.*}/s.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(b!==-1&&(h=s[1].slice(b).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),s[1]=s[1].slice(0,b)),u=a(d.call(this,s[1].trim(),c),c),u&&s[0]===n&&!Et(u))return u;Et(u)||(u=Kf(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${n}`),u=""),h.length&&(u=h.reduce((S,w)=>this.format(S,w,o.lng,{...o,interpolationkey:s[1].trim()}),u.trim())),g+=n.slice(y,s.index)+Kf(u),y=p.lastIndex,this.regexp.lastIndex=0}return y?g+n.slice(y):n}}const X6=e=>{let n=e.toLowerCase().trim();const a={};if(e.includes("(")){const o=e.split("(");n=o[0].toLowerCase().trim();const s=o[1].slice(0,-1);n==="currency"&&!s.includes(":")?a.currency||(a.currency=s.trim()):n==="relativetime"&&!s.includes(":")?a.range||(a.range=s.trim()):s.split(";").forEach(c=>{if(c){const[d,...p]=c.split(":"),g=p.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();a[y]||(a[y]=g),g==="false"&&(a[y]=!1),g==="true"&&(a[y]=!0),isNaN(g)||(a[y]=parseInt(g,10))}})}return{formatName:n,formatOptions:a}},bE=e=>{const n={};return(a,o,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});let c;try{c=o+JSON.stringify(u)}catch{return e(Hl(o),s)(a)}let d=n[c];return d||(d=e(Hl(o),s),n[c]=d),d(a)}},Z6=e=>(n,a,o)=>e(Hl(a),o)(n);class J6{constructor(n={}){this.logger=lo.create("formatter"),this.options=n,this.init(n)}init(n,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const o=a.cacheInBuiltFormats?bE:Z6;this.formats={number:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u});return d=>c.format(d)}),currency:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u,style:"currency"});return d=>c.format(d)}),datetime:o((s,u)=>{const c=new Intl.DateTimeFormat(s,{...u});return d=>c.format(d)}),relativetime:o((s,u)=>{const c=new Intl.RelativeTimeFormat(s,{...u});return d=>c.format(d,u.range||"day")}),list:o((s,u)=>{const c=new Intl.ListFormat(s,{...u});return d=>c.format(d)})}}add(n,a){this.formats[n.toLowerCase().trim()]=a}addCached(n,a){this.formats[n.toLowerCase().trim()]=bE(a)}format(n,a,o,s={}){if(!a||n==null)return n;const u=a.split(this.formatSeparator),c=[];for(let p=0;p<u.length;p++){let g=u[p];for(;g.indexOf("(")>-1&&!g.includes(")")&&p+1<u.length;)g=`${g}${this.formatSeparator}${u[++p]}`;c.push(g)}return c.reduce((p,g)=>{const{formatName:y,formatOptions:h}=X6(g);if(this.formats[y]){let b=p;try{const S=s?.formatParams?.[s.interpolationkey]||{},w=S.locale||S.lng||s.locale||s.lng||o;b=this.formats[y](p,w,{...h,...s,...S})}catch(S){this.logger.warn(S)}return b}else this.logger.warn(`there was no format function for ${y}`);return p},n)}}const W6=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class eU extends Hp{constructor(n,a,o,s={}){super(),this.backend=n,this.store=a,this.services=o,this.languageUtils=o.languageUtils,this.options=s,this.logger=lo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,s.backend,s)}queueLoad(n,a,o,s){const u={},c={},d={},p={};return n.forEach(g=>{let y=!0;a.forEach(h=>{const b=`${g}|${h}`;!o.reload&&this.store.hasResourceBundle(g,h)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?c[b]===void 0&&(c[b]=!0):(this.state[b]=1,y=!1,c[b]===void 0&&(c[b]=!0),u[b]===void 0&&(u[b]=!0),p[h]===void 0&&(p[h]=!0)))}),y||(d[g]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(n,a,o){const s=n.split("|"),u=s[0],c=s[1];a&&this.emit("failedLoading",u,c,a),!a&&o&&this.store.addResourceBundle(u,c,o,void 0,void 0,{skipCopy:!0}),this.state[n]=a?-1:2,a&&o&&(this.state[n]=0);const d={};this.queue.forEach(p=>{U6(p.loaded,[u],c),W6(p,n),a&&p.errors.push(a),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(g=>{d[g]||(d[g]={});const y=p.loaded[g];y.length&&y.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(n,a,o,s=0,u=this.retryTimeout,c){if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:a,fcName:o,tried:s,wait:u,callback:c});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&&s<this.maxRetries){setTimeout(()=>{this.read(n,a,o,s+1,u*2,c)},u);return}c(g,y)},p=this.backend[o].bind(this.backend);if(p.length===2){try{const g=p(n,a);g&&typeof g.then=="function"?g.then(y=>d(null,y)).catch(d):d(null,g)}catch(g){d(g)}return}return p(n,a,d)}prepareLoading(n,a,o={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Et(n)&&(n=this.languageUtils.toResolveHierarchy(n)),Et(a)&&(a=[a]);const u=this.queueLoad(n,a,o,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(c=>{this.loadOne(c)})}load(n,a,o){this.prepareLoading(n,a,{},o)}reload(n,a,o){this.prepareLoading(n,a,{reload:!0},o)}loadOne(n,a=""){const o=n.split("|"),s=o[0],u=o[1];this.read(s,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${a}loading namespace ${u} for language ${s} failed`,c),!c&&d&&this.logger.log(`${a}loaded namespace ${u} for language ${s}`,d),this.loaded(n,c,d)})}saveMissing(n,a,o,s,u,c={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${o}" as the namespace "${a}" 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(!(o==null||o==="")){if(this.backend?.create){const p={...c,isUpdate:u},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(n,a,o,s,p):y=g(n,a,o,s),y&&typeof y.then=="function"?y.then(h=>d(null,h)).catch(d):d(null,y)}catch(y){d(y)}else g(n,a,o,s,d,p)}!n||!n[0]||this.store.addResource(n[0],a,o,s)}}}const Y0=()=>({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 n={};if(typeof e[1]=="object"&&(n=e[1]),Et(e[1])&&(n.defaultValue=e[1]),Et(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(o=>{n[o]=a[o]})}return n},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),xE=e=>(Et(e.ns)&&(e.ns=[e.ns]),Et(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Et(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Yf=()=>{},tU=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class lc extends Hp{constructor(n={},a){if(super(),this.options=xE(n),this.services={},this.logger=lo,this.modules={external:[]},tU(this),a&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,a),this;setTimeout(()=>{this.init(n,a)},0)}}init(n={},a){this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),n.defaultNS==null&&n.ns&&(Et(n.ns)?n.defaultNS=n.ns:n.ns.includes("translation")||(n.defaultNS=n.ns[0]));const o=Y0();this.options={...o,...this.options,...xE(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?lo.init(s(this.modules.logger),this.options):lo.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=J6;const y=new pE(this.options);this.store=new hE(this.options.resources,this.options);const h=this.services;h.logger=lo,h.resourceStore=this.store,h.languageUtils=y,h.pluralResolver=new Q6(y,{prepend:this.options.pluralSeparator}),g&&(h.formatter=s(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new vE(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new eU(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Ph(this.services,this.options),this.translator.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,a||(a=Yf),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=Zu(),p=()=>{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),a(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?p():setTimeout(p,0),d}loadResources(n,a=Yf){let o=a;const s=Et(n)?n:this.language;if(typeof n=="function"&&(o=n),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const u=[],c=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(u.includes(g)||u.push(g))})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>c(p)),this.options.preload?.forEach?.(d=>c(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(d)})}else o(null)}reloadResources(n,a,o){const s=Zu();return typeof n=="function"&&(o=n,n=void 0),typeof a=="function"&&(o=a,a=void 0),n||(n=this.languages),a||(a=this.options.ns),o||(o=Yf),this.services.backendConnector.reload(n,a,u=>{s.resolve(),o(u)}),s}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&eM.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!["cimode","dev"].includes(n)){for(let a=0;a<this.languages.length;a++){const o=this.languages[a];if(!["cimode","dev"].includes(o)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&!this.languages.includes(n)&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,a){this.isLanguageChangingTo=n;const o=Zu();this.emit("languageChanging",n);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===n&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,o.resolve((...g)=>this.t(...g)),a&&a(d,(...g)=>this.t(...g))},c=d=>{!n&&!d&&this.services.languageDetector&&(d=[]);const p=Et(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Et(d)?[d]:d);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,y=>{u(y,g)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),o}getFixedT(n,a,o,s){const u=s?.scopeNs,c=(d,p,...g)=>{let y;typeof p!="object"?y=this.options.overloadTranslationOptionHandler([d,p].concat(g)):y={...p},y.lng=y.lng||c.lng,y.lngs=y.lngs||c.lngs;const h=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||c.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||o||c.keyPrefix);const b={...this.options,...y};Array.isArray(u)&&!h&&(b.ns=u),typeof y.keyPrefix=="function"&&(y.keyPrefix=ms(y.keyPrefix,b));const S=this.options.keySeparator||".";let w;return y.keyPrefix&&Array.isArray(d)?w=d.map(C=>(typeof C=="function"&&(C=ms(C,b)),`${y.keyPrefix}${S}${C}`)):(typeof d=="function"&&(d=ms(d,b)),w=y.keyPrefix?`${y.keyPrefix}${S}${d}`:d),this.t(w,y)};return Et(n)?c.lng=n:c.lngs=n,c.ns=a,c.keyPrefix=o,c}t(...n){return this.translator?.translate(...n)}exists(...n){return this.translator?.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,a={}){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 o=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const c=(g,y)=>{const h=this.services.backendConnector.state[`${g}|${y}`];return h===-1||h===0||h===2};if(a.precheck){const g=a.precheck(this,c);if(g!==void 0)return g}if(this.hasResourceBundle(o,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,p=a.lng?d.isSupportedCode(o)&&d.toResolveHierarchy(o,!1)[0]:o;return!!((!p||c(p,n))&&(!s||c(u,n)))}loadNamespaces(n,a){const o=Zu();return this.options.ns?(Et(n)&&(n=[n]),n.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{o.resolve(),a&&a(s)}),o):(a&&a(),Promise.resolve())}loadLanguages(n,a){const o=Zu();Et(n)&&(n=[n]);const s=this.options.preload||[],u=n.filter(c=>!s.includes(c)&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=s.concat(u),this.loadResources(c=>{o.resolve(),a&&a(c)}),o):(a&&a(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!n)return"rtl";try{const s=new Intl.Locale(n);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const a=["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"],o=this.services?.languageUtils||new pE(Y0());return n.toLowerCase().indexOf("-latn")>1?"ltr":a.includes(o.getLanguagePartFromCode(n))||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},a){const o=new lc(n,a);return o.createInstance=lc.createInstance,o}cloneInstance(n={},a=Yf){const o=n.forkResourceStore;o&&delete n.forkResourceStore;const s={...this.options,preload:!1,...n,isClone:!0},u=new lc(s);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},o){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},p=d(this.store.data);u.store=new hE(p,s),u.services.resourceStore=u.store}if(n.interpolation){const p={...Y0().interpolation,...this.options.interpolation,...n.interpolation},g={...s,interpolation:p};u.services.interpolator=new vE(g)}return u.translator=new Ph(u.services,s),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(s,a),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dr=lc.createInstance();dr.createInstance;dr.dir;dr.init;dr.loadResources;dr.reloadResources;dr.use;dr.changeLanguage;dr.getFixedT;dr.t;dr.exists;dr.setDefaultNamespace;dr.hasLoadedNamespace;dr.loadNamespaces;dr.loadLanguages;const nU=(e,n,a,o)=>{const s=[a,{code:n,...o||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);ws(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...s):console?.warn&&console.warn(...s)},SE={},lh=(e,n,a,o)=>{ws(a)&&SE[a]||(ws(a)&&(SE[a]=new Date),nU(e,n,a,o))},nM=(e,n)=>()=>{if(e.isInitialized)n();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),n()};e.on("initialized",a)}},Ay=(e,n,a)=>{e.loadNamespaces(n,nM(e,a))},wE=(e,n,a,o)=>{if(ws(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(n)>-1)return Ay(e,a,o);a.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(n,nM(e,o))},rU=(e,n,a={})=>!n.languages||!n.languages.length?(lh(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:a.lng,precheck:(o,s)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}),ws=e=>typeof e=="string",aU=e=>typeof e=="object"&&e!==null,oU=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,iU={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},sU=e=>iU[e],lU=e=>e.replace(oU,sU);let Dy={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:lU,transDefaultProps:void 0};const uU=(e={})=>{Dy={...Dy,...e}},cU=()=>Dy;let rM;const dU=e=>{rM=e},fU=()=>rM,hU={type:"3rdParty",init(e){uU(e.options.react),dU(e)}},pU=v.createContext();class gU{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mU=(e,n)=>{if(ws(n))return n;if(aU(n)&&ws(n.defaultValue))return n.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const a=e[e.length-1];return typeof a=="function"?"":a}return e},yU={t:mU,ready:!1},vU=()=>()=>{},Qt=(e,n={})=>{const{i18n:a}=n,{i18n:o,defaultNS:s}=v.useContext(pU)||{},u=a||o||fU();u&&!u.reportNamespaces&&(u.reportNamespaces=new gU),u||lh(u,"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 c=v.useMemo(()=>({...cU(),...u?.options?.react,...n}),[u,n]),{useSuspense:d,keyPrefix:p,bindI18n:g,bindI18nStore:y}=c,h=s||u?.options?.defaultNS,b=ws(h)?[h]:h||["translation"],S=JSON.stringify(b),w=v.useMemo(()=>b,[S]);u?.reportNamespaces?.addUsedNamespaces?.(w);const C=v.useRef(0),E=v.useCallback(H=>{if(!u)return vU;const U=()=>{C.current+=1,H()};return g&&u.on(g,U),y&&u.store.on(y,U),()=>{g&&g.split(" ").forEach(L=>u.off(L,U)),y&&y.split(" ").forEach(L=>u.store.off(L,U))}},[u,g,y]),T=v.useRef(),O=v.useCallback(()=>{if(!u)return yU;const H=!!(u.isInitialized||u.initializedStoreOnce)&&w.every(ee=>rU(ee,u,c)),U=n.lng||u.language,L=C.current,$=typeof p=="function"?ms(p,{...u.options,ns:w}):p,Y=T.current;if(Y&&Y.i18n===u&&Y.ready===H&&Y.lng===U&&Y.namespaces===w&&Y.keyPrefix===$&&Y.revision===L)return Y;const Q={t:u.getFixedT(U,c.nsMode==="fallback"?w:w[0],p,{scopeNs:w}),i18n:u,ready:H,lng:U,namespaces:w,keyPrefix:$,revision:L};return T.current=Q,Q},[u,w,p,c,n.lng]),[M,A]=v.useState(0);let{t:N,ready:P}=hp.useSyncExternalStore(E,O,O),j;u&&d&&!P&&(j=new Promise(H=>{const U=()=>H();n.lng?wE(u,n.lng,w,U):Ay(u,w,U)}),{t:N,ready:P}=O()),v.useEffect(()=>{if(u&&!P&&!d){const H=()=>A(U=>U+1);n.lng?wE(u,n.lng,w,H):Ay(u,w,H)}},[u,n.lng,w,P,d,M]);const D=u||{},z=v.useRef(null),F=v.useRef(),G=H=>`${H.language}|${H.resolvedLanguage}|${H.languages?.join(",")}`,J=H=>{const U=Object.getOwnPropertyDescriptors(H);U.__original&&delete U.__original;const L=Object.create(Object.getPrototypeOf(H),U);if(!Object.prototype.hasOwnProperty.call(L,"__original"))try{Object.defineProperty(L,"__original",{value:H,writable:!1,enumerable:!1,configurable:!1})}catch{}return L},K=v.useMemo(()=>{const H=D,U=H&&G(H);let L=H;H&&(z.current&&z.current.__original===H?F.current!==U?(L=J(H),z.current=L,F.current=U):L=z.current:(L=J(H),z.current=L,F.current=U));const $=!P&&!d?(...V)=>(lh(u,"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(...V)):N,Y=[$,L,P];return Y.t=$,Y.i18n=L,Y.ready=P,Y},[N,D,P,D.resolvedLanguage,D.language,D.languages]);if(u&&d&&!P){let H=!1;try{H=!1}catch{}throw H&&lh(u,"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"),j}return K};function bU({...e}){return x.jsx(ZO,{"data-slot":"sheet",...e})}function xU({...e}){return x.jsx(XO,{"data-slot":"sheet-portal",...e})}function SU({className:e,...n}){return x.jsx(YO,{"data-slot":"sheet-overlay",className:Qe("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),...n})}function wU({className:e,children:n,side:a="right",showCloseButton:o=!0,...s}){const{t:u}=Qt();return x.jsxs(xU,{children:[x.jsx(SU,{}),x.jsxs(QO,{"data-slot":"sheet-content","data-side":a,className:Qe("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),...s,children:[n,o&&x.jsxs(Up,{"data-slot":"sheet-close",render:x.jsx(It,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:u("a11y.close")})]})]})]})}function EU({className:e,...n}){return x.jsx("div",{"data-slot":"sheet-header",className:Qe("flex flex-col gap-1.5 p-6",e),...n})}function RU({className:e,...n}){return x.jsx(JO,{"data-slot":"sheet-title",className:Qe("font-heading text-sm font-medium text-foreground",e),...n})}function CU({className:e,...n}){return x.jsx(GO,{"data-slot":"sheet-description",className:Qe("text-xs/relaxed text-muted-foreground",e),...n})}function Tr({className:e,...n}){return x.jsx("div",{"data-slot":"skeleton",className:Qe("animate-pulse rounded-md bg-muted",e),...n})}const TU="sidebar_state",OU=3600*24*7,MU="16rem",AU="18rem",DU="3rem",NU="b",aM=v.createContext(null);function $l(){const e=v.useContext(aM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function kU({defaultOpen:e=!0,open:n,onOpenChange:a,className:o,style:s,children:u,...c}){const d=s6(),[p,g]=v.useState(!1),[y,h]=v.useState(e),b=n??y,S=v.useCallback(T=>{const O=typeof T=="function"?T(b):T;a?a(O):h(O),document.cookie=`${TU}=${O}; path=/; max-age=${OU}`},[a,b]),w=v.useCallback(()=>d?g(T=>!T):S(T=>!T),[d,S,g]);v.useEffect(()=>{const T=O=>{O.key===NU&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[w]);const C=b?"expanded":"collapsed",E=v.useMemo(()=>({state:C,open:b,setOpen:S,isMobile:d,openMobile:p,setOpenMobile:g,toggleSidebar:w}),[C,b,S,d,p,g,w]);return x.jsx(aM.Provider,{value:E,children:x.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":MU,"--sidebar-width-icon":DU,...s},className:Qe("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o),...c,children:u})})}function jU({side:e="left",variant:n="sidebar",collapsible:a="offcanvas",className:o,children:s,dir:u,...c}){const{t:d}=Qt(),{isMobile:p,state:g,openMobile:y,setOpenMobile:h}=$l();return a==="none"?x.jsx("div",{"data-slot":"sidebar",className:Qe("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o),...c,children:s}):p?x.jsx(bU,{open:y,onOpenChange:h,...c,children:x.jsxs(wU,{dir:u,"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":AU},side:e,children:[x.jsxs(EU,{className:"sr-only",children:[x.jsx(RU,{children:d("a11y.sidebar")}),x.jsx(CU,{children:d("a11y.sidebarDescription")})]}),x.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):x.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[x.jsx("div",{"data-slot":"sidebar-gap",className:Qe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),x.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Qe("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",n==="floating"||n==="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",o),...c,children:x.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:s})})]})}function IU({className:e,onClick:n,...a}){const{t:o}=Qt(),{toggleSidebar:s}=$l();return x.jsxs(It,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Qe(e),onClick:u=>{n?.(u),s()},...a,children:[x.jsx(nP,{}),x.jsx("span",{className:"sr-only",children:o("a11y.toggleSidebar")})]})}function PU({className:e,...n}){const{t:a}=Qt(),{toggleSidebar:o}=$l();return x.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":a("a11y.toggleSidebar"),tabIndex:-1,onClick:o,title:a("a11y.toggleSidebar"),className:Qe("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),...n})}function LU({className:e,...n}){return x.jsx("main",{"data-slot":"sidebar-inset",className:Qe("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),...n})}function zU({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Qe("flex flex-col gap-2 p-2",e),...n})}function _U({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Qe("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function UU({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Qe("relative flex w-full min-w-0 flex-col px-2 py-1",e),...n})}function oM({className:e,...n}){return x.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Qe("flex w-full min-w-0 flex-col gap-px",e),...n})}function uh({className:e,...n}){return x.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Qe("group/menu-item relative",e),...n})}const HU=_p("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 ch({render:e,isActive:n=!1,variant:a="default",size:o="default",tooltip:s,className:u,...c}){const{isMobile:d,state:p}=$l(),g=qv({defaultTagName:"button",props:Or({className:Qe(HU({variant:a,size:o}),u)},c),render:s?x.jsx(Mh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:n}});return s?(typeof s=="string"&&(s={children:s}),x.jsxs(Oh,{children:[g,x.jsx(Ah,{side:"right",align:"center",hidden:p!=="collapsed"||d,...s})]})):g}function FU({className:e,...n}){return x.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Qe("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),...n})}function BU({className:e,...n}){return x.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Qe("group/menu-sub-item relative",e),...n})}function VU({render:e,size:n="md",isActive:a=!1,className:o,...s}){return qv({defaultTagName:"a",props:Or({className:Qe("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",o)},s),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:n,active:a}})}function qU({items:e}){const{t:n}=Qt(),{pathname:a}=Ar(),{isMobile:o,state:s}=$l(),u=s==="collapsed"&&!o,c=d=>a===d||a.startsWith(`${d}/`);return x.jsx(UU,{children:x.jsx(oM,{children:e.map(d=>{const p=d.icon,g=d.items?.some(y=>c(y.url))??!1;return d.items?u?x.jsx(uh,{children:x.jsxs(Pp,{children:[x.jsxs(Lp,{render:x.jsx(ch,{tooltip:n(d.titleKey),isActive:g}),children:[x.jsx(p,{}),x.jsx("span",{children:n(d.titleKey)})]}),x.jsx(zp,{className:"w-40",side:"right",align:"start",sideOffset:4,children:x.jsxs(HO,{children:[x.jsx(FO,{children:n(d.titleKey)}),d.items.map(y=>x.jsx(Vv,{className:"cursor-pointer",render:x.jsx(ic,{to:y.url}),children:x.jsx("span",{children:n(y.titleKey)})},y.titleKey))]})})]})},d.titleKey):x.jsxs(Vz,{defaultOpen:g,className:"group/collapsible",render:x.jsx(uh,{}),children:[x.jsxs(qz,{render:x.jsx(ch,{tooltip:n(d.titleKey),isActive:g}),children:[x.jsx(p,{}),x.jsx("span",{children:n(d.titleKey)}),x.jsx(TC,{className:`
14
- ml-auto transition-transform duration-200
15
- group-data-open/collapsible:rotate-90
16
- `})]}),x.jsx(Kz,{children:x.jsx(FU,{children:d.items.map(y=>x.jsx(BU,{children:x.jsx(VU,{isActive:c(y.url),render:x.jsx(ic,{to:y.url}),children:x.jsx("span",{children:n(y.titleKey)})})},y.titleKey))})})]},`${d.titleKey}-${g?"active":"inactive"}`):x.jsx(uh,{children:x.jsxs(ch,{tooltip:n(d.titleKey),isActive:a===d.url,render:x.jsx(ic,{to:d.url??"/dashboard"}),children:[x.jsx(p,{}),x.jsx("span",{children:n(d.titleKey)})]})},d.titleKey)})})})}const Gv=[{titleKey:"nav.dashboard",url:"/dashboard",icon:XI},{titleKey:"nav.library",icon:ZI,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:wC,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],KU=new Map([["/settings","nav.settings"],...Gv.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(n=>[n.url,n.titleKey])??[]])]);function iM(e){return e.startsWith("/library/skills/")?"nav.skills":KU.get(e)??"nav.dashboard"}const YU=Gv.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(n=>n.url)??[]]),GU=YU;function $U({...e}){const{t:n}=Qt(),{pathname:a}=Ar(),{isMobile:o,setOpenMobile:s}=$l();return v.useEffect(()=>{o&&s(!1)},[o,a,s]),x.jsxs(jU,{collapsible:"icon",...e,children:[x.jsx(_U,{children:x.jsx(qU,{items:Gv})}),x.jsx(zU,{children:x.jsx(oM,{children:x.jsx(uh,{children:x.jsxs(ch,{tooltip:n("nav.settings"),render:x.jsx(ic,{to:"/settings"}),children:[x.jsx(iP,{}),x.jsx("span",{children:n("nav.settings")})]})})})}),x.jsx(PU,{})]})}function QU({className:e,...n}){return x.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:Qe(e),...n})}function XU({className:e,...n}){return x.jsx("ol",{"data-slot":"breadcrumb-list",className:Qe("flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",e),...n})}function ZU({className:e,...n}){return x.jsx("li",{"data-slot":"breadcrumb-item",className:Qe("inline-flex items-center gap-1",e),...n})}function JU({className:e,render:n,...a}){return qv({defaultTagName:"a",props:Or({className:Qe("transition-colors hover:text-foreground",e)},a),render:n,state:{slot:"breadcrumb-link"}})}function WU({className:e,...n}){return x.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Qe("font-normal text-foreground",e),...n})}function e8({children:e,className:n,...a}){return x.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Qe("[&>svg]:size-3.5",n),...a,children:e??x.jsx(TC,{})})}function t8({items:e}){const{t:n}=Qt();return x.jsx(QU,{"aria-label":n("a11y.breadcrumb"),className:"min-w-0",children:x.jsx(XU,{className:"flex-nowrap text-sm font-medium text-foreground",children:e.map((a,o)=>x.jsxs(v.Fragment,{children:[o>0&&x.jsx(e8,{}),x.jsx(ZU,{className:a.to?"shrink-0":"min-w-0",children:a.to?x.jsx(JU,{render:x.jsx(Kc,{to:a.to}),className:"truncate",title:a.label,children:a.label}):x.jsx(WU,{className:"truncate font-medium",title:a.label,children:a.label})})]},a.to??a.label))})})}const Fp=v.createContext(null);Fp.displayName="PageHeaderActionsContext";function n8({children:e}){const[n,a]=v.useState(null);return x.jsx(Fp,{value:{container:n,setContainer:a},children:e})}function r8(){const e=v.use(Fp);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const n=e.setContainer,a=v.useCallback(o=>{n(o)},[n]);return x.jsx("div",{ref:a,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function sM({children:e}){const n=v.use(Fp);return n?.container?cr.createPortal(e,n.container):null}function a8(){const{t:e}=Qt(),{pathname:n}=Ar(),a=h5("/library/skills/:name");return x.jsx(n8,{children:x.jsxs(kU,{children:[x.jsx($U,{}),x.jsxs(LU,{className:"min-w-0",children:[x.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:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[x.jsx(IU,{size:"icon",className:"-ml-1"}),x.jsx(qO,{orientation:"vertical",className:`
21
- mr-2
22
- data-vertical:h-4 data-vertical:self-auto
23
- `}),x.jsx(t8,{items:a?[{label:e("nav.skills"),to:"/library/skills"},{label:a.params.name??""}]:[{label:e(iM(n))}]})]}),x.jsx(r8,{})]}),x.jsx(aO,{})]})]})})}function o8(){const{t:e}=Qt(),{pathname:n}=Ar(),a=O5(),o=Vc();let s;for(const c of a.toReversed())if(i8(c.handle)){s=c.handle.backTo;break}const u=()=>{if(s===void 0){o(-1);return}o(s)};return x.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[x.jsx("header",{className:`
24
- flex h-16 shrink-0 items-center gap-2 transition-[width,height]
25
- ease-linear
26
- `,children:x.jsxs("div",{className:"flex items-center gap-2 px-4",children:[x.jsxs(It,{variant:"ghost",size:"icon",className:"-ml-1",onClick:u,children:[x.jsx(UI,{}),x.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),x.jsx(qO,{orientation:"vertical",className:`
27
- mr-2
28
- data-vertical:h-4 data-vertical:self-auto
29
- `}),x.jsx("span",{className:"text-sm font-medium",children:e(iM(n))})]})}),x.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:x.jsx(aO,{})})]})}function i8(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"}function s8(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>o=>{n.forEach(s=>s(o))},n)}const Bp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ql(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function $v(e){return"nodeType"in e}function Fr(e){var n,a;return e?Ql(e)?e:$v(e)&&(n=(a=e.ownerDocument)==null?void 0:a.defaultView)!=null?n:window:window}function Qv(e){const{Document:n}=Fr(e);return e instanceof n}function Xc(e){return Ql(e)?!1:e instanceof Fr(e).HTMLElement}function lM(e){return e instanceof Fr(e).SVGElement}function Xl(e){return e?Ql(e)?e.document:$v(e)?Qv(e)?e:Xc(e)||lM(e)?e.ownerDocument:document:document:document}const Ka=Bp?v.useLayoutEffect:v.useEffect;function Vp(e){const n=v.useRef(e);return Ka(()=>{n.current=e}),v.useCallback(function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n.current==null?void 0:n.current(...o)},[])}function l8(){const e=v.useRef(null),n=v.useCallback((o,s)=>{e.current=setInterval(o,s)},[]),a=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,a]}function xc(e,n){n===void 0&&(n=[e]);const a=v.useRef(e);return Ka(()=>{a.current!==e&&(a.current=e)},n),a}function Zc(e,n){const a=v.useRef();return v.useMemo(()=>{const o=e(a.current);return a.current=o,o},[...n])}function Lh(e){const n=Vp(e),a=v.useRef(null),o=v.useCallback(s=>{s!==a.current&&n?.(s,a.current),a.current=s},[]);return[a,o]}function zh(e){const n=v.useRef();return v.useEffect(()=>{n.current=e},[e]),n.current}let G0={};function Jc(e,n){return v.useMemo(()=>{if(n)return n;const a=G0[e]==null?0:G0[e]+1;return G0[e]=a,e+"-"+a},[e,n])}function uM(e){return function(n){for(var a=arguments.length,o=new Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];return o.reduce((u,c)=>{const d=Object.entries(c);for(const[p,g]of d){const y=u[p];y!=null&&(u[p]=y+e*g)}return u},{...n})}}const kl=uM(1),Sc=uM(-1);function u8(e){return"clientX"in e&&"clientY"in e}function qp(e){if(!e)return!1;const{KeyboardEvent:n}=Fr(e.target);return n&&e instanceof n}function c8(e){if(!e)return!1;const{TouchEvent:n}=Fr(e.target);return n&&e instanceof n}function _h(e){if(c8(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:a}=e.touches[0];return{x:n,y:a}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:a}=e.changedTouches[0];return{x:n,y:a}}}return u8(e)?{x:e.clientX,y:e.clientY}:null}const Di=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:a}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(a?Math.round(a):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:a}=e;return"scaleX("+n+") scaleY("+a+")"}},Transform:{toString(e){if(e)return[Di.Translate.toString(e),Di.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:a,easing:o}=e;return n+" "+a+"ms "+o}}}),EE="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function d8(e){return e.matches(EE)?e:e.querySelector(EE)}const f8={display:"none"};function h8(e){let{id:n,value:a}=e;return Ne.createElement("div",{id:n,style:f8},a)}function p8(e){let{id:n,announcement:a,ariaLiveType:o="assertive"}=e;const s={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:n,style:s,role:"status","aria-live":o,"aria-atomic":!0},a)}function g8(){const[e,n]=v.useState("");return{announce:v.useCallback(o=>{o!=null&&n(o)},[]),announcement:e}}const cM=v.createContext(null);function m8(e){const n=v.useContext(cM);v.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function y8(){const[e]=v.useState(()=>new Set),n=v.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[v.useCallback(o=>{let{type:s,event:u}=o;e.forEach(c=>{var d;return(d=c[s])==null?void 0:d.call(c,u)})},[e]),n]}const v8={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
- `},b8={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was moved over droppable area "+a.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was dropped over droppable area "+a.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function x8(e){let{announcements:n=b8,container:a,hiddenTextDescribedById:o,screenReaderInstructions:s=v8}=e;const{announce:u,announcement:c}=g8(),d=Jc("DndLiveRegion"),[p,g]=v.useState(!1);if(v.useEffect(()=>{g(!0)},[]),m8(v.useMemo(()=>({onDragStart(h){let{active:b}=h;u(n.onDragStart({active:b}))},onDragMove(h){let{active:b,over:S}=h;n.onDragMove&&u(n.onDragMove({active:b,over:S}))},onDragOver(h){let{active:b,over:S}=h;u(n.onDragOver({active:b,over:S}))},onDragEnd(h){let{active:b,over:S}=h;u(n.onDragEnd({active:b,over:S}))},onDragCancel(h){let{active:b,over:S}=h;u(n.onDragCancel({active:b,over:S}))}}),[u,n])),!p)return null;const y=Ne.createElement(Ne.Fragment,null,Ne.createElement(h8,{id:o,value:s.draggable}),Ne.createElement(p8,{id:d,announcement:c}));return a?cr.createPortal(y,a):y}var ar;(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"})(ar||(ar={}));function Uh(){}function $0(e,n){return v.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function S8(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>[...n].filter(o=>o!=null),[...n])}const Ya=Object.freeze({x:0,y:0});function Xv(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function w8(e,n){const a=_h(e);if(!a)return"0 0";const o={x:(a.x-n.left)/n.width*100,y:(a.y-n.top)/n.height*100};return o.x+"% "+o.y+"%"}function Zv(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return a-o}function E8(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return o-a}function Ny(e){let{left:n,top:a,height:o,width:s}=e;return[{x:n,y:a},{x:n+s,y:a},{x:n,y:a+o},{x:n+s,y:a+o}]}function dM(e,n){if(!e||e.length===0)return null;const[a]=e;return a[n]}function RE(e,n,a){return n===void 0&&(n=e.left),a===void 0&&(a=e.top),{x:n+e.width*.5,y:a+e.height*.5}}const R8=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=RE(n,n.left,n.top),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=Xv(RE(p),s);u.push({id:d,data:{droppableContainer:c,value:g}})}}return u.sort(Zv)},C8=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=Ny(n),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=Ny(p),y=s.reduce((b,S,w)=>b+Xv(g[w],S),0),h=Number((y/4).toFixed(4));u.push({id:d,data:{droppableContainer:c,value:h}})}}return u.sort(Zv)};function T8(e,n){const a=Math.max(n.top,e.top),o=Math.max(n.left,e.left),s=Math.min(n.left+n.width,e.left+e.width),u=Math.min(n.top+n.height,e.top+e.height),c=s-o,d=u-a;if(o<s&&a<u){const p=n.width*n.height,g=e.width*e.height,y=c*d,h=y/(p+g-y);return Number(h.toFixed(4))}return 0}const O8=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=[];for(const u of o){const{id:c}=u,d=a.get(c);if(d){const p=T8(d,n);p>0&&s.push({id:c,data:{droppableContainer:u,value:p}})}}return s.sort(E8)};function M8(e,n){const{top:a,left:o,bottom:s,right:u}=n;return a<=e.y&&e.y<=s&&o<=e.x&&e.x<=u}const A8=e=>{let{droppableContainers:n,droppableRects:a,pointerCoordinates:o}=e;if(!o)return[];const s=[];for(const u of n){const{id:c}=u,d=a.get(c);if(d&&M8(o,d)){const g=Ny(d).reduce((h,b)=>h+Xv(o,b),0),y=Number((g/4).toFixed(4));s.push({id:c,data:{droppableContainer:u,value:y}})}}return s.sort(Zv)};function D8(e,n,a){return{...e,scaleX:n&&a?n.width/a.width:1,scaleY:n&&a?n.height/a.height:1}}function fM(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ya}function N8(e){return function(a){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return s.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...a})}}const k8=N8(1);function hM(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function j8(e,n,a){const o=hM(n);if(!o)return e;const{scaleX:s,scaleY:u,x:c,y:d}=o,p=e.left-c-(1-s)*parseFloat(a),g=e.top-d-(1-u)*parseFloat(a.slice(a.indexOf(" ")+1)),y=s?e.width/s:e.width,h=u?e.height/u:e.height;return{width:y,height:h,top:g,right:p+y,bottom:g+h,left:p}}const I8={ignoreTransform:!1};function Zl(e,n){n===void 0&&(n=I8);let a=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:g,transformOrigin:y}=Fr(e).getComputedStyle(e);g&&(a=j8(a,g,y))}const{top:o,left:s,width:u,height:c,bottom:d,right:p}=a;return{top:o,left:s,width:u,height:c,bottom:d,right:p}}function CE(e){return Zl(e,{ignoreTransform:!0})}function P8(e){const n=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:n,bottom:a,width:n,height:a}}function L8(e,n){return n===void 0&&(n=Fr(e).getComputedStyle(e)),n.position==="fixed"}function z8(e,n){n===void 0&&(n=Fr(e).getComputedStyle(e));const a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const u=n[s];return typeof u=="string"?a.test(u):!1})}function Kp(e,n){const a=[];function o(s){if(n!=null&&a.length>=n||!s)return a;if(Qv(s)&&s.scrollingElement!=null&&!a.includes(s.scrollingElement))return a.push(s.scrollingElement),a;if(!Xc(s)||lM(s)||a.includes(s))return a;const u=Fr(e).getComputedStyle(s);return s!==e&&z8(s,u)&&a.push(s),L8(s,u)?a:o(s.parentNode)}return e?o(e):a}function pM(e){const[n]=Kp(e,1);return n??null}function Q0(e){return!Bp||!e?null:Ql(e)?e:$v(e)?Qv(e)||e===Xl(e).scrollingElement?window:Xc(e)?e:null:null}function gM(e){return Ql(e)?e.scrollX:e.scrollLeft}function mM(e){return Ql(e)?e.scrollY:e.scrollTop}function ky(e){return{x:gM(e),y:mM(e)}}var ur;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ur||(ur={}));function yM(e){return!Bp||!e?!1:e===document.scrollingElement}function vM(e){const n={x:0,y:0},a=yM(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},s=e.scrollTop<=n.y,u=e.scrollLeft<=n.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:s,isLeft:u,isBottom:c,isRight:d,maxScroll:o,minScroll:n}}const _8={x:.2,y:.2};function U8(e,n,a,o,s){let{top:u,left:c,right:d,bottom:p}=a;o===void 0&&(o=10),s===void 0&&(s=_8);const{isTop:g,isBottom:y,isLeft:h,isRight:b}=vM(e),S={x:0,y:0},w={x:0,y:0},C={height:n.height*s.y,width:n.width*s.x};return!g&&u<=n.top+C.height?(S.y=ur.Backward,w.y=o*Math.abs((n.top+C.height-u)/C.height)):!y&&p>=n.bottom-C.height&&(S.y=ur.Forward,w.y=o*Math.abs((n.bottom-C.height-p)/C.height)),!b&&d>=n.right-C.width?(S.x=ur.Forward,w.x=o*Math.abs((n.right-C.width-d)/C.width)):!h&&c<=n.left+C.width&&(S.x=ur.Backward,w.x=o*Math.abs((n.left+C.width-c)/C.width)),{direction:S,speed:w}}function H8(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:c}=window;return{top:0,left:0,right:u,bottom:c,width:u,height:c}}const{top:n,left:a,right:o,bottom:s}=e.getBoundingClientRect();return{top:n,left:a,right:o,bottom:s,width:e.clientWidth,height:e.clientHeight}}function bM(e){return e.reduce((n,a)=>kl(n,ky(a)),Ya)}function F8(e){return e.reduce((n,a)=>n+gM(a),0)}function B8(e){return e.reduce((n,a)=>n+mM(a),0)}function xM(e,n){if(n===void 0&&(n=Zl),!e)return;const{top:a,left:o,bottom:s,right:u}=n(e);pM(e)&&(s<=0||u<=0||a>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const V8=[["x",["left","right"],F8],["y",["top","bottom"],B8]];class Jv{constructor(n,a){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 o=Kp(a),s=bM(o);this.rect={...n},this.width=n.width,this.height=n.height;for(const[u,c,d]of V8)for(const p of c)Object.defineProperty(this,p,{get:()=>{const g=d(o),y=s[u]-g;return this.rect[p]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class uc{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...a)})},this.target=n}add(n,a,o){var s;(s=this.target)==null||s.addEventListener(n,a,o),this.listeners.push([n,a,o])}}function q8(e){const{EventTarget:n}=Fr(e);return e instanceof n?e:Xl(e)}function X0(e,n){const a=Math.abs(e.x),o=Math.abs(e.y);return typeof n=="number"?Math.sqrt(a**2+o**2)>n:"x"in n&&"y"in n?a>n.x&&o>n.y:"x"in n?a>n.x:"y"in n?o>n.y:!1}var Oa;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Oa||(Oa={}));function TE(e){e.preventDefault()}function K8(e){e.stopPropagation()}var Wt;(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"})(Wt||(Wt={}));const SM={start:[Wt.Space,Wt.Enter],cancel:[Wt.Esc],end:[Wt.Space,Wt.Enter,Wt.Tab]},Y8=(e,n)=>{let{currentCoordinates:a}=n;switch(e.code){case Wt.Right:return{...a,x:a.x+25};case Wt.Left:return{...a,x:a.x-25};case Wt.Down:return{...a,y:a.y+25};case Wt.Up:return{...a,y:a.y-25}}};class Wv{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:a}}=n;this.props=n,this.listeners=new uc(Xl(a)),this.windowListeners=new uc(Fr(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Oa.Resize,this.handleCancel),this.windowListeners.add(Oa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Oa.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:a}=this.props,o=n.node.current;o&&xM(o),a(Ya)}handleKeyDown(n){if(qp(n)){const{active:a,context:o,options:s}=this.props,{keyboardCodes:u=SM,coordinateGetter:c=Y8,scrollBehavior:d="smooth"}=s,{code:p}=n;if(u.end.includes(p)){this.handleEnd(n);return}if(u.cancel.includes(p)){this.handleCancel(n);return}const{collisionRect:g}=o.current,y=g?{x:g.left,y:g.top}:Ya;this.referenceCoordinates||(this.referenceCoordinates=y);const h=c(n,{active:a,context:o.current,currentCoordinates:y});if(h){const b=Sc(h,y),S={x:0,y:0},{scrollableAncestors:w}=o.current;for(const C of w){const E=n.code,{isTop:T,isRight:O,isLeft:M,isBottom:A,maxScroll:N,minScroll:P}=vM(C),j=H8(C),D={x:Math.min(E===Wt.Right?j.right-j.width/2:j.right,Math.max(E===Wt.Right?j.left:j.left+j.width/2,h.x)),y:Math.min(E===Wt.Down?j.bottom-j.height/2:j.bottom,Math.max(E===Wt.Down?j.top:j.top+j.height/2,h.y))},z=E===Wt.Right&&!O||E===Wt.Left&&!M,F=E===Wt.Down&&!A||E===Wt.Up&&!T;if(z&&D.x!==h.x){const G=C.scrollLeft+b.x,J=E===Wt.Right&&G<=N.x||E===Wt.Left&&G>=P.x;if(J&&!b.y){C.scrollTo({left:G,behavior:d});return}J?S.x=C.scrollLeft-G:S.x=E===Wt.Right?C.scrollLeft-N.x:C.scrollLeft-P.x,S.x&&C.scrollBy({left:-S.x,behavior:d});break}else if(F&&D.y!==h.y){const G=C.scrollTop+b.y,J=E===Wt.Down&&G<=N.y||E===Wt.Up&&G>=P.y;if(J&&!b.x){C.scrollTo({top:G,behavior:d});return}J?S.y=C.scrollTop-G:S.y=E===Wt.Down?C.scrollTop-N.y:C.scrollTop-P.y,S.y&&C.scrollBy({top:-S.y,behavior:d});break}}this.handleMove(n,kl(Sc(h,this.referenceCoordinates),S))}}}handleMove(n,a){const{onMove:o}=this.props;n.preventDefault(),o(a)}handleEnd(n){const{onEnd:a}=this.props;n.preventDefault(),this.detach(),a()}handleCancel(n){const{onCancel:a}=this.props;n.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Wv.activators=[{eventName:"onKeyDown",handler:(e,n,a)=>{let{keyboardCodes:o=SM,onActivation:s}=n,{active:u}=a;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=u.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),s?.({event:e.nativeEvent}),!0)}return!1}}];function OE(e){return!!(e&&"distance"in e)}function ME(e){return!!(e&&"delay"in e)}class eb{constructor(n,a,o){var s;o===void 0&&(o=q8(n.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=n,this.events=a;const{event:u}=n,{target:c}=u;this.props=n,this.events=a,this.document=Xl(c),this.documentListeners=new uc(this.document),this.listeners=new uc(o),this.windowListeners=new uc(Fr(c)),this.initialCoordinates=(s=_h(u))!=null?s:Ya,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:n,props:{options:{activationConstraint:a,bypassActivationConstraint:o}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Oa.Resize,this.handleCancel),this.windowListeners.add(Oa.DragStart,TE),this.windowListeners.add(Oa.VisibilityChange,this.handleCancel),this.windowListeners.add(Oa.ContextMenu,TE),this.documentListeners.add(Oa.Keydown,this.handleKeydown),a){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ME(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(OE(a)){this.handlePending(a);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(n,a){const{active:o,onPending:s}=this.props;s(o,n,this.initialCoordinates,a)}handleStart(){const{initialCoordinates:n}=this,{onStart:a}=this.props;n&&(this.activated=!0,this.documentListeners.add(Oa.Click,K8,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Oa.SelectionChange,this.removeTextSelection),a(n))}handleMove(n){var a;const{activated:o,initialCoordinates:s,props:u}=this,{onMove:c,options:{activationConstraint:d}}=u;if(!s)return;const p=(a=_h(n))!=null?a:Ya,g=Sc(s,p);if(!o&&d){if(OE(d)){if(d.tolerance!=null&&X0(g,d.tolerance))return this.handleCancel();if(X0(g,d.distance))return this.handleStart()}if(ME(d)&&X0(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}n.cancelable&&n.preventDefault(),c(p)}handleEnd(){const{onAbort:n,onEnd:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleCancel(){const{onAbort:n,onCancel:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleKeydown(n){n.code===Wt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const G8={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wM extends eb{constructor(n){const{event:a}=n,o=Xl(a.target);super(n,G8,o)}}wM.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return!a.isPrimary||a.button!==0?!1:(o?.({event:a}),!0)}}];const $8={move:{name:"mousemove"},end:{name:"mouseup"}};var jy;(function(e){e[e.RightClick=2]="RightClick"})(jy||(jy={}));class EM extends eb{constructor(n){super(n,$8,Xl(n.event.target))}}EM.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return a.button===jy.RightClick?!1:(o?.({event:a}),!0)}}];const Z0={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class RM extends eb{constructor(n){super(n,Z0)}static setup(){return window.addEventListener(Z0.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Z0.move.name,n)};function n(){}}}RM.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;const{touches:s}=a;return s.length>1?!1:(o?.({event:a}),!0)}}];var cc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(cc||(cc={}));var Hh;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hh||(Hh={}));function Q8(e){let{acceleration:n,activator:a=cc.Pointer,canScroll:o,draggingRect:s,enabled:u,interval:c=5,order:d=Hh.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:y,delta:h,threshold:b}=e;const S=Z8({delta:h,disabled:!u}),[w,C]=l8(),E=v.useRef({x:0,y:0}),T=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(a){case cc.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case cc.DraggableRect:return s}},[a,s,p]),M=v.useRef(null),A=v.useCallback(()=>{const P=M.current;if(!P)return;const j=E.current.x*T.current.x,D=E.current.y*T.current.y;P.scrollBy(j,D)},[]),N=v.useMemo(()=>d===Hh.TreeOrder?[...g].reverse():g,[d,g]);v.useEffect(()=>{if(!u||!g.length||!O){C();return}for(const P of N){if(o?.(P)===!1)continue;const j=g.indexOf(P),D=y[j];if(!D)continue;const{direction:z,speed:F}=U8(P,D,O,n,b);for(const G of["x","y"])S[G][z[G]]||(F[G]=0,z[G]=0);if(F.x>0||F.y>0){C(),M.current=P,w(A,c),E.current=F,T.current=z;return}}E.current={x:0,y:0},T.current={x:0,y:0},C()},[n,A,o,C,u,c,JSON.stringify(O),JSON.stringify(S),w,g,N,y,JSON.stringify(b)])}const X8={x:{[ur.Backward]:!1,[ur.Forward]:!1},y:{[ur.Backward]:!1,[ur.Forward]:!1}};function Z8(e){let{delta:n,disabled:a}=e;const o=zh(n);return Zc(s=>{if(a||!o||!s)return X8;const u={x:Math.sign(n.x-o.x),y:Math.sign(n.y-o.y)};return{x:{[ur.Backward]:s.x[ur.Backward]||u.x===-1,[ur.Forward]:s.x[ur.Forward]||u.x===1},y:{[ur.Backward]:s.y[ur.Backward]||u.y===-1,[ur.Forward]:s.y[ur.Forward]||u.y===1}}},[a,n,o])}function J8(e,n){const a=n!=null?e.get(n):void 0,o=a?a.node.current:null;return Zc(s=>{var u;return n==null?null:(u=o??s)!=null?u:null},[o,n])}function W8(e,n){return v.useMemo(()=>e.reduce((a,o)=>{const{sensor:s}=o,u=s.activators.map(c=>({eventName:c.eventName,handler:n(c.handler,o)}));return[...a,...u]},[]),[e,n])}var wc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wc||(wc={}));var Iy;(function(e){e.Optimized="optimized"})(Iy||(Iy={}));const AE=new Map;function eH(e,n){let{dragging:a,dependencies:o,config:s}=n;const[u,c]=v.useState(null),{frequency:d,measure:p,strategy:g}=s,y=v.useRef(e),h=E(),b=xc(h),S=v.useCallback(function(T){T===void 0&&(T=[]),!b.current&&c(O=>O===null?T:O.concat(T.filter(M=>!O.includes(M))))},[b]),w=v.useRef(null),C=Zc(T=>{if(h&&!a)return AE;if(!T||T===AE||y.current!==e||u!=null){const O=new Map;for(let M of e){if(!M)continue;if(u&&u.length>0&&!u.includes(M.id)&&M.rect.current){O.set(M.id,M.rect.current);continue}const A=M.node.current,N=A?new Jv(p(A),A):null;M.rect.current=N,N&&O.set(M.id,N)}return O}return T},[e,u,a,h,p]);return v.useEffect(()=>{y.current=e},[e]),v.useEffect(()=>{h||S()},[a,h]),v.useEffect(()=>{u&&u.length>0&&c(null)},[JSON.stringify(u)]),v.useEffect(()=>{h||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{S(),w.current=null},d))},[d,h,S,...o]),{droppableRects:C,measureDroppableContainers:S,measuringScheduled:u!=null};function E(){switch(g){case wc.Always:return!1;case wc.BeforeDragging:return a;default:return!a}}}function tb(e,n){return Zc(a=>e?a||(typeof n=="function"?n(e):e):null,[n,e])}function tH(e,n){return tb(e,n)}function nH(e){let{callback:n,disabled:a}=e;const o=Vp(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(o)},[o,a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function Yp(e){let{callback:n,disabled:a}=e;const o=Vp(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(o)},[a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function rH(e){return new Jv(Zl(e),e)}function DE(e,n,a){n===void 0&&(n=rH);const[o,s]=v.useState(null);function u(){s(p=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=p??a)!=null?g:null}const y=n(e);return JSON.stringify(p)===JSON.stringify(y)?p:y})}const c=nH({callback(p){if(e)for(const g of p){const{type:y,target:h}=g;if(y==="childList"&&h instanceof HTMLElement&&h.contains(e)){u();break}}}}),d=Yp({callback:u});return Ka(()=>{u(),e?(d?.observe(e),c?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),c?.disconnect())},[e]),o}function aH(e){const n=tb(e);return fM(e,n)}const NE=[];function oH(e){const n=v.useRef(e),a=Zc(o=>e?o&&o!==NE&&e&&n.current&&e.parentNode===n.current.parentNode?o:Kp(e):NE,[e]);return v.useEffect(()=>{n.current=e},[e]),a}function iH(e){const[n,a]=v.useState(null),o=v.useRef(e),s=v.useCallback(u=>{const c=Q0(u.target);c&&a(d=>d?(d.set(c,ky(c)),new Map(d)):null)},[]);return v.useEffect(()=>{const u=o.current;if(e!==u){c(u);const d=e.map(p=>{const g=Q0(p);return g?(g.addEventListener("scroll",s,{passive:!0}),[g,ky(g)]):null}).filter(p=>p!=null);a(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(u)};function c(d){d.forEach(p=>{const g=Q0(p);g?.removeEventListener("scroll",s)})}},[s,e]),v.useMemo(()=>e.length?n?Array.from(n.values()).reduce((u,c)=>kl(u,c),Ya):bM(e):Ya,[e,n])}function kE(e,n){n===void 0&&(n=[]);const a=v.useRef(null);return v.useEffect(()=>{a.current=null},n),v.useEffect(()=>{const o=e!==Ya;o&&!a.current&&(a.current=e),!o&&a.current&&(a.current=null)},[e]),a.current?Sc(e,a.current):Ya}function sH(e){v.useEffect(()=>{if(!Bp)return;const n=e.map(a=>{let{sensor:o}=a;return o.setup==null?void 0:o.setup()});return()=>{for(const a of n)a?.()}},e.map(n=>{let{sensor:a}=n;return a}))}function lH(e,n){return v.useMemo(()=>e.reduce((a,o)=>{let{eventName:s,handler:u}=o;return a[s]=c=>{u(c,n)},a},{}),[e,n])}function CM(e){return v.useMemo(()=>e?P8(e):null,[e])}const jE=[];function uH(e,n){n===void 0&&(n=Zl);const[a]=e,o=CM(a?Fr(a):null),[s,u]=v.useState(jE);function c(){u(()=>e.length?e.map(p=>yM(p)?o:new Jv(n(p),p)):jE)}const d=Yp({callback:c});return Ka(()=>{d?.disconnect(),c(),e.forEach(p=>d?.observe(p))},[e]),s}function TM(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Xc(n)?n:e}function cH(e){let{measure:n}=e;const[a,o]=v.useState(null),s=v.useCallback(g=>{for(const{target:y}of g)if(Xc(y)){o(h=>{const b=n(y);return h?{...h,width:b.width,height:b.height}:b});break}},[n]),u=Yp({callback:s}),c=v.useCallback(g=>{const y=TM(g);u?.disconnect(),y&&u?.observe(y),o(y?n(y):null)},[n,u]),[d,p]=Lh(c);return v.useMemo(()=>({nodeRef:d,rect:a,setRef:p}),[a,d,p])}const dH=[{sensor:wM,options:{}},{sensor:Wv,options:{}}],fH={current:{}},dh={draggable:{measure:CE},droppable:{measure:CE,strategy:wc.WhileDragging,frequency:Iy.Optimized},dragOverlay:{measure:Zl}};class dc extends Map{get(n){var a;return n!=null&&(a=super.get(n))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:a}=n;return!a})}getNodeFor(n){var a,o;return(a=(o=this.get(n))==null?void 0:o.node.current)!=null?a:void 0}}const hH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Uh},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:dh,measureDroppableContainers:Uh,windowRect:null,measuringScheduled:!1},OM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Uh,draggableNodes:new Map,over:null,measureDroppableContainers:Uh},Wc=v.createContext(OM),MM=v.createContext(hH);function pH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dc}}}function gH(e,n){switch(n.type){case ar.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ar.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ar.DragEnd:case ar.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ar.RegisterDroppable:{const{element:a}=n,{id:o}=a,s=new dc(e.droppable.containers);return s.set(o,a),{...e,droppable:{...e.droppable,containers:s}}}case ar.SetDroppableDisabled:{const{id:a,key:o,disabled:s}=n,u=e.droppable.containers.get(a);if(!u||o!==u.key)return e;const c=new dc(e.droppable.containers);return c.set(a,{...u,disabled:s}),{...e,droppable:{...e.droppable,containers:c}}}case ar.UnregisterDroppable:{const{id:a,key:o}=n,s=e.droppable.containers.get(a);if(!s||o!==s.key)return e;const u=new dc(e.droppable.containers);return u.delete(a),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}function mH(e){let{disabled:n}=e;const{active:a,activatorEvent:o,draggableNodes:s}=v.useContext(Wc),u=zh(o),c=zh(a?.id);return v.useEffect(()=>{if(!n&&!o&&u&&c!=null){if(!qp(u)||document.activeElement===u.target)return;const d=s.get(c);if(!d)return;const{activatorNode:p,node:g}=d;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const y of[p.current,g.current]){if(!y)continue;const h=d8(y);if(h){h.focus();break}}})}},[o,n,s,c,u]),null}function AM(e,n){let{transform:a,...o}=n;return e!=null&&e.length?e.reduce((s,u)=>u({transform:s,...o}),a):a}function yH(e){return v.useMemo(()=>({draggable:{...dh.draggable,...e?.draggable},droppable:{...dh.droppable,...e?.droppable},dragOverlay:{...dh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function vH(e){let{activeNode:n,measure:a,initialRect:o,config:s=!0}=e;const u=v.useRef(!1),{x:c,y:d}=typeof s=="boolean"?{x:s,y:s}:s;Ka(()=>{if(!c&&!d||!n){u.current=!1;return}if(u.current||!o)return;const g=n?.node.current;if(!g||g.isConnected===!1)return;const y=a(g),h=fM(y,o);if(c||(h.x=0),d||(h.y=0),u.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const b=pM(g);b&&b.scrollBy({top:h.y,left:h.x})}},[n,c,d,o,a])}const Gp=v.createContext({...Ya,scaleX:1,scaleY:1});var Si;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Si||(Si={}));const bH=v.memo(function(n){var a,o,s,u;let{id:c,accessibility:d,autoScroll:p=!0,children:g,sensors:y=dH,collisionDetection:h=O8,measuring:b,modifiers:S,...w}=n;const C=v.useReducer(gH,void 0,pH),[E,T]=C,[O,M]=y8(),[A,N]=v.useState(Si.Uninitialized),P=A===Si.Initialized,{draggable:{active:j,nodes:D,translate:z},droppable:{containers:F}}=E,G=j!=null?D.get(j):null,J=v.useRef({initial:null,translated:null}),K=v.useMemo(()=>{var vt;return j!=null?{id:j,data:(vt=G?.data)!=null?vt:fH,rect:J}:null},[j,G]),H=v.useRef(null),[U,L]=v.useState(null),[$,Y]=v.useState(null),V=xc(w,Object.values(w)),Q=Jc("DndDescribedBy",c),ee=v.useMemo(()=>F.getEnabled(),[F]),q=yH(b),{droppableRects:se,measureDroppableContainers:k,measuringScheduled:B}=eH(ee,{dragging:P,dependencies:[z.x,z.y],config:q.droppable}),W=J8(D,j),re=v.useMemo(()=>$?_h($):null,[$]),Ee=ft(),le=tH(W,q.draggable.measure);vH({activeNode:j!=null?D.get(j):null,config:Ee.layoutShiftCompensation,initialRect:le,measure:q.draggable.measure});const me=DE(W,q.draggable.measure,le),ge=DE(W?W.parentElement:null),ce=v.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=F.getNodeFor((a=ce.current.over)==null?void 0:a.id),ve=cH({measure:q.dragOverlay.measure}),Pe=(o=ve.nodeRef.current)!=null?o:W,Me=P?(s=ve.rect)!=null?s:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Fe=aH(Le?null:me),Oe=CM(Pe?Fr(Pe):null),Ue=oH(P?Te??W:null),be=uH(Ue),He=AM(S,{transform:{x:z.x-Fe.x,y:z.y-Fe.y,scaleX:1,scaleY:1},activatorEvent:$,active:K,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Me,over:ce.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ue,scrollableAncestorRects:be,windowRect:Oe}),Ze=re?kl(re,z):null,it=iH(Ue),de=kE(it),we=kE(it,[me]),Ye=kl(He,de),De=Me?k8(Me,He):null,ke=K&&De?h({active:K,collisionRect:De,droppableRects:se,droppableContainers:ee,pointerCoordinates:Ze}):null,yt=dM(ke,"id"),[ut,ht]=v.useState(null),Ot=Le?He:kl(He,we),Dt=D8(Ot,(u=ut?.rect)!=null?u:null,me),en=v.useRef(null),an=v.useCallback((vt,gt)=>{let{sensor:zt,options:un}=gt;if(H.current==null)return;const je=D.get(H.current);if(!je)return;const ot=vt.nativeEvent,Ie=new zt({active:H.current,activeNode:je,event:ot,options:un,context:ce,onAbort(Ge){if(!D.get(Ge))return;const{onDragAbort:Rt}=V.current,_={id:Ge};Rt?.(_),O({type:"onDragAbort",event:_})},onPending(Ge,et,Rt,_){if(!D.get(Ge))return;const{onDragPending:ne}=V.current,ye={id:Ge,constraint:et,initialCoordinates:Rt,offset:_};ne?.(ye),O({type:"onDragPending",event:ye})},onStart(Ge){const et=H.current;if(et==null)return;const Rt=D.get(et);if(!Rt)return;const{onDragStart:_}=V.current,Z={activatorEvent:ot,active:{id:et,data:Rt.data,rect:J}};cr.unstable_batchedUpdates(()=>{_?.(Z),N(Si.Initializing),T({type:ar.DragStart,initialCoordinates:Ge,active:et}),O({type:"onDragStart",event:Z}),L(en.current),Y(ot)})},onMove(Ge){T({type:ar.DragMove,coordinates:Ge})},onEnd:ze(ar.DragEnd),onCancel:ze(ar.DragCancel)});en.current=Ie;function ze(Ge){return async function(){const{active:Rt,collisions:_,over:Z,scrollAdjustedTranslate:ne}=ce.current;let ye=null;if(Rt&&ne){const{cancelDrop:xe}=V.current;ye={activatorEvent:ot,active:Rt,collisions:_,delta:ne,over:Z},Ge===ar.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&(Ge=ar.DragCancel)}H.current=null,cr.unstable_batchedUpdates(()=>{T({type:Ge}),N(Si.Uninitialized),ht(null),L(null),Y(null),en.current=null;const xe=Ge===ar.DragEnd?"onDragEnd":"onDragCancel";if(ye){const qe=V.current[xe];qe?.(ye),O({type:xe,event:ye})}})}}},[D]),tn=v.useCallback((vt,gt)=>(zt,un)=>{const je=zt.nativeEvent,ot=D.get(un);if(H.current!==null||!ot||je.dndKit||je.defaultPrevented)return;const Ie={active:ot};vt(zt,gt.options,Ie)===!0&&(je.dndKit={capturedBy:gt.sensor},H.current=un,an(zt,gt))},[D,an]),We=W8(y,tn);sH(y),Ka(()=>{me&&A===Si.Initializing&&N(Si.Initialized)},[me,A]),v.useEffect(()=>{const{onDragMove:vt}=V.current,{active:gt,activatorEvent:zt,collisions:un,over:je}=ce.current;if(!gt||!zt)return;const ot={active:gt,activatorEvent:zt,collisions:un,delta:{x:Ye.x,y:Ye.y},over:je};cr.unstable_batchedUpdates(()=>{vt?.(ot),O({type:"onDragMove",event:ot})})},[Ye.x,Ye.y]),v.useEffect(()=>{const{active:vt,activatorEvent:gt,collisions:zt,droppableContainers:un,scrollAdjustedTranslate:je}=ce.current;if(!vt||H.current==null||!gt||!je)return;const{onDragOver:ot}=V.current,Ie=un.get(yt),ze=Ie&&Ie.rect.current?{id:Ie.id,rect:Ie.rect.current,data:Ie.data,disabled:Ie.disabled}:null,Ge={active:vt,activatorEvent:gt,collisions:zt,delta:{x:je.x,y:je.y},over:ze};cr.unstable_batchedUpdates(()=>{ht(ze),ot?.(Ge),O({type:"onDragOver",event:Ge})})},[yt]),Ka(()=>{ce.current={activatorEvent:$,active:K,activeNode:W,collisionRect:De,collisions:ke,droppableRects:se,draggableNodes:D,draggingNode:Pe,draggingNodeRect:Me,droppableContainers:F,over:ut,scrollableAncestors:Ue,scrollAdjustedTranslate:Ye},J.current={initial:Me,translated:De}},[K,W,ke,De,D,Pe,Me,se,F,ut,Ue,Ye]),Q8({...Ee,delta:z,draggingRect:De,pointerCoordinates:Ze,scrollableAncestors:Ue,scrollableAncestorRects:be});const xt=v.useMemo(()=>({active:K,activeNode:W,activeNodeRect:me,activatorEvent:$,collisions:ke,containerNodeRect:ge,dragOverlay:ve,draggableNodes:D,droppableContainers:F,droppableRects:se,over:ut,measureDroppableContainers:k,scrollableAncestors:Ue,scrollableAncestorRects:be,measuringConfiguration:q,measuringScheduled:B,windowRect:Oe}),[K,W,me,$,ke,ge,ve,D,F,se,ut,k,Ue,be,q,B,Oe]),Xt=v.useMemo(()=>({activatorEvent:$,activators:We,active:K,activeNodeRect:me,ariaDescribedById:{draggable:Q},dispatch:T,draggableNodes:D,over:ut,measureDroppableContainers:k}),[$,We,K,me,T,Q,D,ut,k]);return Ne.createElement(cM.Provider,{value:M},Ne.createElement(Wc.Provider,{value:Xt},Ne.createElement(MM.Provider,{value:xt},Ne.createElement(Gp.Provider,{value:Dt},g)),Ne.createElement(mH,{disabled:d?.restoreFocus===!1})),Ne.createElement(x8,{...d,hiddenTextDescribedById:Q}));function ft(){const vt=U?.autoScrollEnabled===!1,gt=typeof p=="object"?p.enabled===!1:p===!1,zt=P&&!vt&&!gt;return typeof p=="object"?{...p,enabled:zt}:{enabled:zt}}}),xH=v.createContext(null),IE="button",SH="Draggable";function DM(e){let{id:n,data:a,disabled:o=!1,attributes:s}=e;const u=Jc(SH),{activators:c,activatorEvent:d,active:p,activeNodeRect:g,ariaDescribedById:y,draggableNodes:h,over:b}=v.useContext(Wc),{role:S=IE,roleDescription:w="draggable",tabIndex:C=0}=s??{},E=p?.id===n,T=v.useContext(E?Gp:xH),[O,M]=Lh(),[A,N]=Lh(),P=lH(c,n),j=xc(a);Ka(()=>(h.set(n,{id:n,key:u,node:O,activatorNode:A,data:j}),()=>{const z=h.get(n);z&&z.key===u&&h.delete(n)}),[h,n]);const D=v.useMemo(()=>({role:S,tabIndex:C,"aria-disabled":o,"aria-pressed":E&&S===IE?!0:void 0,"aria-roledescription":w,"aria-describedby":y.draggable}),[o,S,C,E,w,y.draggable]);return{active:p,activatorEvent:d,activeNodeRect:g,attributes:D,isDragging:E,listeners:o?void 0:P,node:O,over:b,setNodeRef:M,setActivatorNodeRef:N,transform:T}}function NM(){return v.useContext(MM)}const wH="Droppable",EH={timeout:25};function kM(e){let{data:n,disabled:a=!1,id:o,resizeObserverConfig:s}=e;const u=Jc(wH),{active:c,dispatch:d,over:p,measureDroppableContainers:g}=v.useContext(Wc),y=v.useRef({disabled:a}),h=v.useRef(!1),b=v.useRef(null),S=v.useRef(null),{disabled:w,updateMeasurementsFor:C,timeout:E}={...EH,...s},T=xc(C??o),O=v.useCallback(()=>{if(!h.current){h.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{g(Array.isArray(T.current)?T.current:[T.current]),S.current=null},E)},[E]),M=Yp({callback:O,disabled:w||!c}),A=v.useCallback((D,z)=>{M&&(z&&(M.unobserve(z),h.current=!1),D&&M.observe(D))},[M]),[N,P]=Lh(A),j=xc(n);return v.useEffect(()=>{!M||!N.current||(M.disconnect(),h.current=!1,M.observe(N.current))},[N,M]),v.useEffect(()=>(d({type:ar.RegisterDroppable,element:{id:o,key:u,disabled:a,node:N,rect:b,data:j}}),()=>d({type:ar.UnregisterDroppable,key:u,id:o})),[o]),v.useEffect(()=>{a!==y.current.disabled&&(d({type:ar.SetDroppableDisabled,id:o,key:u,disabled:a}),y.current.disabled=a)},[o,u,a,d]),{active:c,rect:b,isOver:p?.id===o,node:N,over:p,setNodeRef:P}}function RH(e){let{animation:n,children:a}=e;const[o,s]=v.useState(null),[u,c]=v.useState(null),d=zh(a);return!a&&!o&&d&&s(d),Ka(()=>{if(!u)return;const p=o?.key,g=o?.props.id;if(p==null||g==null){s(null);return}Promise.resolve(n(g,u)).then(()=>{s(null)})},[n,o,u]),Ne.createElement(Ne.Fragment,null,a,o?v.cloneElement(o,{ref:c}):null)}const CH={x:0,y:0,scaleX:1,scaleY:1};function TH(e){let{children:n}=e;return Ne.createElement(Wc.Provider,{value:OM},Ne.createElement(Gp.Provider,{value:CH},n))}const OH={position:"fixed",touchAction:"none"},MH=e=>qp(e)?"transform 250ms ease":void 0,AH=v.forwardRef((e,n)=>{let{as:a,activatorEvent:o,adjustScale:s,children:u,className:c,rect:d,style:p,transform:g,transition:y=MH}=e;if(!d)return null;const h=s?g:{...g,scaleX:1,scaleY:1},b={...OH,width:d.width,height:d.height,top:d.top,left:d.left,transform:Di.Transform.toString(h),transformOrigin:s&&o?w8(o,d):void 0,transition:typeof y=="function"?y(o):y,...p};return Ne.createElement(a,{className:c,style:b,ref:n},u)}),DH=e=>n=>{let{active:a,dragOverlay:o}=n;const s={},{styles:u,className:c}=e;if(u!=null&&u.active)for(const[d,p]of Object.entries(u.active))p!==void 0&&(s[d]=a.node.style.getPropertyValue(d),a.node.style.setProperty(d,p));if(u!=null&&u.dragOverlay)for(const[d,p]of Object.entries(u.dragOverlay))p!==void 0&&o.node.style.setProperty(d,p);return c!=null&&c.active&&a.node.classList.add(c.active),c!=null&&c.dragOverlay&&o.node.classList.add(c.dragOverlay),function(){for(const[p,g]of Object.entries(s))a.node.style.setProperty(p,g);c!=null&&c.active&&a.node.classList.remove(c.active)}},NH=e=>{let{transform:{initial:n,final:a}}=e;return[{transform:Di.Transform.toString(n)},{transform:Di.Transform.toString(a)}]},kH={duration:250,easing:"ease",keyframes:NH,sideEffects:DH({styles:{active:{opacity:"0"}}})};function jH(e){let{config:n,draggableNodes:a,droppableContainers:o,measuringConfiguration:s}=e;return Vp((u,c)=>{if(n===null)return;const d=a.get(u);if(!d)return;const p=d.node.current;if(!p)return;const g=TM(c);if(!g)return;const{transform:y}=Fr(c).getComputedStyle(c),h=hM(y);if(!h)return;const b=typeof n=="function"?n:IH(n);return xM(p,s.draggable.measure),b({active:{id:u,data:d.data,node:p,rect:s.draggable.measure(p)},draggableNodes:a,dragOverlay:{node:c,rect:s.dragOverlay.measure(g)},droppableContainers:o,measuringConfiguration:s,transform:h})})}function IH(e){const{duration:n,easing:a,sideEffects:o,keyframes:s}={...kH,...e};return u=>{let{active:c,dragOverlay:d,transform:p,...g}=u;if(!n)return;const y={x:d.rect.left-c.rect.left,y:d.rect.top-c.rect.top},h={scaleX:p.scaleX!==1?c.rect.width*p.scaleX/d.rect.width:1,scaleY:p.scaleY!==1?c.rect.height*p.scaleY/d.rect.height:1},b={x:p.x-y.x,y:p.y-y.y,...h},S=s({...g,active:c,dragOverlay:d,transform:{initial:p,final:b}}),[w]=S,C=S[S.length-1];if(JSON.stringify(w)===JSON.stringify(C))return;const E=o?.({active:c,dragOverlay:d,...g}),T=d.node.animate(S,{duration:n,easing:a,fill:"forwards"});return new Promise(O=>{T.onfinish=()=>{E?.(),O()}})}}let PE=0;function PH(e){return v.useMemo(()=>{if(e!=null)return PE++,PE},[e])}const LH=Ne.memo(e=>{let{adjustScale:n=!1,children:a,dropAnimation:o,style:s,transition:u,modifiers:c,wrapperElement:d="div",className:p,zIndex:g=999}=e;const{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:S,draggableNodes:w,droppableContainers:C,dragOverlay:E,over:T,measuringConfiguration:O,scrollableAncestors:M,scrollableAncestorRects:A,windowRect:N}=NM(),P=v.useContext(Gp),j=PH(h?.id),D=AM(c,{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:S,draggingNodeRect:E.rect,over:T,overlayNodeRect:E.rect,scrollableAncestors:M,scrollableAncestorRects:A,transform:P,windowRect:N}),z=tb(b),F=jH({config:o,draggableNodes:w,droppableContainers:C,measuringConfiguration:O}),G=z?E.setRef:void 0;return Ne.createElement(TH,null,Ne.createElement(RH,{animation:F},h&&j?Ne.createElement(AH,{key:j,id:h.id,ref:G,as:d,activatorEvent:y,adjustScale:n,className:p,transition:u,rect:z,style:{zIndex:g,...s},transform:D},a):null))});function nb(e,n,a){const o=e.slice();return o.splice(a<0?o.length+a:a,0,o.splice(n,1)[0]),o}function zH(e,n){return e.reduce((a,o,s)=>{const u=n.get(o);return u&&(a[s]=u),a},Array(e.length))}function Gf(e){return e!==null&&e>=0}function _H(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}function UH(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const jM=e=>{let{rects:n,activeIndex:a,overIndex:o,index:s}=e;const u=nb(n,o,a),c=n[s],d=u[s];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},$f={scaleX:1,scaleY:1},HH=e=>{var n;let{activeIndex:a,activeNodeRect:o,index:s,rects:u,overIndex:c}=e;const d=(n=u[a])!=null?n:o;if(!d)return null;if(s===a){const g=u[c];return g?{x:0,y:a<c?g.top+g.height-(d.top+d.height):g.top-d.top,...$f}:null}const p=FH(u,s,a);return s>a&&s<=c?{x:0,y:-d.height-p,...$f}:s<a&&s>=c?{x:0,y:d.height+p,...$f}:{x:0,y:0,...$f}};function FH(e,n,a){const o=e[n],s=e[n-1],u=e[n+1];return o?a<n?s?o.top-(s.top+s.height):u?u.top-(o.top+o.height):0:u?u.top-(o.top+o.height):s?o.top-(s.top+s.height):0:0}const IM="Sortable",PM=Ne.createContext({activeIndex:-1,containerId:IM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:jM,disabled:{draggable:!1,droppable:!1}});function BH(e){let{children:n,id:a,items:o,strategy:s=jM,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:g,measureDroppableContainers:y}=NM(),h=Jc(IM,a),b=d.rect!==null,S=v.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),w=c!=null,C=c?S.indexOf(c.id):-1,E=g?S.indexOf(g.id):-1,T=v.useRef(S),O=!_H(S,T.current),M=E!==-1&&C===-1||O,A=UH(u);Ka(()=>{O&&w&&y(S)},[O,S,w,y]),v.useEffect(()=>{T.current=S},[S]);const N=v.useMemo(()=>({activeIndex:C,containerId:h,disabled:A,disableTransforms:M,items:S,overIndex:E,useDragOverlay:b,sortedRects:zH(S,p),strategy:s}),[C,h,A.draggable,A.droppable,M,S,E,p,b,s]);return Ne.createElement(PM.Provider,{value:N},n)}const VH=e=>{let{id:n,items:a,activeIndex:o,overIndex:s}=e;return nb(a,o,s).indexOf(n)},qH=e=>{let{containerId:n,isSorting:a,wasDragging:o,index:s,items:u,newIndex:c,previousItems:d,previousContainerId:p,transition:g}=e;return!g||!o||d!==u&&s===c?!1:a?!0:c!==s&&n===p},KH={duration:200,easing:"ease"},LM="transform",YH=Di.Transition.toString({property:LM,duration:0,easing:"linear"}),GH={roleDescription:"sortable"};function $H(e){let{disabled:n,index:a,node:o,rect:s}=e;const[u,c]=v.useState(null),d=v.useRef(a);return Ka(()=>{if(!n&&a!==d.current&&o.current){const p=s.current;if(p){const g=Zl(o.current,{ignoreTransform:!0}),y={x:p.left-g.left,y:p.top-g.top,scaleX:p.width/g.width,scaleY:p.height/g.height};(y.x||y.y)&&c(y)}}a!==d.current&&(d.current=a)},[n,a,o,s]),v.useEffect(()=>{u&&c(null)},[u]),u}function QH(e){let{animateLayoutChanges:n=qH,attributes:a,disabled:o,data:s,getNewIndex:u=VH,id:c,strategy:d,resizeObserverConfig:p,transition:g=KH}=e;const{items:y,containerId:h,activeIndex:b,disabled:S,disableTransforms:w,sortedRects:C,overIndex:E,useDragOverlay:T,strategy:O}=v.useContext(PM),M=XH(o,S),A=y.indexOf(c),N=v.useMemo(()=>({sortable:{containerId:h,index:A,items:y},...s}),[h,s,A,y]),P=v.useMemo(()=>y.slice(y.indexOf(c)),[y,c]),{rect:j,node:D,isOver:z,setNodeRef:F}=kM({id:c,data:N,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:G,activatorEvent:J,activeNodeRect:K,attributes:H,setNodeRef:U,listeners:L,isDragging:$,over:Y,setActivatorNodeRef:V,transform:Q}=DM({id:c,data:N,attributes:{...GH,...a},disabled:M.draggable}),ee=s8(F,U),q=!!G,se=q&&!w&&Gf(b)&&Gf(E),k=!T&&$,B=k&&se?Q:null,re=se?B??(d??O)({rects:C,activeNodeRect:K,activeIndex:b,overIndex:E,index:A}):null,Ee=Gf(b)&&Gf(E)?u({id:c,items:y,activeIndex:b,overIndex:E}):A,le=G?.id,me=v.useRef({activeId:le,items:y,newIndex:Ee,containerId:h}),ge=y!==me.current.items,ce=n({active:G,containerId:h,isDragging:$,isSorting:q,id:c,index:A,items:y,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=$H({disabled:!ce,index:A,node:D,rect:j});return v.useEffect(()=>{q&&me.current.newIndex!==Ee&&(me.current.newIndex=Ee),h!==me.current.containerId&&(me.current.containerId=h),y!==me.current.items&&(me.current.items=y)},[q,Ee,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:G,activeIndex:b,attributes:H,data:N,rect:j,index:A,newIndex:Ee,items:y,isOver:z,isSorting:q,isDragging:$,listeners:L,node:D,overIndex:E,over:Y,setNodeRef:ee,setActivatorNodeRef:V,setDroppableNodeRef:F,setDraggableNodeRef:U,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===A)return YH;if(!(k&&!qp(J)||!g)&&(q||ce))return Di.Transition.toString({...g,property:LM})}}function XH(e,n){var a,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:n.draggable,droppable:(o=e?.droppable)!=null?o:n.droppable}}function Fh(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const ZH=[Wt.Down,Wt.Right,Wt.Up,Wt.Left],JH=(e,n)=>{let{context:{active:a,collisionRect:o,droppableRects:s,droppableContainers:u,over:c,scrollableAncestors:d}}=n;if(ZH.includes(e.code)){if(e.preventDefault(),!a||!o)return;const p=[];u.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const b=s.get(h.id);if(b)switch(e.code){case Wt.Down:o.top<b.top&&p.push(h);break;case Wt.Up:o.top>b.top&&p.push(h);break;case Wt.Left:o.left>b.left&&p.push(h);break;case Wt.Right:o.left<b.left&&p.push(h);break}});const g=C8({collisionRect:o,droppableRects:s,droppableContainers:p});let y=dM(g,"id");if(y===c?.id&&g.length>1&&(y=g[1].id),y!=null){const h=u.get(a.id),b=u.get(y),S=b?s.get(b.id):null,w=b?.node.current;if(w&&S&&h&&b){const E=Kp(w).some((P,j)=>d[j]!==P),T=zM(h,b),O=WH(h,b),M=E||!T?{x:0,y:0}:{x:O?o.width-S.width:0,y:O?o.height-S.height:0},A={x:S.left,y:S.top};return M.x&&M.y?A:Sc(A,M)}}}};function zM(e,n){return!Fh(e)||!Fh(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function WH(e,n){return!Fh(e)||!Fh(n)||!zM(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}function zo({className:e,size:n="default",...a}){return x.jsx("div",{"data-slot":"card","data-size":n,className:Qe("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),...a})}function eF({className:e,...n}){return x.jsx("div",{"data-slot":"card-header",className:Qe("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),...n})}function tF({className:e,...n}){return x.jsx("div",{"data-slot":"card-content",className:Qe("px-(--card-spacing)",e),...n})}const _M=v.createContext(void 0);function nF(){const e=v.useContext(_M);if(e===void 0)throw new Error(En(63));return e}const rF="data-checked",aF="data-unchecked",UM={...Yl,checked(e){return e?{[rF]:""}:{[aF]:""}}},oF=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u,"aria-labelledby":c,form:d,id:p,inputRef:g,name:y,nativeButton:h=!1,onCheckedChange:b,readOnly:S=!1,required:w=!1,disabled:C=!1,render:E,uncheckedValue:T,value:O,style:M,...A}=n,{clearErrors:N}=Gc(),{state:P,setTouched:j,setDirty:D,validityData:z,setFilled:F,validationMode:G,disabled:J,name:K,validation:H}=qo(),{labelId:U}=Ms(),L=J||C,$=K??y,Y=v.useRef(null),V=Xr(Y,g,H.inputRef),Q=v.useRef(null),ee=$c(L,Q),q=Mr(),se=Gl({id:p}),k=h?void 0:se,[B,W]=Ss({controlled:o,default:!!u,name:"Switch",state:"checked"});Qc(Q,q,B,void 0,!L,y),_e(()=>{F(B)},[B,F]),Kl(B,()=>{N($),D(B!==z.initialValue),H.change(B)});const{getButtonProps:re,buttonRef:Ee}=yo({disabled:L,native:h}),le=Kv(c,U,Y,!h,k,A["aria-label"]),me={id:h?se:q,role:"switch","aria-checked":B,"aria-readonly":S||void 0,"aria-required":w||void 0,"aria-labelledby":le,onFocus(){ee(!0)},onBlur(){const ve=Y.current;!ve||L||(j(!0),ee(!1),G==="onBlur"&&H.commit(ve.checked))},onClick(ve){if(S||L)return;ve.preventDefault();const Pe=Y.current;Pe&&gs(Pe,ve)}},ge={...H.getValidationProps(L),checked:B,disabled:L,form:d,id:k,name:$,required:w,style:$?ep:jc,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:V,onChange(ve){if(ve.nativeEvent.defaultPrevented)return;if(S){ve.preventDefault();return}const Pe=ve.currentTarget.checked,Me=dt(Hr,ve.nativeEvent);b?.(Pe,Me),!Me.isCanceled&&W(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){Q.current?.focus()},...O!==void 0?{value:O}:$t},ce=v.useMemo(()=>({...P,checked:B,disabled:L,readOnly:S,required:w}),[P,B,L,S,w]),Te=Mt("span",n,{state:ce,ref:[a,Q,Ee],props:[me,A,re,ve=>H.getValidationProps(L,ve)],stateAttributesMapping:UM});return x.jsxs(_M.Provider,{value:ce,children:[Te,!B&&$&&T!==void 0&&x.jsx("input",{type:"hidden",form:d,name:$,value:T,disabled:L}),x.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),iF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=nF();return Mt("span",n,{state:d,ref:a,stateAttributesMapping:UM,props:c})});function sF({className:e,...n}){return x.jsx(oF,{"data-slot":"switch",className:Qe(`
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),...n,children:x.jsx(iF,{"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 lF(e){return`library:${e}`}function HM(e,n){return`assigned:${e}:${n}`}function FM(e){return`agent:${e}`}function uF(e){return String(e).startsWith("assigned:")}function Py(e){return rb(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function jl(e){return rb(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function LE(e){return rb(e)&&e.type==="agent"&&typeof e.agentId=="string"}function rb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const cF="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",dF="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",fF={openai:{src:cF,invertInDark:!0},claudecode:{src:dF,invertInDark:!1}};function hF({icon:e,className:n}){const a=fF[e];return x.jsx("div",{"aria-hidden":"true",className:Qe(`
43
- flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
44
- text-foreground
45
- `,n),children:a?x.jsx("img",{src:a.src,alt:"",draggable:!1,className:Qe("size-4",a.invertInDark&&"dark:invert")}):x.jsx(wC,{className:"size-4"})})}function pF({agent:e,instructionsById:n,isInstructionsLoading:a,isPending:o,isReapplying:s,onRemoveInstruction:u,onToggle:c,onReapply:d,onOpenFile:p}){const{t:g}=Qt(),{isOver:y,setNodeRef:h}=kM({id:FM(e.id),data:{type:"agent",agentId:e.id},disabled:o}),b=e.enabled||e.instructionIds.length>0,S=e.enabled?g("agents.reapplyHint"):g("agents.reapplyDisabledHint"),w=g(b?e.enabled?"agents.toggleOnHint":"agents.toggleOffHint":"agents.enableRequiresInstruction");return x.jsxs(zo,{"data-agent-id":e.id,ref:h,className:Qe("gap-0 py-0 transition-shadow",y&&"ring-2 ring-ring/40"),children:[x.jsxs("div",{className:"flex items-center gap-3 p-3",children:[x.jsx(hF,{icon:e.icon}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),x.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:()=>{p(e.id)},children:e.instructionFile})]}),x.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[x.jsxs(Oh,{children:[x.jsx(Mh,{render:x.jsx("span",{className:"inline-flex"}),children:x.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:o||!e.enabled,onClick:()=>{d(e.id)},children:x.jsx(aP,{className:Qe(s&&"animate-spin")})})}),x.jsx(Ah,{children:S})]}),x.jsxs(Oh,{children:[x.jsx(Mh,{render:x.jsx("span",{className:"inline-flex"}),children:x.jsx(sF,{checked:e.enabled,disabled:o||!b,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:C=>{c(e.id,C)}})}),x.jsx(Ah,{children:w})]})]})]}),x.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?x.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")}):x.jsx(BH,{items:e.instructionIds.map(C=>HM(e.id,C)),strategy:HH,children:x.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((C,E)=>{const T=n.get(C),O=T?.name??C;return x.jsx(gF,{agentId:e.id,index:E,instructionId:C,instructionName:a&&!T?g("agents.loadingInstruction"):O,isPending:o,onRemove:u},C)})})})})]})}function gF({agentId:e,index:n,instructionId:a,instructionName:o,isPending:s,onRemove:u}){const{t:c}=Qt(),{attributes:d,isDragging:p,isOver:g,listeners:y,setNodeRef:h,transform:b,transition:S}=QH({id:HM(e,a),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:a},disabled:s});return x.jsxs("li",{...d,...y,ref:h,"data-instruction-id":a,style:{transform:Di.Transform.toString(b),transition:S},className:Qe(`
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",p&&"z-10",s?"cursor-default":`
57
- cursor-grab
58
- active:cursor-grabbing
59
- `),children:[x.jsx(mv,{"aria-hidden":"true",className:`
60
- size-3.5 shrink-0 text-muted-foreground
61
- group-active:cursor-grabbing
62
- `}),x.jsx("span",{className:`
63
- w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
64
- `,children:n+1}),x.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:o}),x.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":c("agents.removeInstructionAria",{name:o}),disabled:s,onClick:()=>{u(e,a)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:x.jsx(Ii,{})})]})}const BM="/api/agents";class VM extends Error{constructor(n,a){super(a),this.code=n,this.name="AgentApiError"}code}function mF(e){return ed(BM,{signal:e})}function yF(e,n){return ed($p(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:n})})}function vF(e,n){return ed($p(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:n})})}function bF(e){return ed($p(e,"reapply"),{method:"POST"})}function xF(e){return ed($p(e,"open-file"),{method:"POST"})}function $p(e,n){return`${BM}/${encodeURIComponent(e)}/${n}`}async function ed(e,n){const a=await fetch(e,n);if(!a.ok){const o=await SF(a);throw new VM(o.code,o.message)}return a.json()}async function SF(e){try{const n=await e.json();return{code:n.error?.code??"AGENT_REQUEST_FAILED",message:n.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"AGENT_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const zr=["agents"],Qf=["agents","update"];function wF(){const{t:e}=Qt(),n=mo(),a=ql({queryKey:zr,queryFn:({signal:h})=>mF(h),retry:!1});function o(h){n.setQueryData(zr,b=>b?.map(S=>S.id===h.id?h:S))}const s=fa({mutationKey:Qf,mutationFn:({agentId:h,instructionIds:b})=>yF(h,b),onMutate:async({previous:h})=>(await n.cancelQueries({queryKey:zr}),{previous:h}),onError:(h,b,S)=>{S?.previous&&n.setQueryData(zr,S.previous),kn.error(e("agents.updateError"))},onSuccess:o,onSettled:()=>n.invalidateQueries({queryKey:zr})}),u=fa({mutationKey:Qf,mutationFn:({agentId:h,enabled:b})=>vF(h,b),onMutate:async({agentId:h,enabled:b})=>{await n.cancelQueries({queryKey:zr});const S=n.getQueryData(zr);return n.setQueryData(zr,w=>w?.map(C=>C.id===h?{...C,enabled:b}:C)),{previous:S}},onError:(h,b,S)=>{S?.previous&&n.setQueryData(zr,S.previous),kn.error(e("agents.enableError"))},onSuccess:h=>{o(h),kn.success(e(h.enabled?"agents.applied":"agents.removed"))},onSettled:()=>n.invalidateQueries({queryKey:zr})}),c=fa({mutationKey:Qf,mutationFn:h=>bF(h),onSuccess:h=>{o(h),kn.success(e("agents.reapplied"))},onError:()=>{kn.error(e("agents.reapplyError"))},onSettled:()=>n.invalidateQueries({queryKey:zr})}),d=fa({mutationKey:Qf,mutationFn:h=>xF(h),onError:h=>{kn.error(e(h instanceof VM&&h.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),p=[s,u,c,d],g=new Set;for(const h of p){if(!h.isPending)continue;const b=EF(h.variables);b&&g.add(b)}const y=new Set(c.isPending&&typeof c.variables=="string"?[c.variables]:[]);return{agents:a.data??[],isLoading:a.isPending,isError:a.isError&&a.data===void 0,retry:a.refetch,pendingAgentIds:g,reapplyingAgentIds:y,updateInstructions:(h,b)=>{const S=n.getQueryData(zr);n.setQueryData(zr,w=>w?.map(C=>C.id===h?{...C,instructionIds:b,enabled:b.length>0&&C.enabled}:C)),s.mutate({agentId:h,instructionIds:b,previous:S})},setEnabled:(h,b)=>{u.mutate({agentId:h,enabled:b})},reapply:h=>{c.mutate(h)},openFile:h=>{d.mutate(h)}}}function EF(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"agentId"in e){const n=e.agentId;return typeof n=="string"?n:void 0}}const ab="/api/instructions";class qM extends Error{constructor(n,a){super(a),this.code=n,this.name="InstructionApiError"}code}function RF(e){return ob(ab,{signal:e})}function CF(e){return ob(ab,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function TF(e,n){return ob(KM(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}async function OF(e){const n=await fetch(KM(e),{method:"DELETE"});if(n.ok)return;const a=await YM(n);throw new qM(a.code,a.message)}async function ob(e,n){const a=await fetch(e,n);if(!a.ok){const o=await YM(a);throw new qM(o.code,o.message)}return a.json()}function KM(e){return`${ab}/${encodeURIComponent(e)}`}async function YM(e){try{const n=await e.json();return{code:n.error?.code??"INSTRUCTION_REQUEST_FAILED",message:n.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"INSTRUCTION_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}function Ec({className:e,description:n,icon:a,title:o}){let s=null;return n!=null&&(s=x.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:n})),x.jsxs("div",{"data-slot":"empty",className:Qe(`
65
- flex w-full flex-1 flex-col items-center justify-center gap-2 px-4
66
- py-10 text-center
67
- `,e),children:[a&&x.jsx("div",{className:`
68
- flex size-8 items-center justify-center rounded-md bg-muted
69
- text-muted-foreground
70
- `,children:x.jsx(a,{"aria-hidden":"true",className:"size-4"})}),x.jsx("div",{className:"text-sm font-medium",children:o}),s]})}function MF(e){const[n,a]=v.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),o=v.useRef(null),s=v.useRef(null),u=v.useRef(null),c=v.useRef(null),d=v.useRef(!0),p=v.useRef(null),g=Fl(),y=v.useMemo(()=>({anchor:n,setAnchor:a,actionsRef:u,backdropRef:o,internalBackdropRef:s,positionerRef:c,allowMouseUpTriggerRef:d,initialCursorPointRef:p,rootId:g}),[n,g]);return x.jsx(fO.Provider,{value:y,children:x.jsx(Ap.Provider,{value:void 0,children:x.jsx(jO,{...e})})})}const zE=500,AF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,{setAnchor:d,actionsRef:p,internalBackdropRef:g,backdropRef:y,positionerRef:h,allowMouseUpTriggerRef:b,initialCursorPointRef:S,rootId:w}=Dp(!1),{store:C}=Vo(!1),E=C.useState("open"),T=C.useState("disabled"),O=v.useRef(null),M=v.useRef(null),A=Un(),N=Un(),P=v.useRef(!1),j=v.useRef(null);function D(U,L,$){const Y=$.type.startsWith("touch");S.current={x:U,y:L},d({getBoundingClientRect(){return DOMRect.fromRect({width:Y?10:0,height:Y?10:0,x:U,y:L})}}),P.current=!1,p.current?.setOpen(!0,dt(qa,$)),N.start(zE,()=>{P.current=!0})}function z(U){if(T)return;b.current=!0,Ba(U),D(U.clientX,U.clientY,U.nativeEvent);const L=Gt(O.current);j.current?.abort();const $=new AbortController;j.current=$,L.addEventListener("mouseup",Y=>{if(b.current=!1,!P.current)return;N.clear(),P.current=!1;const V=tr(Y);at(h.current,V)||w&&V&&Bv(V)===w||p.current?.setOpen(!1,dt(Xy,Y))},{once:!0,signal:$.signal})}function F(){A.clear(),M.current=null}function G(U){if(T){F();return}if(b.current=!1,U.touches.length!==1){F();return}U.stopPropagation();const L=U.touches[0],$={x:L.clientX,y:L.clientY};M.current=$,A.start(zE,()=>{D($.x,$.y,U.nativeEvent)})}function J(U){if(U.touches.length!==1){F();return}if(A.isStarted()&&M.current){const L=U.touches[0],$=10,Y=Math.abs(L.clientX-M.current.x),V=Math.abs(L.clientY-M.current.y);(Y>$||V>$)&&F()}}return v.useEffect(()=>()=>{j.current?.abort()},[]),v.useEffect(()=>{function U($){if(T)return;const V=tr($);(at(O.current,V)||at(g.current,V)||at(y.current,V))&&$.preventDefault()}const L=Gt(O.current);return jt(L,"contextmenu",U)},[y,T,g]),Mt("div",n,{state:{open:E},ref:[O,a],props:[{onContextMenu:z,onTouchStart:G,onTouchMove:J,onTouchEnd:F,onTouchCancel:F,style:{WebkitTouchCallout:"none"}},c],stateAttributesMapping:ph})}),DF=OO;function NF({...e}){return x.jsx(MF,{"data-slot":"context-menu",...e})}function kF({className:e,...n}){return x.jsx(AF,{"data-slot":"context-menu-trigger",className:Qe("select-none",e),...n})}function jF({className:e,align:n="start",alignOffset:a=4,side:o="right",sideOffset:s=0,...u}){return x.jsx(EO,{children:x.jsx(DF,{className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:x.jsx(SO,{"data-slot":"context-menu-content",className:Qe("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),...u})})})}function IF({className:e,inset:n,variant:a="default",...o}){return x.jsx(bO,{"data-slot":"context-menu-item","data-inset":n,"data-variant":a,className:Qe("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),...o})}const GM=v.createContext(void 0);function Qp(e){const n=v.useContext(GM);if(n===void 0&&!e)throw new Error(En(47));return n}const PF={...Lo,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Lo.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,n)=>e.openChangeReason===qa&&Lo.isOpenedByTrigger(e,n),isTouchPressOpen:(e,n)=>n&&e.openMethod==="touch"&&e.openChangeReason===qa,hasTriggerFocusGuards:(e,n)=>Lo.isOpenedByTrigger(e,n)&&!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 LF extends Bl{constructor(n,a,o){const s=new Lc;super(zF(n,s,a,o),_F(s),PF)}setOpen=(n,a)=>{const o=a.reason===qn,s=a.reason===qa&&a.event.detail===0,u=!n&&(a.reason===Nc||a.reason==null),c=up(a),d=this.select("activeTriggerId");if(!n&&a.reason===aR&&a.trigger==null&&d!=null&&(a.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(n,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,a);const p=()=>{const y=lp(this.state,n,a.trigger,c());y.openChangeReason=a.reason,this.update(y)};o?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(DR,()=>{this.context.stickIfOpen=!1}),cr.flushSync(p)):p();let g;s?g="click":u?g="dismiss":a.reason===Ti&&(g="focus"),this.set("instantType",g)}}function zF(e,n,a,o=!1){const s={...pp(n,a,o),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 s.open&&e?.mounted===void 0&&(s.mounted=!0),s}function _F(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new Da,stickIfOpen:!0,triggerElements:e}}const _E=Tc(function({props:n}){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,modal:d=!1,handle:p,triggerId:g,defaultTriggerId:y=null}=n,h=HF(p,{modal:d,open:s,openProp:o,activeTriggerId:y,triggerIdProp:g});h.useControlledProp("openProp",o),h.useControlledProp("triggerIdProp",g);const b=h.useState("open"),S=h.useState("mounted"),w=h.useState("payload");h.useContextCallback("onOpenChange",u),h.useContextCallback("onOpenChangeComplete",c),KR(h,b),cp(h);const{forceUnmount:C}=dp(b,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),v.useEffect(()=>{b||h.context.stickIfOpenTimeout.clear()},[h,b]),v.useImperativeHandle(n.actionsRef,()=>({unmount:C,close:()=>h.setOpen(!1,dt(kc))}),[C,h]);const E=b||S||p!=null;return x.jsxs(GM.Provider,{value:h,children:[p&&x.jsx(sp,{handle:p,store:h}),E&&x.jsx(FF,{store:h,modal:d}),typeof a=="function"?a({payload:w}):a]})});function UF(e){return Qp(!0)?x.jsx(_E,{props:e}):x.jsx(UR,{children:x.jsx(_E,{props:e})})}function HF(e,n){const a=uv((o,s)=>new LF(n,o,s));return v.useEffect(()=>a.context.stickIfOpenTimeout.disposeEffect(),[a]),a}function FF({store:e,modal:n}){const a=e.useState("floatingRootContext"),o=Ic(a,{outsidePressEvent:{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),s=o.reference,u=o.floating;return fp(e,{activeTriggerProps:s,inactiveTriggerProps:s,popupProps:u}),null}const $M=v.createContext(void 0);function BF(){const e=v.useContext($M);if(e===void 0)throw new Error(En(45));return e}const VF=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return Qp().useState("mounted")||o?x.jsx($M.Provider,{value:o,children:x.jsx(ap,{ref:a,...s})}):null}),QM=v.createContext(void 0);function qF(){const e=v.useContext(QM);if(!e)throw new Error(En(46));return e}const KF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,anchor:c,positionMethod:d,side:p,align:g,sideOffset:y,alignOffset:h,collisionBoundary:b="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:C,disableAnchorTracking:E=!1,collisionAvoidance:T=ov,...O}=n,M=Qp(),A=BF(),N=sv(),P=M.useState("floatingRootContext"),j=M.useState("mounted"),D=M.useState("open"),z=M.useState("openChangeReason"),F=M.useState("activeTriggerElement"),G=M.useState("modal"),J=M.useState("openMethod"),K=M.useState("positionerElement"),H=M.useState("instantType"),U=M.useState("transitionStatus"),L=M.useState("adaptiveOrigin"),$=vp({anchor:c,floatingRootContext:P,positionMethod:d,mounted:j,side:p,sideOffset:y,align:g,alignOffset:h,arrowPadding:w,collisionBoundary:b,collisionPadding:S,sticky:C,disableAnchorTracking:E,keepMounted:A,nodeId:N,collisionAvoidance:T,adaptiveOrigin:L}),Y=P.useState("domReferenceElement");CO({store:M,domReference:Y,positionerElement:K,open:D});const V=G===!0&&z!==qn;Fv(D&&V,J==="touch",K,F);const Q=M.useStateSetter("positionerElement"),ee={open:D,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:H},q=bp(n,ee,{styles:$.positionerStyles,transitionStatus:U,props:O,refs:[a,Q],hidden:!j,inert:!D});return x.jsxs(QM.Provider,{value:$,children:[j&&V&&x.jsx(jp,{inert:xp(!D),cutout:F}),x.jsx(_R,{id:N,children:q})]})}),YF=v.createContext(void 0);function GF(){const[e,n]=v.useState(0),a=Be(()=>(n(s=>s+1),()=>{n(s=>Math.max(0,s-1))}));return{context:v.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}const $F=v.forwardRef(function(n,a){const{render:o,className:s,style:u,initialFocus:c,finalFocus:d,...p}=n,g=Qp(),y=qF(),h=Uv()!=null,{context:b,hasClosePart:S}=GF(),w=g.useState("open"),C=g.useState("openMethod"),E=g.useState("instantType"),T=g.useState("transitionStatus"),O=g.useState("popupProps"),M=g.useState("titleElementId"),A=g.useState("descriptionElementId"),N=g.useState("modal"),P=g.useState("mounted"),j=g.useState("openChangeReason"),D=g.useState("activeTriggerElement"),z=g.useState("floatingRootContext"),F=z.useState("floatingId"),G=g.useState("disabled"),J=g.useState("openOnHover"),K=g.useState("closeDelay");ka({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),fv(z,{enabled:J&&!G,closeDelay:K});const H=c===void 0?VR(g.context.popupRef):c,U=N!==!1&&S;g.useSyncedValue("focusManagerModal",U);const L=g.useStateSetter("popupElement"),$={open:w,side:y.side,align:y.align,instant:E,transitionStatus:T},Y=Mt("div",n,{state:$,ref:[a,g.context.popupRef,L],props:[O,{id:F,role:"dialog",...Pc,"aria-labelledby":M,"aria-describedby":A,onKeyDown(V){h&&Yc.has(V.key)&&V.stopPropagation()}},zc(T),p],stateAttributesMapping:Jh});return x.jsx(op,{context:z,openInteractionType:C,modal:U,disabled:!P||j===qn,initialFocus:H,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:yn(D)?D:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:x.jsx(YF.Provider,{value:b,children:Y})})});function QF({...e}){return x.jsx(UF,{"data-slot":"popover",...e})}function XF({anchor:e,align:n="center",alignOffset:a=0,side:o="bottom",sideOffset:s=4,className:u,...c}){return x.jsx(VF,{children:x.jsx(KF,{anchor:e,className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:x.jsx($F,{"data-slot":"popover-content",className:Qe("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",u),...c})})})}function ZF({instructions:e,isLoading:n,isError:a,onRetry:o,onEdit:s,onDelete:u,onPreload:c}){const{t:d}=Qt(),[p,g]=v.useState(null);return n?x.jsx(zo,{className:"gap-0 py-0",children:x.jsx("div",{className:"divide-y",children:[0,1,2].map(y=>x.jsxs("div",{className:"flex items-center gap-2 p-3",children:[x.jsx(Tr,{className:"size-3.5 rounded-sm"}),x.jsx(Tr,{className:"h-4 w-2/3"})]},y))})}):a?x.jsxs(zo,{className:"items-start gap-3 p-4",children:[x.jsx("p",{className:"text-xs text-muted-foreground",children:d("instructions.loadError")}),x.jsxs(It,{type:"button",variant:"outline",onClick:o,children:[x.jsx(rT,{}),x.jsx("span",{children:d("common.retry")})]})]}):e.length===0?x.jsx(zo,{className:"gap-0 py-0",children:x.jsx(Ec,{icon:GI,title:d("instructions.emptyTitle"),description:d("instructions.emptyDescription")})}):x.jsxs(zo,{className:"gap-0 py-0",children:[x.jsx("ul",{"aria-label":d("instructions.listAria"),className:"divide-y",children:e.map(y=>x.jsx(JF,{instruction:y,onRequestDelete:h=>{g({anchor:h,instruction:y})},onEdit:()=>{s(y)},onPreload:c},y.id))}),x.jsx(QF,{open:p!==null,onOpenChange:y=>{y||g(null)},children:x.jsxs(XF,{anchor:p?.anchor,side:"bottom",align:"start",sideOffset:6,className:"w-64 p-3",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("div",{className:"text-xs font-medium",children:d("instructions.deleteConfirmTitle")}),x.jsx("p",{className:"text-xs/relaxed text-muted-foreground",children:d("instructions.deleteConfirmDescription",{name:p?.instruction.name??""})})]}),x.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[x.jsx(It,{type:"button",variant:"ghost",onClick:()=>{g(null)},children:d("common.cancel")}),x.jsx(It,{type:"button",variant:"destructive",onClick:()=>{if(!p)return;const{instruction:y}=p;g(null),u(y)},children:d("instructions.delete")})]})]})})]})}function JF({instruction:e,onEdit:n,onPreload:a,onRequestDelete:o}){const{t:s}=Qt(),u=v.useRef(null),{attributes:c,isDragging:d,listeners:p,setNodeRef:g}=DM({id:lF(e.id),data:{type:"library-instruction",instructionId:e.id}});function y(){const h=u.current;h&&o(h)}return x.jsxs(NF,{children:[x.jsxs(kF,{ref:h=>{u.current=h,g(h)},render:x.jsx("li",{...p,"data-instruction-id":e.id,className:Qe(`
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
- `,d&&"opacity-40")}),children:[x.jsx(mv,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground"}),x.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:n,onFocus:a,onPointerEnter:a,children:x.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})}),x.jsxs(Pp,{children:[x.jsx(Lp,{render:x.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":s("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:h=>{h.stopPropagation()},onMouseDown:h=>{h.stopPropagation()},onPointerDown:h=>{h.stopPropagation()},onTouchStart:h=>{h.stopPropagation()}}),children:x.jsx(qI,{})}),x.jsx(zp,{align:"end",className:"w-40",children:x.jsx(UE,{Item:Vv,onDelete:y,onEdit:n})})]})]}),x.jsx(jF,{children:x.jsx(UE,{Item:IF,onDelete:y,onEdit:n})})]})}function UE({Item:e,onEdit:n,onDelete:a}){const{t:o}=Qt();return x.jsxs(x.Fragment,{children:[x.jsxs(e,{onClick:n,children:[x.jsx(rP,{}),x.jsx("span",{children:o("instructions.edit")})]}),x.jsxs(e,{variant:"destructive",onClick:a,children:[x.jsx(lP,{}),x.jsx("span",{children:o("instructions.delete")})]})]})}function XM({className:e,...n}){return x.jsx("label",{"data-slot":"label",className:Qe("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),...n})}function Ni({children:e,className:n,...a}){return x.jsxs(XM,{className:Qe("gap-1",n),...a,children:[e,x.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function td({...e}){return x.jsx(ZO,{"data-slot":"dialog",...e})}function WF({...e}){return x.jsx(XO,{"data-slot":"dialog-portal",...e})}function Xp({...e}){return x.jsx(Up,{"data-slot":"dialog-close",...e})}function e7({className:e,...n}){return x.jsx(YO,{"data-slot":"dialog-overlay",className:Qe("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),...n})}function nd({className:e,children:n,showCloseButton:a=!0,...o}){return x.jsxs(WF,{children:[x.jsx(e7,{}),x.jsxs(QO,{"data-slot":"dialog-content",className:Qe("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),...o,children:[n,a&&x.jsxs(Up,{"data-slot":"dialog-close",render:x.jsx(It,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rd({className:e,...n}){return x.jsx("div",{"data-slot":"dialog-header",className:Qe("flex flex-col gap-1",e),...n})}function ad({className:e,showCloseButton:n=!1,children:a,...o}){return x.jsxs("div",{"data-slot":"dialog-footer",className:Qe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...o,children:[a,n&&x.jsx(Up,{render:x.jsx(It,{variant:"outline"}),children:"Close"})]})}function od({className:e,...n}){return x.jsx(JO,{"data-slot":"dialog-title",className:Qe("font-heading text-sm font-medium",e),...n})}function Zp({className:e,...n}){return x.jsx(GO,{"data-slot":"dialog-description",className:Qe("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})}const Rc=["instructions"];function t7(){const e=ql({queryKey:Rc,queryFn:({signal:n})=>RF(n),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const n7="modulepreload",r7=function(e){return"/"+e},HE={},a7=function(n,a,o){let s=Promise.resolve();if(a&&a.length>0){let p=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 c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=p(a.map(g=>{if(g=r7(g),g in HE)return;HE[g]=!0;const y=g.endsWith(".css"),h=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${h}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":n7,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((S,w)=>{b.addEventListener("load",S),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})},ZM=()=>a7(()=>import("./markdown-editor-nKIMVkN5.js"),__vite__mapDeps([0,1]));function J0(){ZM()}const o7=v.lazy(async()=>({default:(await ZM()).MarkdownEditor}));function i7(e){const{t:n}=Qt();return x.jsx(v.Suspense,{fallback:x.jsx("div",{style:{height:e.height??"16rem"},className:`
87
- flex items-center justify-center text-xs text-muted-foreground
88
- `,children:n("instructions.editorLoading")}),children:x.jsx(o7,{...e})})}const s7="16rem";function FE({instruction:e,onClose:n}){const{t:a}=Qt(),o=mo(),s=v.useId(),u=v.useId(),c=e!==void 0,[d,p]=v.useState(e?.name??""),[g,y]=v.useState(e?.content??""),h=fa({mutationFn:M=>e?TF(e.id,M):CF(M),onSuccess:M=>{o.setQueryData(Rc,A=>[...(A??[]).filter(N=>N.id!==M.id),M].toSorted((N,P)=>P.updatedAt-N.updatedAt)),o.invalidateQueries({queryKey:Rc}),kn.success(a(c?"instructions.updated":"instructions.created")),n()},onError:()=>{kn.error(a(c?"instructions.updateError":"instructions.error"))}}),b=h.isPending,S=!!(d.trim()&&g.trim())&&!b,w=c?"instructions.editTitle":"instructions.createTitle",C=c?"instructions.updating":"instructions.creating",E=c?"instructions.updateSave":"instructions.save",T=c?oP:_c;function O(){b||n()}return x.jsx(td,{open:!0,onOpenChange:M=>{M||O()},children:x.jsxs(nd,{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:[x.jsxs("form",{className:"contents","aria-busy":b,onSubmit:M=>{M.preventDefault(),S&&h.mutate({name:d.trim(),content:g})},children:[x.jsx(rd,{className:"pr-8",children:x.jsx(od,{children:a(w)})}),x.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{htmlFor:s,children:a("instructions.name")}),x.jsx(Yv,{id:s,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:b,placeholder:a("instructions.namePlaceholder"),onChange:M=>{p(M.target.value)}})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{id:u,children:a("instructions.content")}),x.jsx("div",{role:"group","aria-labelledby":u,"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:x.jsx(i7,{height:s7,value:g,ariaLabel:a("instructions.content"),placeholder:a("instructions.contentPlaceholder"),readOnly:b,onChange:y})})]})]}),x.jsxs(ad,{children:[x.jsx(It,{type:"button",variant:"ghost",disabled:b,onClick:O,children:a("common.cancel")}),x.jsxs(It,{type:"submit",disabled:!S,children:[b?x.jsx(Cs,{className:"animate-spin"}):x.jsx(T,{}),x.jsx("span",{children:a(b?C:E)})]})]})]}),x.jsxs(Xp,{disabled:b,render:x.jsx(It,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}const l7=e=>{const n=e.active.data.current;if(jl(n))return u7(e,n.agentId);const a=e.pointerCoordinates?A8(e):R8(e),o=a.filter(({id:s})=>uF(s));return o.length>0?o:a};function u7(e,n){const a=e.collisionRect.left+e.collisionRect.width/2,o=e.collisionRect.top+e.collisionRect.height/2,s=e.droppableRects.get(FM(n));if(s&&(a<s.left||a>s.left+s.width||o<s.top||o>s.top+s.height))return[];let u;for(const c of e.droppableContainers){const d=c.data.current;if(!jl(d)||d.agentId!==n)continue;const p=e.droppableRects.get(c.id);if(!p)continue;const g=(p.left+p.width/2-a)**2+(p.top+p.height/2-o)**2;(!u||g<u.distance)&&(u={id:c.id,distance:g})}return u?[{id:u.id}]:[]}function c7(){const{t:e}=Qt(),n=mo(),[a,o]=v.useState(null),[s,u]=v.useState(!1),[c,d]=v.useState(null),p=t7(),g=wF(),y=S8($0(EM,{activationConstraint:{distance:4}}),$0(RM,{activationConstraint:{delay:200,tolerance:8}}),$0(Wv,{coordinateGetter:JH})),h=v.useMemo(()=>new Map(p.instructions.map(N=>[N.id,N])),[p.instructions]),b=c?p.instructions.find(({id:N})=>N===c):void 0,S=a?.data.current,w=d7(S),C=w?h.get(w)?.name??w:"",E=a?.rect.current.initial?.width,T=fa({mutationFn:N=>OF(N.id),onSuccess:(N,P)=>{n.setQueryData(Rc,j=>j?.filter(({id:D})=>D!==P.id)),n.setQueryData(zr,j=>j?.map(D=>{const z=D.instructionIds.filter(F=>F!==P.id);return{...D,instructionIds:z,enabled:z.length>0&&D.enabled}})),n.invalidateQueries({queryKey:Rc}),n.invalidateQueries({queryKey:zr}),kn.success(e("instructions.deleted"))},onError:()=>{kn.error(e("instructions.deleteError"))}});function O(N,P,j){const D=g.agents.find(({id:G})=>G===N);if(!D||g.pendingAgentIds.has(N))return;if(D.instructionIds.includes(P)){kn.error(e("agents.duplicateError"));return}const z=[...D.instructionIds],F=j?z.indexOf(j):-1;z.splice(F<0?z.length:F,0,P),g.updateInstructions(N,z)}function M(N,P){const j=g.agents.find(({id:D})=>D===N);!j||g.pendingAgentIds.has(N)||g.updateInstructions(N,j.instructionIds.filter(D=>D!==P))}function A({active:N,over:P}){if(o(null),!P)return;const j=N.data.current,D=P.data.current;if(Py(j)){if(LE(D)){O(D.agentId,j.instructionId);return}jl(D)&&O(D.agentId,j.instructionId,D.instructionId);return}if(!jl(j))return;const z=g.agents.find(({id:H})=>H===j.agentId);if(!z||g.pendingAgentIds.has(z.id))return;const F=z.instructionIds,G=F.indexOf(j.instructionId),J=jl(D)&&D.agentId===j.agentId?F.indexOf(D.instructionId):LE(D)&&D.agentId===j.agentId?F.length-1:-1;if(G===J||G===-1||J===-1)return;const K=nb([...F],G,J);K.length===F.length&&K.every((H,U)=>H===F[U])||g.updateInstructions(z.id,K)}return x.jsxs(bH,{sensors:y,collisionDetection:l7,onDragStart:({active:N})=>{o(N)},onDragCancel:()=>{o(null)},onDragEnd:A,children:[x.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:[x.jsx(sM,{children:x.jsxs(It,{type:"button",onFocus:J0,onPointerEnter:J0,onClick:()=>{u(!0)},children:[x.jsx(_c,{}),x.jsx("span",{children:e("instructions.create")})]})}),x.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[x.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[x.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),x.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),x.jsx("div",{className:`
101
- min-h-0 flex-1 overflow-y-auto p-1
102
- max-md:max-h-64
103
- `,children:x.jsx(ZF,{instructions:p.instructions,isLoading:p.isLoading,isError:p.isError,onRetry:()=>{p.retry()},onEdit:N=>{d(N.id)},onDelete:N=>{T.mutate(N)},onPreload:J0})})]}),x.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[x.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[x.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),x.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),x.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:[g.isLoading&&x.jsx(f7,{}),!g.isLoading&&g.isError&&x.jsxs(zo,{className:"items-start gap-3 p-4",children:[x.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),x.jsxs(It,{type:"button",variant:"outline",onClick:()=>{g.retry()},children:[x.jsx(rT,{}),x.jsx("span",{children:e("common.retry")})]})]}),!g.isLoading&&!g.isError&&g.agents.map(N=>x.jsx(pF,{agent:N,instructionsById:h,isInstructionsLoading:p.isLoading,isPending:g.pendingAgentIds.has(N.id),isReapplying:g.reapplyingAgentIds.has(N.id),onRemoveInstruction:M,onToggle:(P,j)=>{g.setEnabled(P,j)},onReapply:P=>{g.reapply(P)},onOpenFile:P=>{g.openFile(P)}},N.id))]})]}),s&&x.jsx(FE,{onClose:()=>{u(!1)}}),b&&x.jsx(FE,{instruction:b,onClose:()=>{d(null)}})]}),Py(S)&&x.jsx(LH,{dropAnimation:null,children:C&&x.jsxs("div",{style:{width:E},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[x.jsx(mv,{className:"size-3.5 text-muted-foreground"}),x.jsx("span",{className:"truncate",children:C})]})})]})}function d7(e){if(Py(e)||jl(e))return e.instructionId}function f7(){return x.jsx(x.Fragment,{children:[0,1].map(e=>x.jsxs(zo,{className:"gap-0 py-0",children:[x.jsxs("div",{className:"flex items-center gap-3 p-3",children:[x.jsx(Tr,{className:"size-8 rounded-md"}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx(Tr,{className:"h-4 w-24"}),x.jsx(Tr,{className:"mt-2 h-3 w-40"})]}),x.jsx(Tr,{className:"h-4 w-7 rounded-full"})]}),x.jsx("div",{className:"border-t border-border/60 p-3",children:x.jsx(Tr,{className:"h-20 w-full"})})]},e))})}class Bh extends Error{constructor(n,a){super(a),this.code=n,this.name="SkillApiError"}code}async function ib(e,n){const a=await fetch(e,n);if(!a.ok){const o=await a.json();throw new Bh(o.error?.code??"SKILL_REQUEST_FAILED",o.error?.message??`Request failed with status ${a.status}`)}return a.json()}function h7(e){return ib("/api/skills",{signal:e})}function p7(e,n){return ib(`/api/skills/${encodeURIComponent(e)}`,{signal:n})}function g7(e){return ib("/api/skills",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}const JM=["skills"],WM=e=>["skills",e],m7=["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"],y7=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],v7=1,b7="settings.changed",x7=64,S7=1024,w7=/^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u;function eA(e){return e.trim().normalize("NFKC")}function E7(e){const n=eA(e);return[...n].length<=x7&&n===n.toLowerCase()&&w7.test(n)}function R7({className:e,...n}){return x.jsx("textarea",{"data-slot":"textarea",className:Qe("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),...n})}function C7({onClose:e}){const{t:n}=Qt(),a=Vc(),o=mo(),s=v.useId(),u=v.useId(),[c,d]=v.useState(""),[p,g]=v.useState(""),y=fa({mutationFn:g7,onSuccess:w=>{o.setQueryData(WM(w.name),w),o.invalidateQueries({queryKey:JM}),kn.success(n("skills.created")),e(),a(`/library/skills/${encodeURIComponent(w.name)}`)},onError:w=>{kn.error(n(w instanceof Bh&&w.code==="SKILL_NAME_CONFLICT"?"skills.nameConflict":"skills.createError"))}}),h=y.isPending,b=E7(c)&&!!p.trim()&&!h;function S(){h||e()}return x.jsx(td,{open:!0,onOpenChange:w=>{w||S()},children:x.jsxs(nd,{showCloseButton:!1,className:`
108
- max-h-[calc(100vh-2rem)] overflow-y-auto
109
- sm:max-w-120
110
- `,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":h,onSubmit:w=>{w.preventDefault(),b&&y.mutate({name:eA(c),description:p.trim()})},children:[x.jsxs(rd,{className:"pr-8",children:[x.jsx(od,{children:n("skills.createManually")}),x.jsx(Zp,{children:n("skills.createManuallyDescription")})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{htmlFor:s,children:n("skills.name")}),x.jsx(Yv,{id:s,autoFocus:!0,required:!0,"aria-describedby":`${s}-hint`,placeholder:n("skills.namePlaceholder"),value:c,disabled:h,onChange:w=>{d(w.target.value)}}),x.jsx("p",{id:`${s}-hint`,className:"text-xs text-muted-foreground",children:n("skills.nameHint")})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{htmlFor:u,children:n("skills.description")}),x.jsx(R7,{id:u,required:!0,rows:3,maxLength:S7,placeholder:n("skills.descriptionPlaceholder"),value:p,disabled:h,onChange:w=>{g(w.target.value)}})]}),x.jsxs(ad,{children:[x.jsx(It,{type:"button",variant:"ghost",disabled:h,onClick:S,children:n("common.cancel")}),x.jsxs(It,{type:"submit",disabled:!b,children:[h?x.jsx(Cs,{className:"animate-spin"}):x.jsx(_c,{}),x.jsx("span",{children:n(h?"skills.creating":"skills.create")})]})]})]}),x.jsxs(Xp,{disabled:h,render:x.jsx(It,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}const T7=[{titleKey:"skills.createManually",descriptionKey:"skills.createManuallyDescription",icon:_c},{titleKey:"skills.importLocal",descriptionKey:"skills.importLocalDescription",icon:FC},{titleKey:"skills.importUrl",descriptionKey:"skills.importUrlDescription",icon:gv}];function O7({onCreateManually:e}){const{t:n}=Qt();return x.jsxs(Pp,{children:[x.jsxs(Lp,{render:x.jsx(It,{type:"button"}),children:[x.jsx(_c,{}),x.jsx("span",{children:n("skills.new")}),x.jsx(pv,{})]}),x.jsx(zp,{align:"end",className:"w-max max-w-[min(20rem,calc(100vw-2rem))]",children:T7.map(({titleKey:a,descriptionKey:o,icon:s})=>x.jsxs(Vv,{className:"items-start gap-2 p-2",onClick:a==="skills.createManually"?e:void 0,children:[x.jsx(s,{"aria-hidden":"true",className:"mt-0.5 size-4"}),x.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5 whitespace-normal",children:[x.jsx("span",{className:"text-sm",children:n(a)}),x.jsx("span",{className:"text-xs text-muted-foreground",children:n(o)})]})]},a))})]})}function M7(){const{t:e}=Qt(),[n,a]=v.useState(!1),o=ql({queryKey:JM,queryFn:({signal:s})=>h7(s)});return x.jsxs(x.Fragment,{children:[x.jsx(sM,{children:x.jsx(O7,{onCreateManually:()=>{a(!0)}})}),x.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4",children:[o.isPending&&x.jsx(Tr,{className:"h-16 w-full"}),o.isError&&x.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[x.jsx(Ec,{icon:Dh,title:e("skills.loadError"),className:"flex-none"}),x.jsx(It,{variant:"outline",onClick:()=>{o.refetch()},children:e("common.retry")})]}),o.isSuccess&&o.data.length===0&&x.jsx(Ec,{icon:Dh,title:e("skills.emptyTitle"),description:e("skills.emptyDescription")}),o.isSuccess&&o.data.length>0&&x.jsx("ul",{className:"divide-y rounded-lg border",children:o.data.map(s=>x.jsx("li",{children:x.jsx(Kc,{to:`/library/skills/${encodeURIComponent(s.name)}`,className:`
111
- flex items-center rounded-md p-3
112
- hover:bg-muted
113
- focus-visible:outline-2 focus-visible:outline-ring
114
- `,children:x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"truncate text-sm font-medium",children:s.name}),x.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s.description})]})})},s.name))})]}),n&&x.jsx(C7,{onClose:()=>{a(!1)}})]})}function A7(){const{t:e}=Qt(),{name:n=""}=y5(),a=ql({queryKey:WM(n),queryFn:({signal:s})=>p7(n,s),retry:(s,u)=>!(u instanceof Bh&&u.code==="SKILL_NOT_FOUND")&&s<2});if(a.isPending)return x.jsxs("div",{className:"flex flex-col gap-6 p-6","aria-busy":"true",children:[x.jsx(Tr,{className:"h-12 w-64 max-w-full"}),x.jsx(Tr,{className:"h-28 w-full"})]});if(a.isError){const s=a.error instanceof Bh&&a.error.code==="SKILL_NOT_FOUND";return x.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center p-4",children:[x.jsx(Ec,{icon:Dh,title:e(s?"skills.notFound":"skills.loadError"),className:"flex-none"}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx(It,{variant:"outline",render:x.jsx(Kc,{to:"/library/skills"}),children:e("skills.backToSkills")}),!s&&x.jsx(It,{onClick:()=>{a.refetch()},children:e("common.retry")})]})]})}const o=a.data;return x.jsx("div",{className:`
115
- min-h-0 flex-1 overflow-y-auto p-4
116
- md:p-6
117
- `,children:x.jsxs("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-8",children:[x.jsxs("header",{className:"flex items-start gap-3",children:[x.jsx("div",{className:`
118
- flex size-12 shrink-0 items-center justify-center rounded-lg
119
- border bg-muted/40
120
- `,children:x.jsx(Dh,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}),x.jsxs("div",{className:"min-w-0 space-y-1",children:[x.jsx("h1",{className:"text-xl font-semibold wrap-anywhere",children:o.name}),x.jsx("p",{className:`
121
- text-sm wrap-anywhere whitespace-pre-wrap text-muted-foreground
122
- `,children:o.description})]})]}),x.jsxs("section",{className:"flex flex-col gap-3","aria-labelledby":"skill-content-title",children:[x.jsxs("div",{className:"flex items-baseline gap-2",children:[x.jsx("h2",{id:"skill-content-title",className:"text-sm font-medium",children:e("skills.content")}),x.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:"SKILL.md"})]}),x.jsx("div",{className:"flex min-h-24 flex-col rounded-lg border",children:o.content.trim()?x.jsx("pre",{className:`
123
- p-4 font-mono text-sm wrap-anywhere whitespace-pre-wrap
124
- `,children:o.content}):x.jsx(Ec,{title:e("skills.noContent"),className:"py-4"})})]})]})})}const Jp="/api/settings";function D7(e){return id({signal:e})}function N7(e){return id({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function k7(){return id({method:"POST"},`${Jp}/config-folder/open`)}function j7(e){return id({signal:e},`${Jp}/skill-copy`)}function I7(e){return id({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${Jp}/skill-copy`)}async function id(e,n=Jp){const a=await fetch(n,e);if(!a.ok)throw new Error(await P7(a));return a.json()}async function P7(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}function Pi({label:e,description:n,children:a,className:o,controlClassName:s}){return x.jsxs("div",{className:Qe(`
125
- flex flex-col items-start gap-3 p-4
126
- min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
127
- min-[680px]:justify-between min-[680px]:gap-8
128
- `,o),children:[x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"text-sm font-medium",children:e}),n&&x.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n})]}),x.jsx("div",{className:Qe(`
129
- min-w-0
130
- max-[680px]:w-full
131
- min-[680px]:shrink-0
132
- `,s),children:a})]})}function L7({configFolder:e}){const{t:n}=Qt(),a=v.useRef(null),o=fa({mutationFn:async p=>{await navigator.clipboard.writeText(p)},onSuccess:()=>{kn.success(n("settings.configFolderCopied"))},onError:()=>{kn.error(n("settings.errors.copyConfigFolder"))}}),s=fa({mutationFn:k7,onError:()=>{kn.error(n("settings.errors.openConfigFolder"))}}),u=o.isSuccess&&o.variables===e,c=!e||o.isPending||s.isPending,d=n(u?"settings.configFolderCopied":"settings.copyConfigFolder");return x.jsx(Pi,{label:n("settings.configFolder"),controlClassName:"min-[680px]:shrink",children:x.jsxs("div",{className:`
133
- flex min-w-0 items-center justify-end gap-2
134
- max-[680px]:justify-start
135
- `,children:[e&&x.jsx("span",{className:`
136
- min-w-0 font-mono text-xs break-all text-muted-foreground
137
- select-text
138
- `,children:e}),x.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:c,"aria-busy":o.isPending,onClick:()=>{!e||c||(a.current&&clearTimeout(a.current),o.mutate(e,{onSuccess:()=>{a.current=setTimeout(()=>o.reset(),2e3)}}))},children:u?x.jsx(wp,{}):x.jsx(VI,{})}),x.jsxs(It,{type:"button",variant:"outline",disabled:c,"aria-busy":s.isPending,onClick:()=>{c||s.mutate()},children:[s.isPending?x.jsx(Cs,{className:"animate-spin"}):x.jsx(FC,{}),x.jsx("span",{children:n("settings.openFolder")})]})]})})}function z7(e){if(!e)return null;for(const n of e.elements){const a=n.tagName;if(a==="BUTTON"||a==="INPUT"){const o=n;if(o.type==="submit")return o}}return null}const _7="data-checked",U7="data-unchecked";function tA(e){return{checked(n){return e.indeterminate?{}:n?{[_7]:""}:{[U7]:""}},...Yl}}const H7=v.createContext(void 0);function F7(){return v.useContext(H7)}const nA=v.createContext(void 0);function B7(){const e=v.useContext(nA);if(e===void 0)throw new Error(En(14));return e}const V7="data-parent",q7=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u=!1,"aria-labelledby":c,disabled:d=!1,form:p,id:g,indeterminate:y=!1,inputRef:h,name:b,onCheckedChange:S,parent:w=!1,readOnly:C=!1,render:E,required:T=!1,uncheckedValue:O,value:M,nativeButton:A=!1,style:N,...P}=n,{clearErrors:j}=Gc(),{disabled:D,name:z,setDirty:F,setFilled:G,setTouched:J,state:K,validationMode:H,validityData:U,validation:L}=qo(),$=VO(),{labelId:Y,registerControlId:V,getDescriptionProps:Q}=Ms(),ee=F7(),q=ee?.allValues===void 0?void 0:ee.parent,se=q!==void 0,k=D||$.disabled||ee?.disabled||d,B=z??b,W=M??B,re=Mr(),Ee=ee?.registerControlId!==V,le=Gl({id:g||void 0,enabled:Ee}),me=A?le:re;let ge={};se&&(w?ge=q.getParentProps():W!==void 0&&(ge=q.getChildProps(W)));const{checked:ce=o,indeterminate:Te=y,onCheckedChange:ve,...Pe}=ge,Me=ee?.value,Le=v.useRef(null),Fe=$c(k,Le),{getButtonProps:Oe,buttonRef:Ue}=yo({disabled:k,native:A}),be=ee?.validation??L,[He,Ze]=Ss({controlled:W!==void 0&&Me!==void 0&&!w?Me.includes(W):ce,default:u,name:"Checkbox",state:"checked"}),it=se?!!ce:He,de=se&&Te||y;Qc(Le,re,He,void 0,!ee&&!k,b);const we=q?.registerChildId,Ye=v.useRef(null),De=be.registerInput,ke=ee?W:void 0,yt=v.useCallback(We=>De(We,{controlRef:Le,value:ke}),[De,ke]),ut=Xr(h,Ye,w?void 0:yt),ht=Kv(c,Y,Ye,!A,le,P["aria-label"]);_e(()=>{Ye.current&&(Ye.current.indeterminate=de),ee||G(He)},[He,de,ee,G]),Kl(He,()=>{ee||(j(B),F(He!==U.initialValue),be.change(He))});const Ot=Or({checked:He,disabled:k,form:p,name:w?void 0:B,id:A?void 0:le,required:T,ref:ut,style:B?ep:jc,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(We){if(We.nativeEvent.defaultPrevented)return;if(C){We.preventDefault();return}const xt=We.currentTarget.checked,Xt=dt(Hr,We.nativeEvent);if(S?.(xt,Xt),!Xt.isCanceled&&(ve?.(xt,Xt),!Xt.isCanceled&&(Ze(xt),W!==void 0&&ee!==void 0&&!w&&!se))){const ft=xt?[...ee.value,W]:ee.value.filter(vt=>vt!==W);ee.setValue(ft,Xt)}},onClick(We){We.stopPropagation()},onFocus(){Le.current?.focus()}},M!==void 0?{value:(ee?He&&M:M)||""}:$t,Q,We=>be.getValidationProps(k,We));v.useEffect(()=>{if(!q||W===void 0)return;const We=q.disabledStatesRef.current;return We.set(W,k),()=>{We.delete(W)}},[q,k,W]);const Dt=v.useMemo(()=>({...K,checked:it,disabled:k,readOnly:C,required:T,indeterminate:de}),[K,it,k,C,T,de]),en=tA(Dt),an=Mt("span",n,{state:Dt,ref:[Ue,Le,a],props:[{id:me,role:"checkbox","aria-checked":de?"mixed":it,"aria-readonly":C||void 0,"aria-required":T||void 0,"aria-labelledby":ht,[V7]:w?"":void 0,onFocus(){Fe(!0)},onBlur(){const We=Ye.current;We&&(J(!0),Fe(!1),H==="onBlur"&&be.commit(ee?Me:We.checked))},onKeyDown(We){if(We.key!=="Enter"||(We.preventBaseUIHandler(),We.defaultPrevented))return;const xt=Ye.current?.form??null,Xt=We.currentTarget,ft=We.nativeEvent,vt=We.preventDefault,gt=ft.preventDefault;let zt=!1;We.preventDefault=()=>{zt=!0,vt.call(We)},ft.preventDefault=()=>{zt=!0,gt.call(ft)},gt.call(ft),wn(Xt).queueMicrotask(()=>{We.preventDefault=vt,ft.preventDefault=gt,zt||z7(xt)?.click()})},onClick(We){if(C||k)return;We.preventDefault();const xt=Ye.current;xt&&gs(xt,We)}},P,Pe,Oe,Q,We=>be.getValidationProps(k,We)],stateAttributesMapping:en}),tn=an.props.id;return _e(()=>{if(!(!we||w||W===void 0||tn===void 0))return we(W,tn)},[we,w,W,tn]),x.jsxs(nA.Provider,{value:Dt,children:[an,!He&&!ee&&B&&!w&&O!==void 0&&x.jsx("input",{type:"hidden",form:p,name:B,value:O,disabled:k}),x.jsx("input",{...Ot,suppressHydrationWarning:!0})]})}),K7=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=B7(),g=p.checked||p.indeterminate,{mounted:y,transitionStatus:h,setMounted:b}=Rs(g),S=v.useRef(null),w={...p,transitionStatus:h};ka({batch:!0,enabled:!g,open:g,ref:S,onComplete(){g||b(!1)}});const E={...tA(p),...po},T=c||y,O=Mt("span",n,{ref:[a,S],state:w,stateAttributesMapping:E,props:d});return T?O:null});function Y7({className:e,...n}){return x.jsx(q7,{"data-slot":"checkbox",className:Qe("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),...n,children:x.jsx(K7,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:x.jsx(wp,{})})})}function G7({onClose:e}){const{t:n}=Qt(),a=v.useId(),[o,s]=v.useState(["agents"]),u=ql({queryKey:["skill-targets"],queryFn:({signal:d})=>j7(d),retry:!1}),c=fa({mutationFn:I7,onSuccess:()=>{kn.success(n("settings.skillDownloaded")),e()},onError:()=>kn.error(n("settings.errors.downloadSkill"))});return x.jsx(td,{open:!0,onOpenChange:d=>{!d&&!c.isPending&&e()},children:x.jsxs(nd,{showCloseButton:!1,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":c.isPending,onSubmit:d=>{d.preventDefault(),o.length>0&&u.isSuccess&&!c.isPending&&c.mutate({targets:o})},children:[x.jsxs(rd,{children:[x.jsx(od,{children:n("settings.downloadSkill")}),x.jsx(Zp,{children:n("settings.downloadSkillDescription")})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{id:a,children:n("settings.skillTargets")}),u.isPending&&x.jsxs("div",{className:"space-y-2",children:[x.jsx(Tr,{className:"h-12 w-full"}),x.jsx(Tr,{className:"h-12 w-full"})]}),u.isError&&x.jsx(It,{type:"button",variant:"outline",disabled:u.isFetching,onClick:()=>{u.refetch()},children:n("common.retry")}),u.data&&x.jsx("div",{role:"group","aria-labelledby":a,"aria-required":"true",className:"flex flex-col gap-2",children:u.data.targets.map(({target:d,destination:p})=>x.jsxs(XM,{className:"flex items-start gap-3 rounded-lg border p-3",children:[x.jsx(Y7,{checked:o.includes(d),disabled:c.isPending,onCheckedChange:g=>{s(y=>g?[...y,d]:y.filter(h=>h!==d))}}),x.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[x.jsx("span",{children:d==="agents"?".agents":".claude"}),x.jsx("span",{className:`
139
- font-mono text-xs font-normal break-all
140
- text-muted-foreground
141
- `,children:p})]})]},d))})]}),x.jsxs(ad,{children:[x.jsx(It,{type:"button",variant:"ghost",disabled:c.isPending,onClick:e,children:n("common.cancel")}),x.jsxs(It,{type:"submit",disabled:o.length===0||!u.isSuccess||c.isPending,children:[c.isPending?x.jsx(Cs,{className:"animate-spin"}):x.jsx(gv,{}),x.jsx("span",{children:n(c.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),x.jsxs(Xp,{disabled:c.isPending,render:x.jsx(It,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function $7({disabled:e=!1}){const{t:n}=Qt(),[a,o]=v.useState(!1);return x.jsxs(Pi,{label:x.jsxs("span",{className:"flex items-center gap-1",children:[n("settings.downloadSkill"),x.jsxs(Oh,{children:[x.jsx(Mh,{render:x.jsx(It,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":n("settings.aboutFoundrySkill")}),children:x.jsx(BI,{})}),x.jsx(Ah,{children:n("settings.foundrySkillHint")})]})]}),children:[x.jsxs(It,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[x.jsx(gv,{}),n("settings.downloadSkill")]}),a&&x.jsx(G7,{onClose:()=>o(!1)})]})}function Q7({className:e,...n}){return x.jsx("div",{"data-slot":"input-group",role:"group",className:Qe("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),...n})}const X7=_p("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 Z7({className:e,align:n="inline-start",...a}){return x.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:Qe(X7({align:n}),e),onClick:o=>{o.target.closest("button")||o.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const J7=_p("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 W7({className:e,type:n="button",variant:a="ghost",size:o="xs",...s}){return x.jsx(It,{type:n,"data-size":o,variant:a,className:Qe(J7({size:o}),e),...s})}function eB({className:e,...n}){return x.jsx(Yv,{"data-slot":"input-group-control",className:Qe("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...n})}function Ly({id:e,disabled:n,...a}){const{t:o}=Qt(),s=v.useId(),u=e??s,[c,d]=v.useState(!1),p=o(c?"a11y.hidePassword":"a11y.showPassword");return x.jsxs(Q7,{"data-disabled":n,children:[x.jsx(eB,{...a,id:u,type:c?"text":"password",disabled:n}),x.jsx(Z7,{align:"inline-end",children:x.jsx(W7,{type:"button",size:"icon-xs","aria-label":p,"aria-controls":u,title:p,disabled:n,onClick:()=>d(g=>!g),children:c?x.jsx(KI,{}):x.jsx(YI,{})})})]})}function tB(e,n){const a=URL.createObjectURL(e),o=document.createElement("a");o.href=a,o.download=n,document.body.append(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}async function nB(e){const n=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error("Unable to export data");const a=n.headers.get("content-disposition")??"",o=/filename="([^"]+)"/u.exec(a)?.[1]??"foundry.foundry-backup";tB(await n.blob(),o)}function rB({onClose:e}){const{t:n}=Qt(),a=v.useId(),o=v.useId(),[s,u]=v.useState(""),[c,d]=v.useState(""),p=fa({mutationFn:nB,onSuccess:()=>{kn.success(n("dataExport.exported")),e()},onError:()=>{kn.error(n("dataExport.error"))}});return x.jsx(td,{open:!0,onOpenChange:g=>{!g&&!p.isPending&&e()},children:x.jsxs(nd,{showCloseButton:!1,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":p.isPending,onSubmit:g=>{if(g.preventDefault(),!(!s||!c||p.isPending)){if(s!==c){kn.error(n("dataExport.passphraseMismatch"));return}p.mutate({passphrase:s})}},children:[x.jsxs(rd,{children:[x.jsx(od,{children:n("dataExport.title")}),x.jsx(Zp,{children:n("dataExport.description")})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{htmlFor:a,children:n("dataExport.passphrase")}),x.jsx(Ly,{id:a,autoComplete:"new-password",required:!0,value:s,disabled:p.isPending,onChange:g=>u(g.target.value)})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{htmlFor:o,children:n("dataExport.confirmPassphrase")}),x.jsx(Ly,{id:o,autoComplete:"new-password",required:!0,value:c,disabled:p.isPending,"aria-invalid":c.length>0&&s!==c,onChange:g=>d(g.target.value)})]}),x.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[x.jsx(JI,{className:"size-4 shrink-0"}),x.jsx("span",{children:n("dataExport.passphraseHint")})]}),x.jsxs(ad,{children:[x.jsx(It,{type:"button",variant:"ghost",disabled:p.isPending,onClick:e,children:n("common.cancel")}),x.jsxs(It,{type:"submit",disabled:!s||!c||p.isPending,children:[p.isPending?x.jsx(Cs,{className:"animate-spin"}):x.jsx(_C,{}),x.jsx("span",{children:n(p.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),x.jsxs(Xp,{disabled:p.isPending,render:x.jsx(It,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function aB({disabled:e=!1}){const{t:n}=Qt(),[a,o]=v.useState(!1);return x.jsxs(Pi,{label:n("settings.export"),children:[x.jsxs(It,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[x.jsx(_C,{}),n("settings.export")]}),a&&x.jsx(rB,{onClose:()=>o(!1)})]})}class rA extends Error{constructor(n){super(n),this.code=n}code}async function oB(e,n){const a=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(n)},body:e});await iB(a)}async function iB(e){if(e.ok)return;let n="IMPORT_FAILED";try{const o=(await e.json()).error?.code;(o==="INVALID_BACKUP"||o==="INVALID_PASSPHRASE")&&(n=o)}catch{}throw new rA(n)}function sB({file:e,onClose:n}){const{t:a}=Qt(),o=v.useId(),[s,u]=v.useState(""),c=fa({mutationFn:()=>oB(e,s),onSuccess:()=>{location.replace(`${location.pathname}${location.search}`)},onError:g=>kn.error(a(lB(g)))}),d=c.isPending||c.isSuccess,p=()=>{d||n()};return x.jsx(td,{open:!0,onOpenChange:g=>{g||p()},children:x.jsxs(nd,{showCloseButton:!1,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d,onSubmit:g=>{g.preventDefault(),!d&&s&&c.mutate()},children:[x.jsxs(rd,{children:[x.jsx(od,{children:a("dataImport.title")}),x.jsx(Zp,{className:"break-all",children:e.name})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Ni,{htmlFor:o,children:a("dataImport.passphrase")}),x.jsx(Ly,{id:o,autoComplete:"current-password",required:!0,value:s,disabled:d,onChange:g=>u(g.target.value)})]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:a("dataImport.replaceWarning")}),x.jsxs(ad,{children:[x.jsx(It,{type:"button",variant:"ghost",disabled:d,onClick:p,children:a("common.cancel")}),x.jsxs(It,{type:"submit",variant:"destructive",disabled:d||!s,children:[d?x.jsx(Cs,{className:"animate-spin"}):x.jsx(LC,{}),x.jsx("span",{children:a("dataImport.replaceAction")})]})]})]}),x.jsxs(It,{type:"button",disabled:d,onClick:p,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[x.jsx(Ii,{}),x.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}function lB(e){if(e instanceof rA)switch(e.code){case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function uB({disabled:e=!1}){const{t:n}=Qt(),a=v.useRef(null),[o,s]=v.useState(null);return x.jsxs(Pi,{label:n("settings.import"),children:[x.jsx("input",{ref:a,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:u=>{s(u.target.files?.[0]??null),u.target.value=""}}),x.jsxs(It,{type:"button",variant:"outline",disabled:e,onClick:()=>a.current?.click(),children:[x.jsx(LC,{}),n("settings.import")]}),o&&x.jsx(sB,{file:o,onClose:()=>s(null)})]})}const cB="data-checked",dB="data-unchecked",zy={checked(e){return e?{[cB]:""}:{[dB]:""}},...po,...Yl},sb="data-composite-item-active",aA=v.createContext(void 0);function fB(){return v.useContext(aA)}const oA=v.createContext(void 0);function hB(){const e=v.useContext(oA);if(e===void 0)throw new Error(En(52));return e}const pB=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,readOnly:c=!1,required:d=!1,"aria-labelledby":p,value:g,inputRef:y,nativeButton:h=!1,id:b,style:S,...w}=n,C=fB(),{disabled:E,readOnly:T,required:O,form:M,checkedValue:A,touched:N=!1,validation:P,name:j,setCheckedValue:D=Sn,setTouched:z=Sn,registerInputRef:F=Sn}=C??{},{setTouched:G,setFilled:J,state:K,disabled:H}=qo(),U=VO(),{labelId:L,getDescriptionProps:$}=Ms(),Y=H||U.disabled||E||u,V=T||c,Q=O||d,ee=M,q=C?A===g:g==="",se=v.useRef(null),k=$c(Y,se),B=v.useRef(null),W=P?.registerInput,re=v.useCallback(Ze=>W?.(Ze,{controlRef:se,value:void 0}),[W]),Ee=Xr(y,B,F,re);_e(()=>{B.current?.checked&&J(!0)},[J]),_e(()=>{if(B.current){if(Y&&q){F(null);return}F(B.current)}},[q,Y,F]);const le=Mr(),me=Gl({id:b}),ge=h?void 0:me,ce=Kv(p,L,B,!h,ge,w["aria-label"]),Te={role:"radio","aria-checked":q,"aria-labelledby":ce,[sb]:q?"":void 0,id:h?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||Y||V)return;Ze.preventDefault();const it=B.current;it&&gs(it,Ze)},onFocus(Ze){k(!0),!(Ze.defaultPrevented||Y||V||!N)&&(B.current?.click(),z(!1))},onBlur(){C||k(!1)}},{getButtonProps:ve,buttonRef:Pe}=yo({disabled:Y,native:h,composite:!1}),Me={type:"radio",ref:Ee,form:ee,id:ge,name:j,tabIndex:-1,style:j?ep:jc,"aria-hidden":!0,...g!==void 0?{value:kh(g)}:$t,disabled:Y,checked:q,required:Q,readOnly:V,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||Y||V||g===void 0)return;const it=dt(Hr,Ze.nativeEvent);D(g,it),!it.isCanceled&&G(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){se.current?.focus()}},Le=v.useMemo(()=>({...K,required:Q,disabled:Y,readOnly:V,checked:q}),[K,Y,V,q,Q]),Fe=Le,Oe=C!==void 0,Ue=[a,se,Pe],be=[Te,w,ve,$,P?Ze=>P.getValidationProps(Y,Ze):$t],He=Mt("span",n,{enabled:!Oe,state:Le,ref:Ue,props:be,stateAttributesMapping:zy});return x.jsxs(oA.Provider,{value:Fe,children:[Oe?x.jsx(PO,{tag:"span",render:o,className:s,style:S,state:Le,refs:Ue,props:be,stateAttributesMapping:zy}):He,x.jsx("input",{...Me,suppressHydrationWarning:!0})]})}),gB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=hB(),g=p.checked,{mounted:y,transitionStatus:h,setMounted:b}=Rs(g),S={...p,transitionStatus:h},w=v.useRef(null),C=c||y,E=Mt("span",n,{ref:[a,w],state:S,props:d,stateAttributesMapping:zy});return ka({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||b(!1)}}),C?E:null});function mB(e){const{loopFocus:n=!0,orientation:a="both",grid:o,onLoop:s,direction:u,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:p,enableHomeAndEndKeys:g=!1,stopEventPropagation:y,disabledIndices:h,modifierKeys:b=fo}=e,[S,w]=v.useState(0),C=o!=null,E=v.useRef(null),T=Xr(E,p),O=v.useRef([]),M=v.useRef(!1),A=v.useRef(null),N=c??S,P=Be((G,J=!1)=>{if(A.current=O.current[G]??null,(d??w)(G),J){const K=O.current[G];eE(E.current,K,u,a)}}),j=Be(G=>{if(G.size===0)return;if(M.current){const U=O.current,L=U.indexOf(A.current);if(L===-1){const $=U[N];!$||Tl(U,N,h)?P(yB(U,h)):A.current=$}else L!==N&&P(L);return}M.current=!0;const J=Array.from(G.keys()),K=J.find(U=>U?.hasAttribute(sb))??null,H=K?G.get(K)?.index??-1:-1;if(H!==-1)P(H);else if(Tl(J,N,h)){const U=Cl(J,{disabledIndices:h});Rl(J,U)||P(U)}eE(E.current,K,u,a)});_e(()=>{if(h==null||c!=null||!M.current)return;const G=O.current;if(Tl(G,N,h)){const J=Cl(G,{disabledIndices:h});Rl(G,J)||P(J)}},[h,c,N,O,P]);const D=Be((G,J,K)=>s?s(G,J,K,O):K),z=Be(G=>{const J=G.key===Ty||G.key===Oy;if(!Yc.has(G.key)||!g&&J||vB(G,b)||!E.current)return;const H=u==="rtl",U=H?Ry:Cy,L=H?Cy:Ry,$=a==="vertical"?Ey:U,Y=a==="vertical"?wy:L,V=tr(G.nativeEvent);if(V!=null&&Ww(V)&&!LO(V)){const B=V.selectionStart,W=V.selectionEnd,re=V.value;if(B==null||G.shiftKey||B!==W||G.key!==Y&&B<re.length||G.key!==$&&B>0)return}let Q=N;const ee=Wf(O,h),q=sy(O,h);o!=null&&(Q=o({disabledIndices:h,elementsRef:O,event:G,highlightedIndex:N,loopFocus:n,maxIndex:q,minIndex:ee,onLoop:D,orientation:a,rtl:H}));const se=a!=="vertical"&&G.key===U||a!=="horizontal"&&G.key===Ey,k=a!=="vertical"&&G.key===L||a!=="horizontal"&&G.key===wy;g&&(G.key===Ty?Q=ee:G.key===Oy&&(Q=q)),Q===N&&(se||k)&&(n&&Q===q&&se?(Q=ee,s&&(Q=s(G,N,Q,O))):n&&Q===ee&&k?(Q=q,s&&(Q=s(G,N,Q,O))):Q=Cl(O.current,{startingIndex:Q,decrement:k,disabledIndices:h})),Q!==N&&!Rl(O.current,Q)&&(y&&G.stopPropagation(),(C||J||se||k)&&G.preventDefault(),P(Q,!0),queueMicrotask(()=>{O.current[Q]?.focus()}))});return{props:{ref:T,onFocus(G){const J=E.current,K=tr(G.nativeEvent);!J||K==null||!Ww(K)||K.setSelectionRange(0,K.value.length)},onKeyDown:z},highlightedIndex:N,onHighlightedIndexChange:P,elementsRef:O,onMapChange:j,relayKeyboardEvent:z}}function yB(e,n){let a=-1;for(let o=0;o<e.length;o+=1){const s=e[o];if(!(!s||Tl(e,o,n))){if(s.hasAttribute(sb))return o;a===-1&&(a=o)}}return Math.max(a,0)}function vB(e,n){for(const a of i_)if(!n.includes(a)&&e.getModifierState(a))return!0;return!1}function bB(e){const{render:n,className:a,style:o,refs:s=fo,props:u=fo,state:c=$t,stateAttributesMapping:d,highlightedIndex:p,onHighlightedIndexChange:g,orientation:y,grid:h,loopFocus:b,onLoop:S,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:E=!0,rootRef:T,disabledIndices:O,modifierKeys:M,highlightItemOnHover:A=!1,tag:N="div",...P}=e,j=yp(),{props:D,highlightedIndex:z,onHighlightedIndexChange:F,elementsRef:G,onMapChange:J,relayKeyboardEvent:K}=mB({grid:h,loopFocus:b,onLoop:S,orientation:y,highlightedIndex:p,onHighlightedIndexChange:g,rootRef:T,stopEventPropagation:E,enableHomeAndEndKeys:w,direction:j,disabledIndices:O,modifierKeys:M}),H=Mt(N,e,{state:c,ref:s,props:[D,...u,P],stateAttributesMapping:d}),U=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:F,highlightItemOnHover:A,relayKeyboardEvent:K}),[z,F,A,K]);return x.jsx(cO.Provider,{value:U,children:x.jsx(Hv,{elementsRef:G,onMapChange:L=>{C?.(L),J(L)},children:H})})}const xB=[xO],SB=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u,readOnly:c,required:d,onValueChange:p,value:g,defaultValue:y,form:h,name:b,inputRef:S,id:w,style:C,...E}=n,{setTouched:T,setFocused:O,validationMode:M,name:A,disabled:N,state:P,validation:j,setDirty:D,setFilled:z,validityData:F}=qo(),{labelId:G}=Ms(),{clearErrors:J,elementRef:K}=Gc(),H=v6(!0),U=N||u,L=A??b,$=Mr(w),[Y,V]=Ss({controlled:g,default:y,name:"RadioGroup",state:"value"}),[Q,ee]=v.useState(!1),q=Be((Me,Le)=>{p?.(Me,Le),!Le.isCanceled&&V(Me)}),se=j.getInputControl,k=v.useMemo(()=>({get current(){return se()}}),[se]),B=v.useRef(null),W=v.useRef(null),re=Xr(B,S),Ee=v.useRef(re),le=Be(Me=>{B.current===Me&&Ee.current===re||(Ee.current=re,re?.(Me))});_e(()=>{le(B.current)},[re,le]);const me=Be(Me=>{if(Me){if(!Me.disabled){W.current||(W.current=Me);const Le=B.current;(Me.checked||Le==null||Le.disabled)&&le(Me)}return()=>{W.current===Me&&(W.current=null),B.current===Me&&le(null)}}}),ge=Be(()=>{const Me=K.current;if(!Me)return Y??null;for(const Le of j.registeredInputs.keys())if(Le.checked&&E6(Le,Me))return Y??null;return null});Qc(k,$,Y??null,ge,!U,b),Kl(Y,()=>{J(L),D(Y!==F.initialValue),z(Y!=null),j.change(Y);const Me=W.current;Y==null&&Me&&!Me.disabled&&le(Me)});const ce=G??H?.legendId,Te={...P,disabled:U??!1,required:d??!1,readOnly:c??!1},ve=v.useMemo(()=>({checkedValue:Y,disabled:U,form:h,validation:j,name:L,readOnly:c,registerInputRef:me,required:d,setCheckedValue:q,setTouched:ee,touched:Q}),[Y,U,h,j,L,c,me,d,q,ee,Q]),Pe={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":U||void 0,"aria-readonly":c||void 0,"aria-labelledby":ce,onBlur(Me){at(Me.currentTarget,Me.relatedTarget)||(ee(!1),T(!0),O(!1),M==="onBlur"&&j.commit(Y))},onKeyDownCapture(Me){Me.key.startsWith("Arrow")&&ee(!0)}};return x.jsx(aA.Provider,{value:ve,children:x.jsx(bB,{render:o,className:s,style:C,state:Te,props:[Pe,E,Me=>j.getValidationProps(U??!1,Me)],refs:[a],stateAttributesMapping:Yl,enableHomeAndEndKeys:!1,modifierKeys:xB})})});function wB({className:e,...n}){return x.jsx(SB,{"data-slot":"radio-group",className:Qe("grid w-full gap-3",e),...n})}function EB({className:e,...n}){return x.jsx(pB,{"data-slot":"radio-group-item",className:Qe("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),...n,children:x.jsx(gB,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:x.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 RB=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function CB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=Qt();return x.jsx(Pi,{label:o("settings.colorTheme"),children:x.jsx(wB,{"aria-label":o("settings.colorTheme"),value:e,onValueChange:n,disabled:a,"aria-busy":a,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:RB.map(s=>x.jsxs("label",{className:Qe("flex items-center gap-2 text-sm select-none",s.value===e?"font-medium text-foreground":"text-muted-foreground",a?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[x.jsx(EB,{value:s.value,disabled:a}),x.jsx("span",{children:o(s.labelKey)})]},s.value))})})}function TB(e){const n=v.useRef(!0);n.current&&(n.current=!1,e())}const iA=v.createContext(void 0),sA=v.createContext(void 0);function vo(){const e=v.useContext(iA);if(e===void 0)throw new Error(En(60));return e}function lA(){const e=v.useContext(sA);if(e===void 0)throw new Error(En(61));return e}function OB(e,n,a=Object.is){const{length:o}=e;if(o!==n.length)return!1;for(let s=0;s<o;s+=1)if(!a(e[s],n[s]))return!1;return!0}const uA=(e,n)=>Object.is(e,n);function Es(e,n,a){return e==null||n==null?Object.is(e,n):a(e,n)}function MB(e,n,a){return Array.isArray(e)&&Array.isArray(n)?!OB(e,n,(o,s)=>Es(o,s,a)):e!==n}function _y(e,n,a){return e?e.some(o=>o===void 0?!1:Es(n,o,a)):!1}function fh(e,n,a){return e?e.findIndex(o=>o===void 0?!1:Es(o,n,a)):-1}function AB(e,n){if(n!==uA)return o=>_y(e,o,n);const a=new Set(e);return a.delete(void 0),o=>a.has(o)&&(o!==0||e.some(s=>Object.is(o,s)))}function cA(e,n,a,o){const s=o&&Array.isArray(n)?e.findIndex(AB(n,a)):fh(e,n,a);return s===-1?null:s}function DB(e,n,a,o,s,u){return _y(o,n,s)?u!=null&&e>u&&_y(o,a[u],s)?u:e:e===u?cA(a,o,s,!0):u}function NB(e,n,a){return e.filter(o=>!Es(n,o,a))}const kB={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:n,multiple:a,itemToStringValue:o}=e;return n==null?!1:a&&Array.isArray(n)?n.length>0:Sl(n,o)!==""},hasNullItemLabel:(e,n)=>n?n6(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,n)=>e.activeIndex===n,isSelected:(e,n)=>{const a=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(s=>Es(n,s,a)):Es(n,o,a)},isSelectedByFocus:(e,n)=>e.selectedIndex===n,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 nc(e,n=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(e,a))}const Va=1;function lb(e,n){return Math.max(0,e-n)}function Vh(e,n){if(n<=0)return 0;const a=nc(e,0,n),o=a,s=n-a,u=o<=Va,c=s<=Va;return u&&c?o<=s?0:n:u?0:c?n:a}function jB(e){const{id:n,value:a,defaultValue:o=null,onValueChange:s,open:u,defaultOpen:c=!1,onOpenChange:d,name:p,form:g,autoComplete:y,disabled:h=!1,readOnly:b=!1,required:S=!1,modal:w=!0,actionsRef:C,inputRef:E,onOpenChangeComplete:T,items:O,multiple:M=!1,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:P=uA,highlightItemOnHover:j=!0,children:D}=e,{clearErrors:z}=Gc(),{setDirty:F,setTouched:G,setFocused:J,validityData:K,setFilled:H,name:U,disabled:L,validation:$,validationMode:Y}=qo(),V=Gl({id:n}),Q=L||h,ee=U??p,[q,se]=Ss({controlled:a,default:M?o??fo:o,name:"Select",state:"value"}),[k,B]=Ss({controlled:u,default:c,name:"Select",state:"open"}),W=v.useRef([]),re=v.useRef([]),Ee=v.useRef(null),le=v.useRef(null),me=v.useRef(0),ge=v.useRef(null),ce=v.useRef([]),Te=v.useRef(!1),ve=v.useRef(null),Pe=v.useRef(null),Me=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=v.useRef(!1),Fe=v.useRef(q),{openMethod:Oe,triggerProps:Ue}=NO(k),be=er(()=>new Bl({id:V,labelId:void 0,modal:w,multiple:M,disabled:Q,readOnly:b,required:S,highlightItemOnHover:j,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:P,value:q,open:k,mounted:k,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:$t,triggerProps:$t,itemRoot:{props:$t,multiple:M,disabled:Q,readOnly:b,isItemEqualToValue:P},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Sn,setOpen:Sn,handleScrollArrowVisibility:Sn,onOpenChangeComplete:Sn,listRef:W,popupRef:Ee,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ce,labelsRef:re,typingRef:Te,selectionRef:Me,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Fe},kB)).current,[He,Ze]=v.useState(!1),{mounted:it,transitionStatus:de,forceUnmount:we}=BR({open:k,ref:Ee,preventUnmountOnClose:He,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),T?.(!1)}}),Ye=be.useState("activeIndex"),De=be.useState("selectedIndex"),ke=be.useState("triggerElement"),yt=be.useState("positionerElement"),ut=b3(Oe),ht=Oe??ut,Ot=v.useMemo(()=>M?"":Sl(q,N),[M,q,N]),Dt=v.useMemo(()=>M&&Array.isArray(q)?q.map(_=>Sl(_,N)):Sl(q,N),[M,q,N]),en=Ln(ke),an=Be(()=>Dt);Qc(en,V,q,an,!Q,p);const tn=M?Array.isArray(q)&&q.length>0:q!=null&&Ot!=="";_e(()=>{H(tn)},[tn,H]),_e(function(){const Z=cA(ce.current,q,P,M);Z===null&&(Pe.current=null),!k&&be.set("selectedIndex",Z)},[M,k,q,P,be]),Kl(q,()=>{z(ee),F(MB(q,K.initialValue,P)),$.change(q)});const We=Be((_,Z)=>{const ne=Z,ye=up(ne);d?.(_,ne),!Z.isCanceled&&(_||Ze(ye()),B(_),!_&&(Z.reason===Ti||Z.reason===Wh)&&(G(!0),J(!1),Y==="onBlur"&&$.commit(q)))});v.useImperativeHandle(C,()=>({unmount:we,close:()=>{be.state.open&&We(!1,dt(kc))}}),[we,We,be]);const xt=Be((_,Z)=>{s?.(_,Z),!Z.isCanceled&&se(_)}),Xt=Be(_=>{const Z=lb(_.scrollHeight,_.clientHeight),ne=Vh(_.scrollTop,Z),ye=ne>0,xe=ne<Z;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ft=tj({open:k,onOpenChange:We,elements:{reference:ke,floating:yt}}),vt=HR(ft,{enabled:!Q,event:"mousedown"}),gt=Ic(ft),zt=eC(ft,{enabled:!Q,listRef:W,activeIndex:Ye,selectedIndex:De,disabledIndices:fo,onNavigate(_){_===null&&!k||be.set("activeIndex",_)},focusItemOnHover:j}),un=tC(ft,{enabled:!Q&&(k||!b&&!M),listRef:re,activeIndex:Ye,selectedIndex:De,disabledIndices:_=>LO(W.current[_]),onMatch(_){k?be.set("activeIndex",_):xt(ce.current[_],dt(Hr))},onTyping(_){Te.current=_}}),je=v.useMemo(()=>Or(un.reference,zt.reference,gt.reference,vt.reference,Ue),[vt.reference,un.reference,zt.reference,gt.reference,Ue]),ot=v.useMemo(()=>Or(Pc,un.floating,zt.floating,gt.floating),[un.floating,zt.floating,gt.floating]),Ie=zt.item??$t,ze=v.useMemo(()=>({props:Ie,multiple:M,disabled:Q,readOnly:b,isItemEqualToValue:P}),[Ie,M,Q,b,P]);be.useContextCallback("setValue",xt),be.useContextCallback("setOpen",We),be.useContextCallback("handleScrollArrowVisibility",Xt),be.useContextCallback("onOpenChangeComplete",T),TB(()=>{be.update({popupProps:ot,triggerProps:je,itemRoot:ze})}),be.useSyncedValues({id:V,modal:w,multiple:M,disabled:Q,readOnly:b,required:S,highlightItemOnHover:j,value:q,open:k,mounted:it,transitionStatus:de,popupProps:ot,triggerProps:je,itemRoot:ze,items:O,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:P,openMethod:ht});const Ge=Xr(E,$.inputRef),et=M?void 0:ee,Rt=v.useMemo(()=>!M||!Array.isArray(q)||!ee?null:q.map(_=>{const Z=Sl(_,N);return x.jsx("input",{type:"hidden",form:g,name:ee,value:Z,disabled:Q},Z)}),[M,q,g,ee,N,Q]);return x.jsxs(iA.Provider,{value:be,children:[x.jsx(sA.Provider,{value:ft,children:D}),x.jsx("input",{...$.getValidationProps(Q,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(_){if(_.nativeEvent.defaultPrevented||Q||b)return;const Z=_.currentTarget.value,ne=dt(Hr,_.nativeEvent);function ye(){if(M)return;const xe=Z.toLowerCase();let qe=ce.current.findIndex(Xe=>Sl(Xe,N).toLowerCase()===xe||_O(Xe,A).toLowerCase()===xe);qe===-1&&(qe=ce.current.findIndex((Xe,$e)=>{const st=re.current[$e];return st!=null&&st.toLowerCase()===xe}));const Ve=ce.current[qe];Ve!=null&&xt(Ve,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:V&&et==null?`${V}-hidden-input`:void 0,form:g,name:et,autoComplete:y,value:Ot,disabled:Q,required:S&&!(M&&tn),readOnly:b,ref:Ge,style:ee?ep:jc,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Rt]})}function IB(e,n){return e??n}const PB="data-popup-side",LB=400,zB={...ph,...Yl,popupSide:e=>e?{[PB]:e}:null,value:()=>null},_B=v.forwardRef(function(n,a){const{render:o,className:s,id:u,disabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{setTouched:y,validationMode:h,validation:b,state:S,disabled:w}=qo(),{labelId:C}=Ms(),E=vo(),T=E.useState("readOnly"),O=E.useState("required"),M=E.useState("disabled"),A=w||M||c,N=E.useState("open"),P=E.useState("mounted"),j=E.useState("value"),D=E.useState("triggerProps"),z=E.useState("positionerElement"),F=E.useState("listElement"),G=E.useState("popupSide"),J=E.useState("id"),K=E.useState("labelId"),H=E.useState("hasSelectedValue"),U=P&&z?G:null,L=u??J,$=IB(C,K);Gl({id:u});const Y=Ln(z),V=v.useRef(null),Q=$c(A,V),{getButtonProps:ee,buttonRef:q}=yo({disabled:A,native:d}),se=E.useStateSetter("triggerElement"),k=Un(),B=Un(),W=Un();v.useEffect(()=>{if(N)return W.start(LB,()=>{E.context.selectionRef.current.allowUnselectedMouseUp=!0,E.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{W.clear()};E.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[N,E,B,W]);const re=Or(D,{id:L,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?F?.id??mh(z)?.id:void 0,"aria-labelledby":$,"aria-readonly":T||void 0,"aria-required":O||void 0,tabIndex:A?-1:0,onFocus(me){Q(!0),N&&E.context.alignItemWithTriggerActiveRef.current&&E.context.setOpen(!1,dt(Hr,me.nativeEvent)),k.start(0,()=>{E.set("forceMount",!0)})},onBlur(me){at(z,me.relatedTarget)||(y(!0),Q(!1),h==="onBlur"&&b.commit(j))},onMouseDown(me){if(N)return;const ge=Gt(me.currentTarget);function ce(Te){if(!V.current)return;const ve=Te.target;at(V.current,ve)||at(Y.current,ve)||IO(Te,V.current)||E.context.setOpen(!1,dt(Xy,Te))}B.start(0,()=>{ge.addEventListener("mouseup",ce,{once:!0})})}},g,ee),Ee=b.getValidationProps(A,re);Ee.role="combobox";const le={...S,open:N,disabled:A,value:j,readOnly:T,popupSide:U,placeholder:!H};return Mt("button",n,{ref:[a,V,q,se],state:le,stateAttributesMapping:zB,props:Ee})}),UB={value:()=>null},HB=v.forwardRef(function(n,a){const{className:o,render:s,children:u,placeholder:c,style:d,...p}=n,g=vo(),y=g.useState("value"),h=g.useState("items"),b=g.useState("itemToStringLabel"),S=g.useState("hasSelectedValue"),w=!S&&c!=null&&u==null,C=g.useState("hasNullItemLabel",w),E={value:y,placeholder:!S};let T=null;return typeof u=="function"?T=u(y):u!=null?T=u:w&&!C?T=c:Array.isArray(y)?T=r6(y,h,b):T=UO(y,h,b),Mt("span",n,{state:E,ref:[a,g.context.valueRef],props:[{children:T},p],stateAttributesMapping:UB})}),FB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,g={open:vo().useState("open")};return Mt("span",n,{state:g,ref:a,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:nR})}),BB=v.forwardRef(function(n,a){const o=vo(),s=o.useState("mounted"),u=o.useState("forceMount");return s||u?x.jsx(ap,{ref:a,...n}):null}),dA=v.createContext(void 0);function ub(){const e=v.useContext(dA);if(!e)throw new Error(En(59));return e}function qh(e,n){e&&Object.assign(e.style,n)}const fA={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},VB={position:"fixed"},qB=v.forwardRef(function(n,a){const{anchor:o,className:s,render:u,positionMethod:c,side:d,align:p,sideOffset:g,alignOffset:y,collisionBoundary:h="clipping-ancestors",collisionPadding:b,arrowPadding:S,sticky:w,disableAnchorTracking:C,alignItemWithTrigger:E=!0,collisionAvoidance:T=NR,style:O,...M}=n,A=vo(),N=lA(),P=A.useState("open"),j=A.useState("mounted"),D=A.useState("modal"),z=A.useState("value"),F=A.useState("openMethod"),G=A.useState("positionerElement"),J=A.useState("triggerElement"),K=A.useState("isItemEqualToValue"),H=A.useState("transitionStatus"),U=v.useRef(null),L=v.useRef(null),[$,Y]=v.useState(E),V=j&&$&&F!=="touch";!j&&$!==E&&Y(E),v.useImperativeHandle(A.context.alignItemWithTriggerActiveRef,()=>V),Fv((V||D)&&P,F==="touch",G,J);const Q=vp({anchor:o,floatingRootContext:N,positionMethod:c,mounted:j,side:d,sideOffset:g,align:p,alignOffset:y,arrowPadding:S,collisionBoundary:h,collisionPadding:b,sticky:w,disableAnchorTracking:C??V,collisionAvoidance:T,keepMounted:!0}),ee=V?"none":Q.side,q=V?VB:Q.positionerStyles,se={open:P,side:ee,align:Q.align,anchorHidden:Q.anchorHidden};_e(()=>{A.set("popupSide",Q.side)},[A,Q.side]);const k=A.useStateSetter("positionerElement"),B=bp(n,se,{styles:q,transitionStatus:H,props:M,refs:[a,k],hidden:!j,inert:!P}),W=v.useRef(0),re=Be(le=>{if(A.context.valuesRef.current.length===0)return;const me=W.current;W.current=le.size;const ge=dt(Hr);if(me!==0&&!A.state.multiple&&z!==null&&fh(A.context.valuesRef.current,z,K)===-1){const Te=A.context.initialValueRef.current,Pe=Te!=null&&fh(A.context.valuesRef.current,Te,K)!==-1?Te:null;A.context.setValue(Pe,ge),Pe===null&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null)}if(me!==0&&A.state.multiple&&Array.isArray(z)){const ce=z.filter(Te=>fh(A.context.valuesRef.current,Te,K)!==-1);ce.length!==z.length&&(A.context.setValue(ce,ge),ce.length===0&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null))}if(P&&V){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ce={height:""};qh(G,ce),qh(A.context.popupRef.current,ce)}}),Ee=v.useMemo(()=>({...Q,side:ee,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:Y,scrollUpArrowRef:U,scrollDownArrowRef:L}),[Q,ee,V,Y]);return x.jsx(Hv,{elementsRef:A.context.listRef,labelsRef:A.context.labelsRef,onMapChange:re,children:x.jsxs(dA.Provider,{value:Ee,children:[j&&D&&x.jsx(jp,{inert:xp(!P),cutout:J}),B]})})}),Xf="base-ui-disable-scrollbar",Uy={className:Xf,getElement(e){return x.jsx("style",{nonce:e,href:Xf,precedence:"base-ui:low",children:`.${Xf}{scrollbar-width:none}.${Xf}::-webkit-scrollbar{display:none}`})}},KB=v.createContext(void 0),YB={disableStyleElements:!1};function GB(){return v.useContext(KB)??YB}const BE="--transform-origin",$B={...Ac,...po},QB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,...d}=n,p=vo(),g=p.useState("multiple"),y=p.useState("readOnly"),h=p.useState("highlightItemOnHover"),b=lA(),{side:S,align:w,alignItemWithTriggerActive:C,isPositioned:E,setControlledAlignItemWithTrigger:T}=ub(),O=Uv()!=null,M=yp(),{nonce:A,disableStyleElements:N}=GB(),P=p.useState("id"),j=p.useState("open"),D=p.useState("openMethod"),z=p.useState("mounted"),F=p.useState("popupProps"),G=p.useState("transitionStatus"),J=p.useState("triggerElement"),K=p.useState("positionerElement"),H=p.useState("listElement"),U=v.useRef(!1),L=v.useRef(!1),$=v.useRef({}),Y=Pl(),V=Be(se=>{if(!K||!p.context.popupRef.current||!L.current)return;const k=K.style.top==="0px",B=K.style.bottom==="0px";if(U.current||!C||!k&&!B){p.context.handleScrollArrowVisibility(se);return}const W=qE(K),re=rc(K.getBoundingClientRect().height,"y",W),Ee=Gt(K),le=wn(K),me=le.getComputedStyle(K),ge=parseFloat(me.marginTop),ce=parseFloat(me.marginBottom),Te=VE(le.getComputedStyle(p.context.popupRef.current)),ve=Math.min(Ee.documentElement.clientHeight-ge-ce,Te),Pe=se.scrollTop,Me=Zf(se);let Le=null;const Fe=He=>{K.style.height=`${He}px`},Oe=k?Me-Pe:Pe,Ue=Math.min(re+Oe,ve);if(Oe<=Va){const He=nc(Oe,0,ve-re);He>0&&Fe(re+He),se.scrollTop=k?Me:0,ve-(re+He)<=Va&&(U.current=!0),p.context.handleScrollArrowVisibility(se);return}if(ve-Ue>Va)Le=k?1/0:0;else if(B&&Pe<Me){const He=re+Oe-ve;Le=Pe-(Oe-He)}const be=Math.ceil(Ue);if(be!==0&&Fe(be),Le!=null){const He=nc(Le,0,Zf(se));Math.abs(se.scrollTop-He)>Va&&(se.scrollTop=He)}be>=ve-Va&&(U.current=!0),p.context.handleScrollArrowVisibility(se)});v.useImperativeHandle(p.context.scrollHandlerRef,()=>V,[V]),ka({open:j,ref:p.context.popupRef,onComplete(){j&&p.context.onOpenChangeComplete(!0)}});const Q={open:j,transitionStatus:G,side:S,align:w};_e(()=>{!K||!p.context.popupRef.current||Object.keys($.current).length||($.current={top:K.style.top||"0",left:K.style.left||"0",right:K.style.right,height:K.style.height,bottom:K.style.bottom,minHeight:K.style.minHeight,maxHeight:K.style.maxHeight,marginTop:K.style.marginTop,marginBottom:K.style.marginBottom})},[p,K]),_e(()=>{j||C||(L.current=!1,U.current=!1,qh(K,$.current))},[j,C,K]),_e(()=>{const se=p.context.popupRef.current;if(!j||!J||!K||!se||C&&!E||p.state.transitionStatus==="ending")return;if(L.current=!0,se.style.removeProperty(BE),!C){Y.request(()=>p.context.handleScrollArrowVisibility(H||se));return}const k=XB(se);try{let B=p.context.selectedItemTextRef.current;B?.isConnected||(B=!p.select("hasSelectedValue")&&p.context.firstItemTextRef.current?.isConnected?p.context.firstItemTextRef.current:null);const W=p.context.valueRef.current,re=wn(K),Ee=re.getComputedStyle(K),le=re.getComputedStyle(se),me=Gt(J),ge=qE(J),ce=Jf(J.getBoundingClientRect(),ge),Te=Jf(K.getBoundingClientRect(),ge),ve=ce.height,Pe=H||se,Me=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Fe=parseFloat(Ee.marginTop)||10,Oe=parseFloat(Ee.marginBottom)||10,Ue=parseFloat(Ee.minHeight)||100,be=VE(le),He=5,Ze=5,it=20,de=me.documentElement.clientHeight-Fe-Oe,we=me.documentElement.clientWidth,Ye=de-ce.bottom+ve;let De,ke=M==="rtl"?ce.right-Te.width:ce.left,yt=0;if(B&&W){const ft=Jf(W.getBoundingClientRect(),ge);De=Jf(B.getBoundingClientRect(),ge),ke=Te.left+(M==="rtl"?ft.right-De.right:ft.left-De.left);const vt=ft.top-ce.top+ft.height/2;yt=De.top-Te.top+De.height/2-vt}const ut=Ye+yt+Oe+Le;let ht=Math.min(de,ut);const Ot=de-Fe-Oe,Dt=ut-ht,en=we-Ze;K.style.left=`${nc(ke,He,en-Te.width)}px`,K.style.height=`${ht}px`,K.style.maxHeight="none",K.style.marginTop=`${Fe}px`,K.style.marginBottom=`${Oe}px`,se.style.height="100%";const an=Zf(Pe),tn=Dt>=an-Va;tn&&(ht=Math.min(de,Te.height)-(Dt-an));const We=ce.top<it||ce.bottom>de-it||Math.ceil(ht)+Va<Math.min(Me,Ue),xt=(re.visualViewport?.scale??1)!==1&&ho;if(We||xt){qh(K,$.current),T(!1);return}const Xt=Math.max(Ue,ht);if(tn){const ft=Math.max(0,de-ut);K.style.top=Te.height>=Ot?"0":`${ft}px`,K.style.height=`${ht}px`,Pe.scrollTop=Zf(Pe)}else K.style.bottom="0",Pe.scrollTop=Dt;if(De){const ft=Te.top,vt=Te.height,gt=De.top+De.height/2,zt=nc(vt>0?(gt-ft)/vt*100:50,0,100);se.style.setProperty(BE,`50% ${zt}%`)}(Xt===de||ht>=be)&&(U.current=!0),p.context.handleScrollArrowVisibility(Pe),h&&p.state.selectedIndex===null&&p.state.activeIndex===null&&p.context.listRef.current[0]!=null&&p.set("activeIndex",0)}finally{k()}},[p,j,K,J,C,T,Y,H,h,M,E]),v.useEffect(()=>{if(!C||!K||!j)return;const se=wn(K);function k(B){p.context.setOpen(!1,dt(H4,B))}return jt(se,"resize",k)},[p,C,K,j]);const ee={...H?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":y||void 0,id:`${P}-list`},onKeyDown(se){O&&Yc.has(se.key)&&se.stopPropagation()},onScroll(se){H||V(se.currentTarget)},...C&&{style:H?{height:"100%"}:fA},className:!H&&C?Uy.className:void 0},q=Mt("div",n,{ref:[a,p.context.popupRef],state:Q,stateAttributesMapping:$B,props:[F,ee,zc(G),d]});return x.jsxs(v.Fragment,{children:[!N&&Uy.getElement(A),x.jsx(op,{context:b,modal:!1,disabled:!z,openInteractionType:D,returnFocus:c,restoreFocus:!0,children:q})]})});function VE(e){const n=e.maxHeight;return n.endsWith("px")&&parseFloat(n)||1/0}function Zf(e){return lb(e.scrollHeight,e.clientHeight)}function qE(e){return lC.getScale(e)}function rc(e,n,a){return e/a[n]}function Jf(e,n){return gc({x:rc(e.x,"x",n),y:rc(e.y,"y",n),width:rc(e.width,"x",n),height:rc(e.height,"y",n)})}const KE=[["transform","none"],["scale","1"],["translate","0 0"]];function XB(e){const{style:n}=e,a={};for(const[o,s]of KE)a[o]=n.getPropertyValue(o),n.setProperty(o,s,"important");return()=>{for(const[o]of KE){const s=a[o];s?n.setProperty(o,s):n.removeProperty(o)}}}const ZB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=vo(),p=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:y}=ub(),h=d.useState("hasScrollArrows"),b=d.useState("openMethod"),w={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":p||void 0,"aria-readonly":g||void 0,onScroll(E){d.context.scrollHandlerRef.current?.(E.currentTarget)},...y&&{style:fA},className:h&&b!=="touch"?Uy.className:void 0},C=d.useStateSetter("listElement");return Mt("div",n,{ref:[a,C],props:[w,c]})}),hA=v.createContext(void 0);function pA(){const e=v.useContext(hA);if(!e)throw new Error(En(57));return e}const JB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,value:c=null,label:d,disabled:p=!1,nativeButton:g=!1,...y}=n,h=v.useRef(null),b=kp({guess:!0,label:d,textRef:h}),S=vo(),{props:w,multiple:C,disabled:E,readOnly:T,isItemEqualToValue:O}=S.useState("itemRoot"),M=E||p,A=S.useState("isActive",b.index),N=S.useState("open"),P=S.useState("isSelected",c),j=S.useState("isSelectedByFocus",b.index),D=b.index,z=v.useRef(null);_e(()=>{const Q=S.context.valuesRef.current;return Q[D]=c,()=>{delete Q[D]}},[D,c,S]),_e(()=>{const Q=S.state.value,ee=S.state.selectedIndex;let q=ee,se;C&&Array.isArray(Q)?(q=DB(D,c,S.context.valuesRef.current,Q,O,ee),se=q===D,D===ee&&!se&&(S.context.selectedItemTextRef.current=null)):(se=Q!==void 0&&Es(c,Q,O),se&&(q=D)),S.set("selectedIndex",q),se&&h.current&&(S.context.selectedItemTextRef.current=h.current)},[D,C,O,S,c]);const F=v.useRef("mouse"),G=v.useRef(!1),{getButtonProps:J,buttonRef:K}=yo({disabled:M,focusableWhenDisabled:!0,native:g,composite:!0}),H={disabled:M,selected:P,highlighted:A};function U(Q){if(E||T)return;const ee=S.state.value;if(C){const q=Array.isArray(ee)?ee:[],se=P?NB(q,c,O):[...q,c];S.context.setValue(se,dt(ps,Q))}else S.context.setValue(c,dt(ps,Q)),S.context.setOpen(!1,dt(ps,Q))}function L(){S.context.selectionRef.current.dragY=0}const $={role:"option","aria-selected":P,tabIndex:N&&A?0:-1,onKeyDown(Q){S.set("activeIndex",D),Q.key===" "&&S.context.typingRef.current&&Q.preventDefault()},onClick(Q){const ee=F.current!=="touch",q=Q.nativeEvent.pointerType,se=ee&&Il(Q.nativeEvent)&&(q!==void 0||A),k=ee&&!se&&!G.current;G.current=!1,!(M||k)&&U(Q.nativeEvent)},onPointerEnter(Q){F.current=Q.pointerType},onPointerMove(Q){if(Q.pointerType==="mouse"&&Q.buttons===1){const ee=S.context.selectionRef.current;ee.dragY+=Q.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(Q){F.current=Q.pointerType,G.current=!0,L()},onMouseUp(){if(L(),M||F.current==="touch"||G.current)return;const Q=!S.context.selectionRef.current.allowSelectedMouseUp&&P,ee=!S.context.selectionRef.current.allowUnselectedMouseUp&&!P;Q||ee||(G.current=!0,z.current?.click(),G.current=!1)}},Y=Mt("div",n,{ref:[K,a,b.ref,z],state:H,props:[w,$,y,J]}),V=v.useMemo(()=>({selected:P,index:D,textRef:h,selectedByFocus:j}),[P,D,h,j]);return x.jsx(hA.Provider,{value:V,children:Y})})),WB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c,selected:d,...p}=n,g=v.useRef(null),{transitionStatus:y,setMounted:h}=Rs(d),S=Mt("span",n,{ref:[a,g],state:{selected:d,transitionStatus:y},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:po});return ka({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),S})),e9=v.forwardRef(function(n,a){const{selected:o}=pA();return n.keepMounted||o?x.jsx(WB,{...n,selected:o,ref:a}):null}),t9=v.memo(v.forwardRef(function(n,a){const{index:o,textRef:s,selectedByFocus:u}=pA(),c=vo(),{render:d,className:p,style:g,...y}=n,h=v.useCallback(S=>{S&&(o===0&&(c.context.firstItemTextRef.current=S),u&&(c.context.selectedItemTextRef.current=S))},[c,o,u]);return Mt("div",n,{ref:[h,a,s],props:y})})),gA=v.forwardRef(function(n,a){const{render:o,className:s,style:u,direction:c,keepMounted:d,...p}=n,g=c==="up",y=vo(),{side:h,scrollDownArrowRef:b,scrollUpArrowRef:S}=ub(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=y.useState(w),E=y.useState("openMethod"),T=C&&E!=="touch",O=Un(),M=g?S:b,{mounted:A,transitionStatus:N,setMounted:P}=Rs(T);_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]),ka({open:T,ref:M,onComplete(){T||P(!1)}});const z=Mt("div",n,{ref:[a,M],state:{direction:c,visible:T,side:h,transitionStatus:N},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(G){if(G.movementX===0&&G.movementY===0||O.isStarted())return;y.set("activeIndex",null);function J(){const K=y.state.listElement??y.context.popupRef.current;if(!K)return;y.set("activeIndex",null),y.context.handleScrollArrowVisibility(K);const H=lb(K.scrollHeight,K.clientHeight),U=Vh(K.scrollTop,H),L=U===(g?0:H),$=y.context.listRef.current;if(U!==K.scrollTop&&(K.scrollTop=U),L){O.clear();return}if($.length>0){const Y=M.current?.offsetHeight||0;K.scrollTop=n9($,g,U,K.clientHeight,Y,H)}O.start(40,J)}O.start(40,J)},onMouseLeave(){O.clear()}},p],stateAttributesMapping:po});return A||d?z:null});function n9(e,n,a,o,s,u){if(n){let y=0;const h=a+s-Va;for(let w=0;w<e.length;w+=1){const C=e[w];if(C&&C.offsetTop>=h){y=w;break}}const b=Math.max(0,y-1),S=e[b];return b<y&&S?Vh(S.offsetTop-s,u):0}let c=e.length-1;const d=a+o-s+Va;for(let y=0;y<e.length;y+=1){const h=e[y];if(h&&h.offsetTop+h.offsetHeight>d){c=Math.max(0,y-1);break}}const p=Math.min(e.length-1,c+1),g=e[p];return p>c&&g?Vh(g.offsetTop+g.offsetHeight-o+s,u):u}const r9=v.forwardRef(function(n,a){return x.jsx(gA,{...n,ref:a,direction:"down"})}),a9=v.forwardRef(function(n,a){return x.jsx(gA,{...n,ref:a,direction:"up"})}),cb=jB;function db({className:e,...n}){return x.jsx(HB,{"data-slot":"select-value",className:Qe("flex flex-1 text-left",e),...n})}function fb({className:e,size:n="default",children:a,...o}){return x.jsxs(_B,{"data-slot":"select-trigger","data-size":n,className:Qe("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),...o,children:[a,x.jsx(FB,{render:x.jsx(pv,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function hb({className:e,children:n,side:a="bottom",sideOffset:o=4,align:s="center",alignOffset:u=0,alignItemWithTrigger:c=!0,...d}){return x.jsx(BB,{children:x.jsx(qB,{side:a,sideOffset:o,align:s,alignOffset:u,alignItemWithTrigger:c,className:"isolate z-50",children:x.jsxs(QB,{"data-slot":"select-content","data-align-trigger":c,className:Qe("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:[x.jsx(o9,{}),x.jsx(ZB,{children:n}),x.jsx(i9,{})]})})})}function pb({className:e,children:n,...a}){return x.jsxs(JB,{"data-slot":"select-item",className:Qe("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),...a,children:[x.jsx(t9,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),x.jsx(e9,{render:x.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:x.jsx(wp,{className:"pointer-events-none"})})]})}function o9({className:e,...n}){return x.jsx(a9,{"data-slot":"select-scroll-up-button",className:Qe("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),...n,children:x.jsx(HI,{})})}function i9({className:e,...n}){return x.jsx(r9,{"data-slot":"select-scroll-down-button",className:Qe("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),...n,children:x.jsx(pv,{})})}const mA=["en-US","zh-CN","zh-TW","ja-JP"],s9={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},l9={"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.editorLoading":"Loading editor…","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 completely replaces current Foundry data with this backup. Existing data will not be merged. This cannot be undone.","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"},u9={"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.editorLoading":"正在加载编辑器…","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":"导入会用备份完全覆盖当前 Foundry 数据,不会合并现有数据。此操作无法撤销。","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":"切换侧边栏"},c9={"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.editorLoading":"正在載入編輯器…","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":"匯入會以備份完全覆蓋目前的 Foundry 資料,不會合併現有資料。此操作無法復原。","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":"切換側邊欄"},d9={"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.editorLoading":"エディターを読み込み中…","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":"現在の Foundry データはバックアップの内容で完全に置き換えられます。既存データとの結合は行われません。この操作は取り消せません。","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":"サイドバーを切り替える"},f9={"en-US":{translation:l9},"zh-CN":{translation:u9},"zh-TW":{translation:c9},"ja-JP":{translation:d9}};function h9({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=Qt(),s=[{value:"system",label:o("common.system")},...mA.map(u=>({value:u,label:s9[u]}))];return x.jsx(Pi,{label:o("settings.language"),children:x.jsxs(cb,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[x.jsx(fb,{"aria-label":o("settings.language"),className:"w-52",children:x.jsx(db,{})}),x.jsx(hb,{children:s.map(u=>x.jsx(pb,{value:u.value,children:u.label},u.value))})]})})}const YE=m7.map(e=>({value:e,label:e}));function p9({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=Qt();return x.jsx(Pi,{label:o("settings.timeFormat"),children:x.jsxs(cb,{items:YE,value:e,onValueChange:s=>{s&&n(s)},disabled:a,children:[x.jsx(fb,{"aria-label":o("settings.timeFormat"),className:"w-52",children:x.jsx(db,{})}),x.jsx(hb,{children:YE.map(s=>x.jsx(pb,{value:s.value,children:s.label},s.value))})]})})}const g9={"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 m9({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=Qt(),s=y7.map(u=>({value:u,label:o(g9[u])}));return x.jsx(Pi,{label:o("settings.timeZone"),children:x.jsxs(cb,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[x.jsx(fb,{"aria-label":o("settings.timeZone"),className:"w-52",children:x.jsx(db,{})}),x.jsx(hb,{children:s.map(u=>x.jsx(pb,{value:u.value,children:u.label},u.value))})]})})}const xi=["settings"],hh=["settings","update"];function gb(){const{t:e}=Qt(),n=mo(),a=$P({mutationKey:hh})>0,o=ql({queryKey:xi,queryFn:({signal:h})=>D7(h),staleTime:1/0,retry:!1}),s=fa({mutationKey:hh,mutationFn:N7,onMutate:async h=>{await n.cancelQueries({queryKey:xi});const b=n.getQueryData(xi);return b&&n.setQueryData(xi,y9(b,h)),{previous:b}},onSuccess:h=>{n.setQueryData(xi,h)},onError:(h,b,S)=>{S?.previous&&n.setQueryData(xi,S.previous),kn.error(e(v9(b)))},onSettled:()=>n.invalidateQueries({queryKey:xi})}),u=o.data??null,c=u?.workspace.appearance["color-theme"]??"system",d=u?.workspace["language-region"].language??"system",p=u?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=u?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function y(h){!u||n.isMutating({mutationKey:hh})>0||s.mutate(h)}return{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:o.isPending,isUpdating:a,setTheme:h=>{h!==c&&y({theme:h})},setLanguage:h=>{h!==d&&y({language:h})},setTimeFormat:h=>{h!==p&&y({timeFormat:h})},setTimeZone:h=>{h!==g&&y({timezone:h})}}}function y9(e,n){const a=e.workspace,o=a["language-region"];return{...e,workspace:{appearance:{"color-theme":n.theme??a.appearance["color-theme"]},"language-region":{language:n.language??o.language,"time-format":n.timeFormat??o["time-format"],"time-zone":n.timezone??o["time-zone"]}}}}function v9(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 ds=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:tP},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:QI},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:sP}];function b9(){const{t:e}=Qt(),[n,a]=yz(),o=ds.find(({id:O})=>O===n.get("panel"))?.id??ds[0].id,s=O=>{a(M=>{const A=new URLSearchParams(M);return A.set("panel",O),A})},{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:y,isUpdating:h,setTheme:b,setLanguage:S,setTimeFormat:w,setTimeZone:C}=gb(),E=ds.find(O=>O.id===o)?.ariaKey??"settings.appearanceAria",T=ds.find(O=>O.id===o)?.labelKey??"settings.appearance";return x.jsxs("div",{className:`
142
- grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
143
- max-[680px]:grid-cols-1
144
- `,children:[x.jsx("aside",{className:`
145
- hidden min-h-0 overflow-y-auto p-4
146
- min-[680px]:block
147
- `,children:x.jsx(x9,{activeSection:o,onSectionChange:s})}),x.jsxs("section",{"aria-label":e(E),className:"min-h-0 overflow-y-auto p-4",children:[x.jsxs("div",{className:`
148
- mb-3 flex items-center gap-3
149
- min-[680px]:hidden
150
- `,children:[x.jsxs(Pp,{children:[x.jsx(Lp,{render:x.jsx(It,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:x.jsx(WI,{})}),x.jsx(zp,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:x.jsxs(HO,{children:[x.jsx(FO,{children:e("settings.workspace")}),x.jsx(a6,{value:o,onValueChange:O=>{const M=ds.find(({id:A})=>A===O);M&&s(M.id)},children:ds.map(({id:O,labelKey:M,icon:A})=>x.jsxs(o6,{value:O,closeOnClick:!0,children:[x.jsx(A,{}),e(M)]},O))})]})})]}),x.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(T)})]}),x.jsxs(zo,{className:"gap-0 py-0",children:[y&&x.jsxs("div",{className:`
151
- flex flex-col items-start gap-3 p-4
152
- min-[680px]:min-h-16 min-[680px]:flex-row
153
- min-[680px]:items-center min-[680px]:justify-between
154
- min-[680px]:gap-8
155
- `,children:[x.jsx(Tr,{className:"h-4 w-24"}),x.jsxs("div",{className:"flex items-center gap-6",children:[x.jsx(Tr,{className:"h-4 w-16"}),x.jsx(Tr,{className:"h-4 w-10"}),x.jsx(Tr,{className:"h-4 w-10"})]})]}),!y&&o==="appearance"&&x.jsx(CB,{value:c,onValueChange:O=>{b(O)},disabled:h||!u}),!y&&o==="language-region"&&x.jsxs("div",{className:"divide-y",children:[x.jsx(h9,{value:d,onValueChange:O=>{S(O)},disabled:h||!u}),x.jsx(m9,{value:g,onValueChange:O=>{C(O)},disabled:h||!u}),x.jsx(p9,{value:p,onValueChange:O=>{w(O)},disabled:h||!u})]}),!y&&o==="advanced"&&x.jsxs("div",{className:"divide-y",children:[x.jsx(aB,{disabled:h||!u}),x.jsx(uB,{disabled:h||!u}),x.jsx(L7,{configFolder:u?.configFolder}),x.jsx($7,{disabled:h||!u})]})]})]})]})}function x9({activeSection:e,onSectionChange:n}){const{t:a}=Qt();return x.jsx("nav",{"aria-label":a("settings.navigation"),children:x.jsxs(zo,{size:"sm",children:[x.jsx(eF,{children:x.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:a("settings.workspace")})}),x.jsx(tF,{className:"flex flex-col gap-1",children:ds.map(({id:o,labelKey:s,icon:u})=>{const c=o===e;return x.jsxs(It,{type:"button",variant:c?"secondary":"ghost","aria-current":c?"page":void 0,onClick:()=>{n(o)},className:"w-full justify-start gap-2",children:[x.jsx(u,{className:c?void 0:"text-muted-foreground"}),x.jsx("span",{children:a(s)})]},o)})})]})})}dr.use(hU).init({resources:f9,lng:yA(),fallbackLng:"en-US",supportedLngs:[...mA],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function yA(){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 S9(){const e=mo();v.useEffect(()=>{const n=new EventSource("/api/events"),a=()=>{e.invalidateQueries({queryKey:xi,refetchType:e.isMutating({mutationKey:hh})>0?"none":"active"})},o=s=>{try{const u=JSON.parse(s.data);typeof u=="object"&&u!==null&&"version"in u&&u.version===v7&&"type"in u&&u.type===b7&&a()}catch{}};return n.addEventListener("open",a),n.addEventListener("foundry",o),()=>{n.removeEventListener("open",a),n.removeEventListener("foundry",o),n.close()}},[e])}const Hy=matchMedia("(prefers-color-scheme: dark)");function w9(e){return Hy.addEventListener("change",e),()=>Hy.removeEventListener("change",e)}function E9(){return Hy.matches?"dark":"light"}function R9({children:e}){S9();const{theme:n,language:a}=gb(),o=v.useSyncExternalStore(w9,E9),s=n==="system"?o:n,u=a==="system"?yA():a;return v.useLayoutEffect(()=>{const c=document.documentElement;c.classList.toggle("dark",s==="dark"),c.style.colorScheme=s},[s]),v.useLayoutEffect(()=>{dr.changeLanguage(u),document.documentElement.lang=u},[u]),e}const C9=new LP({queryCache:new xT({onError:(e,n)=>{n.queryKey[0]==="skill-targets"?kn.error(dr.t("settings.errors.skillTargets")):n.queryKey[0]==="settings"&&kn.error(dr.t("settings.errors.load"))}})});function T9(){return null}function O9(e){switch(e){case"/library/instructions":return x.jsx(c7,{});case"/library/skills":return x.jsx(M7,{});default:return x.jsx(T9,{})}}const M9=dz([{element:x.jsx(a8,{}),children:[...GU.map(e=>({path:e,element:O9(e)})),{path:"/library/skills/:name",element:x.jsx(A7,{})}]},{element:x.jsx(o8,{}),children:[{path:"/settings",element:x.jsx(b9,{}),handle:{backTo:"/dashboard"}}]},{path:"*",element:x.jsx(U5,{to:"/dashboard",replace:!0})}]);function A9(){return x.jsx(dP,{client:C9,children:x.jsx(Q3,{children:x.jsx(R9,{children:x.jsx(D9,{})})})})}function D9(){const{theme:e}=gb();return x.jsxs(x.Fragment,{children:[x.jsx(Ez,{router:M9}),x.jsx(cP,{theme:e})]})}n4.createRoot(document.getElementById("root")).render(x.jsx(v.StrictMode,{children:x.jsx(A9,{})}));export{Ne as W,a7 as _,x as j,v as r,Qt as u};