skybridge 0.0.0-dev.f5a2ffe → 0.0.0-dev.f615683

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 (157) hide show
  1. package/README.md +73 -148
  2. package/dist/src/emulator/assets/index-BjyctK8j.js +133 -0
  3. package/dist/src/emulator/assets/index-BlZAHQDQ.css +1 -0
  4. package/dist/src/emulator/favicon.ico +0 -0
  5. package/dist/src/emulator/index.html +14 -0
  6. package/dist/src/server/emulatorStaticServer.d.ts +15 -0
  7. package/dist/src/server/emulatorStaticServer.js +38 -0
  8. package/dist/src/server/emulatorStaticServer.js.map +1 -0
  9. package/dist/src/server/index.d.ts +1 -2
  10. package/dist/src/server/index.js +1 -2
  11. package/dist/src/server/index.js.map +1 -1
  12. package/dist/src/server/inferUtilityTypes.d.ts +54 -0
  13. package/dist/src/server/inferUtilityTypes.js +2 -0
  14. package/dist/src/server/inferUtilityTypes.js.map +1 -0
  15. package/dist/src/server/server.d.ts +52 -9
  16. package/dist/src/server/server.js +12 -4
  17. package/dist/src/server/server.js.map +1 -1
  18. package/dist/src/server/templateHelper.js +2 -2
  19. package/dist/src/server/templateHelper.js.map +1 -1
  20. package/dist/src/server/widgetsDevServer.js +2 -2
  21. package/dist/src/server/widgetsDevServer.js.map +1 -1
  22. package/dist/src/test/utils.d.ts +62 -1
  23. package/dist/src/test/utils.js +124 -3
  24. package/dist/src/test/utils.js.map +1 -1
  25. package/dist/src/test/widget.test.js +19 -20
  26. package/dist/src/test/widget.test.js.map +1 -1
  27. package/dist/src/web/create-store.d.ts +3 -0
  28. package/dist/src/web/create-store.js +25 -0
  29. package/dist/src/web/create-store.js.map +1 -0
  30. package/dist/src/web/create-store.test.js +70 -0
  31. package/dist/src/web/create-store.test.js.map +1 -0
  32. package/dist/src/web/data-llm.d.ts +14 -0
  33. package/dist/src/web/data-llm.js +68 -0
  34. package/dist/src/web/data-llm.js.map +1 -0
  35. package/dist/src/web/data-llm.test.d.ts +1 -0
  36. package/dist/src/web/data-llm.test.js +76 -0
  37. package/dist/src/web/data-llm.test.js.map +1 -0
  38. package/dist/src/web/generate-helpers.d.ts +113 -0
  39. package/dist/src/web/generate-helpers.js +109 -0
  40. package/dist/src/web/generate-helpers.js.map +1 -0
  41. package/dist/src/web/generate-helpers.test-d.d.ts +1 -0
  42. package/dist/src/web/generate-helpers.test-d.js +154 -0
  43. package/dist/src/web/generate-helpers.test-d.js.map +1 -0
  44. package/dist/src/web/generate-helpers.test.d.ts +1 -0
  45. package/dist/src/web/generate-helpers.test.js +17 -0
  46. package/dist/src/web/generate-helpers.test.js.map +1 -0
  47. package/dist/src/web/helpers/state.d.ts +7 -0
  48. package/dist/src/web/helpers/state.js +40 -0
  49. package/dist/src/web/helpers/state.js.map +1 -0
  50. package/dist/src/web/helpers/state.test.d.ts +1 -0
  51. package/dist/src/web/helpers/state.test.js +53 -0
  52. package/dist/src/web/helpers/state.test.js.map +1 -0
  53. package/dist/src/web/hooks/index.d.ts +10 -5
  54. package/dist/src/web/hooks/index.js +10 -5
  55. package/dist/src/web/hooks/index.js.map +1 -1
  56. package/dist/src/web/hooks/use-call-tool.d.ts +69 -23
  57. package/dist/src/web/hooks/use-call-tool.js +26 -10
  58. package/dist/src/web/hooks/use-call-tool.js.map +1 -1
  59. package/dist/src/web/hooks/use-call-tool.test-d.d.ts +1 -0
  60. package/dist/src/web/hooks/use-call-tool.test-d.js +104 -0
  61. package/dist/src/web/hooks/use-call-tool.test-d.js.map +1 -0
  62. package/dist/src/web/hooks/use-call-tool.test.js +108 -3
  63. package/dist/src/web/hooks/use-call-tool.test.js.map +1 -1
  64. package/dist/src/web/hooks/use-display-mode.js.map +1 -1
  65. package/dist/src/web/hooks/use-display-mode.test.js +2 -2
  66. package/dist/src/web/hooks/use-display-mode.test.js.map +1 -1
  67. package/dist/src/web/hooks/use-files.d.ts +10 -0
  68. package/dist/src/web/hooks/use-files.js +7 -0
  69. package/dist/src/web/hooks/use-files.js.map +1 -0
  70. package/dist/src/web/hooks/use-files.test.d.ts +1 -0
  71. package/dist/src/web/hooks/use-files.test.js +29 -0
  72. package/dist/src/web/hooks/use-files.test.js.map +1 -0
  73. package/dist/src/web/hooks/use-locale.d.ts +1 -0
  74. package/dist/src/web/hooks/use-locale.js +5 -0
  75. package/dist/src/web/hooks/use-locale.js.map +1 -0
  76. package/dist/src/web/hooks/use-locale.test.d.ts +1 -0
  77. package/dist/src/web/hooks/use-locale.test.js +21 -0
  78. package/dist/src/web/hooks/use-locale.test.js.map +1 -0
  79. package/dist/src/web/hooks/use-open-external.d.ts +1 -0
  80. package/dist/src/web/hooks/use-open-external.js +6 -0
  81. package/dist/src/web/hooks/use-open-external.js.map +1 -0
  82. package/dist/src/web/hooks/use-open-external.test.d.ts +1 -0
  83. package/dist/src/web/hooks/use-open-external.test.js +24 -0
  84. package/dist/src/web/hooks/use-open-external.test.js.map +1 -0
  85. package/dist/src/web/hooks/use-openai-global.d.ts +2 -2
  86. package/dist/src/web/hooks/use-openai-global.js +4 -2
  87. package/dist/src/web/hooks/use-openai-global.js.map +1 -1
  88. package/dist/src/web/hooks/use-request-modal.d.ts +6 -0
  89. package/dist/src/web/hooks/use-request-modal.js +9 -0
  90. package/dist/src/web/hooks/use-request-modal.js.map +1 -0
  91. package/dist/src/web/hooks/use-request-modal.test.d.ts +1 -0
  92. package/dist/src/web/hooks/use-request-modal.test.js +24 -0
  93. package/dist/src/web/hooks/use-request-modal.test.js.map +1 -0
  94. package/dist/src/web/hooks/use-send-follow-up-message.d.ts +1 -0
  95. package/dist/src/web/hooks/use-send-follow-up-message.js +11 -0
  96. package/dist/src/web/hooks/use-send-follow-up-message.js.map +1 -0
  97. package/dist/src/web/hooks/use-theme.d.ts +1 -0
  98. package/dist/src/web/hooks/use-theme.js +5 -0
  99. package/dist/src/web/hooks/use-theme.js.map +1 -0
  100. package/dist/src/web/hooks/use-theme.test.d.ts +1 -0
  101. package/dist/src/web/hooks/use-theme.test.js +26 -0
  102. package/dist/src/web/hooks/use-theme.test.js.map +1 -0
  103. package/dist/src/web/hooks/use-tool-info.d.ts +24 -4
  104. package/dist/src/web/hooks/use-tool-info.js +17 -4
  105. package/dist/src/web/hooks/use-tool-info.js.map +1 -1
  106. package/dist/src/web/hooks/use-tool-info.test-d.d.ts +1 -0
  107. package/dist/src/web/hooks/use-tool-info.test-d.js +73 -0
  108. package/dist/src/web/hooks/use-tool-info.test-d.js.map +1 -0
  109. package/dist/src/web/hooks/use-tool-info.test.js +36 -15
  110. package/dist/src/web/hooks/use-tool-info.test.js.map +1 -1
  111. package/dist/src/web/hooks/use-user-agent.d.ts +1 -0
  112. package/dist/src/web/hooks/use-user-agent.js +5 -0
  113. package/dist/src/web/hooks/use-user-agent.js.map +1 -0
  114. package/dist/src/web/hooks/use-user-agent.test.d.ts +1 -0
  115. package/dist/src/web/hooks/use-user-agent.test.js +31 -0
  116. package/dist/src/web/hooks/use-user-agent.test.js.map +1 -0
  117. package/dist/src/web/hooks/use-widget-state.js +9 -7
  118. package/dist/src/web/hooks/use-widget-state.js.map +1 -1
  119. package/dist/src/web/hooks/use-widget-state.test.js +2 -3
  120. package/dist/src/web/hooks/use-widget-state.test.js.map +1 -1
  121. package/dist/src/web/index.d.ts +6 -3
  122. package/dist/src/web/index.js +6 -3
  123. package/dist/src/web/index.js.map +1 -1
  124. package/dist/src/web/mount-widget.d.ts +1 -1
  125. package/dist/src/web/mount-widget.js +35 -1
  126. package/dist/src/web/mount-widget.js.map +1 -1
  127. package/dist/src/web/plugin/data-llm.test.d.ts +1 -0
  128. package/dist/src/web/plugin/data-llm.test.js +81 -0
  129. package/dist/src/web/plugin/data-llm.test.js.map +1 -0
  130. package/dist/src/web/{plugin.js → plugin/plugin.js} +5 -0
  131. package/dist/src/web/plugin/plugin.js.map +1 -0
  132. package/dist/src/web/plugin/transform-data-llm.d.ts +12 -0
  133. package/dist/src/web/plugin/transform-data-llm.js +93 -0
  134. package/dist/src/web/plugin/transform-data-llm.js.map +1 -0
  135. package/dist/src/web/plugin/transform-data-llm.test.d.ts +1 -0
  136. package/dist/src/web/plugin/transform-data-llm.test.js +81 -0
  137. package/dist/src/web/plugin/transform-data-llm.test.js.map +1 -0
  138. package/dist/src/web/proxy.d.ts +1 -0
  139. package/dist/src/web/proxy.js +48 -0
  140. package/dist/src/web/proxy.js.map +1 -0
  141. package/dist/src/web/types.d.ts +47 -18
  142. package/dist/src/web/types.js +1 -0
  143. package/dist/src/web/types.js.map +1 -1
  144. package/dist/vitest.config.js +0 -1
  145. package/dist/vitest.config.js.map +1 -1
  146. package/package.json +17 -6
  147. package/dist/src/test/setup.js +0 -9
  148. package/dist/src/test/setup.js.map +0 -1
  149. package/dist/src/web/hooks/use-tool-output.d.ts +0 -4
  150. package/dist/src/web/hooks/use-tool-output.js +0 -9
  151. package/dist/src/web/hooks/use-tool-output.js.map +0 -1
  152. package/dist/src/web/hooks/use-tool-response-metadata.d.ts +0 -4
  153. package/dist/src/web/hooks/use-tool-response-metadata.js +0 -8
  154. package/dist/src/web/hooks/use-tool-response-metadata.js.map +0 -1
  155. package/dist/src/web/plugin.js.map +0 -1
  156. /package/dist/src/{test/setup.d.ts → web/create-store.test.d.ts} +0 -0
  157. /package/dist/src/web/{plugin.d.ts → plugin/plugin.d.ts} +0 -0
@@ -0,0 +1,133 @@
1
+ var wF=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var A1e=wF((Pi,Di)=>{function xF(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var am=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vb={exports:{}},pd={};var MR;function _F(){if(MR)return pd;MR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return pd.Fragment=t,pd.jsx=n,pd.jsxs=n,pd}var jR;function EF(){return jR||(jR=1,Vb.exports=_F()),Vb.exports}var j=EF(),Ub={exports:{}},St={};var PR;function CF(){if(PR)return St;PR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function x($){return $===null||typeof $!="object"?null:($=g&&$[g]||$["@@iterator"],typeof $=="function"?$:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,w={};function S($,B,F){this.props=$,this.context=B,this.refs=w,this.updater=F||y}S.prototype.isReactComponent={},S.prototype.setState=function($,B){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,B,"setState")},S.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function v(){}v.prototype=S.prototype;function E($,B,F){this.props=$,this.context=B,this.refs=w,this.updater=F||y}var b=E.prototype=new v;b.constructor=E,T(b,S.prototype),b.isPureReactComponent=!0;var C=Array.isArray;function _(){}var A={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function P($,B,F){var D=F.ref;return{$$typeof:e,type:$,key:B,ref:D!==void 0?D:null,props:F}}function I($,B){return P($.type,B,$.props)}function z($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function q($){var B={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(F){return B[F]})}var K=/\/+/g;function X($,B){return typeof $=="object"&&$!==null&&$.key!=null?q(""+$.key):B.toString(36)}function Y($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(_,_):($.status="pending",$.then(function(B){$.status==="pending"&&($.status="fulfilled",$.value=B)},function(B){$.status==="pending"&&($.status="rejected",$.reason=B)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function H($,B,F,D,V){var J=typeof $;(J==="undefined"||J==="boolean")&&($=null);var ne=!1;if($===null)ne=!0;else switch(J){case"bigint":case"string":case"number":ne=!0;break;case"object":switch($.$$typeof){case e:case t:ne=!0;break;case h:return ne=$._init,H(ne($._payload),B,F,D,V)}}if(ne)return V=V($),ne=D===""?"."+X($,0):D,C(V)?(F="",ne!=null&&(F=ne.replace(K,"$&/")+"/"),H(V,B,F,"",function(Ee){return Ee})):V!=null&&(z(V)&&(V=I(V,F+(V.key==null||$&&$.key===V.key?"":(""+V.key).replace(K,"$&/")+"/")+ne)),B.push(V)),1;ne=0;var oe=D===""?".":D+":";if(C($))for(var he=0;he<$.length;he++)D=$[he],J=oe+X(D,he),ne+=H(D,B,F,J,V);else if(he=x($),typeof he=="function")for($=he.call($),he=0;!(D=$.next()).done;)D=D.value,J=oe+X(D,he++),ne+=H(D,B,F,J,V);else if(J==="object"){if(typeof $.then=="function")return H(Y($),B,F,D,V);throw B=String($),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ne}function Z($,B,F){if($==null)return $;var D=[],V=0;return H($,D,"","",function(J){return B.call(F,J,V++)}),D}function ee($){if($._status===-1){var B=$._result;B=B(),B.then(function(F){($._status===0||$._status===-1)&&($._status=1,$._result=F)},function(F){($._status===0||$._status===-1)&&($._status=2,$._result=F)}),$._status===-1&&($._status=0,$._result=B)}if($._status===1)return $._result.default;throw $._result}var ae=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},re={map:Z,forEach:function($,B,F){Z($,function(){B.apply(this,arguments)},F)},count:function($){var B=0;return Z($,function(){B++}),B},toArray:function($){return Z($,function(B){return B})||[]},only:function($){if(!z($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return St.Activity=p,St.Children=re,St.Component=S,St.Fragment=n,St.Profiler=i,St.PureComponent=E,St.StrictMode=r,St.Suspense=u,St.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,St.__COMPILER_RUNTIME={__proto__:null,c:function($){return A.H.useMemoCache($)}},St.cache=function($){return function(){return $.apply(null,arguments)}},St.cacheSignal=function(){return null},St.cloneElement=function($,B,F){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var D=T({},$.props),V=$.key;if(B!=null)for(J in B.key!==void 0&&(V=""+B.key),B)!M.call(B,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&B.ref===void 0||(D[J]=B[J]);var J=arguments.length-2;if(J===1)D.children=F;else if(1<J){for(var ne=Array(J),oe=0;oe<J;oe++)ne[oe]=arguments[oe+2];D.children=ne}return P($.type,V,D)},St.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:s,_context:$},$},St.createElement=function($,B,F){var D,V={},J=null;if(B!=null)for(D in B.key!==void 0&&(J=""+B.key),B)M.call(B,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(V[D]=B[D]);var ne=arguments.length-2;if(ne===1)V.children=F;else if(1<ne){for(var oe=Array(ne),he=0;he<ne;he++)oe[he]=arguments[he+2];V.children=oe}if($&&$.defaultProps)for(D in ne=$.defaultProps,ne)V[D]===void 0&&(V[D]=ne[D]);return P($,J,V)},St.createRef=function(){return{current:null}},St.forwardRef=function($){return{$$typeof:c,render:$}},St.isValidElement=z,St.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:ee}},St.memo=function($,B){return{$$typeof:d,type:$,compare:B===void 0?null:B}},St.startTransition=function($){var B=A.T,F={};A.T=F;try{var D=$(),V=A.S;V!==null&&V(F,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(_,ae)}catch(J){ae(J)}finally{B!==null&&F.types!==null&&(B.types=F.types),A.T=B}},St.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},St.use=function($){return A.H.use($)},St.useActionState=function($,B,F){return A.H.useActionState($,B,F)},St.useCallback=function($,B){return A.H.useCallback($,B)},St.useContext=function($){return A.H.useContext($)},St.useDebugValue=function(){},St.useDeferredValue=function($,B){return A.H.useDeferredValue($,B)},St.useEffect=function($,B){return A.H.useEffect($,B)},St.useEffectEvent=function($){return A.H.useEffectEvent($)},St.useId=function(){return A.H.useId()},St.useImperativeHandle=function($,B,F){return A.H.useImperativeHandle($,B,F)},St.useInsertionEffect=function($,B){return A.H.useInsertionEffect($,B)},St.useLayoutEffect=function($,B){return A.H.useLayoutEffect($,B)},St.useMemo=function($,B){return A.H.useMemo($,B)},St.useOptimistic=function($,B){return A.H.useOptimistic($,B)},St.useReducer=function($,B,F){return A.H.useReducer($,B,F)},St.useRef=function($){return A.H.useRef($)},St.useState=function($){return A.H.useState($)},St.useSyncExternalStore=function($,B,F){return A.H.useSyncExternalStore($,B,F)},St.useTransition=function(){return A.H.useTransition()},St.version="19.2.0",St}var DR;function rf(){return DR||(DR=1,Ub.exports=CF()),Ub.exports}var k=rf();const ki=Qo(k),of=xF({__proto__:null,default:ki},[k]);var qb={exports:{}},md={},Bb={exports:{}},Hb={};var NR;function TF(){return NR||(NR=1,(function(e){function t(H,Z){var ee=H.length;H.push(Z);e:for(;0<ee;){var ae=ee-1>>>1,re=H[ae];if(0<i(re,Z))H[ae]=Z,H[ee]=re,ee=ae;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var Z=H[0],ee=H.pop();if(ee!==Z){H[0]=ee;e:for(var ae=0,re=H.length,$=re>>>1;ae<$;){var B=2*(ae+1)-1,F=H[B],D=B+1,V=H[D];if(0>i(F,ee))D<re&&0>i(V,F)?(H[ae]=V,H[D]=ee,ae=D):(H[ae]=F,H[B]=ee,ae=B);else if(D<re&&0>i(V,ee))H[ae]=V,H[D]=ee,ae=D;else break e}}return Z}function i(H,Z){var ee=H.sortIndex-Z.sortIndex;return ee!==0?ee:H.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],d=[],h=1,p=null,g=3,x=!1,y=!1,T=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function b(H){for(var Z=n(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=H)r(d),Z.sortIndex=Z.expirationTime,t(u,Z);else break;Z=n(d)}}function C(H){if(T=!1,b(H),!y)if(n(u)!==null)y=!0,_||(_=!0,q());else{var Z=n(d);Z!==null&&Y(C,Z.startTime-H)}}var _=!1,A=-1,M=5,P=-1;function I(){return w?!0:!(e.unstable_now()-P<M)}function z(){if(w=!1,_){var H=e.unstable_now();P=H;var Z=!0;try{e:{y=!1,T&&(T=!1,v(A),A=-1),x=!0;var ee=g;try{t:{for(b(H),p=n(u);p!==null&&!(p.expirationTime>H&&I());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var re=ae(p.expirationTime<=H);if(H=e.unstable_now(),typeof re=="function"){p.callback=re,b(H),Z=!0;break t}p===n(u)&&r(u),b(H)}else r(u);p=n(u)}if(p!==null)Z=!0;else{var $=n(d);$!==null&&Y(C,$.startTime-H),Z=!1}}break e}finally{p=null,g=ee,x=!1}Z=void 0}}finally{Z?q():_=!1}}}var q;if(typeof E=="function")q=function(){E(z)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,X=K.port2;K.port1.onmessage=z,q=function(){X.postMessage(null)}}else q=function(){S(z,0)};function Y(H,Z){A=S(function(){H(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(H){switch(g){case 1:case 2:case 3:var Z=3;break;default:Z=g}var ee=g;g=Z;try{return H()}finally{g=ee}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(H,Z){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ee=g;g=H;try{return Z()}finally{g=ee}},e.unstable_scheduleCallback=function(H,Z,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,H){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=ee+re,H={id:h++,callback:Z,priorityLevel:H,startTime:ee,expirationTime:re,sortIndex:-1},ee>ae?(H.sortIndex=ee,t(d,H),n(u)===null&&H===n(d)&&(T?(v(A),A=-1):T=!0,Y(C,ee-ae))):(H.sortIndex=re,t(u,H),y||x||(y=!0,_||(_=!0,q()))),H},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(H){var Z=g;return function(){var ee=g;g=Z;try{return H.apply(this,arguments)}finally{g=ee}}}})(Hb)),Hb}var $R;function RF(){return $R||($R=1,Bb.exports=TF()),Bb.exports}var Kb={exports:{}},Br={};var IR;function AF(){if(IR)return Br;IR=1;var e=rf();function t(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(u,d,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:u,containerInfo:d,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Br.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Br.createPortal=function(u,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return s(u,d,null,h)},Br.flushSync=function(u){var d=l.T,h=r.p;try{if(l.T=null,r.p=2,u)return u()}finally{l.T=d,r.p=h,r.d.f()}},Br.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(u,d))},Br.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Br.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var h=d.as,p=c(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:x}):h==="script"&&r.d.X(u,{crossOrigin:p,integrity:g,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Br.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(u)},Br.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,p=c(h,d.crossOrigin);r.d.L(u,h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Br.preloadModule=function(u,d){if(typeof u=="string")if(d){var h=c(d.as,d.crossOrigin);r.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(u)},Br.requestFormReset=function(u){r.d.r(u)},Br.unstable_batchedUpdates=function(u,d){return u(d)},Br.useFormState=function(u,d,h){return l.H.useFormState(u,d,h)},Br.useFormStatus=function(){return l.H.useHostTransitionStatus()},Br.version="19.2.0",Br}var zR;function ij(){if(zR)return Kb.exports;zR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kb.exports=AF(),Kb.exports}var FR;function OF(){if(FR)return md;FR=1;var e=RF(),t=rf(),n=ij();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)a+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,f=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(f=a.return),o=a.return;while(o)}return a.tag===3?f:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function u(o){if(s(o)!==o)throw Error(r(188))}function d(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var f=o,m=a;;){var R=f.return;if(R===null)break;var O=R.alternate;if(O===null){if(m=R.return,m!==null){f=m;continue}break}if(R.child===O.child){for(O=R.child;O;){if(O===f)return u(R),o;if(O===m)return u(R),a;O=O.sibling}throw Error(r(188))}if(f.return!==m.return)f=R,m=O;else{for(var N=!1,W=R.child;W;){if(W===f){N=!0,f=R,m=O;break}if(W===m){N=!0,m=R,f=O;break}W=W.sibling}if(!N){for(W=O.child;W;){if(W===f){N=!0,f=O,m=R;break}if(W===m){N=!0,m=O,f=R;break}W=W.sibling}if(!N)throw Error(r(189))}}if(f.alternate!==m)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?o:a}function h(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=h(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),E=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function q(o){return o===null||typeof o!="object"?null:(o=z&&o[z]||o["@@iterator"],typeof o=="function"?o:null)}var K=Symbol.for("react.client.reference");function X(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===K?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case T:return"Fragment";case S:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case _:return"SuspenseList";case P:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case E:return o.displayName||"Context";case v:return(o._context.displayName||"Context")+".Consumer";case b:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case A:return a=o.displayName||null,a!==null?a:X(o.type)||"Memo";case M:a=o._payload,o=o._init;try{return X(o(a))}catch{}}return null}var Y=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],re=-1;function $(o){return{current:o}}function B(o){0>re||(o.current=ae[re],ae[re]=null,re--)}function F(o,a){re++,ae[re]=o.current,o.current=a}var D=$(null),V=$(null),J=$(null),ne=$(null);function oe(o,a){switch(F(J,a),F(V,o),F(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?eR(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=eR(a),o=tR(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}B(D),F(D,o)}function he(){B(D),B(V),B(J)}function Ee(o){o.memoizedState!==null&&F(ne,o);var a=D.current,f=tR(a,o.type);a!==f&&(F(V,o),F(D,f))}function te(o){V.current===o&&(B(D),B(V)),ne.current===o&&(B(ne),ud._currentValue=ee)}var ie,le;function Se(o){if(ie===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);ie=a&&a[1]||"",le=-1<f.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ie+o+le}var Re=!1;function we(o,a){if(!o||Re)return"";Re=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(a){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(Te){var xe=Te}Reflect.construct(o,[],je)}else{try{je.call()}catch(Te){xe=Te}o.call(je.prototype)}}else{try{throw Error()}catch(Te){xe=Te}(je=o())&&typeof je.catch=="function"&&je.catch(function(){})}}catch(Te){if(Te&&xe&&typeof Te.stack=="string")return[Te.stack,xe.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=m.DetermineComponentFrameRoot(),N=O[0],W=O[1];if(N&&W){var se=N.split(`
4
+ `),be=W.split(`
5
+ `);for(R=m=0;m<se.length&&!se[m].includes("DetermineComponentFrameRoot");)m++;for(;R<be.length&&!be[R].includes("DetermineComponentFrameRoot");)R++;if(m===se.length||R===be.length)for(m=se.length-1,R=be.length-1;1<=m&&0<=R&&se[m]!==be[R];)R--;for(;1<=m&&0<=R;m--,R--)if(se[m]!==be[R]){if(m!==1||R!==1)do if(m--,R--,0>R||se[m]!==be[R]){var Ae=`
6
+ `+se[m].replace(" at new "," at ");return o.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",o.displayName)),Ae}while(1<=m&&0<=R);break}}}finally{Re=!1,Error.prepareStackTrace=f}return(f=o?o.displayName||o.name:"")?Se(f):""}function Ie(o,a){switch(o.tag){case 26:case 27:case 5:return Se(o.type);case 16:return Se("Lazy");case 13:return o.child!==a&&a!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return we(o.type,!1);case 11:return we(o.type.render,!1);case 1:return we(o.type,!0);case 31:return Se("Activity");default:return""}}function Pe(o){try{var a="",f=null;do a+=Ie(o,f),f=o,o=o.return;while(o);return a}catch(m){return`
7
+ Error generating stack: `+m.message+`
8
+ `+m.stack}}var ye=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,De=e.unstable_cancelCallback,We=e.unstable_shouldYield,ze=e.unstable_requestPaint,Ve=e.unstable_now,qe=e.unstable_getCurrentPriorityLevel,dt=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,He=e.unstable_IdlePriority,at=e.log,Et=e.unstable_setDisableYieldValue,xt=null,Ct=null;function Wt(o){if(typeof at=="function"&&Et(o),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(xt,o)}catch{}}var zt=Math.clz32?Math.clz32:Ft,Tt=Math.log,Yt=Math.LN2;function Ft(o){return o>>>=0,o===0?32:31-(Tt(o)/Yt|0)|0}var Xt=256,dn=262144,ut=4194304;function mt(o){var a=o&42;if(a!==0)return a;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function ft(o,a,f){var m=o.pendingLanes;if(m===0)return 0;var R=0,O=o.suspendedLanes,N=o.pingedLanes;o=o.warmLanes;var W=m&134217727;return W!==0?(m=W&~O,m!==0?R=mt(m):(N&=W,N!==0?R=mt(N):f||(f=W&~o,f!==0&&(R=mt(f))))):(W=m&~O,W!==0?R=mt(W):N!==0?R=mt(N):f||(f=m&~o,f!==0&&(R=mt(f)))),R===0?0:a!==0&&a!==R&&(a&O)===0&&(O=R&-R,f=a&-a,O>=f||O===32&&(f&4194048)!==0)?a:R}function bt(o,a){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&a)===0}function Qt(o,a){switch(o){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 kn(){var o=ut;return ut<<=1,(ut&62914560)===0&&(ut=4194304),o}function Rr(o){for(var a=[],f=0;31>f;f++)a.push(o);return a}function Ar(o,a){o.pendingLanes|=a,a!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function ir(o,a,f,m,R,O){var N=o.pendingLanes;o.pendingLanes=f,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=f,o.entangledLanes&=f,o.errorRecoveryDisabledLanes&=f,o.shellSuspendCounter=0;var W=o.entanglements,se=o.expirationTimes,be=o.hiddenUpdates;for(f=N&~f;0<f;){var Ae=31-zt(f),je=1<<Ae;W[Ae]=0,se[Ae]=-1;var xe=be[Ae];if(xe!==null)for(be[Ae]=null,Ae=0;Ae<xe.length;Ae++){var Te=xe[Ae];Te!==null&&(Te.lane&=-536870913)}f&=~je}m!==0&&ri(o,m,0),O!==0&&R===0&&o.tag!==0&&(o.suspendedLanes|=O&~(N&~a))}function ri(o,a,f){o.pendingLanes|=a,o.suspendedLanes&=~a;var m=31-zt(a);o.entangledLanes|=a,o.entanglements[m]=o.entanglements[m]|1073741824|f&261930}function Cn(o,a){var f=o.entangledLanes|=a;for(o=o.entanglements;f;){var m=31-zt(f),R=1<<m;R&a|o[m]&a&&(o[m]|=a),f&=~R}}function pr(o,a){var f=a&-a;return f=(f&42)!==0?1:In(f),(f&(o.suspendedLanes|a))!==0?0:f}function In(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Jt(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function er(){var o=Z.p;return o!==0?o:(o=window.event,o===void 0?32:ER(o.type))}function Yr(o,a){var f=Z.p;try{return Z.p=o,a()}finally{Z.p=f}}var mr=Math.random().toString(36).slice(2),en="__reactFiber$"+mr,xn="__reactProps$"+mr,Mr="__reactContainer$"+mr,bi="__reactEvents$"+mr,To="__reactListeners$"+mr,xf="__reactHandles$"+mr,el="__reactResources$"+mr,tl="__reactMarker$"+mr;function _f(o){delete o[en],delete o[xn],delete o[bi],delete o[To],delete o[xf]}function Fs(o){var a=o[en];if(a)return a;for(var f=o.parentNode;f;){if(a=f[Mr]||f[en]){if(f=a.alternate,a.child!==null||f!==null&&f.child!==null)for(o=lR(o);o!==null;){if(f=o[en])return f;o=lR(o)}return a}o=f,f=o.parentNode}return null}function Ls(o){if(o=o[en]||o[Mr]){var a=o.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return o}return null}function nl(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o.stateNode;throw Error(r(33))}function Vs(o){var a=o[el];return a||(a=o[el]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function or(o){o[tl]=!0}var Qh=new Set,Ef={};function so(o,a){Us(o,a),Us(o+"Capture",a)}function Us(o,a){for(Ef[o]=a,o=0;o<a.length;o++)Qh.add(a[o])}var Jh=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]*$"),ep={},mc={};function ii(o){return ye.call(mc,o)?!0:ye.call(ep,o)?!1:Jh.test(o)?mc[o]=!0:(ep[o]=!0,!1)}function rl(o,a,f){if(ii(a))if(f===null)o.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":o.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){o.removeAttribute(a);return}}o.setAttribute(a,""+f)}}function gc(o,a,f){if(f===null)o.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(a);return}o.setAttribute(a,""+f)}}function Ii(o,a,f,m){if(m===null)o.removeAttribute(f);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(f);return}o.setAttributeNS(a,f,""+m)}}function Xr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Cf(o){var a=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function tp(o,a,f){var m=Object.getOwnPropertyDescriptor(o.constructor.prototype,a);if(!o.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var R=m.get,O=m.set;return Object.defineProperty(o,a,{configurable:!0,get:function(){return R.call(this)},set:function(N){f=""+N,O.call(this,N)}}),Object.defineProperty(o,a,{enumerable:m.enumerable}),{getValue:function(){return f},setValue:function(N){f=""+N},stopTracking:function(){o._valueTracker=null,delete o[a]}}}}function Tf(o){if(!o._valueTracker){var a=Cf(o)?"checked":"value";o._valueTracker=tp(o,a,""+o[a])}}function Rf(o){if(!o)return!1;var a=o._valueTracker;if(!a)return!0;var f=a.getValue(),m="";return o&&(m=Cf(o)?o.checked?"true":"false":o.value),o=m,o!==f?(a.setValue(o),!0):!1}function yc(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Af=/[\n"\\]/g;function oi(o){return o.replace(Af,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function qs(o,a,f,m,R,O,N,W){o.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?o.type=N:o.removeAttribute("type"),a!=null?N==="number"?(a===0&&o.value===""||o.value!=a)&&(o.value=""+Xr(a)):o.value!==""+Xr(a)&&(o.value=""+Xr(a)):N!=="submit"&&N!=="reset"||o.removeAttribute("value"),a!=null?Of(o,N,Xr(a)):f!=null?Of(o,N,Xr(f)):m!=null&&o.removeAttribute("value"),R==null&&O!=null&&(o.defaultChecked=!!O),R!=null&&(o.checked=R&&typeof R!="function"&&typeof R!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?o.name=""+Xr(W):o.removeAttribute("name")}function np(o,a,f,m,R,O,N,W){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(o.type=O),a!=null||f!=null){if(!(O!=="submit"&&O!=="reset"||a!=null)){Tf(o);return}f=f!=null?""+Xr(f):"",a=a!=null?""+Xr(a):f,W||a===o.value||(o.value=a),o.defaultValue=a}m=m??R,m=typeof m!="function"&&typeof m!="symbol"&&!!m,o.checked=W?o.checked:!!m,o.defaultChecked=!!m,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(o.name=N),Tf(o)}function Of(o,a,f){a==="number"&&yc(o.ownerDocument)===o||o.defaultValue===""+f||(o.defaultValue=""+f)}function Bs(o,a,f,m){if(o=o.options,a){a={};for(var R=0;R<f.length;R++)a["$"+f[R]]=!0;for(f=0;f<o.length;f++)R=a.hasOwnProperty("$"+o[f].value),o[f].selected!==R&&(o[f].selected=R),R&&m&&(o[f].defaultSelected=!0)}else{for(f=""+Xr(f),a=null,R=0;R<o.length;R++){if(o[R].value===f){o[R].selected=!0,m&&(o[R].defaultSelected=!0);return}a!==null||o[R].disabled||(a=o[R])}a!==null&&(a.selected=!0)}}function rp(o,a,f){if(a!=null&&(a=""+Xr(a),a!==o.value&&(o.value=a),f==null)){o.defaultValue!==a&&(o.defaultValue=a);return}o.defaultValue=f!=null?""+Xr(f):""}function il(o,a,f,m){if(a==null){if(m!=null){if(f!=null)throw Error(r(92));if(Y(m)){if(1<m.length)throw Error(r(93));m=m[0]}f=m}f==null&&(f=""),a=f}f=Xr(a),o.defaultValue=f,m=o.textContent,m===f&&m!==""&&m!==null&&(o.value=m),Tf(o)}function Hs(o,a){if(a){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=a;return}}o.textContent=a}var Q=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 L(o,a,f){var m=a.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?m?o.setProperty(a,""):a==="float"?o.cssFloat="":o[a]="":m?o.setProperty(a,f):typeof f!="number"||f===0||Q.has(a)?a==="float"?o.cssFloat=f:o[a]=(""+f).trim():o[a]=f+"px"}function U(o,a,f){if(a!=null&&typeof a!="object")throw Error(r(62));if(o=o.style,f!=null){for(var m in f)!f.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?o.setProperty(m,""):m==="float"?o.cssFloat="":o[m]="");for(var R in a)m=a[R],a.hasOwnProperty(R)&&f[R]!==m&&L(o,R,m)}else for(var O in a)a.hasOwnProperty(O)&&L(o,O,a[O])}function G(o){if(o.indexOf("-")===-1)return!1;switch(o){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 ue=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_e=/^[\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 ge(o){return _e.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ce(){}var ke=null;function $e(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Be=null,Ke=null;function tt(o){var a=Ls(o);if(a&&(o=a.stateNode)){var f=o[xn]||null;e:switch(o=a.stateNode,a.type){case"input":if(qs(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),a=f.name,f.type==="radio"&&a!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+oi(""+a)+'"][type="radio"]'),a=0;a<f.length;a++){var m=f[a];if(m!==o&&m.form===o.form){var R=m[xn]||null;if(!R)throw Error(r(90));qs(m,R.value,R.defaultValue,R.defaultValue,R.checked,R.defaultChecked,R.type,R.name)}}for(a=0;a<f.length;a++)m=f[a],m.form===o.form&&Rf(m)}break e;case"textarea":rp(o,f.value,f.defaultValue);break e;case"select":a=f.value,a!=null&&Bs(o,!!f.multiple,a,!1)}}}var Ge=!1;function At(o,a,f){if(Ge)return o(a,f);Ge=!0;try{var m=o(a);return m}finally{if(Ge=!1,(Be!==null||Ke!==null)&&(Fp(),Be&&(a=Be,o=Ke,Ke=Be=null,tt(a),o)))for(a=0;a<o.length;a++)tt(o[a])}}function Mt(o,a){var f=o.stateNode;if(f===null)return null;var m=f[xn]||null;if(m===null)return null;f=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(r(231,a,typeof f));return f}var ot=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tn=!1;if(ot)try{var gr={};Object.defineProperty(gr,"passive",{get:function(){tn=!0}}),window.addEventListener("test",gr,gr),window.removeEventListener("test",gr,gr)}catch{tn=!1}var cn=null,si=null,yr=null;function Ks(){if(yr)return yr;var o,a=si,f=a.length,m,R="value"in cn?cn.value:cn.textContent,O=R.length;for(o=0;o<f&&a[o]===R[o];o++);var N=f-o;for(m=1;m<=N&&a[f-m]===R[O-m];m++);return yr=R.slice(o,1<m?1-m:void 0)}function ao(o){var a=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&a===13&&(o=13)):o=a,o===10&&(o=13),32<=o||o===13?o:0}function lo(){return!0}function Si(){return!1}function jr(o){function a(f,m,R,O,N){this._reactName=f,this._targetInst=R,this.type=m,this.nativeEvent=O,this.target=N,this.currentTarget=null;for(var W in o)o.hasOwnProperty(W)&&(f=o[W],this[W]=f?f(O):O[W]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?lo:Si,this.isPropagationStopped=Si,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),a}var co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ol=jr(co),uo=p({},co,{view:0,detail:0}),kf=jr(uo),sl,al,ll,cl=p({},uo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:K0,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==ll&&(ll&&o.type==="mousemove"?(sl=o.screenX-ll.screenX,al=o.screenY-ll.screenY):al=sl=0,ll=o),sl)},movementY:function(o){return"movementY"in o?o.movementY:al}}),r2=jr(cl),Sz=p({},cl,{dataTransfer:0}),wz=jr(Sz),xz=p({},uo,{relatedTarget:0}),H0=jr(xz),_z=p({},co,{animationName:0,elapsedTime:0,pseudoElement:0}),Ez=jr(_z),Cz=p({},co,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Tz=jr(Cz),Rz=p({},co,{data:0}),i2=jr(Rz),Az={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Oz={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"},kz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mz(o){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(o):(o=kz[o])?!!a[o]:!1}function K0(){return Mz}var jz=p({},uo,{key:function(o){if(o.key){var a=Az[o.key]||o.key;if(a!=="Unidentified")return a}return o.type==="keypress"?(o=ao(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?Oz[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:K0,charCode:function(o){return o.type==="keypress"?ao(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?ao(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Pz=jr(jz),Dz=p({},cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),o2=jr(Dz),Nz=p({},uo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:K0}),$z=jr(Nz),Iz=p({},co,{propertyName:0,elapsedTime:0,pseudoElement:0}),zz=jr(Iz),Fz=p({},cl,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),Lz=jr(Fz),Vz=p({},co,{newState:0,oldState:0}),Uz=jr(Vz),qz=[9,13,27,32],G0=ot&&"CompositionEvent"in window,Mf=null;ot&&"documentMode"in document&&(Mf=document.documentMode);var Bz=ot&&"TextEvent"in window&&!Mf,s2=ot&&(!G0||Mf&&8<Mf&&11>=Mf),a2=" ",l2=!1;function c2(o,a){switch(o){case"keyup":return qz.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u2(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var vc=!1;function Hz(o,a){switch(o){case"compositionend":return u2(a);case"keypress":return a.which!==32?null:(l2=!0,a2);case"textInput":return o=a.data,o===a2&&l2?null:o;default:return null}}function Kz(o,a){if(vc)return o==="compositionend"||!G0&&c2(o,a)?(o=Ks(),yr=si=cn=null,vc=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return s2&&a.locale!=="ko"?null:a.data;default:return null}}var Gz={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 f2(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a==="input"?!!Gz[o.type]:a==="textarea"}function d2(o,a,f,m){Be?Ke?Ke.push(m):Ke=[m]:Be=m,a=Kp(a,"onChange"),0<a.length&&(f=new ol("onChange","change",null,f,m),o.push({event:f,listeners:a}))}var jf=null,Pf=null;function Zz(o){ZT(o,0)}function ip(o){var a=nl(o);if(Rf(a))return o}function h2(o,a){if(o==="change")return a}var p2=!1;if(ot){var Z0;if(ot){var W0="oninput"in document;if(!W0){var m2=document.createElement("div");m2.setAttribute("oninput","return;"),W0=typeof m2.oninput=="function"}Z0=W0}else Z0=!1;p2=Z0&&(!document.documentMode||9<document.documentMode)}function g2(){jf&&(jf.detachEvent("onpropertychange",y2),Pf=jf=null)}function y2(o){if(o.propertyName==="value"&&ip(Pf)){var a=[];d2(a,Pf,o,$e(o)),At(Zz,a)}}function Wz(o,a,f){o==="focusin"?(g2(),jf=a,Pf=f,jf.attachEvent("onpropertychange",y2)):o==="focusout"&&g2()}function Yz(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return ip(Pf)}function Xz(o,a){if(o==="click")return ip(a)}function Qz(o,a){if(o==="input"||o==="change")return ip(a)}function Jz(o,a){return o===a&&(o!==0||1/o===1/a)||o!==o&&a!==a}var wi=typeof Object.is=="function"?Object.is:Jz;function Df(o,a){if(wi(o,a))return!0;if(typeof o!="object"||o===null||typeof a!="object"||a===null)return!1;var f=Object.keys(o),m=Object.keys(a);if(f.length!==m.length)return!1;for(m=0;m<f.length;m++){var R=f[m];if(!ye.call(a,R)||!wi(o[R],a[R]))return!1}return!0}function v2(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function b2(o,a){var f=v2(o);o=0;for(var m;f;){if(f.nodeType===3){if(m=o+f.textContent.length,o<=a&&m>=a)return{node:f,offset:a-o};o=m}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=v2(f)}}function S2(o,a){return o&&a?o===a?!0:o&&o.nodeType===3?!1:a&&a.nodeType===3?S2(o,a.parentNode):"contains"in o?o.contains(a):o.compareDocumentPosition?!!(o.compareDocumentPosition(a)&16):!1:!1}function w2(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var a=yc(o.document);a instanceof o.HTMLIFrameElement;){try{var f=typeof a.contentWindow.location.href=="string"}catch{f=!1}if(f)o=a.contentWindow;else break;a=yc(o.document)}return a}function Y0(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a&&(a==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||a==="textarea"||o.contentEditable==="true")}var e8=ot&&"documentMode"in document&&11>=document.documentMode,bc=null,X0=null,Nf=null,Q0=!1;function x2(o,a,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Q0||bc==null||bc!==yc(m)||(m=bc,"selectionStart"in m&&Y0(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Nf&&Df(Nf,m)||(Nf=m,m=Kp(X0,"onSelect"),0<m.length&&(a=new ol("onSelect","select",null,a,f),o.push({event:a,listeners:m}),a.target=bc)))}function ul(o,a){var f={};return f[o.toLowerCase()]=a.toLowerCase(),f["Webkit"+o]="webkit"+a,f["Moz"+o]="moz"+a,f}var Sc={animationend:ul("Animation","AnimationEnd"),animationiteration:ul("Animation","AnimationIteration"),animationstart:ul("Animation","AnimationStart"),transitionrun:ul("Transition","TransitionRun"),transitionstart:ul("Transition","TransitionStart"),transitioncancel:ul("Transition","TransitionCancel"),transitionend:ul("Transition","TransitionEnd")},J0={},_2={};ot&&(_2=document.createElement("div").style,"AnimationEvent"in window||(delete Sc.animationend.animation,delete Sc.animationiteration.animation,delete Sc.animationstart.animation),"TransitionEvent"in window||delete Sc.transitionend.transition);function fl(o){if(J0[o])return J0[o];if(!Sc[o])return o;var a=Sc[o],f;for(f in a)if(a.hasOwnProperty(f)&&f in _2)return J0[o]=a[f];return o}var E2=fl("animationend"),C2=fl("animationiteration"),T2=fl("animationstart"),t8=fl("transitionrun"),n8=fl("transitionstart"),r8=fl("transitioncancel"),R2=fl("transitionend"),A2=new Map,ev="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ev.push("scrollEnd");function fo(o,a){A2.set(o,a),so(a,[o])}var op=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},zi=[],wc=0,tv=0;function sp(){for(var o=wc,a=tv=wc=0;a<o;){var f=zi[a];zi[a++]=null;var m=zi[a];zi[a++]=null;var R=zi[a];zi[a++]=null;var O=zi[a];if(zi[a++]=null,m!==null&&R!==null){var N=m.pending;N===null?R.next=R:(R.next=N.next,N.next=R),m.pending=R}O!==0&&O2(f,R,O)}}function ap(o,a,f,m){zi[wc++]=o,zi[wc++]=a,zi[wc++]=f,zi[wc++]=m,tv|=m,o.lanes|=m,o=o.alternate,o!==null&&(o.lanes|=m)}function nv(o,a,f,m){return ap(o,a,f,m),lp(o)}function dl(o,a){return ap(o,null,null,a),lp(o)}function O2(o,a,f){o.lanes|=f;var m=o.alternate;m!==null&&(m.lanes|=f);for(var R=!1,O=o.return;O!==null;)O.childLanes|=f,m=O.alternate,m!==null&&(m.childLanes|=f),O.tag===22&&(o=O.stateNode,o===null||o._visibility&1||(R=!0)),o=O,O=O.return;return o.tag===3?(O=o.stateNode,R&&a!==null&&(R=31-zt(f),o=O.hiddenUpdates,m=o[R],m===null?o[R]=[a]:m.push(a),a.lane=f|536870912),O):null}function lp(o){if(50<rd)throw rd=0,fb=null,Error(r(185));for(var a=o.return;a!==null;)o=a,a=o.return;return o.tag===3?o.stateNode:null}var xc={};function i8(o,a,f,m){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(o,a,f,m){return new i8(o,a,f,m)}function rv(o){return o=o.prototype,!(!o||!o.isReactComponent)}function is(o,a){var f=o.alternate;return f===null?(f=xi(o.tag,a,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=a,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&65011712,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,a=o.dependencies,f.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f.refCleanup=o.refCleanup,f}function k2(o,a){o.flags&=65011714;var f=o.alternate;return f===null?(o.childLanes=0,o.lanes=a,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=f.childLanes,o.lanes=f.lanes,o.child=f.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=f.memoizedProps,o.memoizedState=f.memoizedState,o.updateQueue=f.updateQueue,o.type=f.type,a=f.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),o}function cp(o,a,f,m,R,O){var N=0;if(m=o,typeof o=="function")rv(o)&&(N=1);else if(typeof o=="string")N=cF(o,f,D.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case P:return o=xi(31,f,a,R),o.elementType=P,o.lanes=O,o;case T:return hl(f.children,R,O,a);case w:N=8,R|=24;break;case S:return o=xi(12,f,a,R|2),o.elementType=S,o.lanes=O,o;case C:return o=xi(13,f,a,R),o.elementType=C,o.lanes=O,o;case _:return o=xi(19,f,a,R),o.elementType=_,o.lanes=O,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case E:N=10;break e;case v:N=9;break e;case b:N=11;break e;case A:N=14;break e;case M:N=16,m=null;break e}N=29,f=Error(r(130,o===null?"null":typeof o,"")),m=null}return a=xi(N,f,a,R),a.elementType=o,a.type=m,a.lanes=O,a}function hl(o,a,f,m){return o=xi(7,o,m,a),o.lanes=f,o}function iv(o,a,f){return o=xi(6,o,null,a),o.lanes=f,o}function M2(o){var a=xi(18,null,null,0);return a.stateNode=o,a}function ov(o,a,f){return a=xi(4,o.children!==null?o.children:[],o.key,a),a.lanes=f,a.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},a}var j2=new WeakMap;function Fi(o,a){if(typeof o=="object"&&o!==null){var f=j2.get(o);return f!==void 0?f:(a={value:o,source:a,stack:Pe(a)},j2.set(o,a),a)}return{value:o,source:a,stack:Pe(a)}}var _c=[],Ec=0,up=null,$f=0,Li=[],Vi=0,Gs=null,Ro=1,Ao="";function os(o,a){_c[Ec++]=$f,_c[Ec++]=up,up=o,$f=a}function P2(o,a,f){Li[Vi++]=Ro,Li[Vi++]=Ao,Li[Vi++]=Gs,Gs=o;var m=Ro;o=Ao;var R=32-zt(m)-1;m&=~(1<<R),f+=1;var O=32-zt(a)+R;if(30<O){var N=R-R%5;O=(m&(1<<N)-1).toString(32),m>>=N,R-=N,Ro=1<<32-zt(a)+R|f<<R|m,Ao=O+o}else Ro=1<<O|f<<R|m,Ao=o}function sv(o){o.return!==null&&(os(o,1),P2(o,1,0))}function av(o){for(;o===up;)up=_c[--Ec],_c[Ec]=null,$f=_c[--Ec],_c[Ec]=null;for(;o===Gs;)Gs=Li[--Vi],Li[Vi]=null,Ao=Li[--Vi],Li[Vi]=null,Ro=Li[--Vi],Li[Vi]=null}function D2(o,a){Li[Vi++]=Ro,Li[Vi++]=Ao,Li[Vi++]=Gs,Ro=a.id,Ao=a.overflow,Gs=o}var Pr=null,Mn=null,Ht=!1,Zs=null,Ui=!1,lv=Error(r(519));function Ws(o){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw If(Fi(a,o)),lv}function N2(o){var a=o.stateNode,f=o.type,m=o.memoizedProps;switch(a[en]=o,a[xn]=m,f){case"dialog":Vt("cancel",a),Vt("close",a);break;case"iframe":case"object":case"embed":Vt("load",a);break;case"video":case"audio":for(f=0;f<od.length;f++)Vt(od[f],a);break;case"source":Vt("error",a);break;case"img":case"image":case"link":Vt("error",a),Vt("load",a);break;case"details":Vt("toggle",a);break;case"input":Vt("invalid",a),np(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Vt("invalid",a);break;case"textarea":Vt("invalid",a),il(a,m.value,m.defaultValue,m.children)}f=m.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||a.textContent===""+f||m.suppressHydrationWarning===!0||QT(a.textContent,f)?(m.popover!=null&&(Vt("beforetoggle",a),Vt("toggle",a)),m.onScroll!=null&&Vt("scroll",a),m.onScrollEnd!=null&&Vt("scrollend",a),m.onClick!=null&&(a.onclick=ce),a=!0):a=!1,a||Ws(o,!0)}function $2(o){for(Pr=o.return;Pr;)switch(Pr.tag){case 5:case 31:case 13:Ui=!1;return;case 27:case 3:Ui=!0;return;default:Pr=Pr.return}}function Cc(o){if(o!==Pr)return!1;if(!Ht)return $2(o),Ht=!0,!1;var a=o.tag,f;if((f=a!==3&&a!==27)&&((f=a===5)&&(f=o.type,f=!(f!=="form"&&f!=="button")||Tb(o.type,o.memoizedProps)),f=!f),f&&Mn&&Ws(o),$2(o),a===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Mn=aR(o)}else if(a===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Mn=aR(o)}else a===27?(a=Mn,ca(o.type)?(o=Mb,Mb=null,Mn=o):Mn=a):Mn=Pr?Bi(o.stateNode.nextSibling):null;return!0}function pl(){Mn=Pr=null,Ht=!1}function cv(){var o=Zs;return o!==null&&(ui===null?ui=o:ui.push.apply(ui,o),Zs=null),o}function If(o){Zs===null?Zs=[o]:Zs.push(o)}var uv=$(null),ml=null,ss=null;function Ys(o,a,f){F(uv,a._currentValue),a._currentValue=f}function as(o){o._currentValue=uv.current,B(uv)}function fv(o,a,f){for(;o!==null;){var m=o.alternate;if((o.childLanes&a)!==a?(o.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),o===f)break;o=o.return}}function dv(o,a,f,m){var R=o.child;for(R!==null&&(R.return=o);R!==null;){var O=R.dependencies;if(O!==null){var N=R.child;O=O.firstContext;e:for(;O!==null;){var W=O;O=R;for(var se=0;se<a.length;se++)if(W.context===a[se]){O.lanes|=f,W=O.alternate,W!==null&&(W.lanes|=f),fv(O.return,f,o),m||(N=null);break e}O=W.next}}else if(R.tag===18){if(N=R.return,N===null)throw Error(r(341));N.lanes|=f,O=N.alternate,O!==null&&(O.lanes|=f),fv(N,f,o),N=null}else N=R.child;if(N!==null)N.return=R;else for(N=R;N!==null;){if(N===o){N=null;break}if(R=N.sibling,R!==null){R.return=N.return,N=R;break}N=N.return}R=N}}function Tc(o,a,f,m){o=null;for(var R=a,O=!1;R!==null;){if(!O){if((R.flags&524288)!==0)O=!0;else if((R.flags&262144)!==0)break}if(R.tag===10){var N=R.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var W=R.type;wi(R.pendingProps.value,N.value)||(o!==null?o.push(W):o=[W])}}else if(R===ne.current){if(N=R.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==R.memoizedState.memoizedState&&(o!==null?o.push(ud):o=[ud])}R=R.return}o!==null&&dv(a,o,f,m),a.flags|=262144}function fp(o){for(o=o.firstContext;o!==null;){if(!wi(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function gl(o){ml=o,ss=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Dr(o){return I2(ml,o)}function dp(o,a){return ml===null&&gl(o),I2(o,a)}function I2(o,a){var f=a._currentValue;if(a={context:a,memoizedValue:f,next:null},ss===null){if(o===null)throw Error(r(308));ss=a,o.dependencies={lanes:0,firstContext:a},o.flags|=524288}else ss=ss.next=a;return f}var o8=typeof AbortController<"u"?AbortController:function(){var o=[],a=this.signal={aborted:!1,addEventListener:function(f,m){o.push(m)}};this.abort=function(){a.aborted=!0,o.forEach(function(f){return f()})}},s8=e.unstable_scheduleCallback,a8=e.unstable_NormalPriority,sr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hv(){return{controller:new o8,data:new Map,refCount:0}}function zf(o){o.refCount--,o.refCount===0&&s8(a8,function(){o.controller.abort()})}var Ff=null,pv=0,Rc=0,Ac=null;function l8(o,a){if(Ff===null){var f=Ff=[];pv=0,Rc=yb(),Ac={status:"pending",value:void 0,then:function(m){f.push(m)}}}return pv++,a.then(z2,z2),a}function z2(){if(--pv===0&&Ff!==null){Ac!==null&&(Ac.status="fulfilled");var o=Ff;Ff=null,Rc=0,Ac=null;for(var a=0;a<o.length;a++)(0,o[a])()}}function c8(o,a){var f=[],m={status:"pending",value:null,reason:null,then:function(R){f.push(R)}};return o.then(function(){m.status="fulfilled",m.value=a;for(var R=0;R<f.length;R++)(0,f[R])(a)},function(R){for(m.status="rejected",m.reason=R,R=0;R<f.length;R++)(0,f[R])(void 0)}),m}var F2=H.S;H.S=function(o,a){xT=Ve(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&l8(o,a),F2!==null&&F2(o,a)};var yl=$(null);function mv(){var o=yl.current;return o!==null?o:_n.pooledCache}function hp(o,a){a===null?F(yl,yl.current):F(yl,a.pool)}function L2(){var o=mv();return o===null?null:{parent:sr._currentValue,pool:o}}var Oc=Error(r(460)),gv=Error(r(474)),pp=Error(r(542)),mp={then:function(){}};function V2(o){return o=o.status,o==="fulfilled"||o==="rejected"}function U2(o,a,f){switch(f=o[f],f===void 0?o.push(a):f!==a&&(a.then(ce,ce),a=f),a.status){case"fulfilled":return a.value;case"rejected":throw o=a.reason,B2(o),o;default:if(typeof a.status=="string")a.then(ce,ce);else{if(o=_n,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=a,o.status="pending",o.then(function(m){if(a.status==="pending"){var R=a;R.status="fulfilled",R.value=m}},function(m){if(a.status==="pending"){var R=a;R.status="rejected",R.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw o=a.reason,B2(o),o}throw bl=a,Oc}}function vl(o){try{var a=o._init;return a(o._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(bl=f,Oc):f}}var bl=null;function q2(){if(bl===null)throw Error(r(459));var o=bl;return bl=null,o}function B2(o){if(o===Oc||o===pp)throw Error(r(483))}var kc=null,Lf=0;function gp(o){var a=Lf;return Lf+=1,kc===null&&(kc=[]),U2(kc,o,a)}function Vf(o,a){a=a.props.ref,o.ref=a!==void 0?a:null}function yp(o,a){throw a.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(a),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":o)))}function H2(o){function a(me,fe){if(o){var ve=me.deletions;ve===null?(me.deletions=[fe],me.flags|=16):ve.push(fe)}}function f(me,fe){if(!o)return null;for(;fe!==null;)a(me,fe),fe=fe.sibling;return null}function m(me){for(var fe=new Map;me!==null;)me.key!==null?fe.set(me.key,me):fe.set(me.index,me),me=me.sibling;return fe}function R(me,fe){return me=is(me,fe),me.index=0,me.sibling=null,me}function O(me,fe,ve){return me.index=ve,o?(ve=me.alternate,ve!==null?(ve=ve.index,ve<fe?(me.flags|=67108866,fe):ve):(me.flags|=67108866,fe)):(me.flags|=1048576,fe)}function N(me){return o&&me.alternate===null&&(me.flags|=67108866),me}function W(me,fe,ve,Me){return fe===null||fe.tag!==6?(fe=iv(ve,me.mode,Me),fe.return=me,fe):(fe=R(fe,ve),fe.return=me,fe)}function se(me,fe,ve,Me){var lt=ve.type;return lt===T?Ae(me,fe,ve.props.children,Me,ve.key):fe!==null&&(fe.elementType===lt||typeof lt=="object"&&lt!==null&&lt.$$typeof===M&&vl(lt)===fe.type)?(fe=R(fe,ve.props),Vf(fe,ve),fe.return=me,fe):(fe=cp(ve.type,ve.key,ve.props,null,me.mode,Me),Vf(fe,ve),fe.return=me,fe)}function be(me,fe,ve,Me){return fe===null||fe.tag!==4||fe.stateNode.containerInfo!==ve.containerInfo||fe.stateNode.implementation!==ve.implementation?(fe=ov(ve,me.mode,Me),fe.return=me,fe):(fe=R(fe,ve.children||[]),fe.return=me,fe)}function Ae(me,fe,ve,Me,lt){return fe===null||fe.tag!==7?(fe=hl(ve,me.mode,Me,lt),fe.return=me,fe):(fe=R(fe,ve),fe.return=me,fe)}function je(me,fe,ve){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return fe=iv(""+fe,me.mode,ve),fe.return=me,fe;if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case x:return ve=cp(fe.type,fe.key,fe.props,null,me.mode,ve),Vf(ve,fe),ve.return=me,ve;case y:return fe=ov(fe,me.mode,ve),fe.return=me,fe;case M:return fe=vl(fe),je(me,fe,ve)}if(Y(fe)||q(fe))return fe=hl(fe,me.mode,ve,null),fe.return=me,fe;if(typeof fe.then=="function")return je(me,gp(fe),ve);if(fe.$$typeof===E)return je(me,dp(me,fe),ve);yp(me,fe)}return null}function xe(me,fe,ve,Me){var lt=fe!==null?fe.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return lt!==null?null:W(me,fe,""+ve,Me);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case x:return ve.key===lt?se(me,fe,ve,Me):null;case y:return ve.key===lt?be(me,fe,ve,Me):null;case M:return ve=vl(ve),xe(me,fe,ve,Me)}if(Y(ve)||q(ve))return lt!==null?null:Ae(me,fe,ve,Me,null);if(typeof ve.then=="function")return xe(me,fe,gp(ve),Me);if(ve.$$typeof===E)return xe(me,fe,dp(me,ve),Me);yp(me,ve)}return null}function Te(me,fe,ve,Me,lt){if(typeof Me=="string"&&Me!==""||typeof Me=="number"||typeof Me=="bigint")return me=me.get(ve)||null,W(fe,me,""+Me,lt);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case x:return me=me.get(Me.key===null?ve:Me.key)||null,se(fe,me,Me,lt);case y:return me=me.get(Me.key===null?ve:Me.key)||null,be(fe,me,Me,lt);case M:return Me=vl(Me),Te(me,fe,ve,Me,lt)}if(Y(Me)||q(Me))return me=me.get(ve)||null,Ae(fe,me,Me,lt,null);if(typeof Me.then=="function")return Te(me,fe,ve,gp(Me),lt);if(Me.$$typeof===E)return Te(me,fe,ve,dp(fe,Me),lt);yp(fe,Me)}return null}function Ye(me,fe,ve,Me){for(var lt=null,nn=null,Je=fe,Ot=fe=0,qt=null;Je!==null&&Ot<ve.length;Ot++){Je.index>Ot?(qt=Je,Je=null):qt=Je.sibling;var rn=xe(me,Je,ve[Ot],Me);if(rn===null){Je===null&&(Je=qt);break}o&&Je&&rn.alternate===null&&a(me,Je),fe=O(rn,fe,Ot),nn===null?lt=rn:nn.sibling=rn,nn=rn,Je=qt}if(Ot===ve.length)return f(me,Je),Ht&&os(me,Ot),lt;if(Je===null){for(;Ot<ve.length;Ot++)Je=je(me,ve[Ot],Me),Je!==null&&(fe=O(Je,fe,Ot),nn===null?lt=Je:nn.sibling=Je,nn=Je);return Ht&&os(me,Ot),lt}for(Je=m(Je);Ot<ve.length;Ot++)qt=Te(Je,me,Ot,ve[Ot],Me),qt!==null&&(o&&qt.alternate!==null&&Je.delete(qt.key===null?Ot:qt.key),fe=O(qt,fe,Ot),nn===null?lt=qt:nn.sibling=qt,nn=qt);return o&&Je.forEach(function(pa){return a(me,pa)}),Ht&&os(me,Ot),lt}function ht(me,fe,ve,Me){if(ve==null)throw Error(r(151));for(var lt=null,nn=null,Je=fe,Ot=fe=0,qt=null,rn=ve.next();Je!==null&&!rn.done;Ot++,rn=ve.next()){Je.index>Ot?(qt=Je,Je=null):qt=Je.sibling;var pa=xe(me,Je,rn.value,Me);if(pa===null){Je===null&&(Je=qt);break}o&&Je&&pa.alternate===null&&a(me,Je),fe=O(pa,fe,Ot),nn===null?lt=pa:nn.sibling=pa,nn=pa,Je=qt}if(rn.done)return f(me,Je),Ht&&os(me,Ot),lt;if(Je===null){for(;!rn.done;Ot++,rn=ve.next())rn=je(me,rn.value,Me),rn!==null&&(fe=O(rn,fe,Ot),nn===null?lt=rn:nn.sibling=rn,nn=rn);return Ht&&os(me,Ot),lt}for(Je=m(Je);!rn.done;Ot++,rn=ve.next())rn=Te(Je,me,Ot,rn.value,Me),rn!==null&&(o&&rn.alternate!==null&&Je.delete(rn.key===null?Ot:rn.key),fe=O(rn,fe,Ot),nn===null?lt=rn:nn.sibling=rn,nn=rn);return o&&Je.forEach(function(SF){return a(me,SF)}),Ht&&os(me,Ot),lt}function bn(me,fe,ve,Me){if(typeof ve=="object"&&ve!==null&&ve.type===T&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case x:e:{for(var lt=ve.key;fe!==null;){if(fe.key===lt){if(lt=ve.type,lt===T){if(fe.tag===7){f(me,fe.sibling),Me=R(fe,ve.props.children),Me.return=me,me=Me;break e}}else if(fe.elementType===lt||typeof lt=="object"&&lt!==null&&lt.$$typeof===M&&vl(lt)===fe.type){f(me,fe.sibling),Me=R(fe,ve.props),Vf(Me,ve),Me.return=me,me=Me;break e}f(me,fe);break}else a(me,fe);fe=fe.sibling}ve.type===T?(Me=hl(ve.props.children,me.mode,Me,ve.key),Me.return=me,me=Me):(Me=cp(ve.type,ve.key,ve.props,null,me.mode,Me),Vf(Me,ve),Me.return=me,me=Me)}return N(me);case y:e:{for(lt=ve.key;fe!==null;){if(fe.key===lt)if(fe.tag===4&&fe.stateNode.containerInfo===ve.containerInfo&&fe.stateNode.implementation===ve.implementation){f(me,fe.sibling),Me=R(fe,ve.children||[]),Me.return=me,me=Me;break e}else{f(me,fe);break}else a(me,fe);fe=fe.sibling}Me=ov(ve,me.mode,Me),Me.return=me,me=Me}return N(me);case M:return ve=vl(ve),bn(me,fe,ve,Me)}if(Y(ve))return Ye(me,fe,ve,Me);if(q(ve)){if(lt=q(ve),typeof lt!="function")throw Error(r(150));return ve=lt.call(ve),ht(me,fe,ve,Me)}if(typeof ve.then=="function")return bn(me,fe,gp(ve),Me);if(ve.$$typeof===E)return bn(me,fe,dp(me,ve),Me);yp(me,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint"?(ve=""+ve,fe!==null&&fe.tag===6?(f(me,fe.sibling),Me=R(fe,ve),Me.return=me,me=Me):(f(me,fe),Me=iv(ve,me.mode,Me),Me.return=me,me=Me),N(me)):f(me,fe)}return function(me,fe,ve,Me){try{Lf=0;var lt=bn(me,fe,ve,Me);return kc=null,lt}catch(Je){if(Je===Oc||Je===pp)throw Je;var nn=xi(29,Je,null,me.mode);return nn.lanes=Me,nn.return=me,nn}finally{}}}var Sl=H2(!0),K2=H2(!1),Xs=!1;function yv(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vv(o,a){o=o.updateQueue,a.updateQueue===o&&(a.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Qs(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Js(o,a,f){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(ln&2)!==0){var R=m.pending;return R===null?a.next=a:(a.next=R.next,R.next=a),m.pending=a,a=lp(o),O2(o,null,f),a}return ap(o,m,a,f),lp(o)}function Uf(o,a,f){if(a=a.updateQueue,a!==null&&(a=a.shared,(f&4194048)!==0)){var m=a.lanes;m&=o.pendingLanes,f|=m,a.lanes=f,Cn(o,f)}}function bv(o,a){var f=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var R=null,O=null;if(f=f.firstBaseUpdate,f!==null){do{var N={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};O===null?R=O=N:O=O.next=N,f=f.next}while(f!==null);O===null?R=O=a:O=O.next=a}else R=O=a;f={baseState:m.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:m.shared,callbacks:m.callbacks},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=a:o.next=a,f.lastBaseUpdate=a}var Sv=!1;function qf(){if(Sv){var o=Ac;if(o!==null)throw o}}function Bf(o,a,f,m){Sv=!1;var R=o.updateQueue;Xs=!1;var O=R.firstBaseUpdate,N=R.lastBaseUpdate,W=R.shared.pending;if(W!==null){R.shared.pending=null;var se=W,be=se.next;se.next=null,N===null?O=be:N.next=be,N=se;var Ae=o.alternate;Ae!==null&&(Ae=Ae.updateQueue,W=Ae.lastBaseUpdate,W!==N&&(W===null?Ae.firstBaseUpdate=be:W.next=be,Ae.lastBaseUpdate=se))}if(O!==null){var je=R.baseState;N=0,Ae=be=se=null,W=O;do{var xe=W.lane&-536870913,Te=xe!==W.lane;if(Te?(Ut&xe)===xe:(m&xe)===xe){xe!==0&&xe===Rc&&(Sv=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var Ye=o,ht=W;xe=a;var bn=f;switch(ht.tag){case 1:if(Ye=ht.payload,typeof Ye=="function"){je=Ye.call(bn,je,xe);break e}je=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=ht.payload,xe=typeof Ye=="function"?Ye.call(bn,je,xe):Ye,xe==null)break e;je=p({},je,xe);break e;case 2:Xs=!0}}xe=W.callback,xe!==null&&(o.flags|=64,Te&&(o.flags|=8192),Te=R.callbacks,Te===null?R.callbacks=[xe]:Te.push(xe))}else Te={lane:xe,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Ae===null?(be=Ae=Te,se=je):Ae=Ae.next=Te,N|=xe;if(W=W.next,W===null){if(W=R.shared.pending,W===null)break;Te=W,W=Te.next,Te.next=null,R.lastBaseUpdate=Te,R.shared.pending=null}}while(!0);Ae===null&&(se=je),R.baseState=se,R.firstBaseUpdate=be,R.lastBaseUpdate=Ae,O===null&&(R.shared.lanes=0),ia|=N,o.lanes=N,o.memoizedState=je}}function G2(o,a){if(typeof o!="function")throw Error(r(191,o));o.call(a)}function Z2(o,a){var f=o.callbacks;if(f!==null)for(o.callbacks=null,o=0;o<f.length;o++)G2(f[o],a)}var Mc=$(null),vp=$(0);function W2(o,a){o=gs,F(vp,o),F(Mc,a),gs=o|a.baseLanes}function wv(){F(vp,gs),F(Mc,Mc.current)}function xv(){gs=vp.current,B(Mc),B(vp)}var _i=$(null),qi=null;function ea(o){var a=o.alternate;F(tr,tr.current&1),F(_i,o),qi===null&&(a===null||Mc.current!==null||a.memoizedState!==null)&&(qi=o)}function _v(o){F(tr,tr.current),F(_i,o),qi===null&&(qi=o)}function Y2(o){o.tag===22?(F(tr,tr.current),F(_i,o),qi===null&&(qi=o)):ta()}function ta(){F(tr,tr.current),F(_i,_i.current)}function Ei(o){B(_i),qi===o&&(qi=null),B(tr)}var tr=$(0);function bp(o){for(var a=o;a!==null;){if(a.tag===13){var f=a.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Ob(f)||kb(f)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ls=0,Rt=null,yn=null,ar=null,Sp=!1,jc=!1,wl=!1,wp=0,Hf=0,Pc=null,u8=0;function Wn(){throw Error(r(321))}function Ev(o,a){if(a===null)return!1;for(var f=0;f<a.length&&f<o.length;f++)if(!wi(o[f],a[f]))return!1;return!0}function Cv(o,a,f,m,R,O){return ls=O,Rt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,H.H=o===null||o.memoizedState===null?PC:Lv,wl=!1,O=f(m,R),wl=!1,jc&&(O=Q2(a,f,m,R)),X2(o),O}function X2(o){H.H=Zf;var a=yn!==null&&yn.next!==null;if(ls=0,ar=yn=Rt=null,Sp=!1,Hf=0,Pc=null,a)throw Error(r(300));o===null||lr||(o=o.dependencies,o!==null&&fp(o)&&(lr=!0))}function Q2(o,a,f,m){Rt=o;var R=0;do{if(jc&&(Pc=null),Hf=0,jc=!1,25<=R)throw Error(r(301));if(R+=1,ar=yn=null,o.updateQueue!=null){var O=o.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}H.H=DC,O=a(f,m)}while(jc);return O}function f8(){var o=H.H,a=o.useState()[0];return a=typeof a.then=="function"?Kf(a):a,o=o.useState()[0],(yn!==null?yn.memoizedState:null)!==o&&(Rt.flags|=1024),a}function Tv(){var o=wp!==0;return wp=0,o}function Rv(o,a,f){a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~f}function Av(o){if(Sp){for(o=o.memoizedState;o!==null;){var a=o.queue;a!==null&&(a.pending=null),o=o.next}Sp=!1}ls=0,ar=yn=Rt=null,jc=!1,Hf=wp=0,Pc=null}function Qr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ar===null?Rt.memoizedState=ar=o:ar=ar.next=o,ar}function nr(){if(yn===null){var o=Rt.alternate;o=o!==null?o.memoizedState:null}else o=yn.next;var a=ar===null?Rt.memoizedState:ar.next;if(a!==null)ar=a,yn=o;else{if(o===null)throw Rt.alternate===null?Error(r(467)):Error(r(310));yn=o,o={memoizedState:yn.memoizedState,baseState:yn.baseState,baseQueue:yn.baseQueue,queue:yn.queue,next:null},ar===null?Rt.memoizedState=ar=o:ar=ar.next=o}return ar}function xp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kf(o){var a=Hf;return Hf+=1,Pc===null&&(Pc=[]),o=U2(Pc,o,a),a=Rt,(ar===null?a.memoizedState:ar.next)===null&&(a=a.alternate,H.H=a===null||a.memoizedState===null?PC:Lv),o}function _p(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Kf(o);if(o.$$typeof===E)return Dr(o)}throw Error(r(438,String(o)))}function Ov(o){var a=null,f=Rt.updateQueue;if(f!==null&&(a=f.memoCache),a==null){var m=Rt.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(R){return R.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),f===null&&(f=xp(),Rt.updateQueue=f),f.memoCache=a,f=a.data[a.index],f===void 0)for(f=a.data[a.index]=Array(o),m=0;m<o;m++)f[m]=I;return a.index++,f}function cs(o,a){return typeof a=="function"?a(o):a}function Ep(o){var a=nr();return kv(a,yn,o)}function kv(o,a,f){var m=o.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=f;var R=o.baseQueue,O=m.pending;if(O!==null){if(R!==null){var N=R.next;R.next=O.next,O.next=N}a.baseQueue=R=O,m.pending=null}if(O=o.baseState,R===null)o.memoizedState=O;else{a=R.next;var W=N=null,se=null,be=a,Ae=!1;do{var je=be.lane&-536870913;if(je!==be.lane?(Ut&je)===je:(ls&je)===je){var xe=be.revertLane;if(xe===0)se!==null&&(se=se.next={lane:0,revertLane:0,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),je===Rc&&(Ae=!0);else if((ls&xe)===xe){be=be.next,xe===Rc&&(Ae=!0);continue}else je={lane:0,revertLane:be.revertLane,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},se===null?(W=se=je,N=O):se=se.next=je,Rt.lanes|=xe,ia|=xe;je=be.action,wl&&f(O,je),O=be.hasEagerState?be.eagerState:f(O,je)}else xe={lane:je,revertLane:be.revertLane,gesture:be.gesture,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},se===null?(W=se=xe,N=O):se=se.next=xe,Rt.lanes|=je,ia|=je;be=be.next}while(be!==null&&be!==a);if(se===null?N=O:se.next=W,!wi(O,o.memoizedState)&&(lr=!0,Ae&&(f=Ac,f!==null)))throw f;o.memoizedState=O,o.baseState=N,o.baseQueue=se,m.lastRenderedState=O}return R===null&&(m.lanes=0),[o.memoizedState,m.dispatch]}function Mv(o){var a=nr(),f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=o;var m=f.dispatch,R=f.pending,O=a.memoizedState;if(R!==null){f.pending=null;var N=R=R.next;do O=o(O,N.action),N=N.next;while(N!==R);wi(O,a.memoizedState)||(lr=!0),a.memoizedState=O,a.baseQueue===null&&(a.baseState=O),f.lastRenderedState=O}return[O,m]}function J2(o,a,f){var m=Rt,R=nr(),O=Ht;if(O){if(f===void 0)throw Error(r(407));f=f()}else f=a();var N=!wi((yn||R).memoizedState,f);if(N&&(R.memoizedState=f,lr=!0),R=R.queue,Dv(nC.bind(null,m,R,o),[o]),R.getSnapshot!==a||N||ar!==null&&ar.memoizedState.tag&1){if(m.flags|=2048,Dc(9,{destroy:void 0},tC.bind(null,m,R,f,a),null),_n===null)throw Error(r(349));O||(ls&127)!==0||eC(m,a,f)}return f}function eC(o,a,f){o.flags|=16384,o={getSnapshot:a,value:f},a=Rt.updateQueue,a===null?(a=xp(),Rt.updateQueue=a,a.stores=[o]):(f=a.stores,f===null?a.stores=[o]:f.push(o))}function tC(o,a,f,m){a.value=f,a.getSnapshot=m,rC(a)&&iC(o)}function nC(o,a,f){return f(function(){rC(a)&&iC(o)})}function rC(o){var a=o.getSnapshot;o=o.value;try{var f=a();return!wi(o,f)}catch{return!0}}function iC(o){var a=dl(o,2);a!==null&&fi(a,o,2)}function jv(o){var a=Qr();if(typeof o=="function"){var f=o;if(o=f(),wl){Wt(!0);try{f()}finally{Wt(!1)}}}return a.memoizedState=a.baseState=o,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:o},a}function oC(o,a,f,m){return o.baseState=f,kv(o,yn,typeof m=="function"?m:cs)}function d8(o,a,f,m,R){if(Rp(o))throw Error(r(485));if(o=a.action,o!==null){var O={payload:R,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){O.listeners.push(N)}};H.T!==null?f(!0):O.isTransition=!1,m(O),f=a.pending,f===null?(O.next=a.pending=O,sC(a,O)):(O.next=f.next,a.pending=f.next=O)}}function sC(o,a){var f=a.action,m=a.payload,R=o.state;if(a.isTransition){var O=H.T,N={};H.T=N;try{var W=f(R,m),se=H.S;se!==null&&se(N,W),aC(o,a,W)}catch(be){Pv(o,a,be)}finally{O!==null&&N.types!==null&&(O.types=N.types),H.T=O}}else try{O=f(R,m),aC(o,a,O)}catch(be){Pv(o,a,be)}}function aC(o,a,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){lC(o,a,m)},function(m){return Pv(o,a,m)}):lC(o,a,f)}function lC(o,a,f){a.status="fulfilled",a.value=f,cC(a),o.state=f,a=o.pending,a!==null&&(f=a.next,f===a?o.pending=null:(f=f.next,a.next=f,sC(o,f)))}function Pv(o,a,f){var m=o.pending;if(o.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=f,cC(a),a=a.next;while(a!==m)}o.action=null}function cC(o){o=o.listeners;for(var a=0;a<o.length;a++)(0,o[a])()}function uC(o,a){return a}function fC(o,a){if(Ht){var f=_n.formState;if(f!==null){e:{var m=Rt;if(Ht){if(Mn){t:{for(var R=Mn,O=Ui;R.nodeType!==8;){if(!O){R=null;break t}if(R=Bi(R.nextSibling),R===null){R=null;break t}}O=R.data,R=O==="F!"||O==="F"?R:null}if(R){Mn=Bi(R.nextSibling),m=R.data==="F!";break e}}Ws(m)}m=!1}m&&(a=f[0])}}return f=Qr(),f.memoizedState=f.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uC,lastRenderedState:a},f.queue=m,f=kC.bind(null,Rt,m),m.dispatch=f,m=jv(!1),O=Fv.bind(null,Rt,!1,m.queue),m=Qr(),R={state:a,dispatch:null,action:o,pending:null},m.queue=R,f=d8.bind(null,Rt,R,O,f),R.dispatch=f,m.memoizedState=o,[a,f,!1]}function dC(o){var a=nr();return hC(a,yn,o)}function hC(o,a,f){if(a=kv(o,a,uC)[0],o=Ep(cs)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Kf(a)}catch(N){throw N===Oc?pp:N}else m=a;a=nr();var R=a.queue,O=R.dispatch;return f!==a.memoizedState&&(Rt.flags|=2048,Dc(9,{destroy:void 0},h8.bind(null,R,f),null)),[m,O,o]}function h8(o,a){o.action=a}function pC(o){var a=nr(),f=yn;if(f!==null)return hC(a,f,o);nr(),a=a.memoizedState,f=nr();var m=f.queue.dispatch;return f.memoizedState=o,[a,m,!1]}function Dc(o,a,f,m){return o={tag:o,create:f,deps:m,inst:a,next:null},a=Rt.updateQueue,a===null&&(a=xp(),Rt.updateQueue=a),f=a.lastEffect,f===null?a.lastEffect=o.next=o:(m=f.next,f.next=o,o.next=m,a.lastEffect=o),o}function mC(){return nr().memoizedState}function Cp(o,a,f,m){var R=Qr();Rt.flags|=o,R.memoizedState=Dc(1|a,{destroy:void 0},f,m===void 0?null:m)}function Tp(o,a,f,m){var R=nr();m=m===void 0?null:m;var O=R.memoizedState.inst;yn!==null&&m!==null&&Ev(m,yn.memoizedState.deps)?R.memoizedState=Dc(a,O,f,m):(Rt.flags|=o,R.memoizedState=Dc(1|a,O,f,m))}function gC(o,a){Cp(8390656,8,o,a)}function Dv(o,a){Tp(2048,8,o,a)}function p8(o){Rt.flags|=4;var a=Rt.updateQueue;if(a===null)a=xp(),Rt.updateQueue=a,a.events=[o];else{var f=a.events;f===null?a.events=[o]:f.push(o)}}function yC(o){var a=nr().memoizedState;return p8({ref:a,nextImpl:o}),function(){if((ln&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function vC(o,a){return Tp(4,2,o,a)}function bC(o,a){return Tp(4,4,o,a)}function SC(o,a){if(typeof a=="function"){o=o();var f=a(o);return function(){typeof f=="function"?f():a(null)}}if(a!=null)return o=o(),a.current=o,function(){a.current=null}}function wC(o,a,f){f=f!=null?f.concat([o]):null,Tp(4,4,SC.bind(null,a,o),f)}function Nv(){}function xC(o,a){var f=nr();a=a===void 0?null:a;var m=f.memoizedState;return a!==null&&Ev(a,m[1])?m[0]:(f.memoizedState=[o,a],o)}function _C(o,a){var f=nr();a=a===void 0?null:a;var m=f.memoizedState;if(a!==null&&Ev(a,m[1]))return m[0];if(m=o(),wl){Wt(!0);try{o()}finally{Wt(!1)}}return f.memoizedState=[m,a],m}function $v(o,a,f){return f===void 0||(ls&1073741824)!==0&&(Ut&261930)===0?o.memoizedState=a:(o.memoizedState=f,o=ET(),Rt.lanes|=o,ia|=o,f)}function EC(o,a,f,m){return wi(f,a)?f:Mc.current!==null?(o=$v(o,f,m),wi(o,a)||(lr=!0),o):(ls&42)===0||(ls&1073741824)!==0&&(Ut&261930)===0?(lr=!0,o.memoizedState=f):(o=ET(),Rt.lanes|=o,ia|=o,a)}function CC(o,a,f,m,R){var O=Z.p;Z.p=O!==0&&8>O?O:8;var N=H.T,W={};H.T=W,Fv(o,!1,a,f);try{var se=R(),be=H.S;if(be!==null&&be(W,se),se!==null&&typeof se=="object"&&typeof se.then=="function"){var Ae=c8(se,m);Gf(o,a,Ae,Ri(o))}else Gf(o,a,m,Ri(o))}catch(je){Gf(o,a,{then:function(){},status:"rejected",reason:je},Ri())}finally{Z.p=O,N!==null&&W.types!==null&&(N.types=W.types),H.T=N}}function m8(){}function Iv(o,a,f,m){if(o.tag!==5)throw Error(r(476));var R=TC(o).queue;CC(o,R,a,ee,f===null?m8:function(){return RC(o),f(m)})}function TC(o){var a=o.memoizedState;if(a!==null)return a;a={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:ee},next:null};var f={};return a.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:f},next:null},o.memoizedState=a,o=o.alternate,o!==null&&(o.memoizedState=a),a}function RC(o){var a=TC(o);a.next===null&&(a=o.alternate.memoizedState),Gf(o,a.next.queue,{},Ri())}function zv(){return Dr(ud)}function AC(){return nr().memoizedState}function OC(){return nr().memoizedState}function g8(o){for(var a=o.return;a!==null;){switch(a.tag){case 24:case 3:var f=Ri();o=Qs(f);var m=Js(a,o,f);m!==null&&(fi(m,a,f),Uf(m,a,f)),a={cache:hv()},o.payload=a;return}a=a.return}}function y8(o,a,f){var m=Ri();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Rp(o)?MC(a,f):(f=nv(o,a,f,m),f!==null&&(fi(f,o,m),jC(f,a,m)))}function kC(o,a,f){var m=Ri();Gf(o,a,f,m)}function Gf(o,a,f,m){var R={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Rp(o))MC(a,R);else{var O=o.alternate;if(o.lanes===0&&(O===null||O.lanes===0)&&(O=a.lastRenderedReducer,O!==null))try{var N=a.lastRenderedState,W=O(N,f);if(R.hasEagerState=!0,R.eagerState=W,wi(W,N))return ap(o,a,R,0),_n===null&&sp(),!1}catch{}finally{}if(f=nv(o,a,R,m),f!==null)return fi(f,o,m),jC(f,a,m),!0}return!1}function Fv(o,a,f,m){if(m={lane:2,revertLane:yb(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Rp(o)){if(a)throw Error(r(479))}else a=nv(o,f,m,2),a!==null&&fi(a,o,2)}function Rp(o){var a=o.alternate;return o===Rt||a!==null&&a===Rt}function MC(o,a){jc=Sp=!0;var f=o.pending;f===null?a.next=a:(a.next=f.next,f.next=a),o.pending=a}function jC(o,a,f){if((f&4194048)!==0){var m=a.lanes;m&=o.pendingLanes,f|=m,a.lanes=f,Cn(o,f)}}var Zf={readContext:Dr,use:_p,useCallback:Wn,useContext:Wn,useEffect:Wn,useImperativeHandle:Wn,useLayoutEffect:Wn,useInsertionEffect:Wn,useMemo:Wn,useReducer:Wn,useRef:Wn,useState:Wn,useDebugValue:Wn,useDeferredValue:Wn,useTransition:Wn,useSyncExternalStore:Wn,useId:Wn,useHostTransitionStatus:Wn,useFormState:Wn,useActionState:Wn,useOptimistic:Wn,useMemoCache:Wn,useCacheRefresh:Wn};Zf.useEffectEvent=Wn;var PC={readContext:Dr,use:_p,useCallback:function(o,a){return Qr().memoizedState=[o,a===void 0?null:a],o},useContext:Dr,useEffect:gC,useImperativeHandle:function(o,a,f){f=f!=null?f.concat([o]):null,Cp(4194308,4,SC.bind(null,a,o),f)},useLayoutEffect:function(o,a){return Cp(4194308,4,o,a)},useInsertionEffect:function(o,a){Cp(4,2,o,a)},useMemo:function(o,a){var f=Qr();a=a===void 0?null:a;var m=o();if(wl){Wt(!0);try{o()}finally{Wt(!1)}}return f.memoizedState=[m,a],m},useReducer:function(o,a,f){var m=Qr();if(f!==void 0){var R=f(a);if(wl){Wt(!0);try{f(a)}finally{Wt(!1)}}}else R=a;return m.memoizedState=m.baseState=R,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:R},m.queue=o,o=o.dispatch=y8.bind(null,Rt,o),[m.memoizedState,o]},useRef:function(o){var a=Qr();return o={current:o},a.memoizedState=o},useState:function(o){o=jv(o);var a=o.queue,f=kC.bind(null,Rt,a);return a.dispatch=f,[o.memoizedState,f]},useDebugValue:Nv,useDeferredValue:function(o,a){var f=Qr();return $v(f,o,a)},useTransition:function(){var o=jv(!1);return o=CC.bind(null,Rt,o.queue,!0,!1),Qr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,a,f){var m=Rt,R=Qr();if(Ht){if(f===void 0)throw Error(r(407));f=f()}else{if(f=a(),_n===null)throw Error(r(349));(Ut&127)!==0||eC(m,a,f)}R.memoizedState=f;var O={value:f,getSnapshot:a};return R.queue=O,gC(nC.bind(null,m,O,o),[o]),m.flags|=2048,Dc(9,{destroy:void 0},tC.bind(null,m,O,f,a),null),f},useId:function(){var o=Qr(),a=_n.identifierPrefix;if(Ht){var f=Ao,m=Ro;f=(m&~(1<<32-zt(m)-1)).toString(32)+f,a="_"+a+"R_"+f,f=wp++,0<f&&(a+="H"+f.toString(32)),a+="_"}else f=u8++,a="_"+a+"r_"+f.toString(32)+"_";return o.memoizedState=a},useHostTransitionStatus:zv,useFormState:fC,useActionState:fC,useOptimistic:function(o){var a=Qr();a.memoizedState=a.baseState=o;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=f,a=Fv.bind(null,Rt,!0,f),f.dispatch=a,[o,a]},useMemoCache:Ov,useCacheRefresh:function(){return Qr().memoizedState=g8.bind(null,Rt)},useEffectEvent:function(o){var a=Qr(),f={impl:o};return a.memoizedState=f,function(){if((ln&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},Lv={readContext:Dr,use:_p,useCallback:xC,useContext:Dr,useEffect:Dv,useImperativeHandle:wC,useInsertionEffect:vC,useLayoutEffect:bC,useMemo:_C,useReducer:Ep,useRef:mC,useState:function(){return Ep(cs)},useDebugValue:Nv,useDeferredValue:function(o,a){var f=nr();return EC(f,yn.memoizedState,o,a)},useTransition:function(){var o=Ep(cs)[0],a=nr().memoizedState;return[typeof o=="boolean"?o:Kf(o),a]},useSyncExternalStore:J2,useId:AC,useHostTransitionStatus:zv,useFormState:dC,useActionState:dC,useOptimistic:function(o,a){var f=nr();return oC(f,yn,o,a)},useMemoCache:Ov,useCacheRefresh:OC};Lv.useEffectEvent=yC;var DC={readContext:Dr,use:_p,useCallback:xC,useContext:Dr,useEffect:Dv,useImperativeHandle:wC,useInsertionEffect:vC,useLayoutEffect:bC,useMemo:_C,useReducer:Mv,useRef:mC,useState:function(){return Mv(cs)},useDebugValue:Nv,useDeferredValue:function(o,a){var f=nr();return yn===null?$v(f,o,a):EC(f,yn.memoizedState,o,a)},useTransition:function(){var o=Mv(cs)[0],a=nr().memoizedState;return[typeof o=="boolean"?o:Kf(o),a]},useSyncExternalStore:J2,useId:AC,useHostTransitionStatus:zv,useFormState:pC,useActionState:pC,useOptimistic:function(o,a){var f=nr();return yn!==null?oC(f,yn,o,a):(f.baseState=o,[o,f.queue.dispatch])},useMemoCache:Ov,useCacheRefresh:OC};DC.useEffectEvent=yC;function Vv(o,a,f,m){a=o.memoizedState,f=f(m,a),f=f==null?a:p({},a,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var Uv={enqueueSetState:function(o,a,f){o=o._reactInternals;var m=Ri(),R=Qs(m);R.payload=a,f!=null&&(R.callback=f),a=Js(o,R,m),a!==null&&(fi(a,o,m),Uf(a,o,m))},enqueueReplaceState:function(o,a,f){o=o._reactInternals;var m=Ri(),R=Qs(m);R.tag=1,R.payload=a,f!=null&&(R.callback=f),a=Js(o,R,m),a!==null&&(fi(a,o,m),Uf(a,o,m))},enqueueForceUpdate:function(o,a){o=o._reactInternals;var f=Ri(),m=Qs(f);m.tag=2,a!=null&&(m.callback=a),a=Js(o,m,f),a!==null&&(fi(a,o,f),Uf(a,o,f))}};function NC(o,a,f,m,R,O,N){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,O,N):a.prototype&&a.prototype.isPureReactComponent?!Df(f,m)||!Df(R,O):!0}function $C(o,a,f,m){o=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(f,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(f,m),a.state!==o&&Uv.enqueueReplaceState(a,a.state,null)}function xl(o,a){var f=a;if("ref"in a){f={};for(var m in a)m!=="ref"&&(f[m]=a[m])}if(o=o.defaultProps){f===a&&(f=p({},f));for(var R in o)f[R]===void 0&&(f[R]=o[R])}return f}function IC(o){op(o)}function zC(o){console.error(o)}function FC(o){op(o)}function Ap(o,a){try{var f=o.onUncaughtError;f(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function LC(o,a,f){try{var m=o.onCaughtError;m(f.value,{componentStack:f.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(R){setTimeout(function(){throw R})}}function qv(o,a,f){return f=Qs(f),f.tag=3,f.payload={element:null},f.callback=function(){Ap(o,a)},f}function VC(o){return o=Qs(o),o.tag=3,o}function UC(o,a,f,m){var R=f.type.getDerivedStateFromError;if(typeof R=="function"){var O=m.value;o.payload=function(){return R(O)},o.callback=function(){LC(a,f,m)}}var N=f.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(o.callback=function(){LC(a,f,m),typeof R!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var W=m.stack;this.componentDidCatch(m.value,{componentStack:W!==null?W:""})})}function v8(o,a,f,m,R){if(f.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=f.alternate,a!==null&&Tc(a,f,R,!0),f=_i.current,f!==null){switch(f.tag){case 31:case 13:return qi===null?Lp():f.alternate===null&&Yn===0&&(Yn=3),f.flags&=-257,f.flags|=65536,f.lanes=R,m===mp?f.flags|=16384:(a=f.updateQueue,a===null?f.updateQueue=new Set([m]):a.add(m),pb(o,m,R)),!1;case 22:return f.flags|=65536,m===mp?f.flags|=16384:(a=f.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},f.updateQueue=a):(f=a.retryQueue,f===null?a.retryQueue=new Set([m]):f.add(m)),pb(o,m,R)),!1}throw Error(r(435,f.tag))}return pb(o,m,R),Lp(),!1}if(Ht)return a=_i.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=R,m!==lv&&(o=Error(r(422),{cause:m}),If(Fi(o,f)))):(m!==lv&&(a=Error(r(423),{cause:m}),If(Fi(a,f))),o=o.current.alternate,o.flags|=65536,R&=-R,o.lanes|=R,m=Fi(m,f),R=qv(o.stateNode,m,R),bv(o,R),Yn!==4&&(Yn=2)),!1;var O=Error(r(520),{cause:m});if(O=Fi(O,f),nd===null?nd=[O]:nd.push(O),Yn!==4&&(Yn=2),a===null)return!0;m=Fi(m,f),f=a;do{switch(f.tag){case 3:return f.flags|=65536,o=R&-R,f.lanes|=o,o=qv(f.stateNode,m,o),bv(f,o),!1;case 1:if(a=f.type,O=f.stateNode,(f.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(oa===null||!oa.has(O))))return f.flags|=65536,R&=-R,f.lanes|=R,R=VC(R),UC(R,o,f,m),bv(f,R),!1}f=f.return}while(f!==null);return!1}var Bv=Error(r(461)),lr=!1;function Nr(o,a,f,m){a.child=o===null?K2(a,null,f,m):Sl(a,o.child,f,m)}function qC(o,a,f,m,R){f=f.render;var O=a.ref;if("ref"in m){var N={};for(var W in m)W!=="ref"&&(N[W]=m[W])}else N=m;return gl(a),m=Cv(o,a,f,N,O,R),W=Tv(),o!==null&&!lr?(Rv(o,a,R),us(o,a,R)):(Ht&&W&&sv(a),a.flags|=1,Nr(o,a,m,R),a.child)}function BC(o,a,f,m,R){if(o===null){var O=f.type;return typeof O=="function"&&!rv(O)&&O.defaultProps===void 0&&f.compare===null?(a.tag=15,a.type=O,HC(o,a,O,m,R)):(o=cp(f.type,null,m,a,a.mode,R),o.ref=a.ref,o.return=a,a.child=o)}if(O=o.child,!Qv(o,R)){var N=O.memoizedProps;if(f=f.compare,f=f!==null?f:Df,f(N,m)&&o.ref===a.ref)return us(o,a,R)}return a.flags|=1,o=is(O,m),o.ref=a.ref,o.return=a,a.child=o}function HC(o,a,f,m,R){if(o!==null){var O=o.memoizedProps;if(Df(O,m)&&o.ref===a.ref)if(lr=!1,a.pendingProps=m=O,Qv(o,R))(o.flags&131072)!==0&&(lr=!0);else return a.lanes=o.lanes,us(o,a,R)}return Hv(o,a,f,m,R)}function KC(o,a,f,m){var R=m.children,O=o!==null?o.memoizedState:null;if(o===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(O=O!==null?O.baseLanes|f:f,o!==null){for(m=a.child=o.child,R=0;m!==null;)R=R|m.lanes|m.childLanes,m=m.sibling;m=R&~O}else m=0,a.child=null;return GC(o,a,O,f,m)}if((f&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},o!==null&&hp(a,O!==null?O.cachePool:null),O!==null?W2(a,O):wv(),Y2(a);else return m=a.lanes=536870912,GC(o,a,O!==null?O.baseLanes|f:f,f,m)}else O!==null?(hp(a,O.cachePool),W2(a,O),ta(),a.memoizedState=null):(o!==null&&hp(a,null),wv(),ta());return Nr(o,a,R,f),a.child}function Wf(o,a){return o!==null&&o.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function GC(o,a,f,m,R){var O=mv();return O=O===null?null:{parent:sr._currentValue,pool:O},a.memoizedState={baseLanes:f,cachePool:O},o!==null&&hp(a,null),wv(),Y2(a),o!==null&&Tc(o,a,m,!0),a.childLanes=R,null}function Op(o,a){return a=Mp({mode:a.mode,children:a.children},o.mode),a.ref=o.ref,o.child=a,a.return=o,a}function ZC(o,a,f){return Sl(a,o.child,null,f),o=Op(a,a.pendingProps),o.flags|=2,Ei(a),a.memoizedState=null,o}function b8(o,a,f){var m=a.pendingProps,R=(a.flags&128)!==0;if(a.flags&=-129,o===null){if(Ht){if(m.mode==="hidden")return o=Op(a,m),a.lanes=536870912,Wf(null,o);if(_v(a),(o=Mn)?(o=sR(o,Ui),o=o!==null&&o.data==="&"?o:null,o!==null&&(a.memoizedState={dehydrated:o,treeContext:Gs!==null?{id:Ro,overflow:Ao}:null,retryLane:536870912,hydrationErrors:null},f=M2(o),f.return=a,a.child=f,Pr=a,Mn=null)):o=null,o===null)throw Ws(a);return a.lanes=536870912,null}return Op(a,m)}var O=o.memoizedState;if(O!==null){var N=O.dehydrated;if(_v(a),R)if(a.flags&256)a.flags&=-257,a=ZC(o,a,f);else if(a.memoizedState!==null)a.child=o.child,a.flags|=128,a=null;else throw Error(r(558));else if(lr||Tc(o,a,f,!1),R=(f&o.childLanes)!==0,lr||R){if(m=_n,m!==null&&(N=pr(m,f),N!==0&&N!==O.retryLane))throw O.retryLane=N,dl(o,N),fi(m,o,N),Bv;Lp(),a=ZC(o,a,f)}else o=O.treeContext,Mn=Bi(N.nextSibling),Pr=a,Ht=!0,Zs=null,Ui=!1,o!==null&&D2(a,o),a=Op(a,m),a.flags|=4096;return a}return o=is(o.child,{mode:m.mode,children:m.children}),o.ref=a.ref,a.child=o,o.return=a,o}function kp(o,a){var f=a.ref;if(f===null)o!==null&&o.ref!==null&&(a.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(o===null||o.ref!==f)&&(a.flags|=4194816)}}function Hv(o,a,f,m,R){return gl(a),f=Cv(o,a,f,m,void 0,R),m=Tv(),o!==null&&!lr?(Rv(o,a,R),us(o,a,R)):(Ht&&m&&sv(a),a.flags|=1,Nr(o,a,f,R),a.child)}function WC(o,a,f,m,R,O){return gl(a),a.updateQueue=null,f=Q2(a,m,f,R),X2(o),m=Tv(),o!==null&&!lr?(Rv(o,a,O),us(o,a,O)):(Ht&&m&&sv(a),a.flags|=1,Nr(o,a,f,O),a.child)}function YC(o,a,f,m,R){if(gl(a),a.stateNode===null){var O=xc,N=f.contextType;typeof N=="object"&&N!==null&&(O=Dr(N)),O=new f(m,O),a.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=Uv,a.stateNode=O,O._reactInternals=a,O=a.stateNode,O.props=m,O.state=a.memoizedState,O.refs={},yv(a),N=f.contextType,O.context=typeof N=="object"&&N!==null?Dr(N):xc,O.state=a.memoizedState,N=f.getDerivedStateFromProps,typeof N=="function"&&(Vv(a,f,N,m),O.state=a.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(N=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),N!==O.state&&Uv.enqueueReplaceState(O,O.state,null),Bf(a,m,O,R),qf(),O.state=a.memoizedState),typeof O.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(o===null){O=a.stateNode;var W=a.memoizedProps,se=xl(f,W);O.props=se;var be=O.context,Ae=f.contextType;N=xc,typeof Ae=="object"&&Ae!==null&&(N=Dr(Ae));var je=f.getDerivedStateFromProps;Ae=typeof je=="function"||typeof O.getSnapshotBeforeUpdate=="function",W=a.pendingProps!==W,Ae||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(W||be!==N)&&$C(a,O,m,N),Xs=!1;var xe=a.memoizedState;O.state=xe,Bf(a,m,O,R),qf(),be=a.memoizedState,W||xe!==be||Xs?(typeof je=="function"&&(Vv(a,f,je,m),be=a.memoizedState),(se=Xs||NC(a,f,se,m,xe,be,N))?(Ae||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(a.flags|=4194308)):(typeof O.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=be),O.props=m,O.state=be,O.context=N,m=se):(typeof O.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{O=a.stateNode,vv(o,a),N=a.memoizedProps,Ae=xl(f,N),O.props=Ae,je=a.pendingProps,xe=O.context,be=f.contextType,se=xc,typeof be=="object"&&be!==null&&(se=Dr(be)),W=f.getDerivedStateFromProps,(be=typeof W=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(N!==je||xe!==se)&&$C(a,O,m,se),Xs=!1,xe=a.memoizedState,O.state=xe,Bf(a,m,O,R),qf();var Te=a.memoizedState;N!==je||xe!==Te||Xs||o!==null&&o.dependencies!==null&&fp(o.dependencies)?(typeof W=="function"&&(Vv(a,f,W,m),Te=a.memoizedState),(Ae=Xs||NC(a,f,Ae,m,xe,Te,se)||o!==null&&o.dependencies!==null&&fp(o.dependencies))?(be||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(m,Te,se),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(m,Te,se)),typeof O.componentDidUpdate=="function"&&(a.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof O.componentDidUpdate!="function"||N===o.memoizedProps&&xe===o.memoizedState||(a.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&xe===o.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Te),O.props=m,O.state=Te,O.context=se,m=Ae):(typeof O.componentDidUpdate!="function"||N===o.memoizedProps&&xe===o.memoizedState||(a.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&xe===o.memoizedState||(a.flags|=1024),m=!1)}return O=m,kp(o,a),m=(a.flags&128)!==0,O||m?(O=a.stateNode,f=m&&typeof f.getDerivedStateFromError!="function"?null:O.render(),a.flags|=1,o!==null&&m?(a.child=Sl(a,o.child,null,R),a.child=Sl(a,null,f,R)):Nr(o,a,f,R),a.memoizedState=O.state,o=a.child):o=us(o,a,R),o}function XC(o,a,f,m){return pl(),a.flags|=256,Nr(o,a,f,m),a.child}var Kv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gv(o){return{baseLanes:o,cachePool:L2()}}function Zv(o,a,f){return o=o!==null?o.childLanes&~f:0,a&&(o|=Ti),o}function QC(o,a,f){var m=a.pendingProps,R=!1,O=(a.flags&128)!==0,N;if((N=O)||(N=o!==null&&o.memoizedState===null?!1:(tr.current&2)!==0),N&&(R=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,o===null){if(Ht){if(R?ea(a):ta(),(o=Mn)?(o=sR(o,Ui),o=o!==null&&o.data!=="&"?o:null,o!==null&&(a.memoizedState={dehydrated:o,treeContext:Gs!==null?{id:Ro,overflow:Ao}:null,retryLane:536870912,hydrationErrors:null},f=M2(o),f.return=a,a.child=f,Pr=a,Mn=null)):o=null,o===null)throw Ws(a);return kb(o)?a.lanes=32:a.lanes=536870912,null}var W=m.children;return m=m.fallback,R?(ta(),R=a.mode,W=Mp({mode:"hidden",children:W},R),m=hl(m,R,f,null),W.return=a,m.return=a,W.sibling=m,a.child=W,m=a.child,m.memoizedState=Gv(f),m.childLanes=Zv(o,N,f),a.memoizedState=Kv,Wf(null,m)):(ea(a),Wv(a,W))}var se=o.memoizedState;if(se!==null&&(W=se.dehydrated,W!==null)){if(O)a.flags&256?(ea(a),a.flags&=-257,a=Yv(o,a,f)):a.memoizedState!==null?(ta(),a.child=o.child,a.flags|=128,a=null):(ta(),W=m.fallback,R=a.mode,m=Mp({mode:"visible",children:m.children},R),W=hl(W,R,f,null),W.flags|=2,m.return=a,W.return=a,m.sibling=W,a.child=m,Sl(a,o.child,null,f),m=a.child,m.memoizedState=Gv(f),m.childLanes=Zv(o,N,f),a.memoizedState=Kv,a=Wf(null,m));else if(ea(a),kb(W)){if(N=W.nextSibling&&W.nextSibling.dataset,N)var be=N.dgst;N=be,m=Error(r(419)),m.stack="",m.digest=N,If({value:m,source:null,stack:null}),a=Yv(o,a,f)}else if(lr||Tc(o,a,f,!1),N=(f&o.childLanes)!==0,lr||N){if(N=_n,N!==null&&(m=pr(N,f),m!==0&&m!==se.retryLane))throw se.retryLane=m,dl(o,m),fi(N,o,m),Bv;Ob(W)||Lp(),a=Yv(o,a,f)}else Ob(W)?(a.flags|=192,a.child=o.child,a=null):(o=se.treeContext,Mn=Bi(W.nextSibling),Pr=a,Ht=!0,Zs=null,Ui=!1,o!==null&&D2(a,o),a=Wv(a,m.children),a.flags|=4096);return a}return R?(ta(),W=m.fallback,R=a.mode,se=o.child,be=se.sibling,m=is(se,{mode:"hidden",children:m.children}),m.subtreeFlags=se.subtreeFlags&65011712,be!==null?W=is(be,W):(W=hl(W,R,f,null),W.flags|=2),W.return=a,m.return=a,m.sibling=W,a.child=m,Wf(null,m),m=a.child,W=o.child.memoizedState,W===null?W=Gv(f):(R=W.cachePool,R!==null?(se=sr._currentValue,R=R.parent!==se?{parent:se,pool:se}:R):R=L2(),W={baseLanes:W.baseLanes|f,cachePool:R}),m.memoizedState=W,m.childLanes=Zv(o,N,f),a.memoizedState=Kv,Wf(o.child,m)):(ea(a),f=o.child,o=f.sibling,f=is(f,{mode:"visible",children:m.children}),f.return=a,f.sibling=null,o!==null&&(N=a.deletions,N===null?(a.deletions=[o],a.flags|=16):N.push(o)),a.child=f,a.memoizedState=null,f)}function Wv(o,a){return a=Mp({mode:"visible",children:a},o.mode),a.return=o,o.child=a}function Mp(o,a){return o=xi(22,o,null,a),o.lanes=0,o}function Yv(o,a,f){return Sl(a,o.child,null,f),o=Wv(a,a.pendingProps.children),o.flags|=2,a.memoizedState=null,o}function JC(o,a,f){o.lanes|=a;var m=o.alternate;m!==null&&(m.lanes|=a),fv(o.return,a,f)}function Xv(o,a,f,m,R,O){var N=o.memoizedState;N===null?o.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:R,treeForkCount:O}:(N.isBackwards=a,N.rendering=null,N.renderingStartTime=0,N.last=m,N.tail=f,N.tailMode=R,N.treeForkCount=O)}function eT(o,a,f){var m=a.pendingProps,R=m.revealOrder,O=m.tail;m=m.children;var N=tr.current,W=(N&2)!==0;if(W?(N=N&1|2,a.flags|=128):N&=1,F(tr,N),Nr(o,a,m,f),m=Ht?$f:0,!W&&o!==null&&(o.flags&128)!==0)e:for(o=a.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&JC(o,f,a);else if(o.tag===19)JC(o,f,a);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(R){case"forwards":for(f=a.child,R=null;f!==null;)o=f.alternate,o!==null&&bp(o)===null&&(R=f),f=f.sibling;f=R,f===null?(R=a.child,a.child=null):(R=f.sibling,f.sibling=null),Xv(a,!1,R,f,O,m);break;case"backwards":case"unstable_legacy-backwards":for(f=null,R=a.child,a.child=null;R!==null;){if(o=R.alternate,o!==null&&bp(o)===null){a.child=R;break}o=R.sibling,R.sibling=f,f=R,R=o}Xv(a,!0,f,null,O,m);break;case"together":Xv(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function us(o,a,f){if(o!==null&&(a.dependencies=o.dependencies),ia|=a.lanes,(f&a.childLanes)===0)if(o!==null){if(Tc(o,a,f,!1),(f&a.childLanes)===0)return null}else return null;if(o!==null&&a.child!==o.child)throw Error(r(153));if(a.child!==null){for(o=a.child,f=is(o,o.pendingProps),a.child=f,f.return=a;o.sibling!==null;)o=o.sibling,f=f.sibling=is(o,o.pendingProps),f.return=a;f.sibling=null}return a.child}function Qv(o,a){return(o.lanes&a)!==0?!0:(o=o.dependencies,!!(o!==null&&fp(o)))}function S8(o,a,f){switch(a.tag){case 3:oe(a,a.stateNode.containerInfo),Ys(a,sr,o.memoizedState.cache),pl();break;case 27:case 5:Ee(a);break;case 4:oe(a,a.stateNode.containerInfo);break;case 10:Ys(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,_v(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(ea(a),a.flags|=128,null):(f&a.child.childLanes)!==0?QC(o,a,f):(ea(a),o=us(o,a,f),o!==null?o.sibling:null);ea(a);break;case 19:var R=(o.flags&128)!==0;if(m=(f&a.childLanes)!==0,m||(Tc(o,a,f,!1),m=(f&a.childLanes)!==0),R){if(m)return eT(o,a,f);a.flags|=128}if(R=a.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),F(tr,tr.current),m)break;return null;case 22:return a.lanes=0,KC(o,a,f,a.pendingProps);case 24:Ys(a,sr,o.memoizedState.cache)}return us(o,a,f)}function tT(o,a,f){if(o!==null)if(o.memoizedProps!==a.pendingProps)lr=!0;else{if(!Qv(o,f)&&(a.flags&128)===0)return lr=!1,S8(o,a,f);lr=(o.flags&131072)!==0}else lr=!1,Ht&&(a.flags&1048576)!==0&&P2(a,$f,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(o=vl(a.elementType),a.type=o,typeof o=="function")rv(o)?(m=xl(o,m),a.tag=1,a=YC(null,a,o,m,f)):(a.tag=0,a=Hv(null,a,o,m,f));else{if(o!=null){var R=o.$$typeof;if(R===b){a.tag=11,a=qC(null,a,o,m,f);break e}else if(R===A){a.tag=14,a=BC(null,a,o,m,f);break e}}throw a=X(o)||o,Error(r(306,a,""))}}return a;case 0:return Hv(o,a,a.type,a.pendingProps,f);case 1:return m=a.type,R=xl(m,a.pendingProps),YC(o,a,m,R,f);case 3:e:{if(oe(a,a.stateNode.containerInfo),o===null)throw Error(r(387));m=a.pendingProps;var O=a.memoizedState;R=O.element,vv(o,a),Bf(a,m,null,f);var N=a.memoizedState;if(m=N.cache,Ys(a,sr,m),m!==O.cache&&dv(a,[sr],f,!0),qf(),m=N.element,O.isDehydrated)if(O={element:m,isDehydrated:!1,cache:N.cache},a.updateQueue.baseState=O,a.memoizedState=O,a.flags&256){a=XC(o,a,m,f);break e}else if(m!==R){R=Fi(Error(r(424)),a),If(R),a=XC(o,a,m,f);break e}else{switch(o=a.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Mn=Bi(o.firstChild),Pr=a,Ht=!0,Zs=null,Ui=!0,f=K2(a,null,m,f),a.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(pl(),m===R){a=us(o,a,f);break e}Nr(o,a,m,f)}a=a.child}return a;case 26:return kp(o,a),o===null?(f=dR(a.type,null,a.pendingProps,null))?a.memoizedState=f:Ht||(f=a.type,o=a.pendingProps,m=Gp(J.current).createElement(f),m[en]=a,m[xn]=o,$r(m,f,o),or(m),a.stateNode=m):a.memoizedState=dR(a.type,o.memoizedProps,a.pendingProps,o.memoizedState),null;case 27:return Ee(a),o===null&&Ht&&(m=a.stateNode=cR(a.type,a.pendingProps,J.current),Pr=a,Ui=!0,R=Mn,ca(a.type)?(Mb=R,Mn=Bi(m.firstChild)):Mn=R),Nr(o,a,a.pendingProps.children,f),kp(o,a),o===null&&(a.flags|=4194304),a.child;case 5:return o===null&&Ht&&((R=m=Mn)&&(m=Y8(m,a.type,a.pendingProps,Ui),m!==null?(a.stateNode=m,Pr=a,Mn=Bi(m.firstChild),Ui=!1,R=!0):R=!1),R||Ws(a)),Ee(a),R=a.type,O=a.pendingProps,N=o!==null?o.memoizedProps:null,m=O.children,Tb(R,O)?m=null:N!==null&&Tb(R,N)&&(a.flags|=32),a.memoizedState!==null&&(R=Cv(o,a,f8,null,null,f),ud._currentValue=R),kp(o,a),Nr(o,a,m,f),a.child;case 6:return o===null&&Ht&&((o=f=Mn)&&(f=X8(f,a.pendingProps,Ui),f!==null?(a.stateNode=f,Pr=a,Mn=null,o=!0):o=!1),o||Ws(a)),null;case 13:return QC(o,a,f);case 4:return oe(a,a.stateNode.containerInfo),m=a.pendingProps,o===null?a.child=Sl(a,null,m,f):Nr(o,a,m,f),a.child;case 11:return qC(o,a,a.type,a.pendingProps,f);case 7:return Nr(o,a,a.pendingProps,f),a.child;case 8:return Nr(o,a,a.pendingProps.children,f),a.child;case 12:return Nr(o,a,a.pendingProps.children,f),a.child;case 10:return m=a.pendingProps,Ys(a,a.type,m.value),Nr(o,a,m.children,f),a.child;case 9:return R=a.type._context,m=a.pendingProps.children,gl(a),R=Dr(R),m=m(R),a.flags|=1,Nr(o,a,m,f),a.child;case 14:return BC(o,a,a.type,a.pendingProps,f);case 15:return HC(o,a,a.type,a.pendingProps,f);case 19:return eT(o,a,f);case 31:return b8(o,a,f);case 22:return KC(o,a,f,a.pendingProps);case 24:return gl(a),m=Dr(sr),o===null?(R=mv(),R===null&&(R=_n,O=hv(),R.pooledCache=O,O.refCount++,O!==null&&(R.pooledCacheLanes|=f),R=O),a.memoizedState={parent:m,cache:R},yv(a),Ys(a,sr,R)):((o.lanes&f)!==0&&(vv(o,a),Bf(a,null,null,f),qf()),R=o.memoizedState,O=a.memoizedState,R.parent!==m?(R={parent:m,cache:m},a.memoizedState=R,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=R),Ys(a,sr,m)):(m=O.cache,Ys(a,sr,m),m!==R.cache&&dv(a,[sr],f,!0))),Nr(o,a,a.pendingProps.children,f),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function fs(o){o.flags|=4}function Jv(o,a,f,m,R){if((a=(o.mode&32)!==0)&&(a=!1),a){if(o.flags|=16777216,(R&335544128)===R)if(o.stateNode.complete)o.flags|=8192;else if(AT())o.flags|=8192;else throw bl=mp,gv}else o.flags&=-16777217}function nT(o,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!yR(a))if(AT())o.flags|=8192;else throw bl=mp,gv}function jp(o,a){a!==null&&(o.flags|=4),o.flags&16384&&(a=o.tag!==22?kn():536870912,o.lanes|=a,zc|=a)}function Yf(o,a){if(!Ht)switch(o.tailMode){case"hidden":a=o.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?o.tail=null:f.sibling=null;break;case"collapsed":f=o.tail;for(var m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?a||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function jn(o){var a=o.alternate!==null&&o.alternate.child===o.child,f=0,m=0;if(a)for(var R=o.child;R!==null;)f|=R.lanes|R.childLanes,m|=R.subtreeFlags&65011712,m|=R.flags&65011712,R.return=o,R=R.sibling;else for(R=o.child;R!==null;)f|=R.lanes|R.childLanes,m|=R.subtreeFlags,m|=R.flags,R.return=o,R=R.sibling;return o.subtreeFlags|=m,o.childLanes=f,a}function w8(o,a,f){var m=a.pendingProps;switch(av(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jn(a),null;case 1:return jn(a),null;case 3:return f=a.stateNode,m=null,o!==null&&(m=o.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),as(sr),he(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(o===null||o.child===null)&&(Cc(a)?fs(a):o===null||o.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,cv())),jn(a),null;case 26:var R=a.type,O=a.memoizedState;return o===null?(fs(a),O!==null?(jn(a),nT(a,O)):(jn(a),Jv(a,R,null,m,f))):O?O!==o.memoizedState?(fs(a),jn(a),nT(a,O)):(jn(a),a.flags&=-16777217):(o=o.memoizedProps,o!==m&&fs(a),jn(a),Jv(a,R,o,m,f)),null;case 27:if(te(a),f=J.current,R=a.type,o!==null&&a.stateNode!=null)o.memoizedProps!==m&&fs(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return jn(a),null}o=D.current,Cc(a)?N2(a):(o=cR(R,m,f),a.stateNode=o,fs(a))}return jn(a),null;case 5:if(te(a),R=a.type,o!==null&&a.stateNode!=null)o.memoizedProps!==m&&fs(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return jn(a),null}if(O=D.current,Cc(a))N2(a);else{var N=Gp(J.current);switch(O){case 1:O=N.createElementNS("http://www.w3.org/2000/svg",R);break;case 2:O=N.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;default:switch(R){case"svg":O=N.createElementNS("http://www.w3.org/2000/svg",R);break;case"math":O=N.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;case"script":O=N.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof m.is=="string"?N.createElement("select",{is:m.is}):N.createElement("select"),m.multiple?O.multiple=!0:m.size&&(O.size=m.size);break;default:O=typeof m.is=="string"?N.createElement(R,{is:m.is}):N.createElement(R)}}O[en]=a,O[xn]=m;e:for(N=a.child;N!==null;){if(N.tag===5||N.tag===6)O.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===a)break e;for(;N.sibling===null;){if(N.return===null||N.return===a)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}a.stateNode=O;e:switch($r(O,R,m),R){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&fs(a)}}return jn(a),Jv(a,a.type,o===null?null:o.memoizedProps,a.pendingProps,f),null;case 6:if(o&&a.stateNode!=null)o.memoizedProps!==m&&fs(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(r(166));if(o=J.current,Cc(a)){if(o=a.stateNode,f=a.memoizedProps,m=null,R=Pr,R!==null)switch(R.tag){case 27:case 5:m=R.memoizedProps}o[en]=a,o=!!(o.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||QT(o.nodeValue,f)),o||Ws(a,!0)}else o=Gp(o).createTextNode(m),o[en]=a,a.stateNode=o}return jn(a),null;case 31:if(f=a.memoizedState,o===null||o.memoizedState!==null){if(m=Cc(a),f!==null){if(o===null){if(!m)throw Error(r(318));if(o=a.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[en]=a}else pl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;jn(a),o=!1}else f=cv(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=f),o=!0;if(!o)return a.flags&256?(Ei(a),a):(Ei(a),null);if((a.flags&128)!==0)throw Error(r(558))}return jn(a),null;case 13:if(m=a.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(R=Cc(a),m!==null&&m.dehydrated!==null){if(o===null){if(!R)throw Error(r(318));if(R=a.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[en]=a}else pl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;jn(a),R=!1}else R=cv(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=R),R=!0;if(!R)return a.flags&256?(Ei(a),a):(Ei(a),null)}return Ei(a),(a.flags&128)!==0?(a.lanes=f,a):(f=m!==null,o=o!==null&&o.memoizedState!==null,f&&(m=a.child,R=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(R=m.alternate.memoizedState.cachePool.pool),O=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(O=m.memoizedState.cachePool.pool),O!==R&&(m.flags|=2048)),f!==o&&f&&(a.child.flags|=8192),jp(a,a.updateQueue),jn(a),null);case 4:return he(),o===null&&wb(a.stateNode.containerInfo),jn(a),null;case 10:return as(a.type),jn(a),null;case 19:if(B(tr),m=a.memoizedState,m===null)return jn(a),null;if(R=(a.flags&128)!==0,O=m.rendering,O===null)if(R)Yf(m,!1);else{if(Yn!==0||o!==null&&(o.flags&128)!==0)for(o=a.child;o!==null;){if(O=bp(o),O!==null){for(a.flags|=128,Yf(m,!1),o=O.updateQueue,a.updateQueue=o,jp(a,o),a.subtreeFlags=0,o=f,f=a.child;f!==null;)k2(f,o),f=f.sibling;return F(tr,tr.current&1|2),Ht&&os(a,m.treeForkCount),a.child}o=o.sibling}m.tail!==null&&Ve()>Ip&&(a.flags|=128,R=!0,Yf(m,!1),a.lanes=4194304)}else{if(!R)if(o=bp(O),o!==null){if(a.flags|=128,R=!0,o=o.updateQueue,a.updateQueue=o,jp(a,o),Yf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!O.alternate&&!Ht)return jn(a),null}else 2*Ve()-m.renderingStartTime>Ip&&f!==536870912&&(a.flags|=128,R=!0,Yf(m,!1),a.lanes=4194304);m.isBackwards?(O.sibling=a.child,a.child=O):(o=m.last,o!==null?o.sibling=O:a.child=O,m.last=O)}return m.tail!==null?(o=m.tail,m.rendering=o,m.tail=o.sibling,m.renderingStartTime=Ve(),o.sibling=null,f=tr.current,F(tr,R?f&1|2:f&1),Ht&&os(a,m.treeForkCount),o):(jn(a),null);case 22:case 23:return Ei(a),xv(),m=a.memoizedState!==null,o!==null?o.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(f&536870912)!==0&&(a.flags&128)===0&&(jn(a),a.subtreeFlags&6&&(a.flags|=8192)):jn(a),f=a.updateQueue,f!==null&&jp(a,f.retryQueue),f=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==f&&(a.flags|=2048),o!==null&&B(yl),null;case 24:return f=null,o!==null&&(f=o.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),as(sr),jn(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function x8(o,a){switch(av(a),a.tag){case 1:return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 3:return as(sr),he(),o=a.flags,(o&65536)!==0&&(o&128)===0?(a.flags=o&-65537|128,a):null;case 26:case 27:case 5:return te(a),null;case 31:if(a.memoizedState!==null){if(Ei(a),a.alternate===null)throw Error(r(340));pl()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 13:if(Ei(a),o=a.memoizedState,o!==null&&o.dehydrated!==null){if(a.alternate===null)throw Error(r(340));pl()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 19:return B(tr),null;case 4:return he(),null;case 10:return as(a.type),null;case 22:case 23:return Ei(a),xv(),o!==null&&B(yl),o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 24:return as(sr),null;case 25:return null;default:return null}}function rT(o,a){switch(av(a),a.tag){case 3:as(sr),he();break;case 26:case 27:case 5:te(a);break;case 4:he();break;case 31:a.memoizedState!==null&&Ei(a);break;case 13:Ei(a);break;case 19:B(tr);break;case 10:as(a.type);break;case 22:case 23:Ei(a),xv(),o!==null&&B(yl);break;case 24:as(sr)}}function Xf(o,a){try{var f=a.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var R=m.next;f=R;do{if((f.tag&o)===o){m=void 0;var O=f.create,N=f.inst;m=O(),N.destroy=m}f=f.next}while(f!==R)}}catch(W){pn(a,a.return,W)}}function na(o,a,f){try{var m=a.updateQueue,R=m!==null?m.lastEffect:null;if(R!==null){var O=R.next;m=O;do{if((m.tag&o)===o){var N=m.inst,W=N.destroy;if(W!==void 0){N.destroy=void 0,R=a;var se=f,be=W;try{be()}catch(Ae){pn(R,se,Ae)}}}m=m.next}while(m!==O)}}catch(Ae){pn(a,a.return,Ae)}}function iT(o){var a=o.updateQueue;if(a!==null){var f=o.stateNode;try{Z2(a,f)}catch(m){pn(o,o.return,m)}}}function oT(o,a,f){f.props=xl(o.type,o.memoizedProps),f.state=o.memoizedState;try{f.componentWillUnmount()}catch(m){pn(o,a,m)}}function Qf(o,a){try{var f=o.ref;if(f!==null){switch(o.tag){case 26:case 27:case 5:var m=o.stateNode;break;case 30:m=o.stateNode;break;default:m=o.stateNode}typeof f=="function"?o.refCleanup=f(m):f.current=m}}catch(R){pn(o,a,R)}}function Oo(o,a){var f=o.ref,m=o.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(R){pn(o,a,R)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(R){pn(o,a,R)}else f.current=null}function sT(o){var a=o.type,f=o.memoizedProps,m=o.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":f.autoFocus&&m.focus();break e;case"img":f.src?m.src=f.src:f.srcSet&&(m.srcset=f.srcSet)}}catch(R){pn(o,o.return,R)}}function eb(o,a,f){try{var m=o.stateNode;B8(m,o.type,f,a),m[xn]=a}catch(R){pn(o,o.return,R)}}function aT(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ca(o.type)||o.tag===4}function tb(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||aT(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ca(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function nb(o,a,f){var m=o.tag;if(m===5||m===6)o=o.stateNode,a?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(o,a):(a=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,a.appendChild(o),f=f._reactRootContainer,f!=null||a.onclick!==null||(a.onclick=ce));else if(m!==4&&(m===27&&ca(o.type)&&(f=o.stateNode,a=null),o=o.child,o!==null))for(nb(o,a,f),o=o.sibling;o!==null;)nb(o,a,f),o=o.sibling}function Pp(o,a,f){var m=o.tag;if(m===5||m===6)o=o.stateNode,a?f.insertBefore(o,a):f.appendChild(o);else if(m!==4&&(m===27&&ca(o.type)&&(f=o.stateNode),o=o.child,o!==null))for(Pp(o,a,f),o=o.sibling;o!==null;)Pp(o,a,f),o=o.sibling}function lT(o){var a=o.stateNode,f=o.memoizedProps;try{for(var m=o.type,R=a.attributes;R.length;)a.removeAttributeNode(R[0]);$r(a,m,f),a[en]=o,a[xn]=f}catch(O){pn(o,o.return,O)}}var ds=!1,cr=!1,rb=!1,cT=typeof WeakSet=="function"?WeakSet:Set,Or=null;function _8(o,a){if(o=o.containerInfo,Eb=em,o=w2(o),Y0(o)){if("selectionStart"in o)var f={start:o.selectionStart,end:o.selectionEnd};else e:{f=(f=o.ownerDocument)&&f.defaultView||window;var m=f.getSelection&&f.getSelection();if(m&&m.rangeCount!==0){f=m.anchorNode;var R=m.anchorOffset,O=m.focusNode;m=m.focusOffset;try{f.nodeType,O.nodeType}catch{f=null;break e}var N=0,W=-1,se=-1,be=0,Ae=0,je=o,xe=null;t:for(;;){for(var Te;je!==f||R!==0&&je.nodeType!==3||(W=N+R),je!==O||m!==0&&je.nodeType!==3||(se=N+m),je.nodeType===3&&(N+=je.nodeValue.length),(Te=je.firstChild)!==null;)xe=je,je=Te;for(;;){if(je===o)break t;if(xe===f&&++be===R&&(W=N),xe===O&&++Ae===m&&(se=N),(Te=je.nextSibling)!==null)break;je=xe,xe=je.parentNode}je=Te}f=W===-1||se===-1?null:{start:W,end:se}}else f=null}f=f||{start:0,end:0}}else f=null;for(Cb={focusedElem:o,selectionRange:f},em=!1,Or=a;Or!==null;)if(a=Or,o=a.child,(a.subtreeFlags&1028)!==0&&o!==null)o.return=a,Or=o;else for(;Or!==null;){switch(a=Or,O=a.alternate,o=a.flags,a.tag){case 0:if((o&4)!==0&&(o=a.updateQueue,o=o!==null?o.events:null,o!==null))for(f=0;f<o.length;f++)R=o[f],R.ref.impl=R.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&O!==null){o=void 0,f=a,R=O.memoizedProps,O=O.memoizedState,m=f.stateNode;try{var Ye=xl(f.type,R);o=m.getSnapshotBeforeUpdate(Ye,O),m.__reactInternalSnapshotBeforeUpdate=o}catch(ht){pn(f,f.return,ht)}}break;case 3:if((o&1024)!==0){if(o=a.stateNode.containerInfo,f=o.nodeType,f===9)Ab(o);else if(f===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Ab(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=a.sibling,o!==null){o.return=a.return,Or=o;break}Or=a.return}}function uT(o,a,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:ps(o,f),m&4&&Xf(5,f);break;case 1:if(ps(o,f),m&4)if(o=f.stateNode,a===null)try{o.componentDidMount()}catch(N){pn(f,f.return,N)}else{var R=xl(f.type,a.memoizedProps);a=a.memoizedState;try{o.componentDidUpdate(R,a,o.__reactInternalSnapshotBeforeUpdate)}catch(N){pn(f,f.return,N)}}m&64&&iT(f),m&512&&Qf(f,f.return);break;case 3:if(ps(o,f),m&64&&(o=f.updateQueue,o!==null)){if(a=null,f.child!==null)switch(f.child.tag){case 27:case 5:a=f.child.stateNode;break;case 1:a=f.child.stateNode}try{Z2(o,a)}catch(N){pn(f,f.return,N)}}break;case 27:a===null&&m&4&&lT(f);case 26:case 5:ps(o,f),a===null&&m&4&&sT(f),m&512&&Qf(f,f.return);break;case 12:ps(o,f);break;case 31:ps(o,f),m&4&&hT(o,f);break;case 13:ps(o,f),m&4&&pT(o,f),m&64&&(o=f.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(f=j8.bind(null,f),Q8(o,f))));break;case 22:if(m=f.memoizedState!==null||ds,!m){a=a!==null&&a.memoizedState!==null||cr,R=ds;var O=cr;ds=m,(cr=a)&&!O?ms(o,f,(f.subtreeFlags&8772)!==0):ps(o,f),ds=R,cr=O}break;case 30:break;default:ps(o,f)}}function fT(o){var a=o.alternate;a!==null&&(o.alternate=null,fT(a)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(a=o.stateNode,a!==null&&_f(a)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var zn=null,ai=!1;function hs(o,a,f){for(f=f.child;f!==null;)dT(o,a,f),f=f.sibling}function dT(o,a,f){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(xt,f)}catch{}switch(f.tag){case 26:cr||Oo(f,a),hs(o,a,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:cr||Oo(f,a);var m=zn,R=ai;ca(f.type)&&(zn=f.stateNode,ai=!1),hs(o,a,f),ad(f.stateNode),zn=m,ai=R;break;case 5:cr||Oo(f,a);case 6:if(m=zn,R=ai,zn=null,hs(o,a,f),zn=m,ai=R,zn!==null)if(ai)try{(zn.nodeType===9?zn.body:zn.nodeName==="HTML"?zn.ownerDocument.body:zn).removeChild(f.stateNode)}catch(O){pn(f,a,O)}else try{zn.removeChild(f.stateNode)}catch(O){pn(f,a,O)}break;case 18:zn!==null&&(ai?(o=zn,iR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,f.stateNode),Kc(o)):iR(zn,f.stateNode));break;case 4:m=zn,R=ai,zn=f.stateNode.containerInfo,ai=!0,hs(o,a,f),zn=m,ai=R;break;case 0:case 11:case 14:case 15:na(2,f,a),cr||na(4,f,a),hs(o,a,f);break;case 1:cr||(Oo(f,a),m=f.stateNode,typeof m.componentWillUnmount=="function"&&oT(f,a,m)),hs(o,a,f);break;case 21:hs(o,a,f);break;case 22:cr=(m=cr)||f.memoizedState!==null,hs(o,a,f),cr=m;break;default:hs(o,a,f)}}function hT(o,a){if(a.memoizedState===null&&(o=a.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Kc(o)}catch(f){pn(a,a.return,f)}}}function pT(o,a){if(a.memoizedState===null&&(o=a.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Kc(o)}catch(f){pn(a,a.return,f)}}function E8(o){switch(o.tag){case 31:case 13:case 19:var a=o.stateNode;return a===null&&(a=o.stateNode=new cT),a;case 22:return o=o.stateNode,a=o._retryCache,a===null&&(a=o._retryCache=new cT),a;default:throw Error(r(435,o.tag))}}function Dp(o,a){var f=E8(o);a.forEach(function(m){if(!f.has(m)){f.add(m);var R=P8.bind(null,o,m);m.then(R,R)}})}function li(o,a){var f=a.deletions;if(f!==null)for(var m=0;m<f.length;m++){var R=f[m],O=o,N=a,W=N;e:for(;W!==null;){switch(W.tag){case 27:if(ca(W.type)){zn=W.stateNode,ai=!1;break e}break;case 5:zn=W.stateNode,ai=!1;break e;case 3:case 4:zn=W.stateNode.containerInfo,ai=!0;break e}W=W.return}if(zn===null)throw Error(r(160));dT(O,N,R),zn=null,ai=!1,O=R.alternate,O!==null&&(O.return=null),R.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)mT(a,o),a=a.sibling}var ho=null;function mT(o,a){var f=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:li(a,o),ci(o),m&4&&(na(3,o,o.return),Xf(3,o),na(5,o,o.return));break;case 1:li(a,o),ci(o),m&512&&(cr||f===null||Oo(f,f.return)),m&64&&ds&&(o=o.updateQueue,o!==null&&(m=o.callbacks,m!==null&&(f=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=f===null?m:f.concat(m))));break;case 26:var R=ho;if(li(a,o),ci(o),m&512&&(cr||f===null||Oo(f,f.return)),m&4){var O=f!==null?f.memoizedState:null;if(m=o.memoizedState,f===null)if(m===null)if(o.stateNode===null){e:{m=o.type,f=o.memoizedProps,R=R.ownerDocument||R;t:switch(m){case"title":O=R.getElementsByTagName("title")[0],(!O||O[tl]||O[en]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=R.createElement(m),R.head.insertBefore(O,R.querySelector("head > title"))),$r(O,m,f),O[en]=o,or(O),m=O;break e;case"link":var N=mR("link","href",R).get(m+(f.href||""));if(N){for(var W=0;W<N.length;W++)if(O=N[W],O.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&O.getAttribute("rel")===(f.rel==null?null:f.rel)&&O.getAttribute("title")===(f.title==null?null:f.title)&&O.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){N.splice(W,1);break t}}O=R.createElement(m),$r(O,m,f),R.head.appendChild(O);break;case"meta":if(N=mR("meta","content",R).get(m+(f.content||""))){for(W=0;W<N.length;W++)if(O=N[W],O.getAttribute("content")===(f.content==null?null:""+f.content)&&O.getAttribute("name")===(f.name==null?null:f.name)&&O.getAttribute("property")===(f.property==null?null:f.property)&&O.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&O.getAttribute("charset")===(f.charSet==null?null:f.charSet)){N.splice(W,1);break t}}O=R.createElement(m),$r(O,m,f),R.head.appendChild(O);break;default:throw Error(r(468,m))}O[en]=o,or(O),m=O}o.stateNode=m}else gR(R,o.type,o.stateNode);else o.stateNode=pR(R,m,o.memoizedProps);else O!==m?(O===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):O.count--,m===null?gR(R,o.type,o.stateNode):pR(R,m,o.memoizedProps)):m===null&&o.stateNode!==null&&eb(o,o.memoizedProps,f.memoizedProps)}break;case 27:li(a,o),ci(o),m&512&&(cr||f===null||Oo(f,f.return)),f!==null&&m&4&&eb(o,o.memoizedProps,f.memoizedProps);break;case 5:if(li(a,o),ci(o),m&512&&(cr||f===null||Oo(f,f.return)),o.flags&32){R=o.stateNode;try{Hs(R,"")}catch(Ye){pn(o,o.return,Ye)}}m&4&&o.stateNode!=null&&(R=o.memoizedProps,eb(o,R,f!==null?f.memoizedProps:R)),m&1024&&(rb=!0);break;case 6:if(li(a,o),ci(o),m&4){if(o.stateNode===null)throw Error(r(162));m=o.memoizedProps,f=o.stateNode;try{f.nodeValue=m}catch(Ye){pn(o,o.return,Ye)}}break;case 3:if(Yp=null,R=ho,ho=Zp(a.containerInfo),li(a,o),ho=R,ci(o),m&4&&f!==null&&f.memoizedState.isDehydrated)try{Kc(a.containerInfo)}catch(Ye){pn(o,o.return,Ye)}rb&&(rb=!1,gT(o));break;case 4:m=ho,ho=Zp(o.stateNode.containerInfo),li(a,o),ci(o),ho=m;break;case 12:li(a,o),ci(o);break;case 31:li(a,o),ci(o),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,Dp(o,m)));break;case 13:li(a,o),ci(o),o.child.flags&8192&&o.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&($p=Ve()),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,Dp(o,m)));break;case 22:R=o.memoizedState!==null;var se=f!==null&&f.memoizedState!==null,be=ds,Ae=cr;if(ds=be||R,cr=Ae||se,li(a,o),cr=Ae,ds=be,ci(o),m&8192)e:for(a=o.stateNode,a._visibility=R?a._visibility&-2:a._visibility|1,R&&(f===null||se||ds||cr||_l(o)),f=null,a=o;;){if(a.tag===5||a.tag===26){if(f===null){se=f=a;try{if(O=se.stateNode,R)N=O.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{W=se.stateNode;var je=se.memoizedProps.style,xe=je!=null&&je.hasOwnProperty("display")?je.display:null;W.style.display=xe==null||typeof xe=="boolean"?"":(""+xe).trim()}}catch(Ye){pn(se,se.return,Ye)}}}else if(a.tag===6){if(f===null){se=a;try{se.stateNode.nodeValue=R?"":se.memoizedProps}catch(Ye){pn(se,se.return,Ye)}}}else if(a.tag===18){if(f===null){se=a;try{var Te=se.stateNode;R?oR(Te,!0):oR(se.stateNode,!1)}catch(Ye){pn(se,se.return,Ye)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===o)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;f===a&&(f=null),a=a.return}f===a&&(f=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=o.updateQueue,m!==null&&(f=m.retryQueue,f!==null&&(m.retryQueue=null,Dp(o,f))));break;case 19:li(a,o),ci(o),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,Dp(o,m)));break;case 30:break;case 21:break;default:li(a,o),ci(o)}}function ci(o){var a=o.flags;if(a&2){try{for(var f,m=o.return;m!==null;){if(aT(m)){f=m;break}m=m.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var R=f.stateNode,O=tb(o);Pp(o,O,R);break;case 5:var N=f.stateNode;f.flags&32&&(Hs(N,""),f.flags&=-33);var W=tb(o);Pp(o,W,N);break;case 3:case 4:var se=f.stateNode.containerInfo,be=tb(o);nb(o,be,se);break;default:throw Error(r(161))}}catch(Ae){pn(o,o.return,Ae)}o.flags&=-3}a&4096&&(o.flags&=-4097)}function gT(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var a=o;gT(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),o=o.sibling}}function ps(o,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)uT(o,a.alternate,a),a=a.sibling}function _l(o){for(o=o.child;o!==null;){var a=o;switch(a.tag){case 0:case 11:case 14:case 15:na(4,a,a.return),_l(a);break;case 1:Oo(a,a.return);var f=a.stateNode;typeof f.componentWillUnmount=="function"&&oT(a,a.return,f),_l(a);break;case 27:ad(a.stateNode);case 26:case 5:Oo(a,a.return),_l(a);break;case 22:a.memoizedState===null&&_l(a);break;case 30:_l(a);break;default:_l(a)}o=o.sibling}}function ms(o,a,f){for(f=f&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,R=o,O=a,N=O.flags;switch(O.tag){case 0:case 11:case 15:ms(R,O,f),Xf(4,O);break;case 1:if(ms(R,O,f),m=O,R=m.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(be){pn(m,m.return,be)}if(m=O,R=m.updateQueue,R!==null){var W=m.stateNode;try{var se=R.shared.hiddenCallbacks;if(se!==null)for(R.shared.hiddenCallbacks=null,R=0;R<se.length;R++)G2(se[R],W)}catch(be){pn(m,m.return,be)}}f&&N&64&&iT(O),Qf(O,O.return);break;case 27:lT(O);case 26:case 5:ms(R,O,f),f&&m===null&&N&4&&sT(O),Qf(O,O.return);break;case 12:ms(R,O,f);break;case 31:ms(R,O,f),f&&N&4&&hT(R,O);break;case 13:ms(R,O,f),f&&N&4&&pT(R,O);break;case 22:O.memoizedState===null&&ms(R,O,f),Qf(O,O.return);break;case 30:break;default:ms(R,O,f)}a=a.sibling}}function ib(o,a){var f=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==f&&(o!=null&&o.refCount++,f!=null&&zf(f))}function ob(o,a){o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==o&&(a.refCount++,o!=null&&zf(o))}function po(o,a,f,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)yT(o,a,f,m),a=a.sibling}function yT(o,a,f,m){var R=a.flags;switch(a.tag){case 0:case 11:case 15:po(o,a,f,m),R&2048&&Xf(9,a);break;case 1:po(o,a,f,m);break;case 3:po(o,a,f,m),R&2048&&(o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==o&&(a.refCount++,o!=null&&zf(o)));break;case 12:if(R&2048){po(o,a,f,m),o=a.stateNode;try{var O=a.memoizedProps,N=O.id,W=O.onPostCommit;typeof W=="function"&&W(N,a.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(se){pn(a,a.return,se)}}else po(o,a,f,m);break;case 31:po(o,a,f,m);break;case 13:po(o,a,f,m);break;case 23:break;case 22:O=a.stateNode,N=a.alternate,a.memoizedState!==null?O._visibility&2?po(o,a,f,m):Jf(o,a):O._visibility&2?po(o,a,f,m):(O._visibility|=2,Nc(o,a,f,m,(a.subtreeFlags&10256)!==0||!1)),R&2048&&ib(N,a);break;case 24:po(o,a,f,m),R&2048&&ob(a.alternate,a);break;default:po(o,a,f,m)}}function Nc(o,a,f,m,R){for(R=R&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var O=o,N=a,W=f,se=m,be=N.flags;switch(N.tag){case 0:case 11:case 15:Nc(O,N,W,se,R),Xf(8,N);break;case 23:break;case 22:var Ae=N.stateNode;N.memoizedState!==null?Ae._visibility&2?Nc(O,N,W,se,R):Jf(O,N):(Ae._visibility|=2,Nc(O,N,W,se,R)),R&&be&2048&&ib(N.alternate,N);break;case 24:Nc(O,N,W,se,R),R&&be&2048&&ob(N.alternate,N);break;default:Nc(O,N,W,se,R)}a=a.sibling}}function Jf(o,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var f=o,m=a,R=m.flags;switch(m.tag){case 22:Jf(f,m),R&2048&&ib(m.alternate,m);break;case 24:Jf(f,m),R&2048&&ob(m.alternate,m);break;default:Jf(f,m)}a=a.sibling}}var ed=8192;function $c(o,a,f){if(o.subtreeFlags&ed)for(o=o.child;o!==null;)vT(o,a,f),o=o.sibling}function vT(o,a,f){switch(o.tag){case 26:$c(o,a,f),o.flags&ed&&o.memoizedState!==null&&uF(f,ho,o.memoizedState,o.memoizedProps);break;case 5:$c(o,a,f);break;case 3:case 4:var m=ho;ho=Zp(o.stateNode.containerInfo),$c(o,a,f),ho=m;break;case 22:o.memoizedState===null&&(m=o.alternate,m!==null&&m.memoizedState!==null?(m=ed,ed=16777216,$c(o,a,f),ed=m):$c(o,a,f));break;default:$c(o,a,f)}}function bT(o){var a=o.alternate;if(a!==null&&(o=a.child,o!==null)){a.child=null;do a=o.sibling,o.sibling=null,o=a;while(o!==null)}}function td(o){var a=o.deletions;if((o.flags&16)!==0){if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];Or=m,wT(m,o)}bT(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)ST(o),o=o.sibling}function ST(o){switch(o.tag){case 0:case 11:case 15:td(o),o.flags&2048&&na(9,o,o.return);break;case 3:td(o);break;case 12:td(o);break;case 22:var a=o.stateNode;o.memoizedState!==null&&a._visibility&2&&(o.return===null||o.return.tag!==13)?(a._visibility&=-3,Np(o)):td(o);break;default:td(o)}}function Np(o){var a=o.deletions;if((o.flags&16)!==0){if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];Or=m,wT(m,o)}bT(o)}for(o=o.child;o!==null;){switch(a=o,a.tag){case 0:case 11:case 15:na(8,a,a.return),Np(a);break;case 22:f=a.stateNode,f._visibility&2&&(f._visibility&=-3,Np(a));break;default:Np(a)}o=o.sibling}}function wT(o,a){for(;Or!==null;){var f=Or;switch(f.tag){case 0:case 11:case 15:na(8,f,a);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var m=f.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:zf(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,Or=m;else e:for(f=o;Or!==null;){m=Or;var R=m.sibling,O=m.return;if(fT(m),m===f){Or=null;break e}if(R!==null){R.return=O,Or=R;break e}Or=O}}}var C8={getCacheForType:function(o){var a=Dr(sr),f=a.data.get(o);return f===void 0&&(f=o(),a.data.set(o,f)),f},cacheSignal:function(){return Dr(sr).controller.signal}},T8=typeof WeakMap=="function"?WeakMap:Map,ln=0,_n=null,Lt=null,Ut=0,hn=0,Ci=null,ra=!1,Ic=!1,sb=!1,gs=0,Yn=0,ia=0,El=0,ab=0,Ti=0,zc=0,nd=null,ui=null,lb=!1,$p=0,xT=0,Ip=1/0,zp=null,oa=null,vr=0,sa=null,Fc=null,ys=0,cb=0,ub=null,_T=null,rd=0,fb=null;function Ri(){return(ln&2)!==0&&Ut!==0?Ut&-Ut:H.T!==null?yb():er()}function ET(){if(Ti===0)if((Ut&536870912)===0||Ht){var o=dn;dn<<=1,(dn&3932160)===0&&(dn=262144),Ti=o}else Ti=536870912;return o=_i.current,o!==null&&(o.flags|=32),Ti}function fi(o,a,f){(o===_n&&(hn===2||hn===9)||o.cancelPendingCommit!==null)&&(Lc(o,0),aa(o,Ut,Ti,!1)),Ar(o,f),((ln&2)===0||o!==_n)&&(o===_n&&((ln&2)===0&&(El|=f),Yn===4&&aa(o,Ut,Ti,!1)),ko(o))}function CT(o,a,f){if((ln&6)!==0)throw Error(r(327));var m=!f&&(a&127)===0&&(a&o.expiredLanes)===0||bt(o,a),R=m?O8(o,a):hb(o,a,!0),O=m;do{if(R===0){Ic&&!m&&aa(o,a,0,!1);break}else{if(f=o.current.alternate,O&&!R8(f)){R=hb(o,a,!1),O=!1;continue}if(R===2){if(O=a,o.errorRecoveryDisabledLanes&O)var N=0;else N=o.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){a=N;e:{var W=o;R=nd;var se=W.current.memoizedState.isDehydrated;if(se&&(Lc(W,N).flags|=256),N=hb(W,N,!1),N!==2){if(sb&&!se){W.errorRecoveryDisabledLanes|=O,El|=O,R=4;break e}O=ui,ui=R,O!==null&&(ui===null?ui=O:ui.push.apply(ui,O))}R=N}if(O=!1,R!==2)continue}}if(R===1){Lc(o,0),aa(o,a,0,!0);break}e:{switch(m=o,O=R,O){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:aa(m,a,Ti,!ra);break e;case 2:ui=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(R=$p+300-Ve(),10<R)){if(aa(m,a,Ti,!ra),ft(m,0,!0)!==0)break e;ys=a,m.timeoutHandle=nR(TT.bind(null,m,f,ui,zp,lb,a,Ti,El,zc,ra,O,"Throttled",-0,0),R);break e}TT(m,f,ui,zp,lb,a,Ti,El,zc,ra,O,null,-0,0)}}break}while(!0);ko(o)}function TT(o,a,f,m,R,O,N,W,se,be,Ae,je,xe,Te){if(o.timeoutHandle=-1,je=a.subtreeFlags,je&8192||(je&16785408)===16785408){je={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ce},vT(a,O,je);var Ye=(O&62914560)===O?$p-Ve():(O&4194048)===O?xT-Ve():0;if(Ye=fF(je,Ye),Ye!==null){ys=O,o.cancelPendingCommit=Ye(DT.bind(null,o,a,O,f,m,R,N,W,se,Ae,je,null,xe,Te)),aa(o,O,N,!be);return}}DT(o,a,O,f,m,R,N,W,se)}function R8(o){for(var a=o;;){var f=a.tag;if((f===0||f===11||f===15)&&a.flags&16384&&(f=a.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var m=0;m<f.length;m++){var R=f[m],O=R.getSnapshot;R=R.value;try{if(!wi(O(),R))return!1}catch{return!1}}if(f=a.child,a.subtreeFlags&16384&&f!==null)f.return=a,a=f;else{if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function aa(o,a,f,m){a&=~ab,a&=~El,o.suspendedLanes|=a,o.pingedLanes&=~a,m&&(o.warmLanes|=a),m=o.expirationTimes;for(var R=a;0<R;){var O=31-zt(R),N=1<<O;m[O]=-1,R&=~N}f!==0&&ri(o,f,a)}function Fp(){return(ln&6)===0?(id(0),!1):!0}function db(){if(Lt!==null){if(hn===0)var o=Lt.return;else o=Lt,ss=ml=null,Av(o),kc=null,Lf=0,o=Lt;for(;o!==null;)rT(o.alternate,o),o=o.return;Lt=null}}function Lc(o,a){var f=o.timeoutHandle;f!==-1&&(o.timeoutHandle=-1,G8(f)),f=o.cancelPendingCommit,f!==null&&(o.cancelPendingCommit=null,f()),ys=0,db(),_n=o,Lt=f=is(o.current,null),Ut=a,hn=0,Ci=null,ra=!1,Ic=bt(o,a),sb=!1,zc=Ti=ab=El=ia=Yn=0,ui=nd=null,lb=!1,(a&8)!==0&&(a|=a&32);var m=o.entangledLanes;if(m!==0)for(o=o.entanglements,m&=a;0<m;){var R=31-zt(m),O=1<<R;a|=o[R],m&=~O}return gs=a,sp(),f}function RT(o,a){Rt=null,H.H=Zf,a===Oc||a===pp?(a=q2(),hn=3):a===gv?(a=q2(),hn=4):hn=a===Bv?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ci=a,Lt===null&&(Yn=1,Ap(o,Fi(a,o.current)))}function AT(){var o=_i.current;return o===null?!0:(Ut&4194048)===Ut?qi===null:(Ut&62914560)===Ut||(Ut&536870912)!==0?o===qi:!1}function OT(){var o=H.H;return H.H=Zf,o===null?Zf:o}function kT(){var o=H.A;return H.A=C8,o}function Lp(){Yn=4,ra||(Ut&4194048)!==Ut&&_i.current!==null||(Ic=!0),(ia&134217727)===0&&(El&134217727)===0||_n===null||aa(_n,Ut,Ti,!1)}function hb(o,a,f){var m=ln;ln|=2;var R=OT(),O=kT();(_n!==o||Ut!==a)&&(zp=null,Lc(o,a)),a=!1;var N=Yn;e:do try{if(hn!==0&&Lt!==null){var W=Lt,se=Ci;switch(hn){case 8:db(),N=6;break e;case 3:case 2:case 9:case 6:_i.current===null&&(a=!0);var be=hn;if(hn=0,Ci=null,Vc(o,W,se,be),f&&Ic){N=0;break e}break;default:be=hn,hn=0,Ci=null,Vc(o,W,se,be)}}A8(),N=Yn;break}catch(Ae){RT(o,Ae)}while(!0);return a&&o.shellSuspendCounter++,ss=ml=null,ln=m,H.H=R,H.A=O,Lt===null&&(_n=null,Ut=0,sp()),N}function A8(){for(;Lt!==null;)MT(Lt)}function O8(o,a){var f=ln;ln|=2;var m=OT(),R=kT();_n!==o||Ut!==a?(zp=null,Ip=Ve()+500,Lc(o,a)):Ic=bt(o,a);e:do try{if(hn!==0&&Lt!==null){a=Lt;var O=Ci;t:switch(hn){case 1:hn=0,Ci=null,Vc(o,a,O,1);break;case 2:case 9:if(V2(O)){hn=0,Ci=null,jT(a);break}a=function(){hn!==2&&hn!==9||_n!==o||(hn=7),ko(o)},O.then(a,a);break e;case 3:hn=7;break e;case 4:hn=5;break e;case 7:V2(O)?(hn=0,Ci=null,jT(a)):(hn=0,Ci=null,Vc(o,a,O,7));break;case 5:var N=null;switch(Lt.tag){case 26:N=Lt.memoizedState;case 5:case 27:var W=Lt;if(N?yR(N):W.stateNode.complete){hn=0,Ci=null;var se=W.sibling;if(se!==null)Lt=se;else{var be=W.return;be!==null?(Lt=be,Vp(be)):Lt=null}break t}}hn=0,Ci=null,Vc(o,a,O,5);break;case 6:hn=0,Ci=null,Vc(o,a,O,6);break;case 8:db(),Yn=6;break e;default:throw Error(r(462))}}k8();break}catch(Ae){RT(o,Ae)}while(!0);return ss=ml=null,H.H=m,H.A=R,ln=f,Lt!==null?0:(_n=null,Ut=0,sp(),Yn)}function k8(){for(;Lt!==null&&!We();)MT(Lt)}function MT(o){var a=tT(o.alternate,o,gs);o.memoizedProps=o.pendingProps,a===null?Vp(o):Lt=a}function jT(o){var a=o,f=a.alternate;switch(a.tag){case 15:case 0:a=WC(f,a,a.pendingProps,a.type,void 0,Ut);break;case 11:a=WC(f,a,a.pendingProps,a.type.render,a.ref,Ut);break;case 5:Av(a);default:rT(f,a),a=Lt=k2(a,gs),a=tT(f,a,gs)}o.memoizedProps=o.pendingProps,a===null?Vp(o):Lt=a}function Vc(o,a,f,m){ss=ml=null,Av(a),kc=null,Lf=0;var R=a.return;try{if(v8(o,R,a,f,Ut)){Yn=1,Ap(o,Fi(f,o.current)),Lt=null;return}}catch(O){if(R!==null)throw Lt=R,O;Yn=1,Ap(o,Fi(f,o.current)),Lt=null;return}a.flags&32768?(Ht||m===1?o=!0:Ic||(Ut&536870912)!==0?o=!1:(ra=o=!0,(m===2||m===9||m===3||m===6)&&(m=_i.current,m!==null&&m.tag===13&&(m.flags|=16384))),PT(a,o)):Vp(a)}function Vp(o){var a=o;do{if((a.flags&32768)!==0){PT(a,ra);return}o=a.return;var f=w8(a.alternate,a,gs);if(f!==null){Lt=f;return}if(a=a.sibling,a!==null){Lt=a;return}Lt=a=o}while(a!==null);Yn===0&&(Yn=5)}function PT(o,a){do{var f=x8(o.alternate,o);if(f!==null){f.flags&=32767,Lt=f;return}if(f=o.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!a&&(o=o.sibling,o!==null)){Lt=o;return}Lt=o=f}while(o!==null);Yn=6,Lt=null}function DT(o,a,f,m,R,O,N,W,se){o.cancelPendingCommit=null;do Up();while(vr!==0);if((ln&6)!==0)throw Error(r(327));if(a!==null){if(a===o.current)throw Error(r(177));if(O=a.lanes|a.childLanes,O|=tv,ir(o,f,O,N,W,se),o===_n&&(Lt=_n=null,Ut=0),Fc=a,sa=o,ys=f,cb=O,ub=R,_T=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,D8(pe,function(){return FT(),null})):(o.callbackNode=null,o.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=H.T,H.T=null,R=Z.p,Z.p=2,N=ln,ln|=4;try{_8(o,a,f)}finally{ln=N,Z.p=R,H.T=m}}vr=1,NT(),$T(),IT()}}function NT(){if(vr===1){vr=0;var o=sa,a=Fc,f=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||f){f=H.T,H.T=null;var m=Z.p;Z.p=2;var R=ln;ln|=4;try{mT(a,o);var O=Cb,N=w2(o.containerInfo),W=O.focusedElem,se=O.selectionRange;if(N!==W&&W&&W.ownerDocument&&S2(W.ownerDocument.documentElement,W)){if(se!==null&&Y0(W)){var be=se.start,Ae=se.end;if(Ae===void 0&&(Ae=be),"selectionStart"in W)W.selectionStart=be,W.selectionEnd=Math.min(Ae,W.value.length);else{var je=W.ownerDocument||document,xe=je&&je.defaultView||window;if(xe.getSelection){var Te=xe.getSelection(),Ye=W.textContent.length,ht=Math.min(se.start,Ye),bn=se.end===void 0?ht:Math.min(se.end,Ye);!Te.extend&&ht>bn&&(N=bn,bn=ht,ht=N);var me=b2(W,ht),fe=b2(W,bn);if(me&&fe&&(Te.rangeCount!==1||Te.anchorNode!==me.node||Te.anchorOffset!==me.offset||Te.focusNode!==fe.node||Te.focusOffset!==fe.offset)){var ve=je.createRange();ve.setStart(me.node,me.offset),Te.removeAllRanges(),ht>bn?(Te.addRange(ve),Te.extend(fe.node,fe.offset)):(ve.setEnd(fe.node,fe.offset),Te.addRange(ve))}}}}for(je=[],Te=W;Te=Te.parentNode;)Te.nodeType===1&&je.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<je.length;W++){var Me=je[W];Me.element.scrollLeft=Me.left,Me.element.scrollTop=Me.top}}em=!!Eb,Cb=Eb=null}finally{ln=R,Z.p=m,H.T=f}}o.current=a,vr=2}}function $T(){if(vr===2){vr=0;var o=sa,a=Fc,f=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||f){f=H.T,H.T=null;var m=Z.p;Z.p=2;var R=ln;ln|=4;try{uT(o,a.alternate,a)}finally{ln=R,Z.p=m,H.T=f}}vr=3}}function IT(){if(vr===4||vr===3){vr=0,ze();var o=sa,a=Fc,f=ys,m=_T;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vr=5:(vr=0,Fc=sa=null,zT(o,o.pendingLanes));var R=o.pendingLanes;if(R===0&&(oa=null),Jt(f),a=a.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(xt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=H.T,R=Z.p,Z.p=2,H.T=null;try{for(var O=o.onRecoverableError,N=0;N<m.length;N++){var W=m[N];O(W.value,{componentStack:W.stack})}}finally{H.T=a,Z.p=R}}(ys&3)!==0&&Up(),ko(o),R=o.pendingLanes,(f&261930)!==0&&(R&42)!==0?o===fb?rd++:(rd=0,fb=o):rd=0,id(0)}}function zT(o,a){(o.pooledCacheLanes&=a)===0&&(a=o.pooledCache,a!=null&&(o.pooledCache=null,zf(a)))}function Up(){return NT(),$T(),IT(),FT()}function FT(){if(vr!==5)return!1;var o=sa,a=cb;cb=0;var f=Jt(ys),m=H.T,R=Z.p;try{Z.p=32>f?32:f,H.T=null,f=ub,ub=null;var O=sa,N=ys;if(vr=0,Fc=sa=null,ys=0,(ln&6)!==0)throw Error(r(331));var W=ln;if(ln|=4,ST(O.current),yT(O,O.current,N,f),ln=W,id(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(xt,O)}catch{}return!0}finally{Z.p=R,H.T=m,zT(o,a)}}function LT(o,a,f){a=Fi(f,a),a=qv(o.stateNode,a,2),o=Js(o,a,2),o!==null&&(Ar(o,2),ko(o))}function pn(o,a,f){if(o.tag===3)LT(o,o,f);else for(;a!==null;){if(a.tag===3){LT(a,o,f);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(oa===null||!oa.has(m))){o=Fi(f,o),f=VC(2),m=Js(a,f,2),m!==null&&(UC(f,m,a,o),Ar(m,2),ko(m));break}}a=a.return}}function pb(o,a,f){var m=o.pingCache;if(m===null){m=o.pingCache=new T8;var R=new Set;m.set(a,R)}else R=m.get(a),R===void 0&&(R=new Set,m.set(a,R));R.has(f)||(sb=!0,R.add(f),o=M8.bind(null,o,a,f),a.then(o,o))}function M8(o,a,f){var m=o.pingCache;m!==null&&m.delete(a),o.pingedLanes|=o.suspendedLanes&f,o.warmLanes&=~f,_n===o&&(Ut&f)===f&&(Yn===4||Yn===3&&(Ut&62914560)===Ut&&300>Ve()-$p?(ln&2)===0&&Lc(o,0):ab|=f,zc===Ut&&(zc=0)),ko(o)}function VT(o,a){a===0&&(a=kn()),o=dl(o,a),o!==null&&(Ar(o,a),ko(o))}function j8(o){var a=o.memoizedState,f=0;a!==null&&(f=a.retryLane),VT(o,f)}function P8(o,a){var f=0;switch(o.tag){case 31:case 13:var m=o.stateNode,R=o.memoizedState;R!==null&&(f=R.retryLane);break;case 19:m=o.stateNode;break;case 22:m=o.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(a),VT(o,f)}function D8(o,a){return Ue(o,a)}var qp=null,Uc=null,mb=!1,Bp=!1,gb=!1,la=0;function ko(o){o!==Uc&&o.next===null&&(Uc===null?qp=Uc=o:Uc=Uc.next=o),Bp=!0,mb||(mb=!0,$8())}function id(o,a){if(!gb&&Bp){gb=!0;do for(var f=!1,m=qp;m!==null;){if(o!==0){var R=m.pendingLanes;if(R===0)var O=0;else{var N=m.suspendedLanes,W=m.pingedLanes;O=(1<<31-zt(42|o)+1)-1,O&=R&~(N&~W),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(f=!0,HT(m,O))}else O=Ut,O=ft(m,m===_n?O:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(O&3)===0||bt(m,O)||(f=!0,HT(m,O));m=m.next}while(f);gb=!1}}function N8(){UT()}function UT(){Bp=mb=!1;var o=0;la!==0&&K8()&&(o=la);for(var a=Ve(),f=null,m=qp;m!==null;){var R=m.next,O=qT(m,a);O===0?(m.next=null,f===null?qp=R:f.next=R,R===null&&(Uc=f)):(f=m,(o!==0||(O&3)!==0)&&(Bp=!0)),m=R}vr!==0&&vr!==5||id(o),la!==0&&(la=0)}function qT(o,a){for(var f=o.suspendedLanes,m=o.pingedLanes,R=o.expirationTimes,O=o.pendingLanes&-62914561;0<O;){var N=31-zt(O),W=1<<N,se=R[N];se===-1?((W&f)===0||(W&m)!==0)&&(R[N]=Qt(W,a)):se<=a&&(o.expiredLanes|=W),O&=~W}if(a=_n,f=Ut,f=ft(o,o===a?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),m=o.callbackNode,f===0||o===a&&(hn===2||hn===9)||o.cancelPendingCommit!==null)return m!==null&&m!==null&&De(m),o.callbackNode=null,o.callbackPriority=0;if((f&3)===0||bt(o,f)){if(a=f&-f,a===o.callbackPriority)return a;switch(m!==null&&De(m),Jt(f)){case 2:case 8:f=Ce;break;case 32:f=pe;break;case 268435456:f=He;break;default:f=pe}return m=BT.bind(null,o),f=Ue(f,m),o.callbackPriority=a,o.callbackNode=f,a}return m!==null&&m!==null&&De(m),o.callbackPriority=2,o.callbackNode=null,2}function BT(o,a){if(vr!==0&&vr!==5)return o.callbackNode=null,o.callbackPriority=0,null;var f=o.callbackNode;if(Up()&&o.callbackNode!==f)return null;var m=Ut;return m=ft(o,o===_n?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),m===0?null:(CT(o,m,a),qT(o,Ve()),o.callbackNode!=null&&o.callbackNode===f?BT.bind(null,o):null)}function HT(o,a){if(Up())return null;CT(o,a,!0)}function $8(){Z8(function(){(ln&6)!==0?Ue(dt,N8):UT()})}function yb(){if(la===0){var o=Rc;o===0&&(o=Xt,Xt<<=1,(Xt&261888)===0&&(Xt=256)),la=o}return la}function KT(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:ge(""+o)}function GT(o,a){var f=a.ownerDocument.createElement("input");return f.name=a.name,f.value=a.value,o.id&&f.setAttribute("form",o.id),a.parentNode.insertBefore(f,a),o=new FormData(o),f.parentNode.removeChild(f),o}function I8(o,a,f,m,R){if(a==="submit"&&f&&f.stateNode===R){var O=KT((R[xn]||null).action),N=m.submitter;N&&(a=(a=N[xn]||null)?KT(a.formAction):N.getAttribute("formAction"),a!==null&&(O=a,N=null));var W=new ol("action","action",null,m,R);o.push({event:W,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(la!==0){var se=N?GT(R,N):new FormData(R);Iv(f,{pending:!0,data:se,method:R.method,action:O},null,se)}}else typeof O=="function"&&(W.preventDefault(),se=N?GT(R,N):new FormData(R),Iv(f,{pending:!0,data:se,method:R.method,action:O},O,se))},currentTarget:R}]})}}for(var vb=0;vb<ev.length;vb++){var bb=ev[vb],z8=bb.toLowerCase(),F8=bb[0].toUpperCase()+bb.slice(1);fo(z8,"on"+F8)}fo(E2,"onAnimationEnd"),fo(C2,"onAnimationIteration"),fo(T2,"onAnimationStart"),fo("dblclick","onDoubleClick"),fo("focusin","onFocus"),fo("focusout","onBlur"),fo(t8,"onTransitionRun"),fo(n8,"onTransitionStart"),fo(r8,"onTransitionCancel"),fo(R2,"onTransitionEnd"),Us("onMouseEnter",["mouseout","mouseover"]),Us("onMouseLeave",["mouseout","mouseover"]),Us("onPointerEnter",["pointerout","pointerover"]),Us("onPointerLeave",["pointerout","pointerover"]),so("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),so("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),so("onBeforeInput",["compositionend","keypress","textInput","paste"]),so("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),so("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),so("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var od="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(" "),L8=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(od));function ZT(o,a){a=(a&4)!==0;for(var f=0;f<o.length;f++){var m=o[f],R=m.event;m=m.listeners;e:{var O=void 0;if(a)for(var N=m.length-1;0<=N;N--){var W=m[N],se=W.instance,be=W.currentTarget;if(W=W.listener,se!==O&&R.isPropagationStopped())break e;O=W,R.currentTarget=be;try{O(R)}catch(Ae){op(Ae)}R.currentTarget=null,O=se}else for(N=0;N<m.length;N++){if(W=m[N],se=W.instance,be=W.currentTarget,W=W.listener,se!==O&&R.isPropagationStopped())break e;O=W,R.currentTarget=be;try{O(R)}catch(Ae){op(Ae)}R.currentTarget=null,O=se}}}}function Vt(o,a){var f=a[bi];f===void 0&&(f=a[bi]=new Set);var m=o+"__bubble";f.has(m)||(WT(a,o,2,!1),f.add(m))}function Sb(o,a,f){var m=0;a&&(m|=4),WT(f,o,m,a)}var Hp="_reactListening"+Math.random().toString(36).slice(2);function wb(o){if(!o[Hp]){o[Hp]=!0,Qh.forEach(function(f){f!=="selectionchange"&&(L8.has(f)||Sb(f,!1,o),Sb(f,!0,o))});var a=o.nodeType===9?o:o.ownerDocument;a===null||a[Hp]||(a[Hp]=!0,Sb("selectionchange",!1,a))}}function WT(o,a,f,m){switch(ER(a)){case 2:var R=pF;break;case 8:R=mF;break;default:R=$b}f=R.bind(null,a,f,o),R=void 0,!tn||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(R=!0),m?R!==void 0?o.addEventListener(a,f,{capture:!0,passive:R}):o.addEventListener(a,f,!0):R!==void 0?o.addEventListener(a,f,{passive:R}):o.addEventListener(a,f,!1)}function xb(o,a,f,m,R){var O=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var N=m.tag;if(N===3||N===4){var W=m.stateNode.containerInfo;if(W===R)break;if(N===4)for(N=m.return;N!==null;){var se=N.tag;if((se===3||se===4)&&N.stateNode.containerInfo===R)return;N=N.return}for(;W!==null;){if(N=Fs(W),N===null)return;if(se=N.tag,se===5||se===6||se===26||se===27){m=O=N;continue e}W=W.parentNode}}m=m.return}At(function(){var be=O,Ae=$e(f),je=[];e:{var xe=A2.get(o);if(xe!==void 0){var Te=ol,Ye=o;switch(o){case"keypress":if(ao(f)===0)break e;case"keydown":case"keyup":Te=Pz;break;case"focusin":Ye="focus",Te=H0;break;case"focusout":Ye="blur",Te=H0;break;case"beforeblur":case"afterblur":Te=H0;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=r2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=wz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=$z;break;case E2:case C2:case T2:Te=Ez;break;case R2:Te=zz;break;case"scroll":case"scrollend":Te=kf;break;case"wheel":Te=Lz;break;case"copy":case"cut":case"paste":Te=Tz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=o2;break;case"toggle":case"beforetoggle":Te=Uz}var ht=(a&4)!==0,bn=!ht&&(o==="scroll"||o==="scrollend"),me=ht?xe!==null?xe+"Capture":null:xe;ht=[];for(var fe=be,ve;fe!==null;){var Me=fe;if(ve=Me.stateNode,Me=Me.tag,Me!==5&&Me!==26&&Me!==27||ve===null||me===null||(Me=Mt(fe,me),Me!=null&&ht.push(sd(fe,Me,ve))),bn)break;fe=fe.return}0<ht.length&&(xe=new Te(xe,Ye,null,f,Ae),je.push({event:xe,listeners:ht}))}}if((a&7)===0){e:{if(xe=o==="mouseover"||o==="pointerover",Te=o==="mouseout"||o==="pointerout",xe&&f!==ke&&(Ye=f.relatedTarget||f.fromElement)&&(Fs(Ye)||Ye[Mr]))break e;if((Te||xe)&&(xe=Ae.window===Ae?Ae:(xe=Ae.ownerDocument)?xe.defaultView||xe.parentWindow:window,Te?(Ye=f.relatedTarget||f.toElement,Te=be,Ye=Ye?Fs(Ye):null,Ye!==null&&(bn=s(Ye),ht=Ye.tag,Ye!==bn||ht!==5&&ht!==27&&ht!==6)&&(Ye=null)):(Te=null,Ye=be),Te!==Ye)){if(ht=r2,Me="onMouseLeave",me="onMouseEnter",fe="mouse",(o==="pointerout"||o==="pointerover")&&(ht=o2,Me="onPointerLeave",me="onPointerEnter",fe="pointer"),bn=Te==null?xe:nl(Te),ve=Ye==null?xe:nl(Ye),xe=new ht(Me,fe+"leave",Te,f,Ae),xe.target=bn,xe.relatedTarget=ve,Me=null,Fs(Ae)===be&&(ht=new ht(me,fe+"enter",Ye,f,Ae),ht.target=ve,ht.relatedTarget=bn,Me=ht),bn=Me,Te&&Ye)t:{for(ht=V8,me=Te,fe=Ye,ve=0,Me=me;Me;Me=ht(Me))ve++;Me=0;for(var lt=fe;lt;lt=ht(lt))Me++;for(;0<ve-Me;)me=ht(me),ve--;for(;0<Me-ve;)fe=ht(fe),Me--;for(;ve--;){if(me===fe||fe!==null&&me===fe.alternate){ht=me;break t}me=ht(me),fe=ht(fe)}ht=null}else ht=null;Te!==null&&YT(je,xe,Te,ht,!1),Ye!==null&&bn!==null&&YT(je,bn,Ye,ht,!0)}}e:{if(xe=be?nl(be):window,Te=xe.nodeName&&xe.nodeName.toLowerCase(),Te==="select"||Te==="input"&&xe.type==="file")var nn=h2;else if(f2(xe))if(p2)nn=Qz;else{nn=Yz;var Je=Wz}else Te=xe.nodeName,!Te||Te.toLowerCase()!=="input"||xe.type!=="checkbox"&&xe.type!=="radio"?be&&G(be.elementType)&&(nn=h2):nn=Xz;if(nn&&(nn=nn(o,be))){d2(je,nn,f,Ae);break e}Je&&Je(o,xe,be),o==="focusout"&&be&&xe.type==="number"&&be.memoizedProps.value!=null&&Of(xe,"number",xe.value)}switch(Je=be?nl(be):window,o){case"focusin":(f2(Je)||Je.contentEditable==="true")&&(bc=Je,X0=be,Nf=null);break;case"focusout":Nf=X0=bc=null;break;case"mousedown":Q0=!0;break;case"contextmenu":case"mouseup":case"dragend":Q0=!1,x2(je,f,Ae);break;case"selectionchange":if(e8)break;case"keydown":case"keyup":x2(je,f,Ae)}var Ot;if(G0)e:{switch(o){case"compositionstart":var qt="onCompositionStart";break e;case"compositionend":qt="onCompositionEnd";break e;case"compositionupdate":qt="onCompositionUpdate";break e}qt=void 0}else vc?c2(o,f)&&(qt="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(qt="onCompositionStart");qt&&(s2&&f.locale!=="ko"&&(vc||qt!=="onCompositionStart"?qt==="onCompositionEnd"&&vc&&(Ot=Ks()):(cn=Ae,si="value"in cn?cn.value:cn.textContent,vc=!0)),Je=Kp(be,qt),0<Je.length&&(qt=new i2(qt,o,null,f,Ae),je.push({event:qt,listeners:Je}),Ot?qt.data=Ot:(Ot=u2(f),Ot!==null&&(qt.data=Ot)))),(Ot=Bz?Hz(o,f):Kz(o,f))&&(qt=Kp(be,"onBeforeInput"),0<qt.length&&(Je=new i2("onBeforeInput","beforeinput",null,f,Ae),je.push({event:Je,listeners:qt}),Je.data=Ot)),I8(je,o,be,f,Ae)}ZT(je,a)})}function sd(o,a,f){return{instance:o,listener:a,currentTarget:f}}function Kp(o,a){for(var f=a+"Capture",m=[];o!==null;){var R=o,O=R.stateNode;if(R=R.tag,R!==5&&R!==26&&R!==27||O===null||(R=Mt(o,f),R!=null&&m.unshift(sd(o,R,O)),R=Mt(o,a),R!=null&&m.push(sd(o,R,O))),o.tag===3)return m;o=o.return}return[]}function V8(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function YT(o,a,f,m,R){for(var O=a._reactName,N=[];f!==null&&f!==m;){var W=f,se=W.alternate,be=W.stateNode;if(W=W.tag,se!==null&&se===m)break;W!==5&&W!==26&&W!==27||be===null||(se=be,R?(be=Mt(f,O),be!=null&&N.unshift(sd(f,be,se))):R||(be=Mt(f,O),be!=null&&N.push(sd(f,be,se)))),f=f.return}N.length!==0&&o.push({event:a,listeners:N})}var U8=/\r\n?/g,q8=/\u0000|\uFFFD/g;function XT(o){return(typeof o=="string"?o:""+o).replace(U8,`
9
+ `).replace(q8,"")}function QT(o,a){return a=XT(a),XT(o)===a}function vn(o,a,f,m,R,O){switch(f){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Hs(o,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Hs(o,""+m);break;case"className":gc(o,"class",m);break;case"tabIndex":gc(o,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":gc(o,f,m);break;case"style":U(o,m,O);break;case"data":if(a!=="object"){gc(o,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||f!=="href")){o.removeAttribute(f);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(f);break}m=ge(""+m),o.setAttribute(f,m);break;case"action":case"formAction":if(typeof m=="function"){o.setAttribute(f,"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 O=="function"&&(f==="formAction"?(a!=="input"&&vn(o,a,"name",R.name,R,null),vn(o,a,"formEncType",R.formEncType,R,null),vn(o,a,"formMethod",R.formMethod,R,null),vn(o,a,"formTarget",R.formTarget,R,null)):(vn(o,a,"encType",R.encType,R,null),vn(o,a,"method",R.method,R,null),vn(o,a,"target",R.target,R,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(f);break}m=ge(""+m),o.setAttribute(f,m);break;case"onClick":m!=null&&(o.onclick=ce);break;case"onScroll":m!=null&&Vt("scroll",o);break;case"onScrollEnd":m!=null&&Vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(f=m.__html,f!=null){if(R.children!=null)throw Error(r(60));o.innerHTML=f}}break;case"multiple":o.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":o.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){o.removeAttribute("xlink:href");break}f=ge(""+m),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(f,""+m):o.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(f,""):o.removeAttribute(f);break;case"capture":case"download":m===!0?o.setAttribute(f,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(f,m):o.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?o.setAttribute(f,m):o.removeAttribute(f);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?o.removeAttribute(f):o.setAttribute(f,m);break;case"popover":Vt("beforetoggle",o),Vt("toggle",o),rl(o,"popover",m);break;case"xlinkActuate":Ii(o,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Ii(o,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Ii(o,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Ii(o,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Ii(o,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Ii(o,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Ii(o,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Ii(o,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Ii(o,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":rl(o,"is",m);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=ue.get(f)||f,rl(o,f,m))}}function _b(o,a,f,m,R,O){switch(f){case"style":U(o,m,O);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(f=m.__html,f!=null){if(R.children!=null)throw Error(r(60));o.innerHTML=f}}break;case"children":typeof m=="string"?Hs(o,m):(typeof m=="number"||typeof m=="bigint")&&Hs(o,""+m);break;case"onScroll":m!=null&&Vt("scroll",o);break;case"onScrollEnd":m!=null&&Vt("scrollend",o);break;case"onClick":m!=null&&(o.onclick=ce);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ef.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(R=f.endsWith("Capture"),a=f.slice(2,R?f.length-7:void 0),O=o[xn]||null,O=O!=null?O[f]:null,typeof O=="function"&&o.removeEventListener(a,O,R),typeof m=="function")){typeof O!="function"&&O!==null&&(f in o?o[f]=null:o.hasAttribute(f)&&o.removeAttribute(f)),o.addEventListener(a,m,R);break e}f in o?o[f]=m:m===!0?o.setAttribute(f,""):rl(o,f,m)}}}function $r(o,a,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Vt("error",o),Vt("load",o);var m=!1,R=!1,O;for(O in f)if(f.hasOwnProperty(O)){var N=f[O];if(N!=null)switch(O){case"src":m=!0;break;case"srcSet":R=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:vn(o,a,O,N,f,null)}}R&&vn(o,a,"srcSet",f.srcSet,f,null),m&&vn(o,a,"src",f.src,f,null);return;case"input":Vt("invalid",o);var W=O=N=R=null,se=null,be=null;for(m in f)if(f.hasOwnProperty(m)){var Ae=f[m];if(Ae!=null)switch(m){case"name":R=Ae;break;case"type":N=Ae;break;case"checked":se=Ae;break;case"defaultChecked":be=Ae;break;case"value":O=Ae;break;case"defaultValue":W=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,a));break;default:vn(o,a,m,Ae,f,null)}}np(o,O,W,se,be,N,R,!1);return;case"select":Vt("invalid",o),m=N=O=null;for(R in f)if(f.hasOwnProperty(R)&&(W=f[R],W!=null))switch(R){case"value":O=W;break;case"defaultValue":N=W;break;case"multiple":m=W;default:vn(o,a,R,W,f,null)}a=O,f=N,o.multiple=!!m,a!=null?Bs(o,!!m,a,!1):f!=null&&Bs(o,!!m,f,!0);return;case"textarea":Vt("invalid",o),O=R=m=null;for(N in f)if(f.hasOwnProperty(N)&&(W=f[N],W!=null))switch(N){case"value":m=W;break;case"defaultValue":R=W;break;case"children":O=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(91));break;default:vn(o,a,N,W,f,null)}il(o,m,R,O);return;case"option":for(se in f)if(f.hasOwnProperty(se)&&(m=f[se],m!=null))switch(se){case"selected":o.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:vn(o,a,se,m,f,null)}return;case"dialog":Vt("beforetoggle",o),Vt("toggle",o),Vt("cancel",o),Vt("close",o);break;case"iframe":case"object":Vt("load",o);break;case"video":case"audio":for(m=0;m<od.length;m++)Vt(od[m],o);break;case"image":Vt("error",o),Vt("load",o);break;case"details":Vt("toggle",o);break;case"embed":case"source":case"link":Vt("error",o),Vt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(be in f)if(f.hasOwnProperty(be)&&(m=f[be],m!=null))switch(be){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:vn(o,a,be,m,f,null)}return;default:if(G(a)){for(Ae in f)f.hasOwnProperty(Ae)&&(m=f[Ae],m!==void 0&&_b(o,a,Ae,m,f,void 0));return}}for(W in f)f.hasOwnProperty(W)&&(m=f[W],m!=null&&vn(o,a,W,m,f,null))}function B8(o,a,f,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var R=null,O=null,N=null,W=null,se=null,be=null,Ae=null;for(Te in f){var je=f[Te];if(f.hasOwnProperty(Te)&&je!=null)switch(Te){case"checked":break;case"value":break;case"defaultValue":se=je;default:m.hasOwnProperty(Te)||vn(o,a,Te,null,m,je)}}for(var xe in m){var Te=m[xe];if(je=f[xe],m.hasOwnProperty(xe)&&(Te!=null||je!=null))switch(xe){case"type":O=Te;break;case"name":R=Te;break;case"checked":be=Te;break;case"defaultChecked":Ae=Te;break;case"value":N=Te;break;case"defaultValue":W=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,a));break;default:Te!==je&&vn(o,a,xe,Te,m,je)}}qs(o,N,W,se,be,Ae,O,R);return;case"select":Te=N=W=xe=null;for(O in f)if(se=f[O],f.hasOwnProperty(O)&&se!=null)switch(O){case"value":break;case"multiple":Te=se;default:m.hasOwnProperty(O)||vn(o,a,O,null,m,se)}for(R in m)if(O=m[R],se=f[R],m.hasOwnProperty(R)&&(O!=null||se!=null))switch(R){case"value":xe=O;break;case"defaultValue":W=O;break;case"multiple":N=O;default:O!==se&&vn(o,a,R,O,m,se)}a=W,f=N,m=Te,xe!=null?Bs(o,!!f,xe,!1):!!m!=!!f&&(a!=null?Bs(o,!!f,a,!0):Bs(o,!!f,f?[]:"",!1));return;case"textarea":Te=xe=null;for(W in f)if(R=f[W],f.hasOwnProperty(W)&&R!=null&&!m.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:vn(o,a,W,null,m,R)}for(N in m)if(R=m[N],O=f[N],m.hasOwnProperty(N)&&(R!=null||O!=null))switch(N){case"value":xe=R;break;case"defaultValue":Te=R;break;case"children":break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:R!==O&&vn(o,a,N,R,m,O)}rp(o,xe,Te);return;case"option":for(var Ye in f)if(xe=f[Ye],f.hasOwnProperty(Ye)&&xe!=null&&!m.hasOwnProperty(Ye))switch(Ye){case"selected":o.selected=!1;break;default:vn(o,a,Ye,null,m,xe)}for(se in m)if(xe=m[se],Te=f[se],m.hasOwnProperty(se)&&xe!==Te&&(xe!=null||Te!=null))switch(se){case"selected":o.selected=xe&&typeof xe!="function"&&typeof xe!="symbol";break;default:vn(o,a,se,xe,m,Te)}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 ht in f)xe=f[ht],f.hasOwnProperty(ht)&&xe!=null&&!m.hasOwnProperty(ht)&&vn(o,a,ht,null,m,xe);for(be in m)if(xe=m[be],Te=f[be],m.hasOwnProperty(be)&&xe!==Te&&(xe!=null||Te!=null))switch(be){case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(r(137,a));break;default:vn(o,a,be,xe,m,Te)}return;default:if(G(a)){for(var bn in f)xe=f[bn],f.hasOwnProperty(bn)&&xe!==void 0&&!m.hasOwnProperty(bn)&&_b(o,a,bn,void 0,m,xe);for(Ae in m)xe=m[Ae],Te=f[Ae],!m.hasOwnProperty(Ae)||xe===Te||xe===void 0&&Te===void 0||_b(o,a,Ae,xe,m,Te);return}}for(var me in f)xe=f[me],f.hasOwnProperty(me)&&xe!=null&&!m.hasOwnProperty(me)&&vn(o,a,me,null,m,xe);for(je in m)xe=m[je],Te=f[je],!m.hasOwnProperty(je)||xe===Te||xe==null&&Te==null||vn(o,a,je,xe,m,Te)}function JT(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function H8(){if(typeof performance.getEntriesByType=="function"){for(var o=0,a=0,f=performance.getEntriesByType("resource"),m=0;m<f.length;m++){var R=f[m],O=R.transferSize,N=R.initiatorType,W=R.duration;if(O&&W&&JT(N)){for(N=0,W=R.responseEnd,m+=1;m<f.length;m++){var se=f[m],be=se.startTime;if(be>W)break;var Ae=se.transferSize,je=se.initiatorType;Ae&&JT(je)&&(se=se.responseEnd,N+=Ae*(se<W?1:(W-be)/(se-be)))}if(--m,a+=8*(O+N)/(R.duration/1e3),o++,10<o)break}}if(0<o)return a/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Eb=null,Cb=null;function Gp(o){return o.nodeType===9?o:o.ownerDocument}function eR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function tR(o,a){if(o===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&a==="foreignObject"?0:o}function Tb(o,a){return o==="textarea"||o==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Rb=null;function K8(){var o=window.event;return o&&o.type==="popstate"?o===Rb?!1:(Rb=o,!0):(Rb=null,!1)}var nR=typeof setTimeout=="function"?setTimeout:void 0,G8=typeof clearTimeout=="function"?clearTimeout:void 0,rR=typeof Promise=="function"?Promise:void 0,Z8=typeof queueMicrotask=="function"?queueMicrotask:typeof rR<"u"?function(o){return rR.resolve(null).then(o).catch(W8)}:nR;function W8(o){setTimeout(function(){throw o})}function ca(o){return o==="head"}function iR(o,a){var f=a,m=0;do{var R=f.nextSibling;if(o.removeChild(f),R&&R.nodeType===8)if(f=R.data,f==="/$"||f==="/&"){if(m===0){o.removeChild(R),Kc(a);return}m--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")m++;else if(f==="html")ad(o.ownerDocument.documentElement);else if(f==="head"){f=o.ownerDocument.head,ad(f);for(var O=f.firstChild;O;){var N=O.nextSibling,W=O.nodeName;O[tl]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&O.rel.toLowerCase()==="stylesheet"||f.removeChild(O),O=N}}else f==="body"&&ad(o.ownerDocument.body);f=R}while(f);Kc(a)}function oR(o,a){var f=o;o=0;do{var m=f.nextSibling;if(f.nodeType===1?a?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(a?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),m&&m.nodeType===8)if(f=m.data,f==="/$"){if(o===0)break;o--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||o++;f=m}while(f)}function Ab(o){var a=o.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var f=a;switch(a=a.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Ab(f),_f(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}o.removeChild(f)}}function Y8(o,a,f,m){for(;o.nodeType===1;){var R=f;if(o.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(m){if(!o[tl])switch(a){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(O=o.getAttribute("rel"),O==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(O!==R.rel||o.getAttribute("href")!==(R.href==null||R.href===""?null:R.href)||o.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin)||o.getAttribute("title")!==(R.title==null?null:R.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(O=o.getAttribute("src"),(O!==(R.src==null?null:R.src)||o.getAttribute("type")!==(R.type==null?null:R.type)||o.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin))&&O&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(a==="input"&&o.type==="hidden"){var O=R.name==null?null:""+R.name;if(R.type==="hidden"&&o.getAttribute("name")===O)return o}else return o;if(o=Bi(o.nextSibling),o===null)break}return null}function X8(o,a,f){if(a==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!f||(o=Bi(o.nextSibling),o===null))return null;return o}function sR(o,a){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!a||(o=Bi(o.nextSibling),o===null))return null;return o}function Ob(o){return o.data==="$?"||o.data==="$~"}function kb(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function Q8(o,a){var f=o.ownerDocument;if(o.data==="$~")o._reactRetry=a;else if(o.data!=="$?"||f.readyState!=="loading")a();else{var m=function(){a(),f.removeEventListener("DOMContentLoaded",m)};f.addEventListener("DOMContentLoaded",m),o._reactRetry=m}}function Bi(o){for(;o!=null;o=o.nextSibling){var a=o.nodeType;if(a===1||a===3)break;if(a===8){if(a=o.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return o}var Mb=null;function aR(o){o=o.nextSibling;for(var a=0;o;){if(o.nodeType===8){var f=o.data;if(f==="/$"||f==="/&"){if(a===0)return Bi(o.nextSibling);a--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||a++}o=o.nextSibling}return null}function lR(o){o=o.previousSibling;for(var a=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(a===0)return o;a--}else f!=="/$"&&f!=="/&"||a++}o=o.previousSibling}return null}function cR(o,a,f){switch(a=Gp(f),o){case"html":if(o=a.documentElement,!o)throw Error(r(452));return o;case"head":if(o=a.head,!o)throw Error(r(453));return o;case"body":if(o=a.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function ad(o){for(var a=o.attributes;a.length;)o.removeAttributeNode(a[0]);_f(o)}var Hi=new Map,uR=new Set;function Zp(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var vs=Z.d;Z.d={f:J8,r:eF,D:tF,C:nF,L:rF,m:iF,X:sF,S:oF,M:aF};function J8(){var o=vs.f(),a=Fp();return o||a}function eF(o){var a=Ls(o);a!==null&&a.tag===5&&a.type==="form"?RC(a):vs.r(o)}var qc=typeof document>"u"?null:document;function fR(o,a,f){var m=qc;if(m&&typeof a=="string"&&a){var R=oi(a);R='link[rel="'+o+'"][href="'+R+'"]',typeof f=="string"&&(R+='[crossorigin="'+f+'"]'),uR.has(R)||(uR.add(R),o={rel:o,crossOrigin:f,href:a},m.querySelector(R)===null&&(a=m.createElement("link"),$r(a,"link",o),or(a),m.head.appendChild(a)))}}function tF(o){vs.D(o),fR("dns-prefetch",o,null)}function nF(o,a){vs.C(o,a),fR("preconnect",o,a)}function rF(o,a,f){vs.L(o,a,f);var m=qc;if(m&&o&&a){var R='link[rel="preload"][as="'+oi(a)+'"]';a==="image"&&f&&f.imageSrcSet?(R+='[imagesrcset="'+oi(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(R+='[imagesizes="'+oi(f.imageSizes)+'"]')):R+='[href="'+oi(o)+'"]';var O=R;switch(a){case"style":O=Bc(o);break;case"script":O=Hc(o)}Hi.has(O)||(o=p({rel:"preload",href:a==="image"&&f&&f.imageSrcSet?void 0:o,as:a},f),Hi.set(O,o),m.querySelector(R)!==null||a==="style"&&m.querySelector(ld(O))||a==="script"&&m.querySelector(cd(O))||(a=m.createElement("link"),$r(a,"link",o),or(a),m.head.appendChild(a)))}}function iF(o,a){vs.m(o,a);var f=qc;if(f&&o){var m=a&&typeof a.as=="string"?a.as:"script",R='link[rel="modulepreload"][as="'+oi(m)+'"][href="'+oi(o)+'"]',O=R;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Hc(o)}if(!Hi.has(O)&&(o=p({rel:"modulepreload",href:o},a),Hi.set(O,o),f.querySelector(R)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(cd(O)))return}m=f.createElement("link"),$r(m,"link",o),or(m),f.head.appendChild(m)}}}function oF(o,a,f){vs.S(o,a,f);var m=qc;if(m&&o){var R=Vs(m).hoistableStyles,O=Bc(o);a=a||"default";var N=R.get(O);if(!N){var W={loading:0,preload:null};if(N=m.querySelector(ld(O)))W.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":a},f),(f=Hi.get(O))&&jb(o,f);var se=N=m.createElement("link");or(se),$r(se,"link",o),se._p=new Promise(function(be,Ae){se.onload=be,se.onerror=Ae}),se.addEventListener("load",function(){W.loading|=1}),se.addEventListener("error",function(){W.loading|=2}),W.loading|=4,Wp(N,a,m)}N={type:"stylesheet",instance:N,count:1,state:W},R.set(O,N)}}}function sF(o,a){vs.X(o,a);var f=qc;if(f&&o){var m=Vs(f).hoistableScripts,R=Hc(o),O=m.get(R);O||(O=f.querySelector(cd(R)),O||(o=p({src:o,async:!0},a),(a=Hi.get(R))&&Pb(o,a),O=f.createElement("script"),or(O),$r(O,"link",o),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},m.set(R,O))}}function aF(o,a){vs.M(o,a);var f=qc;if(f&&o){var m=Vs(f).hoistableScripts,R=Hc(o),O=m.get(R);O||(O=f.querySelector(cd(R)),O||(o=p({src:o,async:!0,type:"module"},a),(a=Hi.get(R))&&Pb(o,a),O=f.createElement("script"),or(O),$r(O,"link",o),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},m.set(R,O))}}function dR(o,a,f,m){var R=(R=J.current)?Zp(R):null;if(!R)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(a=Bc(f.href),f=Vs(R).hoistableStyles,m=f.get(a),m||(m={type:"style",instance:null,count:0,state:null},f.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){o=Bc(f.href);var O=Vs(R).hoistableStyles,N=O.get(o);if(N||(R=R.ownerDocument||R,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(o,N),(O=R.querySelector(ld(o)))&&!O._p&&(N.instance=O,N.state.loading=5),Hi.has(o)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Hi.set(o,f),O||lF(R,o,f,N.state))),a&&m===null)throw Error(r(528,""));return N}if(a&&m!==null)throw Error(r(529,""));return null;case"script":return a=f.async,f=f.src,typeof f=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Hc(f),f=Vs(R).hoistableScripts,m=f.get(a),m||(m={type:"script",instance:null,count:0,state:null},f.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Bc(o){return'href="'+oi(o)+'"'}function ld(o){return'link[rel="stylesheet"]['+o+"]"}function hR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function lF(o,a,f,m){o.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=o.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),$r(a,"link",f),or(a),o.head.appendChild(a))}function Hc(o){return'[src="'+oi(o)+'"]'}function cd(o){return"script[async]"+o}function pR(o,a,f){if(a.count++,a.instance===null)switch(a.type){case"style":var m=o.querySelector('style[data-href~="'+oi(f.href)+'"]');if(m)return a.instance=m,or(m),m;var R=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return m=(o.ownerDocument||o).createElement("style"),or(m),$r(m,"style",R),Wp(m,f.precedence,o),a.instance=m;case"stylesheet":R=Bc(f.href);var O=o.querySelector(ld(R));if(O)return a.state.loading|=4,a.instance=O,or(O),O;m=hR(f),(R=Hi.get(R))&&jb(m,R),O=(o.ownerDocument||o).createElement("link"),or(O);var N=O;return N._p=new Promise(function(W,se){N.onload=W,N.onerror=se}),$r(O,"link",m),a.state.loading|=4,Wp(O,f.precedence,o),a.instance=O;case"script":return O=Hc(f.src),(R=o.querySelector(cd(O)))?(a.instance=R,or(R),R):(m=f,(R=Hi.get(O))&&(m=p({},f),Pb(m,R)),o=o.ownerDocument||o,R=o.createElement("script"),or(R),$r(R,"link",m),o.head.appendChild(R),a.instance=R);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Wp(m,f.precedence,o));return a.instance}function Wp(o,a,f){for(var m=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=m.length?m[m.length-1]:null,O=R,N=0;N<m.length;N++){var W=m[N];if(W.dataset.precedence===a)O=W;else if(O!==R)break}O?O.parentNode.insertBefore(o,O.nextSibling):(a=f.nodeType===9?f.head:f,a.insertBefore(o,a.firstChild))}function jb(o,a){o.crossOrigin==null&&(o.crossOrigin=a.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=a.referrerPolicy),o.title==null&&(o.title=a.title)}function Pb(o,a){o.crossOrigin==null&&(o.crossOrigin=a.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=a.referrerPolicy),o.integrity==null&&(o.integrity=a.integrity)}var Yp=null;function mR(o,a,f){if(Yp===null){var m=new Map,R=Yp=new Map;R.set(f,m)}else R=Yp,m=R.get(f),m||(m=new Map,R.set(f,m));if(m.has(o))return m;for(m.set(o,null),f=f.getElementsByTagName(o),R=0;R<f.length;R++){var O=f[R];if(!(O[tl]||O[en]||o==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var N=O.getAttribute(a)||"";N=o+N;var W=m.get(N);W?W.push(O):m.set(N,[O])}}return m}function gR(o,a,f){o=o.ownerDocument||o,o.head.insertBefore(f,a==="title"?o.querySelector("head > title"):null)}function cF(o,a,f){if(f===1||a.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return o=a.disabled,typeof a.precedence=="string"&&o==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function yR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function uF(o,a,f,m){if(f.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var R=Bc(m.href),O=a.querySelector(ld(R));if(O){a=O._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(o.count++,o=Xp.bind(o),a.then(o,o)),f.state.loading|=4,f.instance=O,or(O);return}O=a.ownerDocument||a,m=hR(m),(R=Hi.get(R))&&jb(m,R),O=O.createElement("link"),or(O);var N=O;N._p=new Promise(function(W,se){N.onload=W,N.onerror=se}),$r(O,"link",m),f.instance=O}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(f,a),(a=f.state.preload)&&(f.state.loading&3)===0&&(o.count++,f=Xp.bind(o),a.addEventListener("load",f),a.addEventListener("error",f))}}var Db=0;function fF(o,a){return o.stylesheets&&o.count===0&&Jp(o,o.stylesheets),0<o.count||0<o.imgCount?function(f){var m=setTimeout(function(){if(o.stylesheets&&Jp(o,o.stylesheets),o.unsuspend){var O=o.unsuspend;o.unsuspend=null,O()}},6e4+a);0<o.imgBytes&&Db===0&&(Db=62500*H8());var R=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Jp(o,o.stylesheets),o.unsuspend)){var O=o.unsuspend;o.unsuspend=null,O()}},(o.imgBytes>Db?50:800)+a);return o.unsuspend=f,function(){o.unsuspend=null,clearTimeout(m),clearTimeout(R)}}:null}function Xp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jp(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Qp=null;function Jp(o,a){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Qp=new Map,a.forEach(dF,o),Qp=null,Xp.call(o))}function dF(o,a){if(!(a.state.loading&4)){var f=Qp.get(o);if(f)var m=f.get(null);else{f=new Map,Qp.set(o,f);for(var R=o.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<R.length;O++){var N=R[O];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(f.set(N.dataset.precedence,N),m=N)}m&&f.set(null,m)}R=a.instance,N=R.getAttribute("data-precedence"),O=f.get(N)||m,O===m&&f.set(null,R),f.set(N,R),this.count++,m=Xp.bind(this),R.addEventListener("load",m),R.addEventListener("error",m),O?O.parentNode.insertBefore(R,O.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(R,o.firstChild)),a.state.loading|=4}}var ud={$$typeof:E,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function hF(o,a,f,m,R,O,N,W,se){this.tag=1,this.containerInfo=o,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=Rr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rr(0),this.hiddenUpdates=Rr(null),this.identifierPrefix=m,this.onUncaughtError=R,this.onCaughtError=O,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=se,this.incompleteTransitions=new Map}function vR(o,a,f,m,R,O,N,W,se,be,Ae,je){return o=new hF(o,a,f,N,se,be,Ae,je,W),a=1,O===!0&&(a|=24),O=xi(3,null,null,a),o.current=O,O.stateNode=o,a=hv(),a.refCount++,o.pooledCache=a,a.refCount++,O.memoizedState={element:m,isDehydrated:f,cache:a},yv(O),o}function bR(o){return o?(o=xc,o):xc}function SR(o,a,f,m,R,O){R=bR(R),m.context===null?m.context=R:m.pendingContext=R,m=Qs(a),m.payload={element:f},O=O===void 0?null:O,O!==null&&(m.callback=O),f=Js(o,m,a),f!==null&&(fi(f,o,a),Uf(f,o,a))}function wR(o,a){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<a?f:a}}function Nb(o,a){wR(o,a),(o=o.alternate)&&wR(o,a)}function xR(o){if(o.tag===13||o.tag===31){var a=dl(o,67108864);a!==null&&fi(a,o,67108864),Nb(o,67108864)}}function _R(o){if(o.tag===13||o.tag===31){var a=Ri();a=In(a);var f=dl(o,a);f!==null&&fi(f,o,a),Nb(o,a)}}var em=!0;function pF(o,a,f,m){var R=H.T;H.T=null;var O=Z.p;try{Z.p=2,$b(o,a,f,m)}finally{Z.p=O,H.T=R}}function mF(o,a,f,m){var R=H.T;H.T=null;var O=Z.p;try{Z.p=8,$b(o,a,f,m)}finally{Z.p=O,H.T=R}}function $b(o,a,f,m){if(em){var R=Ib(m);if(R===null)xb(o,a,m,tm,f),CR(o,m);else if(yF(R,o,a,f,m))m.stopPropagation();else if(CR(o,m),a&4&&-1<gF.indexOf(o)){for(;R!==null;){var O=Ls(R);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var N=mt(O.pendingLanes);if(N!==0){var W=O;for(W.pendingLanes|=2,W.entangledLanes|=2;N;){var se=1<<31-zt(N);W.entanglements[1]|=se,N&=~se}ko(O),(ln&6)===0&&(Ip=Ve()+500,id(0))}}break;case 31:case 13:W=dl(O,2),W!==null&&fi(W,O,2),Fp(),Nb(O,2)}if(O=Ib(m),O===null&&xb(o,a,m,tm,f),O===R)break;R=O}R!==null&&m.stopPropagation()}else xb(o,a,m,null,f)}}function Ib(o){return o=$e(o),zb(o)}var tm=null;function zb(o){if(tm=null,o=Fs(o),o!==null){var a=s(o);if(a===null)o=null;else{var f=a.tag;if(f===13){if(o=l(a),o!==null)return o;o=null}else if(f===31){if(o=c(a),o!==null)return o;o=null}else if(f===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;o=null}else a!==o&&(o=null)}}return tm=o,null}function ER(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qe()){case dt:return 2;case Ce:return 8;case pe:case Ne:return 32;case He:return 268435456;default:return 32}default:return 32}}var Fb=!1,ua=null,fa=null,da=null,fd=new Map,dd=new Map,ha=[],gF="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 CR(o,a){switch(o){case"focusin":case"focusout":ua=null;break;case"dragenter":case"dragleave":fa=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":fd.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":dd.delete(a.pointerId)}}function hd(o,a,f,m,R,O){return o===null||o.nativeEvent!==O?(o={blockedOn:a,domEventName:f,eventSystemFlags:m,nativeEvent:O,targetContainers:[R]},a!==null&&(a=Ls(a),a!==null&&xR(a)),o):(o.eventSystemFlags|=m,a=o.targetContainers,R!==null&&a.indexOf(R)===-1&&a.push(R),o)}function yF(o,a,f,m,R){switch(a){case"focusin":return ua=hd(ua,o,a,f,m,R),!0;case"dragenter":return fa=hd(fa,o,a,f,m,R),!0;case"mouseover":return da=hd(da,o,a,f,m,R),!0;case"pointerover":var O=R.pointerId;return fd.set(O,hd(fd.get(O)||null,o,a,f,m,R)),!0;case"gotpointercapture":return O=R.pointerId,dd.set(O,hd(dd.get(O)||null,o,a,f,m,R)),!0}return!1}function TR(o){var a=Fs(o.target);if(a!==null){var f=s(a);if(f!==null){if(a=f.tag,a===13){if(a=l(f),a!==null){o.blockedOn=a,Yr(o.priority,function(){_R(f)});return}}else if(a===31){if(a=c(f),a!==null){o.blockedOn=a,Yr(o.priority,function(){_R(f)});return}}else if(a===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function nm(o){if(o.blockedOn!==null)return!1;for(var a=o.targetContainers;0<a.length;){var f=Ib(o.nativeEvent);if(f===null){f=o.nativeEvent;var m=new f.constructor(f.type,f);ke=m,f.target.dispatchEvent(m),ke=null}else return a=Ls(f),a!==null&&xR(a),o.blockedOn=f,!1;a.shift()}return!0}function RR(o,a,f){nm(o)&&f.delete(a)}function vF(){Fb=!1,ua!==null&&nm(ua)&&(ua=null),fa!==null&&nm(fa)&&(fa=null),da!==null&&nm(da)&&(da=null),fd.forEach(RR),dd.forEach(RR)}function rm(o,a){o.blockedOn===a&&(o.blockedOn=null,Fb||(Fb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vF)))}var im=null;function AR(o){im!==o&&(im=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){im===o&&(im=null);for(var a=0;a<o.length;a+=3){var f=o[a],m=o[a+1],R=o[a+2];if(typeof m!="function"){if(zb(m||f)===null)continue;break}var O=Ls(f);O!==null&&(o.splice(a,3),a-=3,Iv(O,{pending:!0,data:R,method:f.method,action:m},m,R))}}))}function Kc(o){function a(se){return rm(se,o)}ua!==null&&rm(ua,o),fa!==null&&rm(fa,o),da!==null&&rm(da,o),fd.forEach(a),dd.forEach(a);for(var f=0;f<ha.length;f++){var m=ha[f];m.blockedOn===o&&(m.blockedOn=null)}for(;0<ha.length&&(f=ha[0],f.blockedOn===null);)TR(f),f.blockedOn===null&&ha.shift();if(f=(o.ownerDocument||o).$$reactFormReplay,f!=null)for(m=0;m<f.length;m+=3){var R=f[m],O=f[m+1],N=R[xn]||null;if(typeof O=="function")N||AR(f);else if(N){var W=null;if(O&&O.hasAttribute("formAction")){if(R=O,N=O[xn]||null)W=N.formAction;else if(zb(R)!==null)continue}else W=N.action;typeof W=="function"?f[m+1]=W:(f.splice(m,3),m-=3),AR(f)}}}function OR(){function o(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(N){return R=N})},focusReset:"manual",scroll:"manual"})}function a(){R!==null&&(R(),R=null),m||setTimeout(f,20)}function f(){if(!m&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,R=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(f,100),function(){m=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),R!==null&&(R(),R=null)}}}function Lb(o){this._internalRoot=o}om.prototype.render=Lb.prototype.render=function(o){var a=this._internalRoot;if(a===null)throw Error(r(409));var f=a.current,m=Ri();SR(f,m,o,a,null,null)},om.prototype.unmount=Lb.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var a=o.containerInfo;SR(o.current,2,null,o,null,null),Fp(),a[Mr]=null}};function om(o){this._internalRoot=o}om.prototype.unstable_scheduleHydration=function(o){if(o){var a=er();o={blockedOn:null,target:o,priority:a};for(var f=0;f<ha.length&&a!==0&&a<ha[f].priority;f++);ha.splice(f,0,o),f===0&&TR(o)}};var kR=t.version;if(kR!=="19.2.0")throw Error(r(527,kR,"19.2.0"));Z.findDOMNode=function(o){var a=o._reactInternals;if(a===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(a),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var bF={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sm.isDisabled&&sm.supportsFiber)try{xt=sm.inject(bF),Ct=sm}catch{}}return md.createRoot=function(o,a){if(!i(o))throw Error(r(299));var f=!1,m="",R=IC,O=zC,N=FC;return a!=null&&(a.unstable_strictMode===!0&&(f=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(R=a.onUncaughtError),a.onCaughtError!==void 0&&(O=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=vR(o,1,!1,null,null,f,m,null,R,O,N,OR),o[Mr]=a.current,wb(o),new Lb(a)},md.hydrateRoot=function(o,a,f){if(!i(o))throw Error(r(299));var m=!1,R="",O=IC,N=zC,W=FC,se=null;return f!=null&&(f.unstable_strictMode===!0&&(m=!0),f.identifierPrefix!==void 0&&(R=f.identifierPrefix),f.onUncaughtError!==void 0&&(O=f.onUncaughtError),f.onCaughtError!==void 0&&(N=f.onCaughtError),f.onRecoverableError!==void 0&&(W=f.onRecoverableError),f.formState!==void 0&&(se=f.formState)),a=vR(o,1,!0,a,f??null,m,R,se,O,N,W,OR),a.context=bR(null),f=a.current,m=Ri(),m=In(m),R=Qs(m),R.callback=null,Js(f,R,m),f=m,a.current.lanes=f,Ar(a,f),ko(a),o[Mr]=a.current,wb(o),new om(a)},md.version="19.2.0",md}var LR;function kF(){if(LR)return qb.exports;LR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qb.exports=OF(),qb.exports}var MF=kF(),sf=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(){}},jF={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},PF=class{#e=jF;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Il=new PF;function DF(e){setTimeout(e,0)}var Hl=typeof window>"u"||"Deno"in globalThis;function ei(){}function NF(e,t){return typeof e=="function"?e(t):e}function $S(e){return typeof e=="number"&&e>=0&&e!==1/0}function oj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ra(e,t){return typeof e=="function"?e(t):e}function Gi(e,t){return typeof e=="function"?e(t):e}function VR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Ex(l,t.options))return!1}else if(!Zd(t.queryKey,l))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||s&&!s(t))}function UR(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Kl(t.options.mutationKey)!==Kl(s))return!1}else if(!Zd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ex(e,t){return(t?.queryKeyHashFn||Kl)(e)}function Kl(e){return JSON.stringify(e,(t,n)=>IS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Zd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Zd(e[n],t[n])):!1}var $F=Object.prototype.hasOwnProperty;function sj(e,t){if(e===t)return e;const n=qR(e)&&qR(t);if(!n&&!(IS(e)&&IS(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),l=s.length,c=n?new Array(l):{};let u=0;for(let d=0;d<l;d++){const h=n?d:s[d],p=e[h],g=t[h];if(p===g){c[h]=p,(n?d<i:$F.call(e,h))&&u++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){c[h]=g;continue}const x=sj(p,g);c[h]=x,x===p&&u++}return i===l&&u===i?e:c}function Zg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function qR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function IS(e){if(!BR(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!BR(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function BR(e){return Object.prototype.toString.call(e)==="[object Object]"}function IF(e){return new Promise(t=>{Il.setTimeout(t,e)})}function zS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?sj(e,t):t}function zF(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function FF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Cx=Symbol();function aj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Cx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function lj(e,t){return typeof e=="function"?e(...t):!!e}var LF=class extends sf{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Hl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Tx=new LF;function FS(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var VF=DF;function UF(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=VF;const s=c=>{t?e.push(c):i(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var wr=UF(),qF=class extends sf{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Hl&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",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(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Wg=new qF;function BF(e){return Math.min(1e3*2**e,3e4)}function cj(e){return(e??"online")==="online"?Wg.isOnline():!0}var LS=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function uj(e){let t=!1,n=0,r;const i=FS(),s=()=>i.status!=="pending",l=T=>{if(!s()){const w=new LS(T);g(w),e.onCancel?.(w)}},c=()=>{t=!0},u=()=>{t=!1},d=()=>Tx.isFocused()&&(e.networkMode==="always"||Wg.isOnline())&&e.canRun(),h=()=>cj(e.networkMode)&&e.canRun(),p=T=>{s()||(r?.(),i.resolve(T))},g=T=>{s()||(r?.(),i.reject(T))},x=()=>new Promise(T=>{r=w=>{(s()||d())&&T(w)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),y=()=>{if(s())return;let T;const w=n===0?e.initialPromise:void 0;try{T=w??e.fn()}catch(S){T=Promise.reject(S)}Promise.resolve(T).then(p).catch(S=>{if(s())return;const v=e.retry??(Hl?0:3),E=e.retryDelay??BF,b=typeof E=="function"?E(n,S):E,C=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,S);if(t||!C){g(S);return}n++,e.onFail?.(n,S),IF(b).then(()=>d()?void 0:x()).then(()=>{t?g(S):y()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?y():x().then(y),i)}}var fj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$S(this.gcTime)&&(this.#e=Il.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Il.clearTimeout(this.#e),this.#e=void 0)}},HF=class extends fj{#e;#t;#n;#i;#r;#s;#a;constructor(e){super(),this.#a=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=KR(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=KR(this.options);t.data!==void 0&&(this.setState(HR(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=zS(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(ei).catch(ei):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Gi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ra(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:!oj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const c=aj(this.options,t),d=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#a=!1,this.options.persister?this.options.persister(c,d,this):c(d)},l=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(c),c})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=uj({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof LS&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#o({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof LS){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#o({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...dj(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...HR(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),wr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function dj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function HR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function KR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var hj=class extends sf{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=FS(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#a;#o;#m;#d;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),GR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return VS(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return VS(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=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 Gi(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!Zg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ZR(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||Gi(this.options.enabled,this.#t)!==Gi(t.enabled,this.#t)||Ra(this.options.staleTime,this.#t)!==Ra(t.staleTime,this.#t))&&this.#g();const i=this.#y();r&&(this.#t!==n||Gi(this.options.enabled,this.#t)!==Gi(t.enabled,this.#t)||i!==this.#l)&&this.#v(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return GF(this,n)&&(this.#i=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ei)),t}#g(){this.#S();const e=Ra(this.options.staleTime,this.#t);if(Hl||this.#i.isStale||!$S(e))return;const n=oj(this.#i.dataUpdatedAt,e)+1;this.#c=Il.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Hl||Gi(this.options.enabled,this.#t)===!1||!$S(this.#l)||this.#l===0)&&(this.#u=Il.setInterval(()=>{(this.options.refetchIntervalInBackground||Tx.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#c&&(Il.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Il.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,s=this.#r,l=this.#s,u=e!==n?e.state:this.#n,{state:d}=e;let h={...d},p=!1,g;if(t._optimisticResults){const M=this.hasListeners(),P=!M&&GR(e,t),I=M&&ZR(e,n,t,r);(P||I)&&(h={...h,...dj(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:x,errorUpdatedAt:y,status:T}=h;g=h.data;let w=!1;if(t.placeholderData!==void 0&&g===void 0&&T==="pending"){let M;i?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=i.data,w=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,M!==void 0&&(T="success",g=zS(i?.data,M,t),p=!0)}if(t.select&&g!==void 0&&!w)if(i&&g===s?.data&&t.select===this.#m)g=this.#d;else try{this.#m=t.select,g=t.select(g),g=zS(i?.data,g,t),this.#d=g,this.#o=null}catch(M){this.#o=M}this.#o&&(x=this.#o,g=this.#d,y=Date.now(),T="error");const S=h.fetchStatus==="fetching",v=T==="pending",E=T==="error",b=v&&S,C=g!==void 0,A={status:T,fetchStatus:h.fetchStatus,isPending:v,isSuccess:T==="success",isError:E,isInitialLoading:b,isLoading:b,data:g,dataUpdatedAt:h.dataUpdatedAt,error:x,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!v,isLoadingError:E&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:E&&C,isStale:Rx(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Gi(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=z=>{A.status==="error"?z.reject(A.error):A.data!==void 0&&z.resolve(A.data)},P=()=>{const z=this.#a=A.promise=FS();M(z)},I=this.#a;switch(I.status){case"pending":e.queryHash===n.queryHash&&M(I);break;case"fulfilled":(A.status==="error"||A.data!==I.value)&&P();break;case"rejected":(A.status!=="error"||A.error!==I.reason)&&P();break}}return A}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Zg(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#p.size)return!0;const s=new Set(i??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(l=>{const c=l;return this.#i[c]!==e[c]&&s.has(c)})};this.#_({listeners:n()})}#x(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#_(e){wr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function KF(e,t){return Gi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function GR(e,t){return KF(e,t)||e.state.data!==void 0&&VS(e,t,t.refetchOnMount)}function VS(e,t,n){if(Gi(t.enabled,e)!==!1&&Ra(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Rx(e,t)}return!1}function ZR(e,t,n,r){return(e!==t||Gi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Rx(e,n)}function Rx(e,t){return Gi(t.enabled,e)!==!1&&e.isStaleByTime(Ra(t.staleTime,e))}function GF(e,t){return!Zg(e.getCurrentResult(),t)}function WR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const d=async()=>{let h=!1;const p=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},g=aj(t.options,t.fetchOptions),x=async(y,T,w)=>{if(h)return Promise.reject();if(T==null&&y.pages.length)return Promise.resolve(y);const v=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:T,direction:w?"backward":"forward",meta:t.options.meta};return p(_),_})(),E=await g(v),{maxPages:b}=t.options,C=w?FF:zF;return{pages:C(y.pages,E,b),pageParams:C(y.pageParams,T,b)}};if(i&&s.length){const y=i==="backward",T=y?ZF:YR,w={pages:s,pageParams:l},S=T(r,w);c=await x(w,S,y)}else{const y=e??s.length;do{const T=u===0?l[0]??r.initialPageParam:YR(r,c);if(u>0&&T==null)break;c=await x(c,T),u++}while(u<y)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function YR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ZF(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var WF=class extends fj{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||pj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=uj({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#r({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:i})}const s=await this.#i.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{throw await this.#n.config.onError?.(s,e,this.state.context,this,n),await this.options.onError?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,s,e,this.state.context,n),s}finally{this.#r({type:"error",error:s})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),wr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function pj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var YF=class extends sf{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new WF({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=lm(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=lm(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=lm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=lm(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wr.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>UR(t,n))}findAll(e={}){return this.getAll().filter(t=>UR(e,t))}notify(e){wr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return wr.batch(()=>Promise.all(e.map(t=>t.continue().catch(ei))))}};function lm(e){return e.options.scope?.id}var XF=class extends sf{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Zg(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Kl(n.mutationKey)!==Kl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??pj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){wr.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,r,i),this.#i.onSettled?.(t.data,null,n,r,i)):t?.type==="error"&&(this.#i.onError?.(t.error,n,r,i),this.#i.onSettled?.(void 0,t.error,n,r,i))}this.listeners.forEach(n=>{n(this.#t)})})}},QF=class extends sf{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Ex(r,t);let s=this.get(i);return s||(s=new HF({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>VR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>VR(e,n)):t}notify(e){wr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){wr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},JF=class{#e;#t;#n;#i;#r;#s;#a;#o;constructor(e={}){this.#e=e.queryCache||new QF,this.#t=e.mutationCache||new YF,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=Tx.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Wg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ra(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,l=NF(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return wr.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;wr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return wr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=wr.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ei).catch(ei)}invalidateQueries(e,t={}){return wr.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=wr.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(ei)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ei)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ra(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ei).catch(ei)}fetchInfiniteQuery(e){return e.behavior=WR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ei).catch(ei)}ensureInfiniteQueryData(e){return e.behavior=WR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Wg.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Kl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Zd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Kl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Zd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ex(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Cx&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},mj=k.createContext(void 0),gj=e=>{const t=k.useContext(mj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},eL=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),j.jsx(mj.Provider,{value:e,children:t})),yj=k.createContext(!1),tL=()=>k.useContext(yj);yj.Provider;function nL(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rL=k.createContext(nL()),iL=()=>k.useContext(rL),oL=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},sL=e=>{k.useEffect(()=>{e.clearReset()},[e])},aL=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||lj(n,[e.error,r])),lL=(e,t)=>t.state.data===void 0,cL=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uL=(e,t)=>e.isLoading&&e.isFetching&&!t,fL=(e,t)=>e?.suspense&&t.isPending,XR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function vj(e,t,n){const r=tL(),i=iL(),s=gj(),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",cL(l),oL(l,i),sL(i);const c=!s.getQueryCache().get(l.queryHash),[u]=k.useState(()=>new t(s,l)),d=u.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(p=>{const g=h?u.subscribe(wr.batchCalls(p)):ei;return u.updateResult(),g},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(l)},[l,u]),fL(l,d))throw XR(l,u,i);if(aL({result:d,errorResetBoundary:i,throwOnError:l.throwOnError,query:s.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw d.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,d),l.experimental_prefetchInRender&&!Hl&&uL(d,r)&&(c?XR(l,u,i):s.getQueryCache().get(l.queryHash)?.promise)?.catch(ei).finally(()=>{u.updateResult()}),l.notifyOnChangeProps?d:u.trackResult(d)}function dL(e,t){return vj(e,hj)}function hL(e,t){return vj({...e,enabled:!0,suspense:!0,throwOnError:lL,placeholderData:void 0},hj)}function pL(e,t){const n=gj(),[r]=k.useState(()=>new XF(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const i=k.useSyncExternalStore(k.useCallback(l=>r.subscribe(wr.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=k.useCallback((l,c)=>{r.mutate(l,c).catch(ei)},[r]);if(i.error&&lj(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const QR=e=>{let t;const n=new Set,r=(d,h)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const g=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,g))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=t=e(r,i,c);return c},mL=(e=>e?QR(e):QR),gL=e=>e;function yL(e,t=gL){const n=ki.useSyncExternalStore(e.subscribe,ki.useCallback(()=>t(e.getState()),[e,t]),ki.useCallback(()=>t(e.getInitialState()),[e,t]));return ki.useDebugValue(n),n}const vL=e=>{const t=mL(e),n=r=>yL(t,r);return Object.assign(n,t),n},bL=(e=>vL);var bj=typeof global=="object"&&global&&global.Object===Object&&global,SL=typeof self=="object"&&self&&self.Object===Object&&self,Jo=bj||SL||Function("return this")(),eo=Jo.Symbol,Sj=Object.prototype,wL=Sj.hasOwnProperty,xL=Sj.toString,gd=eo?eo.toStringTag:void 0;function _L(e){var t=wL.call(e,gd),n=e[gd];try{e[gd]=void 0;var r=!0}catch{}var i=xL.call(e);return r&&(t?e[gd]=n:delete e[gd]),i}var EL=Object.prototype,CL=EL.toString;function TL(e){return CL.call(e)}var RL="[object Null]",AL="[object Undefined]",JR=eo?eo.toStringTag:void 0;function Ds(e){return e==null?e===void 0?AL:RL:JR&&JR in Object(e)?_L(e):TL(e)}function to(e){return e!=null&&typeof e=="object"}var OL="[object Symbol]";function _h(e){return typeof e=="symbol"||to(e)&&Ds(e)==OL}function af(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Tr=Array.isArray,eA=eo?eo.prototype:void 0,tA=eA?eA.toString:void 0;function wj(e){if(typeof e=="string")return e;if(Tr(e))return af(e,wj)+"";if(_h(e))return tA?tA.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var kL=/\s/;function ML(e){for(var t=e.length;t--&&kL.test(e.charAt(t)););return t}var jL=/^\s+/;function PL(e){return e&&e.slice(0,ML(e)+1).replace(jL,"")}function Zt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nA=NaN,DL=/^[-+]0x[0-9a-f]+$/i,NL=/^0b[01]+$/i,$L=/^0o[0-7]+$/i,IL=parseInt;function zL(e){if(typeof e=="number")return e;if(_h(e))return nA;if(Zt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Zt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=PL(e);var n=NL.test(e);return n||$L.test(e)?IL(e.slice(2),n?2:8):DL.test(e)?nA:+e}var rA=1/0,FL=17976931348623157e292;function LL(e){if(!e)return e===0?e:0;if(e=zL(e),e===rA||e===-rA){var t=e<0?-1:1;return t*FL}return e===e?e:0}function xj(e){var t=LL(e),n=t%1;return t===t?n?t-n:t:0}function Vy(e){return e}var VL="[object AsyncFunction]",UL="[object Function]",qL="[object GeneratorFunction]",BL="[object Proxy]";function Eh(e){if(!Zt(e))return!1;var t=Ds(e);return t==UL||t==qL||t==VL||t==BL}var Gb=Jo["__core-js_shared__"],iA=(function(){var e=/[^.]+$/.exec(Gb&&Gb.keys&&Gb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function HL(e){return!!iA&&iA in e}var KL=Function.prototype,GL=KL.toString;function tc(e){if(e!=null){try{return GL.call(e)}catch{}try{return e+""}catch{}}return""}var ZL=/[\\^$.*+?()[\]{}|]/g,WL=/^\[object .+?Constructor\]$/,YL=Function.prototype,XL=Object.prototype,QL=YL.toString,JL=XL.hasOwnProperty,e7=RegExp("^"+QL.call(JL).replace(ZL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function t7(e){if(!Zt(e)||HL(e))return!1;var t=Eh(e)?e7:WL;return t.test(tc(e))}function n7(e,t){return e?.[t]}function nc(e,t){var n=n7(e,t);return t7(n)?n:void 0}var US=nc(Jo,"WeakMap"),oA=Object.create,_j=(function(){function e(){}return function(t){if(!Zt(t))return{};if(oA)return oA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function r7(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tg(){}function Ax(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var i7=800,o7=16,s7=Date.now;function a7(e){var t=0,n=0;return function(){var r=s7(),i=o7-(r-n);if(n=r,i>0){if(++t>=i7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function l7(e){return function(){return e}}var Yg=(function(){try{var e=nc(Object,"defineProperty");return e({},"",{}),e}catch{}})(),c7=Yg?function(e,t){return Yg(e,"toString",{configurable:!0,enumerable:!1,value:l7(t),writable:!0})}:Vy,Ej=a7(c7);function Ox(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function u7(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function f7(e){return e!==e}function d7(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Cj(e,t,n){return t===t?d7(e,t,n):u7(e,f7,n)}function kx(e,t){var n=e==null?0:e.length;return!!n&&Cj(e,t,0)>-1}var h7=9007199254740991,p7=/^(?:0|[1-9]\d*)$/;function Uy(e,t){var n=typeof e;return t=t??h7,!!t&&(n=="number"||n!="symbol"&&p7.test(e))&&e>-1&&e%1==0&&e<t}function Mx(e,t,n){t=="__proto__"&&Yg?Yg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ch(e,t){return e===t||e!==e&&t!==t}var m7=Object.prototype,g7=m7.hasOwnProperty;function qy(e,t,n){var r=e[t];(!(g7.call(e,t)&&Ch(r,n))||n===void 0&&!(t in e))&&Mx(e,t,n)}function rc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=void 0;u===void 0&&(u=e[c]),i?Mx(n,c,u):qy(n,c,u)}return n}var sA=Math.max;function Tj(e,t,n){return t=sA(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=sA(r.length-t,0),l=Array(s);++i<s;)l[i]=r[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=r[i];return c[t]=n(l),r7(e,this,c)}}function By(e,t){return Ej(Tj(e,t,Vy),e+"")}var y7=9007199254740991;function jx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=y7}function Za(e){return e!=null&&jx(e.length)&&!Eh(e)}function v7(e,t,n){if(!Zt(n))return!1;var r=typeof t;return(r=="number"?Za(n)&&Uy(t,n.length):r=="string"&&t in n)?Ch(n[t],e):!1}function Rj(e){return By(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,l&&v7(n[0],n[1],l)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var c=n[r];c&&e(t,c,r,s)}return t})}var b7=Object.prototype;function Th(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b7;return e===n}function Aj(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var S7="[object Arguments]";function aA(e){return to(e)&&Ds(e)==S7}var Oj=Object.prototype,w7=Oj.hasOwnProperty,x7=Oj.propertyIsEnumerable,Du=aA((function(){return arguments})())?aA:function(e){return to(e)&&w7.call(e,"callee")&&!x7.call(e,"callee")};function _7(){return!1}var kj=typeof Pi=="object"&&Pi&&!Pi.nodeType&&Pi,lA=kj&&typeof Di=="object"&&Di&&!Di.nodeType&&Di,E7=lA&&lA.exports===kj,cA=E7?Jo.Buffer:void 0,C7=cA?cA.isBuffer:void 0,Gl=C7||_7,T7="[object Arguments]",R7="[object Array]",A7="[object Boolean]",O7="[object Date]",k7="[object Error]",M7="[object Function]",j7="[object Map]",P7="[object Number]",D7="[object Object]",N7="[object RegExp]",$7="[object Set]",I7="[object String]",z7="[object WeakMap]",F7="[object ArrayBuffer]",L7="[object DataView]",V7="[object Float32Array]",U7="[object Float64Array]",q7="[object Int8Array]",B7="[object Int16Array]",H7="[object Int32Array]",K7="[object Uint8Array]",G7="[object Uint8ClampedArray]",Z7="[object Uint16Array]",W7="[object Uint32Array]",Pn={};Pn[V7]=Pn[U7]=Pn[q7]=Pn[B7]=Pn[H7]=Pn[K7]=Pn[G7]=Pn[Z7]=Pn[W7]=!0;Pn[T7]=Pn[R7]=Pn[F7]=Pn[A7]=Pn[L7]=Pn[O7]=Pn[k7]=Pn[M7]=Pn[j7]=Pn[P7]=Pn[D7]=Pn[N7]=Pn[$7]=Pn[I7]=Pn[z7]=!1;function Y7(e){return to(e)&&jx(e.length)&&!!Pn[Ds(e)]}function Px(e){return function(t){return e(t)}}var Mj=typeof Pi=="object"&&Pi&&!Pi.nodeType&&Pi,Nd=Mj&&typeof Di=="object"&&Di&&!Di.nodeType&&Di,X7=Nd&&Nd.exports===Mj,Zb=X7&&bj.process,Nu=(function(){try{var e=Nd&&Nd.require&&Nd.require("util").types;return e||Zb&&Zb.binding&&Zb.binding("util")}catch{}})(),uA=Nu&&Nu.isTypedArray,Rh=uA?Px(uA):Y7,Q7=Object.prototype,J7=Q7.hasOwnProperty;function jj(e,t){var n=Tr(e),r=!n&&Du(e),i=!n&&!r&&Gl(e),s=!n&&!r&&!i&&Rh(e),l=n||r||i||s,c=l?Aj(e.length,String):[],u=c.length;for(var d in e)(t||J7.call(e,d))&&!(l&&(d=="length"||i&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Uy(d,u)))&&c.push(d);return c}function Pj(e,t){return function(n){return e(t(n))}}var eV=Pj(Object.keys,Object),tV=Object.prototype,nV=tV.hasOwnProperty;function Dj(e){if(!Th(e))return eV(e);var t=[];for(var n in Object(e))nV.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yi(e){return Za(e)?jj(e):Dj(e)}var rV=Object.prototype,iV=rV.hasOwnProperty,oV=Rj(function(e,t){if(Th(t)||Za(t)){rc(t,Yi(t),e);return}for(var n in t)iV.call(t,n)&&qy(e,n,t[n])});function sV(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var aV=Object.prototype,lV=aV.hasOwnProperty;function cV(e){if(!Zt(e))return sV(e);var t=Th(e),n=[];for(var r in e)r=="constructor"&&(t||!lV.call(e,r))||n.push(r);return n}function Ah(e){return Za(e)?jj(e,!0):cV(e)}var uV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fV=/^\w*$/;function Dx(e,t){if(Tr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||_h(e)?!0:fV.test(e)||!uV.test(e)||t!=null&&e in Object(t)}var Wd=nc(Object,"create");function dV(){this.__data__=Wd?Wd(null):{},this.size=0}function hV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var pV="__lodash_hash_undefined__",mV=Object.prototype,gV=mV.hasOwnProperty;function yV(e){var t=this.__data__;if(Wd){var n=t[e];return n===pV?void 0:n}return gV.call(t,e)?t[e]:void 0}var vV=Object.prototype,bV=vV.hasOwnProperty;function SV(e){var t=this.__data__;return Wd?t[e]!==void 0:bV.call(t,e)}var wV="__lodash_hash_undefined__";function xV(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Wd&&t===void 0?wV:t,this}function Zl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zl.prototype.clear=dV;Zl.prototype.delete=hV;Zl.prototype.get=yV;Zl.prototype.has=SV;Zl.prototype.set=xV;function _V(){this.__data__=[],this.size=0}function Hy(e,t){for(var n=e.length;n--;)if(Ch(e[n][0],t))return n;return-1}var EV=Array.prototype,CV=EV.splice;function TV(e){var t=this.__data__,n=Hy(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():CV.call(t,n,1),--this.size,!0}function RV(e){var t=this.__data__,n=Hy(t,e);return n<0?void 0:t[n][1]}function AV(e){return Hy(this.__data__,e)>-1}function OV(e,t){var n=this.__data__,r=Hy(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ns(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ns.prototype.clear=_V;Ns.prototype.delete=TV;Ns.prototype.get=RV;Ns.prototype.has=AV;Ns.prototype.set=OV;var Yd=nc(Jo,"Map");function kV(){this.size=0,this.__data__={hash:new Zl,map:new(Yd||Ns),string:new Zl}}function MV(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ky(e,t){var n=e.__data__;return MV(t)?n[typeof t=="string"?"string":"hash"]:n.map}function jV(e){var t=Ky(this,e).delete(e);return this.size-=t?1:0,t}function PV(e){return Ky(this,e).get(e)}function DV(e){return Ky(this,e).has(e)}function NV(e,t){var n=Ky(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function $s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}$s.prototype.clear=kV;$s.prototype.delete=jV;$s.prototype.get=PV;$s.prototype.has=DV;$s.prototype.set=NV;var $V="Expected a function";function Nx(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($V);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var l=e.apply(this,r);return n.cache=s.set(i,l)||s,l};return n.cache=new(Nx.Cache||$s),n}Nx.Cache=$s;var IV=500;function zV(e){var t=Nx(e,function(r){return n.size===IV&&n.clear(),r}),n=t.cache;return t}var FV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LV=/\\(\\)?/g,Nj=zV(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(FV,function(n,r,i,s){t.push(i?s.replace(LV,"$1"):r||n)}),t});function $x(e){return e==null?"":wj(e)}function lf(e,t){return Tr(e)?e:Dx(e,t)?[e]:Nj($x(e))}function ic(e){if(typeof e=="string"||_h(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Gy(e,t){t=lf(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ic(t[n++])];return n&&n==r?e:void 0}function Fe(e,t,n){var r=e==null?void 0:Gy(e,t);return r===void 0?n:r}function Ix(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var fA=eo?eo.isConcatSpreadable:void 0;function VV(e){return Tr(e)||Du(e)||!!(fA&&e&&e[fA])}function Oh(e,t,n,r,i){var s=-1,l=e.length;for(n||(n=VV),i||(i=[]);++s<l;){var c=e[s];t>0&&n(c)?t>1?Oh(c,t-1,n,r,i):Ix(i,c):r||(i[i.length]=c)}return i}function qS(e){var t=e==null?0:e.length;return t?Oh(e,1):[]}function $j(e){return Ej(Tj(e,void 0,qS),e+"")}var Zy=Pj(Object.getPrototypeOf,Object),UV="[object Object]",qV=Function.prototype,BV=Object.prototype,Ij=qV.toString,HV=BV.hasOwnProperty,KV=Ij.call(Object);function Ia(e){if(!to(e)||Ds(e)!=UV)return!1;var t=Zy(e);if(t===null)return!0;var n=HV.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ij.call(n)==KV}function GV(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function ZV(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function WV(){this.__data__=new Ns,this.size=0}function YV(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function XV(e){return this.__data__.get(e)}function QV(e){return this.__data__.has(e)}var JV=200;function eU(e,t){var n=this.__data__;if(n instanceof Ns){var r=n.__data__;if(!Yd||r.length<JV-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $s(r)}return n.set(e,t),this.size=n.size,this}function bo(e){var t=this.__data__=new Ns(e);this.size=t.size}bo.prototype.clear=WV;bo.prototype.delete=YV;bo.prototype.get=XV;bo.prototype.has=QV;bo.prototype.set=eU;function tU(e,t){return e&&rc(t,Yi(t),e)}function nU(e,t){return e&&rc(t,Ah(t),e)}var zj=typeof Pi=="object"&&Pi&&!Pi.nodeType&&Pi,dA=zj&&typeof Di=="object"&&Di&&!Di.nodeType&&Di,rU=dA&&dA.exports===zj,hA=rU?Jo.Buffer:void 0,pA=hA?hA.allocUnsafe:void 0;function Fj(e,t){if(t)return e.slice();var n=e.length,r=pA?pA(n):new e.constructor(n);return e.copy(r),r}function iU(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var l=e[n];t(l,n,e)&&(s[i++]=l)}return s}function Lj(){return[]}var oU=Object.prototype,sU=oU.propertyIsEnumerable,mA=Object.getOwnPropertySymbols,zx=mA?function(e){return e==null?[]:(e=Object(e),iU(mA(e),function(t){return sU.call(e,t)}))}:Lj;function aU(e,t){return rc(e,zx(e),t)}var lU=Object.getOwnPropertySymbols,Vj=lU?function(e){for(var t=[];e;)Ix(t,zx(e)),e=Zy(e);return t}:Lj;function cU(e,t){return rc(e,Vj(e),t)}function Uj(e,t,n){var r=t(e);return Tr(e)?r:Ix(r,n(e))}function BS(e){return Uj(e,Yi,zx)}function Fx(e){return Uj(e,Ah,Vj)}var HS=nc(Jo,"DataView"),KS=nc(Jo,"Promise"),wu=nc(Jo,"Set"),gA="[object Map]",uU="[object Object]",yA="[object Promise]",vA="[object Set]",bA="[object WeakMap]",SA="[object DataView]",fU=tc(HS),dU=tc(Yd),hU=tc(KS),pU=tc(wu),mU=tc(US),Zi=Ds;(HS&&Zi(new HS(new ArrayBuffer(1)))!=SA||Yd&&Zi(new Yd)!=gA||KS&&Zi(KS.resolve())!=yA||wu&&Zi(new wu)!=vA||US&&Zi(new US)!=bA)&&(Zi=function(e){var t=Ds(e),n=t==uU?e.constructor:void 0,r=n?tc(n):"";if(r)switch(r){case fU:return SA;case dU:return gA;case hU:return yA;case pU:return vA;case mU:return bA}return t});var gU=Object.prototype,yU=gU.hasOwnProperty;function vU(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&yU.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Xg=Jo.Uint8Array;function Lx(e){var t=new e.constructor(e.byteLength);return new Xg(t).set(new Xg(e)),t}function bU(e,t){var n=t?Lx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var SU=/\w*$/;function wU(e){var t=new e.constructor(e.source,SU.exec(e));return t.lastIndex=e.lastIndex,t}var wA=eo?eo.prototype:void 0,xA=wA?wA.valueOf:void 0;function xU(e){return xA?Object(xA.call(e)):{}}function qj(e,t){var n=t?Lx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var _U="[object Boolean]",EU="[object Date]",CU="[object Map]",TU="[object Number]",RU="[object RegExp]",AU="[object Set]",OU="[object String]",kU="[object Symbol]",MU="[object ArrayBuffer]",jU="[object DataView]",PU="[object Float32Array]",DU="[object Float64Array]",NU="[object Int8Array]",$U="[object Int16Array]",IU="[object Int32Array]",zU="[object Uint8Array]",FU="[object Uint8ClampedArray]",LU="[object Uint16Array]",VU="[object Uint32Array]";function UU(e,t,n){var r=e.constructor;switch(t){case MU:return Lx(e);case _U:case EU:return new r(+e);case jU:return bU(e,n);case PU:case DU:case NU:case $U:case IU:case zU:case FU:case LU:case VU:return qj(e,n);case CU:return new r;case TU:case OU:return new r(e);case RU:return wU(e);case AU:return new r;case kU:return xU(e)}}function Bj(e){return typeof e.constructor=="function"&&!Th(e)?_j(Zy(e)):{}}var qU="[object Map]";function BU(e){return to(e)&&Zi(e)==qU}var _A=Nu&&Nu.isMap,HU=_A?Px(_A):BU,KU="[object Set]";function GU(e){return to(e)&&Zi(e)==KU}var EA=Nu&&Nu.isSet,ZU=EA?Px(EA):GU,WU=1,YU=2,XU=4,Hj="[object Arguments]",QU="[object Array]",JU="[object Boolean]",eq="[object Date]",tq="[object Error]",Kj="[object Function]",nq="[object GeneratorFunction]",rq="[object Map]",iq="[object Number]",Gj="[object Object]",oq="[object RegExp]",sq="[object Set]",aq="[object String]",lq="[object Symbol]",cq="[object WeakMap]",uq="[object ArrayBuffer]",fq="[object DataView]",dq="[object Float32Array]",hq="[object Float64Array]",pq="[object Int8Array]",mq="[object Int16Array]",gq="[object Int32Array]",yq="[object Uint8Array]",vq="[object Uint8ClampedArray]",bq="[object Uint16Array]",Sq="[object Uint32Array]",Tn={};Tn[Hj]=Tn[QU]=Tn[uq]=Tn[fq]=Tn[JU]=Tn[eq]=Tn[dq]=Tn[hq]=Tn[pq]=Tn[mq]=Tn[gq]=Tn[rq]=Tn[iq]=Tn[Gj]=Tn[oq]=Tn[sq]=Tn[aq]=Tn[lq]=Tn[yq]=Tn[vq]=Tn[bq]=Tn[Sq]=!0;Tn[tq]=Tn[Kj]=Tn[cq]=!1;function $d(e,t,n,r,i,s){var l,c=t&WU,u=t&YU,d=t&XU;if(n&&(l=i?n(e,r,i,s):n(e)),l!==void 0)return l;if(!Zt(e))return e;var h=Tr(e);if(h){if(l=vU(e),!c)return Ax(e,l)}else{var p=Zi(e),g=p==Kj||p==nq;if(Gl(e))return Fj(e,c);if(p==Gj||p==Hj||g&&!i){if(l=u||g?{}:Bj(e),!c)return u?cU(e,nU(l,e)):aU(e,tU(l,e))}else{if(!Tn[p])return i?e:{};l=UU(e,p,c)}}s||(s=new bo);var x=s.get(e);if(x)return x;s.set(e,l),ZU(e)?e.forEach(function(w){l.add($d(w,t,n,w,e,s))}):HU(e)&&e.forEach(function(w,S){l.set(S,$d(w,t,n,S,e,s))});var y=d?u?Fx:BS:u?Ah:Yi,T=h?void 0:y(e);return Ox(T||e,function(w,S){T&&(S=w,w=e[S]),qy(l,S,$d(w,t,n,S,e,s))}),l}var wq=1,xq=4;function Wy(e){return $d(e,wq|xq)}var _q="__lodash_hash_undefined__";function Eq(e){return this.__data__.set(e,_q),this}function Cq(e){return this.__data__.has(e)}function Wl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new $s;++t<n;)this.add(e[t])}Wl.prototype.add=Wl.prototype.push=Eq;Wl.prototype.has=Cq;function Tq(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Xd(e,t){return e.has(t)}var Rq=1,Aq=2;function Zj(e,t,n,r,i,s){var l=n&Rq,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var p=-1,g=!0,x=n&Aq?new Wl:void 0;for(s.set(e,t),s.set(t,e);++p<c;){var y=e[p],T=t[p];if(r)var w=l?r(T,y,p,t,e,s):r(y,T,p,e,t,s);if(w!==void 0){if(w)continue;g=!1;break}if(x){if(!Tq(t,function(S,v){if(!Xd(x,v)&&(y===S||i(y,S,n,r,s)))return x.push(v)})){g=!1;break}}else if(!(y===T||i(y,T,n,r,s))){g=!1;break}}return s.delete(e),s.delete(t),g}function Oq(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Vx(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var kq=1,Mq=2,jq="[object Boolean]",Pq="[object Date]",Dq="[object Error]",Nq="[object Map]",$q="[object Number]",Iq="[object RegExp]",zq="[object Set]",Fq="[object String]",Lq="[object Symbol]",Vq="[object ArrayBuffer]",Uq="[object DataView]",CA=eo?eo.prototype:void 0,Wb=CA?CA.valueOf:void 0;function qq(e,t,n,r,i,s,l){switch(n){case Uq:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vq:return!(e.byteLength!=t.byteLength||!s(new Xg(e),new Xg(t)));case jq:case Pq:case $q:return Ch(+e,+t);case Dq:return e.name==t.name&&e.message==t.message;case Iq:case Fq:return e==t+"";case Nq:var c=Oq;case zq:var u=r&kq;if(c||(c=Vx),e.size!=t.size&&!u)return!1;var d=l.get(e);if(d)return d==t;r|=Mq,l.set(e,t);var h=Zj(c(e),c(t),r,i,s,l);return l.delete(e),h;case Lq:if(Wb)return Wb.call(e)==Wb.call(t)}return!1}var Bq=1,Hq=Object.prototype,Kq=Hq.hasOwnProperty;function Gq(e,t,n,r,i,s){var l=n&Bq,c=BS(e),u=c.length,d=BS(t),h=d.length;if(u!=h&&!l)return!1;for(var p=u;p--;){var g=c[p];if(!(l?g in t:Kq.call(t,g)))return!1}var x=s.get(e),y=s.get(t);if(x&&y)return x==t&&y==e;var T=!0;s.set(e,t),s.set(t,e);for(var w=l;++p<u;){g=c[p];var S=e[g],v=t[g];if(r)var E=l?r(v,S,g,t,e,s):r(S,v,g,e,t,s);if(!(E===void 0?S===v||i(S,v,n,r,s):E)){T=!1;break}w||(w=g=="constructor")}if(T&&!w){var b=e.constructor,C=t.constructor;b!=C&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof C=="function"&&C instanceof C)&&(T=!1)}return s.delete(e),s.delete(t),T}var Zq=1,TA="[object Arguments]",RA="[object Array]",cm="[object Object]",Wq=Object.prototype,AA=Wq.hasOwnProperty;function Yq(e,t,n,r,i,s){var l=Tr(e),c=Tr(t),u=l?RA:Zi(e),d=c?RA:Zi(t);u=u==TA?cm:u,d=d==TA?cm:d;var h=u==cm,p=d==cm,g=u==d;if(g&&Gl(e)){if(!Gl(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new bo),l||Rh(e)?Zj(e,t,n,r,i,s):qq(e,t,u,n,r,i,s);if(!(n&Zq)){var x=h&&AA.call(e,"__wrapped__"),y=p&&AA.call(t,"__wrapped__");if(x||y){var T=x?e.value():e,w=y?t.value():t;return s||(s=new bo),i(T,w,n,r,s)}}return g?(s||(s=new bo),Gq(e,t,n,r,i,s)):!1}function kh(e,t,n,r,i){return e===t?!0:e==null||t==null||!to(e)&&!to(t)?e!==e&&t!==t:Yq(e,t,n,r,kh,i)}var Xq=1,Qq=2;function Jq(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){l=n[i];var c=l[0],u=e[c],d=l[1];if(l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new bo,p;if(!(p===void 0?kh(d,u,Xq|Qq,r,h):p))return!1}}return!0}function Wj(e){return e===e&&!Zt(e)}function eB(e){for(var t=Yi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Wj(i)]}return t}function Yj(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function tB(e){var t=eB(e);return t.length==1&&t[0][2]?Yj(t[0][0],t[0][1]):function(n){return n===e||Jq(n,e,t)}}function nB(e,t){return e!=null&&t in Object(e)}function Xj(e,t,n){t=lf(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var l=ic(t[r]);if(!(s=e!=null&&n(e,l)))break;e=e[l]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&jx(i)&&Uy(l,i)&&(Tr(e)||Du(e)))}function Qj(e,t){return e!=null&&Xj(e,t,nB)}var rB=1,iB=2;function oB(e,t){return Dx(e)&&Wj(t)?Yj(ic(e),t):function(n){var r=Fe(n,e);return r===void 0&&r===t?Qj(n,e):kh(t,r,rB|iB)}}function sB(e){return function(t){return t?.[e]}}function aB(e){return function(t){return Gy(t,e)}}function lB(e){return Dx(e)?sB(ic(e)):aB(e)}function Ux(e){return typeof e=="function"?e:e==null?Vy:typeof e=="object"?Tr(e)?oB(e[0],e[1]):tB(e):lB(e)}function cB(e){return function(t,n,r){for(var i=-1,s=Object(t),l=r(t),c=l.length;c--;){var u=l[++i];if(n(s[u],u,s)===!1)break}return t}}var Jj=cB();function eP(e,t){return e&&Jj(e,t,Yi)}function uB(e,t){return function(n,r){if(n==null)return n;if(!Za(n))return e(n,r);for(var i=n.length,s=-1,l=Object(n);++s<i&&r(l[s],s,l)!==!1;);return n}}var tP=uB(eP);function GS(e,t,n){(n!==void 0&&!Ch(e[t],n)||n===void 0&&!(t in e))&&Mx(e,t,n)}function Qd(e){return to(e)&&Za(e)}function ZS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function fB(e){return rc(e,Ah(e))}function dB(e,t,n,r,i,s,l){var c=ZS(e,n),u=ZS(t,n),d=l.get(u);if(d){GS(e,n,d);return}var h=s?s(c,u,n+"",e,t,l):void 0,p=h===void 0;if(p){var g=Tr(u),x=!g&&Gl(u),y=!g&&!x&&Rh(u);h=u,g||x||y?Tr(c)?h=c:Qd(c)?h=Ax(c):x?(p=!1,h=Fj(u,!0)):y?(p=!1,h=qj(u,!0)):h=[]:Ia(u)||Du(u)?(h=c,Du(c)?h=fB(c):(!Zt(c)||Eh(c))&&(h=Bj(u))):p=!1}p&&(l.set(u,h),i(h,u,r,s,l),l.delete(u)),GS(e,n,h)}function nP(e,t,n,r,i){e!==t&&Jj(t,function(s,l){if(i||(i=new bo),Zt(s))dB(e,t,l,n,nP,r,i);else{var c=r?r(ZS(e,l),s,l+"",e,t,i):void 0;c===void 0&&(c=s),GS(e,l,c)}},Ah)}var hB=200;function pB(e,t,n,r){var i=-1,s=kx,l=!0,c=e.length,u=[],d=t.length;if(!c)return u;t.length>=hB&&(s=Xd,l=!1,t=new Wl(t));e:for(;++i<c;){var h=e[i],p=h;if(h=h!==0?h:0,l&&p===p){for(var g=d;g--;)if(t[g]===p)continue e;u.push(h)}else s(t,p,r)||u.push(h)}return u}var mB=By(function(e,t){return Qd(e)?pB(e,Oh(t,1,Qd,!0)):[]});function rP(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function iP(e){return typeof e=="function"?e:Vy}function gB(e,t){var n=Tr(e)?Ox:tP;return n(e,iP(t))}var yB=1/0;function vB(e){var t=e==null?0:e.length;return t?Oh(e,yB):[]}var bB=Object.prototype,SB=bB.hasOwnProperty;function wB(e,t){return e!=null&&SB.call(e,t)}function Bt(e,t){return e!=null&&Xj(e,t,wB)}var xB="[object String]";function za(e){return typeof e=="string"||!Tr(e)&&to(e)&&Ds(e)==xB}function _B(e,t){return af(t,function(n){return e[n]})}function EB(e){return e==null?[]:_B(e,Yi(e))}var CB=Math.max;function TB(e,t,n,r){e=Za(e)?e:EB(e),n=n?xj(n):0;var i=e.length;return n<0&&(n=CB(i+n,0)),za(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Cj(e,t,n)>-1}var RB=Math.min;function AB(e,t,n){for(var r=kx,i=e[0].length,s=e.length,l=s,c=Array(s),u=1/0,d=[];l--;){var h=e[l];u=RB(h.length,u),c[l]=i>=120&&h.length>=120?new Wl(l&&h):void 0}h=e[0];var p=-1,g=c[0];e:for(;++p<i&&d.length<u;){var x=h[p],y=x;if(x=x!==0?x:0,!(g?Xd(g,y):r(d,y))){for(l=s;--l;){var T=c[l];if(!(T?Xd(T,y):r(e[l],y)))continue e}g&&g.push(y),d.push(x)}}return d}function OB(e){return Qd(e)?e:[]}var OA=By(function(e){var t=af(e,OB);return t.length&&t[0]===e[0]?AB(t):[]});function kB(e,t){return t.length<2?e:Gy(e,GV(t,0,-1))}var MB="[object Map]",jB="[object Set]",PB=Object.prototype,DB=PB.hasOwnProperty;function dr(e){if(e==null)return!0;if(Za(e)&&(Tr(e)||typeof e=="string"||typeof e.splice=="function"||Gl(e)||Rh(e)||Du(e)))return!e.length;var t=Zi(e);if(t==MB||t==jB)return!e.size;if(Th(e))return!Dj(e).length;for(var n in e)if(DB.call(e,n))return!1;return!0}function Aa(e,t){return kh(e,t)}function NB(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?kh(e,t,void 0,n):!!r}var $B="[object Number]";function oP(e){return typeof e=="number"||to(e)&&Ds(e)==$B}function Qg(e){return e==null}function sP(e){return e===void 0}var aP=Rj(function(e,t,n){nP(e,t,n)});function lP(e,t){return t=lf(t,e),e=kB(e,t),e==null||delete e[ic(rP(t))]}function IB(e){return Ia(e)?void 0:e}var zB=1,FB=2,LB=4,Jd=$j(function(e,t){var n={};if(e==null)return n;var r=!1;t=af(t,function(s){return s=lf(s,e),r||(r=s.length>1),s}),rc(e,Fx(e),n),r&&(n=$d(n,zB|FB|LB,IB));for(var i=t.length;i--;)lP(n,t[i]);return n});function qx(e,t,n,r){if(!Zt(e))return e;t=lf(t,e);for(var i=-1,s=t.length,l=s-1,c=e;c!=null&&++i<s;){var u=ic(t[i]),d=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=l){var h=c[u];d=r?r(h,u,c):void 0,d===void 0&&(d=Zt(h)?h:Uy(t[i+1])?[]:{})}qy(c,u,d),c=c[u]}return e}function cP(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var l=t[r],c=Gy(e,l);n(c,l)&&qx(s,lf(l,e),c)}return s}function VB(e,t){if(e==null)return{};var n=af(Fx(e),function(r){return[r]});return t=Ux(t),cP(e,n,function(r,i){return t(r,i[0])})}function UB(e,t){return cP(e,t,function(n,r){return Qj(e,r)})}var Bx=$j(function(e,t){return e==null?{}:UB(e,t)});function qB(e,t,n,r,i){return i(e,function(s,l,c){n=r?(r=!1,s):t(n,s,l,c)}),n}function BB(e,t,n){var r=Tr(e)?ZV:qB,i=arguments.length<3;return r(e,Ux(t),n,i,tP)}function fn(e,t,n){return e==null?e:qx(e,t,n)}function HB(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:qx(e,t,n,r)}var KB=9007199254740991,Yb=4294967295,GB=Math.min;function uP(e,t){if(e=xj(e),e<1||e>KB)return[];var n=Yb,r=GB(e,Yb);t=iP(t),e-=Yb;for(var i=Aj(r,t);++n<e;)t(n);return i}function fP(e){return Tr(e)?af(e,ic):_h(e)?[e]:Ax(Nj($x(e)))}function ZB(e,t,n){var r=Tr(e),i=r||Gl(e)||Rh(e);if(t=Ux(t),n==null){var s=e&&e.constructor;i?n=r?new s:[]:Zt(e)?n=Eh(s)?_j(Zy(e)):{}:n={}}return(i?Ox:eP)(e,function(l,c,u){return t(n,l,c,u)}),n}var WB=1/0,YB=wu&&1/Vx(new wu([,-0]))[1]==WB?function(e){return new wu(e)}:Tg,XB=200;function dP(e,t,n){var r=-1,i=kx,s=e.length,l=!0,c=[],u=c;if(s>=XB){var d=YB(e);if(d)return Vx(d);l=!1,i=Xd,u=new Wl}else u=c;e:for(;++r<s;){var h=e[r],p=h;if(h=h!==0?h:0,l&&p===p){for(var g=u.length;g--;)if(u[g]===p)continue e;c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}var QB=By(function(e){return dP(Oh(e,1,Qd,!0))});function hP(e){return e&&e.length?dP(e):[]}var JB=0;function pP(e){var t=++JB;return $x(e)+t}function eH(e,t){return e==null?!0:lP(e,t)}const Is=bL()(e=>({selectedTool:null,setSelectedTool:t=>e({selectedTool:t}),tools:{},setToolData:(t,n)=>e(r=>({tools:{...r.tools,[t]:{...r.tools[t],...n}}})),updateOpenaiObject:(t,n,r)=>e(i=>{const s=i.tools[t]?.openaiObject;return console.log("updatedOpenaiObject",s),s?(fn(s,n,r),{tools:{...i.tools,[t]:{...i.tools[t],openaiObject:s}}}):i}),getToolData:t=>n=>n.tools[t],pushOpenAiLog:(t,n)=>e(r=>({tools:{...r.tools,[t]:aP({},r.tools[t],{openaiLogs:[...r.tools[t]?.openaiLogs||[],{...n,id:crypto.randomUUID()}]})}}))})),cf=e=>{const{tools:t}=Is();return t[e]},tH=Object.freeze({status:"aborted"});function Oe(e,t,n){function r(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const d=l.prototype,h=Object.keys(d);for(let p=0;p<h.length;p++){const g=h[p];g in c||(c[g]=d[g].bind(c))}}const i=n?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:e});function l(c){var u;const d=n?.Parent?new s:this;r(d,c),(u=d._zod).deferred??(u.deferred=[]);for(const h of d._zod.deferred)h();return d}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class xu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class mP extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const gP={};function Fa(e){return gP}function nH(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function WS(e,t){return typeof t=="bigint"?t.toString():t}function Yy(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Hx(e){return e==null}function Kx(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function rH(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(i=Number.parseInt(u[1]))}const s=n>i?n:i,l=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return l%c/10**s}const kA=Symbol("evaluating");function En(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==kA)return r===void 0&&(r=kA,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function oc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sc(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function MA(e){return JSON.stringify(e)}function iH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const yP="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const oH=Yy(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function $u(e){if(eh(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(eh(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function vP(e){return $u(e)?{...e}:Array.isArray(e)?[...e]:e}const sH=new Set(["string","number","symbol"]);function Iu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wa(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function et(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function aH(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const lH={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function cH(e,t){const n=e._zod.def,r=sc(e._zod.def,{get shape(){const i={};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=n.shape[s])}return oc(this,"shape",i),i},checks:[]});return Wa(e,r)}function uH(e,t){const n=e._zod.def,r=sc(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return oc(this,"shape",i),i},checks:[]});return Wa(e,r)}function fH(e,t){if(!$u(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=sc(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return oc(this,"shape",s),s},checks:[]});return Wa(e,i)}function dH(e,t){if(!$u(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return oc(this,"shape",r),r},checks:e._zod.def.checks};return Wa(e,n)}function hH(e,t){const n=sc(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return oc(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Wa(e,n)}function pH(e,t,n){const r=sc(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=e?new e({type:"optional",innerType:i[l]}):i[l])}else for(const l in i)s[l]=e?new e({type:"optional",innerType:i[l]}):i[l];return oc(this,"shape",s),s},checks:[]});return Wa(t,r)}function mH(e,t,n){const r=sc(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)s[l]=new e({type:"nonoptional",innerType:i[l]});return oc(this,"shape",s),s},checks:[]});return Wa(t,r)}function cu(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function uu(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function um(e){return typeof e=="string"?e:e?.message}function La(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=um(e.inst?._zod.def?.error?.(e))??um(t?.error?.(e))??um(n.customError?.(e))??um(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Gx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function th(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const bP=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,WS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},SP=Oe("$ZodError",bP),wP=Oe("$ZodError",bP,{Parent:Error});function gH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function yH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(s))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return r(e),n}const Zx=e=>(t,n,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new xu;if(l.issues.length){const c=new(i?.Err??e)(l.issues.map(u=>La(u,s,Fa())));throw yP(c,i?.callee),c}return l.value},Wx=e=>async(t,n,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(i?.Err??e)(l.issues.map(u=>La(u,s,Fa())));throw yP(c,i?.callee),c}return l.value},Xy=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new xu;return s.issues.length?{success:!1,error:new(e??SP)(s.issues.map(l=>La(l,i,Fa())))}:{success:!0,data:s.value}},xP=Xy(wP),Qy=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>La(l,i,Fa())))}:{success:!0,data:s.value}},vH=Qy(wP),bH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zx(e)(t,n,i)},SH=e=>(t,n,r)=>Zx(e)(t,n,r),wH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Wx(e)(t,n,i)},xH=e=>async(t,n,r)=>Wx(e)(t,n,r),_H=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xy(e)(t,n,i)},EH=e=>(t,n,r)=>Xy(e)(t,n,r),CH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Qy(e)(t,n,i)},TH=e=>async(t,n,r)=>Qy(e)(t,n,r),RH=/^[cC][^\s-]{8,}$/,AH=/^[0-9a-z]+$/,OH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kH=/^[0-9a-vA-V]{20}$/,MH=/^[A-Za-z0-9]{27}$/,jH=/^[a-zA-Z0-9_-]{21}$/,PH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,DH=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jA=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,NH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$H="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function IH(){return new RegExp($H,"u")}const zH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,FH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,LH=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,VH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,UH=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_P=/^[A-Za-z0-9_-]*$/,qH=/^\+(?:[0-9]){6,14}[0-9]$/,EP="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",BH=new RegExp(`^${EP}$`);function CP(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function HH(e){return new RegExp(`^${CP(e)}$`)}function KH(e){const t=CP({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${EP}T(?:${r})$`)}const GH=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ZH=/^-?\d+$/,WH=/^-?\d+(?:\.\d+)?/,YH=/^(?:true|false)$/i,XH=/^null$/i,QH=/^[^A-Z]*$/,JH=/^[^a-z]*$/,gi=Oe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),TP={number:"number",bigint:"bigint",object:"date"},RP=Oe("$ZodCheckLessThan",(e,t)=>{gi.init(e,t);const n=TP[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),AP=Oe("$ZodCheckGreaterThan",(e,t)=>{gi.init(e,t);const n=TP[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eK=Oe("$ZodCheckMultipleOf",(e,t)=>{gi.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):rH(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),tK=Oe("$ZodCheckNumberFormat",(e,t)=>{gi.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,s]=lH[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=i,c.maximum=s,n&&(c.pattern=ZH)}),e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):l.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort});return}}c<i&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>s&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inst:e})}}),nK=Oe("$ZodCheckMaxLength",(e,t)=>{var n;gi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Hx(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const l=Gx(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),rK=Oe("$ZodCheckMinLength",(e,t)=>{var n;gi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Hx(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Gx(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),iK=Oe("$ZodCheckLengthEquals",(e,t)=>{var n;gi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Hx(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,s=i.length;if(s===t.length)return;const l=Gx(i),c=s>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Jy=Oe("$ZodCheckStringFormat",(e,t)=>{var n,r;gi.init(e,t),e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),oK=Oe("$ZodCheckRegex",(e,t)=>{Jy.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sK=Oe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=QH),Jy.init(e,t)}),aK=Oe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=JH),Jy.init(e,t)}),lK=Oe("$ZodCheckIncludes",(e,t)=>{gi.init(e,t);const n=Iu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),cK=Oe("$ZodCheckStartsWith",(e,t)=>{gi.init(e,t);const n=new RegExp(`^${Iu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),uK=Oe("$ZodCheckEndsWith",(e,t)=>{gi.init(e,t);const n=new RegExp(`.*${Iu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),fK=Oe("$ZodCheckOverwrite",(e,t)=>{gi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class dK{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
10
+ `).filter(l=>l),i=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(i)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,i.join(`
11
+ `))}}const hK={major:4,minor:1,patch:13},$n=Oe("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hK;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const s of i._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,c,u)=>{let d=cu(l),h;for(const p of c){if(p._zod.def.when){if(!p._zod.def.when(l))continue}else if(d)continue;const g=l.issues.length,x=p._zod.check(l);if(x instanceof Promise&&u?.async===!1)throw new xu;if(h||x instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await x,l.issues.length!==g&&(d||(d=cu(l,g)))});else{if(l.issues.length===g)continue;d||(d=cu(l,g))}}return h?h.then(()=>l):l},s=(l,c,u)=>{if(cu(l))return l.aborted=!0,l;const d=i(c,r,u);if(d instanceof Promise){if(u.async===!1)throw new xu;return d.then(h=>e._zod.parse(h,u))}return e._zod.parse(d,u)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const d=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(h=>s(h,l,c)):s(d,l,c)}const u=e._zod.parse(l,c);if(u instanceof Promise){if(c.async===!1)throw new xu;return u.then(d=>i(d,r,c))}return i(u,r,c)}}e["~standard"]={validate:i=>{try{const s=xP(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return vH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),Yx=Oe("$ZodString",(e,t)=>{$n.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??GH(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),qn=Oe("$ZodStringFormat",(e,t)=>{Jy.init(e,t),Yx.init(e,t)}),pK=Oe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=DH),qn.init(e,t)}),mK=Oe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=jA(r))}else t.pattern??(t.pattern=jA());qn.init(e,t)}),gK=Oe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=NH),qn.init(e,t)}),yK=Oe("$ZodURL",(e,t)=>{qn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),vK=Oe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=IH()),qn.init(e,t)}),bK=Oe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jH),qn.init(e,t)}),SK=Oe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=RH),qn.init(e,t)}),wK=Oe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=AH),qn.init(e,t)}),xK=Oe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=OH),qn.init(e,t)}),_K=Oe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=kH),qn.init(e,t)}),EK=Oe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=MH),qn.init(e,t)}),CK=Oe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=KH(t)),qn.init(e,t)}),TK=Oe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=BH),qn.init(e,t)}),RK=Oe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=HH(t)),qn.init(e,t)}),AK=Oe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=PH),qn.init(e,t)}),OK=Oe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zH),qn.init(e,t),e._zod.bag.format="ipv4"}),kK=Oe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=FH),qn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),MK=Oe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=LH),qn.init(e,t)}),jK=Oe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=VH),qn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,s]=r;if(!s)throw new Error;const l=Number(s);if(`${l}`!==s)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function OP(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const PK=Oe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=UH),qn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{OP(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function DK(e){if(!_P.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return OP(n)}const NK=Oe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=_P),qn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{DK(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),$K=Oe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=qH),qn.init(e,t)});function IK(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const zK=Oe("$ZodJWT",(e,t)=>{qn.init(e,t),e._zod.check=n=>{IK(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),kP=Oe("$ZodNumber",(e,t)=>{$n.init(e,t),e._zod.pattern=e._zod.bag.pattern??WH,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),n}}),FK=Oe("$ZodNumberFormat",(e,t)=>{tK.init(e,t),kP.init(e,t)}),LK=Oe("$ZodBoolean",(e,t)=>{$n.init(e,t),e._zod.pattern=YH,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),VK=Oe("$ZodNull",(e,t)=>{$n.init(e,t),e._zod.pattern=XH,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),UK=Oe("$ZodAny",(e,t)=>{$n.init(e,t),e._zod.parse=n=>n}),qK=Oe("$ZodUnknown",(e,t)=>{$n.init(e,t),e._zod.parse=n=>n}),BK=Oe("$ZodNever",(e,t)=>{$n.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function PA(e,t,n){e.issues.length&&t.issues.push(...uu(n,e.issues)),t.value[n]=e.value}const HK=Oe("$ZodArray",(e,t)=>{$n.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const s=[];for(let l=0;l<i.length;l++){const c=i[l],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?s.push(u.then(d=>PA(d,n,l))):PA(u,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function Jg(e,t,n,r){e.issues.length&&t.issues.push(...uu(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function MP(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=aH(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function jP(e,t,n,r,i,s){const l=[],c=i.keySet,u=i.catchall._zod,d=u.def.type;for(const h in t){if(c.has(h))continue;if(d==="never"){l.push(h);continue}const p=u.run({value:t[h],issues:[]},r);p instanceof Promise?e.push(p.then(g=>Jg(g,n,h,t))):Jg(p,n,h,t)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const KK=Oe("$ZodObject",(e,t)=>{if($n.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=Yy(()=>MP(t));En(e._zod,"propValues",()=>{const c=t.shape,u={};for(const d in c){const h=c[d]._zod;if(h.values){u[d]??(u[d]=new Set);for(const p of h.values)u[d].add(p)}}return u});const i=eh,s=t.catchall;let l;e._zod.parse=(c,u)=>{l??(l=r.value);const d=c.value;if(!i(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const h=[],p=l.shape;for(const g of l.keys){const y=p[g]._zod.run({value:d[g],issues:[]},u);y instanceof Promise?h.push(y.then(T=>Jg(T,c,g,d))):Jg(y,c,g,d)}return s?jP(h,d,c,u,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),GK=Oe("$ZodObjectJIT",(e,t)=>{KK.init(e,t);const n=e._zod.parse,r=Yy(()=>MP(t)),i=g=>{const x=new dK(["shape","payload","ctx"]),y=r.value,T=E=>{const b=MA(E);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};x.write("const input = payload.value;");const w=Object.create(null);let S=0;for(const E of y.keys)w[E]=`key_${S++}`;x.write("const newResult = {};");for(const E of y.keys){const b=w[E],C=MA(E);x.write(`const ${b} = ${T(E)};`),x.write(`
12
+ if (${b}.issues.length) {
13
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
14
+ ...iss,
15
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
16
+ })));
17
+ }
18
+
19
+
20
+ if (${b}.value === undefined) {
21
+ if (${C} in input) {
22
+ newResult[${C}] = undefined;
23
+ }
24
+ } else {
25
+ newResult[${C}] = ${b}.value;
26
+ }
27
+
28
+ `)}x.write("payload.value = newResult;"),x.write("return payload;");const v=x.compile();return(E,b)=>v(g,E,b)};let s;const l=eh,c=!gP.jitless,d=c&&oH.value,h=t.catchall;let p;e._zod.parse=(g,x)=>{p??(p=r.value);const y=g.value;return l(y)?c&&d&&x?.async===!1&&x.jitless!==!0?(s||(s=i(t.shape)),g=s(g,x),h?jP([],y,g,x,p,e):g):n(g,x):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function DA(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!cu(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(l=>La(l,r,Fa())))}),t)}const PP=Oe("$ZodUnion",(e,t)=>{$n.init(e,t),En(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),En(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),En(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),En(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Kx(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(n)return r(i,s);let l=!1;const c=[];for(const u of t.options){const d=u._zod.run({value:i.value,issues:[]},s);if(d instanceof Promise)c.push(d),l=!0;else{if(d.issues.length===0)return d;c.push(d)}}return l?Promise.all(c).then(u=>DA(u,i,e,s)):DA(c,i,e,s)}}),ZK=Oe("$ZodDiscriminatedUnion",(e,t)=>{PP.init(e,t);const n=e._zod.parse;En(e._zod,"propValues",()=>{const i={};for(const s of t.options){const l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[c,u]of Object.entries(l)){i[c]||(i[c]=new Set);for(const d of u)i[c].add(d)}}return i});const r=Yy(()=>{const i=t.options,s=new Map;for(const l of i){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const u of c){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,l)}}return s});e._zod.parse=(i,s)=>{const l=i.value;if(!eh(l))return i.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),i;const c=r.value.get(l?.[t.discriminator]);return c?c._zod.run(i,s):t.unionFallback?n(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),i)}}),WK=Oe("$ZodIntersection",(e,t)=>{$n.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,s=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([u,d])=>NA(n,u,d)):NA(n,s,l)}});function YS(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($u(e)&&$u(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),i={...e,...t};for(const s of r){const l=YS(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};i[s]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=t[r],l=YS(i,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function NA(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),cu(e))return e;const r=YS(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const YK=Oe("$ZodRecord",(e,t)=>{$n.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!$u(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const s=[],l=t.keyType._zod.values;if(l){n.value={};const c=new Set;for(const d of l)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){c.add(typeof d=="number"?d.toString():d);const h=t.valueType._zod.run({value:i[d],issues:[]},r);h instanceof Promise?s.push(h.then(p=>{p.issues.length&&n.issues.push(...uu(d,p.issues)),n.value[d]=p.value})):(h.issues.length&&n.issues.push(...uu(d,h.issues)),n.value[d]=h.value)}let u;for(const d in i)c.has(d)||(u=u??[],u.push(d));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u})}else{n.value={};for(const c of Reflect.ownKeys(i)){if(c==="__proto__")continue;const u=t.keyType._zod.run({value:c,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(h=>La(h,r,Fa())),input:c,path:[c],inst:e}),n.value[u.value]=u.value;continue}const d=t.valueType._zod.run({value:i[c],issues:[]},r);d instanceof Promise?s.push(d.then(h=>{h.issues.length&&n.issues.push(...uu(c,h.issues)),n.value[u.value]=h.value})):(d.issues.length&&n.issues.push(...uu(c,d.issues)),n.value[u.value]=d.value)}}return s.length?Promise.all(s).then(()=>n):n}}),XK=Oe("$ZodEnum",(e,t)=>{$n.init(e,t);const n=nH(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>sH.has(typeof i)).map(i=>typeof i=="string"?Iu(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),QK=Oe("$ZodLiteral",(e,t)=>{if($n.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Iu(r):r?Iu(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),JK=Oe("$ZodTransform",(e,t)=>{$n.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new mP(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new xu;return n.value=i,n}});function $A(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const eG=Oe("$ZodOptional",(e,t)=>{$n.init(e,t),e._zod.optin="optional",e._zod.optout="optional",En(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),En(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Kx(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>$A(s,n.value)):$A(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),tG=Oe("$ZodNullable",(e,t)=>{$n.init(e,t),En(e._zod,"optin",()=>t.innerType._zod.optin),En(e._zod,"optout",()=>t.innerType._zod.optout),En(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Kx(n.source)}|null)$`):void 0}),En(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),nG=Oe("$ZodDefault",(e,t)=>{$n.init(e,t),e._zod.optin="optional",En(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>IA(s,t)):IA(i,t)}});function IA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const rG=Oe("$ZodPrefault",(e,t)=>{$n.init(e,t),e._zod.optin="optional",En(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),iG=Oe("$ZodNonOptional",(e,t)=>{$n.init(e,t),En(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>zA(s,e)):zA(i,e)}});function zA(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const oG=Oe("$ZodCatch",(e,t)=>{$n.init(e,t),En(e._zod,"optin",()=>t.innerType._zod.optin),En(e._zod,"optout",()=>t.innerType._zod.optout),En(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>La(l,r,Fa()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>La(s,r,Fa()))},input:n.value}),n.issues=[]),n)}}),sG=Oe("$ZodPipe",(e,t)=>{$n.init(e,t),En(e._zod,"values",()=>t.in._zod.values),En(e._zod,"optin",()=>t.in._zod.optin),En(e._zod,"optout",()=>t.out._zod.optout),En(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(l=>fm(l,t.in,r)):fm(s,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(s=>fm(s,t.out,r)):fm(i,t.out,r)}});function fm(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const aG=Oe("$ZodReadonly",(e,t)=>{$n.init(e,t),En(e._zod,"propValues",()=>t.innerType._zod.propValues),En(e._zod,"values",()=>t.innerType._zod.values),En(e._zod,"optin",()=>t.innerType?._zod?.optin),En(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(FA):FA(i)}});function FA(e){return e.value=Object.freeze(e.value),e}const lG=Oe("$ZodCustom",(e,t)=>{gi.init(e,t),$n.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(s=>LA(s,n,r,e));LA(i,n,r,e)}});function LA(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(th(i))}}var VA;class cG{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function uG(){return new cG}(VA=globalThis).__zod_globalRegistry??(VA.__zod_globalRegistry=uG());const dm=globalThis.__zod_globalRegistry;function fG(e,t){return new e({type:"string",...et(t)})}function dG(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...et(t)})}function UA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...et(t)})}function hG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...et(t)})}function pG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...et(t)})}function mG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...et(t)})}function gG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...et(t)})}function DP(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...et(t)})}function yG(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...et(t)})}function vG(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...et(t)})}function bG(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...et(t)})}function SG(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...et(t)})}function wG(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...et(t)})}function xG(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...et(t)})}function _G(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...et(t)})}function EG(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...et(t)})}function CG(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...et(t)})}function TG(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...et(t)})}function RG(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...et(t)})}function AG(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...et(t)})}function OG(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...et(t)})}function kG(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...et(t)})}function MG(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...et(t)})}function jG(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...et(t)})}function PG(e,t){return new e({type:"string",format:"date",check:"string_format",...et(t)})}function DG(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...et(t)})}function NG(e,t){return new e({type:"string",format:"duration",check:"string_format",...et(t)})}function $G(e,t){return new e({type:"number",checks:[],...et(t)})}function IG(e,t){return new e({type:"number",coerce:!0,checks:[],...et(t)})}function zG(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...et(t)})}function FG(e,t){return new e({type:"boolean",...et(t)})}function LG(e,t){return new e({type:"null",...et(t)})}function VG(e){return new e({type:"any"})}function UG(e){return new e({type:"unknown"})}function qG(e,t){return new e({type:"never",...et(t)})}function qA(e,t){return new RP({check:"less_than",...et(t),value:e,inclusive:!1})}function Xb(e,t){return new RP({check:"less_than",...et(t),value:e,inclusive:!0})}function BA(e,t){return new AP({check:"greater_than",...et(t),value:e,inclusive:!1})}function Qb(e,t){return new AP({check:"greater_than",...et(t),value:e,inclusive:!0})}function HA(e,t){return new eK({check:"multiple_of",...et(t),value:e})}function NP(e,t){return new nK({check:"max_length",...et(t),maximum:e})}function ey(e,t){return new rK({check:"min_length",...et(t),minimum:e})}function $P(e,t){return new iK({check:"length_equals",...et(t),length:e})}function BG(e,t){return new oK({check:"string_format",format:"regex",...et(t),pattern:e})}function HG(e){return new sK({check:"string_format",format:"lowercase",...et(e)})}function KG(e){return new aK({check:"string_format",format:"uppercase",...et(e)})}function GG(e,t){return new lK({check:"string_format",format:"includes",...et(t),includes:e})}function ZG(e,t){return new cK({check:"string_format",format:"starts_with",...et(t),prefix:e})}function WG(e,t){return new uK({check:"string_format",format:"ends_with",...et(t),suffix:e})}function uf(e){return new fK({check:"overwrite",tx:e})}function YG(e){return uf(t=>t.normalize(e))}function XG(){return uf(e=>e.trim())}function QG(){return uf(e=>e.toLowerCase())}function JG(){return uf(e=>e.toUpperCase())}function eZ(){return uf(e=>iH(e))}function tZ(e,t,n){return new e({type:"array",element:t,...et(n)})}function nZ(e,t,n){const r=et(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function rZ(e,t,n){return new e({type:"custom",check:"custom",fn:t,...et(n)})}function iZ(e){const t=oZ(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(th(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(th(i))}},e(n.value,n)));return t}function oZ(e,t){const n=new gi({check:"custom",...et(t)});return n._zod.check=e,n}function e0(e){return!!e._zod}function xa(e,t){return e0(e)?xP(e,t):e.safeParse(t)}function IP(e){var t,n;if(!e)return;let r;if(e0(e)?r=(n=(t=e._zod)===null||t===void 0?void 0:t.def)===null||n===void 0?void 0:n.shape:r=e.shape,!!r){if(typeof r=="function")try{return r()}catch{return}return r}}function sZ(e){var t;if(e0(e)){const l=(t=e._zod)===null||t===void 0?void 0:t.def;if(l){if(l.value!==void 0)return l.value;if(Array.isArray(l.values)&&l.values.length>0)return l.values[0]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const i=e.value;if(i!==void 0)return i}const aZ=Oe("ZodISODateTime",(e,t)=>{CK.init(e,t),Gn.init(e,t)});function zP(e){return jG(aZ,e)}const lZ=Oe("ZodISODate",(e,t)=>{TK.init(e,t),Gn.init(e,t)});function cZ(e){return PG(lZ,e)}const uZ=Oe("ZodISOTime",(e,t)=>{RK.init(e,t),Gn.init(e,t)});function fZ(e){return DG(uZ,e)}const dZ=Oe("ZodISODuration",(e,t)=>{AK.init(e,t),Gn.init(e,t)});function hZ(e){return NG(dZ,e)}const pZ=(e,t)=>{SP.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>yH(e,n)},flatten:{value:n=>gH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,WS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,WS,2)}},isEmpty:{get(){return e.issues.length===0}}})},io=Oe("ZodError",pZ,{Parent:Error}),mZ=Zx(io),gZ=Wx(io),yZ=Xy(io),vZ=Qy(io),bZ=bH(io),SZ=SH(io),wZ=wH(io),xZ=xH(io),_Z=_H(io),EZ=EH(io),CZ=CH(io),TZ=TH(io),Bn=Oe("ZodType",(e,t)=>($n.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(sc(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>Wa(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>mZ(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>yZ(e,n,r),e.parseAsync=async(n,r)=>gZ(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>vZ(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>bZ(e,n,r),e.decode=(n,r)=>SZ(e,n,r),e.encodeAsync=async(n,r)=>wZ(e,n,r),e.decodeAsync=async(n,r)=>xZ(e,n,r),e.safeEncode=(n,r)=>_Z(e,n,r),e.safeDecode=(n,r)=>EZ(e,n,r),e.safeEncodeAsync=async(n,r)=>CZ(e,n,r),e.safeDecodeAsync=async(n,r)=>TZ(e,n,r),e.refine=(n,r)=>e.check(yW(n,r)),e.superRefine=n=>e.check(vW(n)),e.overwrite=n=>e.check(uf(n)),e.optional=()=>st(e),e.nullable=()=>ZA(e),e.nullish=()=>st(ZA(e)),e.nonoptional=n=>uW(e,n),e.array=()=>Ze(e),e.or=n=>Hn([e,n]),e.and=n=>Qx(e,n),e.transform=n=>QS(e,HP(n)),e.default=n=>aW(e,n),e.prefault=n=>cW(e,n),e.catch=n=>dW(e,n),e.pipe=n=>QS(e,n),e.readonly=()=>mW(e),e.describe=n=>{const r=e.clone();return dm.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return dm.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return dm.get(e);const r=e.clone();return dm.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),FP=Oe("_ZodString",(e,t)=>{Yx.init(e,t),Bn.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(BG(...r)),e.includes=(...r)=>e.check(GG(...r)),e.startsWith=(...r)=>e.check(ZG(...r)),e.endsWith=(...r)=>e.check(WG(...r)),e.min=(...r)=>e.check(ey(...r)),e.max=(...r)=>e.check(NP(...r)),e.length=(...r)=>e.check($P(...r)),e.nonempty=(...r)=>e.check(ey(1,...r)),e.lowercase=r=>e.check(HG(r)),e.uppercase=r=>e.check(KG(r)),e.trim=()=>e.check(XG()),e.normalize=(...r)=>e.check(YG(...r)),e.toLowerCase=()=>e.check(QG()),e.toUpperCase=()=>e.check(JG()),e.slugify=()=>e.check(eZ())}),RZ=Oe("ZodString",(e,t)=>{Yx.init(e,t),FP.init(e,t),e.email=n=>e.check(dG(AZ,n)),e.url=n=>e.check(DP(LP,n)),e.jwt=n=>e.check(MG(BZ,n)),e.emoji=n=>e.check(yG(kZ,n)),e.guid=n=>e.check(UA(KA,n)),e.uuid=n=>e.check(hG(hm,n)),e.uuidv4=n=>e.check(pG(hm,n)),e.uuidv6=n=>e.check(mG(hm,n)),e.uuidv7=n=>e.check(gG(hm,n)),e.nanoid=n=>e.check(vG(MZ,n)),e.guid=n=>e.check(UA(KA,n)),e.cuid=n=>e.check(bG(jZ,n)),e.cuid2=n=>e.check(SG(PZ,n)),e.ulid=n=>e.check(wG(DZ,n)),e.base64=n=>e.check(AG(VZ,n)),e.base64url=n=>e.check(OG(UZ,n)),e.xid=n=>e.check(xG(NZ,n)),e.ksuid=n=>e.check(_G($Z,n)),e.ipv4=n=>e.check(EG(IZ,n)),e.ipv6=n=>e.check(CG(zZ,n)),e.cidrv4=n=>e.check(TG(FZ,n)),e.cidrv6=n=>e.check(RG(LZ,n)),e.e164=n=>e.check(kG(qZ,n)),e.datetime=n=>e.check(zP(n)),e.date=n=>e.check(cZ(n)),e.time=n=>e.check(fZ(n)),e.duration=n=>e.check(hZ(n))});function de(e){return fG(RZ,e)}const Gn=Oe("ZodStringFormat",(e,t)=>{qn.init(e,t),FP.init(e,t)}),AZ=Oe("ZodEmail",(e,t)=>{gK.init(e,t),Gn.init(e,t)}),KA=Oe("ZodGUID",(e,t)=>{pK.init(e,t),Gn.init(e,t)}),hm=Oe("ZodUUID",(e,t)=>{mK.init(e,t),Gn.init(e,t)}),LP=Oe("ZodURL",(e,t)=>{yK.init(e,t),Gn.init(e,t)});function OZ(e){return DP(LP,e)}const kZ=Oe("ZodEmoji",(e,t)=>{vK.init(e,t),Gn.init(e,t)}),MZ=Oe("ZodNanoID",(e,t)=>{bK.init(e,t),Gn.init(e,t)}),jZ=Oe("ZodCUID",(e,t)=>{SK.init(e,t),Gn.init(e,t)}),PZ=Oe("ZodCUID2",(e,t)=>{wK.init(e,t),Gn.init(e,t)}),DZ=Oe("ZodULID",(e,t)=>{xK.init(e,t),Gn.init(e,t)}),NZ=Oe("ZodXID",(e,t)=>{_K.init(e,t),Gn.init(e,t)}),$Z=Oe("ZodKSUID",(e,t)=>{EK.init(e,t),Gn.init(e,t)}),IZ=Oe("ZodIPv4",(e,t)=>{OK.init(e,t),Gn.init(e,t)}),zZ=Oe("ZodIPv6",(e,t)=>{kK.init(e,t),Gn.init(e,t)}),FZ=Oe("ZodCIDRv4",(e,t)=>{MK.init(e,t),Gn.init(e,t)}),LZ=Oe("ZodCIDRv6",(e,t)=>{jK.init(e,t),Gn.init(e,t)}),VZ=Oe("ZodBase64",(e,t)=>{PK.init(e,t),Gn.init(e,t)}),UZ=Oe("ZodBase64URL",(e,t)=>{NK.init(e,t),Gn.init(e,t)}),qZ=Oe("ZodE164",(e,t)=>{$K.init(e,t),Gn.init(e,t)}),BZ=Oe("ZodJWT",(e,t)=>{zK.init(e,t),Gn.init(e,t)}),Xx=Oe("ZodNumber",(e,t)=>{kP.init(e,t),Bn.init(e,t),e.gt=(r,i)=>e.check(BA(r,i)),e.gte=(r,i)=>e.check(Qb(r,i)),e.min=(r,i)=>e.check(Qb(r,i)),e.lt=(r,i)=>e.check(qA(r,i)),e.lte=(r,i)=>e.check(Xb(r,i)),e.max=(r,i)=>e.check(Xb(r,i)),e.int=r=>e.check(GA(r)),e.safe=r=>e.check(GA(r)),e.positive=r=>e.check(BA(0,r)),e.nonnegative=r=>e.check(Qb(0,r)),e.negative=r=>e.check(qA(0,r)),e.nonpositive=r=>e.check(Xb(0,r)),e.multipleOf=(r,i)=>e.check(HA(r,i)),e.step=(r,i)=>e.check(HA(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function wn(e){return $G(Xx,e)}const HZ=Oe("ZodNumberFormat",(e,t)=>{FK.init(e,t),Xx.init(e,t)});function GA(e){return zG(HZ,e)}const KZ=Oe("ZodBoolean",(e,t)=>{LK.init(e,t),Bn.init(e,t)});function Vn(e){return FG(KZ,e)}const GZ=Oe("ZodNull",(e,t)=>{VK.init(e,t),Bn.init(e,t)});function VP(e){return LG(GZ,e)}const ZZ=Oe("ZodAny",(e,t)=>{UK.init(e,t),Bn.init(e,t)});function WZ(){return VG(ZZ)}const YZ=Oe("ZodUnknown",(e,t)=>{qK.init(e,t),Bn.init(e,t)});function _r(){return UG(YZ)}const XZ=Oe("ZodNever",(e,t)=>{BK.init(e,t),Bn.init(e,t)});function QZ(e){return qG(XZ,e)}const JZ=Oe("ZodArray",(e,t)=>{HK.init(e,t),Bn.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(ey(n,r)),e.nonempty=n=>e.check(ey(1,n)),e.max=(n,r)=>e.check(NP(n,r)),e.length=(n,r)=>e.check($P(n,r)),e.unwrap=()=>e.element});function Ze(e,t){return tZ(JZ,e,t)}const UP=Oe("ZodObject",(e,t)=>{GK.init(e,t),Bn.init(e,t),En(e,"shape",()=>t.shape),e.keyof=()=>Zr(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_r()}),e.loose=()=>e.clone({...e._zod.def,catchall:_r()}),e.strict=()=>e.clone({...e._zod.def,catchall:QZ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>fH(e,n),e.safeExtend=n=>dH(e,n),e.merge=n=>hH(e,n),e.pick=n=>cH(e,n),e.omit=n=>uH(e,n),e.partial=(...n)=>pH(KP,e,n[0]),e.required=(...n)=>mH(GP,e,n[0])});function Le(e,t){const n={type:"object",shape:e??{},...et(t)};return new UP(n)}function mi(e,t){return new UP({type:"object",shape:e,catchall:_r(),...et(t)})}const qP=Oe("ZodUnion",(e,t)=>{PP.init(e,t),Bn.init(e,t),e.options=t.options});function Hn(e,t){return new qP({type:"union",options:e,...et(t)})}const eW=Oe("ZodDiscriminatedUnion",(e,t)=>{qP.init(e,t),ZK.init(e,t)});function BP(e,t,n){return new eW({type:"union",options:t,discriminator:e,...et(n)})}const tW=Oe("ZodIntersection",(e,t)=>{WK.init(e,t),Bn.init(e,t)});function Qx(e,t){return new tW({type:"intersection",left:e,right:t})}const nW=Oe("ZodRecord",(e,t)=>{YK.init(e,t),Bn.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Er(e,t,n){return new nW({type:"record",keyType:e,valueType:t,...et(n)})}const XS=Oe("ZodEnum",(e,t)=>{XK.init(e,t),Bn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new XS({...t,checks:[],...et(i),entries:s})},e.exclude=(r,i)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new XS({...t,checks:[],...et(i),entries:s})}});function Zr(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new XS({type:"enum",entries:n,...et(t)})}const rW=Oe("ZodLiteral",(e,t)=>{QK.init(e,t),Bn.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function it(e,t){return new rW({type:"literal",values:Array.isArray(e)?e:[e],...et(t)})}const iW=Oe("ZodTransform",(e,t)=>{JK.init(e,t),Bn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new mP(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(th(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(th(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n)):(n.value=i,n)}});function HP(e){return new iW({type:"transform",transform:e})}const KP=Oe("ZodOptional",(e,t)=>{eG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function st(e){return new KP({type:"optional",innerType:e})}const oW=Oe("ZodNullable",(e,t)=>{tG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ZA(e){return new oW({type:"nullable",innerType:e})}const sW=Oe("ZodDefault",(e,t)=>{nG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function aW(e,t){return new sW({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():vP(t)}})}const lW=Oe("ZodPrefault",(e,t)=>{rG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function cW(e,t){return new lW({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():vP(t)}})}const GP=Oe("ZodNonOptional",(e,t)=>{iG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function uW(e,t){return new GP({type:"nonoptional",innerType:e,...et(t)})}const fW=Oe("ZodCatch",(e,t)=>{oG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dW(e,t){return new fW({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const hW=Oe("ZodPipe",(e,t)=>{sG.init(e,t),Bn.init(e,t),e.in=t.in,e.out=t.out});function QS(e,t){return new hW({type:"pipe",in:e,out:t})}const pW=Oe("ZodReadonly",(e,t)=>{aG.init(e,t),Bn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function mW(e){return new pW({type:"readonly",innerType:e})}const ZP=Oe("ZodCustom",(e,t)=>{lG.init(e,t),Bn.init(e,t)});function gW(e,t){return nZ(ZP,e??(()=>!0),t)}function yW(e,t={}){return rZ(ZP,e,t)}function vW(e){return iZ(e)}function WP(e,t){return QS(HP(e),t)}const bW={custom:"custom"};function SW(e){return IG(Xx,e)}const t0="2025-11-25",wW=[t0,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Es="io.modelcontextprotocol/related-task",n0="2.0",Uo=gW(e=>e!==null&&(typeof e=="object"||typeof e=="function")),YP=Hn([de(),wn().int()]),XP=de(),xW=mi({ttl:Hn([wn(),VP()]).optional(),pollInterval:wn().optional()}),Jx=mi({taskId:de()}),_W=mi({progressToken:YP.optional(),[Es]:Jx.optional()}),yi=mi({task:xW.optional(),_meta:_W.optional()}),qr=Le({method:de(),params:yi.optional()}),ac=mi({_meta:Le({[Es]:st(Jx)}).passthrough().optional()}),oo=Le({method:de(),params:ac.optional()}),Wr=mi({_meta:mi({[Es]:Jx.optional()}).optional()}),r0=Hn([de(),wn().int()]),QP=Le({jsonrpc:it(n0),id:r0,...qr.shape}).strict(),JS=e=>QP.safeParse(e).success,JP=Le({jsonrpc:it(n0),...oo.shape}).strict(),EW=e=>JP.safeParse(e).success,e4=Le({jsonrpc:it(n0),id:r0,result:Wr}).strict(),Td=e=>e4.safeParse(e).success;var _t;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(_t||(_t={}));const t4=Le({jsonrpc:it(n0),id:r0,error:Le({code:wn().int(),message:de(),data:st(_r())})}).strict(),CW=e=>t4.safeParse(e).success,Jb=Hn([QP,JP,e4,t4]),fu=Wr.strict(),TW=ac.extend({requestId:r0,reason:de().optional()}),e_=oo.extend({method:it("notifications/cancelled"),params:TW}),RW=Le({src:de(),mimeType:de().optional(),sizes:Ze(de()).optional()}),Mh=Le({icons:Ze(RW).optional()}),zu=Le({name:de(),title:de().optional()}),n4=zu.extend({...zu.shape,...Mh.shape,version:de(),websiteUrl:de().optional()}),AW=Qx(Le({applyDefaults:Vn().optional()}),Er(de(),_r())),OW=WP(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Qx(Le({form:AW.optional(),url:Uo.optional()}),Er(de(),_r()).optional())),kW=Le({list:st(Le({}).passthrough()),cancel:st(Le({}).passthrough()),requests:st(Le({sampling:st(Le({createMessage:st(Le({}).passthrough())}).passthrough()),elicitation:st(Le({create:st(Le({}).passthrough())}).passthrough())}).passthrough())}).passthrough(),MW=Le({list:st(Le({}).passthrough()),cancel:st(Le({}).passthrough()),requests:st(Le({tools:st(Le({call:st(Le({}).passthrough())}).passthrough())}).passthrough())}).passthrough(),jW=Le({experimental:Er(de(),Uo).optional(),sampling:Le({context:Uo.optional(),tools:Uo.optional()}).optional(),elicitation:OW.optional(),roots:Le({listChanged:Vn().optional()}).optional(),tasks:st(kW)}),PW=yi.extend({protocolVersion:de(),capabilities:jW,clientInfo:n4}),DW=qr.extend({method:it("initialize"),params:PW}),NW=Le({experimental:Er(de(),Uo).optional(),logging:Uo.optional(),completions:Uo.optional(),prompts:st(Le({listChanged:st(Vn())})),resources:Le({subscribe:Vn().optional(),listChanged:Vn().optional()}).optional(),tools:Le({listChanged:Vn().optional()}).optional(),tasks:st(MW)}).passthrough(),r4=Wr.extend({protocolVersion:de(),capabilities:NW,serverInfo:n4,instructions:de().optional()}),i4=oo.extend({method:it("notifications/initialized")}),$W=e=>i4.safeParse(e).success,t_=qr.extend({method:it("ping")}),IW=Le({progress:wn(),total:st(wn()),message:st(de())}),zW=Le({...ac.shape,...IW.shape,progressToken:YP}),n_=oo.extend({method:it("notifications/progress"),params:zW}),FW=yi.extend({cursor:XP.optional()}),jh=qr.extend({params:FW.optional()}),Ph=Wr.extend({nextCursor:st(XP)}),Dh=Le({taskId:de(),status:Zr(["working","input_required","completed","failed","cancelled"]),ttl:Hn([wn(),VP()]),createdAt:de(),lastUpdatedAt:de(),pollInterval:st(wn()),statusMessage:st(de())}),nh=Wr.extend({task:Dh}),LW=ac.merge(Dh),ty=oo.extend({method:it("notifications/tasks/status"),params:LW}),r_=qr.extend({method:it("tasks/get"),params:yi.extend({taskId:de()})}),i_=Wr.merge(Dh),o_=qr.extend({method:it("tasks/result"),params:yi.extend({taskId:de()})}),s_=jh.extend({method:it("tasks/list")}),a_=Ph.extend({tasks:Ze(Dh)}),VW=qr.extend({method:it("tasks/cancel"),params:yi.extend({taskId:de()})}),UW=Wr.merge(Dh),o4=Le({uri:de(),mimeType:st(de()),_meta:Er(de(),_r()).optional()}),s4=o4.extend({text:de()}),l_=de().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),a4=o4.extend({blob:l_}),ff=Le({audience:Ze(Zr(["user","assistant"])).optional(),priority:wn().min(0).max(1).optional(),lastModified:zP({offset:!0}).optional()}),l4=Le({...zu.shape,...Mh.shape,uri:de(),description:st(de()),mimeType:st(de()),annotations:ff.optional(),_meta:st(mi({}))}),qW=Le({...zu.shape,...Mh.shape,uriTemplate:de(),description:st(de()),mimeType:st(de()),annotations:ff.optional(),_meta:st(mi({}))}),BW=jh.extend({method:it("resources/list")}),c4=Ph.extend({resources:Ze(l4)}),HW=jh.extend({method:it("resources/templates/list")}),u4=Ph.extend({resourceTemplates:Ze(qW)}),c_=yi.extend({uri:de()}),KW=c_,GW=qr.extend({method:it("resources/read"),params:KW}),f4=Wr.extend({contents:Ze(Hn([s4,a4]))}),ZW=oo.extend({method:it("notifications/resources/list_changed")}),WW=c_,YW=qr.extend({method:it("resources/subscribe"),params:WW}),XW=c_,QW=qr.extend({method:it("resources/unsubscribe"),params:XW}),JW=ac.extend({uri:de()}),eY=oo.extend({method:it("notifications/resources/updated"),params:JW}),tY=Le({name:de(),description:st(de()),required:st(Vn())}),nY=Le({...zu.shape,...Mh.shape,description:st(de()),arguments:st(Ze(tY)),_meta:st(mi({}))}),rY=jh.extend({method:it("prompts/list")}),d4=Ph.extend({prompts:Ze(nY)}),iY=yi.extend({name:de(),arguments:Er(de(),de()).optional()}),oY=qr.extend({method:it("prompts/get"),params:iY}),u_=Le({type:it("text"),text:de(),annotations:ff.optional(),_meta:Er(de(),_r()).optional()}),f_=Le({type:it("image"),data:l_,mimeType:de(),annotations:ff.optional(),_meta:Er(de(),_r()).optional()}),d_=Le({type:it("audio"),data:l_,mimeType:de(),annotations:ff.optional(),_meta:Er(de(),_r()).optional()}),sY=Le({type:it("tool_use"),name:de(),id:de(),input:Le({}).passthrough(),_meta:st(Le({}).passthrough())}).passthrough(),aY=Le({type:it("resource"),resource:Hn([s4,a4]),annotations:ff.optional(),_meta:Er(de(),_r()).optional()}),lY=l4.extend({type:it("resource_link")}),h_=Hn([u_,f_,d_,lY,aY]),cY=Le({role:Zr(["user","assistant"]),content:h_}),h4=Wr.extend({description:st(de()),messages:Ze(cY)}),uY=oo.extend({method:it("notifications/prompts/list_changed")}),fY=Le({title:de().optional(),readOnlyHint:Vn().optional(),destructiveHint:Vn().optional(),idempotentHint:Vn().optional(),openWorldHint:Vn().optional()}),dY=Le({taskSupport:Zr(["required","optional","forbidden"]).optional()}),p4=Le({...zu.shape,...Mh.shape,description:de().optional(),inputSchema:Le({type:it("object"),properties:Er(de(),Uo).optional(),required:Ze(de()).optional()}).catchall(_r()),outputSchema:Le({type:it("object"),properties:Er(de(),Uo).optional(),required:Ze(de()).optional()}).catchall(_r()).optional(),annotations:st(fY),execution:st(dY),_meta:Er(de(),_r()).optional()}),hY=jh.extend({method:it("tools/list")}),m4=Ph.extend({tools:Ze(p4)}),i0=Wr.extend({content:Ze(h_).default([]),structuredContent:Er(de(),_r()).optional(),isError:st(Vn())});i0.or(Wr.extend({toolResult:_r()}));const pY=yi.extend({name:de(),arguments:st(Er(de(),_r()))}),mY=qr.extend({method:it("tools/call"),params:pY}),gY=oo.extend({method:it("notifications/tools/list_changed")}),g4=Zr(["debug","info","notice","warning","error","critical","alert","emergency"]),yY=yi.extend({level:g4}),vY=qr.extend({method:it("logging/setLevel"),params:yY}),bY=ac.extend({level:g4,logger:de().optional(),data:_r()}),SY=oo.extend({method:it("notifications/message"),params:bY}),wY=Le({name:de().optional()}),xY=Le({hints:st(Ze(wY)),costPriority:st(wn().min(0).max(1)),speedPriority:st(wn().min(0).max(1)),intelligencePriority:st(wn().min(0).max(1))}),_Y=Le({mode:st(Zr(["auto","required","none"]))}),EY=Le({type:it("tool_result"),toolUseId:de().describe("The unique identifier for the corresponding tool call."),content:Ze(h_).default([]),structuredContent:Le({}).passthrough().optional(),isError:st(Vn()),_meta:st(Le({}).passthrough())}).passthrough(),CY=BP("type",[u_,f_,d_]),ny=BP("type",[u_,f_,d_,sY,EY]),TY=Le({role:Zr(["user","assistant"]),content:Hn([ny,Ze(ny)]),_meta:st(Le({}).passthrough())}).passthrough(),RY=yi.extend({messages:Ze(TY),modelPreferences:xY.optional(),systemPrompt:de().optional(),includeContext:Zr(["none","thisServer","allServers"]).optional(),temperature:wn().optional(),maxTokens:wn().int(),stopSequences:Ze(de()).optional(),metadata:Uo.optional(),tools:st(Ze(p4)),toolChoice:st(_Y)}),y4=qr.extend({method:it("sampling/createMessage"),params:RY}),v4=Wr.extend({model:de(),stopReason:st(Zr(["endTurn","stopSequence","maxTokens"]).or(de())),role:Zr(["user","assistant"]),content:CY}),AY=Wr.extend({model:de(),stopReason:st(Zr(["endTurn","stopSequence","maxTokens","toolUse"]).or(de())),role:Zr(["user","assistant"]),content:Hn([ny,Ze(ny)])}),OY=Le({type:it("boolean"),title:de().optional(),description:de().optional(),default:Vn().optional()}),kY=Le({type:it("string"),title:de().optional(),description:de().optional(),minLength:wn().optional(),maxLength:wn().optional(),format:Zr(["email","uri","date","date-time"]).optional(),default:de().optional()}),MY=Le({type:Zr(["number","integer"]),title:de().optional(),description:de().optional(),minimum:wn().optional(),maximum:wn().optional(),default:wn().optional()}),jY=Le({type:it("string"),title:de().optional(),description:de().optional(),enum:Ze(de()),default:de().optional()}),PY=Le({type:it("string"),title:de().optional(),description:de().optional(),oneOf:Ze(Le({const:de(),title:de()})),default:de().optional()}),DY=Le({type:it("string"),title:de().optional(),description:de().optional(),enum:Ze(de()),enumNames:Ze(de()).optional(),default:de().optional()}),NY=Hn([jY,PY]),$Y=Le({type:it("array"),title:de().optional(),description:de().optional(),minItems:wn().optional(),maxItems:wn().optional(),items:Le({type:it("string"),enum:Ze(de())}),default:Ze(de()).optional()}),IY=Le({type:it("array"),title:de().optional(),description:de().optional(),minItems:wn().optional(),maxItems:wn().optional(),items:Le({anyOf:Ze(Le({const:de(),title:de()}))}),default:Ze(de()).optional()}),zY=Hn([$Y,IY]),FY=Hn([DY,NY,zY]),LY=Hn([FY,OY,kY,MY]),VY=yi.extend({mode:it("form").optional(),message:de(),requestedSchema:Le({type:it("object"),properties:Er(de(),LY),required:Ze(de()).optional()})}),UY=yi.extend({mode:it("url"),message:de(),elicitationId:de(),url:de().url()}),qY=Hn([VY,UY]),b4=qr.extend({method:it("elicitation/create"),params:qY}),BY=ac.extend({elicitationId:de()}),HY=oo.extend({method:it("notifications/elicitation/complete"),params:BY}),S4=Wr.extend({action:Zr(["accept","decline","cancel"]),content:WP(e=>e===null?void 0:e,Er(de(),Hn([de(),wn(),Vn(),Ze(de())])).optional())}),KY=Le({type:it("ref/resource"),uri:de()}),GY=Le({type:it("ref/prompt"),name:de()}),ZY=yi.extend({ref:Hn([GY,KY]),argument:Le({name:de(),value:de()}),context:Le({arguments:Er(de(),de()).optional()}).optional()}),WY=qr.extend({method:it("completion/complete"),params:ZY}),w4=Wr.extend({completion:mi({values:Ze(de()).max(100),total:st(wn().int()),hasMore:st(Vn())})}),YY=Le({uri:de().startsWith("file://"),name:de().optional(),_meta:Er(de(),_r()).optional()}),XY=qr.extend({method:it("roots/list")}),QY=Wr.extend({roots:Ze(YY)}),JY=oo.extend({method:it("notifications/roots/list_changed")});Hn([t_,DW,WY,vY,oY,rY,BW,HW,GW,YW,QW,mY,hY,r_,o_,s_]);Hn([e_,n_,i4,JY,ty]);Hn([fu,v4,AY,S4,QY,i_,a_,nh]);Hn([t_,y4,b4,XY,r_,o_,s_]);Hn([e_,n_,SY,eY,ZW,gY,uY,ty,HY]);Hn([fu,r4,w4,h4,d4,c4,u4,f4,i0,m4,i_,a_,nh]);class pt extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===_t.UrlElicitationRequired&&r){const i=r;if(i.elicitations)return new eX(i.elicitations,n)}return new pt(t,n,r)}}class eX extends pt{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(_t.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){var t,n;return(n=(t=this.data)===null||t===void 0?void 0:t.elicitations)!==null&&n!==void 0?n:[]}}function Cl(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function WA(e){const t=IP(e),n=t?.method;if(!n)throw new Error("Schema is missing a method literal");const r=sZ(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function YA(e,t){const n=xa(e,t);if(!n.success)throw n.error;return n.data}const tX=6e4;class nX{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(e_,n=>{this._oncancel(n)}),this.setNotificationHandler(n_,n=>{this._onprogress(n)}),this.setRequestHandler(t_,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(r_,async(n,r)=>{const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new pt(_t.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(o_,async(n,r)=>{const i=async()=>{var s;const l=n.params.taskId;if(this._taskMessageQueue){let u;for(;u=await this._taskMessageQueue.dequeue(l,r.sessionId);){if(u.type==="response"||u.type==="error"){const d=u.message,h=d.id,p=this._requestResolvers.get(h);if(p)if(this._requestResolvers.delete(h),u.type==="response")p(d);else{const g=d,x=new pt(g.error.code,g.error.message,g.error.data);p(x)}else{const g=u.type==="response"?"Response":"Error";this._onerror(new Error(`${g} handler missing for request ${h}`))}continue}await((s=this._transport)===null||s===void 0?void 0:s.send(u.message,{relatedRequestId:r.requestId}))}}const c=await this._taskStore.getTask(l,r.sessionId);if(!c)throw new pt(_t.InvalidParams,`Task not found: ${l}`);if(!Cl(c.status))return await this._waitForTaskUpdate(l,r.signal),await i();if(Cl(c.status)){const u=await this._taskStore.getTaskResult(l,r.sessionId);return this._clearTaskQueue(l),{...u,_meta:{...u._meta,[Es]:{taskId:l}}}}return await i()};return await i()}),this.setRequestHandler(s_,async(n,r)=>{var i;try{const{tasks:s,nextCursor:l}=await this._taskStore.listTasks((i=n.params)===null||i===void 0?void 0:i.cursor,r.sessionId);return{tasks:s,nextCursor:l,_meta:{}}}catch(s){throw new pt(_t.InvalidParams,`Failed to list tasks: ${s instanceof Error?s.message:String(s)}`)}}),this.setRequestHandler(VW,async(n,r)=>{try{const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new pt(_t.InvalidParams,`Task not found: ${n.params.taskId}`);if(Cl(i.status))throw new pt(_t.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const s=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!s)throw new pt(_t.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...s}}catch(i){throw i instanceof pt?i:new pt(_t.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(t){const n=this._requestHandlerAbortControllers.get(t.params.requestId);n?.abort(t.params.reason)}_setupTimeout(t,n,r,i,s=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(i,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:s,onTimeout:i})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),pt.fromError(_t.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){var n,r,i;this._transport=t;const s=(n=this.transport)===null||n===void 0?void 0:n.onclose;this._transport.onclose=()=>{s?.(),this._onclose()};const l=(r=this.transport)===null||r===void 0?void 0:r.onerror;this._transport.onerror=u=>{l?.(u),this._onerror(u)};const c=(i=this._transport)===null||i===void 0?void 0:i.onmessage;this._transport.onmessage=(u,d)=>{c?.(u,d),Td(u)||CW(u)?this._onresponse(u):JS(u)?this._onrequest(u,d):EW(u)?this._onnotification(u):this._onerror(new Error(`Unknown message type: ${JSON.stringify(u)}`))},await this._transport.start()}_onclose(){var t;const n=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const r=pt.fromError(_t.ConnectionClosed,"Connection closed");this._transport=void 0,(t=this.onclose)===null||t===void 0||t.call(this);for(const i of n.values())i(r)}_onerror(t){var n;(n=this.onerror)===null||n===void 0||n.call(this,t)}_onnotification(t){var n;const r=(n=this._notificationHandlers.get(t.method))!==null&&n!==void 0?n:this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,n){var r,i,s,l,c,u;const d=(r=this._requestHandlers.get(t.method))!==null&&r!==void 0?r:this.fallbackRequestHandler,h=this._transport,p=(l=(s=(i=t.params)===null||i===void 0?void 0:i._meta)===null||s===void 0?void 0:s[Es])===null||l===void 0?void 0:l.taskId;if(d===void 0){const w={jsonrpc:"2.0",id:t.id,error:{code:_t.MethodNotFound,message:"Method not found"}};p&&this._taskMessageQueue?this._enqueueTaskMessage(p,{type:"error",message:w,timestamp:Date.now()},h?.sessionId).catch(S=>this._onerror(new Error(`Failed to enqueue error response: ${S}`))):h?.send(w).catch(S=>this._onerror(new Error(`Failed to send an error response: ${S}`)));return}const g=new AbortController;this._requestHandlerAbortControllers.set(t.id,g);const x=(c=t.params)===null||c===void 0?void 0:c.task,y=this._taskStore?this.requestTaskStore(t,h?.sessionId):void 0,T={signal:g.signal,sessionId:h?.sessionId,_meta:(u=t.params)===null||u===void 0?void 0:u._meta,sendNotification:async w=>{const S={relatedRequestId:t.id};p&&(S.relatedTask={taskId:p}),await this.notification(w,S)},sendRequest:async(w,S,v)=>{var E,b;const C={...v,relatedRequestId:t.id};p&&!C.relatedTask&&(C.relatedTask={taskId:p});const _=(b=(E=C.relatedTask)===null||E===void 0?void 0:E.taskId)!==null&&b!==void 0?b:p;return _&&y&&await y.updateTaskStatus(_,"input_required"),await this.request(w,S,C)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:p,taskStore:y,taskRequestedTtl:x?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{x&&this.assertTaskHandlerCapability(t.method)}).then(()=>d(t,T)).then(async w=>{if(g.signal.aborted)return;const S={result:w,jsonrpc:"2.0",id:t.id};p&&this._taskMessageQueue?await this._enqueueTaskMessage(p,{type:"response",message:S,timestamp:Date.now()},h?.sessionId):await h?.send(S)},async w=>{var S;if(g.signal.aborted)return;const v={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(w.code)?w.code:_t.InternalError,message:(S=w.message)!==null&&S!==void 0?S:"Internal error",...w.data!==void 0&&{data:w.data}}};p&&this._taskMessageQueue?await this._enqueueTaskMessage(p,{type:"error",message:v,timestamp:Date.now()},h?.sessionId):await h?.send(v)}).catch(w=>this._onerror(new Error(`Failed to send response: ${w}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,i=Number(n),s=this._progressHandlers.get(i);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const l=this._responseHandlers.get(i),c=this._timeoutInfo.get(i);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(u){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),l(u);return}s(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),Td(t))r(t);else{const l=new pt(t.error.code,t.error.message,t.error.data);r(l)}return}const i=this._responseHandlers.get(n);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let s=!1;if(Td(t)&&t.result&&typeof t.result=="object"){const l=t.result;if(l.task&&typeof l.task=="object"){const c=l.task;typeof c.taskId=="string"&&(s=!0,this._taskProgressTokens.set(c.taskId,n))}}if(s||this._progressHandlers.delete(n),Td(t))i(t);else{const l=pt.fromError(t.error.code,t.error.message,t.error.data);i(l)}}get transport(){return this._transport}async close(){var t;await((t=this._transport)===null||t===void 0?void 0:t.close())}async*requestStream(t,n,r){var i,s,l,c;const{task:u}=r??{};if(!u){try{yield{type:"result",result:await this.request(t,n,r)}}catch(h){yield{type:"error",error:h instanceof pt?h:new pt(_t.InternalError,String(h))}}return}let d;try{const h=await this.request(t,nh,r);if(h.task)d=h.task.taskId,yield{type:"taskCreated",task:h.task};else throw new pt(_t.InternalError,"Task creation did not return a task");for(;;){const p=await this.getTask({taskId:d},r);if(yield{type:"taskStatus",task:p},Cl(p.status)){p.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:d},n,r)}:p.status==="failed"?yield{type:"error",error:new pt(_t.InternalError,`Task ${d} failed`)}:p.status==="cancelled"&&(yield{type:"error",error:new pt(_t.InternalError,`Task ${d} was cancelled`)});return}if(p.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:d},n,r)};return}const g=(l=(i=p.pollInterval)!==null&&i!==void 0?i:(s=this._options)===null||s===void 0?void 0:s.defaultTaskPollInterval)!==null&&l!==void 0?l:1e3;await new Promise(x=>setTimeout(x,g)),(c=r?.signal)===null||c===void 0||c.throwIfAborted()}}catch(h){yield{type:"error",error:h instanceof pt?h:new pt(_t.InternalError,String(h))}}}request(t,n,r){const{relatedRequestId:i,resumptionToken:s,onresumptiontoken:l,task:c,relatedTask:u}=r??{};return new Promise((d,h)=>{var p,g,x,y,T,w,S;const v=P=>{h(P)};if(!this._transport){v(new Error("Not connected"));return}if(((p=this._options)===null||p===void 0?void 0:p.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(t.method),c&&this.assertTaskCapability(t.method)}catch(P){v(P);return}(g=r?.signal)===null||g===void 0||g.throwIfAborted();const E=this._requestMessageId++,b={...t,jsonrpc:"2.0",id:E};r?.onprogress&&(this._progressHandlers.set(E,r.onprogress),b.params={...t.params,_meta:{...((x=t.params)===null||x===void 0?void 0:x._meta)||{},progressToken:E}}),c&&(b.params={...b.params,task:c}),u&&(b.params={...b.params,_meta:{...((y=b.params)===null||y===void 0?void 0:y._meta)||{},[Es]:u}});const C=P=>{var I;this._responseHandlers.delete(E),this._progressHandlers.delete(E),this._cleanupTimeout(E),(I=this._transport)===null||I===void 0||I.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:E,reason:String(P)}},{relatedRequestId:i,resumptionToken:s,onresumptiontoken:l}).catch(q=>this._onerror(new Error(`Failed to send cancellation: ${q}`)));const z=P instanceof pt?P:new pt(_t.RequestTimeout,String(P));h(z)};this._responseHandlers.set(E,P=>{var I;if(!(!((I=r?.signal)===null||I===void 0)&&I.aborted)){if(P instanceof Error)return h(P);try{const z=xa(n,P.result);z.success?d(z.data):h(z.error)}catch(z){h(z)}}}),(T=r?.signal)===null||T===void 0||T.addEventListener("abort",()=>{var P;C((P=r?.signal)===null||P===void 0?void 0:P.reason)});const _=(w=r?.timeout)!==null&&w!==void 0?w:tX,A=()=>C(pt.fromError(_t.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(E,_,r?.maxTotalTimeout,A,(S=r?.resetTimeoutOnProgress)!==null&&S!==void 0?S:!1);const M=u?.taskId;if(M){const P=I=>{const z=this._responseHandlers.get(E);z?z(I):this._onerror(new Error(`Response handler missing for side-channeled request ${E}`))};this._requestResolvers.set(E,P),this._enqueueTaskMessage(M,{type:"request",message:b,timestamp:Date.now()}).catch(I=>{this._cleanupTimeout(E),h(I)})}else this._transport.send(b,{relatedRequestId:i,resumptionToken:s,onresumptiontoken:l}).catch(P=>{this._cleanupTimeout(E),h(P)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},i_,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},a_,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},UW,n)}async notification(t,n){var r,i,s,l,c;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const u=(r=n?.relatedTask)===null||r===void 0?void 0:r.taskId;if(u){const g={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...((i=t.params)===null||i===void 0?void 0:i._meta)||{},[Es]:n.relatedTask}}};await this._enqueueTaskMessage(u,{type:"notification",message:g,timestamp:Date.now()});return}if(((l=(s=this._options)===null||s===void 0?void 0:s.debouncedNotificationMethods)!==null&&l!==void 0?l:[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{var g,x;if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let y={...t,jsonrpc:"2.0"};n?.relatedTask&&(y={...y,params:{...y.params,_meta:{...((g=y.params)===null||g===void 0?void 0:g._meta)||{},[Es]:n.relatedTask}}}),(x=this._transport)===null||x===void 0||x.send(y,n).catch(T=>this._onerror(T))});return}let p={...t,jsonrpc:"2.0"};n?.relatedTask&&(p={...p,params:{...p.params,_meta:{...((c=p.params)===null||c===void 0?void 0:c._meta)||{},[Es]:n.relatedTask}}}),await this._transport.send(p,n)}setRequestHandler(t,n){const r=WA(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,s)=>{const l=YA(t,i);return Promise.resolve(n(l,s))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){const r=WA(t);this._notificationHandlers.set(r,i=>{const s=YA(t,i);return Promise.resolve(n(s))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const s=(i=this._options)===null||i===void 0?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,s)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const i of r)if(i.type==="request"&&JS(i.message)){const s=i.message.id,l=this._requestResolvers.get(s);l?(l(new pt(_t.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(s)):this._onerror(new Error(`Resolver missing for request ${s} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){var r,i,s;let l=(i=(r=this._options)===null||r===void 0?void 0:r.defaultTaskPollInterval)!==null&&i!==void 0?i:1e3;try{const c=await((s=this._taskStore)===null||s===void 0?void 0:s.getTask(t));c?.pollInterval&&(l=c.pollInterval)}catch{}return new Promise((c,u)=>{if(n.aborted){u(new pt(_t.InvalidRequest,"Request cancelled"));return}const d=setTimeout(c,l);n.addEventListener("abort",()=>{clearTimeout(d),u(new pt(_t.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async i=>{if(!t)throw new Error("No request provided");return await r.createTask(i,t.id,{method:t.method,params:t.params},n)},getTask:async i=>{const s=await r.getTask(i,n);if(!s)throw new pt(_t.InvalidParams,"Failed to retrieve task: Task not found");return s},storeTaskResult:async(i,s,l)=>{await r.storeTaskResult(i,s,l,n);const c=await r.getTask(i,n);if(c){const u=ty.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Cl(c.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>r.getTaskResult(i,n),updateTaskStatus:async(i,s,l)=>{const c=await r.getTask(i,n);if(!c)throw new pt(_t.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(Cl(c.status))throw new pt(_t.InvalidParams,`Cannot update task "${i}" from terminal status "${c.status}" to "${s}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(i,s,l,n);const u=await r.getTask(i,n);if(u){const d=ty.parse({method:"notifications/tasks/status",params:u});await this.notification(d),Cl(u.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>r.listTasks(i,n)}}}function XA(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function rX(e,t){const n={...e};for(const r in t){const i=r,s=t[i];if(s===void 0)continue;const l=n[i];XA(l)&&XA(s)?n[i]={...l,...s}:n[i]=s}return n}var pm={exports:{}},e1={},bs={},Tl={},t1={},n1={},r1={},QA;function ry(){return QA||(QA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(v){if(super(),!e.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((E,b)=>`${E}${b}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((E,b)=>(b instanceof n&&(E[b.str]=(E[b.str]||0)+1),E),{})}}e._Code=r,e.nil=new r("");function i(S,...v){const E=[S[0]];let b=0;for(;b<v.length;)c(E,v[b]),E.push(S[++b]);return new r(E)}e._=i;const s=new r("+");function l(S,...v){const E=[x(S[0])];let b=0;for(;b<v.length;)E.push(s),c(E,v[b]),E.push(s,x(S[++b]));return u(E),new r(E)}e.str=l;function c(S,v){v instanceof r?S.push(...v._items):v instanceof n?S.push(v):S.push(p(v))}e.addCodeArg=c;function u(S){let v=1;for(;v<S.length-1;){if(S[v]===s){const E=d(S[v-1],S[v+1]);if(E!==void 0){S.splice(v-1,3,E);continue}S[v++]="+"}v++}}function d(S,v){if(v==='""')return S;if(S==='""')return v;if(typeof S=="string")return v instanceof n||S[S.length-1]!=='"'?void 0:typeof v!="string"?`${S.slice(0,-1)}${v}"`:v[0]==='"'?S.slice(0,-1)+v.slice(1):void 0;if(typeof v=="string"&&v[0]==='"'&&!(S instanceof n))return`"${S}${v.slice(1)}`}function h(S,v){return v.emptyStr()?S:S.emptyStr()?v:l`${S}${v}`}e.strConcat=h;function p(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:x(Array.isArray(S)?S.join(","):S)}function g(S){return new r(x(S))}e.stringify=g;function x(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=x;function y(S){return typeof S=="string"&&e.IDENTIFIER.test(S)?new r(`.${S}`):i`[${S}]`}e.getProperty=y;function T(S){if(typeof S=="string"&&e.IDENTIFIER.test(S))return new r(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}e.getEsmExportName=T;function w(S){return new r(S.toString())}e.regexpCode=w})(r1)),r1}var i1={},JA;function eO(){return JA||(JA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ry();class n extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var r;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:d,parent:h}={}){this._names={},this._prefixes=d,this._parent=h}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const h=this._names[d]||this._nameGroup(d);return`${d}${h.index++}`}_nameGroup(d){var h,p;if(!((p=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||p===void 0)&&p.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=i;class s extends t.Name{constructor(d,h){super(h),this.prefix=d}setValue(d,{property:h,itemIndex:p}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(h)}[${p}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class c extends i{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?l:t.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,h){var p;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(d),{prefix:x}=g,y=(p=h.key)!==null&&p!==void 0?p:h.ref;let T=this._values[x];if(T){const v=T.get(y);if(v)return v}else T=this._values[x]=new Map;T.set(y,g);const w=this._scope[x]||(this._scope[x]=[]),S=w.length;return w[S]=h.ref,g.setValue(h,{property:x,itemIndex:S}),g}getValue(d,h){const p=this._values[d];if(p)return p.get(h)}scopeRefs(d,h=this._values){return this._reduceValues(h,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${d}${p.scopePath}`})}scopeCode(d=this._values,h,p){return this._reduceValues(d,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},h,p)}_reduceValues(d,h,p={},g){let x=t.nil;for(const y in d){const T=d[y];if(!T)continue;const w=p[y]=p[y]||new Map;T.forEach(S=>{if(w.has(S))return;w.set(S,r.Started);let v=h(S);if(v){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;x=(0,t._)`${x}${E} ${S} = ${v};${this.opts._n}`}else if(v=g?.(S))x=(0,t._)`${x}${v}${this.opts._n}`;else throw new n(S);w.set(S,r.Completed)})}return x}}e.ValueScope=c})(i1)),i1}var tO;function kt(){return tO||(tO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ry(),n=eO();var r=ry();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=eO();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(D,V){return this}}class l extends s{constructor(D,V,J){super(),this.varKind=D,this.name=V,this.rhs=J}render({es5:D,_n:V}){const J=D?n.varKinds.var:this.varKind,ne=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${ne};`+V}optimizeNames(D,V){if(D[this.name.str])return this.rhs&&(this.rhs=X(this.rhs,D,V)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(D,V,J){super(),this.lhs=D,this.rhs=V,this.sideEffects=J}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,V){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=X(this.rhs,D,V),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return K(D,this.rhs)}}class u extends c{constructor(D,V,J,ne){super(D,J,ne),this.op=V}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class d extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class h extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class g extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,V){return this.code=X(this.code,D,V),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class x extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((V,J)=>V+J.render(D),"")}optimizeNodes(){const{nodes:D}=this;let V=D.length;for(;V--;){const J=D[V].optimizeNodes();Array.isArray(J)?D.splice(V,1,...J):J?D[V]=J:D.splice(V,1)}return D.length>0?this:void 0}optimizeNames(D,V){const{nodes:J}=this;let ne=J.length;for(;ne--;){const oe=J[ne];oe.optimizeNames(D,V)||(Y(D,oe.names),J.splice(ne,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((D,V)=>q(D,V.names),{})}}class y extends x{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class T extends x{}class w extends y{}w.kind="else";class S extends y{constructor(D,V){super(V),this.condition=D}render(D){let V=`if(${this.condition})`+super.render(D);return this.else&&(V+="else "+this.else.render(D)),V}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let V=this.else;if(V){const J=V.optimizeNodes();V=this.else=Array.isArray(J)?new w(J):J}if(V)return D===!1?V instanceof S?V:V.nodes:this.nodes.length?this:new S(H(D),V instanceof S?[V]:V.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,V){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(D,V),!!(super.optimizeNames(D,V)||this.else))return this.condition=X(this.condition,D,V),this}get names(){const D=super.names;return K(D,this.condition),this.else&&q(D,this.else.names),D}}S.kind="if";class v extends y{}v.kind="for";class E extends v{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,V){if(super.optimizeNames(D,V))return this.iteration=X(this.iteration,D,V),this}get names(){return q(super.names,this.iteration.names)}}class b extends v{constructor(D,V,J,ne){super(),this.varKind=D,this.name=V,this.from=J,this.to=ne}render(D){const V=D.es5?n.varKinds.var:this.varKind,{name:J,from:ne,to:oe}=this;return`for(${V} ${J}=${ne}; ${J}<${oe}; ${J}++)`+super.render(D)}get names(){const D=K(super.names,this.from);return K(D,this.to)}}class C extends v{constructor(D,V,J,ne){super(),this.loop=D,this.varKind=V,this.name=J,this.iterable=ne}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,V){if(super.optimizeNames(D,V))return this.iterable=X(this.iterable,D,V),this}get names(){return q(super.names,this.iterable.names)}}class _ extends y{constructor(D,V,J){super(),this.name=D,this.args=V,this.async=J}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}_.kind="func";class A extends x{render(D){return"return "+super.render(D)}}A.kind="return";class M extends y{render(D){let V="try"+super.render(D);return this.catch&&(V+=this.catch.render(D)),this.finally&&(V+=this.finally.render(D)),V}optimizeNodes(){var D,V;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(V=this.finally)===null||V===void 0||V.optimizeNodes(),this}optimizeNames(D,V){var J,ne;return super.optimizeNames(D,V),(J=this.catch)===null||J===void 0||J.optimizeNames(D,V),(ne=this.finally)===null||ne===void 0||ne.optimizeNames(D,V),this}get names(){const D=super.names;return this.catch&&q(D,this.catch.names),this.finally&&q(D,this.finally.names),D}}class P extends y{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}P.kind="catch";class I extends y{render(D){return"finally"+super.render(D)}}I.kind="finally";class z{constructor(D,V={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...V,_n:V.lines?`
29
+ `:""},this._extScope=D,this._scope=new n.Scope({parent:D}),this._nodes=[new T]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,V){const J=this._extScope.value(D,V);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(D,V){return this._extScope.getValue(D,V)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,V,J,ne){const oe=this._scope.toName(V);return J!==void 0&&ne&&(this._constants[oe.str]=J),this._leafNode(new l(D,oe,J)),oe}const(D,V,J){return this._def(n.varKinds.const,D,V,J)}let(D,V,J){return this._def(n.varKinds.let,D,V,J)}var(D,V,J){return this._def(n.varKinds.var,D,V,J)}assign(D,V,J){return this._leafNode(new c(D,V,J))}add(D,V){return this._leafNode(new u(D,e.operators.ADD,V))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new g(D)),this}object(...D){const V=["{"];for(const[J,ne]of D)V.length>1&&V.push(","),V.push(J),(J!==ne||this.opts.es5)&&(V.push(":"),(0,t.addCodeArg)(V,ne));return V.push("}"),new t._Code(V)}if(D,V,J){if(this._blockNode(new S(D)),V&&J)this.code(V).else().code(J).endIf();else if(V)this.code(V).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new S(D))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(S,w)}_for(D,V){return this._blockNode(D),V&&this.code(V).endFor(),this}for(D,V){return this._for(new E(D),V)}forRange(D,V,J,ne,oe=this.opts.es5?n.varKinds.var:n.varKinds.let){const he=this._scope.toName(D);return this._for(new b(oe,he,V,J),()=>ne(he))}forOf(D,V,J,ne=n.varKinds.const){const oe=this._scope.toName(D);if(this.opts.es5){const he=V instanceof t.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,t._)`${he}.length`,Ee=>{this.var(oe,(0,t._)`${he}[${Ee}]`),J(oe)})}return this._for(new C("of",ne,oe,V),()=>J(oe))}forIn(D,V,J,ne=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${V})`,J);const oe=this._scope.toName(D);return this._for(new C("in",ne,oe,V),()=>J(oe))}endFor(){return this._endBlockNode(v)}label(D){return this._leafNode(new d(D))}break(D){return this._leafNode(new h(D))}return(D){const V=new A;if(this._blockNode(V),this.code(D),V.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(D,V,J){if(!V&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const ne=new M;if(this._blockNode(ne),this.code(D),V){const oe=this.name("e");this._currNode=ne.catch=new P(oe),V(oe)}return J&&(this._currNode=ne.finally=new I,this.code(J)),this._endBlockNode(P,I)}throw(D){return this._leafNode(new p(D))}block(D,V){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(V),this}endBlock(D){const V=this._blockStarts.pop();if(V===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-V;if(J<0||D!==void 0&&J!==D)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${D} expected`);return this._nodes.length=V,this}func(D,V=t.nil,J,ne){return this._blockNode(new _(D,V,J)),ne&&this.code(ne).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,V){const J=this._currNode;if(J instanceof D||V&&J instanceof V)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${V?`${D.kind}/${V.kind}`:D.kind}"`)}_elseNode(D){const V=this._currNode;if(!(V instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const V=this._nodes;V[V.length-1]=D}}e.CodeGen=z;function q(F,D){for(const V in D)F[V]=(F[V]||0)+(D[V]||0);return F}function K(F,D){return D instanceof t._CodeOrName?q(F,D.names):F}function X(F,D,V){if(F instanceof t.Name)return J(F);if(!ne(F))return F;return new t._Code(F._items.reduce((oe,he)=>(he instanceof t.Name&&(he=J(he)),he instanceof t._Code?oe.push(...he._items):oe.push(he),oe),[]));function J(oe){const he=V[oe.str];return he===void 0||D[oe.str]!==1?oe:(delete D[oe.str],he)}function ne(oe){return oe instanceof t._Code&&oe._items.some(he=>he instanceof t.Name&&D[he.str]===1&&V[he.str]!==void 0)}}function Y(F,D){for(const V in D)F[V]=(F[V]||0)-(D[V]||0)}function H(F){return typeof F=="boolean"||typeof F=="number"||F===null?!F:(0,t._)`!${B(F)}`}e.not=H;const Z=$(e.operators.AND);function ee(...F){return F.reduce(Z)}e.and=ee;const ae=$(e.operators.OR);function re(...F){return F.reduce(ae)}e.or=re;function $(F){return(D,V)=>D===t.nil?V:V===t.nil?D:(0,t._)`${B(D)} ${F} ${B(V)}`}function B(F){return F instanceof t.Name?F:(0,t._)`(${F})`}})(n1)),n1}var Pt={},nO;function an(){if(nO)return Pt;nO=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.checkStrictMode=Pt.getErrorPath=Pt.Type=Pt.useFunc=Pt.setEvaluated=Pt.evaluatedPropsToName=Pt.mergeEvaluated=Pt.eachItem=Pt.unescapeJsonPointer=Pt.escapeJsonPointer=Pt.escapeFragment=Pt.unescapeFragment=Pt.schemaRefOrVal=Pt.schemaHasRulesButRef=Pt.schemaHasRules=Pt.checkUnknownRules=Pt.alwaysValidSchema=Pt.toHash=void 0;const e=kt(),t=ry();function n(C){const _={};for(const A of C)_[A]=!0;return _}Pt.toHash=n;function r(C,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(i(C,_),!s(_,C.self.RULES.all))}Pt.alwaysValidSchema=r;function i(C,_=C.schema){const{opts:A,self:M}=C;if(!A.strictSchema||typeof _=="boolean")return;const P=M.RULES.keywords;for(const I in _)P[I]||b(C,`unknown keyword: "${I}"`)}Pt.checkUnknownRules=i;function s(C,_){if(typeof C=="boolean")return!C;for(const A in C)if(_[A])return!0;return!1}Pt.schemaHasRules=s;function l(C,_){if(typeof C=="boolean")return!C;for(const A in C)if(A!=="$ref"&&_.all[A])return!0;return!1}Pt.schemaHasRulesButRef=l;function c({topSchemaRef:C,schemaPath:_},A,M,P){if(!P){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,e._)`${A}`}return(0,e._)`${C}${_}${(0,e.getProperty)(M)}`}Pt.schemaRefOrVal=c;function u(C){return p(decodeURIComponent(C))}Pt.unescapeFragment=u;function d(C){return encodeURIComponent(h(C))}Pt.escapeFragment=d;function h(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}Pt.escapeJsonPointer=h;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}Pt.unescapeJsonPointer=p;function g(C,_){if(Array.isArray(C))for(const A of C)_(A);else _(C)}Pt.eachItem=g;function x({mergeNames:C,mergeToName:_,mergeValues:A,resultToName:M}){return(P,I,z,q)=>{const K=z===void 0?I:z instanceof e.Name?(I instanceof e.Name?C(P,I,z):_(P,I,z),z):I instanceof e.Name?(_(P,z,I),I):A(I,z);return q===e.Name&&!(K instanceof e.Name)?M(P,K):K}}Pt.mergeEvaluated={props:x({mergeNames:(C,_,A)=>C.if((0,e._)`${A} !== true && ${_} !== undefined`,()=>{C.if((0,e._)`${_} === true`,()=>C.assign(A,!0),()=>C.assign(A,(0,e._)`${A} || {}`).code((0,e._)`Object.assign(${A}, ${_})`))}),mergeToName:(C,_,A)=>C.if((0,e._)`${A} !== true`,()=>{_===!0?C.assign(A,!0):(C.assign(A,(0,e._)`${A} || {}`),T(C,A,_))}),mergeValues:(C,_)=>C===!0?!0:{...C,..._},resultToName:y}),items:x({mergeNames:(C,_,A)=>C.if((0,e._)`${A} !== true && ${_} !== undefined`,()=>C.assign(A,(0,e._)`${_} === true ? true : ${A} > ${_} ? ${A} : ${_}`)),mergeToName:(C,_,A)=>C.if((0,e._)`${A} !== true`,()=>C.assign(A,_===!0?!0:(0,e._)`${A} > ${_} ? ${A} : ${_}`)),mergeValues:(C,_)=>C===!0?!0:Math.max(C,_),resultToName:(C,_)=>C.var("items",_)})};function y(C,_){if(_===!0)return C.var("props",!0);const A=C.var("props",(0,e._)`{}`);return _!==void 0&&T(C,A,_),A}Pt.evaluatedPropsToName=y;function T(C,_,A){Object.keys(A).forEach(M=>C.assign((0,e._)`${_}${(0,e.getProperty)(M)}`,!0))}Pt.setEvaluated=T;const w={};function S(C,_){return C.scopeValue("func",{ref:_,code:w[_.code]||(w[_.code]=new t._Code(_.code))})}Pt.useFunc=S;var v;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(v||(Pt.Type=v={}));function E(C,_,A){if(C instanceof e.Name){const M=_===v.Num;return A?M?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:M?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,e.getProperty)(C).toString():"/"+h(C)}Pt.getErrorPath=E;function b(C,_,A=C.opts.strictSchema){if(A){if(_=`strict mode: ${_}`,A===!0)throw new Error(_);C.self.logger.warn(_)}}return Pt.checkStrictMode=b,Pt}var mm={},rO;function Ya(){if(rO)return mm;rO=1,Object.defineProperty(mm,"__esModule",{value:!0});const e=kt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return mm.default=t,mm}var iO;function o0(){return iO||(iO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=kt(),n=an(),r=Ya();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:S})=>S?(0,t.str)`"${w}" keyword must be ${S} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function i(w,S=e.keywordError,v,E){const{it:b}=w,{gen:C,compositeRule:_,allErrors:A}=b,M=p(w,S,v);E??(_||A)?u(C,M):d(b,(0,t._)`[${M}]`)}e.reportError=i;function s(w,S=e.keywordError,v){const{it:E}=w,{gen:b,compositeRule:C,allErrors:_}=E,A=p(w,S,v);u(b,A),C||_||d(E,r.default.vErrors)}e.reportExtraError=s;function l(w,S){w.assign(r.default.errors,S),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(S,()=>w.assign((0,t._)`${r.default.vErrors}.length`,S),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:w,keyword:S,schemaValue:v,data:E,errsCount:b,it:C}){if(b===void 0)throw new Error("ajv implementation error");const _=w.name("err");w.forRange("i",b,r.default.errors,A=>{w.const(_,(0,t._)`${r.default.vErrors}[${A}]`),w.if((0,t._)`${_}.instancePath === undefined`,()=>w.assign((0,t._)`${_}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),w.assign((0,t._)`${_}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${S}`),C.opts.verbose&&(w.assign((0,t._)`${_}.schema`,v),w.assign((0,t._)`${_}.data`,E))})}e.extendErrors=c;function u(w,S){const v=w.const("err",S);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${v}]`),(0,t._)`${r.default.vErrors}.push(${v})`),w.code((0,t._)`${r.default.errors}++`)}function d(w,S){const{gen:v,validateName:E,schemaEnv:b}=w;b.$async?v.throw((0,t._)`new ${w.ValidationError}(${S})`):(v.assign((0,t._)`${E}.errors`,S),v.return(!1))}const h={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(w,S,v){const{createErrors:E}=w.it;return E===!1?(0,t._)`{}`:g(w,S,v)}function g(w,S,v={}){const{gen:E,it:b}=w,C=[x(b,v),y(w,v)];return T(w,S,C),E.object(...C)}function x({errorPath:w},{instancePath:S}){const v=S?(0,t.str)`${w}${(0,n.getErrorPath)(S,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,v)]}function y({keyword:w,it:{errSchemaPath:S}},{schemaPath:v,parentSchema:E}){let b=E?S:(0,t.str)`${S}/${w}`;return v&&(b=(0,t.str)`${b}${(0,n.getErrorPath)(v,n.Type.Str)}`),[h.schemaPath,b]}function T(w,{params:S,message:v},E){const{keyword:b,data:C,schemaValue:_,it:A}=w,{opts:M,propertyName:P,topSchemaRef:I,schemaPath:z}=A;E.push([h.keyword,b],[h.params,typeof S=="function"?S(w):S||(0,t._)`{}`]),M.messages&&E.push([h.message,typeof v=="function"?v(w):v]),M.verbose&&E.push([h.schema,_],[h.parentSchema,(0,t._)`${I}${z}`],[r.default.data,C]),P&&E.push([h.propertyName,P])}})(t1)),t1}var oO;function iX(){if(oO)return Tl;oO=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.boolOrEmptySchema=Tl.topBoolOrEmptySchema=void 0;const e=o0(),t=kt(),n=Ya(),r={message:"boolean schema is false"};function i(c){const{gen:u,schema:d,validateName:h}=c;d===!1?l(c,!1):typeof d=="object"&&d.$async===!0?u.return(n.default.data):(u.assign((0,t._)`${h}.errors`,null),u.return(!0))}Tl.topBoolOrEmptySchema=i;function s(c,u){const{gen:d,schema:h}=c;h===!1?(d.var(u,!1),l(c)):d.var(u,!0)}Tl.boolOrEmptySchema=s;function l(c,u){const{gen:d,data:h}=c,p={gen:d,keyword:"false schema",data:h,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(p,r,void 0,u)}return Tl}var Ir={},Rl={},sO;function x4(){if(sO)return Rl;sO=1,Object.defineProperty(Rl,"__esModule",{value:!0}),Rl.getRules=Rl.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(i){return typeof i=="string"&&t.has(i)}Rl.isJSONType=n;function r(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Rl.getRules=r,Rl}var Ss={},aO;function _4(){if(aO)return Ss;aO=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.shouldUseRule=Ss.shouldUseGroup=Ss.schemaHasRulesForType=void 0;function e({schema:r,self:i},s){const l=i.RULES.types[s];return l&&l!==!0&&t(r,l)}Ss.schemaHasRulesForType=e;function t(r,i){return i.rules.some(s=>n(r,s))}Ss.shouldUseGroup=t;function n(r,i){var s;return r[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(l=>r[l]!==void 0))}return Ss.shouldUseRule=n,Ss}var lO;function iy(){if(lO)return Ir;lO=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.reportTypeError=Ir.checkDataTypes=Ir.checkDataType=Ir.coerceAndCheckDataType=Ir.getJSONTypes=Ir.getSchemaTypes=Ir.DataType=void 0;const e=x4(),t=_4(),n=o0(),r=kt(),i=an();var s;(function(v){v[v.Correct=0]="Correct",v[v.Wrong=1]="Wrong"})(s||(Ir.DataType=s={}));function l(v){const E=c(v.type);if(E.includes("null")){if(v.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&v.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');v.nullable===!0&&E.push("null")}return E}Ir.getSchemaTypes=l;function c(v){const E=Array.isArray(v)?v:v?[v]:[];if(E.every(e.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}Ir.getJSONTypes=c;function u(v,E){const{gen:b,data:C,opts:_}=v,A=h(E,_.coerceTypes),M=E.length>0&&!(A.length===0&&E.length===1&&(0,t.schemaHasRulesForType)(v,E[0]));if(M){const P=y(E,C,_.strictNumbers,s.Wrong);b.if(P,()=>{A.length?p(v,E,A):w(v)})}return M}Ir.coerceAndCheckDataType=u;const d=new Set(["string","number","integer","boolean","null"]);function h(v,E){return E?v.filter(b=>d.has(b)||E==="array"&&b==="array"):[]}function p(v,E,b){const{gen:C,data:_,opts:A}=v,M=C.let("dataType",(0,r._)`typeof ${_}`),P=C.let("coerced",(0,r._)`undefined`);A.coerceTypes==="array"&&C.if((0,r._)`${M} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>C.assign(_,(0,r._)`${_}[0]`).assign(M,(0,r._)`typeof ${_}`).if(y(E,_,A.strictNumbers),()=>C.assign(P,_))),C.if((0,r._)`${P} !== undefined`);for(const z of b)(d.has(z)||z==="array"&&A.coerceTypes==="array")&&I(z);C.else(),w(v),C.endIf(),C.if((0,r._)`${P} !== undefined`,()=>{C.assign(_,P),g(v,P)});function I(z){switch(z){case"string":C.elseIf((0,r._)`${M} == "number" || ${M} == "boolean"`).assign(P,(0,r._)`"" + ${_}`).elseIf((0,r._)`${_} === null`).assign(P,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${M} == "boolean" || ${_} === null
30
+ || (${M} == "string" && ${_} && ${_} == +${_})`).assign(P,(0,r._)`+${_}`);return;case"integer":C.elseIf((0,r._)`${M} === "boolean" || ${_} === null
31
+ || (${M} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(P,(0,r._)`+${_}`);return;case"boolean":C.elseIf((0,r._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(P,!1).elseIf((0,r._)`${_} === "true" || ${_} === 1`).assign(P,!0);return;case"null":C.elseIf((0,r._)`${_} === "" || ${_} === 0 || ${_} === false`),C.assign(P,null);return;case"array":C.elseIf((0,r._)`${M} === "string" || ${M} === "number"
32
+ || ${M} === "boolean" || ${_} === null`).assign(P,(0,r._)`[${_}]`)}}}function g({gen:v,parentData:E,parentDataProperty:b},C){v.if((0,r._)`${E} !== undefined`,()=>v.assign((0,r._)`${E}[${b}]`,C))}function x(v,E,b,C=s.Correct){const _=C===s.Correct?r.operators.EQ:r.operators.NEQ;let A;switch(v){case"null":return(0,r._)`${E} ${_} null`;case"array":A=(0,r._)`Array.isArray(${E})`;break;case"object":A=(0,r._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":A=M((0,r._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":A=M();break;default:return(0,r._)`typeof ${E} ${_} ${v}`}return C===s.Correct?A:(0,r.not)(A);function M(P=r.nil){return(0,r.and)((0,r._)`typeof ${E} == "number"`,P,b?(0,r._)`isFinite(${E})`:r.nil)}}Ir.checkDataType=x;function y(v,E,b,C){if(v.length===1)return x(v[0],E,b,C);let _;const A=(0,i.toHash)(v);if(A.array&&A.object){const M=(0,r._)`typeof ${E} != "object"`;_=A.null?M:(0,r._)`!${E} || ${M}`,delete A.null,delete A.array,delete A.object}else _=r.nil;A.number&&delete A.integer;for(const M in A)_=(0,r.and)(_,x(M,E,b,C));return _}Ir.checkDataTypes=y;const T={message:({schema:v})=>`must be ${v}`,params:({schema:v,schemaValue:E})=>typeof v=="string"?(0,r._)`{type: ${v}}`:(0,r._)`{type: ${E}}`};function w(v){const E=S(v);(0,n.reportError)(E,T)}Ir.reportTypeError=w;function S(v){const{gen:E,data:b,schema:C}=v,_=(0,i.schemaRefOrVal)(v,C,"type");return{gen:E,keyword:"type",data:b,schema:C.type,schemaCode:_,schemaValue:_,parentSchema:C,params:{},it:v}}return Ir}var yd={},cO;function oX(){if(cO)return yd;cO=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.assignDefaults=void 0;const e=kt(),t=an();function n(i,s){const{properties:l,items:c}=i.schema;if(s==="object"&&l)for(const u in l)r(i,u,l[u].default);else s==="array"&&Array.isArray(c)&&c.forEach((u,d)=>r(i,d,u.default))}yd.assignDefaults=n;function r(i,s,l){const{gen:c,compositeRule:u,data:d,opts:h}=i;if(l===void 0)return;const p=(0,e._)`${d}${(0,e.getProperty)(s)}`;if(u){(0,t.checkStrictMode)(i,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;h.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),c.if(g,(0,e._)`${p} = ${(0,e.stringify)(l)}`)}return yd}var mo={},mn={},uO;function xo(){if(uO)return mn;uO=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.validateUnion=mn.validateArray=mn.usePattern=mn.callValidateCode=mn.schemaProperties=mn.allSchemaProperties=mn.noPropertyInData=mn.propertyInData=mn.isOwnProperty=mn.hasPropFunc=mn.reportMissingProp=mn.checkMissingProp=mn.checkReportMissingProp=void 0;const e=kt(),t=an(),n=Ya(),r=an();function i(v,E){const{gen:b,data:C,it:_}=v;b.if(h(b,C,E,_.opts.ownProperties),()=>{v.setParams({missingProperty:(0,e._)`${E}`},!0),v.error()})}mn.checkReportMissingProp=i;function s({gen:v,data:E,it:{opts:b}},C,_){return(0,e.or)(...C.map(A=>(0,e.and)(h(v,E,A,b.ownProperties),(0,e._)`${_} = ${A}`)))}mn.checkMissingProp=s;function l(v,E){v.setParams({missingProperty:E},!0),v.error()}mn.reportMissingProp=l;function c(v){return v.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}mn.hasPropFunc=c;function u(v,E,b){return(0,e._)`${c(v)}.call(${E}, ${b})`}mn.isOwnProperty=u;function d(v,E,b,C){const _=(0,e._)`${E}${(0,e.getProperty)(b)} !== undefined`;return C?(0,e._)`${_} && ${u(v,E,b)}`:_}mn.propertyInData=d;function h(v,E,b,C){const _=(0,e._)`${E}${(0,e.getProperty)(b)} === undefined`;return C?(0,e.or)(_,(0,e.not)(u(v,E,b))):_}mn.noPropertyInData=h;function p(v){return v?Object.keys(v).filter(E=>E!=="__proto__"):[]}mn.allSchemaProperties=p;function g(v,E){return p(E).filter(b=>!(0,t.alwaysValidSchema)(v,E[b]))}mn.schemaProperties=g;function x({schemaCode:v,data:E,it:{gen:b,topSchemaRef:C,schemaPath:_,errorPath:A},it:M},P,I,z){const q=z?(0,e._)`${v}, ${E}, ${C}${_}`:E,K=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,A)],[n.default.parentData,M.parentData],[n.default.parentDataProperty,M.parentDataProperty],[n.default.rootData,n.default.rootData]];M.opts.dynamicRef&&K.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const X=(0,e._)`${q}, ${b.object(...K)}`;return I!==e.nil?(0,e._)`${P}.call(${I}, ${X})`:(0,e._)`${P}(${X})`}mn.callValidateCode=x;const y=(0,e._)`new RegExp`;function T({gen:v,it:{opts:E}},b){const C=E.unicodeRegExp?"u":"",{regExp:_}=E.code,A=_(b,C);return v.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,e._)`${_.code==="new RegExp"?y:(0,r.useFunc)(v,_)}(${b}, ${C})`})}mn.usePattern=T;function w(v){const{gen:E,data:b,keyword:C,it:_}=v,A=E.name("valid");if(_.allErrors){const P=E.let("valid",!0);return M(()=>E.assign(P,!1)),P}return E.var(A,!0),M(()=>E.break()),A;function M(P){const I=E.const("len",(0,e._)`${b}.length`);E.forRange("i",0,I,z=>{v.subschema({keyword:C,dataProp:z,dataPropType:t.Type.Num},A),E.if((0,e.not)(A),P)})}}mn.validateArray=w;function S(v){const{gen:E,schema:b,keyword:C,it:_}=v;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(I=>(0,t.alwaysValidSchema)(_,I))&&!_.opts.unevaluated)return;const M=E.let("valid",!1),P=E.name("_valid");E.block(()=>b.forEach((I,z)=>{const q=v.subschema({keyword:C,schemaProp:z,compositeRule:!0},P);E.assign(M,(0,e._)`${M} || ${P}`),v.mergeValidEvaluated(q,P)||E.if((0,e.not)(M))})),v.result(M,()=>v.reset(),()=>v.error(!0))}return mn.validateUnion=S,mn}var fO;function sX(){if(fO)return mo;fO=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.validateKeywordUsage=mo.validSchemaType=mo.funcKeywordCode=mo.macroKeywordCode=void 0;const e=kt(),t=Ya(),n=xo(),r=o0();function i(g,x){const{gen:y,keyword:T,schema:w,parentSchema:S,it:v}=g,E=x.macro.call(v.self,w,S,v),b=d(y,T,E);v.opts.validateSchema!==!1&&v.self.validateSchema(E,!0);const C=y.name("valid");g.subschema({schema:E,schemaPath:e.nil,errSchemaPath:`${v.errSchemaPath}/${T}`,topSchemaRef:b,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}mo.macroKeywordCode=i;function s(g,x){var y;const{gen:T,keyword:w,schema:S,parentSchema:v,$data:E,it:b}=g;u(b,x);const C=!E&&x.compile?x.compile.call(b.self,S,v,b):x.validate,_=d(T,w,C),A=T.let("valid");g.block$data(A,M),g.ok((y=x.valid)!==null&&y!==void 0?y:A);function M(){if(x.errors===!1)z(),x.modifying&&l(g),q(()=>g.error());else{const K=x.async?P():I();x.modifying&&l(g),q(()=>c(g,K))}}function P(){const K=T.let("ruleErrs",null);return T.try(()=>z((0,e._)`await `),X=>T.assign(A,!1).if((0,e._)`${X} instanceof ${b.ValidationError}`,()=>T.assign(K,(0,e._)`${X}.errors`),()=>T.throw(X))),K}function I(){const K=(0,e._)`${_}.errors`;return T.assign(K,null),z(e.nil),K}function z(K=x.async?(0,e._)`await `:e.nil){const X=b.opts.passContext?t.default.this:t.default.self,Y=!("compile"in x&&!E||x.schema===!1);T.assign(A,(0,e._)`${K}${(0,n.callValidateCode)(g,_,X,Y)}`,x.modifying)}function q(K){var X;T.if((0,e.not)((X=x.valid)!==null&&X!==void 0?X:A),K)}}mo.funcKeywordCode=s;function l(g){const{gen:x,data:y,it:T}=g;x.if(T.parentData,()=>x.assign(y,(0,e._)`${T.parentData}[${T.parentDataProperty}]`))}function c(g,x){const{gen:y}=g;y.if((0,e._)`Array.isArray(${x})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${x} : ${t.default.vErrors}.concat(${x})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function u({schemaEnv:g},x){if(x.async&&!g.$async)throw new Error("async keyword in sync schema")}function d(g,x,y){if(y===void 0)throw new Error(`keyword "${x}" failed to compile`);return g.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function h(g,x,y=!1){return!x.length||x.some(T=>T==="array"?Array.isArray(g):T==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==T||y&&typeof g>"u")}mo.validSchemaType=h;function p({schema:g,opts:x,self:y,errSchemaPath:T},w,S){if(Array.isArray(w.keyword)?!w.keyword.includes(S):w.keyword!==S)throw new Error("ajv implementation error");const v=w.dependencies;if(v?.some(E=>!Object.prototype.hasOwnProperty.call(g,E)))throw new Error(`parent schema must have dependencies of ${S}: ${v.join(",")}`);if(w.validateSchema&&!w.validateSchema(g[S])){const b=`keyword "${S}" value is invalid at path "${T}": `+y.errorsText(w.validateSchema.errors);if(x.validateSchema==="log")y.logger.error(b);else throw new Error(b)}}return mo.validateKeywordUsage=p,mo}var ws={},dO;function aX(){if(dO)return ws;dO=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.extendSubschemaMode=ws.extendSubschemaData=ws.getSubschema=void 0;const e=kt(),t=an();function n(s,{keyword:l,schemaProp:c,schema:u,schemaPath:d,errSchemaPath:h,topSchemaRef:p}){if(l!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const g=s.schema[l];return c===void 0?{schema:g,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:g[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,t.escapeFragment)(c)}`}}if(u!==void 0){if(d===void 0||h===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:d,topSchemaRef:p,errSchemaPath:h}}throw new Error('either "keyword" or "schema" must be passed')}ws.getSubschema=n;function r(s,l,{dataProp:c,dataPropType:u,data:d,dataTypes:h,propertyName:p}){if(d!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=l;if(c!==void 0){const{errorPath:y,dataPathArr:T,opts:w}=l,S=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);x(S),s.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(c,u,w.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...T,s.parentDataProperty]}if(d!==void 0){const y=d instanceof e.Name?d:g.let("data",d,!0);x(y),p!==void 0&&(s.propertyName=p)}h&&(s.dataTypes=h);function x(y){s.data=y,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,y]}}ws.extendSubschemaData=r;function i(s,{jtdDiscriminator:l,jtdMetadata:c,compositeRule:u,createErrors:d,allErrors:h}){u!==void 0&&(s.compositeRule=u),d!==void 0&&(s.createErrors=d),h!==void 0&&(s.allErrors=h),s.jtdDiscriminator=l,s.jtdMetadata=c}return ws.extendSubschemaMode=i,ws}var Jr={},o1,hO;function E4(){return hO||(hO=1,o1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var l=s[i];if(!e(t[l],n[l]))return!1}return!0}return t!==t&&n!==n}),o1}var s1={exports:{}},pO;function lX(){if(pO)return s1.exports;pO=1;var e=s1.exports=function(r,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};t(i,l,c,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,i,s,l,c,u,d,h,p,g){if(l&&typeof l=="object"&&!Array.isArray(l)){i(l,c,u,d,h,p,g);for(var x in l){var y=l[x];if(Array.isArray(y)){if(x in e.arrayKeywords)for(var T=0;T<y.length;T++)t(r,i,s,y[T],c+"/"+x+"/"+T,u,c,x,l,T)}else if(x in e.propsKeywords){if(y&&typeof y=="object")for(var w in y)t(r,i,s,y[w],c+"/"+x+"/"+n(w),u,c,x,l,w)}else(x in e.keywords||r.allKeys&&!(x in e.skipKeywords))&&t(r,i,s,y,c+"/"+x,u,c,x,l)}s(l,c,u,d,h,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return s1.exports}var mO;function s0(){if(mO)return Jr;mO=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.getSchemaRefs=Jr.resolveUrl=Jr.normalizeId=Jr._getFullPath=Jr.getFullPath=Jr.inlineRef=void 0;const e=an(),t=E4(),n=lX(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(T,w=!0){return typeof T=="boolean"?!0:w===!0?!l(T):w?c(T)<=w:!1}Jr.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(T){for(const w in T){if(s.has(w))return!0;const S=T[w];if(Array.isArray(S)&&S.some(l)||typeof S=="object"&&l(S))return!0}return!1}function c(T){let w=0;for(const S in T){if(S==="$ref")return 1/0;if(w++,!r.has(S)&&(typeof T[S]=="object"&&(0,e.eachItem)(T[S],v=>w+=c(v)),w===1/0))return 1/0}return w}function u(T,w="",S){S!==!1&&(w=p(w));const v=T.parse(w);return d(T,v)}Jr.getFullPath=u;function d(T,w){return T.serialize(w).split("#")[0]+"#"}Jr._getFullPath=d;const h=/#\/?$/;function p(T){return T?T.replace(h,""):""}Jr.normalizeId=p;function g(T,w,S){return S=p(S),T.resolve(w,S)}Jr.resolveUrl=g;const x=/^[a-z_][-a-z0-9._]*$/i;function y(T,w){if(typeof T=="boolean")return{};const{schemaId:S,uriResolver:v}=this.opts,E=p(T[S]||w),b={"":E},C=u(v,E,!1),_={},A=new Set;return n(T,{allKeys:!0},(I,z,q,K)=>{if(K===void 0)return;const X=C+z;let Y=b[K];typeof I[S]=="string"&&(Y=H.call(this,I[S])),Z.call(this,I.$anchor),Z.call(this,I.$dynamicAnchor),b[z]=Y;function H(ee){const ae=this.opts.uriResolver.resolve;if(ee=p(Y?ae(Y,ee):ee),A.has(ee))throw P(ee);A.add(ee);let re=this.refs[ee];return typeof re=="string"&&(re=this.refs[re]),typeof re=="object"?M(I,re.schema,ee):ee!==p(X)&&(ee[0]==="#"?(M(I,_[ee],ee),_[ee]=I):this.refs[ee]=X),ee}function Z(ee){if(typeof ee=="string"){if(!x.test(ee))throw new Error(`invalid anchor "${ee}"`);H.call(this,`#${ee}`)}}}),_;function M(I,z,q){if(z!==void 0&&!t(I,z))throw P(q)}function P(I){return new Error(`reference "${I}" resolves to more than one schema`)}}return Jr.getSchemaRefs=y,Jr}var gO;function a0(){if(gO)return bs;gO=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.getData=bs.KeywordCxt=bs.validateFunctionCode=void 0;const e=iX(),t=iy(),n=_4(),r=iy(),i=oX(),s=sX(),l=aX(),c=kt(),u=Ya(),d=s0(),h=an(),p=o0();function g(te){if(C(te)&&(A(te),b(te))){w(te);return}x(te,()=>(0,e.topBoolOrEmptySchema)(te))}bs.validateFunctionCode=g;function x({gen:te,validateName:ie,schema:le,schemaEnv:Se,opts:Re},we){Re.code.es5?te.func(ie,(0,c._)`${u.default.data}, ${u.default.valCxt}`,Se.$async,()=>{te.code((0,c._)`"use strict"; ${v(le,Re)}`),T(te,Re),te.code(we)}):te.func(ie,(0,c._)`${u.default.data}, ${y(Re)}`,Se.$async,()=>te.code(v(le,Re)).code(we))}function y(te){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${te.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function T(te,ie){te.if(u.default.valCxt,()=>{te.var(u.default.instancePath,(0,c._)`${u.default.valCxt}.${u.default.instancePath}`),te.var(u.default.parentData,(0,c._)`${u.default.valCxt}.${u.default.parentData}`),te.var(u.default.parentDataProperty,(0,c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),te.var(u.default.rootData,(0,c._)`${u.default.valCxt}.${u.default.rootData}`),ie.dynamicRef&&te.var(u.default.dynamicAnchors,(0,c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{te.var(u.default.instancePath,(0,c._)`""`),te.var(u.default.parentData,(0,c._)`undefined`),te.var(u.default.parentDataProperty,(0,c._)`undefined`),te.var(u.default.rootData,u.default.data),ie.dynamicRef&&te.var(u.default.dynamicAnchors,(0,c._)`{}`)})}function w(te){const{schema:ie,opts:le,gen:Se}=te;x(te,()=>{le.$comment&&ie.$comment&&K(te),I(te),Se.let(u.default.vErrors,null),Se.let(u.default.errors,0),le.unevaluated&&S(te),M(te),X(te)})}function S(te){const{gen:ie,validateName:le}=te;te.evaluated=ie.const("evaluated",(0,c._)`${le}.evaluated`),ie.if((0,c._)`${te.evaluated}.dynamicProps`,()=>ie.assign((0,c._)`${te.evaluated}.props`,(0,c._)`undefined`)),ie.if((0,c._)`${te.evaluated}.dynamicItems`,()=>ie.assign((0,c._)`${te.evaluated}.items`,(0,c._)`undefined`))}function v(te,ie){const le=typeof te=="object"&&te[ie.schemaId];return le&&(ie.code.source||ie.code.process)?(0,c._)`/*# sourceURL=${le} */`:c.nil}function E(te,ie){if(C(te)&&(A(te),b(te))){_(te,ie);return}(0,e.boolOrEmptySchema)(te,ie)}function b({schema:te,self:ie}){if(typeof te=="boolean")return!te;for(const le in te)if(ie.RULES.all[le])return!0;return!1}function C(te){return typeof te.schema!="boolean"}function _(te,ie){const{schema:le,gen:Se,opts:Re}=te;Re.$comment&&le.$comment&&K(te),z(te),q(te);const we=Se.const("_errs",u.default.errors);M(te,we),Se.var(ie,(0,c._)`${we} === ${u.default.errors}`)}function A(te){(0,h.checkUnknownRules)(te),P(te)}function M(te,ie){if(te.opts.jtd)return H(te,[],!1,ie);const le=(0,t.getSchemaTypes)(te.schema),Se=(0,t.coerceAndCheckDataType)(te,le);H(te,le,!Se,ie)}function P(te){const{schema:ie,errSchemaPath:le,opts:Se,self:Re}=te;ie.$ref&&Se.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(ie,Re.RULES)&&Re.logger.warn(`$ref: keywords ignored in schema at path "${le}"`)}function I(te){const{schema:ie,opts:le}=te;ie.default!==void 0&&le.useDefaults&&le.strictSchema&&(0,h.checkStrictMode)(te,"default is ignored in the schema root")}function z(te){const ie=te.schema[te.opts.schemaId];ie&&(te.baseId=(0,d.resolveUrl)(te.opts.uriResolver,te.baseId,ie))}function q(te){if(te.schema.$async&&!te.schemaEnv.$async)throw new Error("async schema in sync schema")}function K({gen:te,schemaEnv:ie,schema:le,errSchemaPath:Se,opts:Re}){const we=le.$comment;if(Re.$comment===!0)te.code((0,c._)`${u.default.self}.logger.log(${we})`);else if(typeof Re.$comment=="function"){const Ie=(0,c.str)`${Se}/$comment`,Pe=te.scopeValue("root",{ref:ie.root});te.code((0,c._)`${u.default.self}.opts.$comment(${we}, ${Ie}, ${Pe}.schema)`)}}function X(te){const{gen:ie,schemaEnv:le,validateName:Se,ValidationError:Re,opts:we}=te;le.$async?ie.if((0,c._)`${u.default.errors} === 0`,()=>ie.return(u.default.data),()=>ie.throw((0,c._)`new ${Re}(${u.default.vErrors})`)):(ie.assign((0,c._)`${Se}.errors`,u.default.vErrors),we.unevaluated&&Y(te),ie.return((0,c._)`${u.default.errors} === 0`))}function Y({gen:te,evaluated:ie,props:le,items:Se}){le instanceof c.Name&&te.assign((0,c._)`${ie}.props`,le),Se instanceof c.Name&&te.assign((0,c._)`${ie}.items`,Se)}function H(te,ie,le,Se){const{gen:Re,schema:we,data:Ie,allErrors:Pe,opts:ye,self:Ue}=te,{RULES:De}=Ue;if(we.$ref&&(ye.ignoreKeywordsWithRef||!(0,h.schemaHasRulesButRef)(we,De))){Re.block(()=>ne(te,"$ref",De.all.$ref.definition));return}ye.jtd||ee(te,ie),Re.block(()=>{for(const ze of De.rules)We(ze);We(De.post)});function We(ze){(0,n.shouldUseGroup)(we,ze)&&(ze.type?(Re.if((0,r.checkDataType)(ze.type,Ie,ye.strictNumbers)),Z(te,ze),ie.length===1&&ie[0]===ze.type&&le&&(Re.else(),(0,r.reportTypeError)(te)),Re.endIf()):Z(te,ze),Pe||Re.if((0,c._)`${u.default.errors} === ${Se||0}`))}}function Z(te,ie){const{gen:le,schema:Se,opts:{useDefaults:Re}}=te;Re&&(0,i.assignDefaults)(te,ie.type),le.block(()=>{for(const we of ie.rules)(0,n.shouldUseRule)(Se,we)&&ne(te,we.keyword,we.definition,ie.type)})}function ee(te,ie){te.schemaEnv.meta||!te.opts.strictTypes||(ae(te,ie),te.opts.allowUnionTypes||re(te,ie),$(te,te.dataTypes))}function ae(te,ie){if(ie.length){if(!te.dataTypes.length){te.dataTypes=ie;return}ie.forEach(le=>{F(te.dataTypes,le)||V(te,`type "${le}" not allowed by context "${te.dataTypes.join(",")}"`)}),D(te,ie)}}function re(te,ie){ie.length>1&&!(ie.length===2&&ie.includes("null"))&&V(te,"use allowUnionTypes to allow union type keyword")}function $(te,ie){const le=te.self.RULES.all;for(const Se in le){const Re=le[Se];if(typeof Re=="object"&&(0,n.shouldUseRule)(te.schema,Re)){const{type:we}=Re.definition;we.length&&!we.some(Ie=>B(ie,Ie))&&V(te,`missing type "${we.join(",")}" for keyword "${Se}"`)}}}function B(te,ie){return te.includes(ie)||ie==="number"&&te.includes("integer")}function F(te,ie){return te.includes(ie)||ie==="integer"&&te.includes("number")}function D(te,ie){const le=[];for(const Se of te.dataTypes)F(ie,Se)?le.push(Se):ie.includes("integer")&&Se==="number"&&le.push("integer");te.dataTypes=le}function V(te,ie){const le=te.schemaEnv.baseId+te.errSchemaPath;ie+=` at "${le}" (strictTypes)`,(0,h.checkStrictMode)(te,ie,te.opts.strictTypes)}class J{constructor(ie,le,Se){if((0,s.validateKeywordUsage)(ie,le,Se),this.gen=ie.gen,this.allErrors=ie.allErrors,this.keyword=Se,this.data=ie.data,this.schema=ie.schema[Se],this.$data=le.$data&&ie.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(ie,this.schema,Se,this.$data),this.schemaType=le.schemaType,this.parentSchema=ie.schema,this.params={},this.it=ie,this.def=le,this.$data)this.schemaCode=ie.gen.const("vSchema",Ee(this.$data,ie));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,le.schemaType,le.allowUndefined))throw new Error(`${Se} value must be ${JSON.stringify(le.schemaType)}`);("code"in le?le.trackErrors:le.errors!==!1)&&(this.errsCount=ie.gen.const("_errs",u.default.errors))}result(ie,le,Se){this.failResult((0,c.not)(ie),le,Se)}failResult(ie,le,Se){this.gen.if(ie),Se?Se():this.error(),le?(this.gen.else(),le(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ie,le){this.failResult((0,c.not)(ie),void 0,le)}fail(ie){if(ie===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ie),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ie){if(!this.$data)return this.fail(ie);const{schemaCode:le}=this;this.fail((0,c._)`${le} !== undefined && (${(0,c.or)(this.invalid$data(),ie)})`)}error(ie,le,Se){if(le){this.setParams(le),this._error(ie,Se),this.setParams({});return}this._error(ie,Se)}_error(ie,le){(ie?p.reportExtraError:p.reportError)(this,this.def.error,le)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(ie){this.allErrors||this.gen.if(ie)}setParams(ie,le){le?Object.assign(this.params,ie):this.params=ie}block$data(ie,le,Se=c.nil){this.gen.block(()=>{this.check$data(ie,Se),le()})}check$data(ie=c.nil,le=c.nil){if(!this.$data)return;const{gen:Se,schemaCode:Re,schemaType:we,def:Ie}=this;Se.if((0,c.or)((0,c._)`${Re} === undefined`,le)),ie!==c.nil&&Se.assign(ie,!0),(we.length||Ie.validateSchema)&&(Se.elseIf(this.invalid$data()),this.$dataError(),ie!==c.nil&&Se.assign(ie,!1)),Se.else()}invalid$data(){const{gen:ie,schemaCode:le,schemaType:Se,def:Re,it:we}=this;return(0,c.or)(Ie(),Pe());function Ie(){if(Se.length){if(!(le instanceof c.Name))throw new Error("ajv implementation error");const ye=Array.isArray(Se)?Se:[Se];return(0,c._)`${(0,r.checkDataTypes)(ye,le,we.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Pe(){if(Re.validateSchema){const ye=ie.scopeValue("validate$data",{ref:Re.validateSchema});return(0,c._)`!${ye}(${le})`}return c.nil}}subschema(ie,le){const Se=(0,l.getSubschema)(this.it,ie);(0,l.extendSubschemaData)(Se,this.it,ie),(0,l.extendSubschemaMode)(Se,ie);const Re={...this.it,...Se,items:void 0,props:void 0};return E(Re,le),Re}mergeEvaluated(ie,le){const{it:Se,gen:Re}=this;Se.opts.unevaluated&&(Se.props!==!0&&ie.props!==void 0&&(Se.props=h.mergeEvaluated.props(Re,ie.props,Se.props,le)),Se.items!==!0&&ie.items!==void 0&&(Se.items=h.mergeEvaluated.items(Re,ie.items,Se.items,le)))}mergeValidEvaluated(ie,le){const{it:Se,gen:Re}=this;if(Se.opts.unevaluated&&(Se.props!==!0||Se.items!==!0))return Re.if(le,()=>this.mergeEvaluated(ie,c.Name)),!0}}bs.KeywordCxt=J;function ne(te,ie,le,Se){const Re=new J(te,le,ie);"code"in le?le.code(Re,Se):Re.$data&&le.validate?(0,s.funcKeywordCode)(Re,le):"macro"in le?(0,s.macroKeywordCode)(Re,le):(le.compile||le.validate)&&(0,s.funcKeywordCode)(Re,le)}const oe=/^\/(?:[^~]|~0|~1)*$/,he=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ee(te,{dataLevel:ie,dataNames:le,dataPathArr:Se}){let Re,we;if(te==="")return u.default.rootData;if(te[0]==="/"){if(!oe.test(te))throw new Error(`Invalid JSON-pointer: ${te}`);Re=te,we=u.default.rootData}else{const Ue=he.exec(te);if(!Ue)throw new Error(`Invalid JSON-pointer: ${te}`);const De=+Ue[1];if(Re=Ue[2],Re==="#"){if(De>=ie)throw new Error(ye("property/index",De));return Se[ie-De]}if(De>ie)throw new Error(ye("data",De));if(we=le[ie-De],!Re)return we}let Ie=we;const Pe=Re.split("/");for(const Ue of Pe)Ue&&(we=(0,c._)`${we}${(0,c.getProperty)((0,h.unescapeJsonPointer)(Ue))}`,Ie=(0,c._)`${Ie} && ${we}`);return Ie;function ye(Ue,De){return`Cannot access ${Ue} ${De} levels up, current level is ${ie}`}}return bs.getData=Ee,bs}var gm={},yO;function p_(){if(yO)return gm;yO=1,Object.defineProperty(gm,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return gm.default=e,gm}var ym={},vO;function l0(){if(vO)return ym;vO=1,Object.defineProperty(ym,"__esModule",{value:!0});const e=s0();class t extends Error{constructor(r,i,s,l){super(l||`can't resolve reference ${s} from id ${i}`),this.missingRef=(0,e.resolveUrl)(r,i,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return ym.default=t,ym}var Ai={},bO;function m_(){if(bO)return Ai;bO=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.resolveSchema=Ai.getCompilingSchema=Ai.resolveRef=Ai.compileSchema=Ai.SchemaEnv=void 0;const e=kt(),t=p_(),n=Ya(),r=s0(),i=an(),s=a0();class l{constructor(S){var v;this.refs={},this.dynamicAnchors={};let E;typeof S.schema=="object"&&(E=S.schema),this.schema=S.schema,this.schemaId=S.schemaId,this.root=S.root||this,this.baseId=(v=S.baseId)!==null&&v!==void 0?v:(0,r.normalizeId)(E?.[S.schemaId||"$id"]),this.schemaPath=S.schemaPath,this.localRefs=S.localRefs,this.meta=S.meta,this.$async=E?.$async,this.refs={}}}Ai.SchemaEnv=l;function c(w){const S=h.call(this,w);if(S)return S;const v=(0,r.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:E,lines:b}=this.opts.code,{ownProperties:C}=this.opts,_=new e.CodeGen(this.scope,{es5:E,lines:b,ownProperties:C});let A;w.$async&&(A=_.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const M=_.scopeName("validate");w.validateName=M;const P={gen:_,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:M,ValidationError:A,schema:w.schema,schemaEnv:w,rootId:v,baseId:w.baseId||v,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let I;try{this._compilations.add(w),(0,s.validateFunctionCode)(P),_.optimize(this.opts.code.optimize);const z=_.toString();I=`${_.scopeRefs(n.default.scope)}return ${z}`,this.opts.code.process&&(I=this.opts.code.process(I,w));const K=new Function(`${n.default.self}`,`${n.default.scope}`,I)(this,this.scope.get());if(this.scope.value(M,{ref:K}),K.errors=null,K.schema=w.schema,K.schemaEnv=w,w.$async&&(K.$async=!0),this.opts.code.source===!0&&(K.source={validateName:M,validateCode:z,scopeValues:_._values}),this.opts.unevaluated){const{props:X,items:Y}=P;K.evaluated={props:X instanceof e.Name?void 0:X,items:Y instanceof e.Name?void 0:Y,dynamicProps:X instanceof e.Name,dynamicItems:Y instanceof e.Name},K.source&&(K.source.evaluated=(0,e.stringify)(K.evaluated))}return w.validate=K,w}catch(z){throw delete w.validate,delete w.validateName,I&&this.logger.error("Error compiling schema, function code:",I),z}finally{this._compilations.delete(w)}}Ai.compileSchema=c;function u(w,S,v){var E;v=(0,r.resolveUrl)(this.opts.uriResolver,S,v);const b=w.refs[v];if(b)return b;let C=g.call(this,w,v);if(C===void 0){const _=(E=w.localRefs)===null||E===void 0?void 0:E[v],{schemaId:A}=this.opts;_&&(C=new l({schema:_,schemaId:A,root:w,baseId:S}))}if(C!==void 0)return w.refs[v]=d.call(this,C)}Ai.resolveRef=u;function d(w){return(0,r.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:c.call(this,w)}function h(w){for(const S of this._compilations)if(p(S,w))return S}Ai.getCompilingSchema=h;function p(w,S){return w.schema===S.schema&&w.root===S.root&&w.baseId===S.baseId}function g(w,S){let v;for(;typeof(v=this.refs[S])=="string";)S=v;return v||this.schemas[S]||x.call(this,w,S)}function x(w,S){const v=this.opts.uriResolver.parse(S),E=(0,r._getFullPath)(this.opts.uriResolver,v);let b=(0,r.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&E===b)return T.call(this,v,w);const C=(0,r.normalizeId)(E),_=this.refs[C]||this.schemas[C];if(typeof _=="string"){const A=x.call(this,w,_);return typeof A?.schema!="object"?void 0:T.call(this,v,A)}if(typeof _?.schema=="object"){if(_.validate||c.call(this,_),C===(0,r.normalizeId)(S)){const{schema:A}=_,{schemaId:M}=this.opts,P=A[M];return P&&(b=(0,r.resolveUrl)(this.opts.uriResolver,b,P)),new l({schema:A,schemaId:M,root:w,baseId:b})}return T.call(this,v,_)}}Ai.resolveSchema=x;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function T(w,{baseId:S,schema:v,root:E}){var b;if(((b=w.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const A of w.fragment.slice(1).split("/")){if(typeof v=="boolean")return;const M=v[(0,i.unescapeFragment)(A)];if(M===void 0)return;v=M;const P=typeof v=="object"&&v[this.opts.schemaId];!y.has(A)&&P&&(S=(0,r.resolveUrl)(this.opts.uriResolver,S,P))}let C;if(typeof v!="boolean"&&v.$ref&&!(0,i.schemaHasRulesButRef)(v,this.RULES)){const A=(0,r.resolveUrl)(this.opts.uriResolver,S,v.$ref);C=x.call(this,E,A)}const{schemaId:_}=this.opts;if(C=C||new l({schema:v,schemaId:_,root:E,baseId:S}),C.schema!==C.root.schema)return C}return Ai}const cX="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",uX="Meta-schema for $data reference (JSON AnySchema extension proposal)",fX="object",dX=["$data"],hX={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},pX=!1,mX={$id:cX,description:uX,type:fX,required:dX,properties:hX,additionalProperties:pX};var vm={},vd={exports:{}},a1,SO;function C4(){if(SO)return a1;SO=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(g){let x="",y=0,T=0;for(T=0;T<g.length;T++)if(y=g[T].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";x+=g[T];break}for(T+=1;T<g.length;T++){if(y=g[T].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";x+=g[T]}return x}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(g){return g.length=0,!0}function s(g,x,y){if(g.length){const T=n(g);if(T!=="")x.push(T);else return y.error=!0,!1;g.length=0}return!0}function l(g){let x=0;const y={error:!1,address:"",zone:""},T=[],w=[];let S=!1,v=!1,E=s;for(let b=0;b<g.length;b++){const C=g[b];if(!(C==="["||C==="]"))if(C===":"){if(S===!0&&(v=!0),!E(w,T,y))break;if(++x>7){y.error=!0;break}b>0&&g[b-1]===":"&&(S=!0),T.push(":");continue}else if(C==="%"){if(!E(w,T,y))break;E=i}else{w.push(C);continue}}return w.length&&(E===i?y.zone=w.join(""):v?T.push(w.join("")):T.push(n(w))),y.address=T.join(""),y}function c(g){if(u(g,":")<2)return{host:g,isIPV6:!1};const x=l(g);if(x.error)return{host:g,isIPV6:!1};{let y=x.address,T=x.address;return x.zone&&(y+="%"+x.zone,T+="%25"+x.zone),{host:y,isIPV6:!0,escapedHost:T}}}function u(g,x){let y=0;for(let T=0;T<g.length;T++)g[T]===x&&y++;return y}function d(g){let x=g;const y=[];let T=-1,w=0;for(;w=x.length;){if(w===1){if(x===".")break;if(x==="/"){y.push("/");break}else{y.push(x);break}}else if(w===2){if(x[0]==="."){if(x[1]===".")break;if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&(x[1]==="."||x[1]==="/")){y.push("/");break}}else if(w===3&&x==="/.."){y.length!==0&&y.pop(),y.push("/");break}if(x[0]==="."){if(x[1]==="."){if(x[2]==="/"){x=x.slice(3);continue}}else if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&x[1]==="."){if(x[2]==="/"){x=x.slice(2);continue}else if(x[2]==="."&&x[3]==="/"){x=x.slice(3),y.length!==0&&y.pop();continue}}if((T=x.indexOf("/",1))===-1){y.push(x);break}else y.push(x.slice(0,T)),x=x.slice(T)}return y.join("")}function h(g,x){const y=x!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=y(g.scheme)),g.userinfo!==void 0&&(g.userinfo=y(g.userinfo)),g.host!==void 0&&(g.host=y(g.host)),g.path!==void 0&&(g.path=y(g.path)),g.query!==void 0&&(g.query=y(g.query)),g.fragment!==void 0&&(g.fragment=y(g.fragment)),g}function p(g){const x=[];if(g.userinfo!==void 0&&(x.push(g.userinfo),x.push("@")),g.host!==void 0){let y=unescape(g.host);if(!t(y)){const T=c(y);T.isIPV6===!0?y=`[${T.escapedHost}]`:y=g.host}x.push(y)}return(typeof g.port=="number"||typeof g.port=="string")&&(x.push(":"),x.push(String(g.port))),x.length?x.join(""):void 0}return a1={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:h,removeDotSegments:d,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},a1}var l1,wO;function gX(){if(wO)return l1;wO=1;const{isUUID:e}=C4(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function i(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function s(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function l(C){const _=String(C.scheme).toLowerCase()==="https";return(C.port===(_?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function c(C){return C.secure=i(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function u(C){if((C.port===(i(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[_,A]=C.resourceName.split("?");C.path=_&&_!=="/"?_:void 0,C.query=A,C.resourceName=void 0}return C.fragment=void 0,C}function d(C,_){if(!C.path)return C.error="URN can not be parsed",C;const A=C.path.match(t);if(A){const M=_.scheme||C.scheme||"urn";C.nid=A[1].toLowerCase(),C.nss=A[2];const P=`${M}:${_.nid||C.nid}`,I=b(P);C.path=void 0,I&&(C=I.parse(C,_))}else C.error=C.error||"URN can not be parsed.";return C}function h(C,_){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=_.scheme||C.scheme||"urn",M=C.nid.toLowerCase(),P=`${A}:${_.nid||M}`,I=b(P);I&&(C=I.serialize(C,_));const z=C,q=C.nss;return z.path=`${M||_.nid}:${q}`,_.skipEscape=!0,z}function p(C,_){const A=C;return A.uuid=A.nss,A.nss=void 0,!_.tolerant&&(!A.uuid||!e(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function g(C){const _=C;return _.nss=(C.uuid||"").toLowerCase(),_}const x={scheme:"http",domainHost:!0,parse:s,serialize:l},y={scheme:"https",domainHost:x.domainHost,parse:s,serialize:l},T={scheme:"ws",domainHost:!0,parse:c,serialize:u},w={scheme:"wss",domainHost:T.domainHost,parse:T.parse,serialize:T.serialize},E={http:x,https:y,ws:T,wss:w,urn:{scheme:"urn",parse:d,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(E,null);function b(C){return C&&(E[C]||E[C.toLowerCase()])||void 0}return l1={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:b},l1}var xO;function T4(){if(xO)return vd.exports;xO=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:i,nonSimpleDomain:s}=C4(),{SCHEMES:l,getSchemeHandler:c}=gX();function u(w,S){return typeof w=="string"?w=g(y(w,S),S):typeof w=="object"&&(w=y(g(w,S),S)),w}function d(w,S,v){const E=v?Object.assign({scheme:"null"},v):{scheme:"null"},b=h(y(w,E),y(S,E),E,!0);return E.skipEscape=!0,g(b,E)}function h(w,S,v,E){const b={};return E||(w=y(g(w,v),v),S=y(g(S,v),v)),v=v||{},!v.tolerant&&S.scheme?(b.scheme=S.scheme,b.userinfo=S.userinfo,b.host=S.host,b.port=S.port,b.path=t(S.path||""),b.query=S.query):(S.userinfo!==void 0||S.host!==void 0||S.port!==void 0?(b.userinfo=S.userinfo,b.host=S.host,b.port=S.port,b.path=t(S.path||""),b.query=S.query):(S.path?(S.path[0]==="/"?b.path=t(S.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?b.path="/"+S.path:w.path?b.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+S.path:b.path=S.path,b.path=t(b.path)),b.query=S.query):(b.path=w.path,S.query!==void 0?b.query=S.query:b.query=w.query),b.userinfo=w.userinfo,b.host=w.host,b.port=w.port),b.scheme=w.scheme),b.fragment=S.fragment,b}function p(w,S,v){return typeof w=="string"?(w=unescape(w),w=g(r(y(w,v),!0),{...v,skipEscape:!0})):typeof w=="object"&&(w=g(r(w,!0),{...v,skipEscape:!0})),typeof S=="string"?(S=unescape(S),S=g(r(y(S,v),!0),{...v,skipEscape:!0})):typeof S=="object"&&(S=g(r(S,!0),{...v,skipEscape:!0})),w.toLowerCase()===S.toLowerCase()}function g(w,S){const v={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},E=Object.assign({},S),b=[],C=c(E.scheme||v.scheme);C&&C.serialize&&C.serialize(v,E),v.path!==void 0&&(E.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),E.reference!=="suffix"&&v.scheme&&b.push(v.scheme,":");const _=n(v);if(_!==void 0&&(E.reference!=="suffix"&&b.push("//"),b.push(_),v.path&&v.path[0]!=="/"&&b.push("/")),v.path!==void 0){let A=v.path;!E.absolutePath&&(!C||!C.absolutePath)&&(A=t(A)),_===void 0&&A[0]==="/"&&A[1]==="/"&&(A="/%2F"+A.slice(2)),b.push(A)}return v.query!==void 0&&b.push("?",v.query),v.fragment!==void 0&&b.push("#",v.fragment),b.join("")}const x=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(w,S){const v=Object.assign({},S),E={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let b=!1;v.reference==="suffix"&&(v.scheme?w=v.scheme+":"+w:w="//"+w);const C=w.match(x);if(C){if(E.scheme=C[1],E.userinfo=C[3],E.host=C[4],E.port=parseInt(C[5],10),E.path=C[6]||"",E.query=C[7],E.fragment=C[8],isNaN(E.port)&&(E.port=C[5]),E.host)if(i(E.host)===!1){const M=e(E.host);E.host=M.host.toLowerCase(),b=M.isIPV6}else b=!0;E.scheme===void 0&&E.userinfo===void 0&&E.host===void 0&&E.port===void 0&&E.query===void 0&&!E.path?E.reference="same-document":E.scheme===void 0?E.reference="relative":E.fragment===void 0?E.reference="absolute":E.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==E.reference&&(E.error=E.error||"URI is not a "+v.reference+" reference.");const _=c(v.scheme||E.scheme);if(!v.unicodeSupport&&(!_||!_.unicodeSupport)&&E.host&&(v.domainHost||_&&_.domainHost)&&b===!1&&s(E.host))try{E.host=URL.domainToASCII(E.host.toLowerCase())}catch(A){E.error=E.error||"Host's domain name can not be converted to ASCII: "+A}(!_||_&&!_.skipNormalize)&&(w.indexOf("%")!==-1&&(E.scheme!==void 0&&(E.scheme=unescape(E.scheme)),E.host!==void 0&&(E.host=unescape(E.host))),E.path&&(E.path=escape(unescape(E.path))),E.fragment&&(E.fragment=encodeURI(decodeURIComponent(E.fragment)))),_&&_.parse&&_.parse(E,v)}else E.error=E.error||"URI can not be parsed.";return E}const T={SCHEMES:l,normalize:u,resolve:d,resolveComponent:h,equal:p,serialize:g,parse:y};return vd.exports=T,vd.exports.default=T,vd.exports.fastUri=T,vd.exports}var _O;function yX(){if(_O)return vm;_O=1,Object.defineProperty(vm,"__esModule",{value:!0});const e=T4();return e.code='require("ajv/dist/runtime/uri").default',vm.default=e,vm}var EO;function vX(){return EO||(EO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=a0();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=kt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=p_(),i=l0(),s=x4(),l=m_(),c=kt(),u=s0(),d=iy(),h=an(),p=mX,g=yX(),x=(re,$)=>new RegExp(re,$);x.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],T=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function E(re){var $,B,F,D,V,J,ne,oe,he,Ee,te,ie,le,Se,Re,we,Ie,Pe,ye,Ue,De,We,ze,Ve,qe;const dt=re.strict,Ce=($=re.code)===null||$===void 0?void 0:$.optimize,pe=Ce===!0||Ce===void 0?1:Ce||0,Ne=(F=(B=re.code)===null||B===void 0?void 0:B.regExp)!==null&&F!==void 0?F:x,He=(D=re.uriResolver)!==null&&D!==void 0?D:g.default;return{strictSchema:(J=(V=re.strictSchema)!==null&&V!==void 0?V:dt)!==null&&J!==void 0?J:!0,strictNumbers:(oe=(ne=re.strictNumbers)!==null&&ne!==void 0?ne:dt)!==null&&oe!==void 0?oe:!0,strictTypes:(Ee=(he=re.strictTypes)!==null&&he!==void 0?he:dt)!==null&&Ee!==void 0?Ee:"log",strictTuples:(ie=(te=re.strictTuples)!==null&&te!==void 0?te:dt)!==null&&ie!==void 0?ie:"log",strictRequired:(Se=(le=re.strictRequired)!==null&&le!==void 0?le:dt)!==null&&Se!==void 0?Se:!1,code:re.code?{...re.code,optimize:pe,regExp:Ne}:{optimize:pe,regExp:Ne},loopRequired:(Re=re.loopRequired)!==null&&Re!==void 0?Re:v,loopEnum:(we=re.loopEnum)!==null&&we!==void 0?we:v,meta:(Ie=re.meta)!==null&&Ie!==void 0?Ie:!0,messages:(Pe=re.messages)!==null&&Pe!==void 0?Pe:!0,inlineRefs:(ye=re.inlineRefs)!==null&&ye!==void 0?ye:!0,schemaId:(Ue=re.schemaId)!==null&&Ue!==void 0?Ue:"$id",addUsedSchema:(De=re.addUsedSchema)!==null&&De!==void 0?De:!0,validateSchema:(We=re.validateSchema)!==null&&We!==void 0?We:!0,validateFormats:(ze=re.validateFormats)!==null&&ze!==void 0?ze:!0,unicodeRegExp:(Ve=re.unicodeRegExp)!==null&&Ve!==void 0?Ve:!0,int32range:(qe=re.int32range)!==null&&qe!==void 0?qe:!0,uriResolver:He}}class b{constructor($={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...E($)};const{es5:B,lines:F}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:T,es5:B,lines:F}),this.logger=q($.logger);const D=$.validateFormats;$.validateFormats=!1,this.RULES=(0,s.getRules)(),C.call(this,w,$,"NOT SUPPORTED"),C.call(this,S,$,"DEPRECATED","warn"),this._metaOpts=I.call(this),$.formats&&M.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&P.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),A.call(this),$.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:B,schemaId:F}=this.opts;let D=p;F==="id"&&(D={...p},D.id=D.$id,delete D.$id),B&&$&&this.addMetaSchema(D,D[F],!1)}defaultMeta(){const{meta:$,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[B]||$:void 0}validate($,B){let F;if(typeof $=="string"){if(F=this.getSchema($),!F)throw new Error(`no schema with key or ref "${$}"`)}else F=this.compile($);const D=F(B);return"$async"in F||(this.errors=F.errors),D}compile($,B){const F=this._addSchema($,B);return F.validate||this._compileSchemaEnv(F)}compileAsync($,B){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:F}=this.opts;return D.call(this,$,B);async function D(Ee,te){await V.call(this,Ee.$schema);const ie=this._addSchema(Ee,te);return ie.validate||J.call(this,ie)}async function V(Ee){Ee&&!this.getSchema(Ee)&&await D.call(this,{$ref:Ee},!0)}async function J(Ee){try{return this._compileSchemaEnv(Ee)}catch(te){if(!(te instanceof i.default))throw te;return ne.call(this,te),await oe.call(this,te.missingSchema),J.call(this,Ee)}}function ne({missingSchema:Ee,missingRef:te}){if(this.refs[Ee])throw new Error(`AnySchema ${Ee} is loaded but ${te} cannot be resolved`)}async function oe(Ee){const te=await he.call(this,Ee);this.refs[Ee]||await V.call(this,te.$schema),this.refs[Ee]||this.addSchema(te,Ee,B)}async function he(Ee){const te=this._loading[Ee];if(te)return te;try{return await(this._loading[Ee]=F(Ee))}finally{delete this._loading[Ee]}}}addSchema($,B,F,D=this.opts.validateSchema){if(Array.isArray($)){for(const J of $)this.addSchema(J,void 0,F,D);return this}let V;if(typeof $=="object"){const{schemaId:J}=this.opts;if(V=$[J],V!==void 0&&typeof V!="string")throw new Error(`schema ${J} must be string`)}return B=(0,u.normalizeId)(B||V),this._checkUnique(B),this.schemas[B]=this._addSchema($,F,B,D,!0),this}addMetaSchema($,B,F=this.opts.validateSchema){return this.addSchema($,B,!0,F),this}validateSchema($,B){if(typeof $=="boolean")return!0;let F;if(F=$.$schema,F!==void 0&&typeof F!="string")throw new Error("$schema must be a string");if(F=F||this.opts.defaultMeta||this.defaultMeta(),!F)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(F,$);if(!D&&B){const V="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(V);else throw new Error(V)}return D}getSchema($){let B;for(;typeof(B=_.call(this,$))=="string";)$=B;if(B===void 0){const{schemaId:F}=this.opts,D=new l.SchemaEnv({schema:{},schemaId:F});if(B=l.resolveSchema.call(this,D,$),!B)return;this.refs[$]=B}return B.validate||this._compileSchemaEnv(B)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const B=_.call(this,$);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const B=$;this._cache.delete(B);let F=$[this.opts.schemaId];return F&&(F=(0,u.normalizeId)(F),delete this.schemas[F],delete this.refs[F]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const B of $)this.addKeyword(B);return this}addKeyword($,B){let F;if(typeof $=="string")F=$,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=F);else if(typeof $=="object"&&B===void 0){if(B=$,F=B.keyword,Array.isArray(F)&&!F.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X.call(this,F,B),!B)return(0,h.eachItem)(F,V=>Y.call(this,V)),this;Z.call(this,B);const D={...B,type:(0,d.getJSONTypes)(B.type),schemaType:(0,d.getJSONTypes)(B.schemaType)};return(0,h.eachItem)(F,D.type.length===0?V=>Y.call(this,V,D):V=>D.type.forEach(J=>Y.call(this,V,D,J))),this}getKeyword($){const B=this.RULES.all[$];return typeof B=="object"?B.definition:!!B}removeKeyword($){const{RULES:B}=this;delete B.keywords[$],delete B.all[$];for(const F of B.rules){const D=F.rules.findIndex(V=>V.keyword===$);D>=0&&F.rules.splice(D,1)}return this}addFormat($,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[$]=B,this}errorsText($=this.errors,{separator:B=", ",dataVar:F="data"}={}){return!$||$.length===0?"No errors":$.map(D=>`${F}${D.instancePath} ${D.message}`).reduce((D,V)=>D+B+V)}$dataMetaSchema($,B){const F=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const D of B){const V=D.split("/").slice(1);let J=$;for(const ne of V)J=J[ne];for(const ne in F){const oe=F[ne];if(typeof oe!="object")continue;const{$data:he}=oe.definition,Ee=J[ne];he&&Ee&&(J[ne]=ae(Ee))}}return $}_removeAllSchemas($,B){for(const F in $){const D=$[F];(!B||B.test(F))&&(typeof D=="string"?delete $[F]:D&&!D.meta&&(this._cache.delete(D.schema),delete $[F]))}}_addSchema($,B,F,D=this.opts.validateSchema,V=this.opts.addUsedSchema){let J;const{schemaId:ne}=this.opts;if(typeof $=="object")J=$[ne];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof $!="boolean")throw new Error("schema must be object or boolean")}let oe=this._cache.get($);if(oe!==void 0)return oe;F=(0,u.normalizeId)(J||F);const he=u.getSchemaRefs.call(this,$,F);return oe=new l.SchemaEnv({schema:$,schemaId:ne,meta:B,baseId:F,localRefs:he}),this._cache.set(oe.schema,oe),V&&!F.startsWith("#")&&(F&&this._checkUnique(F),this.refs[F]=oe),D&&this.validateSchema($,!0),oe}_checkUnique($){if(this.schemas[$]||this.refs[$])throw new Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta?this._compileMetaSchema($):l.compileSchema.call(this,$),!$.validate)throw new Error("ajv implementation error");return $.validate}_compileMetaSchema($){const B=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,$)}finally{this.opts=B}}}b.ValidationError=r.default,b.MissingRefError=i.default,e.default=b;function C(re,$,B,F="error"){for(const D in re){const V=D;V in $&&this.logger[F](`${B}: option ${D}. ${re[V]}`)}}function _(re){return re=(0,u.normalizeId)(re),this.schemas[re]||this.refs[re]}function A(){const re=this.opts.schemas;if(re)if(Array.isArray(re))this.addSchema(re);else for(const $ in re)this.addSchema(re[$],$)}function M(){for(const re in this.opts.formats){const $=this.opts.formats[re];$&&this.addFormat(re,$)}}function P(re){if(Array.isArray(re)){this.addVocabulary(re);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in re){const B=re[$];B.keyword||(B.keyword=$),this.addKeyword(B)}}function I(){const re={...this.opts};for(const $ of y)delete re[$];return re}const z={log(){},warn(){},error(){}};function q(re){if(re===!1)return z;if(re===void 0)return console;if(re.log&&re.warn&&re.error)return re;throw new Error("logger must implement log, warn and error methods")}const K=/^[a-z_$][a-z0-9_$:-]*$/i;function X(re,$){const{RULES:B}=this;if((0,h.eachItem)(re,F=>{if(B.keywords[F])throw new Error(`Keyword ${F} is already defined`);if(!K.test(F))throw new Error(`Keyword ${F} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function Y(re,$,B){var F;const D=$?.post;if(B&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:V}=this;let J=D?V.post:V.rules.find(({type:oe})=>oe===B);if(J||(J={type:B,rules:[]},V.rules.push(J)),V.keywords[re]=!0,!$)return;const ne={keyword:re,definition:{...$,type:(0,d.getJSONTypes)($.type),schemaType:(0,d.getJSONTypes)($.schemaType)}};$.before?H.call(this,J,ne,$.before):J.rules.push(ne),V.all[re]=ne,(F=$.implements)===null||F===void 0||F.forEach(oe=>this.addKeyword(oe))}function H(re,$,B){const F=re.rules.findIndex(D=>D.keyword===B);F>=0?re.rules.splice(F,0,$):(re.rules.push($),this.logger.warn(`rule ${B} is not defined`))}function Z(re){let{metaSchema:$}=re;$!==void 0&&(re.$data&&this.opts.$data&&($=ae($)),re.validateSchema=this.compile($,!0))}const ee={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ae(re){return{anyOf:[re,ee]}}})(e1)),e1}var bm={},Sm={},wm={},CO;function bX(){if(CO)return wm;CO=1,Object.defineProperty(wm,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return wm.default=e,wm}var ma={},TO;function SX(){if(TO)return ma;TO=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.callRef=ma.getValidate=void 0;const e=l0(),t=xo(),n=kt(),r=Ya(),i=m_(),s=an(),l={keyword:"$ref",schemaType:"string",code(d){const{gen:h,schema:p,it:g}=d,{baseId:x,schemaEnv:y,validateName:T,opts:w,self:S}=g,{root:v}=y;if((p==="#"||p==="#/")&&x===v.baseId)return b();const E=i.resolveRef.call(S,v,x,p);if(E===void 0)throw new e.default(g.opts.uriResolver,x,p);if(E instanceof i.SchemaEnv)return C(E);return _(E);function b(){if(y===v)return u(d,T,y,y.$async);const A=h.scopeValue("root",{ref:v});return u(d,(0,n._)`${A}.validate`,v,v.$async)}function C(A){const M=c(d,A);u(d,M,A,A.$async)}function _(A){const M=h.scopeValue("schema",w.code.source===!0?{ref:A,code:(0,n.stringify)(A)}:{ref:A}),P=h.name("valid"),I=d.subschema({schema:A,dataTypes:[],schemaPath:n.nil,topSchemaRef:M,errSchemaPath:p},P);d.mergeEvaluated(I),d.ok(P)}}};function c(d,h){const{gen:p}=d;return h.validate?p.scopeValue("validate",{ref:h.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:h})}.validate`}ma.getValidate=c;function u(d,h,p,g){const{gen:x,it:y}=d,{allErrors:T,schemaEnv:w,opts:S}=y,v=S.passContext?r.default.this:n.nil;g?E():b();function E(){if(!w.$async)throw new Error("async schema referenced by sync schema");const A=x.let("valid");x.try(()=>{x.code((0,n._)`await ${(0,t.callValidateCode)(d,h,v)}`),_(h),T||x.assign(A,!0)},M=>{x.if((0,n._)`!(${M} instanceof ${y.ValidationError})`,()=>x.throw(M)),C(M),T||x.assign(A,!1)}),d.ok(A)}function b(){d.result((0,t.callValidateCode)(d,h,v),()=>_(h),()=>C(h))}function C(A){const M=(0,n._)`${A}.errors`;x.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${M} : ${r.default.vErrors}.concat(${M})`),x.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function _(A){var M;if(!y.opts.unevaluated)return;const P=(M=p?.validate)===null||M===void 0?void 0:M.evaluated;if(y.props!==!0)if(P&&!P.dynamicProps)P.props!==void 0&&(y.props=s.mergeEvaluated.props(x,P.props,y.props));else{const I=x.var("props",(0,n._)`${A}.evaluated.props`);y.props=s.mergeEvaluated.props(x,I,y.props,n.Name)}if(y.items!==!0)if(P&&!P.dynamicItems)P.items!==void 0&&(y.items=s.mergeEvaluated.items(x,P.items,y.items));else{const I=x.var("items",(0,n._)`${A}.evaluated.items`);y.items=s.mergeEvaluated.items(x,I,y.items,n.Name)}}}return ma.callRef=u,ma.default=l,ma}var RO;function wX(){if(RO)return Sm;RO=1,Object.defineProperty(Sm,"__esModule",{value:!0});const e=bX(),t=SX(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Sm.default=n,Sm}var xm={},_m={},AO;function xX(){if(AO)return _m;AO=1,Object.defineProperty(_m,"__esModule",{value:!0});const e=kt(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${n[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${l}}`},i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:c,schemaCode:u}=s;s.fail$data((0,e._)`${c} ${n[l].fail} ${u} || isNaN(${c})`)}};return _m.default=i,_m}var Em={},OO;function _X(){if(OO)return Em;OO=1,Object.defineProperty(Em,"__esModule",{value:!0});const e=kt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:i,data:s,schemaCode:l,it:c}=r,u=c.opts.multipleOfPrecision,d=i.let("res"),h=u?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${u}`:(0,e._)`${d} !== parseInt(${d})`;r.fail$data((0,e._)`(${l} === 0 || (${d} = ${s}/${l}, ${h}))`)}};return Em.default=n,Em}var Cm={},Tm={},kO;function EX(){if(kO)return Tm;kO=1,Object.defineProperty(Tm,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,i=0,s;for(;i<n;)r++,s=t.charCodeAt(i++),s>=55296&&s<=56319&&i<n&&(s=t.charCodeAt(i),(s&64512)===56320&&i++);return r}return Tm.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Tm}var MO;function CX(){if(MO)return Cm;MO=1,Object.defineProperty(Cm,"__esModule",{value:!0});const e=kt(),t=an(),n=EX(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const c=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:c,schemaCode:u,it:d}=s,h=l==="maxLength"?e.operators.GT:e.operators.LT,p=d.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(s.gen,n.default)}(${c})`;s.fail$data((0,e._)`${p} ${h} ${u}`)}};return Cm.default=i,Cm}var Rm={},jO;function TX(){if(jO)return Rm;jO=1,Object.defineProperty(Rm,"__esModule",{value:!0});const e=xo(),t=kt(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:s,$data:l,schema:c,schemaCode:u,it:d}=i,h=d.opts.unicodeRegExp?"u":"",p=l?(0,t._)`(new RegExp(${u}, ${h}))`:(0,e.usePattern)(i,c);i.fail$data((0,t._)`!${p}.test(${s})`)}};return Rm.default=r,Rm}var Am={},PO;function RX(){if(PO)return Am;PO=1,Object.defineProperty(Am,"__esModule",{value:!0});const e=kt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const s=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:s,schemaCode:l}=r,c=i==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${s}).length ${c} ${l}`)}};return Am.default=n,Am}var Om={},DO;function AX(){if(DO)return Om;DO=1,Object.defineProperty(Om,"__esModule",{value:!0});const e=xo(),t=kt(),n=an(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:c,schemaCode:u,data:d,$data:h,it:p}=s,{opts:g}=p;if(!h&&c.length===0)return;const x=c.length>=g.loopRequired;if(p.allErrors?y():T(),g.strictRequired){const v=s.parentSchema.properties,{definedProperties:E}=s.it;for(const b of c)if(v?.[b]===void 0&&!E.has(b)){const C=p.schemaEnv.baseId+p.errSchemaPath,_=`required property "${b}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,_,p.opts.strictRequired)}}function y(){if(x||h)s.block$data(t.nil,w);else for(const v of c)(0,e.checkReportMissingProp)(s,v)}function T(){const v=l.let("missing");if(x||h){const E=l.let("valid",!0);s.block$data(E,()=>S(v,E)),s.ok(E)}else l.if((0,e.checkMissingProp)(s,c,v)),(0,e.reportMissingProp)(s,v),l.else()}function w(){l.forOf("prop",u,v=>{s.setParams({missingProperty:v}),l.if((0,e.noPropertyInData)(l,d,v,g.ownProperties),()=>s.error())})}function S(v,E){s.setParams({missingProperty:v}),l.forOf(v,u,()=>{l.assign(E,(0,e.propertyInData)(l,d,v,g.ownProperties)),l.if((0,t.not)(E),()=>{s.error(),l.break()})},t.nil)}}};return Om.default=i,Om}var km={},NO;function OX(){if(NO)return km;NO=1,Object.defineProperty(km,"__esModule",{value:!0});const e=kt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const s=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:s,schemaCode:l}=r,c=i==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${s}.length ${c} ${l}`)}};return km.default=n,km}var Mm={},jm={},$O;function g_(){if($O)return jm;$O=1,Object.defineProperty(jm,"__esModule",{value:!0});const e=E4();return e.code='require("ajv/dist/runtime/equal").default',jm.default=e,jm}var IO;function kX(){if(IO)return Mm;IO=1,Object.defineProperty(Mm,"__esModule",{value:!0});const e=iy(),t=kt(),n=an(),r=g_(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${l} are identical)`,params:({params:{i:l,j:c}})=>(0,t._)`{i: ${l}, j: ${c}}`},code(l){const{gen:c,data:u,$data:d,schema:h,parentSchema:p,schemaCode:g,it:x}=l;if(!d&&!h)return;const y=c.let("valid"),T=p.items?(0,e.getSchemaTypes)(p.items):[];l.block$data(y,w,(0,t._)`${g} === false`),l.ok(y);function w(){const b=c.let("i",(0,t._)`${u}.length`),C=c.let("j");l.setParams({i:b,j:C}),c.assign(y,!0),c.if((0,t._)`${b} > 1`,()=>(S()?v:E)(b,C))}function S(){return T.length>0&&!T.some(b=>b==="object"||b==="array")}function v(b,C){const _=c.name("item"),A=(0,e.checkDataTypes)(T,_,x.opts.strictNumbers,e.DataType.Wrong),M=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${b}--;`,()=>{c.let(_,(0,t._)`${u}[${b}]`),c.if(A,(0,t._)`continue`),T.length>1&&c.if((0,t._)`typeof ${_} == "string"`,(0,t._)`${_} += "_"`),c.if((0,t._)`typeof ${M}[${_}] == "number"`,()=>{c.assign(C,(0,t._)`${M}[${_}]`),l.error(),c.assign(y,!1).break()}).code((0,t._)`${M}[${_}] = ${b}`)})}function E(b,C){const _=(0,n.useFunc)(c,r.default),A=c.name("outer");c.label(A).for((0,t._)`;${b}--;`,()=>c.for((0,t._)`${C} = ${b}; ${C}--;`,()=>c.if((0,t._)`${_}(${u}[${b}], ${u}[${C}])`,()=>{l.error(),c.assign(y,!1).break(A)})))}}};return Mm.default=s,Mm}var Pm={},zO;function MX(){if(zO)return Pm;zO=1,Object.defineProperty(Pm,"__esModule",{value:!0});const e=kt(),t=an(),n=g_(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:c,$data:u,schemaCode:d,schema:h}=s;u||h&&typeof h=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(l,n.default)}(${c}, ${d})`):s.fail((0,e._)`${h} !== ${c}`)}};return Pm.default=i,Pm}var Dm={},FO;function jX(){if(FO)return Dm;FO=1,Object.defineProperty(Dm,"__esModule",{value:!0});const e=kt(),t=an(),n=g_(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:c,$data:u,schema:d,schemaCode:h,it:p}=s;if(!u&&d.length===0)throw new Error("enum must have non-empty array");const g=d.length>=p.opts.loopEnum;let x;const y=()=>x??(x=(0,t.useFunc)(l,n.default));let T;if(g||u)T=l.let("valid"),s.block$data(T,w);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const v=l.const("vSchema",h);T=(0,e.or)(...d.map((E,b)=>S(v,b)))}s.pass(T);function w(){l.assign(T,!1),l.forOf("v",h,v=>l.if((0,e._)`${y()}(${c}, ${v})`,()=>l.assign(T,!0).break()))}function S(v,E){const b=d[E];return typeof b=="object"&&b!==null?(0,e._)`${y()}(${c}, ${v}[${E}])`:(0,e._)`${c} === ${b}`}}};return Dm.default=i,Dm}var LO;function PX(){if(LO)return xm;LO=1,Object.defineProperty(xm,"__esModule",{value:!0});const e=xX(),t=_X(),n=CX(),r=TX(),i=RX(),s=AX(),l=OX(),c=kX(),u=MX(),d=jX(),h=[e.default,t.default,n.default,r.default,i.default,s.default,l.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];return xm.default=h,xm}var Nm={},Gc={},VO;function R4(){if(VO)return Gc;VO=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.validateAdditionalItems=void 0;const e=kt(),t=an(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:c}=s,{items:u}=l;if(!Array.isArray(u)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(s,u)}};function i(s,l){const{gen:c,schema:u,data:d,keyword:h,it:p}=s;p.items=!0;const g=c.const("len",(0,e._)`${d}.length`);if(u===!1)s.setParams({len:l.length}),s.pass((0,e._)`${g} <= ${l.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(p,u)){const y=c.var("valid",(0,e._)`${g} <= ${l.length}`);c.if((0,e.not)(y),()=>x(y)),s.ok(y)}function x(y){c.forRange("i",l.length,g,T=>{s.subschema({keyword:h,dataProp:T,dataPropType:t.Type.Num},y),p.allErrors||c.if((0,e.not)(y),()=>c.break())})}}return Gc.validateAdditionalItems=i,Gc.default=r,Gc}var $m={},Zc={},UO;function A4(){if(UO)return Zc;UO=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.validateTuple=void 0;const e=kt(),t=an(),n=xo(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:c}=s;if(Array.isArray(l))return i(s,"additionalItems",l);c.items=!0,!(0,t.alwaysValidSchema)(c,l)&&s.ok((0,n.validateArray)(s))}};function i(s,l,c=s.schema){const{gen:u,parentSchema:d,data:h,keyword:p,it:g}=s;T(d),g.opts.unevaluated&&c.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(u,c.length,g.items));const x=u.name("valid"),y=u.const("len",(0,e._)`${h}.length`);c.forEach((w,S)=>{(0,t.alwaysValidSchema)(g,w)||(u.if((0,e._)`${y} > ${S}`,()=>s.subschema({keyword:p,schemaProp:S,dataProp:S},x)),s.ok(x))});function T(w){const{opts:S,errSchemaPath:v}=g,E=c.length,b=E===w.minItems&&(E===w.maxItems||w[l]===!1);if(S.strictTuples&&!b){const C=`"${p}" is ${E}-tuple, but minItems or maxItems/${l} are not specified or different at path "${v}"`;(0,t.checkStrictMode)(g,C,S.strictTuples)}}}return Zc.validateTuple=i,Zc.default=r,Zc}var qO;function DX(){if(qO)return $m;qO=1,Object.defineProperty($m,"__esModule",{value:!0});const e=A4(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return $m.default=t,$m}var Im={},BO;function NX(){if(BO)return Im;BO=1,Object.defineProperty(Im,"__esModule",{value:!0});const e=kt(),t=an(),n=xo(),r=R4(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:c,parentSchema:u,it:d}=l,{prefixItems:h}=u;d.items=!0,!(0,t.alwaysValidSchema)(d,c)&&(h?(0,r.validateAdditionalItems)(l,h):l.ok((0,n.validateArray)(l)))}};return Im.default=s,Im}var zm={},HO;function $X(){if(HO)return zm;HO=1,Object.defineProperty(zm,"__esModule",{value:!0});const e=kt(),t=an(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${s}}`},code(i){const{gen:s,schema:l,parentSchema:c,data:u,it:d}=i;let h,p;const{minContains:g,maxContains:x}=c;d.opts.next?(h=g===void 0?1:g,p=x):h=1;const y=s.const("len",(0,e._)`${u}.length`);if(i.setParams({min:h,max:p}),p===void 0&&h===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&h>p){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(d,l)){let E=(0,e._)`${y} >= ${h}`;p!==void 0&&(E=(0,e._)`${E} && ${y} <= ${p}`),i.pass(E);return}d.items=!0;const T=s.name("valid");p===void 0&&h===1?S(T,()=>s.if(T,()=>s.break())):h===0?(s.let(T,!0),p!==void 0&&s.if((0,e._)`${u}.length > 0`,w)):(s.let(T,!1),w()),i.result(T,()=>i.reset());function w(){const E=s.name("_valid"),b=s.let("count",0);S(E,()=>s.if(E,()=>v(b)))}function S(E,b){s.forRange("i",0,y,C=>{i.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},E),b()})}function v(E){s.code((0,e._)`${E}++`),p===void 0?s.if((0,e._)`${E} >= ${h}`,()=>s.assign(T,!0).break()):(s.if((0,e._)`${E} > ${p}`,()=>s.assign(T,!1).break()),h===1?s.assign(T,!0):s.if((0,e._)`${E} >= ${h}`,()=>s.assign(T,!0)))}}};return zm.default=r,zm}var c1={},KO;function IX(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=kt(),n=an(),r=xo();e.error={message:({params:{property:u,depsCount:d,deps:h}})=>{const p=d===1?"property":"properties";return(0,t.str)`must have ${p} ${h} when property ${u} is present`},params:({params:{property:u,depsCount:d,deps:h,missingProperty:p}})=>(0,t._)`{property: ${u},
33
+ missingProperty: ${p},
34
+ depsCount: ${d},
35
+ deps: ${h}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[d,h]=s(u);l(u,d),c(u,h)}};function s({schema:u}){const d={},h={};for(const p in u){if(p==="__proto__")continue;const g=Array.isArray(u[p])?d:h;g[p]=u[p]}return[d,h]}function l(u,d=u.schema){const{gen:h,data:p,it:g}=u;if(Object.keys(d).length===0)return;const x=h.let("missing");for(const y in d){const T=d[y];if(T.length===0)continue;const w=(0,r.propertyInData)(h,p,y,g.opts.ownProperties);u.setParams({property:y,depsCount:T.length,deps:T.join(", ")}),g.allErrors?h.if(w,()=>{for(const S of T)(0,r.checkReportMissingProp)(u,S)}):(h.if((0,t._)`${w} && (${(0,r.checkMissingProp)(u,T,x)})`),(0,r.reportMissingProp)(u,x),h.else())}}e.validatePropertyDeps=l;function c(u,d=u.schema){const{gen:h,data:p,keyword:g,it:x}=u,y=h.name("valid");for(const T in d)(0,n.alwaysValidSchema)(x,d[T])||(h.if((0,r.propertyInData)(h,p,T,x.opts.ownProperties),()=>{const w=u.subschema({keyword:g,schemaProp:T},y);u.mergeValidEvaluated(w,y)},()=>h.var(y,!0)),u.ok(y))}e.validateSchemaDeps=c,e.default=i})(c1)),c1}var Fm={},GO;function zX(){if(GO)return Fm;GO=1,Object.defineProperty(Fm,"__esModule",{value:!0});const e=kt(),t=an(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:l,data:c,it:u}=i;if((0,t.alwaysValidSchema)(u,l))return;const d=s.name("valid");s.forIn("key",c,h=>{i.setParams({propertyName:h}),i.subschema({keyword:"propertyNames",data:h,dataTypes:["string"],propertyName:h,compositeRule:!0},d),s.if((0,e.not)(d),()=>{i.error(!0),u.allErrors||s.break()})}),i.ok(d)}};return Fm.default=r,Fm}var Lm={},ZO;function O4(){if(ZO)return Lm;ZO=1,Object.defineProperty(Lm,"__esModule",{value:!0});const e=xo(),t=kt(),n=Ya(),r=an(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:u,parentSchema:d,data:h,errsCount:p,it:g}=l;if(!p)throw new Error("ajv implementation error");const{allErrors:x,opts:y}=g;if(g.props=!0,y.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,u))return;const T=(0,e.allSchemaProperties)(d.properties),w=(0,e.allSchemaProperties)(d.patternProperties);S(),l.ok((0,t._)`${p} === ${n.default.errors}`);function S(){c.forIn("key",h,_=>{!T.length&&!w.length?b(_):c.if(v(_),()=>b(_))})}function v(_){let A;if(T.length>8){const M=(0,r.schemaRefOrVal)(g,d.properties,"properties");A=(0,e.isOwnProperty)(c,M,_)}else T.length?A=(0,t.or)(...T.map(M=>(0,t._)`${_} === ${M}`)):A=t.nil;return w.length&&(A=(0,t.or)(A,...w.map(M=>(0,t._)`${(0,e.usePattern)(l,M)}.test(${_})`))),(0,t.not)(A)}function E(_){c.code((0,t._)`delete ${h}[${_}]`)}function b(_){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){E(_);return}if(u===!1){l.setParams({additionalProperty:_}),l.error(),x||c.break();return}if(typeof u=="object"&&!(0,r.alwaysValidSchema)(g,u)){const A=c.name("valid");y.removeAdditional==="failing"?(C(_,A,!1),c.if((0,t.not)(A),()=>{l.reset(),E(_)})):(C(_,A),x||c.if((0,t.not)(A),()=>c.break()))}}function C(_,A,M){const P={keyword:"additionalProperties",dataProp:_,dataPropType:r.Type.Str};M===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(P,A)}}};return Lm.default=s,Lm}var Vm={},WO;function FX(){if(WO)return Vm;WO=1,Object.defineProperty(Vm,"__esModule",{value:!0});const e=a0(),t=xo(),n=an(),r=O4(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,parentSchema:u,data:d,it:h}=s;h.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(h,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(c);for(const w of p)h.definedProperties.add(w);h.opts.unevaluated&&p.length&&h.props!==!0&&(h.props=n.mergeEvaluated.props(l,(0,n.toHash)(p),h.props));const g=p.filter(w=>!(0,n.alwaysValidSchema)(h,c[w]));if(g.length===0)return;const x=l.name("valid");for(const w of g)y(w)?T(w):(l.if((0,t.propertyInData)(l,d,w,h.opts.ownProperties)),T(w),h.allErrors||l.else().var(x,!0),l.endIf()),s.it.definedProperties.add(w),s.ok(x);function y(w){return h.opts.useDefaults&&!h.compositeRule&&c[w].default!==void 0}function T(w){s.subschema({keyword:"properties",schemaProp:w,dataProp:w},x)}}};return Vm.default=i,Vm}var Um={},YO;function LX(){if(YO)return Um;YO=1,Object.defineProperty(Um,"__esModule",{value:!0});const e=xo(),t=kt(),n=an(),r=an(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,data:u,parentSchema:d,it:h}=s,{opts:p}=h,g=(0,e.allSchemaProperties)(c),x=g.filter(b=>(0,n.alwaysValidSchema)(h,c[b]));if(g.length===0||x.length===g.length&&(!h.opts.unevaluated||h.props===!0))return;const y=p.strictSchema&&!p.allowMatchingProperties&&d.properties,T=l.name("valid");h.props!==!0&&!(h.props instanceof t.Name)&&(h.props=(0,r.evaluatedPropsToName)(l,h.props));const{props:w}=h;S();function S(){for(const b of g)y&&v(b),h.allErrors?E(b):(l.var(T,!0),E(b),l.if(T))}function v(b){for(const C in y)new RegExp(b).test(C)&&(0,n.checkStrictMode)(h,`property ${C} matches pattern ${b} (use allowMatchingProperties)`)}function E(b){l.forIn("key",u,C=>{l.if((0,t._)`${(0,e.usePattern)(s,b)}.test(${C})`,()=>{const _=x.includes(b);_||s.subschema({keyword:"patternProperties",schemaProp:b,dataProp:C,dataPropType:r.Type.Str},T),h.opts.unevaluated&&w!==!0?l.assign((0,t._)`${w}[${C}]`,!0):!_&&!h.allErrors&&l.if((0,t.not)(T),()=>l.break())})})}}};return Um.default=i,Um}var qm={},XO;function VX(){if(XO)return qm;XO=1,Object.defineProperty(qm,"__esModule",{value:!0});const e=an(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:i,it:s}=n;if((0,e.alwaysValidSchema)(s,i)){n.fail();return}const l=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return qm.default=t,qm}var Bm={},QO;function UX(){if(QO)return Bm;QO=1,Object.defineProperty(Bm,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xo().validateUnion,error:{message:"must match a schema in anyOf"}};return Bm.default=t,Bm}var Hm={},JO;function qX(){if(JO)return Hm;JO=1,Object.defineProperty(Hm,"__esModule",{value:!0});const e=kt(),t=an(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:l,parentSchema:c,it:u}=i;if(!Array.isArray(l))throw new Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;const d=l,h=s.let("valid",!1),p=s.let("passing",null),g=s.name("_valid");i.setParams({passing:p}),s.block(x),i.result(h,()=>i.reset(),()=>i.error(!0));function x(){d.forEach((y,T)=>{let w;(0,t.alwaysValidSchema)(u,y)?s.var(g,!0):w=i.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},g),T>0&&s.if((0,e._)`${g} && ${h}`).assign(h,!1).assign(p,(0,e._)`[${p}, ${T}]`).else(),s.if(g,()=>{s.assign(h,!0),s.assign(p,T),w&&i.mergeEvaluated(w,e.Name)})})}}};return Hm.default=r,Hm}var Km={},e5;function BX(){if(e5)return Km;e5=1,Object.defineProperty(Km,"__esModule",{value:!0});const e=an(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:i,it:s}=n;if(!Array.isArray(i))throw new Error("ajv implementation error");const l=r.name("valid");i.forEach((c,u)=>{if((0,e.alwaysValidSchema)(s,c))return;const d=n.subschema({keyword:"allOf",schemaProp:u},l);n.ok(l),n.mergeEvaluated(d)})}};return Km.default=t,Km}var Gm={},t5;function HX(){if(t5)return Gm;t5=1,Object.defineProperty(Gm,"__esModule",{value:!0});const e=kt(),t=an(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:c,it:u}=s;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const d=i(u,"then"),h=i(u,"else");if(!d&&!h)return;const p=l.let("valid",!0),g=l.name("_valid");if(x(),s.reset(),d&&h){const T=l.let("ifClause");s.setParams({ifClause:T}),l.if(g,y("then",T),y("else",T))}else d?l.if(g,y("then")):l.if((0,e.not)(g),y("else"));s.pass(p,()=>s.error(!0));function x(){const T=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);s.mergeEvaluated(T)}function y(T,w){return()=>{const S=s.subschema({keyword:T},g);l.assign(p,g),s.mergeValidEvaluated(S,p),w?l.assign(w,(0,e._)`${T}`):s.setParams({ifClause:T})}}}};function i(s,l){const c=s.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(s,c)}return Gm.default=r,Gm}var Zm={},n5;function KX(){if(n5)return Zm;n5=1,Object.defineProperty(Zm,"__esModule",{value:!0});const e=an(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:i}){r.if===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "if" is ignored`)}};return Zm.default=t,Zm}var r5;function GX(){if(r5)return Nm;r5=1,Object.defineProperty(Nm,"__esModule",{value:!0});const e=R4(),t=DX(),n=A4(),r=NX(),i=$X(),s=IX(),l=zX(),c=O4(),u=FX(),d=LX(),h=VX(),p=UX(),g=qX(),x=BX(),y=HX(),T=KX();function w(S=!1){const v=[h.default,p.default,g.default,x.default,y.default,T.default,l.default,c.default,s.default,u.default,d.default];return S?v.push(t.default,r.default):v.push(e.default,n.default),v.push(i.default),v}return Nm.default=w,Nm}var Wm={},Ym={},i5;function ZX(){if(i5)return Ym;i5=1,Object.defineProperty(Ym,"__esModule",{value:!0});const e=kt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,i){const{gen:s,data:l,$data:c,schema:u,schemaCode:d,it:h}=r,{opts:p,errSchemaPath:g,schemaEnv:x,self:y}=h;if(!p.validateFormats)return;c?T():w();function T(){const S=s.scopeValue("formats",{ref:y.formats,code:p.code.formats}),v=s.const("fDef",(0,e._)`${S}[${d}]`),E=s.let("fType"),b=s.let("format");s.if((0,e._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>s.assign(E,(0,e._)`${v}.type || "string"`).assign(b,(0,e._)`${v}.validate`),()=>s.assign(E,(0,e._)`"string"`).assign(b,v)),r.fail$data((0,e.or)(C(),_()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${d} && !${b}`}function _(){const A=x.$async?(0,e._)`(${v}.async ? await ${b}(${l}) : ${b}(${l}))`:(0,e._)`${b}(${l})`,M=(0,e._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${l}))`;return(0,e._)`${b} && ${b} !== true && ${E} === ${i} && !${M}`}}function w(){const S=y.formats[u];if(!S){C();return}if(S===!0)return;const[v,E,b]=_(S);v===i&&r.pass(A());function C(){if(p.strictSchema===!1){y.logger.warn(M());return}throw new Error(M());function M(){return`unknown format "${u}" ignored in schema at path "${g}"`}}function _(M){const P=M instanceof RegExp?(0,e.regexpCode)(M):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(u)}`:void 0,I=s.scopeValue("formats",{key:u,ref:M,code:P});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,e._)`${I}.validate`]:["string",M,I]}function A(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!x.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${l})`}return typeof E=="function"?(0,e._)`${b}(${l})`:(0,e._)`${b}.test(${l})`}}}};return Ym.default=n,Ym}var o5;function WX(){if(o5)return Wm;o5=1,Object.defineProperty(Wm,"__esModule",{value:!0});const t=[ZX().default];return Wm.default=t,Wm}var Al={},s5;function YX(){return s5||(s5=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.contentVocabulary=Al.metadataVocabulary=void 0,Al.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Al.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Al}var a5;function XX(){if(a5)return bm;a5=1,Object.defineProperty(bm,"__esModule",{value:!0});const e=wX(),t=PX(),n=GX(),r=WX(),i=YX(),s=[e.default,t.default,(0,n.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];return bm.default=s,bm}var Xm={},bd={},l5;function QX(){if(l5)return bd;l5=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(bd.DiscrError=e={})),bd}var c5;function JX(){if(c5)return Xm;c5=1,Object.defineProperty(Xm,"__esModule",{value:!0});const e=kt(),t=QX(),n=m_(),r=l0(),i=an(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:u}})=>c===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:d}})=>(0,e._)`{error: ${c}, tag: ${d}, tagValue: ${u}}`},code(c){const{gen:u,data:d,schema:h,parentSchema:p,it:g}=c,{oneOf:x}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=h.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!x)throw new Error("discriminator: requires oneOf keyword");const T=u.let("valid",!1),w=u.const("tag",(0,e._)`${d}${(0,e.getProperty)(y)}`);u.if((0,e._)`typeof ${w} == "string"`,()=>S(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:y})),c.ok(T);function S(){const b=E();u.if(!1);for(const C in b)u.elseIf((0,e._)`${w} === ${C}`),u.assign(T,v(b[C]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:y}),u.endIf()}function v(b){const C=u.name("valid"),_=c.subschema({keyword:"oneOf",schemaProp:b},C);return c.mergeEvaluated(_,e.Name),C}function E(){var b;const C={},_=M(p);let A=!0;for(let z=0;z<x.length;z++){let q=x[z];if(q?.$ref&&!(0,i.schemaHasRulesButRef)(q,g.self.RULES)){const X=q.$ref;if(q=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,X),q instanceof n.SchemaEnv&&(q=q.schema),q===void 0)throw new r.default(g.opts.uriResolver,g.baseId,X)}const K=(b=q?.properties)===null||b===void 0?void 0:b[y];if(typeof K!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);A=A&&(_||M(q)),P(K,z)}if(!A)throw new Error(`discriminator: "${y}" must be required`);return C;function M({required:z}){return Array.isArray(z)&&z.includes(y)}function P(z,q){if(z.const)I(z.const,q);else if(z.enum)for(const K of z.enum)I(K,q);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function I(z,q){if(typeof z!="string"||z in C)throw new Error(`discriminator: "${y}" values must be unique strings`);C[z]=q}}}};return Xm.default=l,Xm}const eQ="http://json-schema.org/draft-07/schema#",tQ="http://json-schema.org/draft-07/schema#",nQ="Core schema meta-schema",rQ={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},iQ=["object","boolean"],oQ={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},sQ={$schema:eQ,$id:tQ,title:nQ,definitions:rQ,type:iQ,properties:oQ,default:!0};var u5;function y_(){return u5||(u5=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=vX(),r=XX(),i=JX(),s=sQ,l=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(y,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var d=a0();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=kt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var p=p_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=l0();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(pm,pm.exports)),pm.exports}var k4=y_();const aQ=Qo(k4);var Qm={exports:{}},u1={},f5;function lQ(){return f5||(f5=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(z,q){return{validate:z,compare:q}}e.fullFormats={date:t(s,l),time:t(u(!0),d),"date-time":t(g(!0),x),"iso-time":t(u(),h),"iso-date-time":t(g(),y),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:S,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:I,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:E,int32:{type:"number",validate:_},int64:{type:"number",validate:A},float:{type:"number",validate:M},double:{type:"number",validate:M},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,x),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(z){return z%4===0&&(z%100!==0||z%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(z){const q=r.exec(z);if(!q)return!1;const K=+q[1],X=+q[2],Y=+q[3];return X>=1&&X<=12&&Y>=1&&Y<=(X===2&&n(K)?29:i[X])}function l(z,q){if(z&&q)return z>q?1:z<q?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(z){return function(K){const X=c.exec(K);if(!X)return!1;const Y=+X[1],H=+X[2],Z=+X[3],ee=X[4],ae=X[5]==="-"?-1:1,re=+(X[6]||0),$=+(X[7]||0);if(re>23||$>59||z&&!ee)return!1;if(Y<=23&&H<=59&&Z<60)return!0;const B=H-$*ae,F=Y-re*ae-(B<0?1:0);return(F===23||F===-1)&&(B===59||B===-1)&&Z<61}}function d(z,q){if(!(z&&q))return;const K=new Date("2020-01-01T"+z).valueOf(),X=new Date("2020-01-01T"+q).valueOf();if(K&&X)return K-X}function h(z,q){if(!(z&&q))return;const K=c.exec(z),X=c.exec(q);if(K&&X)return z=K[1]+K[2]+K[3],q=X[1]+X[2]+X[3],z>q?1:z<q?-1:0}const p=/t|\s/i;function g(z){const q=u(z);return function(X){const Y=X.split(p);return Y.length===2&&s(Y[0])&&q(Y[1])}}function x(z,q){if(!(z&&q))return;const K=new Date(z).valueOf(),X=new Date(q).valueOf();if(K&&X)return K-X}function y(z,q){if(!(z&&q))return;const[K,X]=z.split(p),[Y,H]=q.split(p),Z=l(K,Y);if(Z!==void 0)return Z||d(X,H)}const T=/\/|:/,w=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function S(z){return T.test(z)&&w.test(z)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function E(z){return v.lastIndex=0,v.test(z)}const b=-2147483648,C=2**31-1;function _(z){return Number.isInteger(z)&&z<=C&&z>=b}function A(z){return Number.isInteger(z)}function M(){return!0}const P=/[^\\]\\Z/;function I(z){if(P.test(z))return!1;try{return new RegExp(z),!0}catch{return!1}}})(u1)),u1}var f1={},d5;function cQ(){return d5||(d5=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=y_(),n=kt(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:c,schemaCode:u})=>(0,n.str)`should be ${i[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>(0,n._)`{comparison: ${i[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:u,data:d,schemaCode:h,keyword:p,it:g}=c,{opts:x,self:y}=g;if(!x.validateFormats)return;const T=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");T.$data?w():S();function w(){const E=u.scopeValue("formats",{ref:y.formats,code:x.code.formats}),b=u.const("fmt",(0,n._)`${E}[${T.schemaCode}]`);c.fail$data((0,n.or)((0,n._)`typeof ${b} != "object"`,(0,n._)`${b} instanceof RegExp`,(0,n._)`typeof ${b}.compare != "function"`,v(b)))}function S(){const E=T.schema,b=y.formats[E];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const C=u.scopeValue("formats",{key:E,ref:b,code:x.code.formats?(0,n._)`${x.code.formats}${(0,n.getProperty)(E)}`:void 0});c.fail$data(v(C))}function v(E){return(0,n._)`${E}.compare(${d}, ${h}) ${i[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(f1)),f1}var h5;function uQ(){return h5||(h5=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=lQ(),r=cQ(),i=kt(),s=new i.Name("fullFormats"),l=new i.Name("fastFormats"),c=(d,h={keywords:!0})=>{if(Array.isArray(h))return u(d,h,n.fullFormats,s),d;const[p,g]=h.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],x=h.formats||n.formatNames;return u(d,x,p,g),h.keywords&&(0,r.default)(d),d};c.get=(d,h="full")=>{const g=(h==="fast"?n.fastFormats:n.fullFormats)[d];if(!g)throw new Error(`Unknown format "${d}"`);return g};function u(d,h,p,g){var x,y;(x=(y=d.opts.code).formats)!==null&&x!==void 0||(y.formats=(0,i._)`require("ajv-formats/dist/formats").${g}`);for(const T of h)d.addFormat(T,p[T])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(Qm,Qm.exports)),Qm.exports}var fQ=uQ();const dQ=Qo(fQ);function hQ(){const e=new k4.Ajv({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return dQ(e),e}class pQ{constructor(t){this._ajv=t??hQ()}getValidator(t){var n;const r="$id"in t&&typeof t.$id=="string"?(n=this._ajv.getSchema(t.$id))!==null&&n!==void 0?n:this._ajv.compile(t):this._ajv.compile(t);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class mQ{constructor(t){this._client=t}async*callToolStream(t,n=i0,r){var i;const s=this._client,l={...r,task:(i=r?.task)!==null&&i!==void 0?i:s.isToolTask(t.name)?{}:void 0},c=s.requestStream({method:"tools/call",params:t},n,l),u=s.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&u){const h=d.result;if(!h.structuredContent&&!h.isError){yield{type:"error",error:new pt(_t.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(h.structuredContent)try{const p=u(h.structuredContent);if(!p.valid){yield{type:"error",error:new pt(_t.InvalidParams,`Structured content does not match the tool's output schema: ${p.errorMessage}`)};return}}catch(p){if(p instanceof pt){yield{type:"error",error:p};return}yield{type:"error",error:new pt(_t.InvalidParams,`Failed to validate structured content: ${p instanceof Error?p.message:String(p)}`)};return}}yield d}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function gQ(e,t,n){var r;if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!(!((r=e.tools)===null||r===void 0)&&r.call))throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function yQ(e,t,n){var r,i;if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!(!((r=e.sampling)===null||r===void 0)&&r.createMessage))throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!(!((i=e.elicitation)===null||i===void 0)&&i.create))throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function Rg(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const i of Object.keys(r)){const s=r[i];n[i]===void 0&&Object.prototype.hasOwnProperty.call(s,"default")&&(n[i]=s.default),n[i]!==void 0&&Rg(s,n[i])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)Rg(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)Rg(n,t)}}function vQ(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}class bQ extends nX{constructor(t,n){var r,i;super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._capabilities=(r=n?.capabilities)!==null&&r!==void 0?r:{},this._jsonSchemaValidator=(i=n?.jsonSchemaValidator)!==null&&i!==void 0?i:new pQ}get experimental(){return this._experimental||(this._experimental={tasks:new mQ(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=rX(this._capabilities,t)}setRequestHandler(t,n){var r,i,s;const l=IP(t),c=l?.method;if(!c)throw new Error("Schema is missing a method literal");let u;if(e0(c)){const h=c,p=(r=h._zod)===null||r===void 0?void 0:r.def;u=(i=p?.value)!==null&&i!==void 0?i:h.value}else{const h=c,p=h._def;u=(s=p?.value)!==null&&s!==void 0?s:h.value}if(typeof u!="string")throw new Error("Schema method literal must be a string");const d=u;if(d==="elicitation/create"){const h=async(p,g)=>{var x,y,T;const w=xa(b4,p);if(!w.success){const P=w.error instanceof Error?w.error.message:String(w.error);throw new pt(_t.InvalidParams,`Invalid elicitation request: ${P}`)}const{params:S}=w.data,v=(x=S.mode)!==null&&x!==void 0?x:"form",{supportsFormMode:E,supportsUrlMode:b}=vQ(this._capabilities.elicitation);if(v==="form"&&!E)throw new pt(_t.InvalidParams,"Client does not support form-mode elicitation requests");if(v==="url"&&!b)throw new pt(_t.InvalidParams,"Client does not support URL-mode elicitation requests");const C=await Promise.resolve(n(p,g));if(S.task){const P=xa(nh,C);if(!P.success){const I=P.error instanceof Error?P.error.message:String(P.error);throw new pt(_t.InvalidParams,`Invalid task creation result: ${I}`)}return P.data}const _=xa(S4,C);if(!_.success){const P=_.error instanceof Error?_.error.message:String(_.error);throw new pt(_t.InvalidParams,`Invalid elicitation result: ${P}`)}const A=_.data,M=v==="form"?S.requestedSchema:void 0;if(v==="form"&&A.action==="accept"&&A.content&&M&&!((T=(y=this._capabilities.elicitation)===null||y===void 0?void 0:y.form)===null||T===void 0)&&T.applyDefaults)try{Rg(M,A.content)}catch{}return A};return super.setRequestHandler(t,h)}if(d==="sampling/createMessage"){const h=async(p,g)=>{const x=xa(y4,p);if(!x.success){const S=x.error instanceof Error?x.error.message:String(x.error);throw new pt(_t.InvalidParams,`Invalid sampling request: ${S}`)}const{params:y}=x.data,T=await Promise.resolve(n(p,g));if(y.task){const S=xa(nh,T);if(!S.success){const v=S.error instanceof Error?S.error.message:String(S.error);throw new pt(_t.InvalidParams,`Invalid task creation result: ${v}`)}return S.data}const w=xa(v4,T);if(!w.success){const S=w.error instanceof Error?w.error.message:String(w.error);throw new pt(_t.InvalidParams,`Invalid sampling result: ${S}`)}return w.data};return super.setRequestHandler(t,h)}return super.setRequestHandler(t,n)}assertCapability(t,n){var r;if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r[t]))throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:t0,capabilities:this._capabilities,clientInfo:this._clientInfo}},r4,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!wW.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"})}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){var n,r,i,s,l;switch(t){case"logging/setLevel":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.logging))throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.prompts))throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.resources))throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!(!((l=this._serverCapabilities)===null||l===void 0)&&l.completions))throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){var n;switch(t){case"notifications/roots/list_changed":if(!(!((n=this._capabilities.roots)===null||n===void 0)&&n.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){var n,r;gQ((r=(n=this._serverCapabilities)===null||n===void 0?void 0:n.tasks)===null||r===void 0?void 0:r.requests,t,"Server")}assertTaskHandlerCapability(t){var n;this._capabilities&&yQ((n=this._capabilities.tasks)===null||n===void 0?void 0:n.requests,t,"Client")}async ping(t){return this.request({method:"ping"},fu,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},w4,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},fu,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},h4,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},d4,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},c4,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},u4,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},f4,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},fu,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},fu,n)}async callTool(t,n=i0,r){if(this.isToolTaskRequired(t.name))throw new pt(_t.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const i=await this.request({method:"tools/call",params:t},n,r),s=this.getToolOutputValidator(t.name);if(s){if(!i.structuredContent&&!i.isError)throw new pt(_t.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(i.structuredContent)try{const l=s(i.structuredContent);if(!l.valid)throw new pt(_t.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)}catch(l){throw l instanceof pt?l:new pt(_t.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return i}isToolTask(t){var n,r,i,s;return!((s=(i=(r=(n=this._serverCapabilities)===null||n===void 0?void 0:n.tasks)===null||r===void 0?void 0:r.requests)===null||i===void 0?void 0:i.tools)===null||s===void 0)&&s.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){var n;this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const r of t){if(r.outputSchema){const s=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,s)}const i=(n=r.execution)===null||n===void 0?void 0:n.taskSupport;(i==="required"||i==="optional")&&this._cachedKnownTaskTools.add(r.name),i==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},m4,n);return this.cacheToolMetadata(r.tools),r}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function ew(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function SQ(e=fetch,t){return t?async(n,r)=>{const i={...t,...r,headers:r?.headers?{...ew(t.headers),...ew(r.headers)}:t.headers};return e(n,i)}:e}let v_;v_=globalThis.crypto;async function wQ(e){return(await v_).getRandomValues(new Uint8Array(e))}async function xQ(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let n="";const r=await wQ(e);for(let i=0;i<e;i++){const s=r[i]%t.length;n+=t[s]}return n}async function _Q(e){return await xQ(e)}async function EQ(e){const t=await(await v_).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function CQ(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await _Q(e),n=await EQ(t);return{code_verifier:t,code_challenge:n}}const Lr=OZ().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:bW.custom,message:"URL must be parseable",fatal:!0}),tH}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),TQ=mi({resource:de().url(),authorization_servers:Ze(Lr).optional(),jwks_uri:de().url().optional(),scopes_supported:Ze(de()).optional(),bearer_methods_supported:Ze(de()).optional(),resource_signing_alg_values_supported:Ze(de()).optional(),resource_name:de().optional(),resource_documentation:de().optional(),resource_policy_uri:de().url().optional(),resource_tos_uri:de().url().optional(),tls_client_certificate_bound_access_tokens:Vn().optional(),authorization_details_types_supported:Ze(de()).optional(),dpop_signing_alg_values_supported:Ze(de()).optional(),dpop_bound_access_tokens_required:Vn().optional()}),M4=mi({issuer:de(),authorization_endpoint:Lr,token_endpoint:Lr,registration_endpoint:Lr.optional(),scopes_supported:Ze(de()).optional(),response_types_supported:Ze(de()),response_modes_supported:Ze(de()).optional(),grant_types_supported:Ze(de()).optional(),token_endpoint_auth_methods_supported:Ze(de()).optional(),token_endpoint_auth_signing_alg_values_supported:Ze(de()).optional(),service_documentation:Lr.optional(),revocation_endpoint:Lr.optional(),revocation_endpoint_auth_methods_supported:Ze(de()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ze(de()).optional(),introspection_endpoint:de().optional(),introspection_endpoint_auth_methods_supported:Ze(de()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ze(de()).optional(),code_challenge_methods_supported:Ze(de()).optional(),client_id_metadata_document_supported:Vn().optional()}),RQ=mi({issuer:de(),authorization_endpoint:Lr,token_endpoint:Lr,userinfo_endpoint:Lr.optional(),jwks_uri:Lr,registration_endpoint:Lr.optional(),scopes_supported:Ze(de()).optional(),response_types_supported:Ze(de()),response_modes_supported:Ze(de()).optional(),grant_types_supported:Ze(de()).optional(),acr_values_supported:Ze(de()).optional(),subject_types_supported:Ze(de()),id_token_signing_alg_values_supported:Ze(de()),id_token_encryption_alg_values_supported:Ze(de()).optional(),id_token_encryption_enc_values_supported:Ze(de()).optional(),userinfo_signing_alg_values_supported:Ze(de()).optional(),userinfo_encryption_alg_values_supported:Ze(de()).optional(),userinfo_encryption_enc_values_supported:Ze(de()).optional(),request_object_signing_alg_values_supported:Ze(de()).optional(),request_object_encryption_alg_values_supported:Ze(de()).optional(),request_object_encryption_enc_values_supported:Ze(de()).optional(),token_endpoint_auth_methods_supported:Ze(de()).optional(),token_endpoint_auth_signing_alg_values_supported:Ze(de()).optional(),display_values_supported:Ze(de()).optional(),claim_types_supported:Ze(de()).optional(),claims_supported:Ze(de()).optional(),service_documentation:de().optional(),claims_locales_supported:Ze(de()).optional(),ui_locales_supported:Ze(de()).optional(),claims_parameter_supported:Vn().optional(),request_parameter_supported:Vn().optional(),request_uri_parameter_supported:Vn().optional(),require_request_uri_registration:Vn().optional(),op_policy_uri:Lr.optional(),op_tos_uri:Lr.optional(),client_id_metadata_document_supported:Vn().optional()}),AQ=Le({...RQ.shape,...M4.pick({code_challenge_methods_supported:!0}).shape}),OQ=Le({access_token:de(),id_token:de().optional(),token_type:de(),expires_in:SW().optional(),scope:de().optional(),refresh_token:de().optional()}).strip(),kQ=Le({error:de(),error_description:de().optional(),error_uri:de().optional()}),p5=Lr.optional().or(it("").transform(()=>{})),MQ=Le({redirect_uris:Ze(Lr),token_endpoint_auth_method:de().optional(),grant_types:Ze(de()).optional(),response_types:Ze(de()).optional(),client_name:de().optional(),client_uri:Lr.optional(),logo_uri:p5,scope:de().optional(),contacts:Ze(de()).optional(),tos_uri:p5,policy_uri:de().optional(),jwks_uri:Lr.optional(),jwks:WZ().optional(),software_id:de().optional(),software_version:de().optional(),software_statement:de().optional()}).strip(),jQ=Le({client_id:de(),client_secret:de().optional(),client_id_issued_at:wn().optional(),client_secret_expires_at:wn().optional()}).strip(),PQ=MQ.merge(jQ);Le({error:de(),error_description:de().optional()}).strip();Le({token:de(),token_type_hint:de().optional()}).strip();function DQ(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function NQ({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const i=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",s=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return i.startsWith(s)}class kr extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class tw extends kr{}tw.errorCode="invalid_request";class oy extends kr{}oy.errorCode="invalid_client";class sy extends kr{}sy.errorCode="invalid_grant";class ay extends kr{}ay.errorCode="unauthorized_client";class nw extends kr{}nw.errorCode="unsupported_grant_type";class rw extends kr{}rw.errorCode="invalid_scope";class iw extends kr{}iw.errorCode="access_denied";class Fu extends kr{}Fu.errorCode="server_error";class ow extends kr{}ow.errorCode="temporarily_unavailable";class sw extends kr{}sw.errorCode="unsupported_response_type";class aw extends kr{}aw.errorCode="unsupported_token_type";class lw extends kr{}lw.errorCode="invalid_token";class cw extends kr{}cw.errorCode="method_not_allowed";class uw extends kr{}uw.errorCode="too_many_requests";class ly extends kr{}ly.errorCode="invalid_client_metadata";class fw extends kr{}fw.errorCode="insufficient_scope";class dw extends kr{}dw.errorCode="invalid_target";const $Q={[tw.errorCode]:tw,[oy.errorCode]:oy,[sy.errorCode]:sy,[ay.errorCode]:ay,[nw.errorCode]:nw,[rw.errorCode]:rw,[iw.errorCode]:iw,[Fu.errorCode]:Fu,[ow.errorCode]:ow,[sw.errorCode]:sw,[aw.errorCode]:aw,[lw.errorCode]:lw,[cw.errorCode]:cw,[uw.errorCode]:uw,[ly.errorCode]:ly,[fw.errorCode]:fw,[dw.errorCode]:dw};class Wc extends Error{constructor(t){super(t??"Unauthorized")}}function IQ(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const d1="code",h1="S256";function zQ(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&IQ(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function FQ(e,t,n,r){const{client_id:i,client_secret:s}=t;switch(e){case"client_secret_basic":LQ(i,s,n);return;case"client_secret_post":VQ(i,s,r);return;case"none":UQ(i,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function LQ(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function VQ(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function UQ(e,t){t.set("client_id",e)}async function j4(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=kQ.parse(JSON.parse(n)),{error:i,error_description:s,error_uri:l}=r,c=$Q[i]||Fu;return new c(s||"",l)}catch(r){const i=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new Fu(i)}}async function Jm(e,t){var n,r;try{return await p1(e,t)}catch(i){if(i instanceof oy||i instanceof ay)return await((n=e.invalidateCredentials)===null||n===void 0?void 0:n.call(e,"all")),await p1(e,t);if(i instanceof sy)return await((r=e.invalidateCredentials)===null||r===void 0?void 0:r.call(e,"tokens")),await p1(e,t);throw i}}async function p1(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:i,fetchFn:s}){var l,c;let u,d;try{u=await HQ(t,{resourceMetadataUrl:i},s),u.authorization_servers&&u.authorization_servers.length>0&&(d=u.authorization_servers[0])}catch{}d||(d=new URL("/",t));const h=await BQ(t,e,u),p=await YQ(d,{fetchFn:s});let g=await Promise.resolve(e.clientInformation());if(!g){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const v=p?.client_id_metadata_document_supported===!0,E=e.clientMetadataUrl;if(E&&!qQ(E))throw new ly(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${E}`);if(v&&E)g={client_id:E},await((l=e.saveClientInformation)===null||l===void 0?void 0:l.call(e,g));else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await tJ(d,{metadata:p,clientMetadata:e.clientMetadata,fetchFn:s});await e.saveClientInformation(C),g=C}}const x=!e.redirectUrl;if(n!==void 0||x){const v=await eJ(e,d,{metadata:p,resource:h,authorizationCode:n,fetchFn:s});return await e.saveTokens(v),"AUTHORIZED"}const y=await e.tokens();if(y?.refresh_token)try{const v=await JQ(d,{metadata:p,clientInformation:g,refreshToken:y.refresh_token,resource:h,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(v),"AUTHORIZED"}catch(v){if(!(!(v instanceof kr)||v instanceof Fu))throw v}const T=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:S}=await XQ(d,{metadata:p,clientInformation:g,state:T,redirectUrl:e.redirectUrl,scope:r||((c=u?.scopes_supported)===null||c===void 0?void 0:c.join(" "))||e.clientMetadata.scope,resource:h});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(w),"REDIRECT"}function qQ(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function BQ(e,t,n){const r=DQ(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!NQ({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function m5(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const i=m1(e,"resource_metadata")||void 0;let s;if(i)try{s=new URL(i)}catch{}const l=m1(e,"scope")||void 0,c=m1(e,"error")||void 0;return{resourceMetadataUrl:s,scope:l,error:c}}function m1(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),i=n.match(r);return i?i[1]||i[2]:null}async function HQ(e,t,n=fetch){var r,i;const s=await ZQ(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!s||s.status===404)throw await((r=s?.body)===null||r===void 0?void 0:r.cancel()),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!s.ok)throw await((i=s.body)===null||i===void 0?void 0:i.cancel()),new Error(`HTTP ${s.status} trying to load well-known OAuth protected resource metadata.`);return TQ.parse(await s.json())}async function b_(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?b_(e,void 0,n):void 0;throw r}}function KQ(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function g5(e,t,n=fetch){return await b_(e,{"MCP-Protocol-Version":t},n)}function GQ(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ZQ(e,t,n,r){var i,s;const l=new URL(e),c=(i=r?.protocolVersion)!==null&&i!==void 0?i:t0;let u;if(r?.metadataUrl)u=new URL(r.metadataUrl);else{const h=KQ(t,l.pathname);u=new URL(h,(s=r?.metadataServerUrl)!==null&&s!==void 0?s:l),u.search=l.search}let d=await g5(u,c,n);if(!r?.metadataUrl&&GQ(d,l.pathname)){const h=new URL(`/.well-known/${t}`,l);d=await g5(h,c,n)}return d}function WQ(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let i=t.pathname;return i.endsWith("/")&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:"oidc"}),r.push({url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function YQ(e,{fetchFn:t=fetch,protocolVersion:n=t0}={}){var r;const i={"MCP-Protocol-Version":n,Accept:"application/json"},s=WQ(e);for(const{url:l,type:c}of s){const u=await b_(l,i,t);if(u){if(!u.ok){if(await((r=u.body)===null||r===void 0?void 0:r.cancel()),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}return c==="oauth"?M4.parse(await u.json()):AQ.parse(await u.json())}}}async function XQ(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:s,resource:l}){let c;if(t){if(c=new URL(t.authorization_endpoint),!t.response_types_supported.includes(d1))throw new Error(`Incompatible auth server: does not support response type ${d1}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(h1))throw new Error(`Incompatible auth server: does not support code challenge method ${h1}`)}else c=new URL("/authorize",e);const u=await CQ(),d=u.code_verifier,h=u.code_challenge;return c.searchParams.set("response_type",d1),c.searchParams.set("client_id",n.client_id),c.searchParams.set("code_challenge",h),c.searchParams.set("code_challenge_method",h1),c.searchParams.set("redirect_uri",String(r)),s&&c.searchParams.set("state",s),i&&c.searchParams.set("scope",i),i?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:d}}function QQ(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function P4(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:s,fetchFn:l}){var c;const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(s&&n.set("resource",s.href),i)await i(d,n,u,t);else if(r){const p=(c=t?.token_endpoint_auth_methods_supported)!==null&&c!==void 0?c:[],g=zQ(r,p);FQ(g,r,d,n)}const h=await(l??fetch)(u,{method:"POST",headers:d,body:n});if(!h.ok)throw await j4(h);return OQ.parse(await h.json())}async function JQ(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:s,fetchFn:l}){const c=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),u=await P4(e,{metadata:t,tokenRequestParams:c,clientInformation:n,addClientAuthentication:s,resource:i,fetchFn:l});return{refresh_token:r,...u}}async function eJ(e,t,{metadata:n,resource:r,authorizationCode:i,fetchFn:s}={}){const l=e.clientMetadata.scope;let c;if(e.prepareTokenRequest&&(c=await e.prepareTokenRequest(l)),!c){if(!i)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const d=await e.codeVerifier();c=QQ(i,d,e.redirectUrl)}const u=await e.clientInformation();return P4(t,{metadata:n,tokenRequestParams:c,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:s})}async function tJ(e,{metadata:t,clientMetadata:n,fetchFn:r}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(r??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!s.ok)throw await j4(s);return PQ.parse(await s.json())}class y5 extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function g1(e){}function nJ(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=g1,onError:n=g1,onRetry:r=g1,onComment:i}=e;let s="",l=!0,c,u="",d="";function h(T){const w=l?T.replace(/^\xEF\xBB\xBF/,""):T,[S,v]=rJ(`${s}${w}`);for(const E of S)p(E);s=v,l=!1}function p(T){if(T===""){x();return}if(T.startsWith(":")){i&&i(T.slice(T.startsWith(": ")?2:1));return}const w=T.indexOf(":");if(w!==-1){const S=T.slice(0,w),v=T[w+1]===" "?2:1,E=T.slice(w+v);g(S,E,T);return}g(T,"",T)}function g(T,w,S){switch(T){case"event":d=w;break;case"data":u=`${u}${w}
36
+ `;break;case"id":c=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?r(parseInt(w,10)):n(new y5(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:S}));break;default:n(new y5(`Unknown field "${T.length>20?`${T.slice(0,20)}…`:T}"`,{type:"unknown-field",field:T,value:w,line:S}));break}}function x(){u.length>0&&t({id:c,event:d||void 0,data:u.endsWith(`
37
+ `)?u.slice(0,-1):u}),c=void 0,u="",d=""}function y(T={}){s&&T.consume&&p(s),l=!0,c=void 0,u="",d="",s=""}return{feed:h,reset:y}}function rJ(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),s=e.indexOf(`
38
+ `,r);let l=-1;if(i!==-1&&s!==-1?l=Math.min(i,s):i!==-1?i===e.length-1?l=-1:l=i:s!==-1&&(l=s),l===-1){n=e.slice(r);break}else{const c=e.slice(r,l);t.push(c),r=l+1,e[r-1]==="\r"&&e[r]===`
39
+ `&&r++}}return[t,n]}class iJ extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let i;super({start(s){i=nJ({onEvent:l=>{s.enqueue(l)},onError(l){t==="terminate"?s.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(s){i.feed(s)}})}}const oJ={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Yc extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class sJ{constructor(t,n){var r;this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=SQ(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=(r=n?.reconnectionOptions)!==null&&r!==void 0?r:oJ}async _authThenStart(){var t;if(!this._authProvider)throw new Wc("No auth provider");let n;try{n=await Jm(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw(t=this.onerror)===null||t===void 0||t.call(this,r),r}if(n!=="AUTHORIZED")throw new Wc;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){var t;const n={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(n.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(n["mcp-session-id"]=this._sessionId),this._protocolVersion&&(n["mcp-protocol-version"]=this._protocolVersion);const r=ew((t=this._requestInit)===null||t===void 0?void 0:t.headers);return new Headers({...n,...r})}async _startOrAuthSse(t){var n,r,i,s;const{resumptionToken:l}=t;try{const c=await this._commonHeaders();c.set("Accept","text/event-stream"),l&&c.set("last-event-id",l);const u=await((n=this._fetch)!==null&&n!==void 0?n:fetch)(this._url,{method:"GET",headers:c,signal:(r=this._abortController)===null||r===void 0?void 0:r.signal});if(!u.ok){if(await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.status===401&&this._authProvider)return await this._authThenStart();if(u.status===405)return;throw new Yc(u.status,`Failed to open SSE stream: ${u.statusText}`)}this._handleSseStream(u.body,t,!0)}catch(c){throw(s=this.onerror)===null||s===void 0||s.call(this,c),c}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,i=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),i)}_scheduleReconnection(t,n=0){var r;const i=this._reconnectionOptions.maxRetries;if(n>=i){(r=this.onerror)===null||r===void 0||r.call(this,new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const s=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{var c;(c=this.onerror)===null||c===void 0||c.call(this,new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,n+1)})},s)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:i,replayMessageId:s}=n;let l,c=!1,u=!1;(async()=>{var h,p,g,x;try{const y=t.pipeThrough(new TextDecoderStream).pipeThrough(new iJ({onRetry:S=>{this._serverRetryMs=S}})).getReader();for(;;){const{value:S,done:v}=await y.read();if(v)break;if(S.id&&(l=S.id,c=!0,i?.(S.id)),!!S.data&&(!S.event||S.event==="message"))try{const E=Jb.parse(JSON.parse(S.data));Td(E)&&(u=!0,s!==void 0&&(E.id=s)),(h=this.onmessage)===null||h===void 0||h.call(this,E)}catch(E){(p=this.onerror)===null||p===void 0||p.call(this,E)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:i,replayMessageId:s},0)}catch(y){if((g=this.onerror)===null||g===void 0||g.call(this,new Error(`SSE stream disconnected: ${y}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:i,replayMessageId:s},0)}catch(S){(x=this.onerror)===null||x===void 0||x.call(this,new Error(`Failed to reconnect: ${S instanceof Error?S.message:String(S)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new Wc("No auth provider");if(await Jm(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Wc("Failed to authorize")}async close(){var t,n;this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),(t=this._abortController)===null||t===void 0||t.abort(),(n=this.onclose)===null||n===void 0||n.call(this)}async send(t,n){var r,i,s,l,c,u,d;try{const{resumptionToken:h,onresumptiontoken:p}=n||{};if(h){this._startOrAuthSse({resumptionToken:h,replayMessageId:JS(t)?t.id:void 0}).catch(E=>{var b;return(b=this.onerror)===null||b===void 0?void 0:b.call(this,E)});return}const g=await this._commonHeaders();g.set("content-type","application/json"),g.set("accept","application/json, text/event-stream");const x={...this._requestInit,method:"POST",headers:g,body:JSON.stringify(t),signal:(r=this._abortController)===null||r===void 0?void 0:r.signal},y=await((i=this._fetch)!==null&&i!==void 0?i:fetch)(this._url,x),T=y.headers.get("mcp-session-id");if(T&&(this._sessionId=T),!y.ok){const E=await y.text().catch(()=>null);if(y.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Yc(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:b,scope:C}=m5(y);if(this._resourceMetadataUrl=b,this._scope=C,await Jm(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Wc;return this._hasCompletedAuthFlow=!0,this.send(t)}if(y.status===403&&this._authProvider){const{resourceMetadataUrl:b,scope:C,error:_}=m5(y);if(_==="insufficient_scope"){const A=y.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===A)throw new Yc(403,"Server returned 403 after trying upscoping");if(C&&(this._scope=C),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=A??void 0,await Jm(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new Wc;return this.send(t)}}throw new Yc(y.status,`Error POSTing to endpoint: ${E}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,y.status===202){await((s=y.body)===null||s===void 0?void 0:s.cancel()),$W(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(E=>{var b;return(b=this.onerror)===null||b===void 0?void 0:b.call(this,E)});return}const S=(Array.isArray(t)?t:[t]).filter(E=>"method"in E&&"id"in E&&E.id!==void 0).length>0,v=y.headers.get("content-type");if(S)if(v?.includes("text/event-stream"))this._handleSseStream(y.body,{onresumptiontoken:p},!1);else if(v?.includes("application/json")){const E=await y.json(),b=Array.isArray(E)?E.map(C=>Jb.parse(C)):[Jb.parse(E)];for(const C of b)(l=this.onmessage)===null||l===void 0||l.call(this,C)}else throw await((c=y.body)===null||c===void 0?void 0:c.cancel()),new Yc(-1,`Unexpected content type: ${v}`);else await((u=y.body)===null||u===void 0?void 0:u.cancel())}catch(h){throw(d=this.onerror)===null||d===void 0||d.call(this,h),h}}get sessionId(){return this._sessionId}async terminateSession(){var t,n,r,i;if(this._sessionId)try{const s=await this._commonHeaders(),l={...this._requestInit,method:"DELETE",headers:s,signal:(t=this._abortController)===null||t===void 0?void 0:t.signal},c=await((n=this._fetch)!==null&&n!==void 0?n:fetch)(this._url,l);if(await((r=c.body)===null||r===void 0?void 0:r.cancel()),!c.ok&&c.status!==405)throw new Yc(c.status,`Failed to terminate session: ${c.statusText}`);this._sessionId=void 0}catch(s){throw(i=this.onerror)===null||i===void 0||i.call(this,s),s}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class aJ{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new sJ(n),this.client=new bQ({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.callTool({name:t,arguments:n??{}})}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Nh=new aJ;Nh.connect("http://localhost:3000/mcp").then(()=>{console.log("Connected to MCP server")});const lJ={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null},D4=()=>{const{data:e}=hL({queryKey:["list-tools"],queryFn:async()=>await Nh.listTools()});return e},cJ=()=>Nh.getServerInfo(),uJ=()=>{const{setToolData:e}=Is();return pL({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await Nh.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...lJ,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta,widgetState:null}}),r}})},zs=()=>{const{selectedTool:e}=Is();return D4().find(n=>n.name===e)},fJ=e=>dL({queryKey:["resource",e],queryFn:async()=>await Nh.readResource(e),enabled:!!e});function v5(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Va(...e){return t=>{let n=!1;const r=e.map(i=>{const s=v5(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():v5(e[i],null)}}}}function rr(...e){return k.useCallback(Va(...e),e)}var dJ=Symbol.for("react.lazy"),cy=of[" use ".trim().toString()];function hJ(e){return typeof e=="object"&&e!==null&&"then"in e}function N4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dJ&&"_payload"in e&&hJ(e._payload)}function $4(e){const t=pJ(e),n=k.forwardRef((r,i)=>{let{children:s,...l}=r;N4(s)&&typeof cy=="function"&&(s=cy(s._payload));const c=k.Children.toArray(s),u=c.find(gJ);if(u){const d=u.props.children,h=c.map(p=>p===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:p);return j.jsx(t,{...l,ref:i,children:k.isValidElement(d)?k.cloneElement(d,void 0,h):null})}return j.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var S_=$4("Slot");function pJ(e){const t=k.forwardRef((n,r)=>{let{children:i,...s}=n;if(N4(i)&&typeof cy=="function"&&(i=cy(i._payload)),k.isValidElement(i)){const l=vJ(i),c=yJ(s,i.props);return i.type!==k.Fragment&&(c.ref=r?Va(r,l):l),k.cloneElement(i,c)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mJ=Symbol("radix.slottable");function gJ(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mJ}function yJ(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const u=s(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function vJ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function I4(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=I4(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function w_(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=I4(e))&&(r&&(r+=" "),r+=t);return r}const b5=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,S5=w_,df=(e,t)=>n=>{var r;if(t?.variants==null)return S5(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,l=Object.keys(i).map(d=>{const h=n?.[d],p=s?.[d];if(h===null)return null;const g=b5(h)||b5(p);return i[d][g]}),c=n&&Object.entries(n).reduce((d,h)=>{let[p,g]=h;return g===void 0||(d[p]=g),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:p,className:g,...x}=h;return Object.entries(x).every(y=>{let[T,w]=y;return Array.isArray(w)?w.includes({...s,...c}[T]):{...s,...c}[T]===w})?[...d,p,g]:d},[]);return S5(e,l,u,n?.class,n?.className)},bJ=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},SJ=(e,t)=>({classGroupId:e,validator:t}),z4=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),uy="-",w5=[],wJ="arbitrary..",xJ=e=>{const t=EJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return _J(l);const c=l.split(uy),u=c[0]===""&&c.length>1?1:0;return F4(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=r[l],d=n[l];return u?d?bJ(d,u):u:d||w5}return n[l]||w5}}},F4=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const d=F4(e,t+1,s);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(uy):e.slice(t).join(uy),u=l.length;for(let d=0;d<u;d++){const h=l[d];if(h.validator(c))return h.classGroupId}},_J=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?wJ+r:void 0})(),EJ=e=>{const{theme:t,classGroups:n}=e;return CJ(n,t)},CJ=(e,t)=>{const n=z4();for(const r in e){const i=e[r];x_(i,n,r,t)}return n},x_=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const l=e[s];TJ(l,t,n,r)}},TJ=(e,t,n,r)=>{if(typeof e=="string"){RJ(e,t,n);return}if(typeof e=="function"){AJ(e,t,n,r);return}OJ(e,t,n,r)},RJ=(e,t,n)=>{const r=e===""?t:L4(t,e);r.classGroupId=n},AJ=(e,t,n,r)=>{if(kJ(e)){x_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(SJ(n,e))},OJ=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let l=0;l<s;l++){const[c,u]=i[l];x_(u,L4(t,c),n,r)}},L4=(e,t)=>{let n=e;const r=t.split(uy),i=r.length;for(let s=0;s<i;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=z4(),n.nextPart.set(l,c)),n=c}return n},kJ=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,MJ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return i(s,l),l},set(s,l){s in n?n[s]=l:i(s,l)}}},hw="!",x5=":",jJ=[],_5=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),PJ=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let l=0,c=0,u=0,d;const h=i.length;for(let T=0;T<h;T++){const w=i[T];if(l===0&&c===0){if(w===x5){s.push(i.slice(u,T)),u=T+1;continue}if(w==="/"){d=T;continue}}w==="["?l++:w==="]"?l--:w==="("?c++:w===")"&&c--}const p=s.length===0?i:i.slice(u);let g=p,x=!1;p.endsWith(hw)?(g=p.slice(0,-1),x=!0):p.startsWith(hw)&&(g=p.slice(1),x=!0);const y=d&&d>u?d-u:void 0;return _5(s,x,g,y)};if(t){const i=t+x5,s=r;r=l=>l.startsWith(i)?s(l.slice(i.length)):_5(jJ,!1,l,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},DJ=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",u=t.has(l);c||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},NJ=e=>({cache:MJ(e.cacheSize),parseClassName:PJ(e),sortModifiers:DJ(e),...xJ(e)}),$J=/\s+/,IJ=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,l=[],c=e.trim().split($J);let u="";for(let d=c.length-1;d>=0;d-=1){const h=c[d],{isExternal:p,modifiers:g,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:T}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let w=!!T,S=r(w?y.substring(0,T):y);if(!S){if(!w){u=h+(u.length>0?" "+u:u);continue}if(S=r(y),!S){u=h+(u.length>0?" "+u:u);continue}w=!1}const v=g.length===0?"":g.length===1?g[0]:s(g).join(":"),E=x?v+hw:v,b=E+S;if(l.indexOf(b)>-1)continue;l.push(b);const C=i(S,w);for(let _=0;_<C.length;++_){const A=C[_];l.push(E+A)}u=h+(u.length>0?" "+u:u)}return u},zJ=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=V4(n))&&(i&&(i+=" "),i+=r);return i},V4=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=V4(e[r]))&&(n&&(n+=" "),n+=t);return n},FJ=(e,...t)=>{let n,r,i,s;const l=u=>{const d=t.reduce((h,p)=>p(h),e());return n=NJ(d),r=n.cache.get,i=n.cache.set,s=c,c(u)},c=u=>{const d=r(u);if(d)return d;const h=IJ(u,n);return i(u,h),h};return s=l,(...u)=>s(zJ(...u))},LJ=[],br=e=>{const t=n=>n[e]||LJ;return t.isThemeGetter=!0,t},U4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VJ=/^\d+\/\d+$/,UJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qJ=/\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$/,BJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xc=e=>VJ.test(e),Dt=e=>!!e&&!Number.isNaN(Number(e)),ga=e=>!!e&&Number.isInteger(Number(e)),y1=e=>e.endsWith("%")&&Dt(e.slice(0,-1)),xs=e=>UJ.test(e),GJ=()=>!0,ZJ=e=>qJ.test(e)&&!BJ.test(e),B4=()=>!1,WJ=e=>HJ.test(e),YJ=e=>KJ.test(e),XJ=e=>!Xe(e)&&!Qe(e),QJ=e=>hf(e,G4,B4),Xe=e=>U4.test(e),Ol=e=>hf(e,Z4,ZJ),v1=e=>hf(e,ree,Dt),E5=e=>hf(e,H4,B4),JJ=e=>hf(e,K4,YJ),eg=e=>hf(e,W4,WJ),Qe=e=>q4.test(e),Sd=e=>pf(e,Z4),eee=e=>pf(e,iee),C5=e=>pf(e,H4),tee=e=>pf(e,G4),nee=e=>pf(e,K4),tg=e=>pf(e,W4,!0),hf=(e,t,n)=>{const r=U4.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pf=(e,t,n=!1)=>{const r=q4.exec(e);return r?r[1]?t(r[1]):n:!1},H4=e=>e==="position"||e==="percentage",K4=e=>e==="image"||e==="url",G4=e=>e==="length"||e==="size"||e==="bg-size",Z4=e=>e==="length",ree=e=>e==="number",iee=e=>e==="family-name",W4=e=>e==="shadow",oee=()=>{const e=br("color"),t=br("font"),n=br("text"),r=br("font-weight"),i=br("tracking"),s=br("leading"),l=br("breakpoint"),c=br("container"),u=br("spacing"),d=br("radius"),h=br("shadow"),p=br("inset-shadow"),g=br("text-shadow"),x=br("drop-shadow"),y=br("blur"),T=br("perspective"),w=br("aspect"),S=br("ease"),v=br("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...b(),Qe,Xe],_=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],M=()=>[Qe,Xe,u],P=()=>[Xc,"full","auto",...M()],I=()=>[ga,"none","subgrid",Qe,Xe],z=()=>["auto",{span:["full",ga,Qe,Xe]},ga,Qe,Xe],q=()=>[ga,"auto",Qe,Xe],K=()=>["auto","min","max","fr",Qe,Xe],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...M()],Z=()=>[Xc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],ee=()=>[e,Qe,Xe],ae=()=>[...b(),C5,E5,{position:[Qe,Xe]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",tee,QJ,{size:[Qe,Xe]}],B=()=>[y1,Sd,Ol],F=()=>["","none","full",d,Qe,Xe],D=()=>["",Dt,Sd,Ol],V=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Dt,y1,C5,E5],oe=()=>["","none",y,Qe,Xe],he=()=>["none",Dt,Qe,Xe],Ee=()=>["none",Dt,Qe,Xe],te=()=>[Dt,Qe,Xe],ie=()=>[Xc,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xs],breakpoint:[xs],color:[GJ],container:[xs],"drop-shadow":[xs],ease:["in","out","in-out"],font:[XJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xs],shadow:[xs],spacing:["px",Dt],text:[xs],"text-shadow":[xs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xc,Xe,Qe,w]}],container:["container"],columns:[{columns:[Dt,Xe,Qe,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ga,"auto",Qe,Xe]}],basis:[{basis:[Xc,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Dt,Xc,"auto","initial","none",Xe]}],grow:[{grow:["",Dt,Qe,Xe]}],shrink:[{shrink:["",Dt,Qe,Xe]}],order:[{order:[ga,"first","last","none",Qe,Xe]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[c,"screen",...Z()]}],"min-w":[{"min-w":[c,"screen","none",...Z()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",n,Sd,Ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Qe,v1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",y1,Xe]}],"font-family":[{font:[eee,Xe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Qe,Xe]}],"line-clamp":[{"line-clamp":[Dt,"none",Qe,v1]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Qe,Xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Qe,Xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[Dt,"from-font","auto",Qe,Ol]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Dt,"auto",Qe,Xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe,Xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe,Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ga,Qe,Xe],radial:["",Qe,Xe],conic:[ga,Qe,Xe]},nee,JJ]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Dt,Qe,Xe]}],"outline-w":[{outline:["",Dt,Sd,Ol]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",h,tg,eg]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",p,tg,eg]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Dt,Ol]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",g,tg,eg]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Dt,Qe,Xe]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[Qe,Xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Qe,Xe]}],filter:[{filter:["","none",Qe,Xe]}],blur:[{blur:oe()}],brightness:[{brightness:[Dt,Qe,Xe]}],contrast:[{contrast:[Dt,Qe,Xe]}],"drop-shadow":[{"drop-shadow":["","none",x,tg,eg]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Dt,Qe,Xe]}],"hue-rotate":[{"hue-rotate":[Dt,Qe,Xe]}],invert:[{invert:["",Dt,Qe,Xe]}],saturate:[{saturate:[Dt,Qe,Xe]}],sepia:[{sepia:["",Dt,Qe,Xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Qe,Xe]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Dt,Qe,Xe]}],"backdrop-contrast":[{"backdrop-contrast":[Dt,Qe,Xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Dt,Qe,Xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Dt,Qe,Xe]}],"backdrop-invert":[{"backdrop-invert":["",Dt,Qe,Xe]}],"backdrop-opacity":[{"backdrop-opacity":[Dt,Qe,Xe]}],"backdrop-saturate":[{"backdrop-saturate":[Dt,Qe,Xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Dt,Qe,Xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Qe,Xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Dt,"initial",Qe,Xe]}],ease:[{ease:["linear","initial",S,Qe,Xe]}],delay:[{delay:[Dt,Qe,Xe]}],animate:[{animate:["none",v,Qe,Xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,Qe,Xe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[Qe,Xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Qe,Xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Qe,Xe]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Dt,Sd,Ol,v1]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Y4=FJ(oee);function gn(...e){return Y4(w_(e))}const see=df("cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Lu=k.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const l=r?S_:"button";return j.jsx(l,{className:gn(see({variant:t,size:n,className:e})),ref:s,...i})});Lu.displayName="Button";const aee=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lee=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),T5=e=>{const t=lee(e);return t.charAt(0).toUpperCase()+t.slice(1)},X4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),cee=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var uee={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const fee=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...uee,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:X4("lucide",i),...!s&&!cee(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(s)?s:[s]]));const _o=(e,t)=>{const n=k.forwardRef(({className:r,...i},s)=>k.createElement(fee,{ref:s,iconNode:t,className:X4(`lucide-${aee(T5(e))}`,`lucide-${e}`,r),...i}));return n.displayName=T5(e),n};const dee=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hee=_o("chevron-down",dee);const pee=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],mee=_o("chevron-up",pee);const gee=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],yee=_o("chevrons-up-down",gee);const vee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bee=_o("circle-alert",vee);const See=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],wee=_o("external-link",See);const xee=[["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"}]],_ee=_o("grip-vertical",xee);const Eee=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Cee=_o("loader-circle",Eee);const Tee=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Ree=_o("moon",Tee);const Aee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Oee=_o("play",Aee);const kee=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Mee=_o("sun",kee);const jee=[["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"}]],Pee=_o("trash",jee),Dee=()=>{const e=cJ(),t=e?.name,n=e?.version,{setSelectedTool:r}=Is();return j.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:j.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),j.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),j.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),j.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),j.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[j.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(Lu,{variant:"ghost",size:"sm",className:"h-8 gap-2",asChild:!0,children:j.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",children:["Learn more about Skybridge",j.jsx(wee,{className:"h-3.5 w-3.5"})]})})})]})})},Q4=k.createContext({});function Nee(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const __=typeof window<"u",$ee=__?k.useLayoutEffect:k.useEffect,E_=k.createContext(null);function C_(e,t){e.indexOf(t)===-1&&e.push(t)}function T_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Os=(e,t,n)=>n>t?t:n<e?e:n;let R_=()=>{};const ks={},J4=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function eD(e){return typeof e=="object"&&e!==null}const tD=e=>/^0[^.\s]+$/u.test(e);function A_(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ji=e=>e,Iee=(e,t)=>n=>t(e(n)),$h=(...e)=>e.reduce(Iee),rh=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class O_{constructor(){this.subscriptions=[]}add(t){return C_(this.subscriptions,t),()=>T_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qo=e=>e*1e3,Xi=e=>e/1e3;function nD(e,t){return t?e*(1e3/t):0}const rD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zee=1e-7,Fee=12;function Lee(e,t,n,r,i){let s,l,c=0;do l=t+(n-t)/2,s=rD(l,r,i)-e,s>0?n=l:t=l;while(Math.abs(s)>zee&&++c<Fee);return l}function Ih(e,t,n,r){if(e===t&&n===r)return Ji;const i=s=>Lee(s,0,1,e,n);return s=>s===0||s===1?s:rD(i(s),t,r)}const iD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oD=e=>t=>1-e(1-t),sD=Ih(.33,1.53,.69,.99),k_=oD(sD),aD=iD(k_),lD=e=>(e*=2)<1?.5*k_(e):.5*(2-Math.pow(2,-10*(e-1))),M_=e=>1-Math.sin(Math.acos(e)),cD=oD(M_),uD=iD(M_),Vee=Ih(.42,0,1,1),Uee=Ih(0,0,.58,1),fD=Ih(.42,0,.58,1),qee=e=>Array.isArray(e)&&typeof e[0]!="number",dD=e=>Array.isArray(e)&&typeof e[0]=="number",Bee={linear:Ji,easeIn:Vee,easeInOut:fD,easeOut:Uee,circIn:M_,circInOut:uD,circOut:cD,backIn:k_,backInOut:aD,backOut:sD,anticipate:lD},Hee=e=>typeof e=="string",R5=e=>{if(dD(e)){R_(e.length===4);const[t,n,r,i]=e;return Ih(t,n,r,i)}else if(Hee(e))return Bee[e];return e},ng=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Kee(e,t){let n=new Set,r=new Set,i=!1,s=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){l.has(h)&&(d.schedule(h),e()),h(c)}const d={schedule:(h,p=!1,g=!1)=>{const y=g&&i?n:r;return p&&l.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),l.delete(h)},process:h=>{if(c=h,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),n.clear(),i=!1,s&&(s=!1,d.process(h))}};return d}const Gee=40;function hD(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=ng.reduce((E,b)=>(E[b]=Kee(s),E),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:p,preRender:g,render:x,postRender:y}=l,T=()=>{const E=ks.useManualTiming?i.timestamp:performance.now();n=!1,ks.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,Gee),1)),i.timestamp=E,i.isProcessing=!0,c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),g.process(i),x.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(T))},w=()=>{n=!0,r=!0,i.isProcessing||e(T)};return{schedule:ng.reduce((E,b)=>{const C=l[b];return E[b]=(_,A=!1,M=!1)=>(n||w(),C.schedule(_,A,M)),E},{}),cancel:E=>{for(let b=0;b<ng.length;b++)l[ng[b]].cancel(E)},state:i,steps:l}}const{schedule:Un,cancel:Ua,state:zr,steps:b1}=hD(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ji,!0);let Ag;function Zee(){Ag=void 0}const hi={now:()=>(Ag===void 0&&hi.set(zr.isProcessing||ks.useManualTiming?zr.timestamp:performance.now()),Ag),set:e=>{Ag=e,queueMicrotask(Zee)}},pD=e=>t=>typeof t=="string"&&t.startsWith(e),j_=pD("--"),Wee=pD("var(--"),P_=e=>Wee(e)?Yee.test(e.split("/*")[0].trim()):!1,Yee=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ih={...mf,transform:e=>Os(0,1,e)},rg={...mf,default:1},Id=e=>Math.round(e*1e5)/1e5,D_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Xee(e){return e==null}const Qee=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,N_=(e,t)=>n=>!!(typeof n=="string"&&Qee.test(n)&&n.startsWith(e)||t&&!Xee(n)&&Object.prototype.hasOwnProperty.call(n,t)),mD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,l,c]=r.match(D_);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Jee=e=>Os(0,255,e),S1={...mf,transform:e=>Math.round(Jee(e))},zl={test:N_("rgb","red"),parse:mD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+S1.transform(e)+", "+S1.transform(t)+", "+S1.transform(n)+", "+Id(ih.transform(r))+")"};function ete(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const pw={test:N_("#"),parse:ete,transform:zl.transform},zh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),va=zh("deg"),Bo=zh("%"),gt=zh("px"),tte=zh("vh"),nte=zh("vw"),A5={...Bo,parse:e=>Bo.parse(e)/100,transform:e=>Bo.transform(e*100)},du={test:N_("hsl","hue"),parse:mD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Bo.transform(Id(t))+", "+Bo.transform(Id(n))+", "+Id(ih.transform(r))+")"},fr={test:e=>zl.test(e)||pw.test(e)||du.test(e),parse:e=>zl.test(e)?zl.parse(e):du.test(e)?du.parse(e):pw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zl.transform(e):du.transform(e),getAnimatableNone:e=>{const t=fr.parse(e);return t.alpha=0,fr.transform(t)}},rte=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ite(e){return isNaN(e)&&typeof e=="string"&&(e.match(D_)?.length||0)+(e.match(rte)?.length||0)>0}const gD="number",yD="color",ote="var",ste="var(",O5="${}",ate=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function oh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const c=t.replace(ate,u=>(fr.test(u)?(r.color.push(s),i.push(yD),n.push(fr.parse(u))):u.startsWith(ste)?(r.var.push(s),i.push(ote),n.push(u)):(r.number.push(s),i.push(gD),n.push(parseFloat(u))),++s,O5)).split(O5);return{values:n,split:c,indexes:r,types:i}}function vD(e){return oh(e).values}function bD(e){const{split:t,types:n}=oh(e),r=t.length;return i=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],i[l]!==void 0){const c=n[l];c===gD?s+=Id(i[l]):c===yD?s+=fr.transform(i[l]):s+=i[l]}return s}}const lte=e=>typeof e=="number"?0:fr.test(e)?fr.getAnimatableNone(e):e;function cte(e){const t=vD(e);return bD(e)(t.map(lte))}const qa={test:ite,parse:vD,createTransformer:bD,getAnimatableNone:cte};function w1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ute({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,l=0;if(!t)i=s=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;i=w1(u,c,e+1/3),s=w1(u,c,e),l=w1(u,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function fy(e,t){return n=>n>0?t:e}const Kn=(e,t,n)=>e+(t-e)*n,x1=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},fte=[pw,zl,du],dte=e=>fte.find(t=>t.test(e));function k5(e){const t=dte(e);if(!t)return!1;let n=t.parse(e);return t===du&&(n=ute(n)),n}const M5=(e,t)=>{const n=k5(e),r=k5(t);if(!n||!r)return fy(e,t);const i={...n};return s=>(i.red=x1(n.red,r.red,s),i.green=x1(n.green,r.green,s),i.blue=x1(n.blue,r.blue,s),i.alpha=Kn(n.alpha,r.alpha,s),zl.transform(i))},mw=new Set(["none","hidden"]);function hte(e,t){return mw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function pte(e,t){return n=>Kn(e,t,n)}function $_(e){return typeof e=="number"?pte:typeof e=="string"?P_(e)?fy:fr.test(e)?M5:yte:Array.isArray(e)?SD:typeof e=="object"?fr.test(e)?M5:mte:fy}function SD(e,t){const n=[...e],r=n.length,i=e.map((s,l)=>$_(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=i[l](s);return n}}function mte(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=$_(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function gte(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],l=e.indexes[s][r[s]],c=e.values[l]??0;n[i]=c,r[s]++}return n}const yte=(e,t)=>{const n=qa.createTransformer(t),r=oh(e),i=oh(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?mw.has(e)&&!i.values.length||mw.has(t)&&!r.values.length?hte(e,t):$h(SD(gte(r,i),i.values),n):fy(e,t)};function wD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Kn(e,t,n):$_(e)(e,t)}const vte=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Un.update(t,n),stop:()=>Ua(t),now:()=>zr.isProcessing?zr.timestamp:hi.now()}},xD=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},dy=2e4;function I_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<dy;)t+=n,r=e.next(t);return t>=dy?1/0:t}function bte(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(I_(r),dy);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Xi(i)}}const Ste=5;function _D(e,t,n){const r=Math.max(t-Ste,0);return nD(n-e(r),t-r)}const Xn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},_1=.001;function wte({duration:e=Xn.duration,bounce:t=Xn.bounce,velocity:n=Xn.velocity,mass:r=Xn.mass}){let i,s,l=1-t;l=Os(Xn.minDamping,Xn.maxDamping,l),e=Os(Xn.minDuration,Xn.maxDuration,Xi(e)),l<1?(i=d=>{const h=d*l,p=h*e,g=h-n,x=gw(d,l),y=Math.exp(-p);return _1-g/x*y},s=d=>{const p=d*l*e,g=p*n+n,x=Math.pow(l,2)*Math.pow(d,2)*e,y=Math.exp(-p),T=gw(Math.pow(d,2),l);return(-i(d)+_1>0?-1:1)*((g-x)*y)/T}):(i=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-_1+h*p},s=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=_te(i,s,c);if(e=qo(e),isNaN(u))return{stiffness:Xn.stiffness,damping:Xn.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const xte=12;function _te(e,t,n){let r=n;for(let i=1;i<xte;i++)r=r-e(r)/t(r);return r}function gw(e,t){return e*Math.sqrt(1-t*t)}const Ete=["duration","bounce"],Cte=["stiffness","damping","mass"];function j5(e,t){return t.some(n=>e[n]!==void 0)}function Tte(e){let t={velocity:Xn.velocity,stiffness:Xn.stiffness,damping:Xn.damping,mass:Xn.mass,isResolvedFromDuration:!1,...e};if(!j5(e,Cte)&&j5(e,Ete))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Os(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Xn.mass,stiffness:i,damping:s}}else{const n=wte(e);t={...t,...n,mass:Xn.mass},t.isResolvedFromDuration=!0}return t}function hy(e=Xn.visualDuration,t=Xn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:u,damping:d,mass:h,duration:p,velocity:g,isResolvedFromDuration:x}=Tte({...n,velocity:-Xi(n.velocity||0)}),y=g||0,T=d/(2*Math.sqrt(u*h)),w=l-s,S=Xi(Math.sqrt(u/h)),v=Math.abs(w)<5;r||(r=v?Xn.restSpeed.granular:Xn.restSpeed.default),i||(i=v?Xn.restDelta.granular:Xn.restDelta.default);let E;if(T<1){const C=gw(S,T);E=_=>{const A=Math.exp(-T*S*_);return l-A*((y+T*S*w)/C*Math.sin(C*_)+w*Math.cos(C*_))}}else if(T===1)E=C=>l-Math.exp(-S*C)*(w+(y+S*w)*C);else{const C=S*Math.sqrt(T*T-1);E=_=>{const A=Math.exp(-T*S*_),M=Math.min(C*_,300);return l-A*((y+T*S*w)*Math.sinh(M)+C*w*Math.cosh(M))/C}}const b={calculatedDuration:x&&p||null,next:C=>{const _=E(C);if(x)c.done=C>=p;else{let A=C===0?y:0;T<1&&(A=C===0?qo(y):_D(E,C,_));const M=Math.abs(A)<=r,P=Math.abs(l-_)<=i;c.done=M&&P}return c.value=c.done?l:_,c},toString:()=>{const C=Math.min(I_(b),dy),_=xD(A=>b.next(C*A).value,C,30);return C+"ms "+_},toTransition:()=>{}};return b}hy.applyToOptions=e=>{const t=bte(e,100,hy);return e.ease=t.ease,e.duration=qo(t.duration),e.type="keyframes",e};function yw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:l,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},x=M=>c!==void 0&&M<c||u!==void 0&&M>u,y=M=>c===void 0?u:u===void 0||Math.abs(c-M)<Math.abs(u-M)?c:u;let T=n*t;const w=p+T,S=l===void 0?w:l(w);S!==w&&(T=S-p);const v=M=>-T*Math.exp(-M/r),E=M=>S+v(M),b=M=>{const P=v(M),I=E(M);g.done=Math.abs(P)<=d,g.value=g.done?S:I};let C,_;const A=M=>{x(g.value)&&(C=M,_=hy({keyframes:[g.value,y(g.value)],velocity:_D(E,M,g.value),damping:i,stiffness:s,restDelta:d,restSpeed:h}))};return A(0),{calculatedDuration:null,next:M=>{let P=!1;return!_&&C===void 0&&(P=!0,b(M),A(M)),C!==void 0&&M>=C?_.next(M-C):(!P&&b(M),g)}}}function Rte(e,t,n){const r=[],i=n||ks.mix||wD,s=e.length-1;for(let l=0;l<s;l++){let c=i(e[l],e[l+1]);if(t){const u=Array.isArray(t)?t[l]||Ji:t;c=$h(u,c)}r.push(c)}return r}function Ate(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(R_(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=Rte(t,r,i),u=c.length,d=h=>{if(l&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=rh(e[p],e[p+1],h);return c[p](g)};return n?h=>d(Os(e[0],e[s-1],h)):d}function Ote(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=rh(0,t,r);e.push(Kn(n,1,i))}}function kte(e){const t=[0];return Ote(t,e.length-1),t}function Mte(e,t){return e.map(n=>n*t)}function jte(e,t){return e.map(()=>t||fD).splice(0,e.length-1)}function zd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=qee(r)?r.map(R5):R5(r),s={done:!1,value:t[0]},l=Mte(n&&n.length===t.length?n:kte(t),e),c=Ate(l,t,{ease:Array.isArray(i)?i:jte(t,i)});return{calculatedDuration:e,next:u=>(s.value=c(u),s.done=u>=e,s)}}const Pte=e=>e!==null;function z_(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(Pte),c=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const Dte={decay:yw,inertia:yw,tween:zd,keyframes:zd,spring:hy};function ED(e){typeof e.type=="string"&&(e.type=Dte[e.type])}class F_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Nte=e=>e/100;class L_ extends F_{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==hi.now()&&this.tick(hi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ED(t);const{type:n=zd,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:l=0}=t;let{keyframes:c}=t;const u=n||zd;u!==zd&&typeof c[0]!="number"&&(this.mixKeyframes=$h(Nte,wD(c[0],c[1])),c=[0,100]);const d=u({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=I_(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:x,type:y,onUpdate:T,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,b=r;if(p){const M=Math.min(this.currentTime,i)/c;let P=Math.floor(M),I=M%1;!I&&M>=1&&(I=1),I===1&&P--,P=Math.min(P,p+1),!!(P%2)&&(g==="reverse"?(I=1-I,x&&(I-=x/c)):g==="mirror"&&(b=l)),E=Os(0,1,I)*c}const C=v?{done:!1,value:h[0]}:b.next(E);s&&(C.value=s(C.value));let{done:_}=C;!v&&u!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return A&&y!==yw&&(C.value=z_(h,this.options,w,this.speed)),T&&T(C.value),A&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Xi(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xi(t)}get time(){return Xi(this.currentTime)}set time(t){t=qo(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(hi.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Xi(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=vte,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(hi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function $te(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Fl=e=>e*180/Math.PI,vw=e=>{const t=Fl(Math.atan2(e[1],e[0]));return bw(t)},Ite={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:vw,rotateZ:vw,skewX:e=>Fl(Math.atan(e[1])),skewY:e=>Fl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},bw=e=>(e=e%360,e<0&&(e+=360),e),P5=vw,D5=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),N5=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zte={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:D5,scaleY:N5,scale:e=>(D5(e)+N5(e))/2,rotateX:e=>bw(Fl(Math.atan2(e[6],e[5]))),rotateY:e=>bw(Fl(Math.atan2(-e[2],e[0]))),rotateZ:P5,rotate:P5,skewX:e=>Fl(Math.atan(e[4])),skewY:e=>Fl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Sw(e){return e.includes("scale")?1:0}function ww(e,t){if(!e||e==="none")return Sw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=zte,i=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ite,i=c}if(!i)return Sw(t);const s=r[t],l=i[1].split(",").map(Lte);return typeof s=="function"?s(l):l[s]}const Fte=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ww(n,t)};function Lte(e){return parseFloat(e.trim())}const gf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yf=new Set(gf),$5=e=>e===mf||e===gt,Vte=new Set(["x","y","z"]),Ute=gf.filter(e=>!Vte.has(e));function qte(e){const t=[];return Ute.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Vl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ww(t,"x"),y:(e,{transform:t})=>ww(t,"y")};Vl.translateX=Vl.x;Vl.translateY=Vl.y;const Ul=new Set;let xw=!1,_w=!1,Ew=!1;function CD(){if(_w){const e=Array.from(Ul).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=qte(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,l])=>{r.getValue(s)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_w=!1,xw=!1,Ul.forEach(e=>e.complete(Ew)),Ul.clear()}function TD(){Ul.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_w=!0)})}function Bte(){Ew=!0,TD(),CD(),Ew=!1}class V_{constructor(t,n,r,i,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Ul.add(this),xw||(xw=!0,Un.read(TD),Un.resolveKeyframes(CD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i?.get(),l=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),i&&s===void 0&&i.set(t[0])}$te(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ul.delete(this)}cancel(){this.state==="scheduled"&&(Ul.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Hte=e=>e.startsWith("--");function Kte(e,t,n){Hte(t)?e.style.setProperty(t,n):e.style[t]=n}const Gte=A_(()=>window.ScrollTimeline!==void 0),Zte={};function Wte(e,t){const n=A_(e);return()=>Zte[t]??n()}const RD=Wte(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,I5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rd([0,.65,.55,1]),circOut:Rd([.55,0,1,.45]),backIn:Rd([.31,.01,.66,-.59]),backOut:Rd([.33,1.53,.69,.99])};function AD(e,t){if(e)return typeof e=="function"?RD()?xD(e,t):"ease-out":dD(e)?Rd(e):Array.isArray(e)?e.map(n=>AD(n,t)||I5.easeOut):I5[e]}function Yte(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:l="loop",ease:c="easeOut",times:u}={},d=void 0){const h={[t]:n};u&&(h.offset=u);const p=AD(c,i);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(h,g)}function OD(e){return typeof e=="function"&&"applyToOptions"in e}function Xte({type:e,...t}){return OD(e)&&RD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Qte extends F_{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,R_(typeof t.type!="string");const d=Xte(t);this.animation=Yte(n,r,i,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=z_(i,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):Kte(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Xi(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xi(t)}get time(){return Xi(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=qo(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Gte()?(this.animation.timeline=t,Ji):n(this)}}const kD={anticipate:lD,backInOut:aD,circInOut:uD};function Jte(e){return e in kD}function ene(e){typeof e.ease=="string"&&Jte(e.ease)&&(e.ease=kD[e.ease])}const z5=10;class tne extends Qte{constructor(t){ene(t),ED(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new L_({...l,autoplay:!1}),u=qo(this.finishedTime??this.time);n.setWithVelocity(c.sample(u-z5).value,c.sample(u).value,z5),c.stop()}}const F5=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(qa.test(e)||e==="0")&&!e.startsWith("url("));function nne(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rne(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=F5(i,t),c=F5(s,t);return!l||!c?!1:nne(e)||(n==="spring"||OD(n))&&r}function Cw(e){e.duration=0,e.type="keyframes"}const ine=new Set(["opacity","clipPath","filter","transform"]),one=A_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sne(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return one()&&n&&ine.has(n)&&(n!=="transform"||!d)&&!u&&!r&&i!=="mirror"&&s!==0&&l!=="inertia"}const ane=40;class lne extends F_{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:l="loop",keyframes:c,name:u,motionValue:d,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=hi.now();const g={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:l,name:u,motionValue:d,element:h,...p},x=h?.KeyframeResolver||V_;this.keyframeResolver=new x(c,(y,T,w)=>this.onKeyframesResolved(y,T,g,!w),u,d,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:l,velocity:c,delay:u,isHandoff:d,onUpdate:h}=r;this.resolvedAt=hi.now(),rne(t,s,l,c)||((ks.instantAnimations||!u)&&h?.(z_(t,r,n)),t[0]=t[t.length-1],Cw(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ane?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=!d&&sne(g)?new tne({...g,element:g.motionValue.owner.current}):new L_(g);x.finished.then(()=>this.notifyFinished()).catch(Ji),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Bte()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const cne=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function une(e){const t=cne.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function MD(e,t,n=1){const[r,i]=une(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return J4(l)?parseFloat(l):l}return P_(i)?MD(i,t,n+1):i}function U_(e,t){return e?.[t]??e?.default??e}const jD=new Set(["width","height","top","left","right","bottom",...gf]),fne={test:e=>e==="auto",parse:e=>e},PD=e=>t=>t.test(e),DD=[mf,gt,Bo,va,nte,tte,fne],L5=e=>DD.find(PD(e));function dne(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tD(e):!0}const hne=new Set(["brightness","contrast","saturate","opacity"]);function pne(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(D_)||[];if(!r)return e;const i=n.replace(r,"");let s=hne.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const mne=/\b([a-z-]*)\(.*?\)/gu,Tw={...qa,getAnimatableNone:e=>{const t=e.match(mne);return t?t.map(pne).join(" "):e}},V5={...mf,transform:Math.round},gne={rotate:va,rotateX:va,rotateY:va,rotateZ:va,scale:rg,scaleX:rg,scaleY:rg,scaleZ:rg,skew:va,skewX:va,skewY:va,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:ih,originX:A5,originY:A5,originZ:gt},q_={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,radius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,top:gt,right:gt,bottom:gt,left:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,backgroundPositionX:gt,backgroundPositionY:gt,...gne,zIndex:V5,fillOpacity:ih,strokeOpacity:ih,numOctaves:V5},yne={...q_,color:fr,backgroundColor:fr,outlineColor:fr,fill:fr,stroke:fr,borderColor:fr,borderTopColor:fr,borderRightColor:fr,borderBottomColor:fr,borderLeftColor:fr,filter:Tw,WebkitFilter:Tw},ND=e=>yne[e];function $D(e,t){let n=ND(e);return n!==Tw&&(n=qa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vne=new Set(["auto","none","0"]);function bne(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!vne.has(s)&&oh(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=$D(n,i)}class Sne extends V_{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),P_(d))){const h=MD(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!jD.has(r)||t.length!==2)return;const[i,s]=t,l=L5(i),c=L5(s);if(l!==c)if($5(l)&&$5(c))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Vl[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||dne(t[i]))&&r.push(i);r.length&&bne(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vl[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Vl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function wne(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ID=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xne(e){return eD(e)&&"offsetHeight"in e}const U5=30,_ne=e=>!isNaN(parseFloat(e));class Ene{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=hi.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=hi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=_ne(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new O_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Un.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=hi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>U5)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,U5);return nD(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vu(e,t){return new Ene(e,t)}const{schedule:B_}=hD(queueMicrotask,!1),vo={x:!1,y:!1};function zD(){return vo.x||vo.y}function Cne(e){return e==="x"||e==="y"?vo[e]?null:(vo[e]=!0,()=>{vo[e]=!1}):vo.x||vo.y?null:(vo.x=vo.y=!0,()=>{vo.x=vo.y=!1})}function FD(e,t){const n=wne(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function q5(e){return!(e.pointerType==="touch"||zD())}function Tne(e,t,n={}){const[r,i,s]=FD(e,n),l=c=>{if(!q5(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{q5(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,i)};return r.forEach(c=>{c.addEventListener("pointerenter",l,i)}),s}const LD=(e,t)=>t?e===t?!0:LD(e,t.parentElement):!1,H_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rne=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ane(e){return Rne.has(e.tagName)||e.tabIndex!==-1}const Og=new WeakSet;function B5(e){return t=>{t.key==="Enter"&&e(t)}}function E1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const One=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=B5(()=>{if(Og.has(n))return;E1(n,"down");const i=B5(()=>{E1(n,"up")}),s=()=>E1(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function H5(e){return H_(e)&&!zD()}function kne(e,t,n={}){const[r,i,s]=FD(e,n),l=c=>{const u=c.currentTarget;if(!H5(c))return;Og.add(u);const d=t(u,c),h=(x,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Og.has(u)&&Og.delete(u),H5(x)&&typeof d=="function"&&d(x,{success:y})},p=x=>{h(x,u===window||u===document||n.useGlobalTarget||LD(u,x.target))},g=x=>{h(x,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",g,i)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,i),xne(c)&&(c.addEventListener("focus",d=>One(d,i)),!Ane(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function VD(e){return eD(e)&&"ownerSVGElement"in e}function Mne(e){return VD(e)&&e.tagName==="svg"}const Kr=e=>!!(e&&e.getVelocity),jne=[...DD,fr,qa],Pne=e=>jne.find(PD(e)),UD=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Dne(e=!0){const t=k.useContext(E_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=k.useId();k.useEffect(()=>{if(e)return i(s)},[e]);const l=k.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const qD=k.createContext({strict:!1}),K5={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Uu={};for(const e in K5)Uu[e]={isEnabled:t=>K5[e].some(n=>!!t[n])};function Nne(e){for(const t in e)Uu[t]={...Uu[t],...e[t]}}const $ne=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function py(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$ne.has(e)}let BD=e=>!py(e);function Ine(e){typeof e=="function"&&(BD=t=>t.startsWith("on")?!py(t):e(t))}try{Ine(require("@emotion/is-prop-valid").default)}catch{}function zne(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(BD(i)||n===!0&&py(i)||!t&&!py(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const c0=k.createContext({});function u0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function sh(e){return typeof e=="string"||Array.isArray(e)}const K_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],G_=["initial",...K_];function f0(e){return u0(e.animate)||G_.some(t=>sh(e[t]))}function HD(e){return!!(f0(e)||e.variants)}function Fne(e,t){if(f0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||sh(n)?n:void 0,animate:sh(r)?r:void 0}}return e.inherit!==!1?t:{}}function Lne(e){const{initial:t,animate:n}=Fne(e,k.useContext(c0));return k.useMemo(()=>({initial:t,animate:n}),[G5(t),G5(n)])}function G5(e){return Array.isArray(e)?e.join(" "):e}const ah={};function Vne(e){for(const t in e)ah[t]=e[t],j_(t)&&(ah[t].isCSSVariable=!0)}function KD(e,{layout:t,layoutId:n}){return yf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ah[e]||e==="opacity")}const Une={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qne=gf.length;function Bne(e,t,n){let r="",i=!0;for(let s=0;s<qne;s++){const l=gf[s],c=e[l];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(l.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=ID(c,q_[l]);if(!u){i=!1;const h=Une[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Z_(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let l=!1,c=!1;for(const u in t){const d=t[u];if(yf.has(u)){l=!0;continue}else if(j_(u)){i[u]=d;continue}else{const h=ID(d,q_[u]);u.startsWith("origin")?(c=!0,s[u]=h):r[u]=h}}if(t.transform||(l||n?r.transform=Bne(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${d} ${h}`}}const W_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function GD(e,t,n){for(const r in t)!Kr(t[r])&&!KD(r,n)&&(e[r]=t[r])}function Hne({transformTemplate:e},t){return k.useMemo(()=>{const n=W_();return Z_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Kne(e,t){const n=e.style||{},r={};return GD(r,n,e),Object.assign(r,Hne(e,t)),r}function Gne(e,t){const n={},r=Kne(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Zne={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wne={offset:"strokeDashoffset",array:"strokeDasharray"};function Yne(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Zne:Wne;e[s.offset]=gt.transform(-r);const l=gt.transform(t),c=gt.transform(n);e[s.array]=`${l} ${c}`}function ZD(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(Z_(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),i!==void 0&&Yne(p,i,s,l,!1)}const WD=()=>({...W_(),attrs:{}}),YD=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Xne(e,t,n,r){const i=k.useMemo(()=>{const s=WD();return ZD(s,t,YD(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};GD(s,e.style,e),i.style={...s,...i.style}}return i}const Qne=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Y_(e){return typeof e!="string"||e.includes("-")?!1:!!(Qne.indexOf(e)>-1||/[A-Z]/u.test(e))}function Jne(e,t,n,{latestValues:r},i,s=!1){const c=(Y_(e)?Xne:Gne)(t,r,i,e),u=zne(t,typeof e=="string",s),d=e!==k.Fragment?{...u,...c,ref:n}:{},{children:h}=t,p=k.useMemo(()=>Kr(h)?h.get():h,[h]);return k.createElement(e,{...d,children:p})}function Z5(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function X_(e,t,n,r){if(typeof t=="function"){const[i,s]=Z5(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Z5(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function kg(e){return Kr(e)?e.get():e}function ere({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:tre(n,r,i,e),renderState:t()}}function tre(e,t,n,r){const i={},s=r(e,{});for(const g in s)i[g]=kg(s[g]);let{initial:l,animate:c}=e;const u=f0(e),d=HD(e);t&&d&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const p=h?c:l;if(p&&typeof p!="boolean"&&!u0(p)){const g=Array.isArray(p)?p:[p];for(let x=0;x<g.length;x++){const y=X_(e,g[x]);if(y){const{transitionEnd:T,transition:w,...S}=y;for(const v in S){let E=S[v];if(Array.isArray(E)){const b=h?E.length-1:0;E=E[b]}E!==null&&(i[v]=E)}for(const v in T)i[v]=T[v]}}}return i}const XD=e=>(t,n)=>{const r=k.useContext(c0),i=k.useContext(E_),s=()=>ere(e,t,r,i);return n?s():Nee(s)};function Q_(e,t,n){const{style:r}=e,i={};for(const s in r)(Kr(r[s])||t.style&&Kr(t.style[s])||KD(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}const nre=XD({scrapeMotionValuesFromProps:Q_,createRenderState:W_});function QD(e,t,n){const r=Q_(e,t,n);for(const i in e)if(Kr(e[i])||Kr(t[i])){const s=gf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const rre=XD({scrapeMotionValuesFromProps:QD,createRenderState:WD}),ire=Symbol.for("motionComponentSymbol");function hu(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ore(e,t,n){return k.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):hu(n)&&(n.current=r))},[t])}const J_=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sre="framerAppearId",JD="data-"+J_(sre),eN=k.createContext({});function are(e,t,n,r,i){const{visualElement:s}=k.useContext(c0),l=k.useContext(qD),c=k.useContext(E_),u=k.useContext(UD).reducedMotion,d=k.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,p=k.useContext(eN);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&lre(d.current,n,i,p);const g=k.useRef(!1);k.useInsertionEffect(()=>{h&&g.current&&h.update(n,c)});const x=n[JD],y=k.useRef(!!x&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return $ee(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),k.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),y.current=!1),h.enteringChildren=void 0)}),h}function lre(e,t,n,r){const{layoutId:i,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:tN(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!l||c&&hu(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d})}function tN(e){if(e)return e.options.allowProjection!==!1?e.projection:tN(e.parent)}function C1(e,{forwardMotionProps:t=!1}={},n,r){n&&Nne(n);const i=Y_(e)?rre:nre;function s(c,u){let d;const h={...k.useContext(UD),...c,layoutId:cre(c)},{isStatic:p}=h,g=Lne(c),x=i(c,p);if(!p&&__){ure();const y=fre(h);d=y.MeasureLayout,g.visualElement=are(e,x,h,r,y.ProjectionNode)}return j.jsxs(c0.Provider,{value:g,children:[d&&g.visualElement?j.jsx(d,{visualElement:g.visualElement,...h}):null,Jne(e,c,ore(x,g.visualElement,u),x,p,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=k.forwardRef(s);return l[ire]=e,l}function cre({layoutId:e}){const t=k.useContext(Q4).id;return t&&e!==void 0?t+"-"+e:e}function ure(e,t){k.useContext(qD).strict}function fre(e){const{drag:t,layout:n}=Uu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function dre(e,t){if(typeof Proxy>"u")return C1;const n=new Map,r=(s,l)=>C1(s,l,e,t),i=(s,l)=>r(s,l);return new Proxy(i,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,C1(l,void 0,e,t)),n.get(l))})}function nN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hre({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pre(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function T1(e){return e===void 0||e===1}function Rw({scale:e,scaleX:t,scaleY:n}){return!T1(e)||!T1(t)||!T1(n)}function Dl(e){return Rw(e)||rN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rN(e){return W5(e.x)||W5(e.y)}function W5(e){return e&&e!=="0%"}function my(e,t,n){const r=e-n,i=t*r;return n+i}function Y5(e,t,n,r,i){return i!==void 0&&(e=my(e,i,r)),my(e,n,r)+t}function Aw(e,t=0,n=1,r,i){e.min=Y5(e.min,t,n,r,i),e.max=Y5(e.max,t,n,r,i)}function iN(e,{x:t,y:n}){Aw(e.x,t.translate,t.scale,t.originPoint),Aw(e.y,n.translate,n.scale,n.originPoint)}const X5=.999999999999,Q5=1.0000000000001;function mre(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,l;for(let c=0;c<i;c++){s=n[c],l=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&mu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,iN(e,l)),r&&Dl(s.latestValues)&&mu(e,s.latestValues))}t.x<Q5&&t.x>X5&&(t.x=1),t.y<Q5&&t.y>X5&&(t.y=1)}function pu(e,t){e.min=e.min+t,e.max=e.max+t}function J5(e,t,n,r,i=.5){const s=Kn(e.min,e.max,i);Aw(e,t,n,s,r)}function mu(e,t){J5(e.x,t.x,t.scaleX,t.scale,t.originX),J5(e.y,t.y,t.scaleY,t.scale,t.originY)}function oN(e,t){return nN(pre(e.getBoundingClientRect(),t))}function gre(e,t,n){const r=oN(e,n),{scroll:i}=t;return i&&(pu(r.x,i.offset.x),pu(r.y,i.offset.y)),r}const ek=()=>({translate:0,scale:1,origin:0,originPoint:0}),gu=()=>({x:ek(),y:ek()}),tk=()=>({min:0,max:0}),Sr=()=>({x:tk(),y:tk()}),Ow={current:null},sN={current:!1};function yre(){if(sN.current=!0,!!__)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ow.current=e.matches;e.addEventListener("change",t),t()}else Ow.current=!1}const vre=new WeakMap;function bre(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Kr(i))e.addValue(r,i);else if(Kr(s))e.addValue(r,Vu(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,Vu(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const nk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Sre{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=V_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=hi.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Un.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=f0(n),this.isVariantNode=HD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const x=p[g];u[g]!==void 0&&Kr(x)&&x.set(u[g])}}mount(t){this.current=t,vre.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),sN.current||yre(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ow.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ua(this.notifyUpdate),Ua(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yf.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Un.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Uu){const n=Uu[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Sr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<nk.length;r++){const i=nk[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,l=t[s];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=bre(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Vu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(J4(r)||tD(r))?r=parseFloat(r):!Pne(r)&&qa.test(n)&&(r=$D(t,n)),this.setBaseTarget(t,Kr(r)?r.get():r)),Kr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=X_(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Kr(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new O_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){B_.render(this.render)}}class aN extends Sre{constructor(){super(...arguments),this.KeyframeResolver=Sne}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Kr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function lN(e,{style:t,vars:n},r,i){const s=e.style;let l;for(l in t)s[l]=t[l];i?.applyProjectionStyles(s,r);for(l in n)s.setProperty(l,n[l])}function wre(e){return window.getComputedStyle(e)}class xre extends aN{constructor(){super(...arguments),this.type="html",this.renderInstance=lN}readValueFromInstance(t,n){if(yf.has(n))return this.projection?.isProjecting?Sw(n):Fte(t,n);{const r=wre(t),i=(j_(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return oN(t,n)}build(t,n,r){Z_(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Q_(t,n,r)}}const cN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _re(e,t,n,r){lN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(cN.has(i)?i:J_(i),t.attrs[i])}class Ere extends aN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Sr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yf.has(n)){const r=ND(n);return r&&r.default||0}return n=cN.has(n)?n:J_(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return QD(t,n,r)}build(t,n,r){ZD(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){_re(t,n,r,i)}mount(t){this.isSVGTag=YD(t.tagName),super.mount(t)}}const Cre=(e,t)=>Y_(e)?new Ere(t):new xre(t,{allowProjection:e!==k.Fragment});function _u(e,t,n){const r=e.getProps();return X_(r,t,n!==void 0?n:r.custom,e)}const kw=e=>Array.isArray(e);function Tre(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vu(n))}function Rre(e){return kw(e)?e[e.length-1]||0:e}function Are(e,t){const n=_u(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const l in s){const c=Rre(s[l]);Tre(e,l,c)}}function Ore(e){return!!(Kr(e)&&e.add)}function Mw(e,t){const n=e.getValue("willChange");if(Ore(n))return n.add(t);if(!n&&ks.WillChange){const r=new ks.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function uN(e){return e.props[JD]}const kre=e=>e!==null;function Mre(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(kre),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const jre={type:"spring",stiffness:500,damping:25,restSpeed:10},Pre=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Dre={type:"keyframes",duration:.8},Nre={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$re=(e,{keyframes:t})=>t.length>2?Dre:yf.has(e)?e.startsWith("scale")?Pre(t[1]):jre:Nre;function Ire({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:l,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const eE=(e,t,n,r={},i,s)=>l=>{const c=U_(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-qo(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:i};Ire(c)||Object.assign(h,$re(e,h)),h.duration&&(h.duration=qo(h.duration)),h.repeatDelay&&(h.repeatDelay=qo(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Cw(h),h.delay===0&&(p=!0)),(ks.instantAnimations||ks.skipAnimations)&&(p=!0,Cw(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!s&&t.get()!==void 0){const g=Mre(h.keyframes,c);if(g!==void 0){Un.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new L_(h):new lne(h)};function zre({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function fN(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(s=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||d&&zre(d,h))continue;const x={delay:n,...U_(s||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!x.velocity)continue;let T=!1;if(window.MotionHandoffAnimation){const S=uN(e);if(S){const v=window.MotionHandoffAnimation(S,h,Un);v!==null&&(x.startTime=v,T=!0)}}Mw(e,h),p.start(eE(h,p,g,e.shouldReduceMotion&&jD.has(h)?{type:!1}:x,e,T));const w=p.animation;w&&u.push(w)}return l&&Promise.all(u).then(()=>{Un.update(()=>{l&&Are(e,l)})}),u}function dN(e,t,n,r=0,i=1){const s=Array.from(e).sort((d,h)=>d.sortNodePosition(h)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(s,l):i===1?s*r:c-s*r}function jw(e,t,n={}){const r=_u(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(fN(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=i;return Fre(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,d]=c==="beforeChildren"?[s,l]:[l,s];return u().then(()=>d())}else return Promise.all([s(),l(n.delay)])}function Fre(e,t,n=0,r=0,i=0,s=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(jw(u,t,{...l,delay:n+(typeof r=="function"?0:r)+dN(e.variantChildren,u,r,i,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function Lre(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>jw(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=jw(e,t,n);else{const i=typeof t=="function"?_u(e,t,n.custom):t;r=Promise.all(fN(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function hN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Vre=G_.length;function pN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Vre;n++){const r=G_[n],i=e.props[r];(sh(i)||i===!1)&&(t[r]=i)}return t}const Ure=[...K_].reverse(),qre=K_.length;function Bre(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Lre(e,n,r)))}function Hre(e){let t=Bre(e),n=rk(),r=!0;const i=u=>(d,h)=>{const p=_u(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:x,...y}=p;d={...d,...y,...x}}return d};function s(u){t=u(e)}function l(u){const{props:d}=e,h=pN(e.parent)||{},p=[],g=new Set;let x={},y=1/0;for(let w=0;w<qre;w++){const S=Ure[w],v=n[S],E=d[S]!==void 0?d[S]:h[S],b=sh(E),C=S===u?v.isActive:null;C===!1&&(y=w);let _=E===h[S]&&E!==d[S]&&b;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),v.protectedKeys={...x},!v.isActive&&C===null||!E&&!v.prevProp||u0(E)||typeof E=="boolean")continue;const A=Kre(v.prevProp,E);let M=A||S===u&&v.isActive&&!_&&b||w>y&&b,P=!1;const I=Array.isArray(E)?E:[E];let z=I.reduce(i(S),{});C===!1&&(z={});const{prevResolvedValues:q={}}=v,K={...q,...z},X=Z=>{M=!0,g.has(Z)&&(P=!0,g.delete(Z)),v.needsAnimating[Z]=!0;const ee=e.getValue(Z);ee&&(ee.liveStyle=!1)};for(const Z in K){const ee=z[Z],ae=q[Z];if(x.hasOwnProperty(Z))continue;let re=!1;kw(ee)&&kw(ae)?re=!hN(ee,ae):re=ee!==ae,re?ee!=null?X(Z):g.add(Z):ee!==void 0&&g.has(Z)?X(Z):v.protectedKeys[Z]=!0}v.prevProp=E,v.prevResolvedValues=z,v.isActive&&(x={...x,...z}),r&&e.blockInitialAnimation&&(M=!1);const Y=_&&A;M&&(!Y||P)&&p.push(...I.map(Z=>{const ee={type:S};if(typeof Z=="string"&&r&&!Y&&e.manuallyAnimateOnMount&&e.parent){const{parent:ae}=e,re=_u(ae,Z);if(ae.enteringChildren&&re){const{delayChildren:$}=re.transition||{};ee.delay=dN(ae.enteringChildren,e,$)}}return{animation:Z,options:ee}}))}if(g.size){const w={};if(typeof d.initial!="boolean"){const S=_u(e,Array.isArray(d.initial)?d.initial[0]:d.initial);S&&S.transition&&(w.transition=S.transition)}g.forEach(S=>{const v=e.getBaseTarget(S),E=e.getValue(S);E&&(E.liveStyle=!0),w[S]=v??null}),p.push({animation:w})}let T=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(T=!1),r=!1,T?t(p):Promise.resolve()}function c(u,d){if(n[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,d)),n[u].isActive=d;const h=l(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=rk()}}}function Kre(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hN(t,e):!1}function kl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rk(){return{animate:kl(!0),whileInView:kl(),whileHover:kl(),whileTap:kl(),whileDrag:kl(),whileFocus:kl(),exit:kl()}}class Xa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Gre extends Xa{constructor(t){super(t),t.animationState||(t.animationState=Hre(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();u0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Zre=0;class Wre extends Xa{constructor(){super(...arguments),this.id=Zre++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Yre={animation:{Feature:Gre},exit:{Feature:Wre}};function lh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Fh(e){return{point:{x:e.pageX,y:e.pageY}}}const Xre=e=>t=>H_(t)&&e(t,Fh(t));function Fd(e,t,n,r){return lh(e,t,Xre(n),r)}const mN=1e-4,Qre=1-mN,Jre=1+mN,gN=.01,eie=0-gN,tie=0+gN;function ni(e){return e.max-e.min}function nie(e,t,n){return Math.abs(e-t)<=n}function ik(e,t,n,r=.5){e.origin=r,e.originPoint=Kn(t.min,t.max,e.origin),e.scale=ni(n)/ni(t),e.translate=Kn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qre&&e.scale<=Jre||isNaN(e.scale))&&(e.scale=1),(e.translate>=eie&&e.translate<=tie||isNaN(e.translate))&&(e.translate=0)}function Ld(e,t,n,r){ik(e.x,t.x,n.x,r?r.originX:void 0),ik(e.y,t.y,n.y,r?r.originY:void 0)}function ok(e,t,n){e.min=n.min+t.min,e.max=e.min+ni(t)}function rie(e,t,n){ok(e.x,t.x,n.x),ok(e.y,t.y,n.y)}function sk(e,t,n){e.min=t.min-n.min,e.max=e.min+ni(t)}function gy(e,t,n){sk(e.x,t.x,n.x),sk(e.y,t.y,n.y)}function Ki(e){return[e("x"),e("y")]}const yN=({current:e})=>e?e.ownerDocument.defaultView:null,ak=(e,t)=>Math.abs(e-t);function iie(e,t){const n=ak(e.x,t.x),r=ak(e.y,t.y);return Math.sqrt(n**2+r**2)}class vN{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=A1(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,y=iie(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!y)return;const{point:T}=g,{timestamp:w}=zr;this.history.push({...T,timestamp:w});const{onStart:S,onMove:v}=this.handlers;x||(S&&S(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,g)},this.handlePointerMove=(g,x)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=R1(x,this.transformPagePoint),Un.update(this.updatePoint,!0)},this.handlePointerUp=(g,x)=>{this.end();const{onEnd:y,onSessionEnd:T,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=A1(g.type==="pointercancel"?this.lastMoveEventInfo:R1(x,this.transformPagePoint),this.history);this.startEvent&&y&&y(g,S),T&&T(g,S)},!H_(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=i||window;const c=Fh(t),u=R1(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=zr;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,A1(u,this.history)),this.removeListeners=$h(Fd(this.contextWindow,"pointermove",this.handlePointerMove),Fd(this.contextWindow,"pointerup",this.handlePointerUp),Fd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ua(this.updatePoint)}}function R1(e,t){return t?{point:t(e.point)}:e}function lk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function A1({point:e},t){return{point:e,delta:lk(e,bN(t)),offset:lk(e,oie(t)),velocity:sie(t,.1)}}function oie(e){return e[0]}function bN(e){return e[e.length-1]}function sie(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=bN(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>qo(t)));)n--;if(!r)return{x:0,y:0};const s=Xi(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function aie(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Kn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Kn(n,e,r.max):Math.min(e,n)),e}function ck(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function lie(e,{top:t,left:n,bottom:r,right:i}){return{x:ck(e.x,n,i),y:ck(e.y,t,r)}}function uk(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function cie(e,t){return{x:uk(e.x,t.x),y:uk(e.y,t.y)}}function uie(e,t){let n=.5;const r=ni(e),i=ni(t);return i>r?n=rh(t.min,t.max-r,e.min):r>i&&(n=rh(e.min,e.max-i,t.min)),Os(0,1,n)}function fie(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Pw=.35;function die(e=Pw){return e===!1?e=0:e===!0&&(e=Pw),{x:fk(e,"left","right"),y:fk(e,"top","bottom")}}function fk(e,t,n){return{min:dk(e,t),max:dk(e,n)}}function dk(e,t){return typeof e=="number"?e:e[t]||0}const hie=new WeakMap;class pie{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Sr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=p=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fh(p).point)},l=(p,g)=>{const{drag:x,dragPropagation:y,onDragStart:T}=this.getProps();if(x&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Cne(x),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ki(S=>{let v=this.getAxisMotionValue(S).get()||0;if(Bo.test(v)){const{projection:E}=this.visualElement;if(E&&E.layout){const b=E.layout.layoutBox[S];b&&(v=ni(b)*(parseFloat(v)/100))}}this.originPoint[S]=v}),T&&Un.postRender(()=>T(p,g)),Mw(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:x,dragDirectionLock:y,onDirectionLock:T,onDrag:w}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:S}=g;if(y&&this.currentDirection===null){this.currentDirection=mie(S),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",g.point,S),this.updateAxis("y",g.point,S),this.visualElement.render(),w&&w(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Ki(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new vN(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:yN(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Un.postRender(()=>c(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ig(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=aie(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&hu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=lie(r.layoutBox,t):this.constraints=!1,this.elastic=die(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ki(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=fie(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hu(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=gre(r,i.root,this.visualElement.getTransformPagePoint());let l=cie(i.layout.layoutBox,s);if(n){const c=n(hre(l));this.hasMutatedConstraints=!!c,c&&(l=nN(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=Ki(h=>{if(!ig(h,n,this.currentDirection))return;let p=u&&u[h]||{};l&&(p={min:0,max:0});const g=i?200:1e6,x=i?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Mw(this.visualElement,t),r.start(eE(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ki(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ki(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ki(n=>{const{drag:r}=this.getProps();if(!ig(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:c}=i.layout.layoutBox[n];s.set(t[n]-Kn(l,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!hu(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ki(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();i[l]=uie({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ki(l=>{if(!ig(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Kn(u,d,i[l]))})}addListeners(){if(!this.visualElement.current)return;hie.set(this.visualElement,this);const t=this.visualElement.current,n=Fd(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();hu(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Un.read(r);const l=lh(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ki(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:l=Pw,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function ig(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mie(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gie extends Xa{constructor(t){super(t),this.removeGroupControls=Ji,this.removeListeners=Ji,this.controls=new pie(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ji}unmount(){this.removeGroupControls(),this.removeListeners()}}const hk=e=>(t,n)=>{e&&Un.postRender(()=>e(t,n))};class yie extends Xa{constructor(){super(...arguments),this.removePointerDownListener=Ji}onPointerDown(t){this.session=new vN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hk(t),onStart:hk(n),onMove:r,onEnd:(s,l)=>{delete this.session,i&&Un.postRender(()=>i(s,l))}}}mount(){this.removePointerDownListener=Fd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Mg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(gt.test(e))e=parseFloat(e);else return e;const n=pk(e,t.target.x),r=pk(e,t.target.y);return`${n}% ${r}%`}},vie={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=qa.parse(e);if(i.length>5)return r;const s=qa.createTransformer(e),l=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;i[0+l]/=c,i[1+l]/=u;const d=Kn(c,u,.5);return typeof i[2+l]=="number"&&(i[2+l]/=d),typeof i[3+l]=="number"&&(i[3+l]/=d),s(i)}};let O1=!1;class bie extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Vne(Sie),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),O1&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Mg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,O1=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Un.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),B_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;O1=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function SN(e){const[t,n]=Dne(),r=k.useContext(Q4);return j.jsx(bie,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(eN),isPresent:t,safeToRemove:n})}const Sie={borderRadius:{...wd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wd,borderTopRightRadius:wd,borderBottomLeftRadius:wd,borderBottomRightRadius:wd,boxShadow:vie};function wie(e,t,n){const r=Kr(e)?e:Vu(e);return r.start(eE("",r,t,n)),r.animation}const xie=(e,t)=>e.depth-t.depth;class _ie{constructor(){this.children=[],this.isDirty=!1}add(t){C_(this.children,t),this.isDirty=!0}remove(t){T_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xie),this.isDirty=!1,this.children.forEach(t)}}function Eie(e,t){const n=hi.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Ua(r),e(s-t))};return Un.setup(r,!0),()=>Ua(r)}const wN=["TopLeft","TopRight","BottomLeft","BottomRight"],Cie=wN.length,mk=e=>typeof e=="string"?parseFloat(e):e,gk=e=>typeof e=="number"||gt.test(e);function Tie(e,t,n,r,i,s){i?(e.opacity=Kn(0,n.opacity??1,Rie(r)),e.opacityExit=Kn(t.opacity??1,0,Aie(r))):s&&(e.opacity=Kn(t.opacity??1,n.opacity??1,r));for(let l=0;l<Cie;l++){const c=`border${wN[l]}Radius`;let u=yk(t,c),d=yk(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||gk(u)===gk(d)?(e[c]=Math.max(Kn(mk(u),mk(d),r),0),(Bo.test(d)||Bo.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Kn(t.rotate||0,n.rotate||0,r))}function yk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Rie=xN(0,.5,cD),Aie=xN(.5,.95,Ji);function xN(e,t,n){return r=>r<e?0:r>t?1:n(rh(e,t,r))}function vk(e,t){e.min=t.min,e.max=t.max}function go(e,t){vk(e.x,t.x),vk(e.y,t.y)}function bk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sk(e,t,n,r,i){return e-=t,e=my(e,1/n,r),i!==void 0&&(e=my(e,1/i,r)),e}function Oie(e,t=0,n=1,r=.5,i,s=e,l=e){if(Bo.test(t)&&(t=parseFloat(t),t=Kn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Kn(s.min,s.max,r);e===s&&(c-=t),e.min=Sk(e.min,t,n,c,i),e.max=Sk(e.max,t,n,c,i)}function wk(e,t,[n,r,i],s,l){Oie(e,t[n],t[r],t[i],t.scale,s,l)}const kie=["x","scaleX","originX"],Mie=["y","scaleY","originY"];function xk(e,t,n,r){wk(e.x,t,kie,n?n.x:void 0,r?r.x:void 0),wk(e.y,t,Mie,n?n.y:void 0,r?r.y:void 0)}function _k(e){return e.translate===0&&e.scale===1}function _N(e){return _k(e.x)&&_k(e.y)}function Ek(e,t){return e.min===t.min&&e.max===t.max}function jie(e,t){return Ek(e.x,t.x)&&Ek(e.y,t.y)}function Ck(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function EN(e,t){return Ck(e.x,t.x)&&Ck(e.y,t.y)}function Tk(e){return ni(e.x)/ni(e.y)}function Rk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Pie{constructor(){this.members=[]}add(t){C_(this.members,t),t.scheduleRender()}remove(t){if(T_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Die(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,l=n?.z||0;if((i||s||l)&&(r=`translate3d(${i}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:p,rotateY:g,skewX:x,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),x&&(r+=`skewX(${x}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const k1=["","X","Y","Z"],Nie=1e3;let $ie=0;function M1(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function CN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Un,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&CN(r)}function TN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},c=t?.()){this.id=$ie++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Fie),this.nodes.forEach(qie),this.nodes.forEach(Bie),this.nodes.forEach(Lie)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new _ie)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new O_),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=VD(l)&&!Mne(l),this.instance=l;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Un.read(()=>{p=window.innerWidth}),e(l,()=>{const x=window.innerWidth;x!==p&&(p=x,this.root.updateBlockedByResize=!0,h&&h(),h=Eie(g,250),Mg.hasAnimatedSinceResize&&(Mg.hasAnimatedSinceResize=!1,this.nodes.forEach(kk)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||Wie,{onLayoutAnimationStart:T,onLayoutAnimationComplete:w}=d.getProps(),S=!this.targetLayout||!EN(this.targetLayout,x),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...U_(y,"layout"),onPlay:T,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(h,v)}else p||kk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ua(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Hie),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&CN(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ak);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ok);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Uie),this.nodes.forEach(Iie),this.nodes.forEach(zie)):this.nodes.forEach(Ok),this.clearAllSnapshots();const c=hi.now();zr.delta=Os(0,1e3/60,c-zr.timestamp),zr.timestamp=c,zr.isProcessing=!0,b1.update.process(zr),b1.preRender.process(zr),b1.render.process(zr),zr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,B_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vie),this.sharedNodes.forEach(Kie)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Un.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Un.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ni(this.snapshot.measuredBox.x)&&!ni(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Sr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!_N(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Dl(this.latestValues)||h)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),Yie(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Sr();const c=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Xie))){const{scroll:d}=this.root;d&&(pu(c.x,d.offset.x),pu(c.y,d.offset.y))}return c}removeElementScroll(l){const c=Sr();if(go(c,l),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&go(c,l),pu(c.x,h.offset.x),pu(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=Sr();go(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&mu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Dl(h.latestValues)&&mu(u,h.latestValues)}return Dl(this.latestValues)&&mu(u,this.latestValues),u}removeTransform(l){const c=Sr();go(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!Dl(d.latestValues))continue;Rw(d.latestValues)&&d.updateSnapshot();const h=Sr(),p=d.measurePageBox();go(h,p),xk(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return Dl(this.latestValues)&&xk(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==zr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=zr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Sr(),this.targetWithTransforms=Sr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rie(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):go(this.target,this.layout.layoutBox),iN(this.target,this.targetDelta)):go(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Rw(this.parent.latestValues)||rN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,u){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Sr(),this.relativeTargetOrigin=Sr(),gy(this.relativeTargetOrigin,c,u),go(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===zr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;go(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;mre(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Sr());const{target:x}=l;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bk(this.prevProjectionDelta.x,this.projectionDelta.x),bk(this.prevProjectionDelta.y,this.projectionDelta.y)),Ld(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!Rk(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gu(),this.projectionDelta=gu(),this.projectionDeltaWithTransform=gu()}setAnimationOrigin(l,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=gu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Sr(),x=u?u.source:void 0,y=this.layout?this.layout.source:void 0,T=x!==y,w=this.getStack(),S=!w||w.members.length<=1,v=!!(T&&!S&&this.options.crossfade===!0&&!this.path.some(Zie));this.animationProgress=0;let E;this.mixTargetDelta=b=>{const C=b/1e3;Mk(p.x,l.x,C),Mk(p.y,l.y,C),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gie(this.relativeTarget,this.relativeTargetOrigin,g,C),E&&jie(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Sr()),go(E,this.relativeTarget)),T&&(this.animationValues=h,Tie(h,d,this.latestValues,C,v,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ua(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Un.update(()=>{Mg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vu(0)),this.currentAnimation=wie(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),l.onUpdate&&l.onUpdate(c)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Nie),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=l;if(!(!c||!u||!d)){if(this!==l&&this.layout&&d&&RN(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Sr();const p=ni(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+p;const g=ni(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+g}go(c,u),mu(c,h),Ld(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Pie),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&M1("z",l,d,this.animationValues);for(let h=0;h<k1.length;h++)M1(`rotate${k1[h]}`,l,d,this.animationValues),M1(`skew${k1[h]}`,l,d,this.animationValues);l.render();for(const h in d)l.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=kg(c?.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=kg(c?.pointerEvents)||""),this.hasProjected&&!Dl(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=Die(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),l.transform=p;const{x:g,y:x}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${x.origin*100}% 0`,d.animationValues?l.opacity=d===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in ah){if(h[y]===void 0)continue;const{correct:T,applyTo:w,isCSSVariable:S}=ah[y],v=p==="none"?h[y]:T(h[y],d);if(w){const E=w.length;for(let b=0;b<E;b++)l[w[b]]=v}else S?this.options.visualElement.renderState.vars[y]=v:l[y]=v}this.options.layoutId&&(l.pointerEvents=d===this?kg(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(Ak),this.root.sharedNodes.clear()}}}function Iie(e){e.updateLayout()}function zie(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?Ki(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ni(p);p.min=n[h].min,p.max=p.min+g}):RN(i,t.layoutBox,n)&&Ki(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ni(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=gu();Ld(l,n,t.layoutBox);const c=gu();s?Ld(c,e.applyTransform(r,!0),t.measuredBox):Ld(c,n,t.layoutBox);const u=!_N(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const x=Sr();gy(x,t.layoutBox,p.layoutBox);const y=Sr();gy(y,n,g.layoutBox),EN(x,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Fie(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Lie(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vie(e){e.clearSnapshot()}function Ak(e){e.clearMeasurements()}function Ok(e){e.isLayoutDirty=!1}function Uie(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qie(e){e.resolveTargetDelta()}function Bie(e){e.calcProjection()}function Hie(e){e.resetSkewAndRotation()}function Kie(e){e.removeLeadSnapshot()}function Mk(e,t,n){e.translate=Kn(t.translate,0,n),e.scale=Kn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jk(e,t,n,r){e.min=Kn(t.min,n.min,r),e.max=Kn(t.max,n.max,r)}function Gie(e,t,n,r){jk(e.x,t.x,n.x,r),jk(e.y,t.y,n.y,r)}function Zie(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Wie={duration:.45,ease:[.4,0,.1,1]},Pk=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Dk=Pk("applewebkit/")&&!Pk("chrome/")?Math.round:Ji;function Nk(e){e.min=Dk(e.min),e.max=Dk(e.max)}function Yie(e){Nk(e.x),Nk(e.y)}function RN(e,t,n){return e==="position"||e==="preserve-aspect"&&!nie(Tk(t),Tk(n),.2)}function Xie(e){return e!==e.root&&e.scroll?.wasRoot}const Qie=TN({attachResizeListener:(e,t)=>lh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),j1={current:void 0},AN=TN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!j1.current){const e=new Qie({});e.mount(window),e.setOptions({layoutScroll:!0}),j1.current=e}return j1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jie={pan:{Feature:yie},drag:{Feature:gie,ProjectionNode:AN,MeasureLayout:SN}};function $k(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Un.postRender(()=>s(t,Fh(t)))}class eoe extends Xa{mount(){const{current:t}=this.node;t&&(this.unmount=Tne(t,(n,r)=>($k(this.node,r,"Start"),i=>$k(this.node,i,"End"))))}unmount(){}}class toe extends Xa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$h(lh(this.node.current,"focus",()=>this.onFocus()),lh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ik(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Un.postRender(()=>s(t,Fh(t)))}class noe extends Xa{mount(){const{current:t}=this.node;t&&(this.unmount=kne(t,(n,r)=>(Ik(this.node,r,"Start"),(i,{success:s})=>Ik(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Dw=new WeakMap,P1=new WeakMap,roe=e=>{const t=Dw.get(e.target);t&&t(e)},ioe=e=>{e.forEach(roe)};function ooe({root:e,...t}){const n=e||document;P1.has(n)||P1.set(n,{});const r=P1.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ioe,{root:e,...t})),r[i]}function soe(e,t,n){const r=ooe(t);return Dw.set(e,n),r.observe(e),()=>{Dw.delete(e),r.unobserve(e)}}const aoe={some:0,all:1};class loe extends Xa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:aoe[i]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=d?h:p;g&&g(u)};return soe(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(coe(t,n))&&this.startObserver()}unmount(){}}function coe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const uoe={inView:{Feature:loe},tap:{Feature:noe},focus:{Feature:toe},hover:{Feature:eoe}},foe={layout:{ProjectionNode:AN,MeasureLayout:SN}},doe={...Yre,...uoe,...Jie,...foe},zk=dre(doe,Cre),ON=ki.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return j.jsx("div",{className:gn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:j.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((n,r)=>j.jsx(zk.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),j.jsxs("defs",{children:[t.map((n,r)=>j.jsxs(zk.linearGradient,{id:`linearGradient-${r}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[j.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),j.jsx("stop",{stopColor:"#111111"}),j.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),j.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),j.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[j.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});ON.displayName="BackgroundBeams";const hoe=()=>j.jsxs(j.Fragment,{children:[j.jsx(ON,{className:"absolute inset-0"}),j.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:j.jsxs("div",{className:"text-center",children:[j.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge Emulator"}),j.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Kt(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function poe(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Kt(e.additionalItems)}function Fk(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Rs="__additional_property",yy="additionalProperties",Ba="allOf",Gt="anyOf",no="const",d0="default",tE="dependencies",moe="enum",Vr="__errors",Sn="$id",goe="if",qu="items",yoe="_$junk_option_schema_id$_",jg="$name",Nt="oneOf",Nw="patternProperties",sn="properties",D1="readonly",kN="required",vy="submitButtonOptions",Dn="$ref",Ad="$schema",MN="root",jN="_",voe=["discriminator","propertyName"],Lk="formContext",boe="layoutGridLookupMap",nE="__rjsf_additionalProperties",PN="__rjsf_rootSchema",Soe="ui:field",rE="ui:widget",Oa="ui:options",$w="ui:globalOptions",woe="https://json-schema.org/draft/2019-09/schema",Pg="https://json-schema.org/draft/2020-12/schema";function ct(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===rE&&Kt(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===Oa&&Kt(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t}):{...t}}function DN(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ct(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function Iw(e){const t={[Vr]:[],addError(n){this[Vr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:Iw(r)}),t);if(Ia(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:Iw(n[i])}),t)}return t}function Rn(e,t){return NB(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const xoe=Object.prototype;function Od(e){for(const t in e)if(xoe.hasOwnProperty.call(e,t))return!1;return!0}const _oe=["array","boolean","integer","null","number","object","string"];new Set(_oe);const Eoe=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Eoe);const Coe=["items","allOf","oneOf","anyOf"];new Set(Coe);const Toe=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Toe);function Dg(e){return typeof e=="object"}function Do(e){return Dg(e)?Od(e):e===!0}function yu(e,t){return e<t?-1:e>t?1:0}function N1(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const i=new Set(e);for(let s=0;s<r;s++)i.add(t[s]);return Array.from(i)}function Roe(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const i=e;e=t,t=i}const r=new Set(t);for(let i=0;i<e.length&&r.size>0;i++){const s=e[i];r.delete(s)&&n.push(s)}return n}function Vk(e){return e.length===0}function $1(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let i=0;i<t.length;i++)if(t[i]!==n[i]){const s=e(t[i],n[i]);if(s!==0)return s}return 0}}function NN(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const l=[];let c=0;e:for(let u=0;u<r;u++){const d=n[u];for(let h=0;h<c;h++)if(e(d,l[h])===0)continue e;c=l.push(d)}return l}const i=n.slice().sort(e);let s=0;for(let l=1;l<r;l++)e(i[s],i[l])!==0&&++s!==l&&(i[s]=i[l]);return i.length=s+1,i}}function Aoe(e){return(t,n)=>{const r=[];let i=t.length,s=n.length;if(i===0||s===0)return r;if(i>s){const h=t;t=n,n=h;const p=i;i=s,s=p}const l=[...t].sort(e),c=[...n].sort(e);let u=0,d=0;for(;u<i&&d<s;){const h=e(l[u],c[d]);h===0?((r.length===0||e(r[r.length-1],l[u])!==0)&&r.push(l[u]),u++,d++):h<0?u++:d++}return r}}function Ooe(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const Uk=Ooe,$N=()=>0,koe=e=>e===void 0,Moe=e=>typeof e!="object",qk={boolean:0,number:1,string:2};function joe(e,t){const n=typeof e,r=typeof t;return n===r?yu(e,t):qk[n]-qk[r]}function Poe(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const l=e;e=t,t=l}const i=new Set(e),s=t.length;for(let l=0;l<s;l++){const c=t[l];i.has(c)||e.push(c)}return e}function h0(e,t,n=$N){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function ou(e){return h0(koe,e)}function ba(e,t){return h0(n=>n===void 0||e(n),t)}function I1(e,t){return h0(Array.isArray,e,t)}const ur=ou(yu),z1=ba(e=>e===0,(e,t)=>e-t);function Doe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=Uk(t,T=>Object.keys(T).sort());function r(T){return(w,S)=>{const v=n(w),E=n(S),b=Math.min(v.length,E.length);for(let C=0;C<b;C++){const _=yu(v[C],E[C]);if(_!==0)return _}if(v.length!==E.length)return v.length-E.length;for(let C=0;C<b;C++){const _=v[C],A=T(w[_],S[_]);if(A!==0)return A}return 0}}function i(T){const w=$1(T),S=Uk(e,NN(T,{threshold:0}));return(v,E)=>w(S(v),S(E))}const s=i(yu);function l(T,w){if(Dg(T)){if(Dg(w)){const S=Object.keys(T),v=Object.keys(w),E=Poe(S,v),b=E.length;for(let C=0;C<b;C++){const _=E[C];if(T[_]===w[_])continue;const M=(y[_]??c)(T[_],w[_]);if(M!==0)return M}return 0}return w===!0&&Od(T)?0:1}return Dg(w)?T===!0&&Od(w)?0:-1:yu(T,w)}const c=ou(d),u=h0(Moe,I1(r(c),$1(d)),joe);function d(T,w){return T===null?-1:w===null?1:u(T,w)}const h=ou(l),p=ba(Od,r(h)),g=ou(i(l)),x=ba(Do,l),y={$id:ur,$comment:ur,$defs:p,$ref:ur,$schema:ur,const:c,contains:h,contentEncoding:ur,contentMediaType:ur,default:c,definitions:p,description:ur,else:h,examples:c,exclusiveMaximum:ur,exclusiveMinimum:ur,format:ur,if:h,maximum:ur,maxItems:ur,maxLength:ur,maxProperties:ur,minimum:ur,multipleOf:ur,not:h,pattern:ur,propertyNames:h,readOnly:ur,then:h,title:ur,writeOnly:ur,uniqueItems:ba(T=>T===!1,$N),minLength:z1,minItems:z1,minProperties:z1,required:ba(Vk,s),enum:ba(Vk,i(d)),type:ou((T,w)=>{const S=Array.isArray(T),v=Array.isArray(w);return!S&&!v?yu(T,w):s(S?T:[T],v?w:[w])}),items:ba(T=>!Array.isArray(T)&&Do(T),I1(l,$1(l))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:x,additionalItems:x,dependencies:ba(Od,r(ou(I1(l,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:l}}function Bk(e){return e}const IN=(e,t)=>e?IN(t%e,e):t,Noe=(e,t)=>Math.abs(e*t)/IN(e,t);function $oe(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*F1(e,t,n){const r=e.length,i=t.length;if(r>0&&i>0)for(let s=0;s<r;s++){const l=e[s];for(let c=0;c<i;c++)yield n(l,t[c])}}function L1(e,t){return e||t}function Hk(e){return(t,n)=>{const r={...t},i=Object.keys(n),s=i.length;for(let l=0;l<s;l++){const c=i[l];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function Ioe(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Ml(e,t,n){n===void 0||Do(n)?delete e[t]:e[t]=n}const zoe=["properties","patternProperties","additionalProperties"];function Kk(e){const t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){const s=t[i];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const Gk=[[],[]];function Zk(e,t,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(t))continue;const l=s.schema;if(l===!1)return!0;e.push(l)}return!1}const Foe=["items","additionalItems"],Loe=["if","then","else"];function Wk(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function V1(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function jl(e,t,n){return[e,t,n]}function Voe(e){const t=new Map;for(const[n,r,i]of e){const s=l=>{if(!i(l))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(l[n])}, ${r}: ${JSON.stringify(l[r])})`)};for(const l of[[n,r],[r,n]]){let c=t.get(l[0]);c===void 0&&(c=[],t.set(l[0],c)),c.push({oppositeKey:l[1],check:s})}}return t}const Uoe=[jl("minimum","maximum",e=>e.maximum>=e.minimum),jl("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),jl("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),jl("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),jl("minLength","maxLength",e=>e.maxLength>=e.minLength),jl("minItems","maxItems",e=>e.maxItems>=e.minItems),jl("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function qoe({mergePatterns:e=$oe,isSubRegExp:t=Object.is,intersectJson:n=Roe,deduplicateJsonSchemaDef:r=Bk,defaultMerger:i=Bk,assigners:s=[],checks:l=Uoe,mergers:c}={}){function u(b){const C=b.length;let _=b[0];for(let A=1;A<C;A++){const M=S(_,b[A]);if(M===!1)return!1;Do(M)||(_=M)}return _}function d(b,C,_,A,M,P,I){if(b.length=0,_===!1)return!1;if(b.push(_),M!==void 0){if(M===!1)return!1;b.push(M)}if(Zk(b,C,P))return!1;const q=b.length<2;if(I===!1){if(q)return;if(Zk(b,C,A))return!1}else q&&I!==void 0&&b.push(I);return b.length===1?b[0]:u(b)}function h(b,C,_,A,M,P){const I=_.length;if(I>0&&M!==!1)if(P)Object.assign(b,C);else for(let z=0;z<I;z++){const q=_[z];A.has(q)||(b[q]=S(C[q],M))}return b}const p=(b,{properties:C={},patternProperties:_,additionalProperties:A=!0},{properties:M={},patternProperties:P,additionalProperties:I=!0})=>{const z=Do(A),q=Do(I);if(z&&q)return Ml(b,"properties",v(C,M)),Ml(b,"patternProperties",_&&P?v(_,P):_??P),delete b.additionalProperties,b;const K=S(A,I);Ml(b,"additionalProperties",K);const X={},Y=Object.keys(C),H=Y.length,[Z,ee]=_?Kk(_):Gk,[ae,re]=P?Kk(P):Gk,$=[],B=new Set,F=q?void 0:I;for(let he=0;he<H;he++){const Ee=Y[he];B.add(Ee);const te=d($,Ee,C[Ee],Z,M[Ee],ae,F);te!==void 0&&(X[Ee]=te)}const D=Object.keys(M),V=D.length,J=z?void 0:A;for(let he=0;he<V;he++){const Ee=D[he];if(B.has(Ee))continue;const te=d($,Ee,M[Ee],ae,void 0,Z,J);te!==void 0&&(X[Ee]=te)}Ml(b,"properties",X);let ne={};const oe=new Set;if(ee.length>0&&re.length>0){const he=F1(ee,re,(Ee,te)=>{t(Ee,te)&&oe.add(Ee),t(te,Ee)&&oe.add(te),ne[e(Ee,te)]=S(_[Ee],P[te])});for(;!he.next().done;);}return ne=h(ne,_,ee,oe,I,q),ne=h(ne,P,re,oe,A,z),Ml(b,"patternProperties",ne),b},g=(b,{items:C=[],additionalItems:_},{items:A=[],additionalItems:M})=>{const P=Array.isArray(C),I=Array.isArray(A),z=[];if(b.items=z,P&&I){const[q,K,X]=C.length<A.length?[C.length,_,A]:[A.length,M,C];let Y=0;for(;Y<q;Y++)z.push(S(C[Y],A[Y]));if(K===!1)b.additionalItems=!1;else{const H=K===void 0||Do(K);for(;Y<X.length;Y++)z.push(H?X[Y]:S(X[Y],K));Ml(b,"additionalItems",_!==void 0&&M!==void 0?S(_,M):_??M)}}else if(P||I){const[q,K,X]=P?[C,A,_]:[A,C,M];Ml(b,"additionalItems",X&&S(X,K));for(let Y=0;Y<q.length;Y++)z.push(S(q[Y],K))}else delete b.additionalItems,b.items=S(C,A);return b},x=(b,C,_)=>{Wk(b,C);const A=Wk({},_);return b.allOf===void 0?b.allOf=[A]:b.allOf=b.allOf.concat(A),b};function y(b,C){return r(Array.from(F1(b,C,S)))}const T=Ioe([[zoe,p],[Foe,g],[Loe,x],...s]),w=Voe(l);function S(b,C){if(b===!1||C===!1)return!1;if(Do(b))return Do(C)?!0:C;if(Do(C))return b;let _={...b};const A=new Set,M=new Set,P=Object.keys(C),I=P.length;for(let z=0;z<I;z++){const q=P[z],K=C[q];if(K===void 0)continue;const X=w.get(q);if(X!==void 0){const ee=X.length;for(let ae=0;ae<ee;ae++){const re=X[ae];b[re.oppositeKey]!==void 0&&M.add(re.check)}}const Y=b[q];if(Y===void 0){_[q]=K;continue}const H=T.get(q);if(H){A.add(H);continue}const Z=E[q]??i;_[q]=Z(Y,K)}for(const z of A)_=z(_,b,C);for(const z of M)z(_);return _}const v=Hk(S),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(b,C)=>{if(b===C)return b;const _=Array.isArray(b),A=Array.isArray(C);if(!_&&!A){const M=V1(b,C);if(M!==void 0)return M}else if(_||A){const M=new Set;if(_&&A)for(const I of F1(b,C,V1))I!==void 0&&M.add(I);else{const I=_?b:C,z=_?C:b,q=I.length;for(let K=0;K<q;K++){const X=V1(z,I[K]);X!==void 0&&M.add(X)}}const P=M.size;if(P===1)return M.values().next().value;if(P>1)return Array.from(M)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${b.toString()}, ${C.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(b,C)=>{const _=r([b,C]);return _.length===1?_[0]:{anyOf:_}},pattern:e,readOnly:L1,writeOnly:L1,enum:(b,C)=>{const _=n(b,C);if(_.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(b)}", "${JSON.stringify(C)}"`);return _},anyOf:y,oneOf:y,allOf:(b,C)=>r(b.concat(C)),propertyNames:S,contains:S,dependencies:Hk((b,C)=>Array.isArray(b)?Array.isArray(C)?N1(b,C):S(C,{required:b}):Array.isArray(C)?S(b,{required:C}):S(b,C)),examples:(b,C)=>{if(!Array.isArray(b)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(b)}" and "${JSON.stringify(C)}"`);return N1(b,C)},multipleOf:(b,C)=>{let _=1;for(;!Number.isInteger(b)||!Number.isInteger(C);)_*=10,b*=10,C*=10;return Noe(b,C)/_},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:L1,required:N1,...c};return{mergeSchemaDefinitions:S,mergeArrayOfSchemaDefinitions:u}}function Boe(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:i,...s}=r;t.push(s);for(let l=i.length-1;l>=0;l--)n.push(i[l])}return t}function Hoe(e){return t=>e(Boe(t))}var xd={},Yk;function Koe(){if(Yk)return xd;Yk=1;var e=/~/,t=/~[01]/g;function n(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function r(d){return e.test(d)?d.replace(t,n):d}function i(d,h,p){for(var g,x,y=1,T=h.length;y<T;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return d;if(g=r(h[y++]),x=T>y,typeof d[g]>"u"&&(Array.isArray(d)&&g==="-"&&(g=d.length),x&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?d[g]=[]:d[g]={})),!x)break;d=d[g]}var w=d[g];return p===void 0?delete d[g]:d[g]=p,w}function s(d){if(typeof d=="string"){if(d=d.split("/"),d[0]==="")return d;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(d)){for(const h of d)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function l(d,h){if(typeof d!="object")throw new Error("Invalid input object.");h=s(h);var p=h.length;if(p===1)return d;for(var g=1;g<p;){if(d=d[r(h[g++])],p===g)return d;if(typeof d!="object"||d===null)return}}function c(d,h,p){if(typeof d!="object")throw new Error("Invalid input object.");if(h=s(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return i(d,h,p)}function u(d){var h=s(d);return{get:function(p){return l(p,h)},set:function(p,g){return c(p,h,g)}}}return xd.get=l,xd.set=c,xd.compile=u,xd}var Goe=Koe();const U1=Qo(Goe);var Zoe=T4();const iE=Qo(Zoe);function by(e,t){if(Sn in e&&iE.equal(e[Sn],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Zt(r)){const i=by(r,t);if(i!==void 0)return i}}else if(Zt(n)){const r=by(n,t);if(r!==void 0)return r}}function zw(e,t){const n=Fe(e,Sn,t);Dn in e&&(e={...e,[Dn]:iE.resolve(n,e[Dn])});for(const[r,i]of Object.entries(e))Array.isArray(i)?e={...e,[r]:i.map(s=>Zt(s)?zw(s,n):s)}:Zt(i)&&(e={...e,[r]:zw(i,n)});return e}function oE(e,t){const n=t[e];return[Jd(t,[e]),n]}function zN(e,t={},n=[],r=Fe(t,[Sn])){const i=e||"";let s;if(i.startsWith("#")){const c=decodeURIComponent(i.substring(1));r===void 0||Sn in t&&t[Sn]===r?s=U1.get(t,c):t[Ad]===Pg&&(s=by(t,r.replace(/\/$/,"")),s!==void 0&&(s=U1.get(s,c)))}else if(t[Ad]===Pg){const c=r?iE.resolve(r,i):i,[u,...d]=c.replace(/#\/?$/,"").split("#");s=by(t,u.replace(/\/$/,"")),s!==void 0&&(r=s[Sn],dr(d)||(s=U1.get(s,decodeURIComponent(d.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const l=s[Dn];if(l){if(n.includes(l)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,i,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=oE(Dn,s),d=zN(u,t,[...n,i],r);return Object.keys(c).length>0?t[Ad]===woe||t[Ad]===Pg?{[Ba]:[c,d]}:{...c,...d}:d}return s}function FN(e,t={},n=Fe(t,[Sn])){return zN(e,t,[],n)}function Go(e){let t;const n=Fe(e,voe);return za(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function ch(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function wo(e){let{type:t}=e;return!t&&e.const?ch(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Ms(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},l=t[i];return e&&i in e&&Kt(l)?r[i]=Ms(s,l):e&&t&&(wo(e)==="object"||wo(t)==="object")&&i===kN&&Array.isArray(s)&&Array.isArray(l)?r[i]=QB(s,l):r[i]=l,r},n)}function LN(e,t,n){var r;if(e&&n){const i=Fe(e,n);if(i===void 0)return;for(let s=0;s<t.length;s++){const l=t[s],c=Fe(l,[sn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===i||!((r=c.enum)===null||r===void 0)&&r.includes(i)))return s}}}function sE(e,t,n,r,i){if(t===void 0)return 0;const s=LN(t,n,i);if(oP(s))return s;for(let l=0;l<n.length;l++){const c=n[l];if(i&&Bt(c,[sn,i])){const u=Fe(t,i),d=Fe(c,[sn,i],{});if(e.isValid(d,u,r))return l}else if(c[sn]){const u={anyOf:Object.keys(c[sn]).map(h=>({required:[h]}))};let d;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),d=h}else d=Object.assign({},c,u);if(delete d.required,e.isValid(d,t,r))return l}else if(e.isValid(c,t,r))return l}return 0}function Gr(e,t,n={},r,i,s=!1){return zo(e,t,n,r,void 0,void 0,i,s)[0]}function Woe(e,t,n,r,i,s,l){const{if:c,then:u,else:d,...h}=t,p=e.isValid(c,s||{},n);let g=[h],x=[];if(r)u&&typeof u!="boolean"&&(x=x.concat(zo(e,u,n,s,r,i,l))),d&&typeof d!="boolean"&&(x=x.concat(zo(e,d,n,s,r,i,l)));else{const y=p?u:d;y&&typeof y!="boolean"&&(x=x.concat(zo(e,y,n,s,r,i,l)))}return x.length&&(g=x.map(y=>Ms(h,y))),g.flatMap(y=>zo(e,y,n,s,r,i,l))}function VN(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>uP(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function UN(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(fn(n,[r],e.patternProperties[r]),n),{})}function Yoe(e,t,n,r,i,s,l,c){const u=qN(e,t,n,r,i,s,l,c);if(u.length>1||u[0]!==t)return u;if(tE in t)return BN(e,t,n,r,i,s,l).flatMap(h=>zo(e,h,n,s,r,i,l));if(Ba in t&&Array.isArray(t[Ba])){const d=t.allOf.map(p=>zo(e,p,n,s,r,i,l));return VN(d).map(p=>({...t,allOf:p}))}return[t]}function qN(e,t,n,r,i,s,l,c){const u=Eu(t,n,i,void 0,c);return u!==t?zo(e,u,n,s,r,i,l,c):[t]}function Eu(e,t,n,r,i){if(!Kt(e))return e;let s=e;if(Dn in s){const{$ref:l,...c}=s;if(n.includes(l))return s;n.push(l),s={...FN(l,t,r),...c},Sn in s&&(r=s[Sn])}if(sn in s){const l=[],c=ZB(s[sn],(u,d,h)=>{const p=[...n];u[h]=Eu(d,t,p,r,i),l.push(p)},{});aP(n,hP(vB(l))),s={...s,[sn]:c}}if(qu in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Eu(s.items,t,n,r,i)}),i){let l,c;Gt in e&&Array.isArray(e[Gt])?(l=Gt,c=s[Gt]):Nt in e&&Array.isArray(e[Nt])&&(l=Nt,c=s[Nt]),l&&c&&(s={...s,[l]:c.map(u=>Eu(u,t,n,r,i))})}return Rn(e,s)?e:s}function Xoe(e,t,n,r,i){const s={...t,properties:{...t.properties}},l=r&&Kt(r)?r:{};return Object.keys(l).forEach(c=>{if(!(c in s.properties)){if(Nw in s){const u=UN(s,c);if(!dr(u)){s.properties[c]=Gr(e,{[Ba]:Object.values(u)},n,Fe(l,[c]),i),fn(s.properties,[c,Rs],!0);return}}if(yy in s&&s.additionalProperties!==!1){let u;typeof s.additionalProperties!="boolean"?Dn in s.additionalProperties?u=Gr(e,{[Dn]:Fe(s.additionalProperties,[Dn])},n,l,i):"type"in s.additionalProperties?u={...s.additionalProperties}:Gt in s.additionalProperties||Nt in s.additionalProperties?u={type:"object",...s.additionalProperties}:u={type:ch(Fe(l,[c]))}:u={type:ch(Fe(l,[c]))},s.properties[c]=u,fn(s.properties,[c,Rs],!0)}else s.properties[c]={type:"null"},fn(s.properties,[c,Rs],!0)}}),s}const{compareSchemaDefinitions:Qoe,compareSchemaValues:Joe}=Doe(),{mergeArrayOfSchemaDefinitions:ese}=qoe({intersectJson:Aoe(Joe),deduplicateJsonSchemaDef:NN(Qoe)}),tse=Hoe(ese);function nse(e){return tse(e)}function zo(e,t,n,r,i=!1,s=[],l,c){return Kt(t)?Yoe(e,t,n,i,s,r,l,c).flatMap(d=>{var h;let p=d;if(goe in p)return Woe(e,p,n,i,s,r,l);if(Ba in p){if(i){const{allOf:x,...y}=p;return[...x,y]}try{const x=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(T=>{typeof T=="object"&&T.contains?x.push(T):y.push(T)}),x.length&&(p={...p,allOf:y}),p=l?l(p):nse(p),x.length&&(p.allOf=x)}catch(x){console.warn(`could not merge subschemas in allOf:
40
+ `,x);const{allOf:y,...T}=p;return T}}return sn in p&&Nw in p&&(p=Object.keys(p.properties).reduce((x,y)=>{const T=UN(x,y);return dr(T)||(x.properties[y]=Gr(e,{allOf:[x.properties[y],...Object.values(T)]},n,Fe(r,[y]),l)),x},{...p,properties:{...p.properties}})),Nw in p||yy in p&&p.additionalProperties!==!1?Xoe(e,p,n,r,l):p}):[{}]}function rse(e,t,n,r,i){let s;const{oneOf:l,anyOf:c,...u}=t;if(Array.isArray(l)?s=l:Array.isArray(c)&&(s=c),s){const d=i===void 0&&r?{}:i,h=Go(t);s=s.map(g=>Eu(g,n,[]));const p=sE(e,d,s,n,h);if(r)return s.map(g=>Ms(u,g));t=Ms(u,s[p])}return[t]}function BN(e,t,n,r,i,s,l){const{dependencies:c,...u}=t;return rse(e,u,n,r,s).flatMap(h=>HN(e,c,h,n,r,i,s,l))}function HN(e,t,n,r,i,s,l,c){let u=[n];for(const d in t){if(!i&&Fe(l,[d])===void 0||n.properties&&!(d in n.properties))continue;const[h,p]=oE(d,t);return Array.isArray(p)?u[0]=ise(n,p):Kt(p)&&(u=ose(e,n,r,d,p,i,s,l,c)),u.flatMap(g=>HN(e,h,g,r,i,s,l,c))}return u}function ise(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function ose(e,t,n,r,i,s,l,c,u){return zo(e,i,n,c,s,l,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=Ms(t,g),p===void 0)return t;const x=p.map(T=>typeof T=="boolean"||!(Dn in T)?[T]:qN(e,T,n,s,l,c));return VN(x).flatMap(T=>sse(e,t,n,r,T,s,l,c,u))})}function sse(e,t,n,r,i,s,l,c,u){const d=i.filter(h=>{if(typeof h=="boolean"||!h||!h.properties)return!1;const{[r]:p}=h.properties;if(p){const g={type:"object",properties:{[r]:p}};return e.isValid(g,c,n)||s}return!1});return!s&&d.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):d.flatMap(h=>{const p=h,[g]=oE(r,p.properties),x={...p,properties:g};return zo(e,x,n,c,s,l,u).map(T=>Ms(t,T))})}function kd(e,t,n,r,i,s={},l){if(Array.isArray(n[i])){const u=Go(n)||r,d=n[i].map(p=>Gr(e,p,t,s,l)),h=Fe(s,u);if(h!==void 0)return d.find(p=>Aa(Fe(p,[sn,u,d0],Fe(p,[sn,u,no])),h))}}function KN(e,t,n,r,i){let s=n;if(Bt(n,Dn)&&(s=Gr(e,n,t,void 0,i)),dr(r))return s;const l=Array.isArray(r)?r:r.split("."),[c,...u]=l;if(c&&Bt(s,c))return s=Fe(s,c),KN(e,t,s,u,i)}function Ng(e,t,n,r,i,s){const l=KN(e,t,n,r,s);return l===void 0?i:l}const Xk={title:"!@#$_UNKNOWN_$#@!"};function ase(e,t,n,r,i={},s){const l=Array.isArray(r)?[...r]:r.split(".");let c=n;const u=l.pop();l.length&&l.forEach(g=>{c=Ng(e,t,c,[sn,g],{},s),Bt(c,Nt)?c=kd(e,t,c,u,Nt,Fe(i,g),s):Bt(c,Gt)&&(c=kd(e,t,c,u,Gt,Fe(i,g),s))}),Bt(c,Nt)?c=kd(e,t,c,u,Nt,i,s):Bt(c,Gt)&&(c=kd(e,t,c,u,Gt,i,s));let d=Ng(e,t,c,[sn,u],Xk,s);d===Xk&&(d=void 0);const h=Ng(e,t,c,kN,[],s);let p;return d&&Array.isArray(h)&&(p=h.includes(u)),{field:d,isRequired:p}}const lse={type:"object",$id:yoe,properties:{__not_really_there__:{type:"number"}}};function Fw(e,t,n,r,i){let s=0;return n&&(Zt(n.properties)?s+=BB(n.properties,(l,c,u)=>{const d=Fe(r,u);if(typeof c=="boolean")return l;if(Bt(c,Dn)){const h=Gr(e,c,t,d,i);return l+Fw(e,t,h,d||{},i)}if((Bt(c,Nt)||Bt(c,Gt))&&d){const h=Bt(c,Nt)?Nt:Gt,p=Go(c);return l+uh(e,t,d,Fe(c,h),-1,p,i)}if(c.type==="object")return Zt(d)&&(l+=1),l+Fw(e,t,c,d,i);if(c.type===ch(d)){let h=l+1;return c.default?h+=d===c.default?1:-1:c.const&&(h+=d===c.const?1:-1),h}return l},0):za(n.type)&&n.type===ch(r)&&(s+=1)),s}function uh(e,t,n,r,i=-1,s,l){const c=r.map(g=>Eu(g,t,[])),u=LN(n,r,s);if(oP(u))return u;const d=c.reduce((g,x,y)=>(sE(e,n,[lse,x],t,s)===1&&g.push(y),g),[]);if(d.length===1)return d[0];d.length||uP(c.length,g=>d.push(g));const h=new Set,{bestIndex:p}=d.reduce((g,x)=>{const{bestScore:y}=g,T=c[x],w=Fw(e,t,T,n,l);return h.add(w),w>y?{bestIndex:x,bestScore:w}:g},{bestIndex:i,bestScore:0});return h.size===1&&i>=0?i:p}function aE(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Kt(t))}function fh(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],l=i?s:t,c=i?t:s,u=l.map((d,h)=>c[h]!==void 0?fh(s[h],t[h],n,r,i):d);return(n||i)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Kt(t)){const s=Object.assign({},e);return Object.keys(t).reduce((l,c)=>{var u;const d=Fe(t,c),h=Kt(e)&&c in e,p=c in t,g=(u=Fe(e,c))!==null&&u!==void 0?u:{},x=h&&Object.entries(g).some(([,w])=>Kt(w)),y=h&&Kt(Fe(e,c)),T=p&&Kt(d);return y&&T&&!x?(l[c]={...Fe(e,c),...d},l):(l[c]=fh(Fe(e,c),d,n,r,i&&(h||!p)),l)},s)}return r&&(e!==void 0&&Qg(t)||typeof t=="number"&&isNaN(t))||i&&!Qg(t)?e:t}function dh(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},l=t[i];if(e&&i in e&&Kt(l))r[i]=dh(s,l,n);else if(n&&Array.isArray(s)&&Array.isArray(l)){let c=l;n==="preventDuplicates"&&(c=l.reduce((u,d)=>(s.includes(d)||u.push(d),u),[])),r[i]=s.concat(c)}else r[i]=l;return r},Object.assign({},e))}function GN(e){return Array.isArray(e.enum)&&e.enum.length===1||no in e}function lE(e,t,n={},r){const i=Gr(e,t,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(l=>typeof l!="boolean"&&GN(l)):!1}function cE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:lE(e,t.items,n,r)}function ZN(e){const t=e[no],n=wo(e);return Kt(t)&&za(t?.$data)&&n!=="object"&&n!=="array"}function cse(e){if(moe in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(no in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Bu(e,t){if(e.enum){let s;if(t){const{enumNames:l}=ct(t);s=l}return e.enum.map((l,c)=>({label:s?.[c]||String(l),value:l}))}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Go(e);if(t){const{optionsSchemaSelector:s=i}=ct(t);i=s}return n&&n.map((s,l)=>{const{title:c}=ct(r?.[l]),u=s;let d,h=c;if(i){const p=Fe(u,[sn,i],{});d=Fe(p,d0,Fe(p,no)),h=h||p?.title||u.title||String(d)}else d=cse(u),h=h||u.title||String(d);return{schema:u,label:h,value:d}})}const use=["string","number","integer","boolean","null"];var Hu;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Hu||(Hu={}));function q1(e,t=Hu.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Hu.Ignore&&Kt(e.additionalItems)?e.additionalItems:{}}function WN(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&dr(t)&&n===null?null:t}function Qk(e,t,n,r,i,s=[],l={},c=!1,u=!1){const{emptyObjectFields:d="populateAllDefaults"}=l;if(r===!0||c)e[t]=n;else if(r==="excludeObjectChildren")(u&&n!==void 0||!Kt(n)||!dr(n))&&(e[t]=n);else if(d!=="skipDefaults"){const h=i===void 0?s.includes(t):i;Kt(n)?d==="skipEmptyDefaults"?dr(n)||(e[t]=n):(!dr(n)||s.includes(t))&&(h||d!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(d==="populateAllDefaults"||d==="skipEmptyDefaults"||h&&s.includes(t))&&(e[t]=n)}}function ka(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:l=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:d=void 0,required:h,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:g}=n;let x=Kt(i)?i:{};const y=Kt(t)?t:{};let T=r,w=null,S=u,v=c;if(y[no]!==void 0&&u?.constAsDefaults!=="never"&&!ZN(y))T=y[no];else if(Kt(T)&&Kt(y.default))T=dh(T,y.default);else if(d0 in y&&!y[Gt]&&!y[Nt]&&!y[Dn])T=y.default;else if(Dn in y){const C=y[Dn];c.includes(C)||(v=c.concat(C),w=FN(C,s)),w&&!T&&(T=y.default),p&&w&&!Kt(i)&&(x=i)}else if(tE in y){const C={...Jk(e,y,n,T),...x};w=BN(e,y,s,!1,[],C,d)[0]}else if(aE(y))T=y.items.map((C,_)=>ka(e,C,{rootSchema:s,includeUndefinedValues:l,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(r)?r[_]:void 0,rawFormData:x,required:h,shouldMergeDefaultsIntoFormData:p}));else if(Nt in y){const{oneOf:C,..._}=y;if(C.length===0)return;const A=Go(y),{type:M="null"}=_;!Array.isArray(M)&&use.includes(M)&&S?.constAsDefaults==="skipOneOf"&&(S={...S,constAsDefaults:"never"}),w=C[uh(e,s,i??y.default,C,0,A,d)],w=Ms(_,w)}else if(Gt in y){const{anyOf:C,..._}=y;if(C.length===0)return;const A=Go(y);w=C[uh(e,s,i??y.default,C,0,A,d)],w=Ms(_,w)}if(w)return ka(e,w,{rootSchema:s,includeUndefinedValues:l,_recurseList:v,experimental_defaultFormStateBehavior:S,experimental_customMergeAllOf:d,parentDefaults:T,rawFormData:i??x,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});T===void 0&&(T=y.default);const E=Jk(e,y,n,T);let b=E??T;if(p){const{arrayMinItems:C={}}=u||{},{mergeExtraDefaults:_}=C,A=fse(e,y,s,i,u,d);(!Kt(i)||Ba in y)&&(b=fh(b,A,_,!0))}return b}function fse(e,t,n,r,i,s){const l=!GN(t)&&lE(e,t,n,s);let c=r;if(l){const d=Bu(t);c=d?.some(p=>Rn(p.value,r))?r:void 0}return t[no]&&i?.constAsDefaults==="always"&&(c=t.const),c}function dse(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){{const g=Kt(n)?n:{},x=t,y=l?.allOf==="populateDefaults"&&Ba in x?Gr(e,x,r,g,c):x,T=y[no],w=Object.keys(y.properties||{}).reduce((S,v)=>{var E;const b=Fe(y,[sn,v],{}),C=Kt(T)&&T[v]!==void 0,_=(Kt(b)&&no in b||C)&&l?.constAsDefaults!=="never"&&!ZN(b),A=ka(e,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:i===!0,parentDefaults:Fe(p,[v]),rawFormData:Fe(g,[v]),required:(E=y.required)===null||E===void 0?void 0:E.includes(v),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});return Qk(S,v,A,i,u,y.required,l,_,b?.type==="null"),S},{});if(y.additionalProperties&&!h){const S=Kt(y.additionalProperties)?y.additionalProperties:{},v=new Set;Kt(p)&&Object.keys(p).filter(b=>!y.properties||!y.properties[b]).forEach(b=>v.add(b));const E=[];Object.keys(g).filter(b=>!y.properties||!y.properties[b]).forEach(b=>{v.add(b),E.push(b)}),v.forEach(b=>{var C;const _=ka(e,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:i===!0,parentDefaults:Fe(p,[b]),rawFormData:Fe(g,[b]),required:(C=y.required)===null||C===void 0?void 0:C.includes(b),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});Qk(w,b,_,i,u,E)})}return WN(t,w)}}function hse(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:l=void 0,required:c,requiredAsRoot:u=!1,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){var g,x;const y=t,T=(g=s?.arrayMinItems)!==null&&g!==void 0?g:{},{populate:w,mergeExtraDefaults:S}=T,v=w==="never",E=w==="requiredOnly",b=w==="all"||!v&&!E,C=(x=T?.computeSkipPopulate)!==null&&x!==void 0?x:(()=>!1),A=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((z,q)=>{const K=q1(y,Hu.Fallback,q);return ka(e,K,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,parentDefaults:z,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h})})),Array.isArray(n)){const z=q1(y);if(v)p=n;else{const q=n.map((X,Y)=>ka(e,z,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:X,parentDefaults:Fe(p,[Y]),required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}));p=fh(p,q,(E&&c||b)&&S)}}if((Kt(y)&&no in y&&s?.constAsDefaults!=="never")===!1){if(v)return p??A;if(E&&!c)return p||void 0}let P;const I=Array.isArray(p)?p.length:0;if(!y.minItems||cE(e,y,r,l)||C(e,y,r)||y.minItems<=I)P=p||!c&&!u?p:A;else{const z=p||[],q=q1(y,Hu.Invert),K=q.default,X=Array.from({length:y.minItems-I},()=>ka(e,q,{parentDefaults:K,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,required:c,shouldMergeDefaultsIntoFormData:d}));P=z.concat(X)}return WN(t,P)}function Jk(e,t,n={},r){switch(wo(t)){case"object":return dse(e,t,n,r);case"array":return hse(e,t,n,r)}}function YN(e,t,n,r,i=!1,s,l,c){if(!Kt(t))throw new Error("Invalid schema: "+t);const u=Gr(e,t,r,n,l),d=ka(e,u,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Kt(u.default))return{...d,...n};if(Kt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=s||{};return fh(d,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return d}function XN(e={}){return"widget"in ct(e)&&ct(e).widget!=="hidden"}function QN(e,t,n={},r,i){if(n[rE]==="files")return!0;if(t.items){const s=Gr(e,t.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function pse(e,t,n={},r,i,s){const l=ct(n,i),{label:c=!0}=l;let u=!!c;if(u){const d=wo(t),h=Fe(t,Rs,!1);d==="array"&&(u=h||cE(e,t,r,s)||QN(e,t,n,r,s)||XN(n)),d==="object"&&(u=h),d==="boolean"&&n&&!n[rE]&&(u=!1),n&&n[Soe]&&(u=!1)}return u}const Qc=Symbol("no Value");function Lw(e,t,n,r,i={},s){let l;if(Bt(n,sn)){const c={};if(Bt(r,sn)){const h=Fe(r,sn,{});Object.keys(h).forEach(p=>{Bt(i,p)&&(c[p]=void 0)})}const u=Object.keys(Fe(n,sn,{})),d={};u.forEach(h=>{const p=Fe(i,h);let g=Fe(r,[sn,h],{}),x=Fe(n,[sn,h],{});Bt(g,Dn)&&(g=Gr(e,g,t,p,s)),Bt(x,Dn)&&(x=Gr(e,x,t,p,s));const y=Fe(g,"type"),T=Fe(x,"type");if(!y||y===T)if(Bt(c,h)&&delete c[h],T==="object"||T==="array"&&Array.isArray(p)){const w=Lw(e,t,x,g,p,s);(w!==void 0||T==="array")&&(d[h]=w)}else{const w=Fe(x,"default",Qc),S=Fe(g,"default",Qc);w!==Qc&&w!==p&&(S===p?c[h]=w:Fe(x,"readOnly")===!0&&(c[h]=void 0));const v=Fe(x,"const",Qc),E=Fe(g,"const",Qc);v!==Qc&&v!==p&&(c[h]=E===p?v:void 0)}}),l={...typeof i=="string"||Array.isArray(i)?void 0:i,...c,...d}}else if(Fe(r,"type")==="array"&&Fe(n,"type")==="array"&&Array.isArray(i)){let c=Fe(r,"items"),u=Fe(n,"items");if(typeof c=="object"&&typeof u=="object"&&!Array.isArray(c)&&!Array.isArray(u)){Bt(c,Dn)&&(c=Gr(e,c,t,i,s)),Bt(u,Dn)&&(u=Gr(e,u,t,i,s));const d=Fe(c,"type"),h=Fe(u,"type");if(!d||d===h){const p=Fe(n,"maxItems",-1);h==="object"?l=i.reduce((g,x)=>{const y=Lw(e,t,u,c,x,s);return y!==void 0&&(p<0||g.length<p)&&g.push(y),g},[]):l=p>0&&i.length>p?i.slice(0,p):i}}else typeof c=="boolean"&&typeof u=="boolean"&&c===u&&(l=i)}return l}function Nl(e,t,n,r,i,s=[],l){if(Dn in t||tE in t||Ba in t){const u=Gr(e,t,r,i,l);if(s.findIndex(h=>Rn(h,u))===-1)return Nl(e,u,n,r,i,s.concat(u),l)}let c={[jg]:n.replace(/^\./,"")};if(Nt in t||Gt in t){const u=Nt in t?t.oneOf:t.anyOf,d=Go(t),h=uh(e,r,i,u,0,d,l),p=u[h];c={...c,...Nl(e,p,n,r,i,s,l)}}if(yy in t&&t[yy]!==!1&&fn(c,nE,!0),qu in t&&Array.isArray(i)){const{items:u,additionalItems:d}=t;Array.isArray(u)?i.forEach((h,p)=>{u[p]?c[p]=Nl(e,u[p],`${n}.${p}`,r,h,s,l):d?c[p]=Nl(e,d,`${n}.${p}`,r,h,s,l):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):i.forEach((h,p)=>{c[p]=Nl(e,u,`${n}.${p}`,r,h,s,l)})}else if(sn in t)for(const u in t.properties){const d=Fe(t,[sn,u],{});c[u]=Nl(e,d,`${n}.${u}`,r,Fe(i,[u]),s,l)}return c}function mse(e,t,n="",r,i,s){return Nl(e,t,n,r,i,void 0,s)}class gse{constructor(t,n,r,i){n&&n[Ad]===Pg?this.rootSchema=zw(n,Fe(n,Sn,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!Rn(this.rootSchema,n)||!Rn(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,n,r){return ase(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,i){return kd(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,i){return YN(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(t,n,r){return pse(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return uh(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return sE(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return Ng(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return QN(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return cE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return lE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,n,r){return Gr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return Lw(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return mse(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function yse(e,t,n={},r){return new gse(e,t,n,r)}function vse(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[l,...c]=i.split(";"),u=l||"",d=decodeURI(((t=c.map(h=>h.split("=")).find(([h])=>h==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const h=atob(s),p=new Array(h.length);for(let x=0;x<h.length;x++)p[x]=h.charCodeAt(x);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:d}}catch(h){throw new Error("File is invalid: "+h.message)}}function Sa(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function JN(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return JN(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:Sa(r,2)});return n}function eM(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function bse(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,s)=>{const l=r.findIndex(c=>c===`%${s+1}`);l>=0&&(r[l]=i)}),n=r.join("")}return n}function Sse(e,t){return bse(e,t)}function xr(e,t=[],n){if(Array.isArray(e))return e.map(s=>xr(s,t)).filter(s=>s!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function e$(e,t,n=[]){const r=xr(e,n);return Array.isArray(t)?t.filter(i=>!Rn(i,r)):Rn(r,t)?void 0:t}function Lh(e,t){return Array.isArray(t)?t.some(n=>Rn(n,e)):Rn(t,e)}function t$(e,t=[],n=!1){const r=t.map((i,s)=>Lh(i.value,e)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function n$(e,t,n=[]){const r=xr(e,n);if(!Qg(r)){const i=n.findIndex(c=>r===c.value),s=n.map(({value:c})=>c);return t.slice(0,i).concat(r,t.slice(i)).sort((c,u)=>+(s.indexOf(c)>s.indexOf(u)))}return t}class r${constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Fe(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},HB(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?Wy(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=Fe(r,Vr);return Array.isArray(i)||(i=[],r[Vr]=i),Array.isArray(t)?fn(r,Vr,[...new Set([...i,...t])]):fn(r,Vr,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return fn(r,Vr,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return fn(n,Vr,[]),this}}function tM(e,t){const n=Ia(e),r=Ia(t);if(e===t||!n&&!r)return[];if(n&&!r)return Yi(e);if(!n&&r)return Yi(t);{const i=Yi(VB(e,(l,c)=>!Rn(l,Fe(t,c)))),s=mB(Yi(t),Yi(e));return[...i,...s]}}function wse(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:l,hour:c,minute:u,second:d}=e,h={type:"day",range:[1,31],value:i},p={type:"month",range:[1,12],value:s},g={type:"year",range:n,value:l},x=[];switch(r){case"MDY":x.push(p,h,g);break;case"DMY":x.push(h,p,g);break;case"YMD":default:x.push(g,p,h)}return t&&x.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:d}),x}function i$(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function o$(e,t,n={},r=!0){const i={type:t||"text",...i$(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}const nM={props:{disabled:!1},submitText:"Submit",norender:!1};function s$(e={}){const t=ct(e);if(t&&t[vy]){const n=t[vy];return{...nM,...n}}return nM}function yt(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const i=n[e];return r[i]}return n[e]||r[e]}function uE(){if(typeof process>"u"||Fe(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,pP("test-id-")),e.get(n)}})}var B1={exports:{}},un={};var rM;function xse(){if(rM)return un;rM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function T(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case e:switch(w=w.type,w){case n:case i:case r:case d:case h:return w;default:switch(w=w&&w.$$typeof,w){case c:case l:case u:case g:case p:case s:return w;default:return S}}case t:return S}}}return un.ContextConsumer=l,un.ContextProvider=s,un.Element=e,un.ForwardRef=u,un.Fragment=n,un.Lazy=g,un.Memo=p,un.Portal=t,un.Profiler=i,un.StrictMode=r,un.Suspense=d,un.SuspenseList=h,un.isAsyncMode=function(){return!1},un.isConcurrentMode=function(){return!1},un.isContextConsumer=function(w){return T(w)===l},un.isContextProvider=function(w){return T(w)===s},un.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},un.isForwardRef=function(w){return T(w)===u},un.isFragment=function(w){return T(w)===n},un.isLazy=function(w){return T(w)===g},un.isMemo=function(w){return T(w)===p},un.isPortal=function(w){return T(w)===t},un.isProfiler=function(w){return T(w)===i},un.isStrictMode=function(w){return T(w)===r},un.isSuspense=function(w){return T(w)===d},un.isSuspenseList=function(w){return T(w)===h},un.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===i||w===r||w===d||w===h||w===x||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===s||w.$$typeof===l||w.$$typeof===u||w.$$typeof===y||w.getModuleId!==void 0)},un.typeOf=T,un}var iM;function _se(){return iM||(iM=1,B1.exports=xse()),B1.exports}var Ese=_se();const oM=Qo(Ese),H1={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Cse(e){let t=Fe(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>j.jsx(e,{options:{...n,...r},...i}),fn(e,"MergedWidget",t)}return t}function Zo(e,t,n={}){const r=wo(e);if(typeof t=="function"||t&&oM.isForwardRef(k.createElement(t))||oM.isMemo(t))return Cse(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const i=n[t];return Zo(e,i,n)}if(typeof r=="string"){if(!(r in H1))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in H1[r]){const i=n[H1[r][t]];return Zo(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function Tse(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function Rse(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Fo(e){return Tse(Rse(e))}function Ase(e){return Fo(e)}function Ose(e,t,n={}){try{return Zo(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function lc(e,t){return`${za(e)?e:e[Sn]}__${t}`}function cc(e){return lc(e,"description")}function fE(e){return lc(e,"error")}function hh(e){return lc(e,"examples")}function dE(e){return lc(e,"help")}function p0(e){return lc(e,"title")}function vi(e,t=!1){const n=t?` ${hh(e)}`:"";return`${fE(e)} ${cc(e)} ${dE(e)}${n}`}function ql(e,t){return`${e}-${t}`}function Lo(e,t){return lc(e,t)}function K1(e,t){return lc(e,`optional${t}`)}function vf(e){return!Qg(e)&&(!Zt(e)||Array.isArray(e)||!dr(e))}function kse(e,t){const{rootSchema:n,schemaUtils:r}=e;if(Aa(t,n))return!0;if(Dn in n){const i=r.retrieveSchema(n);return Aa(t,i)}return!1}function a$(e,t,n){return t?n:e}function Mse(e){return e?new Date(e).toJSON():void 0}function hE(e,t,n){const r=[boe];return Bt(e,Lk)&&r.unshift(Lk),Fe(e,[...r,t],n)}function jse(e,t){if(!Array.isArray(t))return e;const n=h=>h.reduce((p,g)=>(p[g]=!0,p),{}),r=h=>h.length>1?`properties '${h.join("', '")}'`:`property '${h[0]}'`,i=n(e),s=t.filter(h=>h==="*"||i[h]),l=n(s),c=e.filter(h=>!l[h]),u=s.indexOf("*");if(u===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${r(c)}`);return s}if(u!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const d=[...s];return d.splice(u,1,...c),d}function G1(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Vd(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Vd(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Vd(e.oneOf[0]);if(e.allOf){const t=n=>Vd(n);return e.allOf.some(t)}return!1}function l$(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:l,state:c}=e;return!eM(l,t)||!eM(c,n)}const{props:i,state:s}=e;return!Rn(i,t)||!Rn(s,n)}function sM(e){const t=hP(e.map(n=>Zt(n)?wo(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Vh(e,t,n,r){const{enableOptionalDataFieldForType:i=[]}=ct(r,e.globalUiOptions);let s;return Gt in t&&Array.isArray(t[Gt])?s=sM(t[Gt]):Nt in t&&Array.isArray(t[Nt])?s=sM(t[Nt]):s=wo(t),!kse(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(l=>l===s)}function aM(e,t=!0){const{year:n,month:r,day:i,hour:s=0,minute:l=0,second:c=0}=e,u=Date.UTC(n,r-1,i,s,l,c),d=new Date(u).toJSON();return t?d:d.slice(0,10)}function pE(e,t=[]){if(!e)return[];let n=[];return Vr in e&&(n=n.concat(e[Vr].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Vr){const s=e[i];Ia(s)&&(r=r.concat(pE(s,[...t,i])))}return r},n)}function Pse(e){const t=new r$;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:fP(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&t.addErrors(i,s)}),t.ErrorSchema}function ro(e,t,n,r){const i=Array.isArray(n)?n:n?.path,s=e===""?[]:[e],l=i?i.concat(...s):s,c=[t.idPrefix,...l].join(t.idSeparator);let u;return t.nameGenerator&&l.length>0&&(u=t.nameGenerator(l,t.idPrefix,r)),{path:l,[Sn]:c,...u!==void 0&&{name:u}}}function c$(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return Ia(r)?{...t,[n]:c$(r)}:{...t,[n]:r}}},{})}function Dse(e){return Object.values(e).every(t=>t!==-1)}function Nse(e){const{className:t="form-control",type:n,range:r,value:i,select:s,rootId:l,name:c,disabled:u,readonly:d,autofocus:h,registry:p,onBlur:g,onFocus:x}=e,y=`${l}_${n}`,{SelectWidget:T}=p.widgets,w=k.useCallback(S=>s(n,S),[s,n]);return j.jsx(T,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:JN(r[0],r[1])},placeholder:n,value:i,disabled:u,readonly:d,autofocus:h,onChange:w,onBlur:g,onFocus:x,registry:p,label:"","aria-describedby":vi(l)})}function $se(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:l}=e,[c,u]=k.useState(G1(l,t));k.useEffect(()=>{u(G1(l,t))},[t,l]);const d=k.useCallback((x,y)=>{const T={...c,[x]:typeof y>"u"?-1:y};Dse(T)?s(aM(T,t)):u(T)},[c,s,t]),h=k.useCallback(x=>{x.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),p=k.useCallback(x=>{if(x.preventDefault(),n||r)return;const y=G1(new Date().toJSON(),t);s(aM(y,t))},[n,r,t,s]);return{elements:k.useMemo(()=>wse(c,t,i.yearsRange,i.format),[c,t,i.yearsRange,i.format]),handleChange:d,handleClear:h,handleSetNow:p}}function uc(e){const t=k.useRef(e);return Aa(e,t.current)||(t.current=e),t.current}function Ise(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function zse(e){const{name:t,size:n,type:r}=e;return new Promise((i,s)=>{const l=new window.FileReader;l.onerror=s,l.onload=c=>{var u;typeof((u=c.target)===null||u===void 0?void 0:u.result)=="string"?i({dataURL:Ise(c.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},l.readAsDataURL(e)})}function Fse(e){return Promise.all(Array.from(e).map(zse))}function lM(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=vse(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function Lse(e,t,n=!1){const r=k.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),i=k.useMemo(()=>Array.isArray(e)?lM(e):lM([e||""]),[e]),s=k.useCallback(c=>{Fse(c).then(u=>{const d=u.map(h=>h.dataURL||null);t(n?r.concat(...d):d[0])})},[r,n,t]),l=k.useCallback(c=>{if(n){const u=r.filter((d,h)=>h!==c);t(u)}else t(void 0)},[r,n,t]);return{filesInfo:i,handleChange:s,handleRemove:l}}function Vse(e){if(!e)return"";const t=new Date(e),n=Sa(t.getFullYear(),4),r=Sa(t.getMonth()+1,2),i=Sa(t.getDate(),2),s=Sa(t.getHours(),2),l=Sa(t.getMinutes(),2),c=Sa(t.getSeconds(),2),u=Sa(t.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${l}:${c}.${u}`}function $g(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:i}=e;let s=pE(t),l=t;return dr(i)||(l=dh(i,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:l,errors:s}}function Use(e){for(const t in e){const n=e,r=n[t];t===Dn&&typeof r=="string"&&r.startsWith("#")?n[t]=PN+r:n[t]=mE(r)}return e}function qse(e){for(let t=0;t<e.length;t++)e[t]=mE(e[t]);return e}function mE(e){return Array.isArray(e)?qse([...e]):Zt(e)?Use({...e}):e}var It;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(It||(It={}));function Vw(){return pP("rjsf-array-item-")}function cM(e){return Array.isArray(e)?e.map(t=>({key:Vw(),item:t})):[]}function u$(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Bse(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function f$(e,t,n,r){let{addable:i}=ct(r,e.globalUiOptions);return i!==!1&&(t.maxItems!==void 0?i=n.length<t.maxItems:i=!0),i}function d$(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return e.items}function Hse(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:aE(t)&&poe(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Kse(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,placeholder:d,onBlur:h,onFocus:p,registry:g,rawErrors:x,name:y,onSelectChange:T}=e,{widgets:w,schemaUtils:S,globalFormOptions:v,globalUiOptions:E}=g,b=S.retrieveSchema(t.items,i),C=Bu(b,r),{widget:_="select",title:A,...M}=ct(r,E),P=Zo(t,_,w),I=A??t.title??y,z=S.getDisplayLabel(t,r,E),q=uc(ro("",v,n,!0));return j.jsx(P,{id:q[Sn],name:y,multiple:!0,onChange:T,onBlur:h,onFocus:p,options:{...M,enumOptions:C},schema:t,uiSchema:r,registry:g,value:i,disabled:s,readonly:l,required:u,label:I,hideLabel:!z,placeholder:d,autofocus:c,rawErrors:x,htmlName:q.name})}function Gse(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:l=!1,required:c=!1,hideError:u,placeholder:d,onBlur:h,onFocus:p,formData:g=[],registry:x,rawErrors:y,name:T,onSelectChange:w}=e,{widgets:S,schemaUtils:v,globalFormOptions:E,globalUiOptions:b}=x,{widget:C,title:_,...A}=ct(r,b),M=Zo(t,C,S),P=_??t.title??T,I=v.getDisplayLabel(t,r,b),z=uc(ro("",E,n,!0));return j.jsx(M,{id:z[Sn],name:T,multiple:!0,onChange:w,onBlur:h,onFocus:p,options:A,schema:t,uiSchema:r,registry:x,value:g,disabled:i,readonly:s,hideError:u,required:c,label:P,hideLabel:!I,placeholder:d,autofocus:l,rawErrors:y,htmlName:z.name})}function Zse(e){const{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,onBlur:d,onFocus:h,registry:p,formData:g=[],rawErrors:x,onSelectChange:y}=e,{widgets:T,schemaUtils:w,globalFormOptions:S,globalUiOptions:v}=p,{widget:E="files",title:b,...C}=ct(n,v),_=Zo(t,E,T),A=b??t.title??i,M=w.getDisplayLabel(t,n,v),P=uc(ro("",S,r,!0));return j.jsx(_,{options:C,id:P[Sn],name:i,multiple:!0,onChange:y,onBlur:d,onFocus:h,schema:t,uiSchema:n,value:g,disabled:s,readonly:l,required:u,registry:p,autofocus:c,rawErrors:x,label:A,hideLabel:!M,htmlName:P.name})}function h$(e){const{itemKey:t,index:n,name:r,disabled:i,hideError:s,readonly:l,registry:c,uiOptions:u,parentUiSchema:d,canAdd:h,canRemove:p=!0,canMoveUp:g,canMoveDown:x,itemSchema:y,itemData:T,itemUiSchema:w,itemFieldPathId:S,itemErrorSchema:v,autofocus:E,onBlur:b,onFocus:C,onChange:_,rawErrors:A,totalItems:M,title:P,handleAddItem:I,handleCopyItem:z,handleRemoveItem:q,handleReorderItems:K}=e,{schemaUtils:X,fields:{ArraySchemaField:Y,SchemaField:H},globalUiOptions:Z}=c,ee=uc(S),ae=Y||H,re=yt("ArrayFieldItemTemplate",c,u),$=X.getDisplayLabel(y,w,Z),{description:B}=ct(w),F=!!B||!!y.description,{orderable:D=!0,removable:V=!0,copyable:J=!1}=u,ne={moveUp:D&&g,moveDown:D&&x,copy:J&&h,remove:V&&p,toolbar:!1};ne.toolbar=Object.keys(ne).some(Se=>ne[Se]);const oe=k.useCallback(Se=>{I(Se,n+1)},[I,n]),he=k.useCallback(Se=>{z(Se,n)},[z,n]),Ee=k.useCallback(Se=>{q(Se,n)},[q,n]),te=k.useCallback(Se=>{K(Se,n,n-1)},[K,n]),ie=k.useCallback(Se=>{K(Se,n,n+1)},[K,n]),le={children:j.jsx(ae,{name:r,title:P,index:n,schema:y,uiSchema:w,formData:T,errorSchema:v,fieldPathId:ee,required:Bse(y),onChange:_,onBlur:b,onFocus:C,registry:c,disabled:i,readonly:l,hideError:s,autofocus:E,rawErrors:A}),buttonsProps:{fieldPathId:ee,disabled:i,readonly:l,canAdd:h,hasCopy:ne.copy,hasMoveUp:ne.moveUp,hasMoveDown:ne.moveDown,hasRemove:ne.remove,index:n,totalItems:M,onAddItem:oe,onCopyItem:he,onRemoveItem:Ee,onMoveUpItem:te,onMoveDownItem:ie,registry:c,schema:y,uiSchema:w},itemKey:t,className:"rjsf-array-item",disabled:i,hasToolbar:ne.toolbar,index:n,totalItems:M,readonly:l,registry:c,schema:y,uiSchema:w,parentUiSchema:d,displayLabel:$,hasDescription:F};return j.jsx(re,{...le})}function Wse(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:x,onBlur:y,onFocus:T,rawErrors:w,onChange:S,keyedFormData:v,handleAddItem:E,handleCopyItem:b,handleRemoveItem:C,handleReorderItems:_}=e,A=t.title||c||l,{schemaUtils:M,fields:P,formContext:I,globalFormOptions:z,globalUiOptions:q}=x,{OptionalDataControlsField:K}=P,X=ct(n,q),Y=Zt(t.items)?t.items:{},H=M.retrieveSchema(Y),Z=u$(v),ee=Vh(x,t,p,n),ae=vf(s),re=f$(x,t,Z,n)&&(!ee||ae),$=ae?v:[],B=ee?" rjsf-optional-array-field":"",F=e.childFieldPathId??i,D=ee?j.jsx(K,{...e,fieldPathId:F}):void 0,V={canAdd:re,items:$.map((ne,oe)=>{const{key:he,item:Ee}=ne,te=Ee,ie=M.retrieveSchema(Y,te),le=r?r[oe]:void 0,Se=ro(oe,z,F),Re=d$(n,Ee,oe,I),we={itemKey:he,index:oe,name:l&&`${l}-${oe}`,registry:x,uiOptions:X,hideError:g,readonly:d,disabled:u,required:p,title:A?`${A}-${oe+1}`:void 0,canAdd:re,canMoveUp:oe>0,canMoveDown:oe<Z.length-1,itemSchema:ie,itemFieldPathId:Se,itemErrorSchema:le,itemData:te,itemUiSchema:Re,autofocus:h&&oe===0,onBlur:y,onFocus:T,rawErrors:w,totalItems:v.length,handleAddItem:E,handleCopyItem:b,handleRemoveItem:C,handleReorderItems:_,onChange:S};return j.jsx(h$,{...we},he)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${H.type}${B}`,disabled:u,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:d,required:p,schema:t,title:A,formData:Z,rawErrors:w,registry:x,optionalDataControl:D},J=yt("ArrayFieldTemplate",x,X);return j.jsx(J,{...V})}function Yse(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:x,onBlur:y,onFocus:T,rawErrors:w,keyedFormData:S,onChange:v,handleAddItem:E,handleCopyItem:b,handleRemoveItem:C,handleReorderItems:_}=e;let{formData:A=[]}=e;const M=t.title||c||l,{schemaUtils:P,fields:I,formContext:z,globalFormOptions:q,globalUiOptions:K}=x,X=ct(n,K),{OptionalDataControlsField:Y}=I,H=Vh(x,t,p,n),Z=vf(r),ae=(Zt(t.items)?t.items:[]).map((oe,he)=>P.retrieveSchema(oe,A[he])),re=Zt(t.additionalItems)?P.retrieveSchema(t.additionalItems,r):null,$=e.childFieldPathId??s;A.length<ae.length&&(A=A.concat(new Array(ae.length-A.length)));const B=Z?S:[],F=H?" rjsf-optional-array-field":"",D=H?j.jsx(Y,{...e,fieldPathId:$}):void 0,V=f$(x,t,A,n)&&!!re&&(!H||Z),J={canAdd:V,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${F}`,disabled:u,fieldPathId:s,formData:r,items:B.map((oe,he)=>{const{key:Ee,item:te}=oe,ie=te,le=he>=ae.length,Se=(le&&Zt(t.additionalItems)?P.retrieveSchema(t.additionalItems,ie):ae[he])||{},Re=ro(he,q,$);let we;le?we=n.additionalItems:Array.isArray(n.items)?we=n.items[he]:we=d$(n,te,he,z);const Ie=i?i[he]:void 0,Pe={index:he,itemKey:Ee,name:l&&`${l}-${he}`,registry:x,uiOptions:X,hideError:g,readonly:d,disabled:u,required:p,title:M?`${M}-${he+1}`:void 0,canAdd:V,canRemove:le,canMoveUp:he>=ae.length+1,canMoveDown:le&&he<A.length-1,itemSchema:Se,itemData:ie,itemUiSchema:we,itemFieldPathId:Re,itemErrorSchema:Ie,autofocus:h&&he===0,onBlur:y,onFocus:T,rawErrors:w,totalItems:S.length,onChange:v,handleAddItem:E,handleCopyItem:b,handleRemoveItem:C,handleReorderItems:_};return j.jsx(h$,{...Pe},Ee)}),onAddClick:E,readonly:d,required:p,registry:x,schema:t,uiSchema:n,title:M,errorSchema:i,rawErrors:w,optionalDataControl:D},ne=yt("ArrayFieldTemplate",x,X);return j.jsx(ne,{...J})}function Xse(e=[]){const t=k.useMemo(()=>Fo(e),[e]),[n,r]=k.useState(()=>({formDataHash:t,keyedFormData:cM(e)}));let{keyedFormData:i,formDataHash:s}=n;if(t!==s){const c=Array.isArray(e)?e:[],u=i||[];i=c.length===u.length?u.map((d,h)=>({key:d.key,item:c[h]})):cM(c),s=t,r({formDataHash:s,keyedFormData:i})}const l=k.useCallback(c=>{const u=u$(c),d=Fo(u);return r({formDataHash:d,keyedFormData:c}),u},[]);return{keyedFormData:i,updateKeyedFormData:l}}function Qse(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:l,onChange:c}=e,{globalFormOptions:u,schemaUtils:d,translateString:h}=s,{keyedFormData:p,updateKeyedFormData:g}=Xse(l),x=e.childFieldPathId??i,y=k.useCallback((_,A)=>{_&&_.preventDefault();let M;if(r){M={};for(const z in r){const q=parseInt(z);A===void 0||q<A?fn(M,[q],r[z]):q>=A&&fn(M,[q+1],r[z])}}const P={key:Vw(),item:Hse(s,t)},I=[...p];A!==void 0?I.splice(A,0,P):I.push(P),c(g(I),x.path,M)},[p,s,t,c,g,r,x]),T=k.useCallback((_,A)=>{_&&_.preventDefault();let M;if(r){M={};for(const z in r){const q=parseInt(z);q<=A?fn(M,[q],r[z]):q>A&&fn(M,[q+1],r[z])}}const P={key:Vw(),item:Wy(p[A].item)},I=[...p];A!==void 0?I.splice(A+1,0,P):I.push(P),c(g(I),x.path,M)},[p,c,g,r,x]),w=k.useCallback((_,A)=>{_&&_.preventDefault();let M;if(r){M={};for(const I in r){const z=parseInt(I);z<A?fn(M,[z],r[I]):z>A&&fn(M,[z-1],r[I])}}const P=p.filter((I,z)=>z!==A);c(g(P),x.path,M)},[p,c,g,r,x]),S=k.useCallback((_,A,M)=>{_&&(_.preventDefault(),_.currentTarget.blur());let P;if(r){P={};for(const q in r){const K=parseInt(q);K==A?fn(P,[M],r[A]):K==M?fn(P,[A],r[M]):fn(P,[q],r[K])}}function I(){const q=p.slice();return q.splice(A,1),q.splice(M,0,p[A]),q}const z=I();c(g(z),x.path,P)},[p,c,g,r,x]),v=k.useCallback((_,A,M,P)=>{c(_===void 0?null:_,A,M,P)},[c]),E=k.useCallback(_=>{c(_,x.path,void 0,x?.[Sn])},[c,x]),b={...e,formData:l,fieldPathId:x,onSelectChange:E},C={...e,handleAddItem:y,handleCopyItem:T,handleRemoveItem:w,handleReorderItems:S,keyedFormData:p,onChange:v};if(!(qu in t)){if(!u.useFallbackUiForUnsupportedType){const A=ct(n),M=yt("UnsupportedFieldTemplate",s,A);return j.jsx(M,{schema:t,fieldPathId:i,reason:h(It.MissingItems),registry:s})}const _={...t,[qu]:{type:void 0}};b.schema=_,C.schema=_}return d.isMultiSelect(b.schema)?j.jsx(Kse,{...b}):XN(n)?j.jsx(Gse,{...b}):aE(b.schema)?j.jsx(Yse,{...C}):d.isFilesArray(b.schema,n)?j.jsx(Zse,{...b}):j.jsx(Wse,{...C})}function Jse(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:l,required:c,disabled:u,readonly:d,hideError:h,autofocus:p,title:g,onChange:x,onFocus:y,onBlur:T,rawErrors:w}=e,{title:S}=t,{widgets:v,translateString:E,globalUiOptions:b}=l,{widget:C="checkbox",title:_,label:A=!0,enumNames:M,...P}=ct(r,b),I=Zo(t,C,v),z=E(It.YesLabel),q=E(It.NoLabel);let K;const X=_??S??g??n;if(Array.isArray(t.oneOf))K=Bu({oneOf:t.oneOf.map(H=>{if(Zt(H))return{...H,title:H.title||(H.const===!0?z:q)}}).filter(H=>H)},r);else{const H=t.enum??[!0,!1];!M&&H.length===2&&H.every(Z=>typeof Z=="boolean")?K=[{value:H[0],label:H[0]?z:q},{value:H[1],label:H[1]?z:q}]:K=Bu({enum:H},r)}const Y=k.useCallback((H,Z,ee)=>x(H,i.path,Z,ee),[x,i]);return j.jsx(I,{options:{...P,enumOptions:K},schema:t,uiSchema:r,id:i.$id,name:n,onChange:Y,onFocus:y,onBlur:T,label:X,hideLabel:!A,value:s,required:c,disabled:u,readonly:d,hideError:h,registry:l,autofocus:p,rawErrors:w,htmlName:i.name})}function eae(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function tae(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function nae(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function rae(e){const{id:t,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:l,required:c,disabled:u=!1,readonly:d=!1,onBlur:h,onFocus:p,registry:g,fieldPathId:x,onChange:y,errorSchema:T}=e,{translateString:w,fields:S,globalFormOptions:v}=g,[E,b]=k.useState(tae(n)),C=ct(l),_=uc(ro("__internal_type_selector",v,x)),A=w(It.Type),M=k.useMemo(()=>eae(A),[A]),P=q=>{q!=null&&(b(q),y(nae(n,q),x.path,T,t))};if(!v.useFallbackUiForUnsupportedType){const{reason:q=w(It.UnknownFieldType,[String(i.type)])}=e,K=yt("UnsupportedFieldTemplate",g,C);return j.jsx(K,{schema:i,fieldPathId:x,reason:q,registry:g})}const I=yt("FallbackFieldTemplate",g,C),{SchemaField:z}=S;return j.jsx(I,{schema:i,registry:g,typeSelector:j.jsx(z,{fieldPathId:_,name:`${s}__fallback_type`,schema:M,formData:E,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:d,required:c},n?Fo(n):"__empty__"),schemaField:j.jsx(z,{...e,schema:{type:E,title:w(It.Value),...E==="object"&&{additionalProperties:!0}}})})}var Vo;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Vo||(Vo={}));var Ud;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Ud||(Ud={}));const iae=/^\$lookup=(.+)/,Z1="layoutGrid";function uM(e,t){return e??t}function oae(e){return/^\d+?$/.test(e)}const Ma=uE();function sae(e,t,n,r,i){const s=Fe(n,[$w],{}),l=Fe(n,e),c={...Fe(l,[Oa],{}),...t,...s},u={...l};dr(c)||fn(u,[Oa],c),dr(s)||fn(u,[$w],s);let{readonly:d}=ct(u);return(i===!0||sP(d)&&r===!0)&&(d=!0,Bt(c,D1)?fn(u,[Oa,D1],!0):fn(u,`ui:${D1}`,!0)),{fieldUiSchema:u,uiReadonly:d}}function aae(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=qS([t]).sort(),i=qS([n]).sort();switch(e){case Ud.ALL:return Aa(r,i);case Ud.SOME:return OA(r,i).length>0;case Ud.NONE:return OA(r,i).length===0;default:return!1}}function m0(e,t,n){let r={},i=e[t];if(Ia(i)){const{children:s,className:l,...c}=i;if(i=s,l){const d=l.split(" ").map(h=>hE(n,h,h)).join(" ");r={...c,className:d}}else r=c}if(!Array.isArray(i))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function fM(e,t,n){let r;if(oae(n)&&e&&e?.type==="array"&&Bt(e,qu)){const i=Number(n),s=e[qu];Array.isArray(s)?i>s.length?r=rP(s):r=s[i]:r=s,t={[Sn]:t[Sn],path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function lae(e,t,n,r,i){const{schemaUtils:s,globalFormOptions:l}=e;let c=n,u=i;const d=t.split("."),h=d.pop();let p=s.retrieveSchema(c,r),g=r,x=p.readOnly;d.forEach(w=>{if(u=ro(w,l,u),Bt(p,sn))c=Fe(p,[sn,w],{});else if(p&&(Bt(p,Nt)||Bt(p,Gt))){const S=Bt(p,Nt)?Nt:Gt,v=s.findSelectedOptionInXxxOf(p,w,S,g);c=Fe(v,[sn,w],{})}else{const S=fM(p,u,w);c=S.rawSchema??{},u=S.fieldPathId}g=Fe(g,w,{}),p=s.retrieveSchema(c,g),x=uM(p.readOnly,x)});let y,T=!1;if(dr(p)&&(p=void 0),p&&h){if(p&&(Bt(p,Nt)||Bt(p,Gt))){const S=Bt(p,Nt)?Nt:Gt;p=s.findSelectedOptionInXxxOf(p,h,S,g)}u=ro(h,l,u),T=p!==void 0&&Array.isArray(p.required)&&TB(p.required,h);const w=fM(p,u,h);if(w.rawSchema?(p=w.rawSchema,u=w.fieldPathId):(p=Fe(p,[sn,h]),p=p&&s.retrieveSchema(p)),x=uM(p?.readOnly,x),p&&(Bt(p,Nt)||Bt(p,Gt))){const S=Bt(p,Nt)?Nt:Gt,v=Go(p);y={options:p[S],hasDiscriminator:!!v}}}return{schema:p,isRequired:T,isReadonly:x,optionsInfo:y,fieldPathId:u}}function cae(e,t){let n=e;return za(n)&&(n=hE(t,n)),Eh(n)?n:null}function uae(e,t){let n,r=null,i={},s;if(za(t)||sP(t))n=t??"";else{const{name:l="",render:c,...u}=t;n=l,i=u,dr(i)||gB(i,(d,h)=>{if(za(d)){const p=iae.exec(d);if(Array.isArray(p)&&p.length>1){const g=p[1];i[h]=hE(e,g,g)}}}),r=cae(c,e),!l&&r&&(s=j.jsx(r,{...u,"data-testid":Ma.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function g0(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:s}=n,{schemaUtils:l}=r,c=l.retrieveSchema(i,s);return t.map(u=>k.createElement(gE,{...n,key:`layoutGrid-${Fo(u)}`,schema:c,layoutGridSchema:u}))}function fae(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:s,gridProps:l}=m0(t,Vo.CONDITION,i),{operator:c,field:u="",value:d}=l,h=Fe(r,u,null);return aae(c,h,d)?j.jsx(g0,{...n,childrenLayoutGridSchemaId:s}):null}function dae(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:l}=m0(t,Vo.COLUMN,r),c=ct(i),u=yt("GridTemplate",r,c);return j.jsx(u,{column:!0,"data-testid":Ma.col,...l,children:j.jsx(g0,{...n,childrenLayoutGridSchemaId:s})})}function hae(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:l}=m0(t,Vo.COLUMNS,r),c=ct(i),u=yt("GridTemplate",r,c);return s.map(d=>j.jsx(u,{column:!0,"data-testid":Ma.col,...l,children:j.jsx(g0,{...n,childrenLayoutGridSchemaId:[d]})},`column-${Fo(d)}`))}function pae(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:l}=m0(t,Vo.ROW,r),c=ct(i),u=yt("GridTemplate",r,c);return j.jsx(u,{...l,"data-testid":Ma.row,children:j.jsx(g0,{...n,childrenLayoutGridSchemaId:s})})}function mae(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:l,onFocus:c,formData:u,readonly:d,registry:h,layoutGridSchema:p,...g}=e,{onChange:x}=g,{fields:y}=h,{SchemaField:T,LayoutMultiSchemaField:w}=y,S=uae(h,t),{name:v,UIComponent:E,uiProps:b}=S,{schema:C,isRequired:_,isReadonly:A,optionsInfo:M,fieldPathId:P}=lae(h,v,n,u,s),I=uc(P);if(S.rendered)return S.rendered;if(C){const z=M?.hasDiscriminator?w:T,{fieldUiSchema:q,uiReadonly:K}=sae(v,b,r,A,d);return j.jsx(z,{"data-testid":M?.hasDiscriminator?Ma.layoutMultiSchemaField:Ma.field,...g,name:v,required:_,readonly:K,schema:C,uiSchema:q,errorSchema:Fe(i,v),fieldPathId:I,formData:Fe(u,v),onChange:x,onBlur:l,onFocus:c,options:M?.options,registry:h})}return E?j.jsx(E,{"data-testid":Ma.uiComponent,...g,name:v,required:_,formData:u,readOnly:!!A||d,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:l,onFocus:c,registry:h,...b}):null}function gE(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=ct(t);if(!n&&Z1 in r&&Zt(r[Z1])&&(n=r[Z1]),Zt(n)){if(Vo.ROW in n)return j.jsx(pae,{...e,layoutGridSchema:n});if(Vo.COLUMN in n)return j.jsx(dae,{...e,layoutGridSchema:n});if(Vo.COLUMNS in n)return j.jsx(hae,{...e,layoutGridSchema:n});if(Vo.CONDITION in n)return j.jsx(fae,{...e,layoutGridSchema:n})}return j.jsx(mae,{...e,gridSchema:n})}gE.TEST_IDS=Ma;function gae(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:l,name:c}=e,u=ct(i,l.globalUiOptions),{title:d}=u,{title:h}=r,p=d||n||h||c;if(!p)return null;const g=yt("TitleFieldTemplate",l,u);return j.jsx(g,{id:p0(t),title:p,required:s,schema:r,uiSchema:i,registry:l})}function W1(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const l=Fe(s,[sn,t]);return Fe(l,d0,Fe(l,no,r))===n})}function dM(e,t,n,r,i){const s=t.map(u=>n.retrieveSchema(u,i));let l=e;Bt(e,Nt)?l={...e,[Nt]:s}:Bt(e,Gt)&&(l={...e,[Gt]:s});const c=Bu(l,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(l)}`);return c}function yae(e){const{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:l,onChange:c,options:u,onFocus:d,registry:h,uiSchema:p,schema:g,autofocus:x,readonly:y,required:T,errorSchema:w,hideError:S=!1}=e,{widgets:v,schemaUtils:E,globalUiOptions:b}=h,[C,_]=k.useState(dM(g,u,E,p,i)),A=Fe(s,Sn),M=Go(g),P=yt("FieldErrorTemplate",h,u),I=yt("FieldTemplate",h,u),z=Fo(g),q=Fo(u),K=p?Fo(p):"",X=i?Fo(i):"";k.useEffect(()=>{_(dM(g,u,E,p,i))},[z,q,E,K,X]);const{widget:Y=M?"radio":"select",title:H="",placeholder:Z="",optionsSchemaSelector:ee=M,hideError:ae,...re}=ct(p);if(!ee)throw new Error("No selector field provided for the LayoutMultiSchemaField");const $=Fe(i,ee);let B=Fe(C[0]?.schema,[sn,ee],{});const F=W1(C,ee,$);B=B?.type?B:{...B,type:F?.type||n};const D=Zo(B,Y,v),V=ae===void 0?S:!!ae,J=Fe(w,[Vr],[]),ne=Jd(w,[Vr]),oe=E.getDisplayLabel(g,p,b),he=ie=>{const le=W1(C,ee,ie),Se=W1(C,ee,$);let Re=E.sanitizeDataForNewSchema(le,Se,i);Re&&le&&(Re=E.getDefaultFormState(le,Re,"excludeObjectChildren")),Re&&fn(Re,ee,ie),c(Re,s.path,void 0,A)},Ee={enumOptions:C,...re},te=!V&&J.length>0?j.jsx(P,{fieldPathId:s,schema:g,errors:J,registry:h}):void 0;return j.jsx(I,{id:A,schema:g,label:(H||g.title)??"",disabled:r||Array.isArray(C)&&dr(C),uiSchema:p,required:T,readonly:!!y,registry:h,displayLabel:oe,errors:te,onChange:c,onKeyRename:Tg,onKeyRenameBlur:Tg,onRemoveProperty:Tg,children:j.jsx(D,{id:A,name:t,schema:g,label:(H||g.title)??"",disabled:r||Array.isArray(C)&&dr(C),uiSchema:p,autofocus:x,readonly:y,required:T,registry:h,multiple:!1,rawErrors:J,hideError:V,hideLabel:!oe,errorSchema:ne,placeholder:Z,onChange:he,onBlur:l,onFocus:d,value:$,options:Ee,htmlName:s.name})})}class hM extends k.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(l=>i.retrieveSchema(l,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(t,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:l}=this.state;let c=this.state;if(!Rn(t.options,i)){const{registry:{schemaUtils:u}}=this.props,d=i.map(h=>u.retrieveSchema(h,r));c={selectedOption:l,retrievedOptions:d}}if(!Rn(r,t.formData)&&s.$id===t.fieldPathId.$id){const{retrievedOptions:u}=c,d=this.getMatchingOption(l,r,u);n&&d!==l&&(c={selectedOption:d,retrievedOptions:u})}c!==this.state&&this.setState(c)}getMatchingOption(t,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,l=Go(i);return s.getClosestMatchingOption(n,r,t,l)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:l,fieldPathId:c}=this.props,{schemaUtils:u}=l,d=t!==void 0?parseInt(t,10):-1;if(d===n)return;const h=d>=0?r[d]:void 0,p=n>=0?r[n]:void 0;let g=u.sanitizeDataForNewSchema(h,p,i);h&&(g=u.getDefaultFormState(h,g,"excludeObjectChildren")),this.setState({selectedOption:d},()=>{s(g,c.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:l,readonly:c,required:u=!1,registry:d,schema:h,uiSchema:p}=this.props,{widgets:g,fields:x,translateString:y,globalUiOptions:T,schemaUtils:w}=d,{SchemaField:S}=x,v=yt("MultiSchemaFieldTemplate",d,T),E=Vh(d,h,u,p),b=vf(i),{selectedOption:C,retrievedOptions:_}=this.state,{widget:A="select",placeholder:M,autofocus:P,autocomplete:I,title:z=h.title,...q}=ct(p,T),K=Zo({type:"number"},A,g),X=Fe(r,Vr,[]),Y=Jd(r,[Vr]),H=w.getDisplayLabel(h,p,T),Z=C>=0&&_[C]||null;let ee;if(Z){const{required:J}=h;ee=J?Ms({required:J},Z):Z}let ae=[];Nt in h&&p&&Nt in p?Array.isArray(p[Nt])?ae=p[Nt]:console.warn(`uiSchema.oneOf is not an array for "${z||t}"`):Gt in h&&p&&Gt in p&&(Array.isArray(p[Gt])?ae=p[Gt]:console.warn(`uiSchema.anyOf is not an array for "${z||t}"`));let re=p;C>=0&&ae.length>C&&(re=ae[C]);const $=z?It.TitleOptionPrefix:It.OptionPrefix,B=z?[z]:[],F=_.map((J,ne)=>{const{title:oe=J.title}=ct(ae[ne]);return{label:oe||y($,B.concat(String(ne+1))),value:ne}}),D=!E||b?j.jsx(K,{id:this.getFieldId(),name:`${t}${h.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:l,disabled:n||dr(F),multiple:!1,rawErrors:X,errorSchema:Y,value:C>=0?C:void 0,options:{enumOptions:F,...q},registry:d,placeholder:M,autocomplete:I,autofocus:P,label:z??t,hideLabel:!H,readonly:c}):void 0,V=ee&&ee.type!=="null"&&j.jsx(S,{...this.props,schema:ee,uiSchema:re})||null;return j.jsx(v,{schema:h,registry:d,uiSchema:p,selector:D,optionSchemaField:V})}}const vae=/\.([0-9]*0)*$/,bae=/[0.]0*$/;function Sae(e){const{registry:t,onChange:n,formData:r,value:i}=e,[s,l]=k.useState(i),{StringField:c}=t.fields;let u=r;const d=k.useCallback((h,p,g,x)=>{l(h),`${h}`.charAt(0)==="."&&(h=`0${h}`);const y=typeof h=="string"&&h.match(vae)?Fk(h.replace(bae,"")):Fk(h);n(y,p,g,x)},[n]);if(typeof s=="string"&&typeof u=="number"){const h=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);s.match(h)&&(u=s)}return j.jsx(c,{...e,formData:u,onChange:d})}function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},No.apply(null,arguments)}const og=["strong","em","del","mark"],pM=[["**",og[0]],["__",og[0]],["~~",og[2]],["==",og[3]],["*","em"],["_","em"]];function wae(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var i=e[r]==="("?")":"]",s=1;for(r++;r<e.length&&s>0;)e[r]!=="\\"?(e[r]==="("&&i===")"&&s++,e[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function xae(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",l=0;l<6;l++){var c=pM[l][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,i=c.length,s=pM[l][1];break}}if(!r)return null;for(var u=i,d=!1,h=!1,p="",g=0,x="",y=!1,T="";u<e.length;){var w=e[u];if(y)x+=w,y=!1,T=w,u++;else if(w!=="\\")if(w!=="`"||g!==0){if(w==="["&&!d&&g===0){var S=wae(e,u);if(S!==-1){x+=e.slice(u,S),u=S,T=e[S-1];continue}}if(h)x+=w,p?w===p&&(p=""):w==='"'||w==="'"?p=w:w===">"&&(h=!1),T=w,u++;else if(w!=="<"||d){if(w===`
41
+ `&&T===`
42
+ `&&!d&&g===0)return null;if(!d&&g===0){for(var v=0;u+v<e.length&&e[u+v]===r[0];)v++;if(v>=i&&(i!==1||r!=="*"&&r!=="_"||e[u-1]!==r&&e[u+1]!==r)){var E=[e.slice(0,u+v),s,x+e.slice(u+i,u+v)];return E.index=0,E.input=e,E}}x+=w,T=w,u++}else{var b=e[u+1],C=e.indexOf(">",u);if(C!==-1){var _=e.slice(u,C+1).endsWith("/>");b==="/"?g=Math.max(0,g-1):_||g++}h=!0,x+=w,T=w,u++}}else d=!d,x+=w,T=w,u++;else x+=w,y=!0,T=w,u++}return null}const _ae=["children","options"],mM=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),gM={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Eae=["style","script","pre"],Cae=["src","href","data","formAction","srcDoc","action"],Tae=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Rae=/\n{2,}$/,yM=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Aae=/^ *> ?/gm,Oae=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,kae=/^ {2,}\n/,Mae=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,vM=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,bM=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,jae=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Pae=/^(?:\n *)*\n/,Dae=/\r\n?/g,Nae=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,$ae=/^\[\^([^\]]+)]/,Iae=/\f/g,zae=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Fae=/^\[(x|\s)\]/,SM=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,wM=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,xM=/^([^\n]+)\n *(=|-)\2{2,} *\n/,yE=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Lae(e){const t=yE.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),i=r.length+1;let s=t[0].length;e[s]===`
43
+ `&&s++;const l=s;let c=s,u=1;const d=e.length;for(;u>0;){const p=e.indexOf("<",s);if(p===-1)return null;let g=-1,x=-1;if(e[p+1]==="/")x=p;else if(e[p+1]===r[0]||e[p+1]===n[0]){let y=!0;for(let T=0;T<r.length;T++){const w=e[p+1+T];if(w!==r[T]&&w!==n[T]){y=!1;break}}!y||e[p+i]!==" "&&e[p+i]!==">"||(g=p)}if(g!==-1||x!==-1)if(g!==-1&&(x===-1||g<x))s=g+i+1,u++;else{let y=x+2;for(;y<d;){const w=e[y];if(w!==" "&&w!==" "&&w!==`
44
+ `&&w!=="\r")break;y++}if(y+r.length>d)return null;let T=!0;for(let w=0;w<r.length;w++){const S=e[y+w];if(S!==r[w]&&S!==n[w]){T=!1;break}}if(!T){s=y;continue}for(y+=r.length;y<d;){const w=e[y];if(w!==" "&&w!==" "&&w!==`
45
+ `&&w!=="\r")break;y++}if(y>=d||e[y]!==">"){s=y;continue}c=x,s=y+1,u--}else s=p+1}let h=0;for(;s+h<d&&e[s+h]===`
46
+ `;)h++;return[e.slice(0,s+h),n,t[2],e.slice(l,c)]}const Vae=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,_M=/^<!--[\s\S]*?(?:-->)/,Uae=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Uw=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,qae=/^\{.*\}$/,Bae=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Hae=/^<([^ >]+[:@\/][^ >]+)>/,Kae=/-([a-z])?/gi,EM=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Gae=/^[^\n]+(?: \n|\n{2,})/,Zae=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Wae=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Yae=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Xae=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Qae=/\t/g,Jae=/(^ *\||\| *$)/g,ele=/^ *:-+: *$/,tle=/^ *:-+ *$/,nle=/^ *-+: *$/,rle=/^(:[a-zA-Z0-9-_]+:)/,ile=/^\\([^0-9A-Za-z\s])/,ole=/\\([^0-9A-Za-z\s])/g,sle=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,ale=/^\n+/,lle=/^([ \t]*)/,cle=/(?:^|\n)( *)$/,vE="(?:\\d+\\.)",bE="(?:[*+-])";function p$(e){return"( *)("+(e===1?vE:bE)+") +"}const m$=p$(1),g$=p$(2);function y$(e){return RegExp("^"+(e===1?m$:g$))}const ule=y$(1),fle=y$(2);function v$(e){return RegExp("^"+(e===1?m$:g$)+"[^\\n]*(?:\\n(?!\\1"+(e===1?vE:bE)+" )[^\\n]*)*(\\n|$)","gm")}const dle=v$(1),hle=v$(2);function b$(e){const t=e===1?vE:bE;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const S$=b$(1),w$=b$(2);function CM(e,t){const n=t===1,r=n?S$:w$,i=n?dle:hle,s=n?ule:fle;return{t:l=>s.test(l),o:Ca(function(l,c){const u=cle.exec(c.prevCapture);return u&&(c.list||!c.inline&&!c.simple)?r.exec(l=u[1]+l):null}),u:1,i(l,c,u){const d=n?+l[2]:void 0,h=l[0].replace(Rae,`
47
+ `).match(i),p=s.exec(h[0]),g=RegExp("^ {1,"+(p?p[0].length:0)+"}","gm");let x=!1;return{items:h.map(function(y,T){const w=y.replace(g,"").replace(s,""),S=T===h.length-1,v=jo(w,`
48
+
49
+ `)||S&&x;x=v;const E=u.inline,b=u.list;let C;u.list=!0,v?(u.inline=!1,C=qd(w)+`
50
+
51
+ `):(u.inline=!0,C=qd(w));const _=c(C,u);return u.inline=E,u.list=b,_}),ordered:n,start:d}}}}const ple=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),mle=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function TM(e){return typeof e=="string"}function qd(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function qw(e,t){return e.startsWith(t)}function jo(e,t){return e.indexOf(t)!==-1}function gle(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(qw(e,n[r]))return!0;return!1}return n(e,t)}function _d(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function yle(e){return nle.test(e)?"right":ele.test(e)?"center":tle.test(e)?"left":null}function RM(e,t,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],l="";function c(){if(!l)return;const u=s[s.length-1];u.push.apply(u,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((u,d,h)=>{u.trim()==="|"&&(c(),r)?d!==0&&d!==h.length-1&&s.push([]):l+=u}),c(),n.inTable=i,s}function vle(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Jae,"").split("|").map(yle):[],i=e[3]?(function(l,c,u){return l.trim().split(`
52
+ `).map(function(d){return RM(d,c,u,!0)})})(e[3],t,n):[],s=RM(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function AM(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Ca(e){return e.inline=1,e}function ya(e){return Ca(function(t,n){return n.inline?e.exec(t):null})}function sg(e){return Ca(function(t,n){return n.inline||n.simple?e.exec(t):null})}function _s(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function OM(e){return Ca(function(t){return e.exec(t)})}const ble=/(javascript|vbscript|data(?!:image)):/i;function Sle(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(ble.test(t))return null}catch{return null}return e}function Po(e){return e&&e.replace(ole,"$1")}function Ig(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=i,s}function wle(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=i,s}function xle(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const _le=(e,t,n)=>({children:Ig(t,e[2],n)});function Y1(){return{}}function Ele(...e){return e.filter(Boolean).join(" ")}function X1(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function Q1(e,t,n,r){if(!t||!t.trim())return null;const i=t.match(Tae);return i?i.reduce(function(s,l){const c=l.indexOf("=");if(c!==-1){const u=(function(p){return p.indexOf("-")!==-1&&p.match(Uae)===null&&(p=p.replace(Kae,function(g,x){return x.toUpperCase()})),p})(l.slice(0,c)).trim(),d=mM[u]||u;if(d==="ref")return s;const h=s[d]=(function(p,g,x,y){return g==="style"?(function(T){const w=[];if(!T)return w;let S="",v=0,E="";for(let C=0;C<T.length;C++){const _=T[C];if(_==='"'||_==="'")E?_===E&&(E="",v--):(E=_,v++);else if(_==="("&&S.endsWith("url"))v++;else if(_===")"&&v>0)v--;else if(_===";"&&v===0){const A=S.indexOf(":");A>0&&w.push([S.slice(0,A).trim(),S.slice(A+1).trim()]),S="";continue}S+=_}const b=S.indexOf(":");return b>0&&w.push([S.slice(0,b).trim(),S.slice(b+1).trim()]),w})(x).reduce(function(T,[w,S]){return T[w.replace(/(-[a-z])/g,v=>v[1].toUpperCase())]=y(S,p,w),T},{}):Cae.indexOf(g)!==-1?y(Po(x),p,g):(x.match(qae)&&(x=Po(x.slice(1,x.length-1))),x==="true"||x!=="false"&&x)})(e,u,(function(p){const g=p[0];return(g==='"'||g==="'")&&p.length>=2&&p[p.length-1]===g?p.slice(1,-1):p})(l.slice(c+1).trim()),n);typeof h=="string"&&(yE.test(h)||Uw.test(h))&&(s[d]=r(h.trim()))}else l!=="style"&&(s[mM[l]||l]=!0);return s},{}):null}function kM(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function Cle(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?No({},gM,t.namedCodesToUnicode):gM;const n=t.slugify||_d,r=t.sanitizer||Sle,i=t.createElement||k.createElement,s=[yM,vM,bM,t.enforceAtxHeadings?wM:SM,xM,EM,S$,w$],l=[...s,Gae,yE,_M,Uw];function c(y,T,...w){const S=X1(t.overrides,y+".props",{});return i((function(v,E){const b=X1(E,v);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:X1(E,v+".component",v):v})(y,t.overrides),No({},T,S,{className:Ele(T?.className,S.className)||void 0}),...w)}function u(y){y=y.replace(zae,"");let T=!1;t.forceInline?T=!0:t.forceBlock||(T=Xae.test(y)===!1);const w=g(T?y:qd(y).replace(ale,"")+`
53
+
54
+ `,{inline:T});if(t.ast)return w;const S=x(w);for(;TM(S[S.length-1])&&!S[S.length-1].trim();)S.pop();if(d.length&&S.push(c("footer",{key:"footer"},d.map(function(b){return c("div",{id:n(b.identifier,_d),key:b.identifier},b.identifier,x(g(b.footnote,{inline:!0})))}))),t.wrapper===null)return S;const v=t.wrapper||(T?"span":"div");let E;if(S.length>1||t.forceWrapper)E=S;else{if(S.length===1)return E=S[0],typeof E=="string"?c("span",{key:"outer"},E):E;E=null}return i(v,No({key:"outer"},t.wrapperProps),E)}const d=[],h={},p={0:{t:[">"],o:_s(yM),u:1,i(y,T,w){const[,S,v]=y[0].replace(Aae,"").match(Oae);return{alert:S,children:T(v,w)}}},1:{t:[" "],o:ya(kae),u:1,i:Y1},2:{t:function(y,T){if(T.inline||T.simple)return!1;var w=y[0];return w==="-"||w==="*"||w==="_"},o:_s(Mae),u:1,i:Y1},3:{t:[" "],o:_s(bM),u:0,i:y=>({lang:void 0,text:Po(qd(y[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:_s(vM),u:0,i:y=>({attrs:Q1("code",y[3]||"",r,u),lang:y[2]||void 0,text:y[4],type:"3"})},5:{t:["`"],o:sg(jae),u:3,i:y=>({text:Po(y[2])})},6:{t:["[^"],o:_s(Nae),u:0,i:y=>(d.push({footnote:y[2],identifier:y[1]}),{})},7:{t:["[^"],o:ya($ae),u:1,i:y=>({target:"#"+n(y[1],_d),text:y[1]})},8:{t:["[ ]","[x]"],o:ya(Fae),u:1,i:y=>({completed:y[1].toLowerCase()==="x"})},9:{t:["#"],o:_s(t.enforceAtxHeadings?wM:SM),u:1,i:(y,T,w)=>({children:Ig(T,y[2],w),id:n(y[2],_d),level:y[1].length})},10:{t:y=>{const T=y.indexOf(`
55
+ `);return T>0&&T<y.length-1&&(y[T+1]==="="||y[T+1]==="-")},o:_s(xM),u:1,i:(y,T,w)=>({children:Ig(T,y[1],w),level:y[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Ca(Lae),u:1,i(y,T,w){const[,S]=y[3].match(lle),v=RegExp("^"+S,"gm"),E=y[3].replace(v,""),b=kM(l,E)?xle:Ig,C=y[1].toLowerCase(),_=Eae.indexOf(C)!==-1,A=(_?C:y[1]).trim(),M={attrs:Q1(A,y[2],r,u),noInnerParse:_,tag:A};if(w.inAnchor=w.inAnchor||C==="a",_)M.text=y[3];else{const P=w.inHTML;w.inHTML=!0,M.children=b(T,E,w),w.inHTML=P}return w.inAnchor=!1,M}},13:{t:["<"],o:OM(Uw),u:1,i(y){const T=y[1].trim();return{attrs:Q1(T,y[2]||"",r,u),tag:T}}},12:{t:["<!--"],o:OM(_M),u:1,i:()=>({})},14:{t:["!["],o:sg(mle),u:1,i:y=>({alt:Po(y[1]),target:Po(y[2]),title:Po(y[3])})},15:{t:["["],o:ya(ple),u:3,i:(y,T,w)=>({children:wle(T,y[1],w),target:Po(y[2]),title:Po(y[3])})},16:{t:function(y,T){return!(!T.inline||T.inAnchor)&&y[0]==="<"&&(jo(y,":")||jo(y,"@")||jo(y,"/"))},o:ya(Hae),u:0,i(y){let T=y[1],w=!1;return jo(T,"@")&&!jo(T,"//")&&(w=!0,T=T.replace("mailto:","")),{children:[{text:T,type:"27"}],target:w?"mailto:"+T:T,type:"15"}}},17:{t:(y,T)=>!T.inAnchor&&!t.disableAutoLink&&qw(y,"http"),o:ya(Bae),u:0,i:y=>({children:[{text:y[1],type:"27"}],target:y[1],title:void 0,type:"15"})},20:CM(0,1),30:CM(0,2),19:{t:[`
56
+ `],o:_s(Pae),u:3,i:Y1},21:{t:function(y,T){return!T.inline&&!T.simple},o:Ca(function(y,T){if(T.inline||T.simple||T.inHTML&&!jo(y,`
57
+
58
+ `)&&!jo(T.prevCapture,`
59
+
60
+ `))return null;let w="",S=0;for(;;){const E=y.indexOf(`
61
+ `,S),b=y.slice(S,E===-1?void 0:E+1),C=y[S];if((C===">"||C==="#"||C==="|"||C==="`"||C==="~"||C==="*"||C==="-"||C==="_"||C===" ")&&kM(s,b)||(w+=b,E===-1||!b.trim()))break;S=E+1}const v=qd(w);return v===""?null:[w,,v]}),u:3,i:_le},22:{t:["["],o:ya(Zae),u:0,i:y=>(h[y[1]]={target:y[2],title:y[4]},{})},23:{t:["!["],o:sg(Wae),u:0,i:y=>({alt:y[1]?Po(y[1]):void 0,ref:y[2]})},24:{t:y=>y[0]==="["&&!jo(y,"]("),o:ya(Yae),u:0,i:(y,T,w)=>({children:T(y[1],w),fallbackChildren:y[0],ref:y[2]})},25:{t:["|"],o:_s(EM),u:1,i:vle},27:{o:Ca(function(y,T){let w;return qw(y,":")&&(w=rle.exec(y)),w||sle.exec(y)}),u:4,i(y){const T=y[0];return{text:jo(T,"&")?T.replace(Vae,(w,S)=>t.namedCodesToUnicode[S]||w):T}}},34:{t:["*","_","~","="],o:Ca(xae),u:2,i:(y,T,w)=>({children:T(y[2],w),tag:y[1]})},28:{t:["\\"],o:sg(ile),u:1,i:y=>({text:y[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete p[11],delete p[13]);const g=(function(y){var T=Object.keys(y);function w(S,v){var E=[];if(v.prevCapture=v.prevCapture||"",S.trim())for(;S;)for(var b=0;b<T.length;){var C=T[b],_=y[C];if(!_.t||gle(S,v,_.t)){var A=_.o(S,v);if(A&&A[0]){S=S.substring(A[0].length);var M=_.i(A,w,v);v.prevCapture+=A[0],M.type||(M.type=C),E.push(M);break}b++}else b++}return v.prevCapture="",E}return T.sort(function(S,v){return y[S].u-y[v].u||(S<v?-1:1)}),function(S,v){return w((function(E){return E.replace(Dae,`
62
+ `).replace(Iae,"").replace(Qae," ")})(S),v)}})(p),x=(function(y,T,w,S,v){function E(b){return Array.isArray(b)?b.map(C=>"text"in C?C.text:""):"text"in b?b.text:""}return function b(C,_={}){const A=(_.renderDepth||0)+1;if(A>2500)return E(C);_.renderDepth=A;try{if(Array.isArray(C)){const P=_.key,I=[];let z=!1;for(let q=0;q<C.length;q++){_.key=q;const K=b(C[q],_),X=TM(K);X&&z?I[I.length-1]+=K:K!==null&&I.push(K),z=X}return _.key=P,_.renderDepth=A-1,I}const M=(function(P,I,z){const q=()=>(function(K,X,Y,H,Z,ee,ae){switch(K.type){case"0":{const re={key:Y.key};return K.alert&&(re.className="markdown-alert-"+ee(K.alert.toLowerCase(),_d),K.children.unshift({attrs:{},children:[{type:"27",text:K.alert}],noInnerParse:!0,type:"11",tag:"header"})),H("blockquote",re,X(K.children,Y))}case"1":return H("br",{key:Y.key});case"2":return H("hr",{key:Y.key});case"3":return H("pre",{key:Y.key},H("code",No({},K.attrs,{className:K.lang?"lang-"+K.lang:""}),K.text));case"5":return H("code",{key:Y.key},K.text);case"7":return H("a",{key:Y.key,href:Z(K.target,"a","href")},H("sup",{key:Y.key},K.text));case"8":return H("input",{checked:K.completed,key:Y.key,readOnly:!0,type:"checkbox"});case"9":return H("h"+K.level,{id:K.id,key:Y.key},X(K.children,Y));case"11":return H(K.tag,No({key:Y.key},K.attrs),K.text||(K.children?X(K.children,Y):""));case"13":return H(K.tag,No({},K.attrs,{key:Y.key}));case"14":return H("img",{key:Y.key,alt:K.alt||void 0,title:K.title||void 0,src:Z(K.target,"img","src")});case"15":return H("a",{key:Y.key,href:Z(K.target,"a","href"),title:K.title},X(K.children,Y));case"23":return ae[K.ref]?H("img",{key:Y.key,alt:K.alt,src:Z(ae[K.ref].target,"img","src"),title:ae[K.ref].title}):null;case"24":return ae[K.ref]?H("a",{key:Y.key,href:Z(ae[K.ref].target,"a","href"),title:ae[K.ref].title},X(K.children,Y)):H("span",{key:Y.key},K.fallbackChildren);case"25":{const re=K;return H("table",{key:Y.key},H("thead",null,H("tr",null,re.header.map(function($,B){return H("th",{key:B,style:AM(re,B)},X($,Y))}))),H("tbody",null,re.cells.map(function($,B){return H("tr",{key:B},$.map(function(F,D){return H("td",{key:D,style:AM(re,D)},X(F,Y))}))})))}case"27":return K.text;case"34":return H(K.tag,{key:Y.key},X(K.children,Y));case"20":case"30":return H(K.ordered?"ol":"ul",{key:Y.key,start:K.type==="20"?K.start:void 0},K.items.map(function(re,$){return H("li",{key:$},X(re,Y))}));case"19":return`
63
+ `;case"21":return H("p",{key:Y.key},X(K.children,Y));default:return null}})(P,I,z,T,w,S,v);return y?y(q,P,I,z):q()})(C,b,_);return _.renderDepth=A-1,M}catch(M){if(M instanceof RangeError&&M.message.includes("Maximum call stack"))return E(C);throw M}}})(t.renderRule,c,r,n,h);return u(e)}const Uh=e=>{let{children:t,options:n}=e,r=(function(i,s){if(i==null)return{};var l={};for(var c in i)if({}.hasOwnProperty.call(i,c)){if(s.indexOf(c)!==-1)continue;l[c]=i[c]}return l})(e,_ae);return Cle(t??"",No({},n,{wrapperProps:No({},n?.wrapperProps,r)}))},x$=Symbol("remove-this-key"),MM=Symbol("reset");function Tle(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function Rle(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return e(It.NewStringDefault)}}function Ale(e){const{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:l,onChange:c,onBlur:u,onFocus:d,disabled:h,readonly:p,required:g,hideError:x,propertyName:y,handleKeyRename:T,handleRemoveProperty:w,addedByAdditionalProperties:S}=e,[v,E]=k.useState(!1),{globalFormOptions:b,fields:C}=r,{SchemaField:_}=C,A=uc(ro(y,b,t.path)),M=k.useCallback((q,K,X,Y)=>{q===void 0&&S&&(q=""),c(q,K,X,Y)},[c,S]),P=k.useCallback(q=>{y!==q&&E(!0),T(y,q)},[y,T]),I=k.useCallback(q=>{const{target:{value:K}}=q;P(K)},[P]),z=k.useCallback(()=>{w(y)},[y,w]);return j.jsx(_,{name:y,required:g,schema:n,uiSchema:i,errorSchema:s,fieldPathId:A,formData:l,wasPropertyKeyModified:v,onKeyRename:P,onKeyRenameBlur:I,onRemoveProperty:z,onChange:M,onBlur:u,onFocus:d,registry:r,disabled:h,readonly:p,hideError:x})}function Ole(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:l,required:c=!1,disabled:u,readonly:d,hideError:h,onBlur:p,onFocus:g,onChange:x,registry:y,title:T}=e,{fields:w,schemaUtils:S,translateString:v,globalUiOptions:E}=y,{OptionalDataControlsField:b}=w,C=S.retrieveSchema(t,r,!0),_=ct(n,E),{properties:A={}}=C,M=e.childFieldPathId??s,P=_.title??C.title??T??l,I=_.description??C.description,z=Vh(y,C,c,n),q=vf(r);let K=[];const X=k.useCallback(($,B)=>{const{duplicateKeySuffixSeparator:F="-"}=ct(n,E);let D=0,V=$;for(;Bt(B,V);)V=`${$}${F}${++D}`;return V},[n,E]),Y=k.useCallback(()=>{if(!(C.additionalProperties||C.patternProperties))return;const{translateString:$}=y,B={...r},F=X("newKey",B);if(C.patternProperties)fn(B,F,null);else{let D,V,J;if(Zt(C.additionalProperties)){D=C.additionalProperties.type,V=C.additionalProperties.const,J=C.additionalProperties.default;let oe=C.additionalProperties;if(Dn in oe){const{schemaUtils:he}=y;oe=he.retrieveSchema({[Dn]:oe[Dn]},r),D=oe.type,V=oe.const,J=oe.default}!D&&(Gt in oe||Nt in oe)&&(D="object")}const ne=V??J??Rle($,D);fn(B,F,ne)}x(B,M.path)},[r,x,y,M,X,C]),H=k.useCallback(($,B)=>{if($!==B){const F=X(B,r),D={...r},V={[$]:F},J=Object.keys(D).map(oe=>({[V[oe]||oe]:D[oe]})),ne=Object.assign({},...J);x(ne,M.path)}},[r,x,M,X]),Z=k.useCallback($=>{x(x$,[...M.path,$])},[x,M]);if(!z||q)try{const $=Object.keys(A);K=jse($,_.order)}catch($){return j.jsxs("div",{children:[j.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:j.jsx(Uh,{options:{disableParsingRawHTML:!0},children:v(It.InvalidObjectField,[l||"root",$.message])})}),j.jsx("pre",{children:JSON.stringify(C)})]})}const ee=yt("ObjectFieldTemplate",y,_),ae=z?j.jsx(b,{...e,fieldPathId:M,schema:C}):void 0,re={title:_.label===!1?"":P,description:_.label===!1?void 0:I,properties:K.map($=>{const B=Bt(C,[sn,$,Rs]),F=B?n.additionalProperties:n[$],D=ct(F).widget==="hidden";return{content:j.jsx(Ale,{propertyName:$,required:Tle(C,$),schema:Fe(C,[sn,$],{}),uiSchema:F,errorSchema:Fe(i,[$]),fieldPathId:M,formData:Fe(r,[$]),handleKeyRename:H,handleRemoveProperty:Z,addedByAdditionalProperties:B,onChange:x,onBlur:p,onFocus:g,registry:y,disabled:u,readonly:d,hideError:h},$),name:$,readonly:d,disabled:u,required:c,hidden:D}}),readonly:d,disabled:u,required:c,fieldPathId:s,uiSchema:n,errorSchema:i,schema:C,formData:r,registry:y,optionalDataControl:ae,className:z?"rjsf-optional-object-field":void 0};return j.jsx(ee,{...re,onAddProperty:Y})}function kle(e){const{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:l,errorSchema:c,fieldPathId:u,registry:d}=e,{globalUiOptions:h={},schemaUtils:p,translateString:g}=d,x=ct(n,h),y=yt("OptionalDataControlsTemplate",d,x),T=vf(r);let w,S,v,E;if(i||s)w=K1(u,"Msg"),S=T?void 0:g(It.OptionalObjectEmptyMsg);else{const b=T?It.OptionalObjectRemove:It.OptionalObjectAdd;S=g(b),T?(w=K1(u,"Remove"),E=()=>l(void 0,u.path,c)):(w=K1(u,"Add"),v=()=>{let C=p.getDefaultFormState(t,r,"excludeObjectChildren");C===void 0&&(C=wo(t)==="array"?[]:{}),l(C,u.path,c)})}return S&&j.jsx(y,{id:w,registry:d,schema:t,uiSchema:n,label:S,onAddClick:v,onRemoveClick:E})}const Mle={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function jle(e,t,n){const r=t.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=wo(e),l=Array.isArray(s)?s[0]:s||"",c=e.$id;let u=Mle[l];return c&&c in i&&(u=c),!u&&(e.anyOf||e.oneOf)?()=>null:u in i?i[u]:i.FallbackField}function Ple(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:l,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p=!1,registry:g,wasPropertyKeyModified:x=!1}=e,{schemaUtils:y,globalFormOptions:T,globalUiOptions:w,fields:S}=g,{AnyOfField:v,OneOfField:E}=S,b=ct(r,w),C=yt("FieldTemplate",g,b),_=yt("DescriptionFieldTemplate",g,b),A=yt("FieldHelpTemplate",g,b),M=yt("FieldErrorTemplate",g,b),P=y.retrieveSchema(t,i),I=n[Sn],z=k.useCallback((we,Ie,Pe,ye)=>c(we,Ie,Pe,ye||I),[I,c]),q=jle(P,b,g),K=!!(b.disabled??e.disabled),X=!!(b.readonly??(e.readonly||e.schema.readOnly||P.readOnly)),Y=b.hideError,H=Y===void 0?e.hideError:!!Y,Z=!!(b.autofocus??e.autofocus);if(Object.keys(P).length===0)return null;let ee=y.getDisplayLabel(P,r,w);const ae=b.field&&b.fieldReplacesAnyOrOneOf===!0;let re,$,B={fieldPathId:n};if((Gt in P||Nt in P)&&!ae&&!y.isSelect(P)){P[Gt]?(re=v,$=P[Gt].map(Pe=>y.retrieveSchema(Zt(Pe)?Pe:{},i))):P[Nt]&&(re=E,$=P[Nt].map(Pe=>y.retrieveSchema(Zt(Pe)?Pe:{},i)));const we=Vh(g,P,p,r),Ie=vf(i);ee=ee&&(!we||Ie),B={childFieldPathId:n,fieldPathId:ro("XxxOf",T,n)}}const{__errors:F,...D}=s||{},V=Jd(r,["ui:classNames","classNames","ui:style"]);Oa in V&&(V[Oa]=Jd(V[Oa],["classNames","style"]));const J=j.jsx(q,{...e,onChange:z,...B,schema:P,uiSchema:V,disabled:K,readonly:X,hideError:H,autofocus:Z,errorSchema:D,rawErrors:F}),ne=n[Sn];let oe;x?oe=l:oe=Rs in P?l:b.title||e.schema.title||P.title||e.title||l;const he=b.description||e.schema.description||P.description||"",Ee=b.help,te=b.widget==="hidden",ie=["rjsf-field",`rjsf-field-${wo(P)}`];!H&&F&&F.length>0&&ie.push("rjsf-field-error"),b.classNames&&ie.push(b.classNames);const le=j.jsx(A,{help:Ee,fieldPathId:n,schema:P,uiSchema:r,hasErrors:!H&&F&&F.length>0,registry:g}),Se=H||re&&!y.isSelect(P)?void 0:j.jsx(M,{errors:F,errorSchema:s,fieldPathId:n,schema:P,uiSchema:r,registry:g}),Re={description:j.jsx(_,{id:cc(ne),description:he,schema:P,uiSchema:r,registry:g}),rawDescription:he,help:le,rawHelp:typeof Ee=="string"?Ee:void 0,errors:Se,rawErrors:H?void 0:F,id:ne,label:oe,hidden:te,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p,disabled:K,readonly:X,hideError:H,displayLabel:ee,classNames:ie.join(" ").trim(),style:b.style,formData:i,schema:P,uiSchema:r,registry:g};return j.jsx(C,{...Re,children:j.jsxs(j.Fragment,{children:[J,re&&j.jsx(re,{name:l,disabled:K,readonly:X,hideError:H,errorSchema:s,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:$,registry:g,required:p,schema:P,uiSchema:r})]})})}class Dle extends k.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return l$(this,t,this.state,r)}render(){return j.jsx(Ple,{...this.props})}}function Nle(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,required:l,disabled:c=!1,readonly:u=!1,autofocus:d=!1,onChange:h,onBlur:p,onFocus:g,registry:x,rawErrors:y,hideError:T,title:w}=e,{title:S,format:v}=t,{widgets:E,schemaUtils:b,globalUiOptions:C}=x,_=b.isSelect(t)?Bu(t,r):void 0;let A=_?"select":"text";v&&Ose(t,v,E)&&(A=v);const{widget:M=A,placeholder:P="",title:I,...z}=ct(r),q=b.getDisplayLabel(t,r,C),K=I??w??S??n,X=Zo(t,M,E),Y=k.useCallback((H,Z,ee)=>h(H,i.path,Z,ee),[h,i]);return j.jsx(X,{options:{...z,enumOptions:_},schema:t,uiSchema:r,id:i.$id,name:n,label:K,hideLabel:!q,hideError:T,value:s,onChange:Y,onBlur:p,onFocus:g,required:l,disabled:c,readonly:u,autofocus:d,registry:x,placeholder:P,rawErrors:y,htmlName:i.name})}function $le(e){const{formData:t,onChange:n,fieldPathId:r}=e;return k.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function Ile(){return{AnyOfField:hM,ArrayField:Qse,BooleanField:Jse,FallbackField:rae,LayoutGridField:gE,LayoutHeaderField:gae,LayoutMultiSchemaField:yae,NumberField:Sae,ObjectField:Ole,OneOfField:hM,OptionalDataControlsField:kle,SchemaField:Dle,StringField:Nle,NullField:$le}}function zle(e){const{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:s}=e,l=ct(s,r.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const u=yt("DescriptionFieldTemplate",r,l);return j.jsx(u,{id:cc(t),description:n,schema:i,uiSchema:s,registry:r})}function Fle(e){const{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:l,registry:c,uiSchema:u}=e,d=ct(u),h=yt("ArrayFieldItemButtonsTemplate",c,d),p={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},g=s?31:9,x={display:"flex",alignItems:i?"center":"baseline"},y={display:"flex",justifyContent:"flex-end",marginTop:i?`${g}px`:0};return j.jsxs("div",{className:n,style:x,children:[j.jsx("div",{className:l?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),l&&j.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:j.jsx("div",{className:"btn-group",style:y,children:j.jsx(h,{...r,style:p})})})]})}function Lle(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:l,onCopyItem:c,onRemoveItem:u,onMoveDownItem:d,onMoveUpItem:h,readonly:p,registry:g,uiSchema:x}=e,{CopyButton:y,MoveDownButton:T,MoveUpButton:w,RemoveButton:S}=g.templates.ButtonTemplates;return j.jsxs(j.Fragment,{children:[(i||r)&&j.jsx(w,{id:Lo(l,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!i,onClick:h,uiSchema:x,registry:g}),(i||r)&&j.jsx(T,{id:Lo(l,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!r,onClick:d,uiSchema:x,registry:g}),n&&j.jsx(y,{id:Lo(l,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:c,uiSchema:x,registry:g}),s&&j.jsx(S,{id:Lo(l,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:u,uiSchema:x,registry:g})]})}function Vle(e){const{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:l,optionalDataControl:c,onAddClick:u,readonly:d,registry:h,required:p,schema:g,title:x}=e,y=ct(s),T=yt("ArrayFieldDescriptionTemplate",h,y),w=yt("ArrayFieldTitleTemplate",h,y),S=!d&&!r,{ButtonTemplates:{AddButton:v}}=h.templates;return j.jsxs("fieldset",{className:n,id:i.$id,children:[j.jsx(w,{fieldPathId:i,title:y.title||x,required:p,schema:g,uiSchema:s,registry:h,optionalDataControl:S?c:void 0}),j.jsx(T,{fieldPathId:i,description:y.description||g.description,schema:g,uiSchema:s,registry:h}),S?void 0:c,j.jsx("div",{className:"row array-item-list",children:l}),t&&j.jsx(v,{id:Lo(i,"add"),className:"rjsf-array-item-add",onClick:u,disabled:r||d,uiSchema:s,registry:h})]})}function Ule(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:l,optionalDataControl:c}=e,u=ct(i,l.globalUiOptions),{label:d=!0}=u;if(!n||!d)return null;const h=yt("TitleFieldTemplate",l,u);return j.jsx(h,{id:p0(t),title:n,required:s,schema:r,uiSchema:i,registry:l,optionalDataControl:c})}function qle(e){const{id:t,name:n,htmlName:r,value:i,readonly:s,disabled:l,autofocus:c,onBlur:u,onFocus:d,onChange:h,onChangeOverride:p,options:g,schema:x,uiSchema:y,registry:T,rawErrors:w,type:S,hideLabel:v,hideError:E,...b}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const C={...b,...o$(x,S,g)};let _;C.type==="number"||C.type==="integer"?_=i||i===0?i:"":_=i??"";const A=k.useCallback(({target:{value:I}})=>h(I===""?g.emptyValue:I),[h,g]),M=k.useCallback(({target:I})=>u(t,I&&I.value),[u,t]),P=k.useCallback(({target:I})=>d(t,I&&I.value),[d,t]);return j.jsxs(j.Fragment,{children:[j.jsx("input",{id:t,name:r||t,className:"form-control",readOnly:s,disabled:l,autoFocus:c,value:_,...C,list:x.examples?hh(t):void 0,onChange:p||A,onBlur:M,onFocus:P,"aria-describedby":vi(t,!!x.examples)}),Array.isArray(x.examples)&&j.jsx("datalist",{id:hh(t),children:x.examples.concat(x.default&&!x.examples.includes(x.default)?[x.default]:[]).map(I=>j.jsx("option",{value:I},I))},`datalist_${t}`)]})}function Ble({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=s$(e);return n?null:j.jsx("div",{children:j.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function Yl(e){const{iconType:t="default",icon:n,className:r,uiSchema:i,registry:s,...l}=e;return j.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...l,children:j.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function Hle(e){const{registry:{translateString:t}}=e;return j.jsx(Yl,{title:t(It.CopyButton),...e,icon:"copy"})}function Kle(e){const{registry:{translateString:t}}=e;return j.jsx(Yl,{title:t(It.MoveDownButton),...e,icon:"arrow-down"})}function Gle(e){const{registry:{translateString:t}}=e;return j.jsx(Yl,{title:t(It.MoveUpButton),...e,icon:"arrow-up"})}function Zle(e){const{registry:{translateString:t}}=e;return j.jsx(Yl,{title:t(It.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Wle({id:e,className:t,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return j.jsx("div",{className:"row",children:j.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:j.jsx(Yl,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(It.AddButton),onClick:n,disabled:r,registry:i})})})}function Yle(){return{SubmitButton:Ble,AddButton:Wle,CopyButton:Hle,MoveDownButton:Kle,MoveUpButton:Gle,RemoveButton:Zle}}const _$=uE();function SE({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ct(n,r).enableMarkdownInDescription&&typeof e=="string"?j.jsx(Uh,{options:{disableParsingRawHTML:!0},"data-testid":_$.markdown,children:e}):e}SE.TEST_IDS=_$;function Xle(e){const{id:t,description:n,registry:r,uiSchema:i}=e;return n?j.jsx("div",{id:t,className:"field-description",children:j.jsx(SE,{description:n,registry:r,uiSchema:i})}):null}function Qle({errors:e,registry:t}){const{translateString:n}=t;return j.jsxs("div",{className:"panel panel-danger errors",children:[j.jsx("div",{className:"panel-heading",children:j.jsx("h3",{className:"panel-title",children:n(It.ErrorsLabel)})}),j.jsx("ul",{className:"list-group",children:e.map((r,i)=>j.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function Jle(e){const{schema:t,registry:n,typeSelector:r,schemaField:i}=e,s=yt("MultiSchemaFieldTemplate",n);return j.jsx(s,{selector:r,optionSchemaField:i,schema:t,registry:n})}const ece="*";function E$(e){const{label:t,required:n,id:r}=e;return t?j.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&j.jsx("span",{className:"required",children:ece})]}):null}function tce(e){const{id:t,label:n,children:r,errors:i,help:s,description:l,hidden:c,required:u,displayLabel:d,registry:h,uiSchema:p}=e,g=ct(p),x=yt("WrapIfAdditionalTemplate",h,g);if(c)return j.jsx("div",{className:"hidden",children:r});const y=g.widget==="checkbox";return j.jsxs(x,{...e,children:[d&&!y&&j.jsx(E$,{label:n,required:u,id:t}),d&&l?l:null,r,i,s]})}function nce(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=fE(n);return j.jsx("div",{children:j.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,s)=>j.jsx("li",{className:"text-danger",children:i},s))})})}const C$=uE();function wE({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ct(n,r).enableMarkdownInHelp&&typeof e=="string"?j.jsx(Uh,{options:{disableParsingRawHTML:!0},"data-testid":C$.markdown,children:e}):e}wE.TEST_IDS=C$;function rce(e){const{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?j.jsx("div",{id:dE(t),className:"help-block",children:j.jsx(wE,{help:n,registry:i,uiSchema:r})}):null}function ice(e){const{children:t,column:n,className:r,...i}=e;return j.jsx("div",{className:r,...i,children:t})}function oce(e){const{selector:t,optionSchemaField:n}=e;return j.jsxs("div",{className:"panel panel-default panel-body",children:[j.jsx("div",{className:"form-group",children:t}),n]})}function sce(e){const{className:t,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:l,optionalDataControl:c,properties:u,readonly:d,registry:h,required:p,schema:g,title:x,uiSchema:y}=e,T=ct(y),w=yt("TitleFieldTemplate",h,T),S=yt("DescriptionFieldTemplate",h,T),v=!d&&!r,{ButtonTemplates:{AddButton:E}}=h.templates;return j.jsxs("fieldset",{className:t,id:s.$id,children:[x&&j.jsx(w,{id:p0(s),title:x,required:p,schema:g,uiSchema:y,registry:h,optionalDataControl:v?c:void 0}),n&&j.jsx(S,{id:cc(s),description:n,schema:g,uiSchema:y,registry:h}),v?void 0:c,u.map(b=>b.content),DN(g,y,i)&&j.jsx(E,{id:Lo(s,"add"),className:"rjsf-object-property-expand",onClick:l,disabled:r||d,uiSchema:y,registry:h})]})}function ace(e){const{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:s}=e;return i?j.jsx(Yl,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?j.jsx(Yl,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):j.jsx("em",{id:t,children:r})}const lce="*";function cce(e){const{id:t,title:n,required:r,optionalDataControl:i}=e;return j.jsxs("legend",{id:t,children:[n,r&&j.jsx("span",{className:"required",children:lce}),i&&j.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function uce(e){const{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:s}=i;let l=It.UnsupportedField;const c=[];return n&&n.$id&&(l=It.UnsupportedFieldWithId,c.push(n.$id)),r&&(l=l===It.UnsupportedField?It.UnsupportedFieldWithReason:It.UnsupportedFieldWithIdAndReason,c.push(r)),j.jsxs("div",{className:"unsupported-field",children:[j.jsx("p",{children:j.jsx(Uh,{options:{disableParsingRawHTML:!0},children:s(l,c)})}),t&&j.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function fce(e){const{id:t,classNames:n,style:r,disabled:i,displayLabel:s,label:l,onKeyRenameBlur:c,onRemoveProperty:u,rawDescription:d,readonly:h,required:p,schema:g,hideError:x,rawErrors:y,children:T,uiSchema:w,registry:S}=e,{templates:v,translateString:E}=S,{RemoveButton:b}=v.ButtonTemplates,C=E(It.KeyLabel,[l]),_=Rs in g,A=!!d,M=["form-group",n];!x&&y&&y.length>0&&M.push("has-error has-danger");const P=M.join(" ").trim();if(!_)return j.jsx("div",{className:P,style:r,children:T});const I=A?46:26;return j.jsx("div",{className:P,style:r,children:j.jsxs("div",{className:"row",children:[j.jsx("div",{className:"col-xs-5 form-additional",children:j.jsxs("div",{className:"form-group",children:[s&&j.jsx(E$,{label:C,required:p,id:`${t}-key`}),s&&d&&j.jsx("div",{children:" "}),j.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:c,defaultValue:l})]})}),j.jsx("div",{className:"form-additional form-group col-xs-5",children:T}),j.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${I}px`:void 0},children:j.jsx(b,{id:Lo(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||h,onClick:u,uiSchema:w,registry:S})})]})})}function dce(){return{ArrayFieldDescriptionTemplate:zle,ArrayFieldItemTemplate:Fle,ArrayFieldItemButtonsTemplate:Lle,ArrayFieldTemplate:Vle,ArrayFieldTitleTemplate:Ule,ButtonTemplates:Yle(),BaseInputTemplate:qle,DescriptionFieldTemplate:Xle,ErrorListTemplate:Qle,FallbackFieldTemplate:Jle,FieldTemplate:tce,FieldErrorTemplate:nce,FieldHelpTemplate:rce,GridTemplate:ice,MultiSchemaFieldTemplate:oce,ObjectFieldTemplate:sce,OptionalDataControlsTemplate:ace,TitleFieldTemplate:cce,UnsupportedFieldTemplate:uce,WrapIfAdditionalTemplate:fce}}function hce(e){const{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:l,registry:c,onBlur:u,onFocus:d}=e,{translateString:h}=c,{elements:p,handleChange:g,handleClear:x,handleSetNow:y}=$se(e);return j.jsxs("ul",{className:"list-inline",children:[p.map((T,w)=>j.jsx("li",{className:"list-inline-item",children:j.jsx(Nse,{rootId:s,name:l,select:g,...T,disabled:t,readonly:n,registry:c,onBlur:u,onFocus:d,autofocus:r&&w===0})},w)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&j.jsx("li",{className:"list-inline-item",children:j.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:y,children:h(It.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&j.jsx("li",{className:"list-inline-item",children:j.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:x,children:h(It.ClearLabel)})})]})}function pce({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return j.jsx(n,{time:e,...t})}function mce({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:s,readonly:l,label:c,hideLabel:u,autofocus:d=!1,onBlur:h,onFocus:p,onChange:g,registry:x,htmlName:y}){const T=yt("DescriptionFieldTemplate",x,n),w=Vd(e),S=k.useCallback(A=>g(A.target.checked),[g]),v=k.useCallback(A=>h(r,A.target.checked),[h,r]),E=k.useCallback(A=>p(r,A.target.checked),[p,r]),_=ct(t).widget==="checkbox"?void 0:n.description??e.description;return j.jsxs("div",{className:`checkbox ${s||l?"disabled":""}`,children:[!u&&_&&j.jsx(T,{id:cc(r),description:_,schema:e,uiSchema:t,registry:x}),j.jsxs("label",{children:[j.jsx("input",{type:"checkbox",id:r,name:y||r,checked:typeof i>"u"?!1:i,required:w,disabled:s||l,autoFocus:d,onChange:S,onBlur:v,onFocus:E,"aria-describedby":vi(r)}),a$(j.jsx("span",{children:c}),u)]})]})}function gce({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:s},value:l,autofocus:c=!1,readonly:u,onChange:d,onBlur:h,onFocus:p,htmlName:g}){const x=Array.isArray(l)?l:[l],y=k.useCallback(({target:w})=>h(e,xr(w&&w.value,r,s)),[h,e,r,s]),T=k.useCallback(({target:w})=>p(e,xr(w&&w.value,r,s)),[p,e,r,s]);return j.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((w,S)=>{const v=Lh(w.value,x),E=Array.isArray(i)&&i.indexOf(w.value)!==-1,b=t||E||u?"disabled":"",C=A=>{A.target.checked?d(n$(S,x,r)):d(e$(S,x,r))},_=j.jsxs("span",{children:[j.jsx("input",{type:"checkbox",id:ql(e,S),name:g||e,checked:v,value:String(S),disabled:t||E||u,autoFocus:c&&S===0,onChange:C,onBlur:y,onFocus:T,"aria-describedby":vi(e)}),j.jsx("span",{children:w.label})]});return n?j.jsx("label",{className:`checkbox-inline ${b}`,children:_},S):j.jsx("div",{className:`checkbox ${b}`,children:j.jsx("label",{children:_})},S)})})}function yce(e){const{disabled:t,readonly:n,options:r,registry:i}=e,s=yt("BaseInputTemplate",i,r);return j.jsx(s,{type:"color",...e,disabled:t||n})}function vce(e){const{onChange:t,options:n,registry:r}=e,i=yt("BaseInputTemplate",r,n),s=k.useCallback(l=>t(l||void 0),[t]);return j.jsx(i,{type:"date",...e,onChange:s})}function bce(e){const{onChange:t,value:n,options:r,registry:i}=e,s=yt("BaseInputTemplate",i,r);return j.jsx(s,{type:"datetime-local",...e,value:Vse(n),onChange:l=>t(Mse(l))})}function Sce(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return j.jsx(r,{type:"email",...e})}function wce({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:i,name:s}=e;return r?["image/jpeg","image/png"].includes(i)?j.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):j.jsxs(j.Fragment,{children:[" ",j.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(It.PreviewLabel)})]}):null}function xce({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;const{translateString:s}=t,{RemoveButton:l}=yt("ButtonTemplates",t,i);return j.jsx("ul",{className:"file-info",children:e.map((c,u)=>{const{name:d,size:h,type:p}=c,g=()=>r(u);return j.jsxs("li",{children:[j.jsx(Uh,{children:s(It.FilesInfo,[d,p,String(h)])}),n&&j.jsx(wce,{fileInfo:c,registry:t}),j.jsx(l,{onClick:g,registry:t})]},u)})})}function _ce(e){const{disabled:t,readonly:n,required:r,multiple:i,onChange:s,value:l,options:c,registry:u}=e,{filesInfo:d,handleChange:h,handleRemove:p}=Lse(l,s,i),g=yt("BaseInputTemplate",u,c),x=y=>{y.target.files&&h(y.target.files)};return j.jsxs("div",{children:[j.jsx(g,{...e,disabled:t||n,type:"file",required:l?!1:r,onChangeOverride:x,value:"",accept:c.accept?String(c.accept):void 0}),j.jsx(xce,{filesInfo:d,onRemove:p,registry:u,preview:c.filePreview,options:c})]})}function Ece({id:e,value:t,htmlName:n}){return j.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function Cce(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return j.jsx(r,{type:"password",...e})}function Tce({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:l,onFocus:c,onChange:u,id:d,htmlName:h}){const{enumOptions:p,enumDisabled:g,inline:x,emptyValue:y}=e,T=k.useCallback(({target:S})=>l(d,xr(S&&S.value,p,y)),[l,p,y,d]),w=k.useCallback(({target:S})=>c(d,xr(S&&S.value,p,y)),[c,p,y,d]);return j.jsx("div",{className:"field-radio-group",id:d,role:"radiogroup",children:Array.isArray(p)&&p.map((S,v)=>{const E=Lh(S.value,t),b=Array.isArray(g)&&g.indexOf(S.value)!==-1,C=r||b||i?"disabled":"",_=()=>u(S.value),A=j.jsxs("span",{children:[j.jsx("input",{type:"radio",id:ql(d,v),checked:E,name:h||d,required:n,value:String(v),disabled:r||b||i,autoFocus:s&&v===0,onChange:_,onBlur:T,onFocus:w,"aria-describedby":vi(d)}),j.jsx("span",{children:S.label})]});return x?j.jsx("label",{className:`radio-inline ${C}`,children:A},v):j.jsx("div",{className:`radio ${C}`,children:j.jsx("label",{children:A})},v)})})}function Rce(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return j.jsxs("div",{className:"field-range-wrapper",children:[j.jsx(n,{type:"range",...e}),j.jsx("span",{className:"range-view",children:t})]})}function Ace({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:s,onChange:l,onFocus:c,onBlur:u,schema:d,options:h,htmlName:p}){const{stars:g=5,shape:x="star"}=h,y=d.maximum?Math.min(d.maximum,5):Math.min(Math.max(g,1),5),T=d.minimum||0,w=k.useCallback(b=>{!r&&!i&&l(b)},[l,r,i]),S=k.useCallback(b=>{if(c){const C=Number(b.target.dataset.value);c(e,C)}},[c,e]),v=k.useCallback(b=>{if(u){const C=Number(b.target.dataset.value);u(e,C)}},[u,e]),E=b=>x==="heart"?b?"♥":"♡":b?"★":"☆";return j.jsx(j.Fragment,{children:j.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(y)].map((b,C)=>{const _=T+C,A=_<=t;return j.jsx("span",{onClick:()=>w(_),onFocus:S,onBlur:v,"data-value":_,tabIndex:r||i?-1:0,role:"radio","aria-checked":_===t,"aria-label":`${_} ${x==="heart"?"heart":"star"}${_===1?"":"s"}`,style:{color:A?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(A)},C)}),j.jsx("input",{type:"hidden",id:e,name:p||e,value:t||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function J1(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function Oce({schema:e,id:t,options:n,value:r,required:i,disabled:s,readonly:l,multiple:c=!1,autofocus:u=!1,onChange:d,onBlur:h,onFocus:p,placeholder:g,htmlName:x}){const{enumOptions:y,enumDisabled:T,emptyValue:w}=n,S=c?[]:"",v=k.useCallback(A=>{const M=J1(A,c);return p(t,xr(M,y,w))},[p,t,c,y,w]),E=k.useCallback(A=>{const M=J1(A,c);return h(t,xr(M,y,w))},[h,t,c,y,w]),b=k.useCallback(A=>{const M=J1(A,c);return d(xr(M,y,w))},[d,c,y,w]),C=t$(r,y,c),_=!c&&e.default===void 0;return j.jsxs("select",{id:t,name:x||t,multiple:c,role:"combobox",className:"form-control",value:typeof C>"u"?S:C,required:i,disabled:s||l,autoFocus:u,onBlur:E,onFocus:v,onChange:b,"aria-describedby":vi(t),children:[_&&j.jsx("option",{value:"",children:g}),Array.isArray(y)&&y.map(({value:A,label:M},P)=>{const I=T&&T.indexOf(A)!==-1;return j.jsx("option",{value:String(P),disabled:I,children:M},P)})]})}function T$({id:e,options:t={},placeholder:n,value:r,required:i,disabled:s,readonly:l,autofocus:c=!1,onChange:u,onBlur:d,onFocus:h,htmlName:p}){const g=k.useCallback(({target:{value:T}})=>u(T===""?t.emptyValue:T),[u,t.emptyValue]),x=k.useCallback(({target:T})=>d(e,T&&T.value),[d,e]),y=k.useCallback(({target:T})=>h(e,T&&T.value),[e,h]);return j.jsx("textarea",{id:e,name:p||e,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:l,autoFocus:c,rows:t.rows,onBlur:x,onFocus:y,onChange:g,"aria-describedby":vi(e)})}T$.defaultProps={autofocus:!1,options:{}};function kce(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return j.jsx(r,{...e})}function Mce(e){const{onChange:t,options:n,registry:r}=e,i=yt("BaseInputTemplate",r,n),s=k.useCallback(l=>t(l?`${l}:00`:void 0),[t]);return j.jsx(i,{type:"time",...e,onChange:s})}function jce(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return j.jsx(r,{type:"url",...e})}function Pce(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return j.jsx(r,{type:"number",...e})}function Dce(){return{AltDateWidget:hce,AltDateTimeWidget:pce,CheckboxWidget:mce,CheckboxesWidget:gce,ColorWidget:yce,DateWidget:vce,DateTimeWidget:bce,EmailWidget:Sce,FileWidget:_ce,HiddenWidget:Ece,PasswordWidget:Cce,RadioWidget:Tce,RangeWidget:Rce,RatingWidget:Ace,SelectWidget:Oce,TextWidget:kce,TextareaWidget:T$,TimeWidget:Mce,UpDownWidget:Pce,URLWidget:jce}}function Nce(){return{fields:Ile(),templates:dce(),widgets:Dce(),rootSchema:{},formContext:{},translateString:Sse,globalFormOptions:{idPrefix:MN,idSeparator:jN,useFallbackUiForUnsupportedType:!1}}}function Jc(e,t){return{...Bx(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class $ce extends k.Component{formElement;pendingChanges=[];constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=t,s=n??r;this.state=this.getStateFromProps(t,s,void 0,void 0,void 0,!0),i&&!Rn(this.state.formData,s)&&i(Jc(this.state)),this.formElement=k.createRef()}getSnapshotBeforeUpdate(t,n){if(!Rn(this.props,t)){const r=tM(this.props.formData,t.formData),i=tM(this.props.formData,this.state.formData),s=!Rn(t.schema,this.props.schema),l=r.length>0||!Rn(t.formData,this.props.formData),c=i.length>0||!Rn(this.state.formData,this.props.formData),u=this.getStateFromProps(this.props,this.props.formData,s||l?void 0:this.state.retrievedSchema,s,r,!c),d=!Rn(u,n);return{nextState:u,shouldUpdate:d}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:i}=r;!Rn(i.formData,this.props.formData)&&!Rn(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Jc(i)),this.setState(i)}}getStateFromProps(t,n,r,i=!1,s=[],l=!1){const c=this.state||{},u="schema"in t?t.schema:this.props.schema,d="validator"in t?t.validator:this.props.validator,h=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},p=t.formData===void 0&&this.props.formData===void 0,g=typeof n<"u",x="liveValidate"in t?t.liveValidate:this.props.liveValidate,y=g&&!t.noValidate&&x,T="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let S=c.schemaUtils;(!S||S.doesSchemaUtilsDiffer(d,u,T,w))&&(S=yse(d,u,T,w));const v=S.getRootSchema();let E=n;n===MM?E=void 0:n===void 0&&p&&(E=c.formData);const b=S.getDefaultFormState(v,E,!1,c.initialDefaultsGenerated),C=this.updateRetrievedSchema(r??S.retrieveSchema(v,b)),_=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}};let A,M,P=c.schemaValidationErrors,I=c.schemaValidationErrorSchema;if(y&&!l){const Y=this.liveValidate(v,S,c.errorSchema,b,void 0,c.customErrors,r,r!==void 0);A=Y.errors,M=Y.errorSchema,P=Y.schemaValidationErrors,I=Y.schemaValidationErrorSchema}else{const Y=_();if(A=Y.errors,M=Y.errorSchema,s.length>0&&!y){const Z=s.reduce((ee,ae)=>(ee[ae]=void 0,ee),{});M=I=dh(Y.errorSchema,Z,"preventDuplicates")}const H=this.mergeErrors({errorSchema:M,errors:A},t.extraErrors,c.customErrors);A=H.errors,M=H.errorSchema}const z=this.getRegistry(t,v,S),q=Rn(c.registry,z)?c.registry:z,K=c.fieldPathId&&c.fieldPathId?.[Sn]===q.globalFormOptions.idPrefix?c.fieldPathId:ro("",q.globalFormOptions);return{schemaUtils:S,schema:v,uiSchema:h,fieldPathId:K,formData:b,edit:g,errors:A,errorSchema:M,schemaValidationErrors:P,schemaValidationErrorSchema:I,retrievedSchema:C,initialDefaultsGenerated:!0,registry:q}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return l$(this,t,n,r)}validate(t,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:l,transformErrors:c,uiSchema:u}=this.props,d=i??s.retrieveSchema(n,t);return s.getValidator().validateFormData(t,d,l,c,u)}renderErrors(t){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,l=ct(s),c=yt("ErrorListTemplate",t,l);return n&&n.length?j.jsx(c,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:t}):null}mergeErrors(t,n,r){let i=t.errorSchema,s=t.errors;if(n){const l=$g(t,n);i=l.errorSchema,s=l.errors}if(r){const l=$g(t,r.ErrorSchema,!0);i=l.errorSchema,s=l.errors}return{errors:s,errorSchema:i}}liveValidate(t,n,r,i,s,l,c,u=!1){const d=this.validate(i,t,n,c),h=d.errors;let p=d.errorSchema;u&&(p=dh(r,d.errorSchema,"preventDuplicates"));const g=h,x=p;return{...this.mergeErrors({errorSchema:p,errors:h},s,l),schemaValidationErrors:g,schemaValidationErrorSchema:x}}getUsedFormData=(t,n)=>{if(n.length===0&&typeof t!="object")return t;const r=Bx(t,n);return Array.isArray(t)?Object.keys(r).map(i=>r[i]):r};getFieldNames=(t,n)=>{const r=(s,l)=>typeof s!="object"||dr(s)||l&&!dr(s),i=(s,l=[],c=[[]])=>{const u=Object.keys(s);return u.forEach(d=>{const h=s[d];if(typeof h=="object"){const p=c.map(g=>[...g,d]);h[nE]&&h[jg]!==""?l.push(h[jg]):i(h,l,p)}else d===jg&&h!==""&&c.forEach(p=>{const g=Fe(n,p),x=u.length===1;(r(g,x)||Array.isArray(g)&&g.every(y=>r(y,x)))&&l.push(p)})}),l};return i(t)};omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state,i=r.retrieveSchema(n,t),s=r.toPathSchema(i,"",t),l=this.getFieldNames(s,t);return this.getUsedFormData(t,l)};setFieldValue=(t,n)=>{const{registry:r}=this.state,i=Array.isArray(t)?t:t.split("."),s=ro("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[Sn])};onChange=(t,n,r,i)=>{this.pendingChanges.push({newValue:t,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;const{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:l,liveOmit:c,noValidate:u,liveValidate:d,onChange:h}=this.props,{formData:p,schemaUtils:g,schema:x,fieldPathId:y,schemaValidationErrorSchema:T,errors:w}=this.state;let{customErrors:S,errorSchema:v}=this.state;const E=y.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===E;let C=this.state.retrievedSchema,_=b?t:Wy(p);if(Kt(_)||Array.isArray(_)){t===x$?eH(_,n):b||fn(_,n,t);const I=this.getStateFromProps(this.props,_,void 0,void 0,void 0,!0);_=I.formData,C=I.retrievedSchema}const A=!u&&(d===!0||d==="onChange");let M={formData:_,schema:x},P=_;if(l===!0&&(c===!0||c==="onChange")&&(P=this.omitExtraData(_),M={formData:P}),i){const I=b?T:Fe(T,n);if(!dr(I))b?v=i:fn(v,n,i);else if(S||(S=new r$),b){const z=Fe(i,Vr);z&&S.setErrors(z)}else fn(S.ErrorSchema,n,i)}else S&&Fe(S.ErrorSchema,[...n,Vr])&&S.clearErrors(n);if(A&&this.pendingChanges.length===1){const I=this.liveValidate(x,g,v,P,s,S,C);M={formData:P,...I,customErrors:S}}else if(!u&&i){const I=this.mergeErrors({errorSchema:v,errors:w},s,S);M={formData:P,...I,customErrors:S}}this.setState(M,()=>{h&&h(Jc({...this.state,...M}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return Rn(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:n=MM,onChange:r}=this.props,l={formData:this.getStateFromProps(this.props,t??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(l,()=>r&&r(Jc({...this.state,...l})))};onBlur=(t,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:l}=this.props;if(r&&r(t,n),i===!0&&s==="onBlur"||l==="onBlur"){const{onChange:c,extraErrors:u}=this.props,{formData:d}=this.state;let h=d,p={formData:h};if(i===!0&&s==="onBlur"&&(h=this.omitExtraData(d),p={formData:h}),l==="onBlur"){const{schema:x,schemaUtils:y,errorSchema:T,customErrors:w,retrievedSchema:S}=this.state,v=this.liveValidate(x,y,T,h,u,w,S);p={formData:h,...v,customErrors:w}}const g=Object.keys(p).filter(x=>!x.startsWith("schemaValidation")).some(x=>{const y=Fe(this.state,x),T=Fe(p,x);return!Rn(y,T)});this.setState(p,()=>{c&&g&&c(Jc({...this.state,...p}),t)})}};onFocus=(t,n)=>{const{onFocus:r}=this.props;r&&r(t,n)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s}=this.props;let{formData:l}=this.state;if(n===!0&&(l=this.omitExtraData(l)),i||this.validateFormWithFormData(l)){const c=r||{},u=r?pE(r):[];this.setState({formData:l,errors:u,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Jc({...this.state,formData:l},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=jN,idPrefix:s=MN,nameGenerator:l,useFallbackUiForUnsupportedType:c=!1}=t;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:c,...r!==void 0&&{experimental_componentUpdateStrategy:r},...l!==void 0&&{nameGenerator:l}}}getRegistry(t,n,r){const{translateString:i,uiSchema:s={}}=t,{fields:l,templates:c,widgets:u,formContext:d,translateString:h}=Nce();return{fields:{...l,...t.fields},templates:{...c,...t.templates,ButtonTemplates:{...c.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...u,...t.widgets},rootSchema:n,formContext:t.formContext||d,schemaUtils:r,translateString:i||h,globalUiOptions:s[$w],globalFormOptions:this.getGlobalFormOptions(t)}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=t,s=fP(i);s[0]===""?s[0]=n:s.unshift(n);const l=s.join(r);let c=this.formElement.current.elements[l];c||(c=this.formElement.current.querySelector(`input[id^="${l}"`)),c&&c.length&&(c=c[0]),c&&c.focus()}validateFormWithFormData=t=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:l}=this.state,c=this.validate(t);let u=c.errors,d=c.errorSchema;const h=u,p=d,g=u.length>0||n&&r;if(g){if(n){const x=$g(c,n);d=x.errorSchema,u=x.errors}i&&(typeof i=="function"?i(u[0]):this.focusOnError(u[0])),this.setState({errors:u,errorSchema:d,schemaValidationErrors:h,schemaValidationErrorSchema:p},()=>{s?s(u):console.error("Form validation failed",u)})}else l.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!g};validateForm(){const{omitExtraData:t}=this.props;let{formData:n}=this.state;return t===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:t,id:n,className:r="",tagName:i,name:s,method:l,target:c,action:u,autoComplete:d,enctype:h,acceptCharset:p,noHtml5Validate:g=!1,disabled:x,readonly:y,showErrorList:T="top",_internalFormWrapper:w}=this.props,{schema:S,uiSchema:v,formData:E,errorSchema:b,fieldPathId:C,registry:_}=this.state,{SchemaField:A}=_.fields,{SubmitButton:M}=_.templates.ButtonTemplates,P=w?i:void 0,I=w||i||"form";let{[vy]:z={}}=ct(v);x&&(z={...z,props:{...z.props,disabled:!0}});const q={[Oa]:{[vy]:z}};return j.jsxs(I,{className:r||"rjsf",id:n,name:s,method:l,target:c,action:u,autoComplete:d,encType:h,acceptCharset:p,noValidate:g,onSubmit:this.onSubmit,as:P,ref:this.formElement,children:[T==="top"&&this.renderErrors(_),j.jsx(A,{name:"",schema:S,uiSchema:v,errorSchema:b,fieldPathId:C,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:_,disabled:x,readonly:y}),t||j.jsx(M,{uiSchema:q,registry:_}),T==="bottom"&&this.renderErrors(_)]})}}function Ice(e){return k.forwardRef(({fields:t,widgets:n,templates:r,...i},s)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},j.jsx($ce,{...e,...i,fields:t,widgets:n,templates:r,ref:s})))}var ag={exports:{}},eS={},jM;function zce(){return jM||(jM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,I){return{validate:P,compare:I}}e.fullFormats={date:t(s,l),time:t(u,d),"date-time":t(p,g),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:T,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:M,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:S,int32:{type:"number",validate:b},int64:{type:"number",validate:C},float:{type:"number",validate:_},double:{type:"number",validate:_},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,g),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(P){return P%4===0&&(P%100!==0||P%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(P){const I=r.exec(P);if(!I)return!1;const z=+I[1],q=+I[2],K=+I[3];return q>=1&&q<=12&&K>=1&&K<=(q===2&&n(z)?29:i[q])}function l(P,I){if(P&&I)return P>I?1:P<I?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,I){const z=c.exec(P);if(!z)return!1;const q=+z[1],K=+z[2],X=+z[3],Y=z[5];return(q<=23&&K<=59&&X<=59||q===23&&K===59&&X===60)&&(!I||Y!=="")}function d(P,I){if(!(P&&I))return;const z=c.exec(P),q=c.exec(I);if(z&&q)return P=z[1]+z[2]+z[3]+(z[4]||""),I=q[1]+q[2]+q[3]+(q[4]||""),P>I?1:P<I?-1:0}const h=/t|\s/i;function p(P){const I=P.split(h);return I.length===2&&s(I[0])&&u(I[1],!0)}function g(P,I){if(!(P&&I))return;const[z,q]=P.split(h),[K,X]=I.split(h),Y=l(z,K);if(Y!==void 0)return Y||d(q,X)}const x=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function T(P){return x.test(P)&&y.test(P)}const w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function S(P){return w.lastIndex=0,w.test(P)}const v=-2147483648,E=2**31-1;function b(P){return Number.isInteger(P)&&P<=E&&P>=v}function C(P){return Number.isInteger(P)}function _(){return!0}const A=/[^\\]\\Z/;function M(P){if(A.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(eS)),eS}var tS={},PM;function Fce(){return PM||(PM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=y_(),n=kt(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:c,schemaCode:u})=>n.str`should be ${i[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>n._`{comparison: ${i[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:u,data:d,schemaCode:h,keyword:p,it:g}=c,{opts:x,self:y}=g;if(!x.validateFormats)return;const T=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");T.$data?w():S();function w(){const E=u.scopeValue("formats",{ref:y.formats,code:x.code.formats}),b=u.const("fmt",n._`${E}[${T.schemaCode}]`);c.fail$data(n.or(n._`typeof ${b} != "object"`,n._`${b} instanceof RegExp`,n._`typeof ${b}.compare != "function"`,v(b)))}function S(){const E=T.schema,b=y.formats[E];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const C=u.scopeValue("formats",{key:E,ref:b,code:x.code.formats?n._`${x.code.formats}${n.getProperty(E)}`:void 0});c.fail$data(v(C))}function v(E){return n._`${E}.compare(${d}, ${h}) ${i[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(tS)),tS}var DM;function Lce(){return DM||(DM=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=zce(),r=Fce(),i=kt(),s=new i.Name("fullFormats"),l=new i.Name("fastFormats"),c=(d,h={keywords:!0})=>{if(Array.isArray(h))return u(d,h,n.fullFormats,s),d;const[p,g]=h.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],x=h.formats||n.formatNames;return u(d,x,p,g),h.keywords&&r.default(d),d};c.get=(d,h="full")=>{const g=(h==="fast"?n.fastFormats:n.fullFormats)[d];if(!g)throw new Error(`Unknown format "${d}"`);return g};function u(d,h,p,g){var x,y;(x=(y=d.opts.code).formats)!==null&&x!==void 0||(y.formats=i._`require("ajv-formats/dist/formats").${g}`);for(const T of h)d.addFormat(T,p[T])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(ag,ag.exports)),ag.exports}var Vce=Lce();const NM=Qo(Vce),Uce={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},qce=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,Bce=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Hce(e,t,n={},r,i=aQ,s){let l=new i({...Uce,...n});return r?NM(l,r):r!==!1&&NM(l),l.addFormat("data-url",Bce),l.addFormat("color",qce),l.addKeyword(Rs),l.addKeyword(nE),Array.isArray(e)&&l.addMetaSchema(e),Zt(t)&&Object.keys(t).forEach(c=>{l.addFormat(c,t[c])}),s&&(l=s(l)),l}function Kce(e=[],t){return e.map(r=>{var i;const{instancePath:s,keyword:l,params:c,schemaPath:u,parentSchema:d,...h}=r;let{message:p=""}=h,g=s.replace(/\//g,"."),x=`${g} ${p}`.trim(),y="";const T=[...((i=c.deps)===null||i===void 0?void 0:i.split(", "))||[],c.missingProperty,c.property].filter(w=>w);if(T.length>0)T.forEach(w=>{const S=g?`${g}.${w}`:w;let v=ct(Fe(t,`${S.replace(/^\./,"")}`)).title;if(v===void 0){const E=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([w]);v=ct(Fe(t,E)).title}if(v)p=p.replace(`'${w}'`,`'${v}'`),y=v;else{const E=Fe(d,[sn,w,"title"]);E&&(p=p.replace(`'${w}'`,`'${E}'`),y=E)}}),x=p;else{const w=ct(Fe(t,`${g.replace(/^\./,"")}`)).title;if(w)x=`'${w}' ${p}`.trim(),y=w;else{const S=d?.title;S&&(x=`'${S}' ${p}`.trim(),y=S)}}return"missingProperty"in c&&(g=g?`${g}.${c.missingProperty}`:c.missingProperty),{name:l,property:g,message:p,params:c,stack:x,schemaPath:u,title:y}}).reduce((r,i)=>{const{message:s,schemaPath:l}=i,c=l?.indexOf(`/${Gt}/`),u=l?.indexOf(`/${Nt}/`);let d;return c&&c>=0?d=l?.substring(0,c):u&&u>=0&&(d=l?.substring(0,u)),(d?r.find(p=>{var g;return p.message===s&&((g=p.schemaPath)===null||g===void 0?void 0:g.startsWith(d))}):void 0)||r.push(i),r},[])}function Gce(e,t,n,r,i,s,l){const{validationError:c}=t;let u=Kce(t.errors,l);c&&(u=[...u,{stack:c.message}]),typeof s=="function"&&(u=s(u,l));let d=Pse(u);if(c&&(d={...d,$schema:{__errors:[c.message]}}),typeof i!="function")return{errors:u,errorSchema:d};const h=YN(e,r,n,r,!0),p=i(h,Iw(h),l),g=c$(p);return $g({errors:u,errorSchema:d},g)}class Zce{constructor(t,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:l,AjvClass:c,extenderFn:u}=t;this.ajv=Hce(r,i,s,l,c,u),this.localizer=n}reset(){this.ajv.removeSchema()}rawValidation(t,n){var r,i;let s,l;try{t[Sn]&&(l=this.ajv.getSchema(t[Sn])),l===void 0&&(l=this.ajv.compile(t)),l(n)}catch(u){s=u}let c;return l&&(typeof this.localizer=="function"&&(((r=l.errors)!==null&&r!==void 0?r:[]).forEach(u=>{var d;["missingProperty","property"].forEach(h=>{var p;!((p=u.params)===null||p===void 0)&&p[h]&&(u.params[h]=`'${u.params[h]}'`)}),!((d=u.params)===null||d===void 0)&&d.deps&&(u.params.deps=u.params.deps.split(", ").map(h=>`'${h}'`).join(", "))}),this.localizer(l.errors),((i=l.errors)!==null&&i!==void 0?i:[]).forEach(u=>{var d;["missingProperty","property"].forEach(h=>{var p;!((p=u.params)===null||p===void 0)&&p[h]&&(u.params[h]=u.params[h].slice(1,-1))}),!((d=u.params)===null||d===void 0)&&d.deps&&(u.params.deps=u.params.deps.split(", ").map(h=>h.slice(1,-1)).join(", "))})),c=l.errors||void 0,l.errors=null),{errors:c,validationError:s}}validateFormData(t,n,r,i,s){const l=this.rawValidation(n,t);return Gce(this,l,t,n,r,i,s)}handleSchemaUpdate(t){var n,r;const i=(n=t[Sn])!==null&&n!==void 0?n:PN;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):Rn(t,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,n,r){var i;try{this.handleSchemaUpdate(r);const s=mE(t),l=(i=s[Sn])!==null&&i!==void 0?i:Ase(s);let c;return c=this.ajv.getSchema(l),c===void 0&&(c=this.ajv.addSchema(s,l).getSchema(l)||this.ajv.compile(s)),c(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function Wce(e={},t){return new Zce(e,t)}const Yce=Wce();const Xce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Qce=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),$M=e=>{const t=Qce(e);return t.charAt(0).toUpperCase()+t.slice(1)},R$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Jce=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var eue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const tue=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...eue,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:R$("lucide",i),...!s&&!Jce(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(s)?s:[s]]));const es=(e,t)=>{const n=k.forwardRef(({className:r,...i},s)=>k.createElement(tue,{ref:s,iconNode:t,className:R$(`lucide-${Xce($M(e))}`,`lucide-${e}`,r),...i}));return n.displayName=$M(e),n};const nue=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rue=es("check",nue);const iue=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],A$=es("chevron-down",iue);const oue=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],sue=es("chevron-up",oue);const aue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],lue=es("circle-alert",aue);const cue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],O$=es("circle-plus",cue);const uue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fue=es("circle",uue);const due=[["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"}]],hue=es("copy",due);const pue=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],mue=es("search",pue);const gue=[["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"}]],yue=es("trash-2",gue);const vue=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bue=es("x",vue);function $t(...e){return Y4(w_(e))}const Sue=df("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function xE({className:e,variant:t,size:n,asChild:r=!1,...i}){const s=r?S_:"button";return j.jsx(s,{"data-slot":"button",className:$t(Sue({variant:t,size:n,className:e})),...i})}function wue({uiSchema:e,registry:t,className:n,...r}){const{translateString:i}=t;return j.jsx("div",{className:"p-0 m-0",children:j.jsxs(xE,{...r,className:$t("w-fit gap-2",n),variant:"outline",type:"button",children:[j.jsx(O$,{size:16})," ",i(It.AddItemButton)]})})}function xue(e){const{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:l,registry:c}=e,u=ct(l),d=yt("ArrayFieldItemButtonsTemplate",c,u),h=i?-6:22;return j.jsx("div",{children:j.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[j.jsx("div",{className:"grow shrink",children:t}),j.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&j.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${h}px`:void 0},children:j.jsx(d,{...n})})})]})})}function _ue(e){const{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:l,onAddClick:c,readonly:u,registry:d,required:h,schema:p,title:g}=e,x=ct(i),y=yt("ArrayFieldDescriptionTemplate",d,x),T=yt("ArrayFieldTitleTemplate",d,x),w=!u&&!n,{ButtonTemplates:{AddButton:S}}=d.templates;return j.jsx("div",{children:j.jsx("div",{className:"m-0 flex p-0",children:j.jsxs("div",{className:"m-0 w-full p-0",children:[j.jsx(T,{fieldPathId:r,title:x.title||g,schema:p,uiSchema:i,required:h,registry:d,optionalDataControl:w?l:void 0}),j.jsx(y,{fieldPathId:r,description:x.description||p.description,schema:p,uiSchema:i,registry:d}),j.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[w?void 0:l,s,t&&j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(S,{id:Lo(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:n||u,uiSchema:i,registry:d})})]},`array-item-list-${r.$id}`)]})})})}function k$({className:e,type:t,...n}){return j.jsx("input",{type:t,"data-slot":"input",className:$t("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function Eue({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:s,type:l,value:c,onChange:u,onChangeOverride:d,onBlur:h,onFocus:p,autofocus:g,options:x,schema:y,rawErrors:T=[],children:w,extraProps:S,className:v}){const E={...S,...o$(y,l,x)},b=({target:{value:A}})=>u(A===""?x.emptyValue:A),C=({target:A})=>h(e,A&&A.value),_=({target:A})=>p(e,A&&A.value);return j.jsxs("div",{className:"p-0.5",children:[j.jsx(k$,{id:e,name:t||e,type:l,placeholder:n,autoFocus:g,required:r,disabled:s,readOnly:i,className:$t({"border-destructive focus-visible:ring-0":T.length>0},v),list:y.examples?hh(e):void 0,...E,value:c||c===0?c:"",onChange:d||b,onBlur:C,onFocus:_,"aria-describedby":vi(e,!!y.examples)}),w,Array.isArray(y.examples)?j.jsx("datalist",{id:hh(e),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map(A=>j.jsx("option",{value:A},A))}):null]})}function Cue({id:e,description:t,registry:n,uiSchema:r}){return t?j.jsx("div",{children:j.jsx("div",{id:e,className:"text-sm text-muted-foreground",children:j.jsx(SE,{description:t,registry:n,uiSchema:r})})}):null}const Tue=df("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Rue({className:e,variant:t,...n}){return j.jsx("div",{"data-slot":"alert",role:"alert",className:$t(Tue({variant:t}),e),...n})}function Aue({className:e,...t}){return j.jsx("div",{"data-slot":"alert-title",className:$t("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Oue({className:e,...t}){return j.jsx("div",{"data-slot":"alert-description",className:$t("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function kue({errors:e,registry:t}){const{translateString:n}=t;return j.jsxs(Rue,{variant:"destructive",className:"mb-2",children:[j.jsx(lue,{className:"h-4 w-4"}),j.jsx(Aue,{children:n(It.ErrorsLabel)}),j.jsx(Oue,{className:"flex flex-col gap-1",children:e.map((r,i)=>j.jsxs("span",{children:["• ",r.stack]},i))})]})}function Mue(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=fE(n);return j.jsx("div",{className:"flex flex-col gap-1",id:r,children:t.map((i,s)=>j.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function jue(e){const{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:s}=e;return n?j.jsx("span",{className:$t("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:dE(t),children:j.jsx(wE,{help:n,registry:i,uiSchema:r})}):null}function Pue({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:l,rawDescription:c,classNames:u,style:d,disabled:h,label:p,hidden:g,onKeyRename:x,onKeyRenameBlur:y,onRemoveProperty:T,readonly:w,required:S,schema:v,uiSchema:E,registry:b}){const C=ct(E),_=yt("WrapIfAdditionalTemplate",b,C);if(g)return j.jsx("div",{className:"hidden",children:t});const A=C.widget==="checkbox";return j.jsx(_,{classNames:u,style:d,disabled:h,id:e,label:p,displayLabel:n,onKeyRename:x,onKeyRenameBlur:y,onRemoveProperty:T,rawDescription:c,readonly:w,required:S,schema:v,uiSchema:E,registry:b,children:j.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!A&&j.jsxs("label",{className:$t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:e,children:[p,S?"*":null]}),t,n&&c&&!A&&j.jsx("span",{className:$t("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:l}),i,s]})})}function Due(e){const{children:t,column:n,className:r,...i}=e;return j.jsx("div",{className:$t("grid gap-2",r),...i,children:t})}function qh(e){const{icon:t,iconType:n,className:r,uiSchema:i,registry:s,...l}=e;return j.jsx(xE,{size:"icon",variant:"outline",className:r,...l,type:"button",children:t})}function Nue(e){const{registry:{translateString:t}}=e;return j.jsx(qh,{title:t(It.CopyButton),...e,icon:j.jsx(hue,{className:"h-4 w-4"})})}function $ue(e){const{registry:{translateString:t}}=e;return j.jsx(qh,{title:t(It.MoveDownButton),...e,icon:j.jsx(A$,{className:"h-4 w-4"})})}function Iue(e){const{registry:{translateString:t}}=e;return j.jsx(qh,{title:t(It.MoveUpButton),...e,icon:j.jsx(sue,{className:"h-4 w-4"})})}function M$(e){const{registry:{translateString:t}}=e;return j.jsx(qh,{title:t(It.RemoveButton),...e,className:"border-destructive",icon:j.jsx(yue,{className:"h-4 w-4 stroke-destructive"})})}function zue({selector:e,optionSchemaField:t}){return j.jsxs("div",{className:$t("p-4 border rounded-md bg-background shadow-sm"),children:[j.jsx("div",{className:$t("mb-4"),children:e}),t]})}function Fue({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:l,formData:c,optionalDataControl:u,onAddProperty:d,disabled:h,readonly:p,registry:g}){const x=ct(i),y=yt("TitleFieldTemplate",g,x),T=yt("DescriptionFieldTemplate",g,x),w=!p&&!h,{ButtonTemplates:{AddButton:S}}=g.templates;return j.jsxs(j.Fragment,{children:[t&&j.jsx(y,{id:p0(s),title:t,required:r,schema:l,uiSchema:i,registry:g,optionalDataControl:w?u:void 0}),e&&j.jsx(T,{id:cc(s),description:e,schema:l,uiSchema:i,registry:g}),j.jsxs("div",{className:"flex flex-col gap-2",children:[w?void 0:u,n.map((v,E)=>j.jsx("div",{className:`${v.hidden?"hidden":""} flex`,children:j.jsx("div",{className:"w-full",children:v.content})},E)),DN(l,i,c)?j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(S,{id:Lo(s,"add"),onClick:d,disabled:h||p,className:"rjsf-object-property-expand",uiSchema:i,registry:g})}):null]})]})}function Lue(e){const{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:s}=e;return i?j.jsx(qh,{id:t,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:j.jsx(O$,{}),size:"xs"}):s?j.jsx(M$,{id:t,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):j.jsx("em",{id:t,children:r})}function Vue(e){const{submitText:t,norender:n,props:r}=s$(e.uiSchema);return n?null:j.jsx("div",{children:j.jsx(xE,{type:"submit",...r,className:$t("my-2",r?.className),children:t})})}var Wo=ij();const Uue=Qo(Wo);var que=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ts=que.reduce((e,t)=>{const n=$4(`Primitive.${t}`),r=k.forwardRef((i,s)=>{const{asChild:l,...c}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Bue="Separator",IM="horizontal",Hue=["horizontal","vertical"],j$=k.forwardRef((e,t)=>{const{decorative:n,orientation:r=IM,...i}=e,s=Kue(r)?r:IM,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return j.jsx(ts.div,{"data-orientation":s,...c,...i,ref:t})});j$.displayName=Bue;function Kue(e){return Hue.includes(e)}var Gue=j$;function P$({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return j.jsx(Gue,{"data-slot":"separator",decorative:n,orientation:t,className:$t("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function Zue({id:e,title:t,uiSchema:n,optionalDataControl:r}){const i=ct(n);let s=j.jsx("h5",{children:i.title||t});return r&&(s=j.jsxs("div",{className:"flex flex-row",children:[j.jsx("div",{className:"flex-grow",children:s}),j.jsx("div",{className:"flex",children:r})]})),j.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[s,j.jsx(P$,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Wue({classNames:e,style:t,children:n,disabled:r,id:i,label:s,displayLabel:l,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:d,readonly:h,required:p,schema:g,uiSchema:x,registry:y}){const{templates:T,translateString:w}=y,{RemoveButton:S}=T.ButtonTemplates,v=w(It.KeyLabel,[s]);if(!(Rs in g))return j.jsx("div",{className:e,style:t,children:n});const C=l?22+(d?-28:0):0,_=`${i}-key`;return j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[j.jsx("div",{className:"grid gap-2 col-span-5",children:j.jsxs("div",{className:"flex flex-col gap-2",children:[l&&j.jsx("label",{htmlFor:_,className:"text-sm font-medium text-muted-foreground leading-none",children:v}),j.jsx("div",{className:"pl-0.5",children:j.jsx(k$,{required:p,defaultValue:s,disabled:r||h,id:_,name:_,onBlur:h?void 0:u,type:"text",className:"w-full border shadow-sm"})}),!!d&&j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:j.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),j.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),j.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${C}px`},children:j.jsx(S,{id:Lo(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||h,onClick:c,uiSchema:x,registry:y})})]}),j.jsx(P$,{dir:"horizontal",className:"mt-2"})]})}function Yue(){return{ArrayFieldItemTemplate:xue,ArrayFieldTemplate:_ue,BaseInputTemplate:Eue,ButtonTemplates:{AddButton:wue,CopyButton:Nue,MoveDownButton:$ue,MoveUpButton:Iue,RemoveButton:M$,SubmitButton:Vue},DescriptionFieldTemplate:Cue,ErrorListTemplate:kue,FieldErrorTemplate:Mue,FieldHelpTemplate:jue,FieldTemplate:Pue,GridTemplate:Due,MultiSchemaFieldTemplate:zue,ObjectFieldTemplate:Fue,OptionalDataControlsTemplate:Lue,TitleFieldTemplate:Zue,WrapIfAdditionalTemplate:Wue}}function Xue(e,t){const n=k.createContext(t),r=s=>{const{children:l,...c}=s,u=k.useMemo(()=>c,Object.values(c));return j.jsx(n.Provider,{value:u,children:l})};r.displayName=e+"Provider";function i(s){const l=k.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function fc(e,t=[]){let n=[];function r(s,l){const c=k.createContext(l),u=n.length;n=[...n,l];const d=p=>{const{scope:g,children:x,...y}=p,T=g?.[e]?.[u]||c,w=k.useMemo(()=>y,Object.values(y));return j.jsx(T.Provider,{value:w,children:x})};d.displayName=s+"Provider";function h(p,g){const x=g?.[e]?.[u]||c,y=k.useContext(x);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,h]}const i=()=>{const s=n.map(l=>k.createContext(l));return function(c){const u=c?.[e]||s;return k.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return i.scopeName=e,[r,Que(i,...t)]}function Que(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((c,{useScope:u,scopeName:d})=>{const p=u(s)[`__scope${d}`];return{...c,...p}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Nn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var Ku=globalThis?.document?k.useLayoutEffect:()=>{},Jue=of[" useInsertionEffect ".trim().toString()]||Ku;function Bh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,l]=efe({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:i;{const h=k.useRef(e!==void 0);k.useEffect(()=>{const p=h.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=c},[c,r])}const d=k.useCallback(h=>{if(c){const p=tfe(h)?h(e):h;p!==e&&l.current?.(p)}else s(h)},[c,e,s,l]);return[u,d]}function efe({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),i=k.useRef(n),s=k.useRef(t);return Jue(()=>{s.current=t},[t]),k.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}function tfe(e){return typeof e=="function"}function _E(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function EE(e){const[t,n]=k.useState(void 0);return Ku(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let l,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function nfe(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var bf=e=>{const{present:t,children:n}=e,r=rfe(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=rr(r.ref,ife(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:s}):null};bf.displayName="Presence";function rfe(e){const[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),l=e?"mounted":"unmounted",[c,u]=nfe(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const d=lg(r.current);s.current=c==="mounted"?d:"none"},[c]),Ku(()=>{const d=r.current,h=i.current;if(h!==e){const g=s.current,x=lg(d);e?u("MOUNT"):x==="none"||d?.display==="none"?u("UNMOUNT"):u(h&&g!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Ku(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,p=x=>{const T=lg(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&T&&(u("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=x=>{x.target===t&&(s.current=lg(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:k.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function lg(e){return e?.animationName||"none"}function ife(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Sy(e){const t=ofe(e),n=k.forwardRef((r,i)=>{const{children:s,...l}=r,c=k.Children.toArray(s),u=c.find(afe);if(u){const d=u.props.children,h=c.map(p=>p===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:p);return j.jsx(t,{...l,ref:i,children:k.isValidElement(d)?k.cloneElement(d,void 0,h):null})}return j.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function ofe(e){const t=k.forwardRef((n,r)=>{const{children:i,...s}=n;if(k.isValidElement(i)){const l=cfe(i),c=lfe(s,i.props);return i.type!==k.Fragment&&(c.ref=r?Va(r,l):l),k.cloneElement(i,c)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sfe=Symbol("radix.slottable");function afe(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sfe}function lfe(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const u=s(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function cfe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ufe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zn=ufe.reduce((e,t)=>{const n=Sy(`Primitive.${t}`),r=k.forwardRef((i,s)=>{const{asChild:l,...c}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ffe(e,t){e&&Wo.flushSync(()=>e.dispatchEvent(t))}var y0="Checkbox",[dfe]=fc(y0),[hfe,CE]=dfe(y0);function pfe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:l,name:c,onCheckedChange:u,required:d,value:h="on",internal_do_not_use_render:p}=e,[g,x]=Bh({prop:n,defaultProp:i??!1,onChange:u,caller:y0}),[y,T]=k.useState(null),[w,S]=k.useState(null),v=k.useRef(!1),E=y?!!l||!!y.closest("form"):!0,b={checked:g,disabled:s,setChecked:x,control:y,setControl:T,name:c,form:l,value:h,hasConsumerStoppedPropagationRef:v,required:d,defaultChecked:ja(i)?!1:i,isFormControl:E,bubbleInput:w,setBubbleInput:S};return j.jsx(hfe,{scope:t,...b,children:mfe(p)?p(b):r})}var D$="CheckboxTrigger",N$=k.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:l,disabled:c,checked:u,required:d,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:x,bubbleInput:y}=CE(D$,e),T=rr(i,h),w=k.useRef(u);return k.useEffect(()=>{const S=s?.form;if(S){const v=()=>p(w.current);return S.addEventListener("reset",v),()=>S.removeEventListener("reset",v)}},[s,p]),j.jsx(Zn.button,{type:"button",role:"checkbox","aria-checked":ja(u)?"mixed":u,"aria-required":d,"data-state":V$(u),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:T,onKeyDown:Nn(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Nn(n,S=>{p(v=>ja(v)?!0:!v),y&&x&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})});N$.displayName=D$;var $$=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:c,value:u,onCheckedChange:d,form:h,...p}=e;return j.jsx(pfe,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:c,required:l,onCheckedChange:d,name:r,form:h,value:u,internal_do_not_use_render:({isFormControl:g})=>j.jsxs(j.Fragment,{children:[j.jsx(N$,{...p,ref:t,__scopeCheckbox:n}),g&&j.jsx(L$,{__scopeCheckbox:n})]})})});$$.displayName=y0;var I$="CheckboxIndicator",z$=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=CE(I$,n);return j.jsx(bf,{present:r||ja(s.checked)||s.checked===!0,children:j.jsx(Zn.span,{"data-state":V$(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});z$.displayName=I$;var F$="CheckboxBubbleInput",L$=k.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:l,required:c,disabled:u,name:d,value:h,form:p,bubbleInput:g,setBubbleInput:x}=CE(F$,e),y=rr(n,x),T=_E(s),w=EE(r);k.useEffect(()=>{const v=g;if(!v)return;const E=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(E,"checked").set,_=!i.current;if(T!==s&&C){const A=new Event("click",{bubbles:_});v.indeterminate=ja(s),C.call(v,ja(s)?!1:s),v.dispatchEvent(A)}},[g,T,s,i]);const S=k.useRef(ja(s)?!1:s);return j.jsx(Zn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??S.current,required:c,disabled:u,name:d,value:h,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});L$.displayName=F$;function mfe(e){return typeof e=="function"}function ja(e){return e==="indeterminate"}function V$(e){return ja(e)?"indeterminate":e?"checked":"unchecked"}function gfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var yfe=["color"],vfe=k.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=gfe(e,yfe);return k.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),k.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function U$({className:e,...t}){return j.jsx($$,{"data-slot":"checkbox",className:$t("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:j.jsx(z$,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:j.jsx(vfe,{className:"size-3.5"})})})}var bfe="Label",q$=k.forwardRef((e,t)=>j.jsx(ts.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));q$.displayName=bfe;var Sfe=q$;function TE({className:e,...t}){return j.jsx(Sfe,{"data-slot":"label",className:$t("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function wfe(e){const{id:t,htmlName:n,value:r,disabled:i,readonly:s,label:l,hideLabel:c,schema:u,autofocus:d,options:h,onChange:p,onBlur:g,onFocus:x,registry:y,uiSchema:T,className:w}=e,S=Vd(u),v=yt("DescriptionFieldTemplate",y,h),E=A=>p(A),b=()=>g(t,r),C=()=>x(t,r),_=h.description||u.description;return j.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":vi(t),children:[!c&&_&&j.jsx(v,{id:cc(t),description:_,schema:u,uiSchema:T,registry:y}),j.jsxs("div",{className:"flex items-center gap-2 my-2",children:[j.jsx(U$,{id:t,name:n||t,checked:typeof r>"u"?!1:!!r,required:S,disabled:i||s,autoFocus:d,onCheckedChange:E,onBlur:b,onFocus:C,className:w}),j.jsx(TE,{className:"leading-tight",htmlFor:t,children:a$(l,c||!l)})]})]})}function xfe({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:s,readonly:l,required:c,onChange:u,onBlur:d,onFocus:h,className:p}){const{enumOptions:g,enumDisabled:x,inline:y,emptyValue:T}=r,w=Array.isArray(i)?i:[i],S=({target:E})=>d(e,xr(E&&E.value,g,T)),v=({target:E})=>h(e,xr(E&&E.value,g,T));return j.jsx("div",{className:$t({"flex flex-col gap-2":!y,"flex flex-row gap-4 flex-wrap":y}),children:Array.isArray(g)&&g.map((E,b)=>{const C=Lh(E.value,w),_=Array.isArray(x)&&x.indexOf(E.value)!==-1,A=ql(e,b);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(U$,{id:A,name:t||e,required:c,disabled:n||_||l,onCheckedChange:M=>{u(M?n$(b,w,g):e$(b,w,g))},className:p,checked:C,autoFocus:s&&b===0,onBlur:S,onFocus:v,"aria-describedby":vi(e)}),j.jsx(TE,{className:"leading-tight",htmlFor:ql(e,b),children:E.label})]},A)})})}function B$(e){const t=e+"CollectionProvider",[n,r]=fc(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=T=>{const{scope:w,children:S}=T,v=ki.useRef(null),E=ki.useRef(new Map).current;return j.jsx(i,{scope:w,itemMap:E,collectionRef:v,children:S})};l.displayName=t;const c=e+"CollectionSlot",u=Sy(c),d=ki.forwardRef((T,w)=>{const{scope:S,children:v}=T,E=s(c,S),b=rr(w,E.collectionRef);return j.jsx(u,{ref:b,children:v})});d.displayName=c;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=Sy(h),x=ki.forwardRef((T,w)=>{const{scope:S,children:v,...E}=T,b=ki.useRef(null),C=rr(w,b),_=s(h,S);return ki.useEffect(()=>(_.itemMap.set(b,{ref:b,...E}),()=>void _.itemMap.delete(b))),j.jsx(g,{[p]:"",ref:C,children:v})});x.displayName=h;function y(T){const w=s(e+"CollectionConsumer",T);return ki.useCallback(()=>{const v=w.collectionRef.current;if(!v)return[];const E=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((_,A)=>E.indexOf(_.ref.current)-E.indexOf(A.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},y,r]}var _fe=of[" useId ".trim().toString()]||(()=>{}),Efe=0;function Ho(e){const[t,n]=k.useState(_fe());return Ku(()=>{n(r=>r??String(Efe++))},[e]),t?`radix-${t}`:""}function Gu(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}var Cfe=k.createContext(void 0);function RE(e){const t=k.useContext(Cfe);return e||t||"ltr"}var nS="rovingFocusGroup.onEntryFocus",Tfe={bubbles:!1,cancelable:!0},Hh="RovingFocusGroup",[Bw,H$,Rfe]=B$(Hh),[Afe,K$]=fc(Hh,[Rfe]),[Ofe,kfe]=Afe(Hh),G$=k.forwardRef((e,t)=>j.jsx(Bw.Provider,{scope:e.__scopeRovingFocusGroup,children:j.jsx(Bw.Slot,{scope:e.__scopeRovingFocusGroup,children:j.jsx(Mfe,{...e,ref:t})})}));G$.displayName=Hh;var Mfe=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...p}=e,g=k.useRef(null),x=rr(t,g),y=RE(s),[T,w]=Bh({prop:l,defaultProp:c??null,onChange:u,caller:Hh}),[S,v]=k.useState(!1),E=Gu(d),b=H$(n),C=k.useRef(!1),[_,A]=k.useState(0);return k.useEffect(()=>{const M=g.current;if(M)return M.addEventListener(nS,E),()=>M.removeEventListener(nS,E)},[E]),j.jsx(Ofe,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:T,onItemFocus:k.useCallback(M=>w(M),[w]),onItemShiftTab:k.useCallback(()=>v(!0),[]),onFocusableItemAdd:k.useCallback(()=>A(M=>M+1),[]),onFocusableItemRemove:k.useCallback(()=>A(M=>M-1),[]),children:j.jsx(Zn.div,{tabIndex:S||_===0?-1:0,"data-orientation":r,...p,ref:x,style:{outline:"none",...e.style},onMouseDown:Nn(e.onMouseDown,()=>{C.current=!0}),onFocus:Nn(e.onFocus,M=>{const P=!C.current;if(M.target===M.currentTarget&&P&&!S){const I=new CustomEvent(nS,Tfe);if(M.currentTarget.dispatchEvent(I),!I.defaultPrevented){const z=b().filter(H=>H.focusable),q=z.find(H=>H.active),K=z.find(H=>H.id===T),Y=[q,K,...z].filter(Boolean).map(H=>H.ref.current);Y$(Y,h)}}C.current=!1}),onBlur:Nn(e.onBlur,()=>v(!1))})})}),Z$="RovingFocusGroupItem",W$=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:l,...c}=e,u=Ho(),d=s||u,h=kfe(Z$,n),p=h.currentTabStopId===d,g=H$(n),{onFocusableItemAdd:x,onFocusableItemRemove:y,currentTabStopId:T}=h;return k.useEffect(()=>{if(r)return x(),()=>y()},[r,x,y]),j.jsx(Bw.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:j.jsx(Zn.span,{tabIndex:p?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:Nn(e.onMouseDown,w=>{r?h.onItemFocus(d):w.preventDefault()}),onFocus:Nn(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:Nn(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){h.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const S=Dfe(w,h.orientation,h.dir);if(S!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=g().filter(b=>b.focusable).map(b=>b.ref.current);if(S==="last")E.reverse();else if(S==="prev"||S==="next"){S==="prev"&&E.reverse();const b=E.indexOf(w.currentTarget);E=h.loop?Nfe(E,b+1):E.slice(b+1)}setTimeout(()=>Y$(E))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:T!=null}):l})})});W$.displayName=Z$;var jfe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Pfe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Dfe(e,t,n){const r=Pfe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jfe[r]}function Y$(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Nfe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $fe=G$,Ife=W$,AE="Radio",[zfe,X$]=fc(AE),[Ffe,Lfe]=zfe(AE),Q$=k.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:s,disabled:l,value:c="on",onCheck:u,form:d,...h}=e,[p,g]=k.useState(null),x=rr(t,w=>g(w)),y=k.useRef(!1),T=p?d||!!p.closest("form"):!0;return j.jsxs(Ffe,{scope:n,checked:i,disabled:l,children:[j.jsx(Zn.button,{type:"button",role:"radio","aria-checked":i,"data-state":nI(i),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:x,onClick:Nn(e.onClick,w=>{i||u?.(),T&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),T&&j.jsx(tI,{control:p,bubbles:!y.current,name:r,value:c,checked:i,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});Q$.displayName=AE;var J$="RadioIndicator",eI=k.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,s=Lfe(J$,n);return j.jsx(bf,{present:r||s.checked,children:j.jsx(Zn.span,{"data-state":nI(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t})})});eI.displayName=J$;var Vfe="RadioBubbleInput",tI=k.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},s)=>{const l=k.useRef(null),c=rr(l,s),u=_E(n),d=EE(t);return k.useEffect(()=>{const h=l.current;if(!h)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&x){const y=new Event("click",{bubbles:r});x.call(h,n),h.dispatchEvent(y)}},[u,n,r]),j.jsx(Zn.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tI.displayName=Vfe;function nI(e){return e?"checked":"unchecked"}var Ufe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],v0="RadioGroup",[qfe]=fc(v0,[K$,X$]),rI=K$(),iI=X$(),[Bfe,Hfe]=qfe(v0),oI=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:s,required:l=!1,disabled:c=!1,orientation:u,dir:d,loop:h=!0,onValueChange:p,...g}=e,x=rI(n),y=RE(d),[T,w]=Bh({prop:s,defaultProp:i??null,onChange:p,caller:v0});return j.jsx(Bfe,{scope:n,name:r,required:l,disabled:c,value:T,onValueChange:w,children:j.jsx($fe,{asChild:!0,...x,orientation:u,dir:y,loop:h,children:j.jsx(Zn.div,{role:"radiogroup","aria-required":l,"aria-orientation":u,"data-disabled":c?"":void 0,dir:y,...g,ref:t})})})});oI.displayName=v0;var sI="RadioGroupItem",aI=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,s=Hfe(sI,n),l=s.disabled||r,c=rI(n),u=iI(n),d=k.useRef(null),h=rr(t,d),p=s.value===i.value,g=k.useRef(!1);return k.useEffect(()=>{const x=T=>{Ufe.includes(T.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",x),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",x),document.removeEventListener("keyup",y)}},[]),j.jsx(Ife,{asChild:!0,...c,focusable:!l,active:p,children:j.jsx(Q$,{disabled:l,required:s.required,checked:p,...u,...i,name:s.name,ref:h,onCheck:()=>s.onValueChange(i.value),onKeyDown:Nn(x=>{x.key==="Enter"&&x.preventDefault()}),onFocus:Nn(i.onFocus,()=>{g.current&&d.current?.click()})})})});aI.displayName=sI;var Kfe="RadioGroupIndicator",lI=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=iI(n);return j.jsx(eI,{...i,...r,ref:t})});lI.displayName=Kfe;var Gfe=oI,Zfe=aI,Wfe=lI;function Yfe({className:e,...t}){return j.jsx(Gfe,{"data-slot":"radio-group",className:$t("grid gap-3",e),...t})}function Xfe({className:e,...t}){return j.jsx(Zfe,{"data-slot":"radio-group-item",className:$t("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:j.jsx(Wfe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:j.jsx(fue,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function Qfe({id:e,options:t,value:n,required:r,disabled:i,readonly:s,onChange:l,onBlur:c,onFocus:u,className:d}){const{enumOptions:h,enumDisabled:p,emptyValue:g}=t,x=S=>l(xr(S,h,g)),y=({target:S})=>c(e,xr(S&&S.value,h,g)),T=({target:S})=>u(e,xr(S&&S.value,h,g)),w=!!(t&&t.inline);return j.jsx("div",{className:"mb-0",children:j.jsx(Yfe,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:S=>{x(S)},onBlur:y,onFocus:T,"aria-describedby":vi(e),orientation:w?"horizontal":"vertical",className:$t("flex flex-wrap",{"flex-col":!w},d),children:Array.isArray(h)&&h.map((S,v)=>{const E=Array.isArray(p)&&p.indexOf(S.value)!==-1,b=Lh(S.value,n);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Xfe,{checked:b,value:v.toString(),id:ql(e,v),disabled:E}),j.jsx(TE,{className:"leading-tight",htmlFor:ql(e,v),children:S.label})]},ql(e,v))})})})}function cI(e,[t,n]){return Math.min(n,Math.max(t,e))}var uI=["PageUp","PageDown"],fI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dI={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Sf="Slider",[Hw,Jfe,ede]=B$(Sf),[hI]=fc(Sf,[ede]),[tde,b0]=hI(Sf),pI=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[r],value:h,onValueChange:p=()=>{},onValueCommit:g=()=>{},inverted:x=!1,form:y,...T}=e,w=k.useRef(new Set),S=k.useRef(0),E=l==="horizontal"?nde:rde,[b=[],C]=Bh({prop:h,defaultProp:d,onChange:z=>{[...w.current][S.current]?.focus(),p(z)}}),_=k.useRef(b);function A(z){const q=lde(b,z);I(z,q)}function M(z){I(z,S.current)}function P(){const z=_.current[S.current];b[S.current]!==z&&g(b)}function I(z,q,{commit:K}={commit:!1}){const X=dde(s),Y=hde(Math.round((z-r)/s)*s+r,X),H=cI(Y,[r,i]);C((Z=[])=>{const ee=sde(Z,H,q);if(fde(ee,u*s)){S.current=ee.indexOf(H);const ae=String(ee)!==String(Z);return ae&&K&&g(ee),ae?ee:Z}else return Z})}return j.jsx(tde,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:i,valueIndexToChangeRef:S,thumbs:w.current,values:b,orientation:l,form:y,children:j.jsx(Hw.Provider,{scope:e.__scopeSlider,children:j.jsx(Hw.Slot,{scope:e.__scopeSlider,children:j.jsx(E,{"aria-disabled":c,"data-disabled":c?"":void 0,...T,ref:t,onPointerDown:Nn(T.onPointerDown,()=>{c||(_.current=b)}),min:r,max:i,inverted:x,onSlideStart:c?void 0:A,onSlideMove:c?void 0:M,onSlideEnd:c?void 0:P,onHomeKeyDown:()=>!c&&I(r,0,{commit:!0}),onEndKeyDown:()=>!c&&I(i,b.length-1,{commit:!0}),onStepKeyDown:({event:z,direction:q})=>{if(!c){const Y=uI.includes(z.key)||z.shiftKey&&fI.includes(z.key)?10:1,H=S.current,Z=b[H],ee=s*Y*q;I(Z+ee,H,{commit:!0})}}})})})})});pI.displayName=Sf;var[mI,gI]=hI(Sf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),nde=k.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:d,...h}=e,[p,g]=k.useState(null),x=rr(t,E=>g(E)),y=k.useRef(void 0),T=RE(i),w=T==="ltr",S=w&&!s||!w&&s;function v(E){const b=y.current||p.getBoundingClientRect(),C=[0,b.width],A=OE(C,S?[n,r]:[r,n]);return y.current=b,A(E-b.left)}return j.jsx(mI,{scope:e.__scopeSlider,startEdge:S?"left":"right",endEdge:S?"right":"left",direction:S?1:-1,size:"width",children:j.jsx(yI,{dir:T,"data-orientation":"horizontal",...h,ref:x,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const b=v(E.clientX);l?.(b)},onSlideMove:E=>{const b=v(E.clientX);c?.(b)},onSlideEnd:()=>{y.current=void 0,u?.()},onStepKeyDown:E=>{const C=dI[S?"from-left":"from-right"].includes(E.key);d?.({event:E,direction:C?-1:1})}})})}),rde=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,h=k.useRef(null),p=rr(t,h),g=k.useRef(void 0),x=!i;function y(T){const w=g.current||h.current.getBoundingClientRect(),S=[0,w.height],E=OE(S,x?[r,n]:[n,r]);return g.current=w,E(T-w.top)}return j.jsx(mI,{scope:e.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:j.jsx(yI,{"data-orientation":"vertical",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:T=>{const w=y(T.clientY);s?.(w)},onSlideMove:T=>{const w=y(T.clientY);l?.(w)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:T=>{const S=dI[x?"from-bottom":"from-top"].includes(T.key);u?.({event:T,direction:S?-1:1})}})})}),yI=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:c,onStepKeyDown:u,...d}=e,h=b0(Sf,n);return j.jsx(Zn.span,{...d,ref:t,onKeyDown:Nn(e.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(c(p),p.preventDefault()):uI.concat(fI).includes(p.key)&&(u(p),p.preventDefault())}),onPointerDown:Nn(e.onPointerDown,p=>{const g=p.target;g.setPointerCapture(p.pointerId),p.preventDefault(),h.thumbs.has(g)?g.focus():r(p)}),onPointerMove:Nn(e.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&i(p)}),onPointerUp:Nn(e.onPointerUp,p=>{const g=p.target;g.hasPointerCapture(p.pointerId)&&(g.releasePointerCapture(p.pointerId),s(p))})})}),vI="SliderTrack",bI=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=b0(vI,n);return j.jsx(Zn.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});bI.displayName=vI;var Kw="SliderRange",SI=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=b0(Kw,n),s=gI(Kw,n),l=k.useRef(null),c=rr(t,l),u=i.values.length,d=i.values.map(g=>_I(g,i.min,i.max)),h=u>1?Math.min(...d):0,p=100-Math.max(...d);return j.jsx(Zn.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:c,style:{...e.style,[s.startEdge]:h+"%",[s.endEdge]:p+"%"}})});SI.displayName=Kw;var Gw="SliderThumb",wI=k.forwardRef((e,t)=>{const n=Jfe(e.__scopeSlider),[r,i]=k.useState(null),s=rr(t,c=>i(c)),l=k.useMemo(()=>r?n().findIndex(c=>c.ref.current===r):-1,[n,r]);return j.jsx(ide,{...e,ref:s,index:l})}),ide=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...s}=e,l=b0(Gw,n),c=gI(Gw,n),[u,d]=k.useState(null),h=rr(t,v=>d(v)),p=u?l.form||!!u.closest("form"):!0,g=EE(u),x=l.values[r],y=x===void 0?0:_I(x,l.min,l.max),T=ade(r,l.values.length),w=g?.[c.size],S=w?cde(w,y,c.direction):0;return k.useEffect(()=>{if(u)return l.thumbs.add(u),()=>{l.thumbs.delete(u)}},[u,l.thumbs]),j.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${y}% + ${S}px)`},children:[j.jsx(Hw.ItemSlot,{scope:e.__scopeSlider,children:j.jsx(Zn.span,{role:"slider","aria-label":e["aria-label"]||T,"aria-valuemin":l.min,"aria-valuenow":x,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...s,ref:h,style:x===void 0?{display:"none"}:e.style,onFocus:Nn(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),p&&j.jsx(xI,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:x},r)]})});wI.displayName=Gw;var ode="RadioBubbleInput",xI=k.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=k.useRef(null),s=rr(i,r),l=_E(t);return k.useEffect(()=>{const c=i.current;if(!c)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(l!==t&&h){const p=new Event("input",{bubbles:!0});h.call(c,t),c.dispatchEvent(p)}},[l,t]),j.jsx(Zn.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});xI.displayName=ode;function sde(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,s)=>i-s)}function _I(e,t,n){const s=100/(n-t)*(e-t);return cI(s,[0,100])}function ade(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function lde(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function cde(e,t,n){const r=e/2,s=OE([0,50],[0,r]);return(r-s(t)*n)*n}function ude(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function fde(e,t){if(t>0){const n=ude(e);return Math.min(...n)>=t}return!0}function OE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dde(e){return(String(e).split(".")[1]||"").length}function hde(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var pde=pI,mde=bI,gde=SI,yde=wI;function vde({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...s}){const l=k.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return j.jsxs(pde,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:i,className:$t("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...s,children:[j.jsx(mde,{"data-slot":"slider-track",className:$t("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:j.jsx(gde,{"data-slot":"slider-range",className:$t("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:l.length},(c,u)=>j.jsx(yde,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},u))]})}const bde=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Sde({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:s,label:l,id:c}){const u=p=>s(p[0]),d={...i$(i)},h={id:c,...Bx(r.props||{},bde)};return j.jsxs(j.Fragment,{children:[j.jsx(vde,{disabled:n||t,min:d.min,max:d.max,step:d.step,value:[e],onValueChange:u,...h,"aria-describedby":vi(c)}),e]})}var zM=1,wde=.9,xde=.8,_de=.17,rS=.1,iS=.999,Ede=.9999,Cde=.99,Tde=/[\\\/_+.#"@\[\(\{&]/,Rde=/[\\\/_+.#"@\[\(\{&]/g,Ade=/[\s-]/,EI=/[\s-]/g;function Zw(e,t,n,r,i,s,l){if(s===t.length)return i===e.length?zM:Cde;var c=`${i},${s}`;if(l[c]!==void 0)return l[c];for(var u=r.charAt(s),d=n.indexOf(u,i),h=0,p,g,x,y;d>=0;)p=Zw(e,t,n,r,d+1,s+1,l),p>h&&(d===i?p*=zM:Tde.test(e.charAt(d-1))?(p*=xde,x=e.slice(i,d-1).match(Rde),x&&i>0&&(p*=Math.pow(iS,x.length))):Ade.test(e.charAt(d-1))?(p*=wde,y=e.slice(i,d-1).match(EI),y&&i>0&&(p*=Math.pow(iS,y.length))):(p*=_de,i>0&&(p*=Math.pow(iS,d-i))),e.charAt(d)!==t.charAt(s)&&(p*=Ede)),(p<rS&&n.charAt(d-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(d-1)!==r.charAt(s))&&(g=Zw(e,t,n,r,d+1,s+2,l),g*rS>p&&(p=g*rS)),p>h&&(h=p),d=n.indexOf(u,d+1);return l[c]=h,h}function FM(e){return e.toLowerCase().replace(EI," ")}function Ode(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Zw(e,t,FM(e),FM(t),0,0,{})}function kde(e,t=globalThis?.document){const n=Gu(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Mde="DismissableLayer",Ww="dismissableLayer.update",jde="dismissableLayer.pointerDownOutside",Pde="dismissableLayer.focusOutside",LM,CI=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),TI=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=k.useContext(CI),[h,p]=k.useState(null),g=h?.ownerDocument??globalThis?.document,[,x]=k.useState({}),y=rr(t,A=>p(A)),T=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),S=T.indexOf(w),v=h?T.indexOf(h):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,b=v>=S,C=$de(A=>{const M=A.target,P=[...d.branches].some(I=>I.contains(M));!b||P||(i?.(A),l?.(A),A.defaultPrevented||c?.())},g),_=Ide(A=>{const M=A.target;[...d.branches].some(I=>I.contains(M))||(s?.(A),l?.(A),A.defaultPrevented||c?.())},g);return kde(A=>{v===d.layers.size-1&&(r?.(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},g),k.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(LM=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),VM(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=LM)}},[h,g,n,d]),k.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),VM())},[h,d]),k.useEffect(()=>{const A=()=>x({});return document.addEventListener(Ww,A),()=>document.removeEventListener(Ww,A)},[]),j.jsx(Zn.div,{...u,ref:y,style:{pointerEvents:E?b?"auto":"none":void 0,...e.style},onFocusCapture:Nn(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Nn(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Nn(e.onPointerDownCapture,C.onPointerDownCapture)})});TI.displayName=Mde;var Dde="DismissableLayerBranch",Nde=k.forwardRef((e,t)=>{const n=k.useContext(CI),r=k.useRef(null),i=rr(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),j.jsx(Zn.div,{...e,ref:i})});Nde.displayName=Dde;function $de(e,t=globalThis?.document){const n=Gu(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){RI(jde,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ide(e,t=globalThis?.document){const n=Gu(e),r=k.useRef(!1);return k.useEffect(()=>{const i=s=>{s.target&&!r.current&&RI(Pde,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VM(){const e=new CustomEvent(Ww);document.dispatchEvent(e)}function RI(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ffe(i,s):i.dispatchEvent(s)}var oS="focusScope.autoFocusOnMount",sS="focusScope.autoFocusOnUnmount",UM={bubbles:!1,cancelable:!0},zde="FocusScope",AI=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=e,[c,u]=k.useState(null),d=Gu(i),h=Gu(s),p=k.useRef(null),g=rr(t,T=>u(T)),x=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let T=function(E){if(x.paused||!c)return;const b=E.target;c.contains(b)?p.current=b:wa(p.current,{select:!0})},w=function(E){if(x.paused||!c)return;const b=E.relatedTarget;b!==null&&(c.contains(b)||wa(p.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&wa(c)};document.addEventListener("focusin",T),document.addEventListener("focusout",w);const v=new MutationObserver(S);return c&&v.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",w),v.disconnect()}}},[r,c,x.paused]),k.useEffect(()=>{if(c){BM.add(x);const T=document.activeElement;if(!c.contains(T)){const S=new CustomEvent(oS,UM);c.addEventListener(oS,d),c.dispatchEvent(S),S.defaultPrevented||(Fde(Bde(OI(c)),{select:!0}),document.activeElement===T&&wa(c))}return()=>{c.removeEventListener(oS,d),setTimeout(()=>{const S=new CustomEvent(sS,UM);c.addEventListener(sS,h),c.dispatchEvent(S),S.defaultPrevented||wa(T??document.body,{select:!0}),c.removeEventListener(sS,h),BM.remove(x)},0)}}},[c,d,h,x]);const y=k.useCallback(T=>{if(!n&&!r||x.paused)return;const w=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,S=document.activeElement;if(w&&S){const v=T.currentTarget,[E,b]=Lde(v);E&&b?!T.shiftKey&&S===b?(T.preventDefault(),n&&wa(E,{select:!0})):T.shiftKey&&S===E&&(T.preventDefault(),n&&wa(b,{select:!0})):S===v&&T.preventDefault()}},[n,r,x.paused]);return j.jsx(Zn.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});AI.displayName=zde;function Fde(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wa(r,{select:t}),document.activeElement!==n)return}function Lde(e){const t=OI(e),n=qM(t,e),r=qM(t.reverse(),e);return[n,r]}function OI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qM(e,t){for(const n of e)if(!Vde(n,{upTo:t}))return n}function Vde(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ude(e){return e instanceof HTMLInputElement&&"select"in e}function wa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ude(e)&&t&&e.select()}}var BM=qde();function qde(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=HM(e,t),e.unshift(t)},remove(t){e=HM(e,t),e[0]?.resume()}}}function HM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Bde(e){return e.filter(t=>t.tagName!=="A")}var Hde="Portal",kI=k.forwardRef((e,t)=>{const{container:n,...r}=e,[i,s]=k.useState(!1);Ku(()=>s(!0),[]);const l=n||i&&globalThis?.document?.body;return l?Uue.createPortal(j.jsx(Zn.div,{...r,ref:t}),l):null});kI.displayName=Hde;var aS=0;function Kde(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??KM()),document.body.insertAdjacentElement("beforeend",e[1]??KM()),aS++,()=>{aS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),aS--}},[])}function KM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Io=function(){return Io=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Io.apply(this,arguments)};function MI(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Yw(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gde(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],l;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(c){l={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return s}function Zde(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var zg="right-scroll-bar-position",Fg="width-before-scroll-bar",Wde="with-scroll-bars-hidden",Yde="--removed-body-scroll-bar-size";function lS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Xde(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Qde=typeof window<"u"?k.useLayoutEffect:k.useEffect,GM=new WeakMap;function Jde(e,t){var n=Xde(null,function(r){return e.forEach(function(i){return lS(i,r)})});return Qde(function(){var r=GM.get(n);if(r){var i=new Set(r),s=new Set(e),l=n.current;i.forEach(function(c){s.has(c)||lS(c,null)}),s.forEach(function(c){i.has(c)||lS(c,l)})}GM.set(n,e)},[e]),n}function ehe(e){return e}function the(e,t){t===void 0&&(t=ehe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var u=function(){var h=l;l=[],h.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){l.push(h),d()},filter:function(h){return l=l.filter(h),n}}}};return i}function nhe(e){e===void 0&&(e={});var t=the(null);return t.options=Io({async:!0,ssr:!1},e),t}var jI=function(e){var t=e.sideCar,n=MI(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,Io({},n))};jI.isSideCarExport=!0;function rhe(e,t){return e.useMedium(t),jI}var PI=nhe(),cS=function(){},S0=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:cS,onWheelCapture:cS,onTouchMoveCapture:cS}),i=r[0],s=r[1],l=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,h=e.enabled,p=e.shards,g=e.sideCar,x=e.noRelative,y=e.noIsolation,T=e.inert,w=e.allowPinchZoom,S=e.as,v=S===void 0?"div":S,E=e.gapMode,b=MI(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,_=Jde([n,t]),A=Io(Io({},b),i);return k.createElement(k.Fragment,null,h&&k.createElement(C,{sideCar:PI,removeScrollBar:d,shards:p,noRelative:x,noIsolation:y,inert:T,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:E}),l?k.cloneElement(k.Children.only(c),Io(Io({},A),{ref:_})):k.createElement(v,Io({},A,{className:u,ref:_}),c))});S0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};S0.classNames={fullWidth:Fg,zeroRight:zg};var ihe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ohe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ihe();return t&&e.setAttribute("nonce",t),e}function she(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ahe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lhe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ohe())&&(she(t,n),ahe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},che=function(){var e=lhe();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},DI=function(){var e=che(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},uhe={left:0,top:0,right:0,gap:0},uS=function(e){return parseInt(e||"",10)||0},fhe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[uS(n),uS(r),uS(i)]},dhe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uhe;var t=fhe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},hhe=DI(),Cu="data-scroll-locked",phe=function(e,t,n,r){var i=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
64
+ .`.concat(Wde,` {
65
+ overflow: hidden `).concat(r,`;
66
+ padding-right: `).concat(c,"px ").concat(r,`;
67
+ }
68
+ body[`).concat(Cu,`] {
69
+ overflow: hidden `).concat(r,`;
70
+ overscroll-behavior: contain;
71
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
72
+ padding-left: `.concat(i,`px;
73
+ padding-top: `).concat(s,`px;
74
+ padding-right: `).concat(l,`px;
75
+ margin-left:0;
76
+ margin-top:0;
77
+ margin-right: `).concat(c,"px ").concat(r,`;
78
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
79
+ }
80
+
81
+ .`).concat(zg,` {
82
+ right: `).concat(c,"px ").concat(r,`;
83
+ }
84
+
85
+ .`).concat(Fg,` {
86
+ margin-right: `).concat(c,"px ").concat(r,`;
87
+ }
88
+
89
+ .`).concat(zg," .").concat(zg,` {
90
+ right: 0 `).concat(r,`;
91
+ }
92
+
93
+ .`).concat(Fg," .").concat(Fg,` {
94
+ margin-right: 0 `).concat(r,`;
95
+ }
96
+
97
+ body[`).concat(Cu,`] {
98
+ `).concat(Yde,": ").concat(c,`px;
99
+ }
100
+ `)},ZM=function(){var e=parseInt(document.body.getAttribute(Cu)||"0",10);return isFinite(e)?e:0},mhe=function(){k.useEffect(function(){return document.body.setAttribute(Cu,(ZM()+1).toString()),function(){var e=ZM()-1;e<=0?document.body.removeAttribute(Cu):document.body.setAttribute(Cu,e.toString())}},[])},ghe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;mhe();var s=k.useMemo(function(){return dhe(i)},[i]);return k.createElement(hhe,{styles:phe(s,!t,i,n?"":"!important")})},Xw=!1;if(typeof window<"u")try{var cg=Object.defineProperty({},"passive",{get:function(){return Xw=!0,!0}});window.addEventListener("test",cg,cg),window.removeEventListener("test",cg,cg)}catch{Xw=!1}var eu=Xw?{passive:!1}:!1,yhe=function(e){return e.tagName==="TEXTAREA"},NI=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yhe(e)&&n[t]==="visible")},vhe=function(e){return NI(e,"overflowY")},bhe=function(e){return NI(e,"overflowX")},WM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=$I(e,r);if(i){var s=II(e,r),l=s[1],c=s[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},She=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},whe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$I=function(e,t){return e==="v"?vhe(t):bhe(t)},II=function(e,t){return e==="v"?She(t):whe(t)},xhe=function(e,t){return e==="h"&&t==="rtl"?-1:1},_he=function(e,t,n,r,i){var s=xhe(e,window.getComputedStyle(t).direction),l=s*r,c=n.target,u=t.contains(c),d=!1,h=l>0,p=0,g=0;do{if(!c)break;var x=II(e,c),y=x[0],T=x[1],w=x[2],S=T-w-s*y;(y||S)&&$I(e,c)&&(p+=S,g+=y);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(h&&Math.abs(p)<1||!h&&Math.abs(g)<1)&&(d=!0),d},ug=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},YM=function(e){return[e.deltaX,e.deltaY]},XM=function(e){return e&&"current"in e?e.current:e},Ehe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Che=function(e){return`
101
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
102
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
103
+ `)},The=0,tu=[];function Rhe(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),i=k.useState(The++)[0],s=k.useState(DI)[0],l=k.useRef(e);k.useEffect(function(){l.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var T=Zde([e.lockRef.current],(e.shards||[]).map(XM),!0).filter(Boolean);return T.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),T.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=k.useCallback(function(T,w){if("touches"in T&&T.touches.length===2||T.type==="wheel"&&T.ctrlKey)return!l.current.allowPinchZoom;var S=ug(T),v=n.current,E="deltaX"in T?T.deltaX:v[0]-S[0],b="deltaY"in T?T.deltaY:v[1]-S[1],C,_=T.target,A=Math.abs(E)>Math.abs(b)?"h":"v";if("touches"in T&&A==="h"&&_.type==="range")return!1;var M=window.getSelection(),P=M&&M.anchorNode,I=P?P===_||P.contains(_):!1;if(I)return!1;var z=WM(A,_);if(!z)return!0;if(z?C=A:(C=A==="v"?"h":"v",z=WM(A,_)),!z)return!1;if(!r.current&&"changedTouches"in T&&(E||b)&&(r.current=C),!C)return!0;var q=r.current||C;return _he(q,w,T,q==="h"?E:b)},[]),u=k.useCallback(function(T){var w=T;if(!(!tu.length||tu[tu.length-1]!==s)){var S="deltaY"in w?YM(w):ug(w),v=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&Ehe(C.delta,S)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var E=(l.current.shards||[]).map(XM).filter(Boolean).filter(function(C){return C.contains(w.target)}),b=E.length>0?c(w,E[0]):!l.current.noIsolation;b&&w.cancelable&&w.preventDefault()}}},[]),d=k.useCallback(function(T,w,S,v){var E={name:T,delta:w,target:S,should:v,shadowParent:Ahe(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(b){return b!==E})},1)},[]),h=k.useCallback(function(T){n.current=ug(T),r.current=void 0},[]),p=k.useCallback(function(T){d(T.type,YM(T),T.target,c(T,e.lockRef.current))},[]),g=k.useCallback(function(T){d(T.type,ug(T),T.target,c(T,e.lockRef.current))},[]);k.useEffect(function(){return tu.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,eu),document.addEventListener("touchmove",u,eu),document.addEventListener("touchstart",h,eu),function(){tu=tu.filter(function(T){return T!==s}),document.removeEventListener("wheel",u,eu),document.removeEventListener("touchmove",u,eu),document.removeEventListener("touchstart",h,eu)}},[]);var x=e.removeScrollBar,y=e.inert;return k.createElement(k.Fragment,null,y?k.createElement(s,{styles:Che(i)}):null,x?k.createElement(ghe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ahe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ohe=rhe(PI,Rhe);var zI=k.forwardRef(function(e,t){return k.createElement(S0,Io({},e,{ref:t,sideCar:Ohe}))});zI.classNames=S0.classNames;var khe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nu=new WeakMap,fg=new WeakMap,dg={},fS=0,FI=function(e){return e&&(e.host||FI(e.parentNode))},Mhe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FI(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},jhe=function(e,t,n,r){var i=Mhe(t,Array.isArray(e)?e:[e]);dg[n]||(dg[n]=new WeakMap);var s=dg[n],l=[],c=new Set,u=new Set(i),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};i.forEach(d);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(c.has(g))h(g);else try{var x=g.getAttribute(r),y=x!==null&&x!=="false",T=(nu.get(g)||0)+1,w=(s.get(g)||0)+1;nu.set(g,T),s.set(g,w),l.push(g),T===1&&y&&fg.set(g,!0),w===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return h(t),c.clear(),fS++,function(){l.forEach(function(p){var g=nu.get(p)-1,x=s.get(p)-1;nu.set(p,g),s.set(p,x),g||(fg.has(p)||p.removeAttribute(r),fg.delete(p)),x||p.removeAttribute(n)}),fS--,fS||(nu=new WeakMap,nu=new WeakMap,fg=new WeakMap,dg={})}},Phe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=khe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),jhe(r,i,n,"aria-hidden")):function(){return null}},w0="Dialog",[LI]=fc(w0),[Dhe,Eo]=LI(w0),VI=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=k.useRef(null),u=k.useRef(null),[d,h]=Bh({prop:r,defaultProp:i??!1,onChange:s,caller:w0});return j.jsx(Dhe,{scope:t,triggerRef:c,contentRef:u,contentId:Ho(),titleId:Ho(),descriptionId:Ho(),open:d,onOpenChange:h,onOpenToggle:k.useCallback(()=>h(p=>!p),[h]),modal:l,children:n})};VI.displayName=w0;var UI="DialogTrigger",Nhe=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Eo(UI,n),s=rr(t,i.triggerRef);return j.jsx(Zn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jE(i.open),...r,ref:s,onClick:Nn(e.onClick,i.onOpenToggle)})});Nhe.displayName=UI;var kE="DialogPortal",[$he,qI]=LI(kE,{forceMount:void 0}),BI=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Eo(kE,t);return j.jsx($he,{scope:t,forceMount:n,children:k.Children.map(r,l=>j.jsx(bf,{present:n||s.open,children:j.jsx(kI,{asChild:!0,container:i,children:l})}))})};BI.displayName=kE;var wy="DialogOverlay",HI=k.forwardRef((e,t)=>{const n=qI(wy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Eo(wy,e.__scopeDialog);return s.modal?j.jsx(bf,{present:r||s.open,children:j.jsx(zhe,{...i,ref:t})}):null});HI.displayName=wy;var Ihe=Sy("DialogOverlay.RemoveScroll"),zhe=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Eo(wy,n);return j.jsx(zI,{as:Ihe,allowPinchZoom:!0,shards:[i.contentRef],children:j.jsx(Zn.div,{"data-state":jE(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xl="DialogContent",KI=k.forwardRef((e,t)=>{const n=qI(Xl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Eo(Xl,e.__scopeDialog);return j.jsx(bf,{present:r||s.open,children:s.modal?j.jsx(Fhe,{...i,ref:t}):j.jsx(Lhe,{...i,ref:t})})});KI.displayName=Xl;var Fhe=k.forwardRef((e,t)=>{const n=Eo(Xl,e.__scopeDialog),r=k.useRef(null),i=rr(t,n.contentRef,r);return k.useEffect(()=>{const s=r.current;if(s)return Phe(s)},[]),j.jsx(GI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nn(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Nn(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&s.preventDefault()}),onFocusOutside:Nn(e.onFocusOutside,s=>s.preventDefault())})}),Lhe=k.forwardRef((e,t)=>{const n=Eo(Xl,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return j.jsx(GI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;n.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),GI=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...l}=e,c=Eo(Xl,n),u=k.useRef(null),d=rr(t,u);return Kde(),j.jsxs(j.Fragment,{children:[j.jsx(AI,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:j.jsx(TI,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":jE(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),j.jsxs(j.Fragment,{children:[j.jsx(Bhe,{titleId:c.titleId}),j.jsx(Khe,{contentRef:u,descriptionId:c.descriptionId})]})]})}),ME="DialogTitle",Vhe=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Eo(ME,n);return j.jsx(Zn.h2,{id:i.titleId,...r,ref:t})});Vhe.displayName=ME;var ZI="DialogDescription",Uhe=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Eo(ZI,n);return j.jsx(Zn.p,{id:i.descriptionId,...r,ref:t})});Uhe.displayName=ZI;var WI="DialogClose",qhe=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Eo(WI,n);return j.jsx(Zn.button,{type:"button",...r,ref:t,onClick:Nn(e.onClick,()=>i.onOpenChange(!1))})});qhe.displayName=WI;function jE(e){return e?"open":"closed"}var YI="DialogTitleWarning",[j1e,XI]=Xue(YI,{contentName:Xl,titleName:ME,docsSlug:"dialog"}),Bhe=({titleId:e})=>{const t=XI(YI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
104
+
105
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
106
+
107
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Hhe="DialogDescriptionWarning",Khe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XI(Hhe).contentName}}.`;return k.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ghe=VI,Zhe=BI,Whe=HI,Yhe=KI,Ed='[cmdk-group=""]',dS='[cmdk-group-items=""]',Xhe='[cmdk-group-heading=""]',QI='[cmdk-item=""]',QM=`${QI}:not([aria-disabled="true"])`,Qw="cmdk-item-select",su="data-value",Qhe=(e,t,n)=>Ode(e,t,n),JI=k.createContext(void 0),Kh=()=>k.useContext(JI),e9=k.createContext(void 0),PE=()=>k.useContext(e9),t9=k.createContext(void 0),n9=k.forwardRef((e,t)=>{let n=au(()=>{var B,F;return{search:"",value:(F=(B=e.value)!=null?B:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=au(()=>new Set),i=au(()=>new Map),s=au(()=>new Map),l=au(()=>new Set),c=r9(e),{label:u,children:d,value:h,onValueChange:p,filter:g,shouldFilter:x,loop:y,disablePointerSelection:T=!1,vimBindings:w=!0,...S}=e,v=Ho(),E=Ho(),b=Ho(),C=k.useRef(null),_=cpe();Ql(()=>{if(h!==void 0){let B=h.trim();n.current.value=B,A.emit()}},[h]),Ql(()=>{_(6,K)},[]);let A=k.useMemo(()=>({subscribe:B=>(l.current.add(B),()=>l.current.delete(B)),snapshot:()=>n.current,setState:(B,F,D)=>{var V,J,ne,oe;if(!Object.is(n.current[B],F)){if(n.current[B]=F,B==="search")q(),I(),_(1,z);else if(B==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(b);he?he.focus():(V=document.getElementById(v))==null||V.focus()}if(_(7,()=>{var he;n.current.selectedItemId=(he=X())==null?void 0:he.id,A.emit()}),D||_(5,K),((J=c.current)==null?void 0:J.value)!==void 0){let he=F??"";(oe=(ne=c.current).onValueChange)==null||oe.call(ne,he);return}}A.emit()}},emit:()=>{l.current.forEach(B=>B())}}),[]),M=k.useMemo(()=>({value:(B,F,D)=>{var V;F!==((V=s.current.get(B))==null?void 0:V.value)&&(s.current.set(B,{value:F,keywords:D}),n.current.filtered.items.set(B,P(F,D)),_(2,()=>{I(),A.emit()}))},item:(B,F)=>(r.current.add(B),F&&(i.current.has(F)?i.current.get(F).add(B):i.current.set(F,new Set([B]))),_(3,()=>{q(),I(),n.current.value||z(),A.emit()}),()=>{s.current.delete(B),r.current.delete(B),n.current.filtered.items.delete(B);let D=X();_(4,()=>{q(),D?.getAttribute("id")===B&&z(),A.emit()})}),group:B=>(i.current.has(B)||i.current.set(B,new Set),()=>{s.current.delete(B),i.current.delete(B)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:v,inputId:b,labelId:E,listInnerRef:C}),[]);function P(B,F){var D,V;let J=(V=(D=c.current)==null?void 0:D.filter)!=null?V:Qhe;return B?J(B,n.current.search,F):0}function I(){if(!n.current.search||c.current.shouldFilter===!1)return;let B=n.current.filtered.items,F=[];n.current.filtered.groups.forEach(V=>{let J=i.current.get(V),ne=0;J.forEach(oe=>{let he=B.get(oe);ne=Math.max(he,ne)}),F.push([V,ne])});let D=C.current;Y().sort((V,J)=>{var ne,oe;let he=V.getAttribute("id"),Ee=J.getAttribute("id");return((ne=B.get(Ee))!=null?ne:0)-((oe=B.get(he))!=null?oe:0)}).forEach(V=>{let J=V.closest(dS);J?J.appendChild(V.parentElement===J?V:V.closest(`${dS} > *`)):D.appendChild(V.parentElement===D?V:V.closest(`${dS} > *`))}),F.sort((V,J)=>J[1]-V[1]).forEach(V=>{var J;let ne=(J=C.current)==null?void 0:J.querySelector(`${Ed}[${su}="${encodeURIComponent(V[0])}"]`);ne?.parentElement.appendChild(ne)})}function z(){let B=Y().find(D=>D.getAttribute("aria-disabled")!=="true"),F=B?.getAttribute(su);A.setState("value",F||void 0)}function q(){var B,F,D,V;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let ne of r.current){let oe=(F=(B=s.current.get(ne))==null?void 0:B.value)!=null?F:"",he=(V=(D=s.current.get(ne))==null?void 0:D.keywords)!=null?V:[],Ee=P(oe,he);n.current.filtered.items.set(ne,Ee),Ee>0&&J++}for(let[ne,oe]of i.current)for(let he of oe)if(n.current.filtered.items.get(he)>0){n.current.filtered.groups.add(ne);break}n.current.filtered.count=J}function K(){var B,F,D;let V=X();V&&(((B=V.parentElement)==null?void 0:B.firstChild)===V&&((D=(F=V.closest(Ed))==null?void 0:F.querySelector(Xhe))==null||D.scrollIntoView({block:"nearest"})),V.scrollIntoView({block:"nearest"}))}function X(){var B;return(B=C.current)==null?void 0:B.querySelector(`${QI}[aria-selected="true"]`)}function Y(){var B;return Array.from(((B=C.current)==null?void 0:B.querySelectorAll(QM))||[])}function H(B){let F=Y()[B];F&&A.setState("value",F.getAttribute(su))}function Z(B){var F;let D=X(),V=Y(),J=V.findIndex(oe=>oe===D),ne=V[J+B];(F=c.current)!=null&&F.loop&&(ne=J+B<0?V[V.length-1]:J+B===V.length?V[0]:V[J+B]),ne&&A.setState("value",ne.getAttribute(su))}function ee(B){let F=X(),D=F?.closest(Ed),V;for(;D&&!V;)D=B>0?ape(D,Ed):lpe(D,Ed),V=D?.querySelector(QM);V?A.setState("value",V.getAttribute(su)):Z(B)}let ae=()=>H(Y().length-1),re=B=>{B.preventDefault(),B.metaKey?ae():B.altKey?ee(1):Z(1)},$=B=>{B.preventDefault(),B.metaKey?H(0):B.altKey?ee(-1):Z(-1)};return k.createElement(ts.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:B=>{var F;(F=S.onKeyDown)==null||F.call(S,B);let D=B.nativeEvent.isComposing||B.keyCode===229;if(!(B.defaultPrevented||D))switch(B.key){case"n":case"j":{w&&B.ctrlKey&&re(B);break}case"ArrowDown":{re(B);break}case"p":case"k":{w&&B.ctrlKey&&$(B);break}case"ArrowUp":{$(B);break}case"Home":{B.preventDefault(),H(0);break}case"End":{B.preventDefault(),ae();break}case"Enter":{B.preventDefault();let V=X();if(V){let J=new Event(Qw);V.dispatchEvent(J)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:fpe},u),x0(e,B=>k.createElement(e9.Provider,{value:A},k.createElement(JI.Provider,{value:M},B))))}),Jhe=k.forwardRef((e,t)=>{var n,r;let i=Ho(),s=k.useRef(null),l=k.useContext(t9),c=Kh(),u=r9(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;Ql(()=>{if(!d)return c.item(i,l?.id)},[d]);let h=i9(i,s,[e.value,e.children,s],e.keywords),p=PE(),g=Ha(_=>_.value&&_.value===h.current),x=Ha(_=>d||c.filter()===!1?!0:_.search?_.filtered.items.get(i)>0:!0);k.useEffect(()=>{let _=s.current;if(!(!_||e.disabled))return _.addEventListener(Qw,y),()=>_.removeEventListener(Qw,y)},[x,e.onSelect,e.disabled]);function y(){var _,A;T(),(A=(_=u.current).onSelect)==null||A.call(_,h.current)}function T(){p.setState("value",h.current,!0)}if(!x)return null;let{disabled:w,value:S,onSelect:v,forceMount:E,keywords:b,...C}=e;return k.createElement(ts.div,{ref:Va(s,t),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!g,"data-disabled":!!w,"data-selected":!!g,onPointerMove:w||c.getDisablePointerSelection()?void 0:T,onClick:w?void 0:y},e.children)}),epe=k.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...s}=e,l=Ho(),c=k.useRef(null),u=k.useRef(null),d=Ho(),h=Kh(),p=Ha(x=>i||h.filter()===!1?!0:x.search?x.filtered.groups.has(l):!0);Ql(()=>h.group(l),[]),i9(l,c,[e.value,e.heading,u]);let g=k.useMemo(()=>({id:l,forceMount:i}),[i]);return k.createElement(ts.div,{ref:Va(c,t),...s,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&k.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),x0(e,x=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},k.createElement(t9.Provider,{value:g},x))))}),tpe=k.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=k.useRef(null),s=Ha(l=>!l.search);return!n&&!s?null:k.createElement(ts.div,{ref:Va(i,t),...r,"cmdk-separator":"",role:"separator"})}),npe=k.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,s=PE(),l=Ha(d=>d.search),c=Ha(d=>d.selectedItemId),u=Kh();return k.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),k.createElement(ts.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":c,id:u.inputId,type:"text",value:i?e.value:l,onChange:d=>{i||s.setState("search",d.target.value),n?.(d.target.value)}})}),rpe=k.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,s=k.useRef(null),l=k.useRef(null),c=Ha(d=>d.selectedItemId),u=Kh();return k.useEffect(()=>{if(l.current&&s.current){let d=l.current,h=s.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let x=d.offsetHeight;h.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(p),g.unobserve(d)}}},[]),k.createElement(ts.div,{ref:Va(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},x0(e,d=>k.createElement("div",{ref:Va(l,u.listInnerRef),"cmdk-list-sizer":""},d)))}),ipe=k.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:l,...c}=e;return k.createElement(Ghe,{open:n,onOpenChange:r},k.createElement(Zhe,{container:l},k.createElement(Whe,{"cmdk-overlay":"",className:i}),k.createElement(Yhe,{"aria-label":e.label,"cmdk-dialog":"",className:s},k.createElement(n9,{ref:t,...c}))))}),ope=k.forwardRef((e,t)=>Ha(n=>n.filtered.count===0)?k.createElement(ts.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),spe=k.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...s}=e;return k.createElement(ts.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},x0(e,l=>k.createElement("div",{"aria-hidden":!0},l)))}),dc=Object.assign(n9,{List:rpe,Item:Jhe,Input:npe,Group:epe,Separator:tpe,Dialog:ipe,Empty:ope,Loading:spe});function ape(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function lpe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function r9(e){let t=k.useRef(e);return Ql(()=>{t.current=e}),t}var Ql=typeof window>"u"?k.useEffect:k.useLayoutEffect;function au(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function Ha(e){let t=PE(),n=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,n,n)}function i9(e,t,n,r=[]){let i=k.useRef(),s=Kh();return Ql(()=>{var l;let c=(()=>{var d;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(d=h.current.textContent)==null?void 0:d.trim():i.current}})(),u=r.map(d=>d.trim());s.value(e,c,u),(l=t.current)==null||l.setAttribute(su,c),i.current=c}),i}var cpe=()=>{let[e,t]=k.useState(),n=au(()=>new Map);return Ql(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function upe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function x0({asChild:e,children:t},n){return e&&k.isValidElement(t)?k.cloneElement(upe(t),{ref:t.ref},n(t.props.children)):n(t)}var fpe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const dpe=df("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function hpe({className:e,variant:t,asChild:n=!1,...r}){const i=n?S_:"span";return j.jsx(i,{"data-slot":"badge",className:$t(dpe({variant:t}),e),...r})}const o9=k.forwardRef(({className:e,...t},n)=>j.jsx(dc,{ref:n,"data-slot":"command",className:$t("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),ppe=k.forwardRef(({className:e,...t},n)=>j.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[j.jsx(mue,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),j.jsx(dc.Input,{ref:n,className:$t("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ppe.displayName=dc.Input.displayName;function s9({className:e,...t}){return j.jsx(dc.List,{"data-slot":"command-list",className:$t("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function a9({className:e,...t}){return j.jsx(dc.Group,{"data-slot":"command-group",className:$t("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function l9({className:e,...t}){return j.jsx(dc.Item,{"data-slot":"command-item",className:$t("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function mpe({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:l,ariaPlaceholder:c,onFocus:u,onBlur:d,className:h,id:p}){const g=k.useRef(null),[x,y]=k.useState(!1),[T,w]=k.useState(""),S=k.useMemo(()=>t.filter(A=>n.some(M=>Aa(A.value,M))),[t,n]),v=k.useMemo(()=>t.filter(A=>!S.some(M=>Aa(M.value,A.value))),[t,S]),E=k.useCallback(A=>{if(s)return;const M=S.filter(P=>!Aa(P.value,A.value));r?.(M.map(P=>P.index))},[S,r,s]),b=k.useCallback(A=>{if(!(s||!g.current||g.current.value!==""))if(A.key==="Delete"||A.key==="Backspace"){const M=S.slice(0,-1);r?.(M.map(P=>P.index))}else A.key==="Escape"&&g.current.blur()},[S,r,s]),C=k.useCallback(A=>{if(s)return;w("");const M=e?[...S,A]:[A];r?.(M.map(P=>P.index))},[e,S,r,s]),_=k.useCallback(A=>{s||y(!0),u?.(A)},[s,u]);return j.jsxs(o9,{onKeyDown:b,className:$t("overflow-visible bg-transparent",h),autoFocus:i,"aria-disabled":s,onBlur:d,onFocus:_,"aria-describedby":l,"aria-placeholder":c,children:[j.jsx("div",{className:$t("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:j.jsxs("div",{className:"flex gap-1 flex-wrap",children:[S.map(A=>j.jsxs(hpe,{variant:"secondary",children:[A.label,j.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:M=>M.key==="Enter"&&!s&&E(A),onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},onClick:()=>E(A),disabled:s,children:j.jsx(bue,{className:$t("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},A.value)),j.jsx(dc.Input,{ref:g,value:T,onValueChange:w,onBlur:()=>y(!1),onFocus:()=>!s&&y(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${p}`,"aria-labelledby":`command-item-input-${p}`,id:`command-item-input-${p}`})]})}),x&&!s&&v.length>0&&j.jsx("div",{className:"relative mt-2",children:j.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:j.jsx(a9,{className:"h-full overflow-auto",children:j.jsx(s9,{children:v.map(A=>j.jsx(l9,{disabled:A.disabled,onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},"aria-controls":`${A.value}-command-item`,"aria-labelledby":`${A.value}-command-item`,id:`${A.value}-command-item`,onSelect:()=>C(A),className:"cursor-pointer",children:A.label},`${A.value}-command-item`))})})})})]})}function gpe({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:l="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:d,onBlur:h,className:p}){const[g,x]=k.useState(!1),y=e?.find(v=>v.value===t),T=k.useRef(null),w=k.useRef(null);k.useEffect(()=>{g&&T.current&&requestAnimationFrame(()=>{var v;(v=T.current)===null||v===void 0||v.scrollIntoView({block:"nearest"})})},[g]);const S=v=>{w.current&&!w.current.contains(v.relatedTarget)&&x(!1),h?.(v)};return j.jsxs(o9,{ref:w,className:$t("overflow-visible bg-transparent",p),autoFocus:r,"aria-disabled":i,onBlur:S,onFocus:d,"aria-describedby":c,"aria-placeholder":u,children:[j.jsxs("div",{onClick:()=>!i&&x(!g),className:$t("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!y&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",p),children:[j.jsx("span",{className:$t("flex-1 line-clamp-1",!y&&"text-muted-foreground"),children:y?.label||l}),j.jsx(A$,{className:"h-4 w-4 opacity-50"})]}),j.jsx("div",{className:"relative",children:g&&e&&e.length>0?j.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:j.jsx(a9,{className:"h-full overflow-auto",children:j.jsx(s9,{children:e.map(v=>j.jsxs(l9,{ref:v.value===t?T:void 0,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>{v.disabled||(n?.(v.value),x(!1))},className:$t("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",v.value===t&&"font-semibold",v.disabled&&"opacity-50 cursor-not-allowed"),children:[j.jsx("span",{children:v.label}),j.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:v.value===t&&j.jsx(rue,{className:"h-4 w-4"})})]},v.value))})})}):null})]})}function ype({id:e,options:t,required:n,disabled:r,readonly:i,value:s,multiple:l,autofocus:c,onChange:u,onBlur:d,onFocus:h,defaultValue:p,placeholder:g,rawErrors:x=[],className:y}){const{enumOptions:T,enumDisabled:w,emptyValue:S}=t,v=()=>{h(e,xr(s,T,S))},E=()=>{d(e,xr(s,T,S))},b=T?.map(({value:_,label:A},M)=>({value:l?_:M.toString(),label:A,index:M,disabled:Array.isArray(w)&&w.includes(_)})),C=$t({"border-destructive":x.length>0},y);return j.jsx("div",{className:"p-0.5",children:l?j.jsx(mpe,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:C,items:b,selected:s,onValueChange:_=>{u(xr(_,T,S))},onFocus:v,onBlur:E}):j.jsx(gpe,{items:b,selected:t$(s??p,T,!1),onValueChange:_=>{u(xr(_,T,S))},autoFocus:c,disabled:r||i,required:n,placeholder:g,className:C,onFocus:v,onBlur:E,ariaDescribedby:vi(e)})})}function vpe({className:e,...t}){return j.jsx("textarea",{"data-slot":"textarea",className:$t("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function bpe({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:s,autofocus:l,readonly:c,onBlur:u,onFocus:d,onChange:h,options:p,className:g}){const x=({target:{value:w}})=>h(w===""?p.emptyValue:w),y=({target:w})=>u(e,w&&w.value),T=({target:w})=>d(e,w&&w.value);return j.jsx("div",{className:"flex p-0.5",children:j.jsx(vpe,{id:e,name:t||e,placeholder:n,disabled:s,readOnly:c,value:r??"",required:i,autoFocus:l,rows:p.rows||5,onChange:x,onBlur:y,onFocus:T,"aria-describedby":vi(e),className:g})})}function Spe(){return{CheckboxWidget:wfe,CheckboxesWidget:xfe,RadioWidget:Qfe,RangeWidget:Sde,SelectWidget:ype,TextareaWidget:bpe}}function wpe(){return{templates:Yue(),widgets:Spe()}}function xpe(){return Ice(wpe())}const _pe=xpe();function Epe({className:e,...t}){return j.jsx("div",{"data-slot":"card",className:gn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Cpe({className:e,...t}){return j.jsx("div",{"data-slot":"card-content",className:gn("px-6",e),...t})}var Tpe=function(e){return function(t,n){var r=k.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},xy=function(e){return typeof e=="function"},Rpe=function(e){return typeof e=="string"},c9=function(e){return typeof e=="number"},Ape=function(e){return typeof e>"u"},Ope=function(e){var t=k.useRef(e);t.current=k.useMemo(function(){return e},[e]);var n=k.useRef(void 0);return n.current||(n.current=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current};const kpe=Tpe(k.useEffect);function JM(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function _y(e){var t=k.useRef(e);return t.current=e,t}var Mpe=function(e){var t=_y(e);k.useEffect(function(){return function(){t.current()}},[])},u9=!!(typeof window<"u"&&window.document&&window.document.createElement);function DE(e,t){if(u9){if(!e)return t;var n;return xy(e)?n=e():"current"in e?n=e.current:n=e,n}}var jpe=function(e){var t=function(n,r,i){var s=k.useRef(!1),l=k.useRef([]),c=k.useRef([]),u=k.useRef(void 0);e(function(){var d,h=Array.isArray(i)?i:[i],p=h.map(function(g){return DE(g)});if(!s.current){s.current=!0,l.current=p,c.current=r,u.current=n();return}(p.length!==l.current.length||!JM(l.current,p)||!JM(c.current,r))&&((d=u.current)===null||d===void 0||d.call(u),l.current=p,c.current=r,u.current=n())}),Mpe(function(){var d;(d=u.current)===null||d===void 0||d.call(u),s.current=!1})};return t},f9=jpe(k.useEffect),hS,e3;function Ppe(){if(e3)return hS;e3=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(s,l){if(s===l)return!0;if(s&&l&&typeof s=="object"&&typeof l=="object"){if(s.constructor!==l.constructor)return!1;var c,u,d;if(Array.isArray(s)){if(c=s.length,c!=l.length)return!1;for(u=c;u--!==0;)if(!i(s[u],l[u]))return!1;return!0}var h;if(t&&s instanceof Map&&l instanceof Map){if(s.size!==l.size)return!1;for(h=s.entries();!(u=h.next()).done;)if(!l.has(u.value[0]))return!1;for(h=s.entries();!(u=h.next()).done;)if(!i(u.value[1],l.get(u.value[0])))return!1;return!0}if(n&&s instanceof Set&&l instanceof Set){if(s.size!==l.size)return!1;for(h=s.entries();!(u=h.next()).done;)if(!l.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(l)){if(c=s.length,c!=l.length)return!1;for(u=c;u--!==0;)if(s[u]!==l[u])return!1;return!0}if(s.constructor===RegExp)return s.source===l.source&&s.flags===l.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof l.valueOf=="function")return s.valueOf()===l.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof l.toString=="function")return s.toString()===l.toString();if(d=Object.keys(s),c=d.length,c!==Object.keys(l).length)return!1;for(u=c;u--!==0;)if(!Object.prototype.hasOwnProperty.call(l,d[u]))return!1;if(e&&s instanceof Element)return!1;for(u=c;u--!==0;)if(!((d[u]==="_owner"||d[u]==="__v"||d[u]==="__o")&&s.$$typeof)&&!i(s[d[u]],l[d[u]]))return!1;return!0}return s!==s&&l!==l}return hS=function(l,c){try{return i(l,c)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}},hS}var Dpe=Ppe();const Npe=Qo(Dpe);var $pe=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),Npe(e,t)};function t3(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0?!0:r,s=_y(t);f9(function(){if(i){var l=DE(n.target,window);if(l?.addEventListener){var c=function(d){return s.current(d)},u=Array.isArray(e)?e:[e];return u.forEach(function(d){l.addEventListener(d,c,{capture:n.capture,once:n.once,passive:n.passive})}),function(){u.forEach(function(d){l.removeEventListener(d,c,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,i],n.target)}var Ipe=function(e,t,n){var r=k.useRef(void 0),i=k.useRef(0);$pe(t,r.current)||(i.current+=1),r.current=t,f9(e,[i.current],n)},zpe=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),d9={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:zpe?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},Jw={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type==="keyup"?d9.meta.includes(e.keyCode):e.metaKey}};function h9(e){return Rpe(e)||c9(e)}function Fpe(e){var t=Object.keys(Jw).reduce(function(n,r){return Jw[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function n3(e,t,n){var r,i;if(!e.key)return!1;if(c9(t))return e.keyCode===t?t:!1;var s=t.split("."),l=0;try{for(var c=Yw(s),u=c.next();!u.done;u=c.next()){var d=u.value,h=Jw[d],p=d9[d.toLowerCase()];(h&&h(e)||p&&p===e.keyCode)&&l++}}catch(g){r={error:g}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return n?l===s.length&&Fpe(e)===s.length?t:!1:l===s.length?t:!1}function Lpe(e,t){return xy(e)?e:h9(e)?function(n){return n3(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return n3(n,r,t)})}:function(){return!!e}}var Vpe=["keydown"];function Upe(e,t,n){var r={},i=r.events,s=i===void 0?Vpe:i,l=r.target,c=r.exactMatch,u=c===void 0?!1:c,d=r.useCapture,h=d===void 0?!1:d,p=_y(t),g=_y(e);Ipe(function(){var x,y,T,w=DE(l,window);if(w){var S=function(C){var _,A=C,M=Lpe(g.current,u),P=M(A),I=h9(P)?P:A.key;if(P)return(_=p.current)===null||_===void 0?void 0:_.call(p,A,I)};try{for(var v=Yw(s),E=v.next();!E.done;E=v.next()){var b=E.value;(T=w?.addEventListener)===null||T===void 0||T.call(w,b,S,h)}}catch(C){x={error:C}}finally{try{E&&!E.done&&(y=v.return)&&y.call(v)}finally{if(x)throw x.error}}return function(){var C,_,A;try{for(var M=Yw(s),P=M.next();!P.done;P=M.next()){var I=P.value;(A=w?.removeEventListener)===null||A===void 0||A.call(w,I,S,h)}}catch(z){C={error:z}}finally{try{P&&!P.done&&(_=M.return)&&_.call(M)}finally{if(C)throw C.error}}}}},[s],l)}var r3="AHOOKS_SYNC_STORAGE_EVENT_NAME";function qpe(e){function t(n,r){r===void 0&&(r={});var i,s=r.listenStorageChange,l=s===void 0?!1:s,c=r.onError,u=c===void 0?function(v){console.error(v)}:c;try{i=e()}catch(v){u(v)}var d=function(v){return r.serializer?r.serializer(v):JSON.stringify(v)},h=function(v){return r.deserializer?r.deserializer(v):JSON.parse(v)};function p(){try{var v=i?.getItem(n);if(v)return h(v)}catch(E){u(E)}return xy(r.defaultValue)?r.defaultValue():r.defaultValue}var g=Gde(k.useState(p),2),x=g[0],y=g[1];kpe(function(){y(p())},[n]);var T=function(v){var E=xy(v)?v(x):v;l||y(E);try{var b=void 0,C=i?.getItem(n);Ape(E)?(b=null,i?.removeItem(n)):(b=d(E),i?.setItem(n,b)),dispatchEvent(new CustomEvent(r3,{detail:{key:n,newValue:b,oldValue:C,storageArea:i}}))}catch(_){u(_)}},w=function(v){v.key!==n||v.storageArea!==i||y(p())},S=function(v){w(v.detail)};return t3("storage",w,{enable:l}),t3(r3,S,{enable:l}),[x,Ope(T)]}return t}var Bpe=qpe(function(){return u9?localStorage:void 0});const Hpe=({validateForm:e,formData:t})=>{const n=zs(),{mutateAsync:r,isPending:i}=uJ(),s=async()=>{if(e){const l=await e();if(console.log("isValid",l),!l)return}t&&await r({toolName:n.name,args:t})};return Upe("Enter",s),j.jsx("div",{className:"flex flex-col items-end gap-1",children:j.jsxs(Lu,{size:"sm",onClick:s,variant:"default",disabled:i,children:[i?j.jsx(Cee,{className:"h-4 w-4 animate-spin"}):j.jsx(Oee,{className:"h-4 w-4"}),"Call Tool"]})})},Kpe={"ui:submitButtonOptions":{norender:!0}},Gpe=({schema:e,formData:t,setFormData:n,ref:r})=>!e||!e.properties||Object.keys(e.properties).length===0?j.jsx("div",{className:"flex items-center justify-center h-full",children:j.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):j.jsx(Epe,{children:j.jsx(Cpe,{children:j.jsx(_pe,{ref:r,schema:e??{},validator:Yce,uiSchema:Kpe,formData:t,onChange:s=>n(s.formData),showErrorList:!1,templates:{FieldTemplate:s=>{const{id:l,classNames:c,style:u,label:d,required:h,errors:p,children:g}=s;return j.jsxs("div",{className:gn("flex flex-col gap-2",c),style:u,children:[j.jsxs("label",{htmlFor:l,className:"text-sm text-foreground",children:[d,h&&j.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),j.jsxs("div",{className:"flex flex-col gap-2",children:[g,p]})]})},FieldErrorTemplate:s=>s.errors&&s.errors.length>0?j.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:j.jsx("span",{children:s.errors.join(", ")})}):null}})})}),Zpe=()=>{const e=k.useRef(null),t=zs(),{setToolData:n}=Is(),i=cf(t.name)?.input??{},s=l=>{n(t.name,{input:l??{}})};return j.jsxs("div",{className:gn("flex flex-col h-full overflow-hidden border-r border-border"),children:[j.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[j.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(Hpe,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:i})})]}),j.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:j.jsx(Gpe,{schema:t.inputSchema,formData:i,setFormData:s,ref:e},t.name)})]})},Wpe=df("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function Ype({className:e,variant:t,...n}){return j.jsx("div",{className:gn(Wpe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function Xpe({className:e,...t}){return j.jsx("div",{className:gn("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function Qpe({className:e,...t}){return j.jsx("div",{className:gn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}var Lg={exports:{}},Jpe=Lg.exports,i3;function eme(){return i3||(i3=1,(function(e,t){(function(n,r){e.exports=r(rf())})(Jpe,(n=>(()=>{var r={9735:(c,u)=>{u.__esModule=!0,u.default={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},c.exports=u.default},294:(c,u)=>{u.__esModule=!0,u.default={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},c.exports=u.default},1733:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},c.exports=u.default},8974:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},c.exports=u.default},6933:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},c.exports=u.default},523:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},c.exports=u.default},1223:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},c.exports=u.default},1233:(c,u)=>{u.__esModule=!0,u.default={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},c.exports=u.default},2847:(c,u)=>{u.__esModule=!0,u.default={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},c.exports=u.default},8120:(c,u)=>{u.__esModule=!0,u.default={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},c.exports=u.default},6305:(c,u)=>{u.__esModule=!0,u.default={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},c.exports=u.default},525:(c,u)=>{u.__esModule=!0,u.default={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},c.exports=u.default},4124:(c,u)=>{u.__esModule=!0,u.default={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},c.exports=u.default},7167:(c,u)=>{u.__esModule=!0,u.default={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},c.exports=u.default},4582:(c,u)=>{u.__esModule=!0,u.default={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},c.exports=u.default},7096:(c,u)=>{u.__esModule=!0,u.default={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},c.exports=u.default},9887:(c,u)=>{u.__esModule=!0,u.default={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},c.exports=u.default},7199:(c,u)=>{u.__esModule=!0,u.default={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},c.exports=u.default},1985:(c,u)=>{u.__esModule=!0,u.default={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},c.exports=u.default},8093:(c,u)=>{u.__esModule=!0,u.default={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},c.exports=u.default},1615:(c,u)=>{u.__esModule=!0,u.default={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},c.exports=u.default},9063:(c,u)=>{u.__esModule=!0,u.default={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},c.exports=u.default},9446:(c,u,d)=>{function h(ie){return ie&&ie.__esModule?ie.default:ie}u.__esModule=!0;var p=d(1308);u.threezerotwofour=h(p);var g=d(9735);u.apathy=h(g);var x=d(294);u.ashes=h(x);var y=d(1733);u.atelierDune=h(y);var T=d(8974);u.atelierForest=h(T);var w=d(6933);u.atelierHeath=h(w);var S=d(523);u.atelierLakeside=h(S);var v=d(1223);u.atelierSeaside=h(v);var E=d(1233);u.bespin=h(E);var b=d(2847);u.brewer=h(b);var C=d(8120);u.bright=h(C);var _=d(6305);u.chalk=h(_);var A=d(525);u.codeschool=h(A);var M=d(4124);u.colors=h(M);var P=d(7167);u.default=h(P);var I=d(4582);u.eighties=h(I);var z=d(7096);u.embers=h(z);var q=d(9887);u.flat=h(q);var K=d(7199);u.google=h(K);var X=d(1985);u.grayscale=h(X);var Y=d(8093);u.greenscreen=h(Y);var H=d(1615);u.harmonic=h(H);var Z=d(9063);u.hopscotch=h(Z);var ee=d(9033);u.isotope=h(ee);var ae=d(4112);u.marrakesh=h(ae);var re=d(9600);u.mocha=h(re);var $=d(1240);u.monokai=h($);var B=d(9768);u.ocean=h(B);var F=d(8293);u.paraiso=h(F);var D=d(3093);u.pop=h(D);var V=d(1951);u.railscasts=h(V);var J=d(6368);u.shapeshifter=h(J);var ne=d(2317);u.solarized=h(ne);var oe=d(1091);u.summerfruit=h(oe);var he=d(6943);u.tomorrow=h(he);var Ee=d(5670);u.tube=h(Ee);var te=d(2536);u.twilight=h(te)},9033:(c,u)=>{u.__esModule=!0,u.default={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},c.exports=u.default},4112:(c,u)=>{u.__esModule=!0,u.default={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},c.exports=u.default},9600:(c,u)=>{u.__esModule=!0,u.default={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},c.exports=u.default},1240:(c,u)=>{u.__esModule=!0,u.default={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},c.exports=u.default},9768:(c,u)=>{u.__esModule=!0,u.default={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},c.exports=u.default},8293:(c,u)=>{u.__esModule=!0,u.default={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},c.exports=u.default},3093:(c,u)=>{u.__esModule=!0,u.default={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},c.exports=u.default},1951:(c,u)=>{u.__esModule=!0,u.default={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},c.exports=u.default},6368:(c,u)=>{u.__esModule=!0,u.default={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},c.exports=u.default},2317:(c,u)=>{u.__esModule=!0,u.default={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},c.exports=u.default},1091:(c,u)=>{u.__esModule=!0,u.default={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},c.exports=u.default},1308:(c,u)=>{u.__esModule=!0,u.default={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},c.exports=u.default},6943:(c,u)=>{u.__esModule=!0,u.default={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},c.exports=u.default},5670:(c,u)=>{u.__esModule=!0,u.default={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},c.exports=u.default},2536:(c,u)=>{u.__esModule=!0,u.default={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},c.exports=u.default},6481:(c,u,d)=>{var h=d(4176),p={};for(var g in h)h.hasOwnProperty(g)&&(p[h[g]]=g);var x=c.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var y in x)if(x.hasOwnProperty(y)){if(!("channels"in x[y]))throw new Error("missing channels property: "+y);if(!("labels"in x[y]))throw new Error("missing channel labels property: "+y);if(x[y].labels.length!==x[y].channels)throw new Error("channel and label counts mismatch: "+y);var T=x[y].channels,w=x[y].labels;delete x[y].channels,delete x[y].labels,Object.defineProperty(x[y],"channels",{value:T}),Object.defineProperty(x[y],"labels",{value:w})}x.rgb.hsl=function(S){var v,E,b=S[0]/255,C=S[1]/255,_=S[2]/255,A=Math.min(b,C,_),M=Math.max(b,C,_),P=M-A;return M===A?v=0:b===M?v=(C-_)/P:C===M?v=2+(_-b)/P:_===M&&(v=4+(b-C)/P),(v=Math.min(60*v,360))<0&&(v+=360),E=(A+M)/2,[v,100*(M===A?0:E<=.5?P/(M+A):P/(2-M-A)),100*E]},x.rgb.hsv=function(S){var v,E,b,C,_,A=S[0]/255,M=S[1]/255,P=S[2]/255,I=Math.max(A,M,P),z=I-Math.min(A,M,P),q=function(K){return(I-K)/6/z+.5};return z===0?C=_=0:(_=z/I,v=q(A),E=q(M),b=q(P),A===I?C=b-E:M===I?C=.3333333333333333+v-b:P===I&&(C=.6666666666666666+E-v),C<0?C+=1:C>1&&(C-=1)),[360*C,100*_,100*I]},x.rgb.hwb=function(S){var v=S[0],E=S[1],b=S[2];return[x.rgb.hsl(S)[0],100*(.00392156862745098*Math.min(v,Math.min(E,b))),100*(b=1-.00392156862745098*Math.max(v,Math.max(E,b)))]},x.rgb.cmyk=function(S){var v,E=S[0]/255,b=S[1]/255,C=S[2]/255;return[100*((1-E-(v=Math.min(1-E,1-b,1-C)))/(1-v)||0),100*((1-b-v)/(1-v)||0),100*((1-C-v)/(1-v)||0),100*v]},x.rgb.keyword=function(S){var v=p[S];if(v)return v;var E,b,C,_=1/0;for(var A in h)if(h.hasOwnProperty(A)){var M=h[A],P=(b=S,C=M,Math.pow(b[0]-C[0],2)+Math.pow(b[1]-C[1],2)+Math.pow(b[2]-C[2],2));P<_&&(_=P,E=A)}return E},x.keyword.rgb=function(S){return h[S]},x.rgb.xyz=function(S){var v=S[0]/255,E=S[1]/255,b=S[2]/255;return[100*(.4124*(v=v>.04045?Math.pow((v+.055)/1.055,2.4):v/12.92)+.3576*(E=E>.04045?Math.pow((E+.055)/1.055,2.4):E/12.92)+.1805*(b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92)),100*(.2126*v+.7152*E+.0722*b),100*(.0193*v+.1192*E+.9505*b)]},x.rgb.lab=function(S){var v=x.rgb.xyz(S),E=v[0],b=v[1],C=v[2];return b/=100,C/=108.883,E=(E/=95.047)>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862,[116*(b=b>.008856?Math.pow(b,.3333333333333333):7.787*b+.13793103448275862)-16,500*(E-b),200*(b-(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862))]},x.hsl.rgb=function(S){var v,E,b,C,_,A=S[0]/360,M=S[1]/100,P=S[2]/100;if(M===0)return[_=255*P,_,_];v=2*P-(E=P<.5?P*(1+M):P+M-P*M),C=[0,0,0];for(var I=0;I<3;I++)(b=A+.3333333333333333*-(I-1))<0&&b++,b>1&&b--,_=6*b<1?v+6*(E-v)*b:2*b<1?E:3*b<2?v+(E-v)*(.6666666666666666-b)*6:v,C[I]=255*_;return C},x.hsl.hsv=function(S){var v=S[0],E=S[1]/100,b=S[2]/100,C=E,_=Math.max(b,.01);return E*=(b*=2)<=1?b:2-b,C*=_<=1?_:2-_,[v,100*(b===0?2*C/(_+C):2*E/(b+E)),100*((b+E)/2)]},x.hsv.rgb=function(S){var v=S[0]/60,E=S[1]/100,b=S[2]/100,C=Math.floor(v)%6,_=v-Math.floor(v),A=255*b*(1-E),M=255*b*(1-E*_),P=255*b*(1-E*(1-_));switch(b*=255,C){case 0:return[b,P,A];case 1:return[M,b,A];case 2:return[A,b,P];case 3:return[A,M,b];case 4:return[P,A,b];case 5:return[b,A,M]}},x.hsv.hsl=function(S){var v,E,b,C=S[0],_=S[1]/100,A=S[2]/100,M=Math.max(A,.01);return b=(2-_)*A,E=_*M,[C,100*(E=(E/=(v=(2-_)*M)<=1?v:2-v)||0),100*(b/=2)]},x.hwb.rgb=function(S){var v,E,b,C,_,A,M,P=S[0]/360,I=S[1]/100,z=S[2]/100,q=I+z;switch(q>1&&(I/=q,z/=q),b=6*P-(v=Math.floor(6*P)),1&v&&(b=1-b),C=I+b*((E=1-z)-I),v){default:case 6:case 0:_=E,A=C,M=I;break;case 1:_=C,A=E,M=I;break;case 2:_=I,A=E,M=C;break;case 3:_=I,A=C,M=E;break;case 4:_=C,A=I,M=E;break;case 5:_=E,A=I,M=C}return[255*_,255*A,255*M]},x.cmyk.rgb=function(S){var v=S[0]/100,E=S[1]/100,b=S[2]/100,C=S[3]/100;return[255*(1-Math.min(1,v*(1-C)+C)),255*(1-Math.min(1,E*(1-C)+C)),255*(1-Math.min(1,b*(1-C)+C))]},x.xyz.rgb=function(S){var v,E,b,C=S[0]/100,_=S[1]/100,A=S[2]/100;return E=-.9689*C+1.8758*_+.0415*A,b=.0557*C+-.204*_+1.057*A,v=(v=3.2406*C+-1.5372*_+-.4986*A)>.0031308?1.055*Math.pow(v,.4166666666666667)-.055:12.92*v,E=E>.0031308?1.055*Math.pow(E,.4166666666666667)-.055:12.92*E,b=b>.0031308?1.055*Math.pow(b,.4166666666666667)-.055:12.92*b,[255*(v=Math.min(Math.max(0,v),1)),255*(E=Math.min(Math.max(0,E),1)),255*(b=Math.min(Math.max(0,b),1))]},x.xyz.lab=function(S){var v=S[0],E=S[1],b=S[2];return E/=100,b/=108.883,v=(v/=95.047)>.008856?Math.pow(v,.3333333333333333):7.787*v+.13793103448275862,[116*(E=E>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862)-16,500*(v-E),200*(E-(b=b>.008856?Math.pow(b,.3333333333333333):7.787*b+.13793103448275862))]},x.lab.xyz=function(S){var v,E,b,C=S[0];v=S[1]/500+(E=(C+16)/116),b=E-S[2]/200;var _=Math.pow(E,3),A=Math.pow(v,3),M=Math.pow(b,3);return E=_>.008856?_:(E-.13793103448275862)/7.787,v=A>.008856?A:(v-.13793103448275862)/7.787,b=M>.008856?M:(b-.13793103448275862)/7.787,[v*=95.047,E*=100,b*=108.883]},x.lab.lch=function(S){var v,E=S[0],b=S[1],C=S[2];return(v=360*Math.atan2(C,b)/2/Math.PI)<0&&(v+=360),[E,Math.sqrt(b*b+C*C),v]},x.lch.lab=function(S){var v,E=S[0],b=S[1];return v=S[2]/360*2*Math.PI,[E,b*Math.cos(v),b*Math.sin(v)]},x.rgb.ansi16=function(S){var v=S[0],E=S[1],b=S[2],C=1 in arguments?arguments[1]:x.rgb.hsv(S)[2];if((C=Math.round(C/50))===0)return 30;var _=30+(Math.round(b/255)<<2|Math.round(E/255)<<1|Math.round(v/255));return C===2&&(_+=60),_},x.hsv.ansi16=function(S){return x.rgb.ansi16(x.hsv.rgb(S),S[2])},x.rgb.ansi256=function(S){var v=S[0],E=S[1],b=S[2];return v===E&&E===b?v<8?16:v>248?231:Math.round((v-8)/247*24)+232:16+36*Math.round(v/255*5)+6*Math.round(E/255*5)+Math.round(b/255*5)},x.ansi16.rgb=function(S){var v=S%10;if(v===0||v===7)return S>50&&(v+=3.5),[v=v/10.5*255,v,v];var E=.5*(1+~~(S>50));return[(1&v)*E*255,(v>>1&1)*E*255,(v>>2&1)*E*255]},x.ansi256.rgb=function(S){if(S>=232){var v=10*(S-232)+8;return[v,v,v]}var E;return S-=16,[Math.floor(S/36)/5*255,Math.floor((E=S%36)/6)/5*255,E%6/5*255]},x.rgb.hex=function(S){var v=(((255&Math.round(S[0]))<<16)+((255&Math.round(S[1]))<<8)+(255&Math.round(S[2]))).toString(16).toUpperCase();return"000000".substring(v.length)+v},x.hex.rgb=function(S){var v=S.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!v)return[0,0,0];var E=v[0];v[0].length===3&&(E=E.split("").map((function(C){return C+C})).join(""));var b=parseInt(E,16);return[b>>16&255,b>>8&255,255&b]},x.rgb.hcg=function(S){var v,E=S[0]/255,b=S[1]/255,C=S[2]/255,_=Math.max(Math.max(E,b),C),A=Math.min(Math.min(E,b),C),M=_-A;return v=M<=0?0:_===E?(b-C)/M%6:_===b?2+(C-E)/M:4+(E-b)/M+4,v/=6,[360*(v%=1),100*M,100*(M<1?A/(1-M):0)]},x.hsl.hcg=function(S){var v=S[1]/100,E=S[2]/100,b=1,C=0;return(b=E<.5?2*v*E:2*v*(1-E))<1&&(C=(E-.5*b)/(1-b)),[S[0],100*b,100*C]},x.hsv.hcg=function(S){var v=S[1]/100,E=S[2]/100,b=v*E,C=0;return b<1&&(C=(E-b)/(1-b)),[S[0],100*b,100*C]},x.hcg.rgb=function(S){var v=S[0]/360,E=S[1]/100,b=S[2]/100;if(E===0)return[255*b,255*b,255*b];var C,_=[0,0,0],A=v%1*6,M=A%1,P=1-M;switch(Math.floor(A)){case 0:_[0]=1,_[1]=M,_[2]=0;break;case 1:_[0]=P,_[1]=1,_[2]=0;break;case 2:_[0]=0,_[1]=1,_[2]=M;break;case 3:_[0]=0,_[1]=P,_[2]=1;break;case 4:_[0]=M,_[1]=0,_[2]=1;break;default:_[0]=1,_[1]=0,_[2]=P}return C=(1-E)*b,[255*(E*_[0]+C),255*(E*_[1]+C),255*(E*_[2]+C)]},x.hcg.hsv=function(S){var v=S[1]/100,E=v+S[2]/100*(1-v),b=0;return E>0&&(b=v/E),[S[0],100*b,100*E]},x.hcg.hsl=function(S){var v=S[1]/100,E=S[2]/100*(1-v)+.5*v,b=0;return E>0&&E<.5?b=v/(2*E):E>=.5&&E<1&&(b=v/(2*(1-E))),[S[0],100*b,100*E]},x.hcg.hwb=function(S){var v=S[1]/100,E=v+S[2]/100*(1-v);return[S[0],100*(E-v),100*(1-E)]},x.hwb.hcg=function(S){var v=S[1]/100,E=1-S[2]/100,b=E-v,C=0;return b<1&&(C=(E-b)/(1-b)),[S[0],100*b,100*C]},x.apple.rgb=function(S){return[S[0]/65535*255,S[1]/65535*255,S[2]/65535*255]},x.rgb.apple=function(S){return[S[0]/255*65535,S[1]/255*65535,S[2]/255*65535]},x.gray.rgb=function(S){return[S[0]/100*255,S[0]/100*255,S[0]/100*255]},x.gray.hsl=x.gray.hsv=function(S){return[0,0,S[0]]},x.gray.hwb=function(S){return[0,100,S[0]]},x.gray.cmyk=function(S){return[0,0,0,S[0]]},x.gray.lab=function(S){return[S[0],0,0]},x.gray.hex=function(S){var v=255&Math.round(S[0]/100*255),E=((v<<16)+(v<<8)+v).toString(16).toUpperCase();return"000000".substring(E.length)+E},x.rgb.gray=function(S){return[(S[0]+S[1]+S[2])/3/255*100]}},4732:(c,u,d)=>{var h=d(6481),p=d(1157),g={};Object.keys(h).forEach((function(x){g[x]={},Object.defineProperty(g[x],"channels",{value:h[x].channels}),Object.defineProperty(g[x],"labels",{value:h[x].labels});var y=p(x);Object.keys(y).forEach((function(T){var w=y[T];g[x][T]=(function(S){var v=function(E){if(E==null)return E;arguments.length>1&&(E=Array.prototype.slice.call(arguments));var b=S(E);if(typeof b=="object")for(var C=b.length,_=0;_<C;_++)b[_]=Math.round(b[_]);return b};return"conversion"in S&&(v.conversion=S.conversion),v})(w),g[x][T].raw=(function(S){var v=function(E){return E==null?E:(arguments.length>1&&(E=Array.prototype.slice.call(arguments)),S(E))};return"conversion"in S&&(v.conversion=S.conversion),v})(w)}))})),c.exports=g},1157:(c,u,d)=>{var h=d(6481);function p(y){var T=(function(){for(var A={},M=Object.keys(h),P=M.length,I=0;I<P;I++)A[M[I]]={distance:-1,parent:null};return A})(),w=[y];for(T[y].distance=0;w.length;)for(var S=w.pop(),v=Object.keys(h[S]),E=v.length,b=0;b<E;b++){var C=v[b],_=T[C];_.distance===-1&&(_.distance=T[S].distance+1,_.parent=S,w.unshift(C))}return T}function g(y,T){return function(w){return T(y(w))}}function x(y,T){for(var w=[T[y].parent,y],S=h[T[y].parent][y],v=T[y].parent;T[v].parent;)w.unshift(T[v].parent),S=g(h[T[v].parent][v],S),v=T[v].parent;return S.conversion=w,S}c.exports=function(y){for(var T=p(y),w={},S=Object.keys(T),v=S.length,E=0;E<v;E++){var b=S[E];T[b].parent!==null&&(w[b]=x(b,T))}return w}},4176:c=>{c.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},4877:c=>{c.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6138:(c,u,d)=>{var h=d(4877),p=d(301),g=Object.hasOwnProperty,x=Object.create(null);for(var y in h)g.call(h,y)&&(x[h[y]]=y);var T=c.exports={to:{},get:{}};function w(v,E,b){return Math.min(Math.max(E,v),b)}function S(v){var E=Math.round(v).toString(16).toUpperCase();return E.length<2?"0"+E:E}T.get=function(v){var E,b;switch(v.substring(0,3).toLowerCase()){case"hsl":E=T.get.hsl(v),b="hsl";break;case"hwb":E=T.get.hwb(v),b="hwb";break;default:E=T.get.rgb(v),b="rgb"}return E?{model:b,value:E}:null},T.get.rgb=function(v){if(!v)return null;var E,b,C,_=[0,0,0,1];if(E=v.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(C=E[2],E=E[1],b=0;b<3;b++){var A=2*b;_[b]=parseInt(E.slice(A,A+2),16)}C&&(_[3]=parseInt(C,16)/255)}else if(E=v.match(/^#([a-f0-9]{3,4})$/i)){for(C=(E=E[1])[3],b=0;b<3;b++)_[b]=parseInt(E[b]+E[b],16);C&&(_[3]=parseInt(C+C,16)/255)}else if(E=v.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(b=0;b<3;b++)_[b]=parseInt(E[b+1],0);E[4]&&(E[5]?_[3]=.01*parseFloat(E[4]):_[3]=parseFloat(E[4]))}else{if(!(E=v.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(E=v.match(/^(\w+)$/))?E[1]==="transparent"?[0,0,0,0]:g.call(h,E[1])?((_=h[E[1]])[3]=1,_):null:null;for(b=0;b<3;b++)_[b]=Math.round(2.55*parseFloat(E[b+1]));E[4]&&(E[5]?_[3]=.01*parseFloat(E[4]):_[3]=parseFloat(E[4]))}for(b=0;b<3;b++)_[b]=w(_[b],0,255);return _[3]=w(_[3],0,1),_},T.get.hsl=function(v){if(!v)return null;var E=v.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(E){var b=parseFloat(E[4]);return[(parseFloat(E[1])%360+360)%360,w(parseFloat(E[2]),0,100),w(parseFloat(E[3]),0,100),w(isNaN(b)?1:b,0,1)]}return null},T.get.hwb=function(v){if(!v)return null;var E=v.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(E){var b=parseFloat(E[4]);return[(parseFloat(E[1])%360+360)%360,w(parseFloat(E[2]),0,100),w(parseFloat(E[3]),0,100),w(isNaN(b)?1:b,0,1)]}return null},T.to.hex=function(){var v=p(arguments);return"#"+S(v[0])+S(v[1])+S(v[2])+(v[3]<1?S(Math.round(255*v[3])):"")},T.to.rgb=function(){var v=p(arguments);return v.length<4||v[3]===1?"rgb("+Math.round(v[0])+", "+Math.round(v[1])+", "+Math.round(v[2])+")":"rgba("+Math.round(v[0])+", "+Math.round(v[1])+", "+Math.round(v[2])+", "+v[3]+")"},T.to.rgb.percent=function(){var v=p(arguments),E=Math.round(v[0]/255*100),b=Math.round(v[1]/255*100),C=Math.round(v[2]/255*100);return v.length<4||v[3]===1?"rgb("+E+"%, "+b+"%, "+C+"%)":"rgba("+E+"%, "+b+"%, "+C+"%, "+v[3]+")"},T.to.hsl=function(){var v=p(arguments);return v.length<4||v[3]===1?"hsl("+v[0]+", "+v[1]+"%, "+v[2]+"%)":"hsla("+v[0]+", "+v[1]+"%, "+v[2]+"%, "+v[3]+")"},T.to.hwb=function(){var v=p(arguments),E="";return v.length>=4&&v[3]!==1&&(E=", "+v[3]),"hwb("+v[0]+", "+v[1]+"%, "+v[2]+"%"+E+")"},T.to.keyword=function(v){return x[v.slice(0,3)]}},3639:(c,u,d)=>{var h=d(6138),p=d(4732),g=[].slice,x=["keyword","gray","hex"],y={};Object.keys(p).forEach((function(b){y[g.call(p[b].labels).sort().join("")]=b}));var T={};function w(b,C){if(!(this instanceof w))return new w(b,C);if(C&&C in x&&(C=null),C&&!(C in p))throw new Error("Unknown model: "+C);var _,A;if(b==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(b instanceof w)this.model=b.model,this.color=b.color.slice(),this.valpha=b.valpha;else if(typeof b=="string"){var M=h.get(b);if(M===null)throw new Error("Unable to parse color from string: "+b);this.model=M.model,A=p[this.model].channels,this.color=M.value.slice(0,A),this.valpha=typeof M.value[A]=="number"?M.value[A]:1}else if(b.length){this.model=C||"rgb",A=p[this.model].channels;var P=g.call(b,0,A);this.color=E(P,A),this.valpha=typeof b[A]=="number"?b[A]:1}else if(typeof b=="number")b&=16777215,this.model="rgb",this.color=[b>>16&255,b>>8&255,255&b],this.valpha=1;else{this.valpha=1;var I=Object.keys(b);"alpha"in b&&(I.splice(I.indexOf("alpha"),1),this.valpha=typeof b.alpha=="number"?b.alpha:0);var z=I.sort().join("");if(!(z in y))throw new Error("Unable to parse color from object: "+JSON.stringify(b));this.model=y[z];var q=p[this.model].labels,K=[];for(_=0;_<q.length;_++)K.push(b[q[_]]);this.color=E(K)}if(T[this.model])for(A=p[this.model].channels,_=0;_<A;_++){var X=T[this.model][_];X&&(this.color[_]=X(this.color[_]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function S(b,C,_){return(b=Array.isArray(b)?b:[b]).forEach((function(A){(T[A]||(T[A]=[]))[C]=_})),b=b[0],function(A){var M;return arguments.length?(_&&(A=_(A)),(M=this[b]()).color[C]=A,M):(M=this[b]().color[C],_&&(M=_(M)),M)}}function v(b){return function(C){return Math.max(0,Math.min(b,C))}}function E(b,C){for(var _=0;_<C;_++)typeof b[_]!="number"&&(b[_]=0);return b}w.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(b){var C=this.model in h.to?this:this.rgb(),_=(C=C.round(typeof b=="number"?b:1)).valpha===1?C.color:C.color.concat(this.valpha);return h.to[C.model](_)},percentString:function(b){var C=this.rgb().round(typeof b=="number"?b:1),_=C.valpha===1?C.color:C.color.concat(this.valpha);return h.to.rgb.percent(_)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var b={},C=p[this.model].channels,_=p[this.model].labels,A=0;A<C;A++)b[_[A]]=this.color[A];return this.valpha!==1&&(b.alpha=this.valpha),b},unitArray:function(){var b=this.rgb().color;return b[0]/=255,b[1]/=255,b[2]/=255,this.valpha!==1&&b.push(this.valpha),b},unitObject:function(){var b=this.rgb().object();return b.r/=255,b.g/=255,b.b/=255,this.valpha!==1&&(b.alpha=this.valpha),b},round:function(b){return b=Math.max(b||0,0),new w(this.color.map((function(C){return function(_){return(function(A,M){return Number(A.toFixed(M))})(_,C)}})(b)).concat(this.valpha),this.model)},alpha:function(b){return arguments.length?new w(this.color.concat(Math.max(0,Math.min(1,b))),this.model):this.valpha},red:S("rgb",0,v(255)),green:S("rgb",1,v(255)),blue:S("rgb",2,v(255)),hue:S(["hsl","hsv","hsl","hwb","hcg"],0,(function(b){return(b%360+360)%360})),saturationl:S("hsl",1,v(100)),lightness:S("hsl",2,v(100)),saturationv:S("hsv",1,v(100)),value:S("hsv",2,v(100)),chroma:S("hcg",1,v(100)),gray:S("hcg",2,v(100)),white:S("hwb",1,v(100)),wblack:S("hwb",2,v(100)),cyan:S("cmyk",0,v(100)),magenta:S("cmyk",1,v(100)),yellow:S("cmyk",2,v(100)),black:S("cmyk",3,v(100)),x:S("xyz",0,v(100)),y:S("xyz",1,v(100)),z:S("xyz",2,v(100)),l:S("lab",0,v(100)),a:S("lab",1),b:S("lab",2),keyword:function(b){return arguments.length?new w(b):p[this.model].keyword(this.color)},hex:function(b){return arguments.length?new w(b):h.to.hex(this.rgb().round().color)},rgbNumber:function(){var b=this.rgb().color;return(255&b[0])<<16|(255&b[1])<<8|255&b[2]},luminosity:function(){for(var b=this.rgb().color,C=[],_=0;_<b.length;_++){var A=b[_]/255;C[_]=A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4)}return .2126*C[0]+.7152*C[1]+.0722*C[2]},contrast:function(b){var C=this.luminosity(),_=b.luminosity();return C>_?(C+.05)/(_+.05):(_+.05)/(C+.05)},level:function(b){var C=this.contrast(b);return C>=7.1?"AAA":C>=4.5?"AA":""},isDark:function(){var b=this.rgb().color;return(299*b[0]+587*b[1]+114*b[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var b=this.rgb(),C=0;C<3;C++)b.color[C]=255-b.color[C];return b},lighten:function(b){var C=this.hsl();return C.color[2]+=C.color[2]*b,C},darken:function(b){var C=this.hsl();return C.color[2]-=C.color[2]*b,C},saturate:function(b){var C=this.hsl();return C.color[1]+=C.color[1]*b,C},desaturate:function(b){var C=this.hsl();return C.color[1]-=C.color[1]*b,C},whiten:function(b){var C=this.hwb();return C.color[1]+=C.color[1]*b,C},blacken:function(b){var C=this.hwb();return C.color[2]+=C.color[2]*b,C},grayscale:function(){var b=this.rgb().color,C=.3*b[0]+.59*b[1]+.11*b[2];return w.rgb(C,C,C)},fade:function(b){return this.alpha(this.valpha-this.valpha*b)},opaquer:function(b){return this.alpha(this.valpha+this.valpha*b)},rotate:function(b){var C=this.hsl(),_=C.color[0];return _=(_=(_+b)%360)<0?360+_:_,C.color[0]=_,C},mix:function(b,C){if(!b||!b.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof b);var _=b.rgb(),A=this.rgb(),M=C===void 0?.5:C,P=2*M-1,I=_.alpha()-A.alpha(),z=((P*I==-1?P:(P+I)/(1+P*I))+1)/2,q=1-z;return w.rgb(z*_.red()+q*A.red(),z*_.green()+q*A.green(),z*_.blue()+q*A.blue(),_.alpha()*M+A.alpha()*(1-M))}},Object.keys(p).forEach((function(b){if(x.indexOf(b)===-1){var C=p[b].channels;w.prototype[b]=function(){if(this.model===b)return new w(this);if(arguments.length)return new w(arguments,b);var _,A=typeof arguments[C]=="number"?C:this.valpha;return new w((_=p[this.model][b].raw(this.color),Array.isArray(_)?_:[_]).concat(A),b)},w[b]=function(_){return typeof _=="number"&&(_=E(g.call(arguments),C)),new w(_,b)}}})),c.exports=w},9784:c=>{var u,d=typeof Reflect=="object"?Reflect:null,h=d&&typeof d.apply=="function"?d.apply:function(A,M,P){return Function.prototype.apply.call(A,M,P)};u=d&&typeof d.ownKeys=="function"?d.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var p=Number.isNaN||function(A){return A!=A};function g(){g.init.call(this)}c.exports=g,c.exports.once=function(A,M){return new Promise((function(P,I){function z(K){A.removeListener(M,q),I(K)}function q(){typeof A.removeListener=="function"&&A.removeListener("error",z),P([].slice.call(arguments))}_(A,M,q,{once:!0}),M!=="error"&&(function(K,X,Y){typeof K.on=="function"&&_(K,"error",X,Y)})(A,z,{once:!0})}))},g.EventEmitter=g,g.prototype._events=void 0,g.prototype._eventsCount=0,g.prototype._maxListeners=void 0;var x=10;function y(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function T(A){return A._maxListeners===void 0?g.defaultMaxListeners:A._maxListeners}function w(A,M,P,I){var z,q,K,X;if(y(P),(q=A._events)===void 0?(q=A._events=Object.create(null),A._eventsCount=0):(q.newListener!==void 0&&(A.emit("newListener",M,P.listener?P.listener:P),q=A._events),K=q[M]),K===void 0)K=q[M]=P,++A._eventsCount;else if(typeof K=="function"?K=q[M]=I?[P,K]:[K,P]:I?K.unshift(P):K.push(P),(z=T(A))>0&&K.length>z&&!K.warned){K.warned=!0;var Y=new Error("Possible EventEmitter memory leak detected. "+K.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");Y.name="MaxListenersExceededWarning",Y.emitter=A,Y.type=M,Y.count=K.length,X=Y,console&&console.warn&&console.warn(X)}return A}function S(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function v(A,M,P){var I={fired:!1,wrapFn:void 0,target:A,type:M,listener:P},z=S.bind(I);return z.listener=P,I.wrapFn=z,z}function E(A,M,P){var I=A._events;if(I===void 0)return[];var z=I[M];return z===void 0?[]:typeof z=="function"?P?[z.listener||z]:[z]:P?(function(q){for(var K=new Array(q.length),X=0;X<K.length;++X)K[X]=q[X].listener||q[X];return K})(z):C(z,z.length)}function b(A){var M=this._events;if(M!==void 0){var P=M[A];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}function C(A,M){for(var P=new Array(M),I=0;I<M;++I)P[I]=A[I];return P}function _(A,M,P,I){if(typeof A.on=="function")I.once?A.once(M,P):A.on(M,P);else{if(typeof A.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A);A.addEventListener(M,(function z(q){I.once&&A.removeEventListener(M,z),P(q)}))}}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return x},set:function(A){if(typeof A!="number"||A<0||p(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");x=A}}),g.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},g.prototype.setMaxListeners=function(A){if(typeof A!="number"||A<0||p(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},g.prototype.getMaxListeners=function(){return T(this)},g.prototype.emit=function(A){for(var M=[],P=1;P<arguments.length;P++)M.push(arguments[P]);var I=A==="error",z=this._events;if(z!==void 0)I=I&&z.error===void 0;else if(!I)return!1;if(I){var q;if(M.length>0&&(q=M[0]),q instanceof Error)throw q;var K=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw K.context=q,K}var X=z[A];if(X===void 0)return!1;if(typeof X=="function")h(X,this,M);else{var Y=X.length,H=C(X,Y);for(P=0;P<Y;++P)h(H[P],this,M)}return!0},g.prototype.addListener=function(A,M){return w(this,A,M,!1)},g.prototype.on=g.prototype.addListener,g.prototype.prependListener=function(A,M){return w(this,A,M,!0)},g.prototype.once=function(A,M){return y(M),this.on(A,v(this,A,M)),this},g.prototype.prependOnceListener=function(A,M){return y(M),this.prependListener(A,v(this,A,M)),this},g.prototype.removeListener=function(A,M){var P,I,z,q,K;if(y(M),(I=this._events)===void 0)return this;if((P=I[A])===void 0)return this;if(P===M||P.listener===M)--this._eventsCount==0?this._events=Object.create(null):(delete I[A],I.removeListener&&this.emit("removeListener",A,P.listener||M));else if(typeof P!="function"){for(z=-1,q=P.length-1;q>=0;q--)if(P[q]===M||P[q].listener===M){K=P[q].listener,z=q;break}if(z<0)return this;z===0?P.shift():(function(X,Y){for(;Y+1<X.length;Y++)X[Y]=X[Y+1];X.pop()})(P,z),P.length===1&&(I[A]=P[0]),I.removeListener!==void 0&&this.emit("removeListener",A,K||M)}return this},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(A){var M,P,I;if((P=this._events)===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[A]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete P[A]),this;if(arguments.length===0){var z,q=Object.keys(P);for(I=0;I<q.length;++I)(z=q[I])!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(M=P[A])=="function")this.removeListener(A,M);else if(M!==void 0)for(I=M.length-1;I>=0;I--)this.removeListener(A,M[I]);return this},g.prototype.listeners=function(A){return E(this,A,!0)},g.prototype.rawListeners=function(A){return E(this,A,!1)},g.listenerCount=function(A,M){return typeof A.listenerCount=="function"?A.listenerCount(M):b.call(A,M)},g.prototype.listenerCount=b,g.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]}},8336:c=>{c.exports=function(u){return!(!u||typeof u=="string")&&(u instanceof Array||Array.isArray(u)||u.length>=0&&(u.splice instanceof Function||Object.getOwnPropertyDescriptor(u,u.length-1)&&u.constructor.name!=="String"))}},3989:c=>{var u="__lodash_placeholder__",d=32,h=1/0,p=NaN,g=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",d],["partialRight",64],["rearg",256]],x="[object Function]",y="[object GeneratorFunction]",T=/^\s+|\s+$/g,w=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,S=/\{\n\/\* \[wrapped with (.+)\] \*/,v=/,? & /,E=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,C=/^\[object .+?Constructor\]$/,_=/^0o[0-7]+$/i,A=/^(?:0|[1-9]\d*)$/,M=parseInt,P=typeof am=="object"&&am&&am.Object===Object&&am,I=typeof self=="object"&&self&&self.Object===Object&&self,z=P||I||Function("return this")();function q(Ce,pe,Ne){switch(Ne.length){case 0:return Ce.call(pe);case 1:return Ce.call(pe,Ne[0]);case 2:return Ce.call(pe,Ne[0],Ne[1]);case 3:return Ce.call(pe,Ne[0],Ne[1],Ne[2])}return Ce.apply(pe,Ne)}function K(Ce,pe){return!!(Ce&&Ce.length)&&(function(Ne,He,at){if(He!=He)return(function(Ct,Wt,zt,Tt){for(var Yt=Ct.length,Ft=zt+-1;++Ft<Yt;)if(Wt(Ct[Ft],Ft,Ct))return Ft;return-1})(Ne,X,at);for(var Et=at-1,xt=Ne.length;++Et<xt;)if(Ne[Et]===He)return Et;return-1})(Ce,pe,0)>-1}function X(Ce){return Ce!=Ce}function Y(Ce,pe){for(var Ne=-1,He=Ce.length,at=0,Et=[];++Ne<He;){var xt=Ce[Ne];xt!==pe&&xt!==u||(Ce[Ne]=u,Et[at++]=Ne)}return Et}var H,Z,ee,ae=Function.prototype,re=Object.prototype,$=z["__core-js_shared__"],B=(H=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",F=ae.toString,D=re.hasOwnProperty,V=re.toString,J=RegExp("^"+F.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=Object.create,oe=Math.max,he=Math.min,Ee=(Z=Ie(Object,"defineProperty"),(ee=Ie.name)&&ee.length>2?Z:void 0);function te(Ce){if(!Ve(Ce)||(function(Ne){return!!B&&B in Ne})(Ce))return!1;var pe=(function(Ne){var He=Ve(Ne)?V.call(Ne):"";return He==x||He==y})(Ce)||(function(Ne){var He=!1;if(Ne!=null&&typeof Ne.toString!="function")try{He=!!(Ne+"")}catch{}return He})(Ce)?J:C;return pe.test((function(Ne){if(Ne!=null){try{return F.call(Ne)}catch{}try{return Ne+""}catch{}}return""})(Ce))}function ie(Ce){return function(){var pe=arguments;switch(pe.length){case 0:return new Ce;case 1:return new Ce(pe[0]);case 2:return new Ce(pe[0],pe[1]);case 3:return new Ce(pe[0],pe[1],pe[2]);case 4:return new Ce(pe[0],pe[1],pe[2],pe[3]);case 5:return new Ce(pe[0],pe[1],pe[2],pe[3],pe[4]);case 6:return new Ce(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5]);case 7:return new Ce(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6])}var Ne,He=Ve(Ne=Ce.prototype)?ne(Ne):{},at=Ce.apply(He,pe);return Ve(at)?at:He}}function le(Ce,pe,Ne,He,at,Et,xt,Ct,Wt,zt){var Tt=128&pe,Yt=1&pe,Ft=2&pe,Xt=24&pe,dn=512&pe,ut=Ft?void 0:ie(Ce);return function mt(){for(var ft=arguments.length,bt=Array(ft),Qt=ft;Qt--;)bt[Qt]=arguments[Qt];if(Xt)var kn=we(mt),Rr=(function(Cn,pr){for(var In=Cn.length,Jt=0;In--;)Cn[In]===pr&&Jt++;return Jt})(bt,kn);if(He&&(bt=(function(Cn,pr,In,Jt){for(var er=-1,Yr=Cn.length,mr=In.length,en=-1,xn=pr.length,Mr=oe(Yr-mr,0),bi=Array(xn+Mr),To=!Jt;++en<xn;)bi[en]=pr[en];for(;++er<mr;)(To||er<Yr)&&(bi[In[er]]=Cn[er]);for(;Mr--;)bi[en++]=Cn[er++];return bi})(bt,He,at,Xt)),Et&&(bt=(function(Cn,pr,In,Jt){for(var er=-1,Yr=Cn.length,mr=-1,en=In.length,xn=-1,Mr=pr.length,bi=oe(Yr-en,0),To=Array(bi+Mr),xf=!Jt;++er<bi;)To[er]=Cn[er];for(var el=er;++xn<Mr;)To[el+xn]=pr[xn];for(;++mr<en;)(xf||er<Yr)&&(To[el+In[mr]]=Cn[er++]);return To})(bt,Et,xt,Xt)),ft-=Rr,Xt&&ft<zt){var Ar=Y(bt,kn);return Se(Ce,pe,le,mt.placeholder,Ne,bt,Ar,Ct,Wt,zt-ft)}var ir=Yt?Ne:this,ri=Ft?ir[Ce]:Ce;return ft=bt.length,Ct?bt=(function(Cn,pr){for(var In=Cn.length,Jt=he(pr.length,In),er=(function(mr,en){var xn=-1,Mr=mr.length;for(en||(en=Array(Mr));++xn<Mr;)en[xn]=mr[xn];return en})(Cn);Jt--;){var Yr=pr[Jt];Cn[Jt]=Ue(Yr,In)?er[Yr]:void 0}return Cn})(bt,Ct):dn&&ft>1&&bt.reverse(),Tt&&Wt<ft&&(bt.length=Wt),this&&this!==z&&this instanceof mt&&(ri=ut||ie(ri)),ri.apply(ir,bt)}}function Se(Ce,pe,Ne,He,at,Et,xt,Ct,Wt,zt){var Tt=8&pe;pe|=Tt?d:64,4&(pe&=~(Tt?64:d))||(pe&=-4);var Yt=Ne(Ce,pe,at,Tt?Et:void 0,Tt?xt:void 0,Tt?void 0:Et,Tt?void 0:xt,Ct,Wt,zt);return Yt.placeholder=He,De(Yt,Ce,pe)}function Re(Ce,pe,Ne,He,at,Et,xt,Ct){var Wt=2&pe;if(!Wt&&typeof Ce!="function")throw new TypeError("Expected a function");var zt=He?He.length:0;if(zt||(pe&=-97,He=at=void 0),xt=xt===void 0?xt:oe(dt(xt),0),Ct=Ct===void 0?Ct:dt(Ct),zt-=at?at.length:0,64&pe){var Tt=He,Yt=at;He=at=void 0}var Ft=[Ce,pe,Ne,He,at,Tt,Yt,Et,xt,Ct];if(Ce=Ft[0],pe=Ft[1],Ne=Ft[2],He=Ft[3],at=Ft[4],!(Ct=Ft[9]=Ft[9]==null?Wt?0:Ce.length:oe(Ft[9]-zt,0))&&24&pe&&(pe&=-25),pe&&pe!=1)Xt=pe==8||pe==16?(function(dn,ut,mt){var ft=ie(dn);return function bt(){for(var Qt=arguments.length,kn=Array(Qt),Rr=Qt,Ar=we(bt);Rr--;)kn[Rr]=arguments[Rr];var ir=Qt<3&&kn[0]!==Ar&&kn[Qt-1]!==Ar?[]:Y(kn,Ar);return(Qt-=ir.length)<mt?Se(dn,ut,le,bt.placeholder,void 0,kn,ir,void 0,void 0,mt-Qt):q(this&&this!==z&&this instanceof bt?ft:dn,this,kn)}})(Ce,pe,Ct):pe!=d&&pe!=33||at.length?le.apply(void 0,Ft):(function(dn,ut,mt,ft){var bt=1&ut,Qt=ie(dn);return function kn(){for(var Rr=-1,Ar=arguments.length,ir=-1,ri=ft.length,Cn=Array(ri+Ar),pr=this&&this!==z&&this instanceof kn?Qt:dn;++ir<ri;)Cn[ir]=ft[ir];for(;Ar--;)Cn[ir++]=arguments[++Rr];return q(pr,bt?mt:this,Cn)}})(Ce,pe,Ne,He);else var Xt=(function(dn,ut,mt){var ft=1&ut,bt=ie(dn);return function Qt(){return(this&&this!==z&&this instanceof Qt?bt:dn).apply(ft?mt:this,arguments)}})(Ce,pe,Ne);return De(Xt,Ce,pe)}function we(Ce){return Ce.placeholder}function Ie(Ce,pe){var Ne=(function(He,at){return He?.[at]})(Ce,pe);return te(Ne)?Ne:void 0}function Pe(Ce){var pe=Ce.match(S);return pe?pe[1].split(v):[]}function ye(Ce,pe){var Ne=pe.length,He=Ne-1;return pe[He]=(Ne>1?"& ":"")+pe[He],pe=pe.join(Ne>2?", ":" "),Ce.replace(w,`{
108
+ /* [wrapped with `+pe+`] */
109
+ `)}function Ue(Ce,pe){return!!(pe=pe??9007199254740991)&&(typeof Ce=="number"||A.test(Ce))&&Ce>-1&&Ce%1==0&&Ce<pe}var De=Ee?function(Ce,pe,Ne){var He,at=pe+"";return Ee(Ce,"toString",{configurable:!0,enumerable:!1,value:(He=ye(at,We(Pe(at),Ne)),function(){return He})})}:function(Ce){return Ce};function We(Ce,pe){return(function(Ne,He){for(var at=-1,Et=Ne?Ne.length:0;++at<Et&&He(Ne[at],at,Ne)!==!1;);})(g,(function(Ne){var He="_."+Ne[0];pe&Ne[1]&&!K(Ce,He)&&Ce.push(He)})),Ce.sort()}function ze(Ce,pe,Ne){var He=Re(Ce,8,void 0,void 0,void 0,void 0,void 0,pe=Ne?void 0:pe);return He.placeholder=ze.placeholder,He}function Ve(Ce){var pe=typeof Ce;return!!Ce&&(pe=="object"||pe=="function")}function qe(Ce){return Ce?(Ce=(function(pe){if(typeof pe=="number")return pe;if((function(at){return typeof at=="symbol"||(function(Et){return!!Et&&typeof Et=="object"})(at)&&V.call(at)=="[object Symbol]"})(pe))return p;if(Ve(pe)){var Ne=typeof pe.valueOf=="function"?pe.valueOf():pe;pe=Ve(Ne)?Ne+"":Ne}if(typeof pe!="string")return pe===0?pe:+pe;pe=pe.replace(T,"");var He=b.test(pe);return He||_.test(pe)?M(pe.slice(2),He?2:8):E.test(pe)?p:+pe})(Ce))===h||Ce===-1/0?17976931348623157e292*(Ce<0?-1:1):Ce==Ce?Ce:0:Ce===0?Ce:0}function dt(Ce){var pe=qe(Ce),Ne=pe%1;return pe==pe?Ne?pe-Ne:pe:0}ze.placeholder={},c.exports=ze},301:(c,u,d)=>{var h=d(8336),p=Array.prototype.concat,g=Array.prototype.slice,x=c.exports=function(y){for(var T=[],w=0,S=y.length;w<S;w++){var v=y[w];h(v)?T=p.call(T,g.call(v)):T.push(v)}return T};x.wrap=function(y){return function(){return y(x(arguments))}}},4119:c=>{c.exports=n}},i={};function s(c){var u=i[c];if(u!==void 0)return u.exports;var d=i[c]={exports:{}};return r[c](d,d.exports,s),d.exports}s.n=c=>{var u=c&&c.__esModule?()=>c.default:()=>c;return s.d(u,{a:u}),u},s.d=(c,u)=>{for(var d in u)s.o(u,d)&&!s.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},s.o=(c,u)=>Object.prototype.hasOwnProperty.call(c,u),s.r=c=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var l={};return(()=>{function c(Q){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},c(Q)}function u(Q){var L=(function(U,G){if(c(U)!="object"||!U)return U;var ue=U[Symbol.toPrimitive];if(ue!==void 0){var _e=ue.call(U,G);if(c(_e)!="object")return _e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(U)})(Q,"string");return c(L)=="symbol"?L:L+""}function d(Q,L,U){return(L=u(L))in Q?Object.defineProperty(Q,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):Q[L]=U,Q}function h(Q,L){var U=Object.keys(Q);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(Q);L&&(G=G.filter((function(ue){return Object.getOwnPropertyDescriptor(Q,ue).enumerable}))),U.push.apply(U,G)}return U}function p(Q){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?h(Object(U),!0).forEach((function(G){d(Q,G,U[G])})):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(U)):h(Object(U)).forEach((function(G){Object.defineProperty(Q,G,Object.getOwnPropertyDescriptor(U,G))}))}return Q}function g(Q,L){if(!(Q instanceof L))throw new TypeError("Cannot call a class as a function")}function x(Q,L){for(var U=0;U<L.length;U++){var G=L[U];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(Q,u(G.key),G)}}function y(Q,L,U){return L&&x(Q.prototype,L),U&&x(Q,U),Object.defineProperty(Q,"prototype",{writable:!1}),Q}function T(Q){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(L){return L.__proto__||Object.getPrototypeOf(L)},T(Q)}function w(){try{var Q=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(w=function(){return!!Q})()}function S(Q,L){if(L&&(c(L)=="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U})(Q)}function v(Q,L,U){return L=T(L),S(Q,w()?Reflect.construct(L,U||[],T(Q).constructor):L.apply(Q,U))}function E(Q,L){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(U,G){return U.__proto__=G,U},E(Q,L)}function b(Q,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");Q.prototype=Object.create(L&&L.prototype,{constructor:{value:Q,writable:!0,configurable:!0}}),Object.defineProperty(Q,"prototype",{writable:!1}),L&&E(Q,L)}s.r(l),s.d(l,{default:()=>Hs});var C=s(4119),_=s.n(C);function A(){var Q=this.constructor.getDerivedStateFromProps(this.props,this.state);Q!=null&&this.setState(Q)}function M(Q){this.setState((function(L){var U=this.constructor.getDerivedStateFromProps(Q,L);return U??null}).bind(this))}function P(Q,L){try{var U=this.props,G=this.state;this.props=Q,this.state=L,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(U,G)}finally{this.props=U,this.state=G}}function I(Q){var L=Q.prototype;if(!L||!L.isReactComponent)throw new Error("Can only polyfill class components");if(typeof Q.getDerivedStateFromProps!="function"&&typeof L.getSnapshotBeforeUpdate!="function")return Q;var U=null,G=null,ue=null;if(typeof L.componentWillMount=="function"?U="componentWillMount":typeof L.UNSAFE_componentWillMount=="function"&&(U="UNSAFE_componentWillMount"),typeof L.componentWillReceiveProps=="function"?G="componentWillReceiveProps":typeof L.UNSAFE_componentWillReceiveProps=="function"&&(G="UNSAFE_componentWillReceiveProps"),typeof L.componentWillUpdate=="function"?ue="componentWillUpdate":typeof L.UNSAFE_componentWillUpdate=="function"&&(ue="UNSAFE_componentWillUpdate"),U!==null||G!==null||ue!==null){var _e=Q.displayName||Q.name,ge=typeof Q.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
110
+
111
+ `+_e+" uses "+ge+" but also contains the following legacy lifecycles:"+(U!==null?`
112
+ `+U:"")+(G!==null?`
113
+ `+G:"")+(ue!==null?`
114
+ `+ue:"")+`
115
+
116
+ The above lifecycles should be removed. Learn more about this warning here:
117
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof Q.getDerivedStateFromProps=="function"&&(L.componentWillMount=A,L.componentWillReceiveProps=M),typeof L.getSnapshotBeforeUpdate=="function"){if(typeof L.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");L.componentWillUpdate=P;var ce=L.componentDidUpdate;L.componentDidUpdate=function(ke,$e,Be){var Ke=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Be;ce.call(this,ke,$e,Ke)}}return Q}function z(Q,L){if(Q==null)return{};var U={};for(var G in Q)if({}.hasOwnProperty.call(Q,G)){if(L.includes(G))continue;U[G]=Q[G]}return U}function q(Q,L){if(Q==null)return{};var U,G,ue=z(Q,L);if(Object.getOwnPropertySymbols){var _e=Object.getOwnPropertySymbols(Q);for(G=0;G<_e.length;G++)U=_e[G],L.includes(U)||{}.propertyIsEnumerable.call(Q,U)&&(ue[U]=Q[U])}return ue}function K(Q,L){if(L&&Q?.constructor===L)return"bigNumber";var U=(function(G){return{}.toString.call(G).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(Q);return U==="number"&&(U=isNaN(Q)?"nan":(0|Q)!=Q?"float":"integer"),U}function X(Q){return Q.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}A.__suppressDeprecationWarning=!0,M.__suppressDeprecationWarning=!0,P.__suppressDeprecationWarning=!0;var Y={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},H={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"};const Z={globalFontFamily:"monospace",globalCursor:"default",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px",commaColor:"#666",commaFontSize:"12px",commaMarginRight:"4px"};function ee(Q,L){(L==null||L>Q.length)&&(L=Q.length);for(var U=0,G=Array(L);U<L;U++)G[U]=Q[U];return G}function ae(Q,L){if(Q){if(typeof Q=="string")return ee(Q,L);var U={}.toString.call(Q).slice(8,-1);return U==="Object"&&Q.constructor&&(U=Q.constructor.name),U==="Map"||U==="Set"?Array.from(Q):U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U)?ee(Q,L):void 0}}function re(Q,L){return(function(U){if(Array.isArray(U))return U})(Q)||(function(U,G){var ue=U==null?null:typeof Symbol<"u"&&U[Symbol.iterator]||U["@@iterator"];if(ue!=null){var _e,ge,ce,ke,$e=[],Be=!0,Ke=!1;try{if(ce=(ue=ue.call(U)).next,G===0){if(Object(ue)!==ue)return;Be=!1}else for(;!(Be=(_e=ce.call(ue)).done)&&($e.push(_e.value),$e.length!==G);Be=!0);}catch(tt){Ke=!0,ge=tt}finally{try{if(!Be&&ue.return!=null&&(ke=ue.return(),Object(ke)!==ke))return}finally{if(Ke)throw ge}}return $e}})(Q,L)||ae(Q,L)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var $=s(9446),B=s(3639),F=s.n(B),D=s(3989),V=s.n(D);function J(Q,L){var U=Object.keys(Q);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(Q);L&&(G=G.filter((function(ue){return Object.getOwnPropertyDescriptor(Q,ue).enumerable}))),U.push.apply(U,G)}return U}function ne(Q){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?J(Object(U),!0).forEach((function(G){d(Q,G,U[G])})):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(U)):J(Object(U)).forEach((function(G){Object.defineProperty(Q,G,Object.getOwnPropertyDescriptor(U,G))}))}return Q}var oe=$.default,he=Object.keys(oe),Ee=function(Q){var L,U=(function(ke){var $e=ke[0]/255,Be=ke[1]/255,Ke=ke[2]/255;return[.299*$e+.587*Be+.114*Ke,-.14713*$e+-.28886*Be+.436*Ke,.615*$e+-.51499*Be+-.10001*Ke]})(F()(Q).array()),G=re(U,3),ue=G[0],_e=G[1],ge=G[2],ce=(function(ke){var $e,Be,Ke,tt=ke[0],Ge=ke[1],At=ke[2];return $e=1*tt+0*Ge+1.13983*At,Be=1*tt+-.39465*Ge+-.5806*At,Ke=1*tt+2.02311*Ge+0*At,[255*($e=Math.min(Math.max(0,$e),1)),255*(Be=Math.min(Math.max(0,Be),1)),255*(Ke=Math.min(Math.max(0,Ke),1))]})([(L=ue,L<.25?1:L<.5?.9-L:1.1-L),_e,ge]);return F().rgb(ce).hex()},te=function(Q){return function(L){return{className:[L.className,Q.className].filter(Boolean).join(" "),style:ne(ne({},L.style||{}),Q.style||{})}}},ie=function(Q,L){var U=Object.keys(L);for(var G in Q)U.indexOf(G)===-1&&U.push(G);return U.reduce((function(ue,_e){return ue[_e]=(function(ge,ce){if(ge===void 0)return ce;if(ce===void 0)return ge;var ke=c(ge),$e=c(ce);switch(ke){case"string":switch($e){case"string":return[ce,ge].filter(Boolean).join(" ");case"object":return te({className:ge,style:ce});case"function":return function(Be){for(var Ke=arguments.length,tt=new Array(Ke>1?Ke-1:0),Ge=1;Ge<Ke;Ge++)tt[Ge-1]=arguments[Ge];return te({className:ge})(ce.apply(void 0,[Be].concat(tt)))}}break;case"object":switch($e){case"string":return te({className:ce,style:ge});case"object":return ne(ne({},ce),ge);case"function":return function(Be){for(var Ke=arguments.length,tt=new Array(Ke>1?Ke-1:0),Ge=1;Ge<Ke;Ge++)tt[Ge-1]=arguments[Ge];return te({style:ge})(ce.apply(void 0,[Be].concat(tt)))}}break;case"function":switch($e){case"string":return function(Be){for(var Ke=arguments.length,tt=new Array(Ke>1?Ke-1:0),Ge=1;Ge<Ke;Ge++)tt[Ge-1]=arguments[Ge];return ge.apply(void 0,[te(Be)({className:ce})].concat(tt))};case"object":return function(Be){for(var Ke=arguments.length,tt=new Array(Ke>1?Ke-1:0),Ge=1;Ge<Ke;Ge++)tt[Ge-1]=arguments[Ge];return ge.apply(void 0,[te(Be)({style:ce})].concat(tt))};case"function":return function(Be){for(var Ke=arguments.length,tt=new Array(Ke>1?Ke-1:0),Ge=1;Ge<Ke;Ge++)tt[Ge-1]=arguments[Ge];return ge.apply(void 0,[ce.apply(void 0,[Be].concat(tt))].concat(tt))}}}})(Q[_e],L[_e]),ue}),{})},le=function(Q,L){for(var U=arguments.length,G=new Array(U>2?U-2:0),ue=2;ue<U;ue++)G[ue-2]=arguments[ue];if(L===null)return Q;Array.isArray(L)||(L=[L]);var _e=L.map((function(ge){return Q[ge]})).filter(Boolean).reduce((function(ge,ce){return typeof ce=="string"?ge.className=[ge.className,ce].filter(Boolean).join(" "):c(ce)==="object"?ge.style=ne(ne({},ge.style),ce):typeof ce=="function"&&(ge=ne(ne({},ge),ce.apply(void 0,[ge].concat(G)))),ge}),{className:"",style:{}});return _e.className||delete _e.className,Object.keys(_e.style).length===0&&delete _e.style,_e},Se=function(Q){return Object.keys(Q).reduce((function(L,U){return L[U]=/^base/.test(U)?Ee(Q[U]):U==="scheme"?Q[U]+":inverted":Q[U],L}),{})},Re=V()((function(Q){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},G=L.defaultBase16,ue=G===void 0?oe:G,_e=L.base16Themes,ge=Ie(U,_e===void 0?null:_e);ge&&(U=ne(ne({},ge),U));for(var ce=he.reduce((function(At,Mt){return At[Mt]=U[Mt]||ue[Mt],At}),{}),ke=Object.keys(U).reduce((function(At,Mt){return he.indexOf(Mt)===-1&&(At[Mt]=U[Mt]),At}),{}),$e=Q(ce),Be=ie(ke,$e),Ke=arguments.length,tt=new Array(Ke>3?Ke-3:0),Ge=3;Ge<Ke;Ge++)tt[Ge-3]=arguments[Ge];return V()(le,2).apply(void 0,[Be].concat(tt))}),3),we=function(Q){return!!Q.extend},Ie=function(Q,L){if(Q&&we(Q)&&Q.extend&&(Q=Q.extend),typeof Q=="string"){var U=re(Q.split(":"),2),G=U[0],ue=U[1];Q=L?L[G]:$[G],ue==="inverted"&&(Q=Se(Q))}return Q&&Object.prototype.hasOwnProperty.call(Q,"base00")?Q:void 0},Pe=function(Q){var L=(function(U){return{backgroundColor:U.base00,ellipsisColor:U.base09,braceColor:U.base07,expandedIcon:U.base0D,collapsedIcon:U.base0E,keyColor:U.base07,arrayKeyColor:U.base0C,objectSize:U.base04,copyToClipboard:U.base0F,copyToClipboardCheck:U.base0D,objectBorder:U.base02,dataTypes:{boolean:U.base0E,date:U.base0D,float:U.base0B,function:U.base0D,integer:U.base0F,string:U.base09,nan:U.base08,null:U.base0A,undefined:U.base05,regexp:U.base0A,background:U.base02,bigNumber:U.base09},editVariable:{editIcon:U.base0E,cancelIcon:U.base09,removeIcon:U.base09,addIcon:U.base0E,checkIcon:U.base0E,background:U.base01,color:U.base0A,border:U.base07},addKeyModal:{background:U.base05,border:U.base04,color:U.base0A,labelColor:U.base01},validationFailure:{background:U.base09,iconColor:U.base01,fontColor:U.base01}}})(Q);return{"app-container":{fontFamily:Z.globalFontFamily,cursor:Z.globalCursor,backgroundColor:L.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:L.ellipsisColor,fontSize:Z.ellipsisFontSize,lineHeight:Z.ellipsisLineHeight,cursor:Z.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:Z.braceCursor,fontWeight:Z.braceFontWeight,color:L.braceColor},"expanded-icon":{color:L.expandedIcon},"collapsed-icon":{color:L.collapsedIcon},colon:{display:"inline-block",margin:Z.keyMargin,color:L.keyColor,verticalAlign:"top"},objectKeyVal:function(U,G){return{style:p({paddingTop:Z.keyValPaddingTop,paddingRight:Z.keyValPaddingRight,paddingBottom:Z.keyValPaddingBottom,borderLeft:Z.keyValBorderLeft+" "+L.objectBorder,":hover":{paddingLeft:G.paddingLeft-1+"px",borderLeft:Z.keyValBorderHover+" "+L.objectBorder}},G)}},"object-key-val-no-border":{padding:Z.keyValPadding},"pushed-content":{marginLeft:Z.pushedContentMarginLeft},variableValue:function(U,G){return{style:p({display:"inline-block",paddingRight:Z.variableValuePaddingRight,position:"relative"},G)}},"object-name":{display:"inline-block",color:L.keyColor,letterSpacing:Z.keyLetterSpacing,fontStyle:Z.keyFontStyle,verticalAlign:Z.keyVerticalAlign,opacity:Z.keyOpacity,":hover":{opacity:Z.keyOpacityHover}},"array-key":{display:"inline-block",color:L.arrayKeyColor,letterSpacing:Z.keyLetterSpacing,fontStyle:Z.keyFontStyle,verticalAlign:Z.keyVerticalAlign,opacity:Z.keyOpacity,":hover":{opacity:Z.keyOpacityHover}},"object-size":{color:L.objectSize,borderRadius:Z.objectSizeBorderRadius,fontStyle:Z.objectSizeFontStyle,margin:Z.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:Z.dataTypeFontSize,marginRight:Z.dataTypeMarginRight,opacity:Z.datatypeOpacity},boolean:{display:"inline-block",color:L.dataTypes.boolean},date:{display:"inline-block",color:L.dataTypes.date},"date-value":{marginLeft:Z.dateValueMarginLeft},float:{display:"inline-block",color:L.dataTypes.float},function:{display:"inline-block",color:L.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:L.dataTypes.integer},bigNumber:{display:"inline-block",color:L.dataTypes.bigNumber},string:{display:"inline-block",color:L.dataTypes.string},nan:{display:"inline-block",color:L.dataTypes.nan,fontSize:Z.nanFontSize,fontWeight:Z.nanFontWeight,backgroundColor:L.dataTypes.background,padding:Z.nanPadding,borderRadius:Z.nanBorderRadius},null:{display:"inline-block",color:L.dataTypes.null,fontSize:Z.nullFontSize,fontWeight:Z.nullFontWeight,backgroundColor:L.dataTypes.background,padding:Z.nullPadding,borderRadius:Z.nullBorderRadius},undefined:{display:"inline-block",color:L.dataTypes.undefined,fontSize:Z.undefinedFontSize,padding:Z.undefinedPadding,borderRadius:Z.undefinedBorderRadius,backgroundColor:L.dataTypes.background},regexp:{display:"inline-block",color:L.dataTypes.regexp},"copy-to-clipboard":{cursor:Z.clipboardCursor},"copy-icon":{color:L.copyToClipboard,fontSize:Z.iconFontSize,marginRight:Z.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:L.copyToClipboardCheck,marginLeft:Z.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:Z.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:Z.metaDataPadding},"icon-container":{display:"inline-block",width:Z.iconContainerWidth},tooltip:{padding:Z.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:L.editVariable.removeIcon,cursor:Z.iconCursor,fontSize:Z.iconFontSize,marginRight:Z.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:L.editVariable.addIcon,cursor:Z.iconCursor,fontSize:Z.iconFontSize,marginRight:Z.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:L.editVariable.editIcon,cursor:Z.iconCursor,fontSize:Z.iconFontSize,marginRight:Z.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:Z.iconCursor,color:L.editVariable.checkIcon,fontSize:Z.iconFontSize,paddingRight:Z.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:Z.iconCursor,color:L.editVariable.cancelIcon,fontSize:Z.iconFontSize,paddingRight:Z.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:Z.editInputMinWidth,borderRadius:Z.editInputBorderRadius,backgroundColor:L.editVariable.background,color:L.editVariable.color,padding:Z.editInputPadding,marginRight:Z.editInputMarginRight,fontFamily:Z.editInputFontFamily},"detected-row":{paddingTop:Z.detectedRowPaddingTop},"key-modal-request":{position:Z.addKeyCoverPosition,top:Z.addKeyCoverPositionPx,left:Z.addKeyCoverPositionPx,right:Z.addKeyCoverPositionPx,bottom:Z.addKeyCoverPositionPx,backgroundColor:Z.addKeyCoverBackground},"key-modal":{width:Z.addKeyModalWidth,backgroundColor:L.addKeyModal.background,marginLeft:Z.addKeyModalMargin,marginRight:Z.addKeyModalMargin,padding:Z.addKeyModalPadding,borderRadius:Z.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:L.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:L.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:L.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:L.addKeyModal.labelColor,fontSize:Z.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:L.editVariable.addIcon,fontSize:Z.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:L.ellipsisColor,fontSize:Z.ellipsisFontSize,lineHeight:Z.ellipsisLineHeight,cursor:Z.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:L.validationFailure.fontColor,backgroundColor:L.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:L.validationFailure.iconColor,fontSize:Z.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:Z.commaColor,fontSize:Z.commaFontSize,marginRight:Z.commaMarginRight,cursor:"default"}}};function ye(Q,L,U){return Q||console.error("theme has not been set"),(function(G){var ue=Y;return G!==!1&&G!=="none"||(ue=H),Re(Pe,{defaultBase16:ue})(G)})(Q)(L,U)}var Ue=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=(U.rjvId,U.type_name),ue=U.displayDataTypes,_e=U.theme;return ue?_().createElement("span",Object.assign({className:"data-type-label"},ye(_e,"data-type-label")),G):null}}])})(_().PureComponent),De=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props;return _().createElement("div",ye(U.theme,"boolean"),_().createElement(Ue,Object.assign({type_name:"bool"},U)),U.value?"true":"false")}}])})(_().PureComponent),We=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props;return _().createElement("div",ye(U.theme,"date"),_().createElement(Ue,Object.assign({type_name:"date"},U)),_().createElement("span",Object.assign({className:"date-value"},ye(U.theme,"date-value")),U.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(_().PureComponent),ze=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props;return _().createElement("div",ye(U.theme,"float"),_().createElement(Ue,Object.assign({type_name:"float"},U)),this.props.value)}}])})(_().PureComponent);function Ve(Q){return(function(L){if(Array.isArray(L))return ee(L)})(Q)||(function(L){if(typeof Symbol<"u"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)})(Q)||ae(Q)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
119
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var qe=s(9784),dt=(function(){return y((function Q(){g(this,Q),this.handler=function(){}}),[{key:"register",value:function(Q){this.handler=Q}},{key:"dispatch",value:function(Q){var L;(L=this.handler)===null||L===void 0||L.call(this,Q)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new dt);const Ce=globalThis.__globalDispatcherInstance;var pe=new((function(Q){function L(){var U;g(this,L);for(var G=arguments.length,ue=new Array(G),_e=0;_e<G;_e++)ue[_e]=arguments[_e];return(U=v(this,L,[].concat(ue))).objects={},U.set=function(ge,ce,ke,$e){U.objects[ge]===void 0&&(U.objects[ge]={}),U.objects[ge][ce]===void 0&&(U.objects[ge][ce]={}),U.objects[ge][ce][ke]=$e},U.get=function(ge,ce,ke,$e){return U.objects[ge]===void 0||U.objects[ge][ce]===void 0||U.objects[ge][ce][ke]==null?$e:U.objects[ge][ce][ke]},U.handleAction=function(ge){var ce=ge.rjvId,ke=ge.data;switch(ge.name){case"RESET":U.emit("reset-"+ce);break;case"VARIABLE_UPDATED":ge.data.updated_src=U.updateSrc(ce,ke),U.set(ce,"action","variable-update",p(p({},ke),{},{type:"variable-edited"})),U.emit("variable-update-"+ce);break;case"VARIABLE_REMOVED":ge.data.updated_src=U.updateSrc(ce,ke),U.set(ce,"action","variable-update",p(p({},ke),{},{type:"variable-removed"})),U.emit("variable-update-"+ce);break;case"VARIABLE_ADDED":ge.data.updated_src=U.updateSrc(ce,ke),U.set(ce,"action","variable-update",p(p({},ke),{},{type:"variable-added"})),U.emit("variable-update-"+ce);break;case"ADD_VARIABLE_KEY_REQUEST":U.set(ce,"action","new-key-request",ke),U.emit("add-key-request-"+ce)}},U.updateSrc=function(ge,ce){var ke=ce.name,$e=ce.namespace,Be=ce.new_value,Ke=(ce.existing_value,ce.variable_removed);$e.shift();var tt,Ge=U.get(ge,"global","src"),At=U.deepCopy(Ge,Ve($e)),Mt=At,ot=(function(tn,gr){var cn=typeof Symbol<"u"&&tn[Symbol.iterator]||tn["@@iterator"];if(!cn){if(Array.isArray(tn)||(cn=ae(tn))||gr){cn&&(tn=cn);var si=0,yr=function(){};return{s:yr,n:function(){return si>=tn.length?{done:!0}:{done:!1,value:tn[si++]}},e:function(Si){throw Si},f:yr}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
120
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ks,ao=!0,lo=!1;return{s:function(){cn=cn.call(tn)},n:function(){var Si=cn.next();return ao=Si.done,Si},e:function(Si){lo=!0,Ks=Si},f:function(){try{ao||cn.return==null||cn.return()}finally{if(lo)throw Ks}}}})($e);try{for(ot.s();!(tt=ot.n()).done;)Mt=Mt[tt.value]}catch(tn){ot.e(tn)}finally{ot.f()}return Ke?K(Mt)=="array"?Mt.splice(ke,1):delete Mt[ke]:ke!==null?Mt[ke]=Be:At=Be,U.set(ge,"global","src",At),At},U.deepCopy=function(ge,ce){var ke,$e=K(ge),Be=ce.shift();return $e=="array"?ke=Ve(ge):$e=="object"&&(ke=p({},ge)),Be!==void 0&&(ke[Be]=U.deepCopy(ge[Be],ce)),ke},U}return b(L,Q),y(L)})(qe.EventEmitter));Ce.register(pe.handleAction.bind(pe));const Ne=pe;var He=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).toggleCollapsed=function(){G.setState({collapsed:!G.state.collapsed},(function(){Ne.set(G.props.rjvId,G.props.namespace,"collapsed",G.state.collapsed)}))},G.getFunctionDisplay=function(ue){var _e=G.props;return ue?_().createElement("span",null,G.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),_().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},_().createElement("span",null,"{"),_().createElement("span",ye(_e.theme,"ellipsis"),"..."),_().createElement("span",null,"}"))):G.props.value.toString().slice(9,-1)},G.state={collapsed:Ne.get(U.rjvId,U.namespace,"collapsed",!0)},G}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=this.state.collapsed;return _().createElement("div",ye(U.theme,"function"),_().createElement(Ue,Object.assign({type_name:"function"},U)),_().createElement("span",Object.assign({},ye(U.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(G)))}}])})(_().PureComponent),at=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){return _().createElement("div",ye(this.props.theme,"nan"),"NaN")}}])})(_().PureComponent),Et=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){return _().createElement("div",ye(this.props.theme,"null"),"NULL")}}])})(_().PureComponent),xt=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props;return _().createElement("div",ye(U.theme,"integer"),_().createElement(Ue,Object.assign({type_name:"int"},U)),this.props.value)}}])})(_().PureComponent),Ct=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props;return _().createElement("div",ye(U.theme,"regexp"),_().createElement(Ue,Object.assign({type_name:"regexp"},U)),this.props.value.toString())}}])})(_().PureComponent),Wt=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).toggleCollapsed=function(){G.setState({collapsed:!G.state.collapsed},(function(){Ne.set(G.props.rjvId,G.props.namespace,"collapsed",G.state.collapsed)}))},G.state={collapsed:Ne.get(U.rjvId,U.namespace,"collapsed",!0)},G}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.state.collapsed,G=this.props,ue=G.collapseStringsAfterLength,_e=G.theme,ge=G.escapeStrings,ce=G.value,ke=K(ue)==="integer",$e={style:{cursor:"default",wordBreak:"break-all"}};return ge&&(ce=X(ce)),ke&&ce.length>ue&&($e.style.cursor="pointer",U&&(ce=_().createElement("span",null,ce.substring(0,ue),_().createElement("span",ye(_e,"ellipsis")," ...")))),_().createElement("div",ye(_e,"string"),_().createElement(Ue,Object.assign({type_name:"string"},G)),_().createElement("span",Object.assign({className:"string-value"},$e,{onClick:this.toggleCollapsed}),'"',ce,'"'))}}])})(_().PureComponent),zt=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){return _().createElement("div",ye(this.props.theme,"undefined"),"undefined")}}])})(_().PureComponent),Tt=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props;return _().createElement("div",ye(U.theme,"bigNumber"),_().createElement(Ue,Object.assign({type_name:"bigNumber"},U)),this.props.value.toString())}}])})(_().PureComponent);function Yt(){return Yt=Object.assign?Object.assign.bind():function(Q){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var G in U)({}).hasOwnProperty.call(U,G)&&(Q[G]=U[G])}return Q},Yt.apply(null,arguments)}const Ft=C.useLayoutEffect;var Xt=function(Q,L){typeof Q!="function"?Q.current=L:Q(L)};const dn=function(Q,L){var U=(0,C.useRef)();return(0,C.useCallback)((function(G){Q.current=G,U.current&&Xt(U.current,null),U.current=L,L&&Xt(L,G)}),[L])};var ut={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},mt=function(Q){Object.keys(ut).forEach((function(L){Q.style.setProperty(L,ut[L],"important")}))},ft=null,bt=function(Q,L){var U=Q.scrollHeight;return L.sizingStyle.boxSizing==="border-box"?U+L.borderSize:U-L.paddingSize},Qt=function(){},kn=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Rr=!!document.documentElement.currentStyle,Ar=function(Q){var L=window.getComputedStyle(Q);if(L===null)return null;var U,G=(U=L,kn.reduce((function(_e,ge){return _e[ge]=U[ge],_e}),{})),ue=G.boxSizing;return ue===""?null:(Rr&&ue==="border-box"&&(G.width=parseFloat(G.width)+parseFloat(G.borderRightWidth)+parseFloat(G.borderLeftWidth)+parseFloat(G.paddingRight)+parseFloat(G.paddingLeft)+"px"),{sizingStyle:G,paddingSize:parseFloat(G.paddingBottom)+parseFloat(G.paddingTop),borderSize:parseFloat(G.borderBottomWidth)+parseFloat(G.borderTopWidth)})};function ir(Q,L,U){var G,ue,_e=(G=U,ue=C.useRef(G),Ft((function(){ue.current=G})),ue);C.useLayoutEffect((function(){var ge=function(ce){return _e.current(ce)};if(Q)return Q.addEventListener(L,ge),function(){return Q.removeEventListener(L,ge)}}),[])}var ri=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Cn=function(Q,L){var U=Q.cacheMeasurements,G=Q.maxRows,ue=Q.minRows,_e=Q.onChange,ge=_e===void 0?Qt:_e,ce=Q.onHeightChange,ke=ce===void 0?Qt:ce,$e=z(Q,ri),Be=$e.value!==void 0,Ke=C.useRef(null),tt=dn(Ke,L),Ge=C.useRef(0),At=C.useRef(),Mt=function(){var ot=Ke.current,tn=U&&At.current?At.current:Ar(ot);if(tn){At.current=tn;var gr=(function(yr,Ks,ao,lo){ao===void 0&&(ao=1),lo===void 0&&(lo=1/0),ft||((ft=document.createElement("textarea")).setAttribute("tabindex","-1"),ft.setAttribute("aria-hidden","true"),mt(ft)),ft.parentNode===null&&document.body.appendChild(ft);var Si=yr.paddingSize,jr=yr.borderSize,co=yr.sizingStyle,ol=co.boxSizing;Object.keys(co).forEach((function(ll){var cl=ll;ft.style[cl]=co[cl]})),mt(ft),ft.value=Ks;var uo=bt(ft,yr);ft.value=Ks,uo=bt(ft,yr),ft.value="x";var kf=ft.scrollHeight-Si,sl=kf*ao;ol==="border-box"&&(sl=sl+Si+jr),uo=Math.max(sl,uo);var al=kf*lo;return ol==="border-box"&&(al=al+Si+jr),[uo=Math.min(al,uo),kf]})(tn,ot.value||ot.placeholder||"x",ue,G),cn=gr[0],si=gr[1];Ge.current!==cn&&(Ge.current=cn,ot.style.setProperty("height",cn+"px","important"),ke(cn,{rowHeight:si}))}};return C.useLayoutEffect(Mt),(function(ot,tn){ir(document.body,"reset",(function(gr){ot.current.form===gr.target&&tn(gr)}))})(Ke,(function(){if(!Be){var ot=Ke.current.value;requestAnimationFrame((function(){var tn=Ke.current;tn&&ot!==tn.value&&Mt()}))}})),ir(window,"resize",Mt),(function(ot){ir(document.fonts,"loadingdone",ot)})(Mt),C.createElement("textarea",Yt({},$e,{onChange:function(ot){Be||Mt(),ge(ot)},ref:tt}))},pr=C.forwardRef(Cn);function In(Q,L){Q=Q.trim();try{if((Q=structuredClone(Q))[0]==="[")return Jt("array",JSON.parse(Q));if(Q[0]==="{")return Jt("object",JSON.parse(Q));if(Q.match(/\-?\d+\.\d+/)&&Q.match(/\-?\d+\.\d+/)[0]===Q)return L&&parseFloat(Q).toString()!==Q?Jt("bigNumber",Q):Jt("float",parseFloat(Q));if(Q.match(/\-?\d+e-\d+/)&&Q.match(/\-?\d+e-\d+/)[0]===Q)return Jt("float",Number(Q));if(Q.match(/\-?\d+/)&&Q.match(/\-?\d+/)[0]===Q)return L&&parseInt(Q).toString()!==Q?Jt("bigNumber",Q):Jt("integer",parseInt(Q));if(Q.match(/\-?\d+e\+\d+/)&&Q.match(/\-?\d+e\+\d+/)[0]===Q)return Jt("integer",Number(Q))}catch{}switch(Q=Q.toLowerCase()){case"undefined":return Jt("undefined",void 0);case"nan":return Jt("nan",NaN);case"null":return Jt("null",null);case"true":return Jt("boolean",!0);case"false":return Jt("boolean",!1);default:if(Q=Date.parse(Q))return Jt("date",new Date(Q))}return Jt(!1,null)}function Jt(Q,L){return{type:Q,value:L}}var er=["style"],Yr=["style"],mr=["style"],en=["style"],xn=["style"],Mr=["style"],bi=["style"],To=["style"],xf=["style"],el=["style"],tl=["style"],_f=["style"],Fs=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,er);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}])})(_().PureComponent),Ls=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,Yr);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}])})(_().PureComponent),nl=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,mr),_e=ii(G).style;return _().createElement("span",ue,_().createElement("svg",{fill:_e.color,width:_e.height,height:_e.width,style:_e,viewBox:"0 0 1792 1792"},_().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(_().PureComponent),Vs=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,en),_e=ii(G).style;return _().createElement("span",ue,_().createElement("svg",{fill:_e.color,width:_e.height,height:_e.width,style:_e,viewBox:"0 0 1792 1792"},_().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(_().PureComponent),or=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,xn);return _().createElement("span",ue,_().createElement("svg",{style:p(p({},ii(G).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},_().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(_().PureComponent),Qh=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,Mr);return _().createElement("span",ue,_().createElement("svg",{style:p(p({},ii(G).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},_().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(_().PureComponent),Ef=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,bi);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}])})(_().PureComponent),so=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,To);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(_().PureComponent),Us=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,xf);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(_().PureComponent),Jh=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,el);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(_().PureComponent),ep=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,tl);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}])})(_().PureComponent),mc=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.style,ue=q(U,_f);return _().createElement("span",ue,_().createElement("svg",Object.assign({},ii(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(_().PureComponent);function ii(Q){return Q||(Q={}),{style:p(p({verticalAlign:"middle"},Q),{},{color:Q.color?Q.color:"#000000",height:"1em",width:"1em"})}}var rl=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).copiedTimer=null,G.copyToClipboardFallback=function(ue){var _e=document.createElement("textarea");_e.value=ue,document.body.appendChild(_e),_e.select(),document.execCommand("copy"),document.body.removeChild(_e)},G.handleCopy=function(){var ue=G.props,_e=ue.clickCallback,ge=ue.src,ce=ue.namespace,ke=JSON.stringify(G.clipboardValue(ge),null," ");navigator.clipboard?navigator.clipboard.writeText(ke).catch((function(){G.copyToClipboardFallback(ke)})):G.copyToClipboardFallback(ke),G.copiedTimer=setTimeout((function(){G.setState({copied:!1})}),5500),G.setState({copied:!0},(function(){typeof _e=="function"&&_e({src:ge,namespace:ce,name:ce[ce.length-1]})}))},G.getClippyIcon=function(){var ue=G.props.theme;return G.state.copied?_().createElement("span",null,_().createElement(Ef,Object.assign({className:"copy-icon"},ye(ue,"copy-icon"))),_().createElement("span",ye(ue,"copy-icon-copied"),"✔")):_().createElement(Ef,Object.assign({className:"copy-icon"},ye(ue,"copy-icon")))},G.clipboardValue=function(ue){switch(K(ue)){case"function":case"regexp":return ue.toString();default:return ue}},G.state={copied:!1},G}return b(L,Q),y(L,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var U=this.props,G=(U.src,U.theme),ue=U.hidden,_e=U.rowHovered,ge=ye(G,"copy-to-clipboard").style,ce="inline";return ue&&(ce="none"),_().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},_().createElement("span",{style:p(p({},ge),{},{display:ce}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(_().PureComponent);const gc=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).getEditIcon=function(){var ue=G.props,_e=ue.variable,ge=ue.theme;return _().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:G.state.hovered?"inline-block":"none"}},_().createElement(ep,Object.assign({className:"click-to-edit-icon"},ye(ge,"editVarIcon"),{onClick:function(){G.prepopInput(_e)}})))},G.prepopInput=function(ue){if(G.props.onEdit!==!1){var _e=(function(ce,ke){var $e;switch(K(ce,ke)){case"undefined":$e="undefined";break;case"nan":$e="NaN";break;case"string":$e=ce;break;case"bigNumber":case"date":case"function":case"regexp":$e=ce.toString();break;default:try{$e=JSON.stringify(ce,null," ")}catch{$e=""}}return $e})(ue.value,G.props.bigNumber),ge=In(_e,G.props.bigNumber);G.setState({editMode:!0,editValue:_e,parsedInput:{type:ge.type,value:ge.value}})}},G.getRemoveIcon=function(){var ue=G.props,_e=ue.variable,ge=ue.namespace,ce=ue.theme,ke=ue.rjvId;return _().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:G.state.hovered?"inline-block":"none"}},_().createElement(so,Object.assign({className:"click-to-remove-icon"},ye(ce,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:ke,data:{name:_e.name,namespace:ge,existing_value:_e.value,variable_removed:!0}})}})))},G.getValue=function(ue,_e){var ge=!_e&&ue.type,ce=G.props;switch(ge){case!1:return G.getEditInput();case"string":return _().createElement(Wt,Object.assign({value:ue.value},ce));case"integer":return _().createElement(xt,Object.assign({value:ue.value},ce));case"float":return _().createElement(ze,Object.assign({value:ue.value},ce));case"boolean":return _().createElement(De,Object.assign({value:ue.value},ce));case"function":return _().createElement(He,Object.assign({value:ue.value},ce));case"null":return _().createElement(Et,ce);case"nan":return _().createElement(at,ce);case"undefined":return _().createElement(zt,ce);case"date":return _().createElement(We,Object.assign({value:ue.value},ce));case"regexp":return _().createElement(Ct,Object.assign({value:ue.value},ce));case"bigNumber":return _().createElement(Tt,Object.assign({value:ue.value},ce));default:return _().createElement("div",{className:"object-value"},JSON.stringify(ue.value))}},G.getEditInput=function(){var ue=G.props,_e=ue.keyModifier,ge=ue.selectOnFocus,ce=ue.theme,ke=G.state.editValue;return _().createElement("div",null,_().createElement(pr,Object.assign({type:"text",ref:function($e){$e&&$e[ge?"select":"focus"]()},value:ke,className:"variable-editor",onChange:function($e){var Be=$e.target.value,Ke=In(Be,G.props.bigNumber);G.setState({editValue:Be,parsedInput:{type:Ke.type,value:Ke.value}})},onKeyDown:function($e){switch($e.key){case"Escape":G.setState({editMode:!1,editValue:""});break;case"Enter":_e($e,"submit")&&G.submitEdit(!0)}$e.stopPropagation()},placeholder:"update this value",minRows:2},ye(ce,"edit-input"))),_().createElement("div",ye(ce,"edit-icon-container"),_().createElement(so,Object.assign({className:"edit-cancel"},ye(ce,"cancel-icon"),{onClick:function($e){$e&&$e.stopPropagation(),G.setState({editMode:!1,editValue:""})}})),_().createElement(mc,Object.assign({className:"edit-check string-value"},ye(ce,"check-icon"),{onClick:function($e){$e&&$e.stopPropagation(),G.submitEdit()}})),_().createElement("div",null,G.showDetected())))},G.submitEdit=function(ue){var _e=G.props,ge=_e.variable,ce=_e.namespace,ke=_e.rjvId,$e=_e.bigNumber,Be=G.state,Ke=Be.editValue,tt=Be.parsedInput,Ge=Ke;ue&&tt.type&&(Ge=tt.value,$e&&tt.type==="bigNumber"&&(Ge=new $e(Ge))),G.setState({editMode:!1}),Ce.dispatch({name:"VARIABLE_UPDATED",rjvId:ke,data:{name:ge.name,namespace:ce,existing_value:ge.value,new_value:Ge,variable_removed:!1}})},G.showDetected=function(){var ue=G.props,_e=ue.theme,ge=(ue.variable,ue.namespace,ue.rjvId,G.state.parsedInput),ce=(ge.type,ge.value,G.getDetectedInput());if(ce)return _().createElement("div",null,_().createElement("div",ye(_e,"detected-row"),ce,_().createElement(mc,{className:"edit-check detected",style:p({verticalAlign:"top",paddingLeft:"3px"},ye(_e,"check-icon").style),onClick:function(ke){ke&&ke.stopPropagation(),G.submitEdit(!0)}})))},G.getDetectedInput=function(){var ue=G.state.parsedInput,_e=ue.type,ge=ue.value,ce=G.props,ke=ce.theme;if(_e!==!1)switch(_e.toLowerCase()){case"object":return _().createElement("span",null,_().createElement("span",{style:p(p({},ye(ke,"brace").style),{},{cursor:"default"})},"{"),_().createElement("span",{style:p(p({},ye(ke,"ellipsis").style),{},{cursor:"default"})},"..."),_().createElement("span",{style:p(p({},ye(ke,"brace").style),{},{cursor:"default"})},"}"));case"array":return _().createElement("span",null,_().createElement("span",{style:p(p({},ye(ke,"brace").style),{},{cursor:"default"})},"["),_().createElement("span",{style:p(p({},ye(ke,"ellipsis").style),{},{cursor:"default"})},"..."),_().createElement("span",{style:p(p({},ye(ke,"brace").style),{},{cursor:"default"})},"]"));case"string":return _().createElement(Wt,Object.assign({value:ge},ce));case"integer":return _().createElement(xt,Object.assign({value:ge},ce));case"float":return _().createElement(ze,Object.assign({value:ge},ce));case"boolean":return _().createElement(De,Object.assign({value:ge},ce));case"function":return _().createElement(He,Object.assign({value:ge},ce));case"null":return _().createElement(Et,ce);case"nan":return _().createElement(at,ce);case"undefined":return _().createElement(zt,ce);case"date":return _().createElement(We,Object.assign({value:new Date(ge)},ce));case"bignumber":return _().createElement(Tt,Object.assign({value:ge},ce))}},G.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},G}return b(L,Q),y(L,[{key:"render",value:function(){var U=this,G=this.props,ue=G.variable,_e=G.singleIndent,ge=G.type,ce=G.theme,ke=G.namespace,$e=G.indentWidth,Be=G.enableClipboard,Ke=G.onEdit,tt=G.onDelete,Ge=G.onSelect,At=G.displayArrayKey,Mt=G.quotesOnKeys,ot=G.keyModifier,tn=G.showComma,gr=G.isLast,cn=this.state.editMode;return _().createElement("div",Object.assign({},ye(ce,"objectKeyVal",{paddingLeft:$e*_e}),{onMouseEnter:function(){return U.setState(p(p({},U.state),{},{hovered:!0}))},onMouseLeave:function(){return U.setState(p(p({},U.state),{},{hovered:!1}))},className:"variable-row",key:ue.name}),ge=="array"?At?_().createElement("span",Object.assign({},ye(ce,"array-key"),{key:ue.name+"_"+ke}),ue.name,_().createElement("div",ye(ce,"colon"),":")):null:_().createElement("span",null,_().createElement("span",Object.assign({},ye(ce,"object-name"),{className:"object-key",key:ue.name+"_"+ke}),!!Mt&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",{style:{display:"inline-block"}},X(ue.name)),!!Mt&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",ye(ce,"colon"),":")),_().createElement("div",Object.assign({className:"variable-value",onClick:Ge===!1&&Ke===!1?null:function(si){var yr=Ve(ke);ot(si,"edit")&&Ke!==!1?U.prepopInput(ue):Ge!==!1&&(yr.shift(),Ge(p(p({},ue),{},{namespace:yr})))}},ye(ce,"variableValue",{cursor:Ge===!1?"default":"pointer"})),this.getValue(ue,cn)),tn&&!gr&&_().createElement("span",ye(ce,"comma"),","),Be?_().createElement(rl,{rowHovered:this.state.hovered,hidden:cn,src:ue.value,clickCallback:Be,theme:ce,namespace:[].concat(Ve(ke),[ue.name])}):null,Ke!==!1&&cn==0?this.getEditIcon():null,tt!==!1&&cn==0?this.getRemoveIcon():null)}}])})(_().PureComponent);var Ii=(function(Q){function L(){var U;g(this,L);for(var G=arguments.length,ue=new Array(G),_e=0;_e<G;_e++)ue[_e]=arguments[_e];return(U=v(this,L,[].concat(ue))).getObjectSize=function(){var ge=U.props,ce=ge.size,ke=ge.theme;if(ge.displayObjectSize)return _().createElement("span",Object.assign({className:"object-size"},ye(ke,"object-size")),ce," item",ce===1?"":"s")},U.getAddAttribute=function(ge){var ce=U.props,ke=ce.theme,$e=ce.namespace,Be=ce.name,Ke=ce.src,tt=ce.rjvId,Ge=ce.depth;return _().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:ge?"inline-block":"none"}},_().createElement(Us,Object.assign({className:"click-to-add-icon"},ye(ke,"addVarIcon"),{onClick:function(){var At={name:Ge>0?Be:null,namespace:$e.splice(0,$e.length-1),existing_value:Ke,variable_removed:!1,key_name:null};K(Ke)==="object"?Ce.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:tt,data:At}):Ce.dispatch({name:"VARIABLE_ADDED",rjvId:tt,data:p(p({},At),{},{new_value:[].concat(Ve(Ke),[null])})})}})))},U.getRemoveObject=function(ge){var ce=U.props,ke=ce.theme,$e=(ce.hover,ce.namespace),Be=ce.name,Ke=ce.src,tt=ce.rjvId;if($e.length!==1)return _().createElement("span",{className:"click-to-remove",style:{display:ge?"inline-block":"none"}},_().createElement(so,Object.assign({className:"click-to-remove-icon"},ye(ke,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:tt,data:{name:Be,namespace:$e.splice(0,$e.length-1),existing_value:Ke,variable_removed:!0}})}})))},U.render=function(){var ge=U.props,ce=ge.theme,ke=ge.onDelete,$e=ge.onAdd,Be=ge.enableClipboard,Ke=ge.src,tt=ge.namespace,Ge=ge.rowHovered;return _().createElement("div",Object.assign({},ye(ce,"object-meta-data"),{className:"object-meta-data",onClick:function(At){At.stopPropagation()}}),U.getObjectSize(),Be?_().createElement(rl,{rowHovered:Ge,clickCallback:Be,src:Ke,theme:ce,namespace:tt}):null,$e!==!1?U.getAddAttribute(Ge):null,ke!==!1?U.getRemoveObject(Ge):null)},U}return b(L,Q),y(L)})(_().PureComponent);function Xr(Q){var L=Q.parent_type,U=Q.namespace,G=Q.quotesOnKeys,ue=Q.theme,_e=Q.jsvRoot,ge=Q.name,ce=Q.displayArrayKey,ke=Q.name?Q.name:"";return!_e||ge!==!1&&ge!==null?L=="array"?ce?_().createElement("span",Object.assign({},ye(ue,"array-key"),{key:U}),_().createElement("span",{className:"array-key"},ke),_().createElement("span",ye(ue,"colon"),":")):_().createElement("span",null):_().createElement("span",Object.assign({},ye(ue,"object-name"),{key:U}),_().createElement("span",{className:"object-key"},G&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",null,ke),G&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",ye(ue,"colon"),":")):_().createElement("span",null)}function Cf(Q){var L=Q.theme;switch(Q.iconStyle){case"triangle":return _().createElement(Qh,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}));case"square":return _().createElement(nl,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}));default:return _().createElement(Fs,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}))}}function tp(Q){var L=Q.theme;switch(Q.iconStyle){case"triangle":return _().createElement(or,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return _().createElement(Vs,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}));default:return _().createElement(Ls,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}))}}var Tf=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],Rf=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).toggleCollapsed=function(ue){var _e=[];for(var ge in G.state.expanded)_e.push(G.state.expanded[ge]);_e[ue]=!_e[ue],G.setState({expanded:_e})},G.state={expanded:[]},G}return b(L,Q),y(L,[{key:"getExpandedIcon",value:function(U){var G=this.props,ue=G.theme,_e=G.iconStyle;return this.state.expanded[U]?_().createElement(Cf,{theme:ue,iconStyle:_e}):_().createElement(tp,{theme:ue,iconStyle:_e})}},{key:"render",value:function(){var U=this,G=this.props,ue=G.src,_e=G.groupArraysAfterLength,ge=(G.depth,G.name),ce=G.theme,ke=G.jsvRoot,$e=G.namespace,Be=(G.parent_type,q(G,Tf)),Ke=0,tt=5*this.props.indentWidth;ke||(Ke=5*this.props.indentWidth);var Ge=_e,At=Math.ceil(ue.length/Ge);return _().createElement("div",Object.assign({className:"object-key-val"},ye(ce,ke?"jsv-root":"objectKeyVal",{paddingLeft:Ke})),_().createElement(Xr,this.props),_().createElement("span",null,_().createElement(Ii,Object.assign({size:ue.length},this.props))),Ve(Array(At)).map((function(Mt,ot){return _().createElement("div",Object.assign({key:ot,className:"object-key-val array-group"},ye(ce,"objectKeyVal",{marginLeft:6,paddingLeft:tt})),_().createElement("span",ye(ce,"brace-row"),_().createElement("div",Object.assign({className:"icon-container"},ye(ce,"icon-container"),{onClick:function(tn){U.toggleCollapsed(ot)}}),U.getExpandedIcon(ot)),U.state.expanded[ot]?_().createElement(qs,Object.assign({key:ge+ot,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Ge,index_offset:ot*Ge,src:ue.slice(ot*Ge,ot*Ge+Ge),namespace:$e,type:"array",parent_type:"array_group",theme:ce,showComma:U.props.showComma,isLast:ot===At-1},Be)):_().createElement("span",Object.assign({},ye(ce,"brace"),{onClick:function(tn){U.toggleCollapsed(ot)},className:"array-group-brace"}),"[",_().createElement("div",Object.assign({},ye(ce,"array-group-meta-data"),{className:"array-group-meta-data"}),_().createElement("span",Object.assign({className:"object-size"},ye(ce,"object-size")),ot*Ge," - ",ot*Ge+Ge>ue.length?ue.length:ot*Ge+Ge)),"]")))})))}}])})(_().PureComponent),yc=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],Af=(function(Q){function L(U){var G;g(this,L),(G=v(this,L,[U])).toggleCollapsed=function(){G.setState({expanded:!G.state.expanded},(function(){Ne.set(G.props.rjvId,G.props.namespace,"expanded",G.state.expanded)}))},G.getObjectContent=function(_e,ge,ce){return _().createElement("div",{className:"pushed-content object-container"},_().createElement("div",Object.assign({className:"object-content"},ye(G.props.theme,"pushed-content")),G.renderObjectContents(ge,ce)))},G.getEllipsis=function(){return G.state.size===0?null:_().createElement("div",Object.assign({},ye(G.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:G.toggleCollapsed}),"...")},G.getObjectMetaData=function(_e){var ge=G.props,ce=(ge.rjvId,ge.theme,G.state),ke=ce.size,$e=ce.hovered;return _().createElement(Ii,Object.assign({rowHovered:$e,size:ke},G.props))},G.renderObjectContents=function(_e,ge){var ce,ke=G.props,$e=ke.depth,Be=ke.parent_type,Ke=ke.index_offset,tt=ke.groupArraysAfterLength,Ge=ke.namespace,At=ke.showComma,Mt=G.state.object_type,ot=[],tn=Object.keys(_e||{});return G.props.sortKeys&&Mt!=="array"&&(tn=tn.sort()),tn.forEach((function(gr,cn){ce=new oi(gr,_e[gr],ge.bigNumber);var si=cn===tn.length-1;if(Be==="array_group"&&Ke&&(ce.name=parseInt(ce.name)+Ke),Object.prototype.hasOwnProperty.call(_e,gr))if(ce.type==="object")ot.push(_().createElement(qs,Object.assign({key:ce.name,depth:$e+1,name:ce.name,src:ce.value,namespace:Ge.concat(ce.name),parent_type:Mt,isLast:si,showComma:At},ge)));else if(ce.type==="array"){var yr=qs;tt&&ce.value.length>tt&&(yr=Rf),ot.push(_().createElement(yr,Object.assign({key:ce.name,depth:$e+1,name:ce.name,src:ce.value,namespace:Ge.concat(ce.name),type:"array",parent_type:Mt,isLast:si,showComma:At},ge)))}else ot.push(_().createElement(gc,Object.assign({key:ce.name+"_"+Ge,variable:ce,singleIndent:5,namespace:Ge,type:G.props.type,isLast:si,showComma:At},ge)))})),ot};var ue=L.getState(U);return G.state=p(p({},ue),{},{prevProps:{}}),G}return b(L,Q),y(L,[{key:"getBraceStart",value:function(U,G){var ue=this,_e=this.props,ge=(_e.src,_e.theme),ce=_e.iconStyle;if(_e.parent_type==="array_group")return _().createElement("span",null,_().createElement("span",ye(ge,"brace"),U==="array"?"[":"{"));var ke=G?Cf:tp;return _().createElement("span",null,_().createElement("span",Object.assign({onClick:function($e){ue.toggleCollapsed()}},ye(ge,"brace-row")),_().createElement("div",Object.assign({className:"icon-container"},ye(ge,"icon-container")),_().createElement(ke,{theme:ge,iconStyle:ce})),_().createElement(Xr,this.props),_().createElement("span",ye(ge,"brace"),U==="array"?"[":"{")))}},{key:"render",value:function(){var U=this,G=this.props,ue=G.depth,_e=G.src,ge=(G.namespace,G.name,G.type,G.parent_type),ce=G.theme,ke=G.jsvRoot,$e=G.iconStyle,Be=G.showComma,Ke=G.isLast,tt=q(G,yc),Ge=this.state,At=Ge.object_type,Mt=Ge.expanded,ot={};return ke||ge==="array_group"?ge==="array_group"&&(ot.borderLeft=0,ot.display="inline"):ot.paddingLeft=5*this.props.indentWidth,_().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return U.setState(p(p({},U.state),{},{hovered:!0}))},onMouseLeave:function(){return U.setState(p(p({},U.state),{},{hovered:!1}))}},ye(ce,ke?"jsv-root":"objectKeyVal",ot)),this.getBraceStart(At,Mt),Mt?this.getObjectContent(ue,_e,p({theme:ce,iconStyle:$e},tt)):this.getEllipsis(),_().createElement("span",{className:"brace-row"},_().createElement("span",{style:p(p({},ye(ce,"brace").style),{},{paddingLeft:Mt?"3px":"0px"})},At==="array"?"]":"}")),Be&&!Ke&&!ke&&_().createElement("span",ye(ce,"comma"),","),this.getObjectMetaData(_e))}}],[{key:"getDerivedStateFromProps",value:function(U,G){var ue=G.prevProps;return U.src!==ue.src||U.collapsed!==ue.collapsed||U.name!==ue.name||U.namespace!==ue.namespace||U.rjvId!==ue.rjvId?p(p({},L.getState(U)),{},{prevProps:U}):null}}])})(_().PureComponent);Af.getState=function(Q){var L=Object.keys(Q.src).length,U=(Q.collapsed===!1||Q.collapsed!==!0&&Q.collapsed>Q.depth)&&(!Q.shouldCollapse||Q.shouldCollapse({name:Q.name,src:Q.src,type:K(Q.src),namespace:Q.namespace})===!1)&&L!==0;return{expanded:Ne.get(Q.rjvId,Q.namespace,"expanded",U),object_type:Q.type==="array"?"array":"object",parent_type:Q.type==="array"?"array":"object",size:L,hovered:!1}};var oi=y((function Q(L,U,G){g(this,Q),this.name=L,this.value=U,this.type=K(U,G)}));I(Af);const qs=Af;var np=(function(Q){function L(){var U;g(this,L);for(var G=arguments.length,ue=new Array(G),_e=0;_e<G;_e++)ue[_e]=arguments[_e];return(U=v(this,L,[].concat(ue))).render=function(){var ge,ce,ke,$e,Be=U.props,Ke=[Be.name],tt=qs;return typeof Be.name!="object"||Array.isArray(Be.name)||(Ke=[((ge=Be.name)===null||ge===void 0?void 0:ge.displayName)||((ce=Be.name)===null||ce===void 0?void 0:ce.name)||((ke=Be.name)===null||ke===void 0||($e=ke.type)===null||$e===void 0?void 0:$e.name)||"Anonymous"]),Array.isArray(Be.src)&&Be.groupArraysAfterLength&&Be.src.length>Be.groupArraysAfterLength&&(tt=Rf),_().createElement("div",{className:"pretty-json-container object-container"},_().createElement("div",{className:"object-content"},_().createElement(tt,Object.assign({namespace:Ke,depth:0,jsvRoot:!0},Be))))},U}return b(L,Q),y(L)})(_().PureComponent),Of=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).closeModal=function(){Ce.dispatch({rjvId:G.props.rjvId,name:"RESET"})},G.submit=function(){G.props.submit(G.state.input)},G.state={input:U.input?U.input:""},G}return b(L,Q),y(L,[{key:"render",value:function(){var U=this,G=this.props,ue=G.theme,_e=G.rjvId,ge=G.isValid,ce=this.state.input,ke=ge(ce);return _().createElement("div",Object.assign({className:"key-modal-request"},ye(ue,"key-modal-request"),{onClick:this.closeModal}),_().createElement("div",Object.assign({},ye(ue,"key-modal"),{onClick:function($e){$e.stopPropagation()}}),_().createElement("div",ye(ue,"key-modal-label"),"Key Name:"),_().createElement("div",{style:{position:"relative"}},_().createElement("input",Object.assign({},ye(ue,"key-modal-input"),{className:"key-modal-input",ref:function($e){return $e&&$e.focus()},spellCheck:!1,value:ce,placeholder:"...",onChange:function($e){U.setState({input:$e.target.value})},onKeyPress:function($e){ke&&$e.key==="Enter"?U.submit():$e.key==="Escape"&&U.closeModal()}})),ke?_().createElement(mc,Object.assign({},ye(ue,"key-modal-submit"),{className:"key-modal-submit",onClick:function($e){return U.submit()}})):null),_().createElement("span",ye(ue,"key-modal-cancel"),_().createElement(Jh,Object.assign({},ye(ue,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ce.dispatch({rjvId:_e,name:"RESET"})}})))))}}])})(_().PureComponent),Bs=(function(Q){function L(){var U;g(this,L);for(var G=arguments.length,ue=new Array(G),_e=0;_e<G;_e++)ue[_e]=arguments[_e];return(U=v(this,L,[].concat(ue))).isValid=function(ge){var ce=U.props.rjvId,ke=Ne.get(ce,"action","new-key-request");return ge!=""&&Object.keys(ke.existing_value).indexOf(ge)===-1},U.submit=function(ge){var ce=U.props.rjvId,ke=Ne.get(ce,"action","new-key-request");ke.new_value=p({},ke.existing_value),ke.new_value[ge]=U.props.defaultValue,Ce.dispatch({name:"VARIABLE_ADDED",rjvId:ce,data:ke})},U}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.active,ue=U.theme,_e=U.rjvId;return G?_().createElement(Of,{rjvId:_e,theme:ue,isValid:this.isValid,submit:this.submit}):null}}])})(_().PureComponent),rp=(function(Q){function L(){return g(this,L),v(this,L,arguments)}return b(L,Q),y(L,[{key:"render",value:function(){var U=this.props,G=U.message,ue=U.active,_e=U.theme,ge=U.rjvId;return ue?_().createElement("div",Object.assign({className:"validation-failure"},ye(_e,"validation-failure"),{onClick:function(){Ce.dispatch({rjvId:ge,name:"RESET"})}}),_().createElement("span",ye(_e,"validation-failure-label"),G),_().createElement(Jh,ye(_e,"validation-failure-clear"))):null}}])})(_().PureComponent),il=(function(Q){function L(U){var G;return g(this,L),(G=v(this,L,[U])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),G.getListeners=function(){return{reset:G.resetState,"variable-update":G.updateSrc,"add-key-request":G.addKeyRequest}},G.updateSrc=function(){var ue,_e=Ne.get(G.rjvId,"action","variable-update"),ge=_e.name,ce=_e.namespace,ke=_e.new_value,$e=_e.existing_value,Be=_e.updated_src,Ke=_e.type,tt=G.props,Ge=tt.onEdit,At=tt.onDelete,Mt=tt.onAdd,ot={existing_src:G.state.src,new_value:ke,updated_src:Be,name:ge,namespace:ce,existing_value:$e};switch(Ke){case"variable-added":ue=Mt(ot);break;case"variable-edited":ue=Ge(ot);break;case"variable-removed":ue=At(ot)}ue!==!1?(Ne.set(G.rjvId,"global","src",Be),G.setState({src:Be})):G.setState({validationFailure:!0})},G.addKeyRequest=function(){G.setState({addKeyRequest:!0})},G.resetState=function(){G.setState({validationFailure:!1,addKeyRequest:!1})},G.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:L.defaultProps.src,name:L.defaultProps.name,theme:L.defaultProps.theme,validationMessage:L.defaultProps.validationMessage,prevSrc:L.defaultProps.src,prevName:L.defaultProps.name,prevTheme:L.defaultProps.theme},G}return b(L,Q),y(L,[{key:"componentDidMount",value:function(){Ne.set(this.rjvId,"global","src",this.state.src);var U=this.getListeners();for(var G in U)Ne.on(G+"-"+this.rjvId,U[G]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(U,G){G.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),G.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),U.src!==this.state.src&&Ne.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var U=this.getListeners();for(var G in U)Ne.removeListener(G+"-"+this.rjvId,U[G])}},{key:"render",value:function(){var U=this.state,G=U.validationFailure,ue=U.validationMessage,_e=U.addKeyRequest,ge=U.theme,ce=U.src,ke=U.name,$e=this.props,Be=$e.style,Ke=$e.defaultValue;return _().createElement("div",{className:"react-json-view",style:p(p({},ye(ge,"app-container").style),Be)},_().createElement(rp,{message:ue,active:G,theme:ge,rjvId:this.rjvId}),_().createElement(np,Object.assign({},this.props,{src:ce,name:ke,theme:ge,type:K(ce),rjvId:this.rjvId})),_().createElement(Bs,{active:_e,theme:ge,rjvId:this.rjvId,defaultValue:Ke}))}}],[{key:"getDerivedStateFromProps",value:function(U,G){if(U.src!==G.prevSrc||U.name!==G.prevName||U.theme!==G.prevTheme){var ue={src:U.src,name:U.name,theme:U.theme,validationMessage:U.validationMessage,prevSrc:U.src,prevName:U.name,prevTheme:U.theme};return L.validateState(ue)}return null}}])})(_().PureComponent);il.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(Q){return Q.metaKey||Q.ctrlKey},bigNumber:null,showComma:!0},il.validateState=function(Q){var L={};return K(Q.theme)!=="object"||(function(U){var G=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(K(U)==="object"){for(var ue=0;ue<G.length;ue++)if(!(G[ue]in U))return!1;return!0}return!1})(Q.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),L.theme="rjv-default"),K(Q.src)!=="object"&&K(Q.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),L.name="ERROR",L.src={message:"src property must be a valid json object"}),p(p({},Q),L)},I(il);const Hs=il})(),l})()))})(Lg)),Lg.exports}var tme=eme();const p9=Qo(tme),nme=()=>{const e=zs(),t=cf(e.name);return t?j.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:j.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?j.jsxs(Ype,{variant:"error",children:[j.jsx(bee,{}),j.jsx(Xpe,{children:"Error"}),j.jsx(Qpe,{children:t.response.content.map(n=>n.text).join(`
121
+ `)})]}):j.jsx("div",{className:"text-xs",children:j.jsx(p9,{src:t.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:3,collapseStringsAfterLength:80})}):null})}):null};class rme{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class m9{constructor(t){this.generateIdentifier=t,this.kv=new rme}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class ime extends m9{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function ome(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function sme(e,t){const n=ome(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const s=r[i];if(t(s))return s}}function Zu(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Vg(e,t){return e.indexOf(t)!==-1}function o3(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class ame{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return sme(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const lme=e=>Object.prototype.toString.call(e).slice(8,-1),g9=e=>typeof e>"u",cme=e=>e===null,ph=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,ex=e=>ph(e)&&Object.keys(e).length===0,Ka=e=>Array.isArray(e),ume=e=>typeof e=="string",fme=e=>typeof e=="number"&&!isNaN(e),dme=e=>typeof e=="boolean",hme=e=>e instanceof RegExp,mh=e=>e instanceof Map,gh=e=>e instanceof Set,y9=e=>lme(e)==="Symbol",pme=e=>e instanceof Date&&!isNaN(e.valueOf()),v9=e=>e instanceof Error,s3=e=>typeof e=="number"&&isNaN(e),mme=e=>dme(e)||cme(e)||g9(e)||fme(e)||ume(e)||y9(e),gme=e=>typeof e=="bigint",yme=e=>e===1/0||e===-1/0,vme=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),bme=e=>e instanceof URL,tx=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),pS=e=>e.map(String).map(tx).join("."),Bd=(e,t)=>{const n=[];let r="";for(let s=0;s<e.length;s++){let l=e.charAt(s);if(!t&&l==="\\"){const d=e.charAt(s+1);if(d==="\\"){r+="\\",s++;continue}else if(d!==".")throw Error("invalid path")}if(l==="\\"&&e.charAt(s+1)==="."){r+=".",s++;continue}if(l==="."){n.push(r),r="";continue}r+=l}const i=r;return n.push(i),n};function Mo(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const b9=[Mo(g9,"undefined",()=>null,()=>{}),Mo(gme,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Mo(pme,"Date",e=>e.toISOString(),e=>new Date(e)),Mo(v9,"Error",(e,t)=>{const n={name:e.name,message:e.message};return"cause"in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),Mo(hme,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Mo(gh,"set",e=>[...e.values()],e=>new Set(e)),Mo(mh,"map",e=>[...e.entries()],e=>new Map(e)),Mo(e=>s3(e)||yme(e),"number",e=>s3(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Mo(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Mo(bme,"URL",e=>e.toString(),e=>new URL(e))];function _0(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const S9=_0((e,t)=>y9(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),Sme=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),w9=_0(vme,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Sme[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function x9(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const _9=_0(x9,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),E9=_0((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),wme=[_9,S9,E9,w9],a3=(e,t)=>{const n=o3(wme,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=o3(b9,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},C9={};b9.forEach(e=>{C9[e.annotation]=e});const xme=(e,t,n)=>{if(Ka(t))switch(t[0]){case"symbol":return S9.untransform(e,t,n);case"class":return _9.untransform(e,t,n);case"custom":return E9.untransform(e,t,n);case"typed-array":return w9.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=C9[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},vu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function T9(e){if(Vg(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Vg(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Vg(e,"constructor"))throw new Error("constructor is not allowed as a property")}const _me=(e,t)=>{T9(t);for(let n=0;n<t.length;n++){const r=t[n];if(gh(e))e=vu(e,+r);else if(mh(e)){const i=+r,s=+t[++n]==0?"key":"value",l=vu(e,i);switch(s){case"key":e=l;break;case"value":e=e.get(l);break}}else e=e[r]}return e},nx=(e,t,n)=>{if(T9(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const l=t[s];if(Ka(r)){const c=+l;r=r[c]}else if(ph(r))r=r[l];else if(gh(r)){const c=+l;r=vu(r,c)}else if(mh(r)){if(s===t.length-2)break;const u=+l,d=+t[++s]==0?"key":"value",h=vu(r,u);switch(d){case"key":r=h;break;case"value":r=r.get(h);break}}}const i=t[t.length-1];if(Ka(r)?r[+i]=n(r[+i]):ph(r)&&(r[i]=n(r[i])),gh(r)){const s=vu(r,+i),l=n(s);s!==l&&(r.delete(s),r.add(l))}if(mh(r)){const s=+t[t.length-2],l=vu(r,s);switch(+i==0?"key":"value"){case"key":{const u=n(l);r.set(u,r.get(l)),u!==l&&r.delete(l);break}case"value":{r.set(l,n(r.get(l)));break}}}return e},R9=e=>e<1;function rx(e,t,n,r=[]){if(!e)return;const i=R9(n);if(!Ka(e)){Zu(e,(c,u)=>rx(c,t,n,[...r,...Bd(u,i)]));return}const[s,l]=e;l&&Zu(l,(c,u)=>{rx(c,t,n,[...r,...Bd(u,i)])}),t(s,r)}function Eme(e,t,n,r){return rx(t,(i,s)=>{e=nx(e,s,l=>xme(l,i,r))},n),e}function Cme(e,t,n){const r=R9(n);function i(s,l){const c=_me(e,Bd(l,r));s.map(u=>Bd(u,r)).forEach(u=>{e=nx(e,u,()=>c)})}if(Ka(t)){const[s,l]=t;s.forEach(c=>{e=nx(e,Bd(c,r),()=>e)}),l&&Zu(l,i)}else Zu(t,i);return e}const Tme=(e,t)=>ph(e)||Ka(e)||mh(e)||gh(e)||v9(e)||x9(e,t);function Rme(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function Ame(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(c=>c.map(String)).sort((c,u)=>c.length-u.length));const[s,...l]=i;s.length===0?r=l.map(pS):n[pS(s)]=l.map(pS)}),r?ex(n)?[r]:[r,n]:ex(n)?void 0:n}const A9=(e,t,n,r,i=[],s=[],l=new Map)=>{const c=mme(e);if(!c){Rme(e,i,t);const x=l.get(e);if(x)return r?{transformedValue:null}:x}if(!Tme(e,n)){const x=a3(e,n),y=x?{transformedValue:x.value,annotations:[x.type]}:{transformedValue:e};return c||l.set(e,y),y}if(Vg(s,e))return{transformedValue:null};const u=a3(e,n),d=u?.value??e,h=Ka(d)?[]:{},p={};Zu(d,(x,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);const T=A9(x,t,n,r,[...i,y],[...s,e],l);h[y]=T.transformedValue,Ka(T.annotations)?p[tx(y)]=T.annotations:ph(T.annotations)&&Zu(T.annotations,(w,S)=>{p[tx(y)+"."+S]=w})});const g=ex(p)?{transformedValue:h,annotations:u?[u.type]:void 0}:{transformedValue:h,annotations:u?[u.type,p]:p};return c||l.set(e,g),g};function O9(e){return Object.prototype.toString.call(e).slice(8,-1)}function l3(e){return O9(e)==="Array"}function Ome(e){if(O9(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function kme(e,t,n,r,i){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),i&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function ix(e,t={}){if(l3(e))return e.map(i=>ix(i,t));if(!Ome(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(s==="__proto__"||l3(t.props)&&!t.props.includes(s))return i;const l=e[s],c=ix(l,t);return kme(i,s,c,e,t.nonenumerable),i},{})}class On{constructor({dedupe:t=!1}={}){this.classRegistry=new ime,this.symbolRegistry=new m9(n=>n.description??""),this.customTransformerRegistry=new ame,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=A9(t,n,this,this.dedupe),i={json:r.transformedValue};r.annotations&&(i.meta={...i.meta,values:r.annotations});const s=Ame(n,this.dedupe);return s&&(i.meta={...i.meta,referentialEqualities:s}),i.meta&&(i.meta.v=1),i}deserialize(t,n){const{json:r,meta:i}=t;let s=n?.inPlace?r:ix(r);return i?.values&&(s=Eme(s,i.values,i.v??0,this)),i?.referentialEqualities&&(s=Cme(s,i.referentialEqualities,i.v??0)),s}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}On.defaultInstance=new On;On.serialize=On.defaultInstance.serialize.bind(On.defaultInstance);On.deserialize=On.defaultInstance.deserialize.bind(On.defaultInstance);On.stringify=On.defaultInstance.stringify.bind(On.defaultInstance);On.parse=On.defaultInstance.parse.bind(On.defaultInstance);On.registerClass=On.defaultInstance.registerClass.bind(On.defaultInstance);On.registerSymbol=On.defaultInstance.registerSymbol.bind(On.defaultInstance);On.registerCustom=On.defaultInstance.registerCustom.bind(On.defaultInstance);On.allowErrorProps=On.defaultInstance.allowErrorProps.bind(On.defaultInstance);k.createContext(null);const k9="openai:set_globals";class Mme extends CustomEvent{type=k9}function jme(e,t,n){return{callTool:async(i,s)=>(console.log("callTool",{name:i,args:s}),t("callTool",{name:i,args:s}),{}),sendFollowUpMessage:async i=>{t("sendFollowUpMessage",i)},openExternal:i=>{t("openExternal",i)},requestDisplayMode:async i=>(t("requestDisplayMode",i),e.displayMode=i.mode,n("displayMode",i.mode),{mode:i.mode}),setWidgetState:async i=>{t("setWidgetState",i),e.widgetState=i,n("widgetState",i)},requestModal:async i=>{t("requestModal",i),e.displayMode="modal",n("displayMode","modal")},uploadFile:async i=>(t("uploadFile",{name:i.name,size:i.size}),{fileId:"123"}),downloadFile:async i=>(t("downloadFile",i),{downloadUrl:"https://example.com/file.pdf"})}}function Pme(e,t){const n=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","widgetState"];return new Proxy(e,{set(r,i,s,l){const c=Reflect.set(r,i,s,l);if(n.includes(i)){const u=new Mme(k9,{detail:{globals:{[i]:s}}});t.dispatchEvent(u)}return c}})}function Dme(e,t,n,r){const i=Wy(t),s=Pme(i,e),l=jme(s,n,r);oV(s,l),e.openai=s}const Nme=()=>{const e=zs(),{openaiObject:t}=cf(e.name),{data:n}=fJ(e._meta?.["ui/resourceUri"]),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:s}=Is(),l=k.useRef(null),c=k.useRef(null),u=n?.contents[0],d=u&&"text"in u?u.text:void 0,h=k.useCallback(()=>{const p=l.current;if(!p)return;const g=p.contentWindow;if(!g)return;Dme(g,t,(T,w)=>{i(e.name,{timestamp:Date.now(),command:T,args:w})},(T,w)=>{s(e.name,T,w)});const x=p.contentDocument;new ResizeObserver(()=>{const T=x.documentElement.scrollHeight;p.style.height=T+"px"}).observe(x.body),r(e.name,{openaiRef:l})},[t,i,r,s,e.name]);return k.useEffect(()=>{const p=l.current;return p?.addEventListener("load",h),()=>{p?.removeEventListener("load",h)}},[h]),j.jsx("div",{ref:c,className:"relative overflow-auto",style:{width:"100%"},children:j.jsx("iframe",{ref:l,srcDoc:d,style:{width:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin",title:"html-preview"})})},$me=df("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function Ime({className:e,orientation:t,...n}){return j.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:gn($me({orientation:t}),e),...n})}const c3={};function Yo(e,t){const n=k.useRef(c3);return n.current===c3&&(n.current=e(t)),n}const mS=of[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],zme=mS&&mS!==k.useLayoutEffect?mS:e=>e();function nt(e){const t=Yo(Fme).current;return t.next=e,zme(t.effect),t.trampoline}function Fme(){const e={next:void 0,callback:Lme,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Lme(){}function Co(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function ji(){}const Wu=Object.freeze([]),di=Object.freeze({});let u3=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const E0={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},C0={valid(e){return e===null?null:e?{[u3.valid]:""}:{[u3.invalid]:""}}},Vme={style:{transition:"none"}},Ume="data-base-ui-click-trigger",qme={fallbackAxisSide:"none"},Bme={clipPath:"inset(50%)",position:"fixed",top:0,left:0},M9=k.createContext({invalid:void 0,name:void 0,validityData:{state:E0,errors:[],error:"",value:"",initialValue:null},setValidityData:ji,disabled:void 0,touched:!1,setTouched:ji,dirty:!1,setDirty:ji,filled:!1,setFilled:ji,focused:!1,setFocused:ji,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=di)=>e,getInputValidationProps:(e=di)=>e,inputRef:{current:null},commit:async()=>{}}});function Yu(e=!0){const t=k.useContext(M9);if(t.setValidityData===ji&&!e)throw new Error(Co(28));return t}const j9=k.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function Hme(e=!1){const t=k.useContext(j9);if(!t&&!e)throw new Error(Co(86));return t}const Kme=k.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ji,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function T0(){return k.useContext(Kme)}function ox(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Hd={};function Xu(e,t,n,r,i){let s={...sx(e,Hd)};return t&&(s=Md(s,t)),n&&(s=Md(s,n)),r&&(s=Md(s,r)),i&&(s=Md(s,i)),s}function Gme(e){if(e.length===0)return Hd;if(e.length===1)return sx(e[0],Hd);let t={...sx(e[0],Hd)};for(let n=1;n<e.length;n+=1)t=Md(t,e[n]);return t}function Md(e,t){return P9(t)?t(e):Zme(e,t)}function Zme(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ox(e.style,r);break}case"className":{e[n]=D9(e.className,r);break}default:Wme(n,r)?e[n]=Yme(e[n],r):e[n]=r}}return e}function Wme(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function P9(e){return typeof e=="function"}function sx(e,t){return P9(e)?e(t):e??Hd}function Yme(e,t){return t?e?n=>{if(Xme(n)){const i=n;ax(i);const s=t(i);return i.baseUIHandlerPrevented||e?.(i),s}const r=t(n);return e?.(n),r}:t:e}function ax(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function D9(e,t){return t?e?t+" "+e:t:e}function Xme(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const Qme={...of};let f3=0;function Jme(e,t="mui"){const[n,r]=k.useState(e),i=e||n;return k.useEffect(()=>{n==null&&(f3+=1,r(`${t}-${f3}`))},[n,t]),i}const d3=Qme.useId;function NE(e,t){if(d3!==void 0){const n=d3();return e??(t?`${t}-${n}`:n)}return Jme(e,t)}function Gh(e){return NE(e,"base-ui")}const N9=k.createContext({controlId:void 0,setControlId:ji,labelId:void 0,setLabelId:ji,messageIds:[],setMessageIds:ji,getDescriptionProps:e=>e});function hc(){return k.useContext(N9)}const ege=function(t){const n=Gh(),[r,i]=k.useState(t.initialControlId===void 0?n:t.initialControlId),[s,l]=k.useState(void 0),[c,u]=k.useState([]),{messageIds:d}=hc(),h=k.useCallback(g=>Xu({"aria-describedby":d.concat(c).join(" ")||void 0},g),[d,c]),p=k.useMemo(()=>({controlId:r,setControlId:i,labelId:s,setLabelId:l,messageIds:c,setMessageIds:u,getDescriptionProps:h}),[r,i,s,l,c,u,h]);return j.jsx(N9.Provider,{value:p,children:t.children})};function Ga(e,t,n,r){const i=Yo($9).current;return nge(i,e,t,n,r)&&I9(i,[e,t,n,r]),i.callback}function tge(e){const t=Yo($9).current;return rge(t,e)&&I9(t,e),t.callback}function $9(){return{callback:null,cleanup:null,refs:[]}}function nge(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function rge(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function I9(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const s=t[i];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[i]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const s=t[i];if(s!=null)switch(typeof s){case"function":{const l=r[i];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const ige=parseInt(k.version,10);function $E(e){return ige>=e}function h3(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return($E(19)?n?.ref:t.ref)??null}function oge(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const s=t[r](i);s!=null&&Object.assign(n,s);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function sge(e,t){return typeof e=="function"?e(t):e}function age(e,t){return typeof e=="function"?e(t):e}function hr(e,t,n={}){const r=t.render,i=lge(t,n);if(n.enabled===!1)return null;const s=n.state??di;return cge(e,r,i,s)}function lge(e,t={}){const{className:n,style:r,render:i}=e,{state:s=di,ref:l,props:c,stateAttributesMapping:u,enabled:d=!0}=t,h=d?sge(n,s):void 0,p=d?age(r,s):void 0,g=d?oge(s,u):di,x=d?ox(g,Array.isArray(c)?Gme(c):c)??di:di;return typeof document<"u"&&(d?Array.isArray(l)?x.ref=tge([x.ref,h3(i),...l]):x.ref=Ga(x.ref,h3(i),l):Ga(null,null)),d?(h!==void 0&&(x.className=D9(x.className,h)),p!==void 0&&(x.style=ox(x.style,p)),x):di}function cge(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Xu(n,t.props);return i.ref=n.ref,k.cloneElement(t,i)}if(e&&typeof e=="string")return uge(e,n);throw new Error(Co(8))}function uge(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}const fge=[];function IE(e){k.useEffect(e,fge)}const Cd=0;class Qu{static create(){return new Qu}currentId=Cd;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Cd,n()},t)}isStarted(){return this.currentId!==Cd}clear=()=>{this.currentId!==Cd&&(clearTimeout(this.currentId),this.currentId=Cd)};disposeEffect=()=>this.clear}function pi(){const e=Yo(Qu.create).current;return IE(e.disposeEffect),e}function lx(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Ug=Object.keys(E0);function dge(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of Ug)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function hge(e){const{formRef:t,clearErrors:n}=T0(),{setValidityData:r,validate:i,validityData:s,validationDebounceTime:l,invalid:c,markedDirtyRef:u,state:d,name:h,shouldValidateOnChange:p}=e,{controlId:g,getDescriptionProps:x}=hc(),y=pi(),T=k.useRef(null),w=nt(async(E,b=!1)=>{const C=T.current;if(!C)return;if(b){if(d.valid!==!1)return;const K=C.validity;if(!K.valueMissing){const Y={value:E,state:{...E0,valid:!0},error:"",errors:[],initialValue:s.initialValue};if(C.setCustomValidity(""),g){const H=t.current.fields.get(g);H&&t.current.fields.set(g,{...H,...lx(Y,!1)})}r(Y);return}const X=Ug.reduce((Y,H)=>(Y[H]=K[H],Y),{});if(!X.valid&&!dge(X))return}function _(K){const X=Ug.reduce((H,Z)=>(H[Z]=K.validity[Z],H),{});let Y=!1;for(const H of Ug)if(H!=="valid"){if(H==="valueMissing"&&X[H])Y=!0;else if(X[H])return X}return Y&&!u.current&&(X.valid=!0,X.valueMissing=!1),X}y.clear();let A=null,M=[];const P=_(C);let I;const z=p();if(C.validationMessage&&!z)I=C.validationMessage,M=[C.validationMessage];else{const K=Array.from(t.current.fields.values()).reduce((Y,H)=>(H.name&&(Y[H.name]=H.getValue()),Y),{}),X=i(E,K);typeof X=="object"&&X!==null&&"then"in X?A=await X:A=X,A!==null?(P.valid=!1,P.customError=!0,Array.isArray(A)?(M=A,C.setCustomValidity(A.join(`
122
+ `))):A&&(M=[A],C.setCustomValidity(A))):z&&(C.setCustomValidity(""),P.customError=!1,C.validationMessage?(I=C.validationMessage,M=[C.validationMessage]):C.validity.valid&&!P.valid&&(P.valid=!0))}const q={value:E,state:P,error:I??(Array.isArray(A)?A[0]:A??""),errors:M,initialValue:s.initialValue};if(g){const K=t.current.fields.get(g);K&&t.current.fields.set(g,{...K,...lx(q,c)})}r(q)}),S=k.useCallback((E={})=>Xu(x,d.valid===!1?{"aria-invalid":!0}:di,E),[x,d.valid]),v=k.useCallback((E={})=>Xu({onChange(b){if(b.nativeEvent.defaultPrevented)return;if(n(h),!p()){w(b.currentTarget.value,!0);return}if(c)return;const C=b.currentTarget;if(C.value===""){w(C.value);return}y.clear(),l?y.start(l,()=>{w(C.value)}):w(C.value)}},S(E)),[S,n,h,y,w,c,l,p]);return k.useMemo(()=>({getValidationProps:S,getInputValidationProps:v,inputRef:T,commit:w}),[S,v,w])}const pge=k.forwardRef(function(t,n){const{errors:r,validationMode:i,submitAttemptedRef:s}=T0(),{render:l,className:c,validate:u,validationDebounceTime:d=0,validationMode:h=i,name:p,disabled:g=!1,invalid:x,dirty:y,touched:T,...w}=t,{disabled:S}=Hme(),v=nt(u||(()=>null)),E=S||g,[b,C]=k.useState(!1),[_,A]=k.useState(!1),[M,P]=k.useState(!1),[I,z]=k.useState(!1),q=y??_,K=T??b,X=k.useRef(!1),Y=nt(J=>{y===void 0&&(J&&(X.current=!0),A(J))}),H=nt(J=>{T===void 0&&C(J)}),Z=nt(()=>h==="onChange"||h==="onSubmit"&&s.current),ee=!!(x||p&&{}.hasOwnProperty.call(r,p)&&r[p]!==void 0),[ae,re]=k.useState({state:E0,error:"",errors:[],value:null,initialValue:null}),$=!ee&&ae.state.valid,B=k.useMemo(()=>({disabled:E,touched:K,dirty:q,valid:$,filled:M,focused:I}),[E,K,q,$,M,I]),F=hge({setValidityData:re,validate:v,validityData:ae,validationDebounceTime:d,invalid:ee,markedDirtyRef:X,state:B,name:p,shouldValidateOnChange:Z}),D=k.useMemo(()=>({invalid:ee,name:p,validityData:ae,setValidityData:re,disabled:E,touched:K,setTouched:H,dirty:q,setDirty:Y,filled:M,setFilled:P,focused:I,setFocused:z,validate:v,validationMode:h,validationDebounceTime:d,shouldValidateOnChange:Z,state:B,markedDirtyRef:X,validation:F}),[ee,p,ae,E,K,H,q,Y,M,P,I,z,v,h,d,Z,B,F]),V=hr("div",t,{ref:n,state:B,props:w,stateAttributesMapping:C0});return j.jsx(M9.Provider,{value:D,children:V})}),mge=k.forwardRef(function(t,n){return j.jsx(ege,{children:j.jsx(pge,{...t,ref:n})})}),gge=()=>{},rt=typeof document<"u"?k.useLayoutEffect:gge;function R0(){return typeof window<"u"}function Qa(e){return zE(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ns(e){var t;return(t=(zE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zE(e){return R0()?e instanceof Node||e instanceof Cr(e).Node:!1}function Ln(e){return R0()?e instanceof Element||e instanceof Cr(e).Element:!1}function Jn(e){return R0()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function cx(e){return!R0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}const yge=new Set(["inline","contents"]);function pc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=$i(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!yge.has(i)}const vge=new Set(["table","td","th"]);function bge(e){return vge.has(Qa(e))}const Sge=[":popover-open",":modal"];function A0(e){return Sge.some(t=>{try{return e.matches(t)}catch{return!1}})}const wge=["transform","translate","scale","rotate","perspective"],xge=["transform","translate","scale","rotate","perspective","filter"],_ge=["paint","layout","strict","content"];function FE(e){const t=O0(),n=Ln(e)?$i(e):e;return wge.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||xge.some(r=>(n.willChange||"").includes(r))||_ge.some(r=>(n.contain||"").includes(r))}function Ege(e){let t=js(e);for(;Jn(t)&&!As(t);){if(FE(t))return t;if(A0(t))return null;t=js(t)}return null}function O0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cge=new Set(["html","body","#document"]);function As(e){return Cge.has(Qa(e))}function $i(e){return Cr(e).getComputedStyle(e)}function k0(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function js(e){if(Qa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cx(e)&&e.host||ns(e);return cx(t)?t.host:t}function z9(e){const t=js(e);return As(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jn(t)&&pc(t)?t:z9(t)}function Pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=z9(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),l=Cr(i);if(s){const c=ux(l);return t.concat(l,l.visualViewport||[],pc(i)?i:[],c&&n?Pa(c):[])}return t.concat(i,Pa(i,[],n))}function ux(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const wf=typeof navigator<"u",gS=Oge(),F9=Mge(),L9=kge(),V9=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Tge=gS.platform==="MacIntel"&&gS.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(gS.platform),Rge=wf&&/apple/i.test(navigator.vendor),fx=wf&&/android/i.test(F9)||/android/i.test(L9);wf&&F9.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Age=L9.includes("jsdom/");function Oge(){if(!wf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function kge(){if(!wf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Mge(){if(!wf)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const dx="data-base-ui-focusable",U9="active",q9="selected",jge="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Da="ArrowLeft",Na="ArrowRight",LE="ArrowUp",Zh="ArrowDown";function Cs(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Fn(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&cx(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Wi(e){return"composedPath"in e?e.composedPath()[0]:e.target}function yo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Pge(e){return e.matches("html,body")}function ti(e){return e?.ownerDocument||document}function B9(e){return Jn(e)&&e.matches(jge)}function hx(e){return e?e.getAttribute("role")==="combobox"&&B9(e):!1}function Ey(e){return e?e.hasAttribute(dx)?e:e.querySelector(`[${dx}]`)||e:null}function Tu(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Tu(e,i.id,n)])}function p3(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(s=>s.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function Hr(e){e.preventDefault(),e.stopPropagation()}function Dge(e){return"nativeEvent"in e}function H9(e){return e.mozInputSource===0&&e.isTrusted?!0:fx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function K9(e){return Age?!1:!fx&&e.width===0&&e.height===0||fx&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function m3(e,t){return["mouse","pen"].includes(e)}function G9(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Nge=["top","right","bottom","left"],Ju=Math.min,Mi=Math.max,Cy=Math.round,bu=Math.floor,Ko=e=>({x:e,y:e}),$ge={left:"right",right:"left",bottom:"top",top:"bottom"},Ige={start:"end",end:"start"};function px(e,t,n){return Mi(e,Ju(t,n))}function Ps(e,t){return typeof e=="function"?e(t):e}function Ni(e){return e.split("-")[0]}function Ja(e){return e.split("-")[1]}function VE(e){return e==="x"?"y":"x"}function UE(e){return e==="y"?"height":"width"}const zge=new Set(["top","bottom"]);function Qi(e){return zge.has(Ni(e))?"y":"x"}function qE(e){return VE(Qi(e))}function Fge(e,t,n){n===void 0&&(n=!1);const r=Ja(e),i=qE(e),s=UE(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Ty(l)),[l,Ty(l)]}function Lge(e){const t=Ty(e);return[mx(e),t,mx(t)]}function mx(e){return e.replace(/start|end/g,t=>Ige[t])}const g3=["left","right"],y3=["right","left"],Vge=["top","bottom"],Uge=["bottom","top"];function qge(e,t,n){switch(e){case"top":case"bottom":return n?t?y3:g3:t?g3:y3;case"left":case"right":return t?Vge:Uge;default:return[]}}function Bge(e,t,n,r){const i=Ja(e);let s=qge(Ni(e),n==="start",r);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(mx)))),s}function Ty(e){return e.replace(/left|right|bottom|top/g,t=>$ge[t])}function Hge(e){return{top:0,right:0,bottom:0,left:0,...e}}function Z9(e){return typeof e!="number"?Hge(e):{top:e,right:e,bottom:e,left:e}}function Ry(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function hg(e,t,n){return Math.floor(e/t)!==n}function Ru(e,t){return t<0||t>=e.current.length}function qg(e,t){return Fr(e,{disabledIndices:t})}function gx(e,t){return Fr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Fr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let s=t;do s+=n?-i:i;while(s>=0&&s<=e.current.length-1&&$a(e,s,r));return s}function W9(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:s,disabledIndices:l,minIndex:c,maxIndex:u,prevIndex:d,stopEvent:h=!1}){let p=d;const g=[],x={};let y=!1;{let S=null,v=-1;e.current.forEach((E,b)=>{if(E==null)return;const C=E.closest('[role="row"]');C&&(y=!0),(C!==S||v===-1)&&(S=C,v+=1,g[v]=[]),g[v].push(b),x[b]=v})}const T=y&&g.length>0&&g.some(S=>S.length!==s);function w(S){if(!T||d===-1)return;const v=x[d];if(v==null)return;const E=g[v].indexOf(d);let b=S==="up"?v-1:v+1;r&&(b<0?b=g.length-1:b>=g.length&&(b=0));const C=new Set;for(;b>=0&&b<g.length&&!C.has(b);){C.add(b);const _=g[b];if(_.length===0){b=S==="up"?b-1:b+1;continue}const A=Math.min(E,_.length-1);for(let M=A;M>=0;M-=1){const P=_[M];if(!$a(e,P,l))return P}b=S==="up"?b-1:b+1,r&&(b<0?b=g.length-1:b>=g.length&&(b=0))}}if(t.key===LE){const S=w("up");if(S!==void 0)h&&Hr(t),p=S;else{if(h&&Hr(t),d===-1)p=u;else if(p=Fr(e,{startingIndex:p,amount:s,decrement:!0,disabledIndices:l}),r&&(d-s<c||p<0)){const v=d%s,E=u%s,b=u-(E-v);E===v?p=u:p=E>v?b:b-s}Ru(e,p)&&(p=d)}}if(t.key===Zh){const S=w("down");S!==void 0?(h&&Hr(t),p=S):(h&&Hr(t),d===-1?p=c:(p=Fr(e,{startingIndex:d,amount:s,disabledIndices:l}),r&&d+s>u&&(p=Fr(e,{startingIndex:d%s-s,amount:s,disabledIndices:l}))),Ru(e,p)&&(p=d))}if(n==="both"){const S=bu(d/s);t.key===(i?Da:Na)&&(h&&Hr(t),d%s!==s-1?(p=Fr(e,{startingIndex:d,disabledIndices:l}),r&&hg(p,s,S)&&(p=Fr(e,{startingIndex:d-d%s-1,disabledIndices:l}))):r&&(p=Fr(e,{startingIndex:d-d%s-1,disabledIndices:l})),hg(p,s,S)&&(p=d)),t.key===(i?Na:Da)&&(h&&Hr(t),d%s!==0?(p=Fr(e,{startingIndex:d,decrement:!0,disabledIndices:l}),r&&hg(p,s,S)&&(p=Fr(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:l}))):r&&(p=Fr(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:l})),hg(p,s,S)&&(p=d));const v=bu(u/s)===S;Ru(e,p)&&(r&&v?p=t.key===(i?Na:Da)?u:Fr(e,{startingIndex:d-d%s-1,disabledIndices:l}):p=d)}return p}function Y9(e,t,n){const r=[];let i=0;return e.forEach(({width:s,height:l},c)=>{let u=!1;for(n&&(i=0);!u;){const d=[];for(let h=0;h<s;h+=1)for(let p=0;p<l;p+=1)d.push(i+h+p*t);i%t+s<=t&&d.every(h=>r[h]==null)?(d.forEach(h=>{r[h]=c}),u=!0):i+=1}}),[...r]}function X9(e,t,n,r,i){if(e===-1)return-1;const s=n.indexOf(e),l=t[e];switch(i){case"tl":return s;case"tr":return l?s+l.width-1:s;case"bl":return l?s+(l.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function Q9(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function $a(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var Kge=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ay=Kge.join(","),J9=typeof Element>"u",ef=J9?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oy=!J9&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},yh=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",l=s||n&&t&&yh(t.parentNode);return l},Gge=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},e6=function(t,n,r){if(yh(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ay));return n&&ef.call(t,Ay)&&i.unshift(t),i=i.filter(r),i},ky=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var l=s.shift();if(!yh(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),u=c.length?c:l.children,d=ky(u,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:l,candidates:d})}else{var h=ef.call(l,Ay);h&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var p=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!yh(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&g){var x=ky(p===!0?l.children:p.children,!0,r);r.flatten?i.push.apply(i,x):i.push({scopeParent:l,candidates:x})}else s.unshift.apply(s,l.children)}}return i},t6=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},n6=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Gge(t))&&!t6(t)?0:t.tabIndex},Zge=function(t,n){var r=n6(t);return r<0&&n&&!t6(t)?0:r},Wge=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},r6=function(t){return t.tagName==="INPUT"},Yge=function(t){return r6(t)&&t.type==="hidden"},Xge=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Qge=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Jge=function(t){if(!t.name)return!0;var n=t.form||Oy(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=Qge(i,t.form);return!s||s===t},eye=function(t){return r6(t)&&t.type==="radio"},tye=function(t){return eye(t)&&!Jge(t)},nye=function(t){var n,r=t&&Oy(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var l,c,u;for(s=!!((l=i)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!s&&i;){var d,h,p;r=Oy(i),i=(d=r)===null||d===void 0?void 0:d.host,s=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return s},v3=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},rye=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=ef.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ef.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var d=t.parentElement,h=Oy(t);if(d&&!d.shadowRoot&&i(d)===!0)return v3(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=u}if(nye(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return v3(t);return!1},iye=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return ef.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},yx=function(t,n){return!(n.disabled||yh(n)||Yge(n)||rye(n,t)||Xge(n)||iye(n))},vx=function(t,n){return!(tye(n)||n6(n)<0||!yx(t,n))},oye=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},i6=function(t){var n=[],r=[];return t.forEach(function(i,s){var l=!!i.scopeParent,c=l?i.scopeParent:i,u=Zge(c,l),d=l?i6(i.candidates):c;u===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:s,tabIndex:u,item:i,isScope:l,content:d})}),r.sort(Wge).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},M0=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ky([t],n.includeContainer,{filter:vx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:oye}):r=e6(t,n.includeContainer,vx.bind(null,n)),i6(r)},sye=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ky([t],n.includeContainer,{filter:yx.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=e6(t,n.includeContainer,yx.bind(null,n)),r},o6=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ef.call(t,Ay)===!1?!1:vx(n,t)};const Wh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function s6(e,t){const n=M0(e,Wh()),r=n.length;if(r===0)return;const i=Cs(ti(e)),s=n.indexOf(i),l=s===-1?t===1?0:r-1:s+t;return n[l]}function a6(e){return s6(ti(e).body,1)||e}function l6(e){return s6(ti(e).body,-1)||e}function Kd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Fn(n,r)}function aye(e){M0(e,Wh()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function b3(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const lye=k.forwardRef(function(t,n){const{render:r,className:i,id:s,...l}=t,c=Yu(!1),{controlId:u,setLabelId:d,labelId:h}=hc(),p=Gh(s),g=k.useRef(null);return rt(()=>(p&&d(p),()=>{d(void 0)}),[p,d]),hr("label",t,{ref:[n,g],state:c.state,props:[{id:h,htmlFor:u??void 0,onMouseDown(y){Wi(y.nativeEvent)?.closest("button,input,select,textarea")||!y.defaultPrevented&&y.detail>1&&y.preventDefault()}},l],stateAttributesMapping:C0})});function My({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=k.useRef(e!==void 0),[s,l]=k.useState(t),c=i?e:s,u=k.useCallback(d=>{i||l(d)},[]);return[c,u]}function c6(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,setControlId:s}=hc(),l=Gh(t);return rt(()=>{if(!(!n&&!t||s===ji)){if(n){const c=r?.current;Ln(c)&&c.closest("label")!=null?s(t??null):s(i??l)}else t&&s(t);return()=>{t&&s(void 0)}}},[t,r,i,s,n,l]),i??l}function u6(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:s,commit:l}=e,{formRef:c}=T0(),{invalid:u,markedDirtyRef:d,validityData:h,setValidityData:p}=Yu(),g=nt(e.getValue);rt(()=>{if(!t)return;let x=n;x===void 0&&(x=g()),h.initialValue===null&&x!==null&&p(y=>({...y,initialValue:x}))},[t,p,n,h.initialValue,g]),rt(()=>{!t||!r||c.current.fields.set(r,{getValue:g,name:i,controlRef:s,validityData:lx(h,u),validate(){let x=n;x===void 0&&(x=g()),d.current=!0,Wo.flushSync(()=>l(x))}})},[l,s,t,c,g,r,u,d,i,h,n]),rt(()=>{const x=c.current.fields;return()=>{r&&x.delete(r)}},[c,r])}const tf="none",Gd="trigger-press",cye="trigger-hover",f6="outside-press",yS="item-press",j0="focus-out",uye="escape-key",vS="list-navigation",fye="cancel-open",dye="window-resize";function An(e,t,n,r){let i=!1,s=!1;const l=r??di;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){s=!0},get isCanceled(){return i},get isPropagationAllowed(){return s},trigger:n,...l}}const hye=k.forwardRef(function(t,n){const{render:r,className:i,id:s,name:l,value:c,disabled:u=!1,onValueChange:d,defaultValue:h,...p}=t,{state:g,name:x,disabled:y}=Yu(),T=y||u,w=x??l,S=k.useMemo(()=>({...g,disabled:T}),[g,T]),{setTouched:v,setDirty:E,validityData:b,setFocused:C,setFilled:_,validationMode:A,validation:M}=Yu(),{labelId:P}=hc(),I=c6({id:s});rt(()=>{const H=c!=null;M.inputRef.current?.value||H&&c!==""?_(!0):H&&c===""&&_(!1)},[M.inputRef,_,c]);const[z,q]=My({controlled:c,default:h,name:"FieldControl",state:"value"}),K=c!==void 0,X=nt((H,Z)=>{d?.(H,Z),!Z.isCanceled&&q(H)});return u6({id:I,name:w,commit:M.commit,value:z,getValue:()=>M.inputRef.current?.value,controlRef:M.inputRef}),hr("input",t,{ref:n,state:S,props:[{id:I,disabled:T,name:w,ref:M.inputRef,"aria-labelledby":P,...K?{value:z}:{defaultValue:h},onChange(H){const Z=H.currentTarget.value;X(Z,An(tf,H.nativeEvent)),E(Z!==b.initialValue),_(Z!=="")},onFocus(){C(!0)},onBlur(H){v(!0),C(!1),A==="onBlur"&&M.commit(H.currentTarget.value)},onKeyDown(H){H.currentTarget.tagName==="INPUT"&&H.key==="Enter"&&(v(!0),M.commit(H.currentTarget.value))}},M.getInputValidationProps(),p],stateAttributesMapping:C0})});function bS({className:e,...t}){return j.jsx(mge,{className:gn("flex flex-col items-start gap-2",e),"data-slot":"field",...t})}function SS({className:e,...t}){return j.jsx(lye,{className:gn("inline-flex items-center gap-2 text-sm/4",e),"data-slot":"field-label",...t})}const pye=k.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,...l}=t,[c,u]=k.useState(void 0),d=k.useMemo(()=>({disabled:s}),[s]),h=hr("fieldset",t,{ref:n,state:d,props:[{"aria-labelledby":c},l]}),p=k.useMemo(()=>({legendId:c,setLegendId:u,disabled:s}),[c,u,s]);return j.jsx(j9.Provider,{value:p,children:h})});function mye({className:e,...t}){return j.jsx(pye,{className:gn("flex w-full max-w-64 flex-col gap-6",e),"data-slot":"fieldset",...t})}const gye=k.forwardRef(function(t,n){return j.jsx(hye,{ref:n,...t})});function yye({className:e,size:t="default",unstyled:n=!1,...r}){return j.jsx("span",{className:gn(!n&&"relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base/5 shadow-xs ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]",e)||void 0,"data-size":t,"data-slot":"input-control",children:j.jsx(gye,{className:gn("w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none placeholder:text-muted-foreground/72",t==="sm"&&"px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)]",t==="lg"&&"py-[calc(--spacing(2)-1px)]",r.type==="search"&&"[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none",r.type==="file"&&"text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm"),"data-slot":"input",size:typeof t=="number"?t:void 0,...r})})}const BE={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function vye(e){const t=k.useRef(!0);t.current&&(t.current=!1,e())}function Ur(e){const t=Yo(bye,e).current;return t.next=e,rt(t.effect),t}function bye(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var jy=Symbol("NOT_FOUND");function Sye(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function wye(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function xye(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var S3=e=>Array.isArray(e)?e:[e];function _ye(e){const t=Array.isArray(e[0])?e[0]:e;return xye(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Eye(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Cye(e){let t;return{get(n){return t&&e(t.key,n)?t.value:jy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Tye(e,t){let n=[];function r(c){const u=n.findIndex(d=>t(c,d.key));if(u>-1){const d=n[u];return u>0&&(n.splice(u,1),n.unshift(d)),d.value}return jy}function i(c,u){r(c)===jy&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function s(){return n}function l(){n=[]}return{get:r,put:i,getEntries:s,clear:l}}var Rye=(e,t)=>e===t;function Aye(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let s=0;s<i;s++)if(!e(n[s],r[s]))return!1;return!0}}function Oye(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=Rye,maxSize:i=1,resultEqualityCheck:s}=n,l=Aye(r);let c=0;const u=i<=1?Cye(l):Tye(i,l);function d(){let h=u.get(arguments);if(h===jy){if(h=e.apply(null,arguments),c++,s){const g=u.getEntries().find(x=>s(x.value,h));g&&(h=g.value,c!==0&&c--)}u.put(arguments,h)}return h}return d.clearCache=()=>{u.clear(),d.resetResultsCount()},d.resultsCount=()=>c,d.resetResultsCount=()=>{c=0},d}var kye=class{constructor(e){this.value=e}deref(){return this.value}},Mye=typeof WeakRef<"u"?WeakRef:kye,jye=0,w3=1;function pg(){return{s:jye,v:void 0,o:null,p:null}}function d6(e,t={}){let n=pg();const{resultEqualityCheck:r}=t;let i,s=0;function l(){let c=n;const{length:u}=arguments;for(let p=0,g=u;p<g;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let y=c.o;y===null&&(c.o=y=new WeakMap);const T=y.get(x);T===void 0?(c=pg(),y.set(x,c)):c=T}else{let y=c.p;y===null&&(c.p=y=new Map);const T=y.get(x);T===void 0?(c=pg(),y.set(x,c)):c=T}}const d=c;let h;if(c.s===w3)h=c.v;else if(h=e.apply(null,arguments),s++,r){const p=i?.deref?.()??i;p!=null&&r(p,h)&&(h=p,s!==0&&s--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Mye(h):h}return d.s=w3,d.v=h,h}return l.clearCache=()=>{n=pg(),l.resetResultsCount()},l.resultsCount=()=>s,l.resetResultsCount=()=>{s=0},l}function h6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let s=0,l=0,c,u={},d=i.pop();typeof d=="object"&&(u=d,d=i.pop()),Sye(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:x=d6,argsMemoizeOptions:y=[]}=h,T=S3(g),w=S3(y),S=_ye(i),v=p(function(){return s++,d.apply(null,arguments)},...T),E=x(function(){l++;const C=Eye(S,arguments);return c=v.apply(null,C),c},...w);return Object.assign(E,{resultFunc:d,memoizedResultFunc:v,dependencies:S,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var Pye=h6(d6),Dye=Object.assign((e,t=Pye)=>{wye(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((l,c,u)=>(l[n[u]]=c,l),{}))},{withTypes:()=>Dye});h6({memoize:Oye,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const on=(e,t,n,r,i,s,...l)=>{if(l.length>0)throw new Error(Co(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var wS={exports:{}},xS={};var x3;function Nye(){if(x3)return xS;x3=1;var e=rf();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(p,g){var x=g(),y=r({inst:{value:x,getSnapshot:g}}),T=y[0].inst,w=y[1];return s(function(){T.value=x,T.getSnapshot=g,u(T)&&w({inst:T})},[p,x,g]),i(function(){return u(T)&&w({inst:T}),p(function(){u(T)&&w({inst:T})})},[p]),l(x),x}function u(p){var g=p.getSnapshot;p=p.value;try{var x=g();return!n(p,x)}catch{return!0}}function d(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return xS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,xS}var _3;function p6(){return _3||(_3=1,wS.exports=Nye()),wS.exports}var $ye=p6(),_S={exports:{}},ES={};var E3;function Iye(){if(E3)return ES;E3=1;var e=rf(),t=p6();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return ES.useSyncExternalStoreWithSelector=function(d,h,p,g,x){var y=s(null);if(y.current===null){var T={hasValue:!1,value:null};y.current=T}else T=y.current;y=c(function(){function S(_){if(!v){if(v=!0,E=_,_=g(_),x!==void 0&&T.hasValue){var A=T.value;if(x(A,_))return b=A}return b=_}if(A=b,r(E,_))return A;var M=g(_);return x!==void 0&&x(A,M)?(E=_,A):(E=_,b=M)}var v=!1,E,b,C=p===void 0?null:p;return[function(){return S(h())},C===null?void 0:function(){return S(C())}]},[h,p,g,x]);var w=i(d,y[0],y[1]);return l(function(){T.hasValue=!0,T.value=w},[w]),u(w),w},ES}var C3;function zye(){return C3||(C3=1,_S.exports=Iye()),_S.exports}var Fye=zye();const Lye=$E(19),Vye=Lye?Uye:qye;function wt(e,t,n,r,i){return Vye(e,t,n,r,i)}function Uye(e,t,n,r,i){const s=k.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return $ye.useSyncExternalStore(e.subscribe,s,s)}function qye(e,t,n,r,i){return Fye.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,i))}class Au{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Au.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Au.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Au.prototype.setState.call(this,t)}}class Bye extends Au{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){k.useDebugValue(t),rt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){rt(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){const n=Object.values(t);rt(()=>{this.update(t)},n)}useControlledProp(t,n,r){k.useDebugValue(t);const i=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,i),!i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),rt(()=>{i&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,i])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const s=this.selectors[t];return s(this.state,n,r,i)};useState=(t,n,r,i)=>{k.useDebugValue(t);const s=this.selectors[t];return wt(this,s,n,r,i)};useContextCallback(t,n){k.useDebugValue(t);const r=nt(n??ji);this.context[t]=r}useStateSetter(t){const n=k.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(s=>{const l=r(s);if(!Object.is(i,l)){const c=i;i=l,n(l,c,this)}})}}function Hye(){const[,e]=k.useState({});return k.useCallback(()=>{e({})},[])}const mg=null;class Kye{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i<n.length;i+=1)n[i]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const gg=new Kye;class $o{static create(){return new $o}static request(t){return gg.request(t)}static cancel(t){return gg.cancel(t)}currentId=mg;request(t){this.cancel(),this.currentId=gg.request(()=>{this.currentId=mg,t()})}cancel=()=>{this.currentId!==mg&&(gg.cancel(this.currentId),this.currentId=mg)};disposeEffect=()=>this.cancel}function P0(){const e=Yo($o.create).current;return IE(e.disposeEffect),e}function Gye(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const Zye=k.createContext(null),Wye=k.createContext(null),m6=()=>k.useContext(Zye)?.id||null,D0=e=>{const t=k.useContext(Wye);return e??t};function Py(e){return`data-base-ui-${e}`}function Xo(e){return e?.ownerDocument||document}const Dy=k.forwardRef(function(t,n){const[r,i]=k.useState();rt(()=>{Rge&&i("button")},[]);const s={tabIndex:0,role:r};return j.jsx("span",{...t,ref:n,style:BE,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});let T3=0;function Bg(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(T3);const s=()=>e?.focus({preventScroll:n});i?s():T3=requestAnimationFrame(s)}const Ou={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function R3(e){return e==="inert"?Ou.inert:e==="aria-hidden"?Ou["aria-hidden"]:Ou.none}let yg=new WeakSet,vg={},CS=0;const g6=e=>e&&(e.host||g6(e.parentNode)),Yye=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=g6(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Xye(e,t,n,r){const i="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,l=Yye(t,e),c=new Set,u=new Set(l),d=[];vg[i]||(vg[i]=new WeakMap);const h=vg[i];l.forEach(p),g(t),c.clear();function p(x){!x||c.has(x)||(c.add(x),x.parentNode&&p(x.parentNode))}function g(x){!x||u.has(x)||[].forEach.call(x.children,y=>{if(Qa(y)!=="script")if(c.has(y))g(y);else{const T=s?y.getAttribute(s):null,w=T!==null&&T!=="false",S=R3(s),v=(S.get(y)||0)+1,E=(h.get(y)||0)+1;S.set(y,v),h.set(y,E),d.push(y),v===1&&w&&yg.add(y),E===1&&y.setAttribute(i,""),!w&&s&&y.setAttribute(s,s==="inert"?"":"true")}})}return CS+=1,()=>{d.forEach(x=>{const y=R3(s),w=(y.get(x)||0)-1,S=(h.get(x)||0)-1;y.set(x,w),h.set(x,S),w||(!yg.has(x)&&s&&x.removeAttribute(s),yg.delete(x)),S||x.removeAttribute(i)}),CS-=1,CS||(Ou.inert=new WeakMap,Ou["aria-hidden"]=new WeakMap,Ou.none=new WeakMap,yg=new WeakSet,vg={})}}function Qye(e,t=!1,n=!1){const r=ti(e[0]).body;return Xye(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const y6=k.createContext(null),v6=()=>k.useContext(y6),Jye=Py("portal");function e0e(e={}){const{ref:t,container:n,componentProps:r=di,elementProps:i,elementState:s}=e,l=NE(),u=v6()?.portalNode,[d,h]=k.useState(null),[p,g]=k.useState(null),x=k.useRef(null);rt(()=>{if(n===null){x.current&&(x.current=null,g(null),h(null));return}if(l==null)return;const w=(n&&(zE(n)?n:n.current))??u??document.body;if(w==null){x.current&&(x.current=null,g(null),h(null));return}x.current!==w&&(x.current=w,g(null),h(w))},[n,u,l]);const y=hr("div",r,{ref:[t,g],state:s,props:[{id:l,[Jye]:""},i]});return{portalNode:p,portalSubtree:d&&y?Wo.createPortal(y,d):null}}const t0e=k.forwardRef(function(t,n){const{children:r,container:i,className:s,render:l,renderGuards:c,...u}=t,{portalNode:d,portalSubtree:h}=e0e({container:i,ref:n,componentProps:t,elementProps:u}),p=k.useRef(null),g=k.useRef(null),x=k.useRef(null),y=k.useRef(null),[T,w]=k.useState(null),S=T?.modal,v=T?.open,E=typeof c=="boolean"?c:!!T&&!T.modal&&T.open&&!!d;k.useEffect(()=>{if(!d||S)return;function C(_){d&&Kd(_)&&(_.type==="focusin"?b3:aye)(d)}return d.addEventListener("focusin",C,!0),d.addEventListener("focusout",C,!0),()=>{d.removeEventListener("focusin",C,!0),d.removeEventListener("focusout",C,!0)}},[d,S]),k.useEffect(()=>{!d||v||b3(d)},[v,d]);const b=k.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:x,afterInsideRef:y,portalNode:d,setFocusManagerState:w}),[d]);return j.jsxs(k.Fragment,{children:[h,j.jsxs(y6.Provider,{value:b,children:[E&&d&&j.jsx(Dy,{"data-type":"outside",ref:p,onFocus:C=>{if(Kd(C,d))x.current?.focus();else{const _=T?T.domReference:null;l6(_)?.focus()}}}),E&&d&&j.jsx("span",{"aria-owns":d.id,style:Bme}),d&&Wo.createPortal(r,d),E&&d&&j.jsx(Dy,{"data-type":"outside",ref:g,onFocus:C=>{if(Kd(C,d))y.current?.focus();else{const _=T?T.domReference:null;a6(_)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,An(j0,C.nativeEvent))}}})]})]})});function $l(e){return e==null?e:"current"in e?e.current:e}function n0e(e,t){const n=Cr(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const A3=20;let Ta=[];function HE(){Ta=Ta.filter(e=>e.isConnected)}function r0e(e){HE(),e&&Qa(e)!=="body"&&(Ta.push(e),Ta.length>A3&&(Ta=Ta.slice(-A3)))}function TS(){return HE(),Ta[Ta.length-1]}function i0e(e){if(!e)return null;const t=Wh();return o6(e,t)?e:M0(e,t)[0]||e}function o0e(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():$i(e).display!=="none"}function O3(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Wh(),i=sye(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return o6(l,n)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function s0e(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:s=!0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,closeOnFocusOut:d=!0,openInteractionType:h="",getInsideElements:p=()=>[],nextFocusableElement:g,previousFocusableElement:x,beforeContentFocusGuardRef:y,externalTree:T}=e,w="rootStore"in t?t.rootStore:t,S=w.useState("open"),v=w.useState("domReferenceElement"),E=w.useState("floatingElement"),{events:b,dataRef:C}=w.context,_=nt(()=>C.current.floatingContext?.nodeId),A=nt(p),M=s===!1,P=hx(v)&&M,I=Ur(i),z=Ur(s),q=Ur(l),K=Ur(h),X=D0(T),Y=v6(),H=k.useRef(null),Z=k.useRef(null),ee=k.useRef(!1),ae=k.useRef(!1),re=k.useRef(!1),$=k.useRef(-1),B=k.useRef(""),F=k.useRef(""),D=pi(),V=pi(),J=P0(),ne=Y!=null,oe=Ey(E),he=nt((we=oe)=>we?M0(we,Wh()):[]),Ee=nt(we=>{const Ie=he(we);return I.current.map(()=>Ie).filter(Boolean).flat()});k.useEffect(()=>{if(r||!u)return;function we(Pe){Pe.key==="Tab"&&Fn(oe,Cs(ti(oe)))&&he().length===0&&!P&&Hr(Pe)}const Ie=ti(oe);return Ie.addEventListener("keydown",we),()=>{Ie.removeEventListener("keydown",we)}},[r,v,oe,u,I,P,he,Ee]),k.useEffect(()=>{if(r||!E)return;function we(Ie){const Pe=Wi(Ie),Ue=he().indexOf(Pe);Ue!==-1&&($.current=Ue)}return E.addEventListener("focusin",we),()=>{E.removeEventListener("focusin",we)}},[r,E,he]),k.useEffect(()=>{if(r||!S)return;const we=ti(oe);function Ie(){re.current=!1}function Pe(Ue){const De=Wi(Ue),We=Fn(E,De)||Fn(v,De)||Fn(Y?.portalNode,De);re.current=!We,F.current=Ue.pointerType||"keyboard"}function ye(){F.current="keyboard"}return we.addEventListener("pointerdown",Pe,!0),we.addEventListener("pointerup",Ie,!0),we.addEventListener("pointercancel",Ie,!0),we.addEventListener("keydown",ye,!0),()=>{we.removeEventListener("pointerdown",Pe,!0),we.removeEventListener("pointerup",Ie,!0),we.removeEventListener("pointercancel",Ie,!0),we.removeEventListener("keydown",ye,!0)}},[r,E,v,oe,S,Y]),k.useEffect(()=>{if(r||!d)return;function we(){ae.current=!0,V.start(0,()=>{ae.current=!1})}function Ie(De){const We=De.relatedTarget,ze=De.currentTarget,Ve=Wi(De);queueMicrotask(()=>{const qe=_(),dt=w.context.triggerElements,Ce=!(Fn(v,We)||Fn(E,We)||Fn(We,E)||Fn(Y?.portalNode,We)||We!=null&&dt.hasElement(We)||dt.hasMatchingElement(pe=>Fn(pe,We))||We?.hasAttribute(Py("focus-guard"))||X&&(Tu(X.nodesRef.current,qe).find(pe=>Fn(pe.context?.elements.floating,We)||Fn(pe.context?.elements.domReference,We))||p3(X.nodesRef.current,qe).find(pe=>[pe.context?.elements.floating,Ey(pe.context?.elements.floating)].includes(We)||pe.context?.elements.domReference===We)));if(ze===v&&oe&&O3(oe,I),c&&ze!==v&&!o0e(Ve)&&Cs(ti(oe))===ti(oe).body){if(Jn(oe)&&(oe.focus(),c==="popup")){J.request(()=>{oe.focus()});return}const pe=$.current,Ne=he(),He=Ne[pe]||Ne[Ne.length-1]||oe;Jn(He)&&He.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(P||!u)&&We&&Ce&&!ae.current&&(P||We!==TS())&&(ee.current=!0,w.setOpen(!1,An(j0,De)))})}function Pe(){re.current||(C.current.insideReactTree=!0,D.start(0,()=>{C.current.insideReactTree=!1}))}const ye=Jn(v)?v:null,Ue=[];if(!(!E&&!ye))return ye&&(ye.addEventListener("focusout",Ie),ye.addEventListener("pointerdown",we),Ue.push(()=>{ye.removeEventListener("focusout",Ie),ye.removeEventListener("pointerdown",we)})),E&&(E.addEventListener("focusout",Ie),Y&&(E.addEventListener("focusout",Pe,!0),Ue.push(()=>{E.removeEventListener("focusout",Pe,!0)})),Ue.push(()=>{E.removeEventListener("focusout",Ie)})),()=>{Ue.forEach(De=>{De()})}},[r,v,E,oe,u,X,Y,w,d,c,he,P,_,I,C,D,V,J]);const te=k.useRef(null),ie=k.useRef(null),le=Ga(te,y,Y?.beforeInsideRef),Se=Ga(ie,Y?.afterInsideRef);k.useEffect(()=>{if(r||!E||!S)return;const we=Array.from(Y?.portalNode?.querySelectorAll(`[${Py("portal")}]`)||[]),Pe=(X?p3(X.nodesRef.current,_()):[]).find(De=>hx(De.context?.elements.domReference||null))?.context?.elements.domReference,ye=[E,Pe,...we,...A(),H.current,Z.current,te.current,ie.current,Y?.beforeOutsideRef.current,Y?.afterOutsideRef.current,$l(x),$l(g),P?v:null].filter(De=>De!=null),Ue=Qye(ye,u||P);return()=>{Ue()}},[S,r,v,E,u,I,Y,P,X,_,A,g,x]),rt(()=>{if(!S||r||!Jn(oe))return;const we=ti(oe),Ie=Cs(we);queueMicrotask(()=>{const Pe=Ee(oe),ye=z.current,Ue=typeof ye=="function"?ye(K.current||""):ye;if(Ue===void 0||Ue===!1)return;let De;Ue===!0||Ue===null?De=Pe[0]||oe:De=$l(Ue),De=De||Pe[0]||oe,!Fn(oe,Ie)&&Bg(De,{preventScroll:De===oe})})},[r,S,oe,M,Ee,z,K]),rt(()=>{if(r||!oe)return;const we=ti(oe),Ie=Cs(we);r0e(Ie);function Pe(De){if(De.open||(B.current=n0e(De.nativeEvent,F.current)),De.reason===cye&&De.nativeEvent.type==="mouseleave"&&(ee.current=!0),De.reason===f6)if(De.nested)ee.current=!1;else if(H9(De.nativeEvent)||K9(De.nativeEvent))ee.current=!1;else{let We=!1;document.createElement("div").focus({get preventScroll(){return We=!0,!1}}),We?ee.current=!1:ee.current=!0}}b.on("openchange",Pe);const ye=we.createElement("span");ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),Object.assign(ye.style,BE),ne&&v&&v.insertAdjacentElement("afterend",ye);function Ue(){const De=q.current;let We=typeof De=="function"?De(B.current):De;if(We===void 0||We===!1)return null;if(We===null&&(We=!0),typeof We=="boolean"){const Ve=v||TS();return Ve&&Ve.isConnected?Ve:ye}const ze=v||TS()||ye;return $l(We)||ze}return()=>{b.off("openchange",Pe);const De=Cs(we),We=Fn(E,De)||X&&Tu(X.nodesRef.current,_(),!1).some(Ve=>Fn(Ve.context?.elements.floating,De)),ze=Ue();queueMicrotask(()=>{const Ve=i0e(ze),qe=typeof q.current!="boolean";q.current&&!ee.current&&Jn(Ve)&&(!(!qe&&Ve!==De&&De!==we.body)||We)&&Ve.focus({preventScroll:!0}),ye.remove()})}},[r,E,oe,q,C,b,X,ne,v,_]),k.useEffect(()=>{queueMicrotask(()=>{ee.current=!1})},[r]),k.useEffect(()=>{if(r||!S)return;function we(Pe){Wi(Pe)?.closest(`[${Ume}]`)&&(ae.current=!0)}const Ie=ti(oe);return Ie.addEventListener("pointerdown",we,!0),()=>{Ie.removeEventListener("pointerdown",we,!0)}},[r,S,oe]),rt(()=>{if(!r&&Y)return Y.setFocusManagerState({modal:u,closeOnFocusOut:d,open:S,onOpenChange:w.setOpen,domReference:v}),()=>{Y.setFocusManagerState(null)}},[r,Y,u,S,w,d,v]),rt(()=>{if(!(r||!oe))return O3(oe,I),()=>{queueMicrotask(HE)}},[r,oe,I]);const Re=!r&&(u?!P:!0)&&(ne||u);return j.jsxs(k.Fragment,{children:[Re&&j.jsx(Dy,{"data-type":"inside",ref:le,onFocus:we=>{if(u){const Ie=Ee();Bg(Ie[Ie.length-1])}else Y?.portalNode&&(ee.current=!1,Kd(we,Y.portalNode)?a6(v)?.focus():$l(x??Y.beforeOutsideRef)?.focus())}}),n,Re&&j.jsx(Dy,{"data-type":"inside",ref:Se,onFocus:we=>{u?Bg(Ee()[0]):Y?.portalNode&&(d&&(ee.current=!0),Kd(we,Y.portalNode)?l6(v)?.focus():$l(g??Y.afterOutsideRef)?.focus())}})]})}function a0e(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:u=!0,touchOpenDelay:d=0}=t,h=k.useRef(void 0),p=P0(),g=pi(),x=k.useMemo(()=>({onPointerDown(y){h.current=y.pointerType},onMouseDown(y){const T=h.current,w=y.nativeEvent,S=n.select("open");if(y.button!==0||s==="click"||m3(T)&&c)return;const v=r.current.openEvent,E=v?.type,b=n.select("domReferenceElement")!==y.currentTarget,C=S&&b||!(S&&l&&(!(v&&u)||E==="click"||E==="mousedown"));if(B9(w.target)){const A=An(Gd,w,w.target);C&&T==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,A)}):n.setOpen(C,A);return}const _=y.currentTarget;p.request(()=>{const A=An(Gd,w,_);C&&T==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,A)}):n.setOpen(C,A)})},onClick(y){if(s==="mousedown-only")return;const T=h.current;if(s==="mousedown"&&T){h.current=void 0;return}if(m3(T)&&c)return;const w=n.select("open"),S=r.current.openEvent,v=n.select("domReferenceElement")!==y.currentTarget,E=w&&v||!(w&&l&&(!(S&&u)||G9(S))),b=An(Gd,y.nativeEvent,y.currentTarget);E&&T==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,b)}):n.setOpen(E,b)},onKeyDown(){h.current=void 0}}),[r,s,c,n,u,l,p,g,d]);return k.useMemo(()=>i?{reference:x}:di,[i,x])}function k3(e,t,n){let{reference:r,floating:i}=e;const s=Qi(t),l=qE(t),c=UE(l),u=Ni(t),d=s==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[c]/2-i[c]/2;let x;switch(u){case"top":x={x:h,y:r.y-i.height};break;case"bottom":x={x:h,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-i.width,y:p};break;default:x={x:r.x,y:r.y}}switch(Ja(t)){case"start":x[l]-=g*(n&&d?-1:1);break;case"end":x[l]+=g*(n&&d?-1:1);break}return x}const l0e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,c=s.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=k3(d,r,u),g=r,x={},y=0;for(let T=0;T<c.length;T++){const{name:w,fn:S}=c[T],{x:v,y:E,data:b,reset:C}=await S({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:x,rects:d,platform:l,elements:{reference:e,floating:t}});h=v??h,p=E??p,x={...x,[w]:{...x[w],...b}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(d=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:h,y:p}=k3(d,g,u)),T=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:x}};async function vh(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:l,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:x=0}=Ps(t,e),y=Z9(x),w=c[g?p==="floating"?"reference":"floating":p],S=Ry(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),v=p==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},C=Ry(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:E,strategy:u}):v);return{top:(S.top-C.top+y.top)/b.y,bottom:(C.bottom-S.bottom+y.bottom)/b.y,left:(S.left-C.left+y.left)/b.x,right:(C.right-S.right+y.right)/b.x}}const c0e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:l,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:T=!0,...w}=Ps(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=Ni(i),v=Qi(c),E=Ni(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),C=g||(E||!T?[Ty(c)]:Lge(c)),_=y!=="none";!g&&_&&C.push(...Bge(c,T,y,b));const A=[c,...C],M=await vh(t,w),P=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&P.push(M[S]),p){const X=Fge(i,l,b);P.push(M[X[0]],M[X[1]])}if(I=[...I,{placement:i,overflows:P}],!P.every(X=>X<=0)){var z,q;const X=(((z=s.flip)==null?void 0:z.index)||0)+1,Y=A[X];if(Y&&(!(p==="alignment"?v!==Qi(Y):!1)||I.every(ee=>Qi(ee.placement)===v?ee.overflows[0]>0:!0)))return{data:{index:X,overflows:I},reset:{placement:Y}};let H=(q=I.filter(Z=>Z.overflows[0]<=0).sort((Z,ee)=>Z.overflows[1]-ee.overflows[1])[0])==null?void 0:q.placement;if(!H)switch(x){case"bestFit":{var K;const Z=(K=I.filter(ee=>{if(_){const ae=Qi(ee.placement);return ae===v||ae==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ae=>ae>0).reduce((ae,re)=>ae+re,0)]).sort((ee,ae)=>ee[1]-ae[1])[0])==null?void 0:K[0];Z&&(H=Z);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function M3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function j3(e){return Nge.some(t=>e[t]>=0)}const u0e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ps(e,t);switch(r){case"referenceHidden":{const s=await vh(t,{...i,elementContext:"reference"}),l=M3(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:j3(l)}}}case"escaped":{const s=await vh(t,{...i,altBoundary:!0}),l=M3(s,n.floating);return{data:{escapedOffsets:l,escaped:j3(l)}}}default:return{}}}}},b6=new Set(["left","top"]);async function f0e(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Ni(n),c=Ja(n),u=Qi(n)==="y",d=b6.has(l)?-1:1,h=s&&u?-1:1,p=Ps(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof y=="number"&&(x=c==="end"?y*-1:y),u?{x:x*h,y:g*d}:{x:g*d,y:x*h}}const d0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:l,middlewareData:c}=t,u=await f0e(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:l}}}}},h0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:w=>{let{x:S,y:v}=w;return{x:S,y:v}}},...u}=Ps(e,t),d={x:n,y:r},h=await vh(t,u),p=Qi(Ni(i)),g=VE(p);let x=d[g],y=d[p];if(s){const w=g==="y"?"top":"left",S=g==="y"?"bottom":"right",v=x+h[w],E=x-h[S];x=px(v,x,E)}if(l){const w=p==="y"?"top":"left",S=p==="y"?"bottom":"right",v=y+h[w],E=y-h[S];y=px(v,y,E)}const T=c.fn({...t,[g]:x,[p]:y});return{...T,data:{x:T.x-n,y:T.y-r,enabled:{[g]:s,[p]:l}}}}}},p0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ps(e,t),h={x:n,y:r},p=Qi(i),g=VE(p);let x=h[g],y=h[p];const T=Ps(c,t),w=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(u){const E=g==="y"?"height":"width",b=s.reference[g]-s.floating[E]+w.mainAxis,C=s.reference[g]+s.reference[E]-w.mainAxis;x<b?x=b:x>C&&(x=C)}if(d){var S,v;const E=g==="y"?"width":"height",b=b6.has(Ni(i)),C=s.reference[p]-s.floating[E]+(b&&((S=l.offset)==null?void 0:S[p])||0)+(b?0:w.crossAxis),_=s.reference[p]+s.reference[E]+(b?0:((v=l.offset)==null?void 0:v[p])||0)-(b?w.crossAxis:0);y<C?y=C:y>_&&(y=_)}return{[g]:x,[p]:y}}}},m0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:l,elements:c}=t,{apply:u=()=>{},...d}=Ps(e,t),h=await vh(t,d),p=Ni(i),g=Ja(i),x=Qi(i)==="y",{width:y,height:T}=s.floating;let w,S;p==="top"||p==="bottom"?(w=p,S=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(S=p,w=g==="end"?"top":"bottom");const v=T-h.top-h.bottom,E=y-h.left-h.right,b=Ju(T-h[w],v),C=Ju(y-h[S],E),_=!t.middlewareData.shift;let A=b,M=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=v),_&&!g){const I=Mi(h.left,0),z=Mi(h.right,0),q=Mi(h.top,0),K=Mi(h.bottom,0);x?M=y-2*(I!==0||z!==0?I+z:Mi(h.left,h.right)):A=T-2*(q!==0||K!==0?q+K:Mi(h.top,h.bottom))}await u({...t,availableWidth:M,availableHeight:A});const P=await l.getDimensions(c.floating);return y!==P.width||T!==P.height?{reset:{rects:!0}}:{}}}};function S6(e){const t=$i(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jn(e),s=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Cy(n)!==s||Cy(r)!==l;return c&&(n=s,r=l),{width:n,height:r,$:c}}function KE(e){return Ln(e)?e:e.contextElement}function ku(e){const t=KE(e);if(!Jn(t))return Ko(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=S6(t);let l=(s?Cy(n.width):n.width)/r,c=(s?Cy(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const g0e=Ko(0);function w6(e){const t=Cr(e);return!O0()||!t.visualViewport?g0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Cr(e)?!1:t}function Jl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=KE(e);let l=Ko(1);t&&(r?Ln(r)&&(l=ku(r)):l=ku(e));const c=y0e(s,n,r)?w6(s):Ko(0);let u=(i.left+c.x)/l.x,d=(i.top+c.y)/l.y,h=i.width/l.x,p=i.height/l.y;if(s){const g=Cr(s),x=r&&Ln(r)?Cr(r):r;let y=g,T=ux(y);for(;T&&r&&x!==y;){const w=ku(T),S=T.getBoundingClientRect(),v=$i(T),E=S.left+(T.clientLeft+parseFloat(v.paddingLeft))*w.x,b=S.top+(T.clientTop+parseFloat(v.paddingTop))*w.y;u*=w.x,d*=w.y,h*=w.x,p*=w.y,u+=E,d+=b,y=Cr(T),T=ux(y)}}return Ry({width:h,height:p,x:u,y:d})}function N0(e,t){const n=k0(e).scrollLeft;return t?t.left+n:Jl(ns(e)).left+n}function x6(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-N0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function v0e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",l=ns(r),c=t?A0(t.floating):!1;if(r===l||c&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Ko(1);const h=Ko(0),p=Jn(r);if((p||!p&&!s)&&((Qa(r)!=="body"||pc(l))&&(u=k0(r)),Jn(r))){const x=Jl(r);d=ku(r),h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}const g=l&&!p&&!s?x6(l,u):Ko(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-u.scrollTop*d.y+h.y+g.y}}function b0e(e){return Array.from(e.getClientRects())}function S0e(e){const t=ns(e),n=k0(e),r=e.ownerDocument.body,i=Mi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Mi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+N0(e);const c=-n.scrollTop;return $i(r).direction==="rtl"&&(l+=Mi(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:l,y:c}}const P3=25;function w0e(e,t){const n=Cr(e),r=ns(e),i=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,c=0,u=0;if(i){s=i.width,l=i.height;const h=O0();(!h||h&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}const d=N0(r);if(d<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),x=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-x);y<=P3&&(s-=y)}else d<=P3&&(s+=d);return{width:s,height:l,x:c,y:u}}const x0e=new Set(["absolute","fixed"]);function _0e(e,t){const n=Jl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Jn(e)?ku(e):Ko(1),l=e.clientWidth*s.x,c=e.clientHeight*s.y,u=i*s.x,d=r*s.y;return{width:l,height:c,x:u,y:d}}function D3(e,t,n){let r;if(t==="viewport")r=w0e(e,n);else if(t==="document")r=S0e(ns(e));else if(Ln(t))r=_0e(t,n);else{const i=w6(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ry(r)}function _6(e,t){const n=js(e);return n===t||!Ln(n)||As(n)?!1:$i(n).position==="fixed"||_6(n,t)}function E0e(e,t){const n=t.get(e);if(n)return n;let r=Pa(e,[],!1).filter(c=>Ln(c)&&Qa(c)!=="body"),i=null;const s=$i(e).position==="fixed";let l=s?js(e):e;for(;Ln(l)&&!As(l);){const c=$i(l),u=FE(l);!u&&c.position==="fixed"&&(i=null),(s?!u&&!i:!u&&c.position==="static"&&!!i&&x0e.has(i.position)||pc(l)&&!u&&_6(e,l))?r=r.filter(h=>h!==l):i=c,l=js(l)}return t.set(e,r),r}function C0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?A0(t)?[]:E0e(t,this._c):[].concat(n),r],c=l[0],u=l.reduce((d,h)=>{const p=D3(t,h,i);return d.top=Mi(p.top,d.top),d.right=Ju(p.right,d.right),d.bottom=Ju(p.bottom,d.bottom),d.left=Mi(p.left,d.left),d},D3(t,c,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function T0e(e){const{width:t,height:n}=S6(e);return{width:t,height:n}}function R0e(e,t,n){const r=Jn(t),i=ns(t),s=n==="fixed",l=Jl(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Ko(0);function d(){u.x=N0(i)}if(r||!r&&!s)if((Qa(t)!=="body"||pc(i))&&(c=k0(t)),r){const x=Jl(t,!0,s,t);u.x=x.x+t.clientLeft,u.y=x.y+t.clientTop}else i&&d();s&&!r&&i&&d();const h=i&&!r&&!s?x6(i,c):Ko(0),p=l.left+c.scrollLeft-u.x-h.x,g=l.top+c.scrollTop-u.y-h.y;return{x:p,y:g,width:l.width,height:l.height}}function RS(e){return $i(e).position==="static"}function N3(e,t){if(!Jn(e)||$i(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ns(e)===n&&(n=n.ownerDocument.body),n}function E6(e,t){const n=Cr(e);if(A0(e))return n;if(!Jn(e)){let i=js(e);for(;i&&!As(i);){if(Ln(i)&&!RS(i))return i;i=js(i)}return n}let r=N3(e,t);for(;r&&bge(r)&&RS(r);)r=N3(r,t);return r&&As(r)&&RS(r)&&!FE(r)?n:r||Ege(e)||n}const A0e=async function(e){const t=this.getOffsetParent||E6,n=this.getDimensions,r=await n(e.floating);return{reference:R0e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function O0e(e){return $i(e).direction==="rtl"}const k0e={convertOffsetParentRelativeRectToViewportRelativeRect:v0e,getDocumentElement:ns,getClippingRect:C0e,getOffsetParent:E6,getElementRects:A0e,getClientRects:b0e,getDimensions:T0e,getScale:ku,isElement:Ln,isRTL:O0e};function C6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function M0e(e,t){let n=null,r;const i=ns(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:h,top:p,width:g,height:x}=d;if(c||t(),!g||!x)return;const y=bu(p),T=bu(i.clientWidth-(h+g)),w=bu(i.clientHeight-(p+x)),S=bu(h),E={rootMargin:-y+"px "+-T+"px "+-w+"px "+-S+"px",threshold:Mi(0,Ju(1,u))||1};let b=!0;function C(_){const A=_[0].intersectionRatio;if(A!==u){if(!b)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!C6(d,e.getBoundingClientRect())&&l(),b=!1}try{n=new IntersectionObserver(C,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,E)}n.observe(e)}return l(!0),s}function $3(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=KE(e),h=i||s?[...d?Pa(d):[],...Pa(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const p=d&&c?M0e(d,n):null;let g=-1,x=null;l&&(x=new ResizeObserver(S=>{let[v]=S;v&&v.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=x)==null||E.observe(t)})),n()}),d&&!u&&x.observe(d),x.observe(t));let y,T=u?Jl(e):null;u&&w();function w(){const S=Jl(e);T&&!C6(T,S)&&n(),T=S,y=requestAnimationFrame(w)}return n(),()=>{var S;h.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),p?.(),(S=x)==null||S.disconnect(),x=null,u&&cancelAnimationFrame(y)}}const j0e=d0e,P0e=h0e,D0e=c0e,N0e=m0e,$0e=u0e,I0e=p0e,z0e=(e,t,n)=>{const r=new Map,i={platform:k0e,...n},s={...i.platform,_c:r};return l0e(e,t,{...i,platform:s})};var F0e=typeof document<"u",L0e=function(){},Hg=F0e?k.useLayoutEffect:L0e;function Ny(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ny(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Ny(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function T6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function I3(e,t){const n=T6(e);return Math.round(t*n)/n}function AS(e){const t=k.useRef(e);return Hg(()=>{t.current=e}),t}function V0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,p]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=k.useState(r);Ny(g,r)||x(r);const[y,T]=k.useState(null),[w,S]=k.useState(null),v=k.useCallback(ee=>{ee!==_.current&&(_.current=ee,T(ee))},[]),E=k.useCallback(ee=>{ee!==A.current&&(A.current=ee,S(ee))},[]),b=s||y,C=l||w,_=k.useRef(null),A=k.useRef(null),M=k.useRef(h),P=u!=null,I=AS(u),z=AS(i),q=AS(d),K=k.useCallback(()=>{if(!_.current||!A.current)return;const ee={placement:t,strategy:n,middleware:g};z.current&&(ee.platform=z.current),z0e(_.current,A.current,ee).then(ae=>{const re={...ae,isPositioned:q.current!==!1};X.current&&!Ny(M.current,re)&&(M.current=re,Wo.flushSync(()=>{p(re)}))})},[g,t,n,z,q]);Hg(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(ee=>({...ee,isPositioned:!1})))},[d]);const X=k.useRef(!1);Hg(()=>(X.current=!0,()=>{X.current=!1}),[]),Hg(()=>{if(b&&(_.current=b),C&&(A.current=C),b&&C){if(I.current)return I.current(b,C,K);K()}},[b,C,K,I,P]);const Y=k.useMemo(()=>({reference:_,floating:A,setReference:v,setFloating:E}),[v,E]),H=k.useMemo(()=>({reference:b,floating:C}),[b,C]),Z=k.useMemo(()=>{const ee={position:n,left:0,top:0};if(!H.floating)return ee;const ae=I3(H.floating,h.x),re=I3(H.floating,h.y);return c?{...ee,transform:"translate("+ae+"px, "+re+"px)",...T6(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ae,top:re}},[n,c,H.floating,h.x,h.y]);return k.useMemo(()=>({...h,update:K,refs:Y,elements:H,floatingStyles:Z}),[h,K,Y,H,Z])}const U0e=(e,t)=>({...j0e(e),options:[e,t]}),q0e=(e,t)=>({...P0e(e),options:[e,t]}),B0e=(e,t)=>({...I0e(e),options:[e,t]}),H0e=(e,t)=>({...D0e(e),options:[e,t]}),K0e=(e,t)=>({...N0e(e),options:[e,t]}),G0e=(e,t)=>({...$0e(e),options:[e,t]}),Z0e={intentional:"onClick",sloppy:"onPointerDown"};function W0e(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Y0e(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:c,dataRef:u}=n.context,{enabled:d=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:x=!1,referencePressEvent:y="sloppy",ancestorScroll:T=!1,bubbles:w,externalTree:S}=t,v=D0(S),E=nt(typeof p=="function"?p:()=>!1),b=typeof p=="function"?E:p,C=k.useRef(!1),{escapeKey:_,outsidePress:A}=W0e(w),M=k.useRef(null),P=pi(),I=pi(),z=nt(()=>{I.clear(),u.current.insideReactTree=!1}),q=k.useRef(!1),K=k.useRef(""),X=nt(te=>{K.current=te.pointerType}),Y=nt(()=>{const te=K.current,ie=te==="pen"||!te?"mouse":te,le=typeof g=="function"?g():g;return typeof le=="string"?le:le[ie]}),H=nt(te=>{if(!r||!d||!h||te.key!=="Escape"||q.current)return;const ie=u.current.floatingContext?.nodeId,le=v?Tu(v.nodesRef.current,ie):[];if(!_&&le.length>0){let we=!0;if(le.forEach(Ie=>{Ie.context?.open&&!Ie.context.dataRef.current.__escapeKeyBubbles&&(we=!1)}),!we)return}const Se=Dge(te)?te.nativeEvent:te,Re=An(uye,Se);n.setOpen(!1,Re),!_&&!Re.isPropagationAllowed&&te.stopPropagation()}),Z=nt(te=>{const ie=Y();return ie==="intentional"&&te.type!=="click"||ie==="sloppy"&&te.type==="click"}),ee=nt(()=>{u.current.insideReactTree=!0,I.start(0,z)}),ae=nt((te,ie=!1)=>{if(Z(te)){z();return}if(u.current.insideReactTree){z();return}if(Y()==="intentional"&&ie||typeof b=="function"&&!b(te))return;const le=Wi(te),Se=`[${Py("inert")}]`,Re=ti(n.select("floatingElement")).querySelectorAll(Se),we=n.context.triggerElements;if(le&&(we.hasElement(le)||we.hasMatchingElement(De=>Fn(De,le))))return;let Ie=Ln(le)?le:null;for(;Ie&&!As(Ie);){const De=js(Ie);if(As(De)||!Ln(De))break;Ie=De}if(Re.length&&Ln(le)&&!Pge(le)&&!Fn(le,n.select("floatingElement"))&&Array.from(Re).every(De=>!Fn(Ie,De)))return;if(Jn(le)&&!("touches"in te)){const De=As(le),We=$i(le),ze=/auto|scroll/,Ve=De||ze.test(We.overflowX),qe=De||ze.test(We.overflowY),dt=Ve&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,Ce=qe&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,pe=We.direction==="rtl",Ne=Ce&&(pe?te.offsetX<=le.offsetWidth-le.clientWidth:te.offsetX>le.clientWidth),He=dt&&te.offsetY>le.clientHeight;if(Ne||He)return}const Pe=u.current.floatingContext?.nodeId,ye=v&&Tu(v.nodesRef.current,Pe).some(De=>yo(te,De.context?.elements.floating));if(yo(te,n.select("floatingElement"))||yo(te,n.select("domReferenceElement"))||ye)return;const Ue=v?Tu(v.nodesRef.current,Pe):[];if(Ue.length>0){let De=!0;if(Ue.forEach(We=>{We.context?.open&&!We.context.dataRef.current.__outsidePressBubbles&&(De=!1)}),!De)return}n.setOpen(!1,An(f6,te)),z()}),re=nt(te=>{Y()!=="sloppy"||te.pointerType==="touch"||!n.select("open")||!d||yo(te,n.select("floatingElement"))||yo(te,n.select("domReferenceElement"))||ae(te)}),$=nt(te=>{if(Y()!=="sloppy"||!n.select("open")||!d||yo(te,n.select("floatingElement"))||yo(te,n.select("domReferenceElement")))return;const ie=te.touches[0];ie&&(M.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}),B=nt(te=>{const ie=Wi(te);function le(){$(te),ie?.removeEventListener(te.type,le)}ie?.addEventListener(te.type,le)}),F=nt(te=>{const ie=C.current;if(C.current=!1,P.clear(),te.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)return;const le=Wi(te);function Se(){te.type==="pointerdown"?re(te):ae(te,ie),le?.removeEventListener(te.type,Se)}le?.addEventListener(te.type,Se)}),D=nt(te=>{if(Y()!=="sloppy"||!M.current||yo(te,n.select("floatingElement"))||yo(te,n.select("domReferenceElement")))return;const ie=te.touches[0];if(!ie)return;const le=Math.abs(ie.clientX-M.current.startX),Se=Math.abs(ie.clientY-M.current.startY),Re=Math.sqrt(le*le+Se*Se);Re>5&&(M.current.dismissOnTouchEnd=!0),Re>10&&(ae(te),P.clear(),M.current=null)}),V=nt(te=>{const ie=Wi(te);function le(){D(te),ie?.removeEventListener(te.type,le)}ie?.addEventListener(te.type,le)}),J=nt(te=>{Y()!=="sloppy"||!M.current||yo(te,n.select("floatingElement"))||yo(te,n.select("domReferenceElement"))||(M.current.dismissOnTouchEnd&&ae(te),P.clear(),M.current=null)}),ne=nt(te=>{const ie=Wi(te);function le(){J(te),ie?.removeEventListener(te.type,le)}ie?.addEventListener(te.type,le)});k.useEffect(()=>{if(!r||!d)return;u.current.__escapeKeyBubbles=_,u.current.__outsidePressBubbles=A;const te=new Qu;function ie(Ie){n.setOpen(!1,An(tf,Ie))}function le(){te.clear(),q.current=!0}function Se(){te.start(O0()?5:0,()=>{q.current=!1})}const Re=ti(i);Re.addEventListener("pointerdown",X,!0),h&&(Re.addEventListener("keydown",H),Re.addEventListener("compositionstart",le),Re.addEventListener("compositionend",Se)),b&&(Re.addEventListener("click",F,!0),Re.addEventListener("pointerdown",F,!0),Re.addEventListener("touchstart",B,!0),Re.addEventListener("touchmove",V,!0),Re.addEventListener("touchend",ne,!0),Re.addEventListener("mousedown",F,!0));let we=[];return T&&(Ln(l)&&(we=Pa(l)),Ln(i)&&(we=we.concat(Pa(i))),!Ln(s)&&s&&s.contextElement&&(we=we.concat(Pa(s.contextElement)))),we=we.filter(Ie=>Ie!==Re.defaultView?.visualViewport),we.forEach(Ie=>{Ie.addEventListener("scroll",ie,{passive:!0})}),()=>{Re.removeEventListener("pointerdown",X,!0),h&&(Re.removeEventListener("keydown",H),Re.removeEventListener("compositionstart",le),Re.removeEventListener("compositionend",Se)),b&&(Re.removeEventListener("click",F,!0),Re.removeEventListener("pointerdown",F,!0),Re.removeEventListener("touchstart",B,!0),Re.removeEventListener("touchmove",V,!0),Re.removeEventListener("touchend",ne,!0),Re.removeEventListener("mousedown",F,!0)),we.forEach(Ie=>{Ie.removeEventListener("scroll",ie)}),te.clear()}},[u,i,s,l,h,b,r,c,T,d,_,A,H,ae,F,re,B,V,ne,X,n]),k.useEffect(z,[b,z]);const oe=k.useMemo(()=>({onKeyDown:H,...x&&{[Z0e[y]]:te=>{n.setOpen(!1,An(Gd,te.nativeEvent))},...y!=="intentional"&&{onClick(te){n.setOpen(!1,An(Gd,te.nativeEvent))}}}}),[H,n,x,y]),he=nt(te=>{const ie=Wi(te.nativeEvent);!Fn(n.select("floatingElement"),ie)||te.button!==0||(C.current=!0)}),Ee=k.useMemo(()=>({onKeyDown:H,onPointerDown:he,onMouseDown:he,onMouseUp:he,onClickCapture:ee,onMouseDownCapture:ee,onPointerDownCapture:ee,onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[H,he,ee]);return k.useMemo(()=>d?{reference:oe,floating:Ee,trigger:oe}:{},[d,oe,Ee])}const X0e={open:on(e=>e.open),domReferenceElement:on(e=>e.domReferenceElement),referenceElement:on(e=>e.positionReference??e.referenceElement),floatingElement:on(e=>e.floatingElement),floatingId:on(e=>e.floatingId)};class Q0e extends Bye{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:s,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:Gye(),nested:n,noEmit:r,triggerElements:s},X0e)}setOpen=(t,n)=>{if((!t||!this.state.open||G9(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function GE(e,t=!1,n=!1){const[r,i]=k.useState(e&&t?"idle":void 0),[s,l]=k.useState(e);return e&&!s&&(l(!0),i("starting")),!e&&s&&r!=="ending"&&!n&&i("ending"),!e&&!s&&r==="ending"&&i(void 0),rt(()=>{if(!e&&s&&r!=="ending"&&n){const c=$o.request(()=>{i("ending")});return()=>{$o.cancel(c)}}},[e,s,r,n]),rt(()=>{if(!e||t)return;const c=$o.request(()=>{Wo.flushSync(()=>{i(void 0)})});return()=>{$o.cancel(c)}},[t,e]),rt(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&i("starting");const c=$o.request(()=>{i("idle")});return()=>{$o.cancel(c)}},[t,e,s,i,r]),k.useMemo(()=>({mounted:s,setMounted:l,transitionStatus:r}),[s,r])}function J0e(e,t=!1,n=!0){const r=P0();return nt((i,s=null)=>{r.cancel();const l=$l(e);l!=null&&(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?i():r.request(()=>{function c(){l&&Promise.all(l.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||Wo.flushSync(i)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;Wo.flushSync(i)}else l.getAnimations().length>0&&l.getAnimations().some(u=>u.pending||u.playState!=="finished")&&c()})}t?r.request(c):c()}))})}function $0(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,s=Ur(n),l=nt(i),c=J0e(r,n);k.useEffect(()=>{t&&c(()=>{n===s.current&&l()})},[t,n,l,c,s])}class eve{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function R6(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=NE(),s=m6()!=null,l=Yo(()=>new Q0e({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new eve,floatingId:i,nested:s,noEmit:e.noEmit||!1})).current;return rt(()=>{const c={open:t,floatingId:i};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Ln(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=s,l.context.noEmit=e.noEmit||!1,l}function tve(e={}){const{nodeId:t,externalTree:n}=e,r=R6(e),i=e.rootContext||r,s={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,c]=k.useState(null),u=k.useRef(null),d=D0(n);rt(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const h=V0e({...e,elements:{...s,...l&&{reference:l}}}),p=k.useCallback(A=>{const M=Ln(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;c(M),h.refs.setReference(M)},[h.refs]),[g,x]=k.useState(null),[y,T]=k.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Ln(g)?g:null),i.useSyncedValue("floatingElement",y);const w=k.useCallback(A=>{(Ln(A)||A===null)&&(u.current=A,x(A)),(Ln(h.refs.reference.current)||h.refs.reference.current===null||A!==null&&!Ln(A))&&h.refs.setReference(A)},[h.refs,x]),S=k.useCallback(A=>{T(A),h.refs.setFloating(A)},[h.refs]),v=k.useMemo(()=>({...h.refs,setReference:w,setFloating:S,setPositionReference:p,domReference:u}),[h.refs,w,S,p]),E=k.useMemo(()=>({...h.elements,domReference:s.domReference}),[h.elements,s.domReference]),b=i.useState("open"),C=i.useState("floatingId"),_=k.useMemo(()=>({...h,dataRef:i.context.dataRef,open:b,onOpenChange:i.setOpen,events:i.context.events,floatingId:C,refs:v,elements:E,nodeId:t,rootStore:i}),[h,v,E,t,i,b,C]);return rt(()=>{i.context.dataRef.current.floatingContext=_;const A=d?.nodesRef.current.find(M=>M.id===t);A&&(A.context=_)}),k.useMemo(()=>({...h,context:_,refs:v,elements:E,rootStore:i}),[h,v,E,_,i])}function nve(e=[]){const t=e.map(d=>d?.reference),n=e.map(d=>d?.floating),r=e.map(d=>d?.item),i=e.map(d=>d?.trigger),s=k.useCallback(d=>bg(d,e,"reference"),t),l=k.useCallback(d=>bg(d,e,"floating"),n),c=k.useCallback(d=>bg(d,e,"item"),r),u=k.useCallback(d=>bg(d,e,"trigger"),i);return k.useMemo(()=>({getReferenceProps:s,getFloatingProps:l,getItemProps:c,getTriggerProps:u}),[s,l,c,u])}function bg(e,t,n){const r=new Map,i=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[dx]="");for(const l in e)i&&e&&(l===U9||l===q9)||(s[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const u=t[l]?.[n];typeof u=="function"?c=e?u(e):null:c=u,c&&z3(s,c,i,r)}return z3(s,e,i,r),s}function z3(e,t,n,r){for(const i in t){const s=t[i];n&&(i===U9||i===q9)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof s=="function"&&(r.get(i)?.push(s),e[i]=(...l)=>r.get(i)?.map(c=>c(...l)).find(c=>c!==void 0))):e[i]=s)}}const rve="Escape";function I0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Sg(e,t){return I0(t,e===LE||e===Zh,e===Da||e===Na)}function OS(e,t,n){return I0(t,e===Zh,n?e===Da:e===Na)||e==="Enter"||e===" "||e===""}function ive(e,t,n){return I0(t,n?e===Da:e===Na,e===Zh)}function ove(e,t,n,r){const i=n?e===Na:e===Da,s=e===LE;return t==="both"||t==="horizontal"&&r&&r>1?e===rve:I0(t,i,s)}function sve(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),s=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:u,onNavigate:d=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:x=!1,nested:y=!1,rtl:T=!1,virtual:w=!1,focusItemOnOpen:S="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:E=!0,disabledIndices:b=void 0,orientation:C="vertical",parentOrientation:_,cols:A=1,scrollItemIntoView:M=!0,itemSizes:P,dense:I=!1,id:z,resetOnPointerLeave:q=!0,externalTree:K}=t,X=Ey(i),Y=Ur(X),H=m6(),Z=D0(K);rt(()=>{l.current.orientation=C},[l,C]);const ee=hx(s),ae=k.useRef(S),re=k.useRef(p??-1),$=k.useRef(null),B=k.useRef(!0),F=nt(ze=>{d(re.current===-1?null:re.current,ze)}),D=k.useRef(F),V=k.useRef(!!i),J=k.useRef(r),ne=k.useRef(!1),oe=k.useRef(!1),he=Ur(b),Ee=Ur(r),te=Ur(M),ie=Ur(p),le=Ur(q),Se=nt(()=>{function ze(Ce){w?Z?.events.emit("virtualfocus",Ce):Bg(Ce,{sync:ne.current,preventScroll:!0})}const Ve=c.current[re.current],qe=oe.current;Ve&&ze(Ve),(ne.current?Ce=>Ce():requestAnimationFrame)(()=>{const Ce=c.current[re.current]||Ve;if(!Ce)return;Ve||ze(Ce);const pe=te.current;pe&&we&&(qe||!B.current)&&Ce.scrollIntoView?.(typeof pe=="boolean"?{block:"nearest",inline:"nearest"}:pe)})});rt(()=>{h&&(r&&i?(re.current=p??-1,ae.current&&p!=null&&(oe.current=!0,F())):V.current&&(re.current=-1,D.current()))},[h,r,i,p,F]),rt(()=>{if(h){if(!r){ne.current=!1;return}if(i)if(u==null){if(ne.current=!1,ie.current!=null)return;if(V.current&&(re.current=-1,Se()),(!J.current||!V.current)&&ae.current&&($.current!=null||ae.current===!0&&$.current==null)){let ze=0;const Ve=()=>{c.current[0]==null?(ze<2&&(ze?requestAnimationFrame:queueMicrotask)(Ve),ze+=1):(re.current=$.current==null||OS($.current,C,T)||y?qg(c):gx(c),$.current=null,F())};Ve()}}else Ru(c,u)||(re.current=u,Se(),oe.current=!1)}},[h,r,i,u,ie,y,c,C,T,F,Se,he]),rt(()=>{if(!h||i||!Z||w||!V.current)return;const ze=Z.nodesRef.current,Ve=ze.find(Ce=>Ce.id===H)?.context?.elements.floating,qe=Cs(ti(i)),dt=ze.some(Ce=>Ce.context&&Fn(Ce.context.elements.floating,qe));Ve&&!dt&&B.current&&Ve.focus({preventScroll:!0})},[h,i,Z,H,w]),rt(()=>{D.current=F,J.current=r,V.current=!!i}),rt(()=>{r||($.current=null,ae.current=S)},[r,S]);const Re=u!=null,we=k.useMemo(()=>{function ze(qe){if(!Ee.current)return;const dt=c.current.indexOf(qe.currentTarget);dt!==-1&&re.current!==dt&&(re.current=dt,F(qe))}return{onFocus(qe){ne.current=!0,ze(qe)},onClick:({currentTarget:qe})=>qe.focus({preventScroll:!0}),onMouseMove(qe){ne.current=!0,oe.current=!1,v&&ze(qe)},onPointerLeave(qe){if(!Ee.current||!B.current||qe.pointerType==="touch")return;ne.current=!0;const dt=qe.relatedTarget;!v||c.current.includes(dt)||le.current&&(re.current=-1,F(qe),w||Y.current?.focus({preventScroll:!0}))}}},[Ee,Y,v,c,F,le,w]),Ie=k.useCallback(()=>_??Z?.nodesRef.current.find(ze=>ze.id===H)?.context?.dataRef?.current.orientation,[H,Z,_]),Pe=nt(ze=>{if(B.current=!1,ne.current=!0,ze.which===229||!Ee.current&&ze.currentTarget===Y.current)return;if(y&&ove(ze.key,C,T,A)){Sg(ze.key,Ie())||Hr(ze),n.setOpen(!1,An(vS,ze.nativeEvent)),Jn(s)&&(w?Z?.events.emit("virtualfocus",s):s.focus());return}const Ve=re.current,qe=qg(c,b),dt=gx(c,b);if(ee||(ze.key==="Home"&&(Hr(ze),re.current=qe,F(ze)),ze.key==="End"&&(Hr(ze),re.current=dt,F(ze))),A>1){const Ce=P||Array.from({length:c.current.length},()=>({width:1,height:1})),pe=Y9(Ce,A,I),Ne=pe.findIndex(Et=>Et!=null&&!$a(c,Et,b)),He=pe.reduce((Et,xt,Ct)=>xt!=null&&!$a(c,xt,b)?Ct:Et,-1),at=pe[W9({current:pe.map(Et=>Et!=null?c.current[Et]:null)},{event:ze,orientation:C,loopFocus:x,rtl:T,cols:A,disabledIndices:Q9([...(typeof b!="function"?b:null)||c.current.map((Et,xt)=>$a(c,xt,b)?xt:void 0),void 0],pe),minIndex:Ne,maxIndex:He,prevIndex:X9(re.current>dt?qe:re.current,Ce,pe,A,ze.key===Zh?"bl":ze.key===(T?Da:Na)?"tr":"tl"),stopEvent:!0})];if(at!=null&&(re.current=at,F(ze)),C==="both")return}if(Sg(ze.key,C)){if(Hr(ze),r&&!w&&Cs(ze.currentTarget.ownerDocument)===ze.currentTarget){re.current=OS(ze.key,C,T)?qe:dt,F(ze);return}OS(ze.key,C,T)?x?Ve>=dt?g&&Ve!==c.current.length?re.current=-1:(ne.current=!1,re.current=qe):re.current=Fr(c,{startingIndex:Ve,disabledIndices:b}):re.current=Math.min(dt,Fr(c,{startingIndex:Ve,disabledIndices:b})):x?Ve<=qe?g&&Ve!==-1?re.current=c.current.length:(ne.current=!1,re.current=dt):re.current=Fr(c,{startingIndex:Ve,decrement:!0,disabledIndices:b}):re.current=Math.max(qe,Fr(c,{startingIndex:Ve,decrement:!0,disabledIndices:b})),Ru(c,re.current)&&(re.current=-1),F(ze)}}),ye=k.useMemo(()=>w&&r&&Re&&{"aria-activedescendant":`${z}-${u}`},[w,r,Re,z,u]),Ue=k.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...ee?{}:ye,onKeyDown(ze){if(ze.key==="Tab"&&ze.shiftKey&&r&&!w){const Ve=Wi(ze.nativeEvent);if(Ve&&!Fn(Y.current,Ve))return;Hr(ze),n.setOpen(!1,An(j0,ze.nativeEvent)),Jn(s)&&s.focus();return}Pe(ze)},onPointerMove(){B.current=!0}}),[ye,Pe,Y,C,ee,n,r,w,s]),De=k.useMemo(()=>{function ze(qe){S==="auto"&&H9(qe.nativeEvent)&&(ae.current=!w)}function Ve(qe){ae.current=S,S==="auto"&&K9(qe.nativeEvent)&&(ae.current=!0)}return{onKeyDown(qe){const dt=n.select("open");B.current=!1;const Ce=qe.key.startsWith("Arrow"),pe=ive(qe.key,Ie(),T),Ne=Sg(qe.key,C),He=(y?pe:Ne)||qe.key==="Enter"||qe.key.trim()==="";if(w&&dt)return Pe(qe);if(!(!dt&&!E&&Ce)){if(He){const at=Sg(qe.key,Ie());$.current=y&&at?null:qe.key}if(y){pe&&(Hr(qe),dt?(re.current=qg(c,he.current),F(qe)):n.setOpen(!0,An(vS,qe.nativeEvent,qe.currentTarget)));return}Ne&&(ie.current!=null&&(re.current=ie.current),Hr(qe),!dt&&E?n.setOpen(!0,An(vS,qe.nativeEvent,qe.currentTarget)):Pe(qe),dt&&F(qe))}},onFocus(qe){n.select("open")&&!w&&(re.current=-1,F(qe))},onPointerDown:Ve,onPointerEnter:Ve,onMouseDown:ze,onClick:ze}},[Pe,he,S,c,y,F,n,E,C,Ie,T,ie,w]),We=k.useMemo(()=>({...ye,...De}),[ye,De]);return k.useMemo(()=>h?{reference:We,floating:Ue,item:we,trigger:De}:{},[h,We,Ue,De,we])}function ave(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.context.dataRef,{listRef:s,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,findMatch:h=null,resetMs:p=750,ignoreKeys:g=Wu,selectedIndex:x=null}=t,y=pi(),T=k.useRef(""),w=k.useRef(x??l??-1),S=k.useRef(null);rt(()=>{r&&(y.clear(),S.current=null,T.current="")},[r,y]),rt(()=>{r&&T.current===""&&(w.current=x??l??-1)},[r,x,l]);const v=nt(_=>{_?i.current.typing||(i.current.typing=_,u?.(_)):i.current.typing&&(i.current.typing=_,u?.(_))}),E=nt(_=>{function A(q,K,X){const Y=h?h(K,X):K.find(H=>H?.toLocaleLowerCase().indexOf(X.toLocaleLowerCase())===0);return Y?q.indexOf(Y):-1}const M=s.current;if(T.current.length>0&&T.current[0]!==" "&&(A(M,M,T.current)===-1?v(!1):_.key===" "&&Hr(_)),M==null||g.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Hr(_),v(!0)),M.every(q=>q?q[0]?.toLocaleLowerCase()!==q[1]?.toLocaleLowerCase():!0)&&T.current===_.key&&(T.current="",w.current=S.current),T.current+=_.key,y.start(p,()=>{T.current="",w.current=S.current,v(!1)});const I=w.current,z=A(M,[...M.slice((I||0)+1),...M.slice(0,(I||0)+1)],T.current);z!==-1?(c?.(z),S.current=z):_.key!==" "&&(T.current="",v(!1))}),b=k.useMemo(()=>({onKeyDown:E}),[E]),C=k.useMemo(()=>({onKeyDown:E,onKeyUp(_){_.key===" "&&v(!1)}}),[E,v]);return k.useMemo(()=>d?{reference:b,floating:C}:{},[d,b,C])}const A6=k.createContext(null),O6=k.createContext(null);function rs(){const e=k.useContext(A6);if(e===null)throw new Error(Co(60));return e}function k6(){const e=k.useContext(O6);if(e===null)throw new Error(Co(61));return e}const lve=(e,t)=>Object.is(e,t);function nf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function kS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:nf(r,t,n))}function bx(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:nf(r,t,n))}function cve(e,t,n){return e.filter(r=>!nf(r,t,n))}function Sx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function uve(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function jd(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Sx(e)}function Kg(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Sx(e.value):Sx(e)}function fve(e,t,n){if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??jd(e,n);if(Array.isArray(t)){const r=uve(t)?t.flatMap(i=>i.items):t;if(e==null){const i=r.find(s=>s.value==null);return i&&i.label!=null?i.label:jd(e,n)}if(typeof e!="object"){const i=r.find(s=>s&&s.value===e);return i&&i.label!=null?i.label:jd(e,n)}if("value"in e){const i=r.find(s=>s&&s.value===e.value);if(i&&i.label!=null)return i.label}}return jd(e,n)}function dve(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>jd(n,t)).join(", ")}const vt={id:on(e=>e.id),modal:on(e=>e.modal),multiple:on(e=>e.multiple),items:on(e=>e.items),itemToStringLabel:on(e=>e.itemToStringLabel),itemToStringValue:on(e=>e.itemToStringValue),isItemEqualToValue:on(e=>e.isItemEqualToValue),value:on(e=>e.value),open:on(e=>e.open),mounted:on(e=>e.mounted),forceMount:on(e=>e.forceMount),transitionStatus:on(e=>e.transitionStatus),touchModality:on(e=>e.touchModality),activeIndex:on(e=>e.activeIndex),selectedIndex:on(e=>e.selectedIndex),isActive:on((e,t)=>e.activeIndex===t),isSelected:on((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(s=>nf(s,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:nf(i,n,r)}),isSelectedByFocus:on((e,t)=>e.selectedIndex===t),popupProps:on(e=>e.popupProps),triggerProps:on(e=>e.triggerProps),triggerElement:on(e=>e.triggerElement),positionerElement:on(e=>e.positionerElement),listElement:on(e=>e.listElement),scrollUpArrowVisible:on(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:on(e=>e.scrollDownArrowVisible),hasScrollArrows:on(e=>e.hasScrollArrows),serializedValue:on(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":Kg(n,r)})};function hve(e,t){const n=k.useRef(e),r=nt(t);rt(()=>{n.current!==e&&r(n.current)},[e,r]),rt(()=>{n.current=e},[e])}function pve(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:s,defaultOpen:l=!1,onOpenChange:c,name:u,disabled:d=!1,readOnly:h=!1,required:p=!1,modal:g=!0,actionsRef:x,inputRef:y,onOpenChangeComplete:T,items:w,multiple:S=!1,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:b=lve,highlightItemOnHover:C=!0,children:_}=e,{clearErrors:A}=T0(),{setDirty:M,shouldValidateOnChange:P,validityData:I,setFilled:z,name:q,disabled:K,validation:X}=Yu(),{controlId:Y}=hc(),H=c6({id:t}),Z=K||d,ee=q??u,[ae,re]=My({controlled:n,default:S?r??Wu:r,name:"Select",state:"value"}),[$,B]=My({controlled:s,default:l,name:"Select",state:"open"}),F=k.useRef([]),D=k.useRef([]),V=k.useRef(null),J=k.useRef(null),ne=k.useRef(0),oe=k.useRef(null),he=k.useRef([]),Ee=k.useRef(!1),te=k.useRef(!1),ie=k.useRef(null),le=k.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Se=k.useRef(!1),{mounted:Re,setMounted:we,transitionStatus:Ie}=GE($),Pe=Yo(()=>new Au({id:H,modal:g,multiple:S,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:b,value:ae,open:$,mounted:Re,transitionStatus:Ie,items:w,forceMount:!1,touchModality:!1,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ye=wt(Pe,vt.activeIndex),Ue=wt(Pe,vt.selectedIndex),De=wt(Pe,vt.triggerElement),We=wt(Pe,vt.positionerElement),ze=k.useMemo(()=>S&&Array.isArray(ae)&&ae.length===0?"":Kg(ae,E),[S,ae,E]),Ve=Ur(Pe.state.triggerElement);u6({id:H,commit:X.commit,value:ae,controlRef:Ve,name:ee,getValue:()=>ae});const qe=k.useRef(ae);rt(()=>{ae!==qe.current&&Pe.set("forceMount",!0)},[Pe,ae]),rt(()=>{z(ae!==null)},[ae,z]),rt(function(){if($)return;const mt=he.current;if(S){const bt=Array.isArray(ae)?ae:[];if(bt.length===0){Pe.set("selectedIndex",null);return}const Qt=bt[bt.length-1],kn=bx(mt,Qt,b);Pe.set("selectedIndex",kn===-1?null:kn);return}const ft=bx(mt,ae,b);Pe.set("selectedIndex",ft===-1?null:ft)},[S,$,ae,he,b,Pe]),hve(ae,()=>{A(ee),M(ae!==I.initialValue),P()?X.commit(ae):X.commit(ae,!0)});const dt=nt((ut,mt)=>{if(c?.(ut,mt),!mt.isCanceled&&(B(ut),!ut&&Pe.state.activeIndex!==null)){const ft=F.current[Pe.state.activeIndex];queueMicrotask(()=>{ft?.setAttribute("tabindex","-1")})}}),Ce=nt(()=>{we(!1),Pe.set("activeIndex",null),T?.(!1)});$0({enabled:!x,open:$,ref:V,onComplete(){$||Ce()}}),k.useImperativeHandle(x,()=>({unmount:Ce}),[Ce]);const pe=nt((ut,mt)=>{i?.(ut,mt),!mt.isCanceled&&re(ut)}),Ne=nt(()=>{const ut=Pe.state.listElement||V.current;if(!ut)return;const mt=ut.scrollTop,ft=ut.scrollTop+ut.clientHeight,bt=mt>1,Qt=ft<ut.scrollHeight-1;Pe.state.scrollUpArrowVisible!==bt&&Pe.set("scrollUpArrowVisible",bt),Pe.state.scrollDownArrowVisible!==Qt&&Pe.set("scrollDownArrowVisible",Qt)}),He=R6({open:$,onOpenChange:dt,elements:{reference:De,floating:We}}),at=a0e(He,{enabled:!h&&!Z,event:"mousedown"}),Et=Y0e(He,{bubbles:!1}),xt=sve(He,{enabled:!h&&!Z,listRef:F,activeIndex:ye,selectedIndex:Ue,disabledIndices:Wu,onNavigate(ut){ut===null&&!$||Pe.set("activeIndex",ut)},focusItemOnHover:!1}),Ct=ave(He,{enabled:!h&&!Z&&($||!S),listRef:D,activeIndex:ye,selectedIndex:Ue,onMatch(ut){$?Pe.set("activeIndex",ut):pe(he.current[ut],An("none"))},onTypingChange(ut){Ee.current=ut}}),{getReferenceProps:Wt,getFloatingProps:zt,getItemProps:Tt}=nve([at,Et,xt,Ct]);vye(()=>{Pe.update({popupProps:zt(),triggerProps:Wt()})}),rt(()=>{Pe.update({id:H,modal:g,multiple:S,value:ae,open:$,mounted:Re,transitionStatus:Ie,popupProps:zt(),triggerProps:Wt(),items:w,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:b})},[Pe,H,g,S,ae,$,Re,Ie,zt,Wt,w,v,E,b]);const Yt=k.useMemo(()=>({store:Pe,name:ee,required:p,disabled:Z,readOnly:h,multiple:S,itemToStringLabel:v,itemToStringValue:E,highlightItemOnHover:C,setValue:pe,setOpen:dt,listRef:F,popupRef:V,scrollHandlerRef:J,handleScrollArrowVisibility:Ne,scrollArrowsMountedCountRef:ne,getItemProps:Tt,events:He.context.events,valueRef:oe,valuesRef:he,labelsRef:D,typingRef:Ee,selectionRef:le,selectedItemTextRef:ie,validation:X,onOpenChangeComplete:T,keyboardActiveRef:te,alignItemWithTriggerActiveRef:Se,initialValueRef:qe}),[Pe,ee,p,Z,h,S,v,E,C,pe,dt,Tt,He.context.events,X,T,Ne]),Ft=Ga(y,X.inputRef),Xt=S&&Array.isArray(ae)&&ae.length>0,dn=k.useMemo(()=>!S||!Array.isArray(ae)||!ee?null:ae.map(ut=>{const mt=Kg(ut,E);return j.jsx("input",{type:"hidden",name:ee,value:mt},mt)}),[S,ae,ee,E]);return j.jsx(A6.Provider,{value:Yt,children:j.jsxs(O6.Provider,{value:He,children:[_,j.jsx("input",{...X.getInputValidationProps({onFocus(){Pe.state.triggerElement?.focus()},onChange(ut){if(ut.nativeEvent.defaultPrevented)return;const mt=ut.target.value,ft=An(tf,ut.nativeEvent);function bt(){if(S)return;const Qt=he.current.find(kn=>Kg(kn,E).toLowerCase()===mt.toLowerCase());Qt!=null&&(M(Qt!==I.initialValue),pe(Qt,ft),P()&&X.commit(Qt))}Pe.set("forceMount",!0),queueMicrotask(bt)}}),id:t||Y||void 0,name:S?void 0:ee,value:ze,disabled:Z,required:p&&!Xt,readOnly:h,ref:Ft,style:BE,tabIndex:-1,"aria-hidden":!0}),dn]})})}let $y=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const mve={[$y.startingStyle]:""},gve={[$y.endingStyle]:""},M6={transitionStatus(e){return e==="starting"?mve:e==="ending"?gve:null}};let ZE=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=$y.startingStyle]="startingStyle",e[e.endingStyle=$y.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),wx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const yve={[wx.popupOpen]:""},vve={[wx.popupOpen]:"",[wx.pressed]:""},bve={[ZE.open]:""},Sve={[ZE.closed]:""},wve={[ZE.anchorHidden]:""},xve={open(e){return e?yve:null}},_ve={open(e){return e?vve:null}},j6={open(e){return e?bve:Sve},anchorHidden(e){return e?wve:null}};function Eve(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const s=parseFloat(n.width)||0,l=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,d=Math.max(t.width,s,c),h=Math.max(t.height,l,u),p=d-t.width,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const P6=k.createContext(void 0);function D6(e=!1){const t=k.useContext(P6);if(t===void 0&&!e)throw new Error(Co(16));return t}function Cve(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:s}=e,l=r&&t!==!1,c=r&&t===!1;return{props:k.useMemo(()=>{const d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=i,!s&&n&&(d.tabIndex=t?i:-1)),(s&&(t||l)||!s&&n)&&(d["aria-disabled"]=n),s&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,s,i])}}function WE(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,s=k.useRef(null),l=D6(!0)!==void 0,c=nt(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=Cve({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=k.useCallback(()=>{const g=s.current;Tve(g)&&l&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,l]);rt(d,[d]);const h=k.useCallback((g={})=>{const{onClick:x,onMouseDown:y,onKeyUp:T,onKeyDown:w,onPointerDown:S,...v}=g;return Xu({type:i?"button":void 0,onClick(b){if(t){b.preventDefault();return}x?.(b)},onMouseDown(b){t||y?.(b)},onKeyDown(b){if(t||(ax(b),w?.(b)),b.baseUIHandlerPrevented)return;const C=b.target===b.currentTarget&&!i&&!c()&&!t,_=b.key==="Enter",A=b.key===" ";C&&((A||_)&&b.preventDefault(),_&&x?.(b))},onKeyUp(b){t||(ax(b),T?.(b)),!b.baseUIHandlerPrevented&&b.target===b.currentTarget&&!i&&!t&&b.key===" "&&x?.(b)},onPointerDown(b){if(t){b.preventDefault();return}S?.(b)}},i?void 0:{role:"button"},u,v)},[t,u,i,c]),p=nt(g=>{s.current=g,d()});return{getButtonProps:h,buttonRef:p}}function Tve(e){return Jn(e)&&e.tagName==="BUTTON"}const wg=2,Rve={..._ve,...C0,value:()=>null},Ave=k.forwardRef(function(t,n){const{render:r,className:i,disabled:s=!1,nativeButton:l=!0,...c}=t,{setTouched:u,setFocused:d,validationMode:h,state:p,disabled:g}=Yu(),{labelId:x}=hc(),{store:y,setOpen:T,selectionRef:w,validation:S,readOnly:v,alignItemWithTriggerActiveRef:E,disabled:b,keyboardActiveRef:C}=rs(),_=g||b||s,A=wt(y,vt.open),M=wt(y,vt.value),P=wt(y,vt.triggerProps),I=wt(y,vt.positionerElement),z=wt(y,vt.listElement),q=wt(y,vt.serializedValue),K=Ur(I),X=k.useRef(null),Y=pi(),H=pi(),{getButtonProps:Z,buttonRef:ee}=WE({disabled:_,native:l}),ae=nt(J=>{y.set("triggerElement",J)}),re=Ga(n,X,ee,ae),$=pi(),B=pi();k.useEffect(()=>{if(A)return B.start(200,()=>{w.current.allowUnselectedMouseUp=!0,$.start(200,()=>{w.current.allowSelectedMouseUp=!0})}),()=>{$.clear(),B.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[A,w,H,$,B]);const F=k.useMemo(()=>z?.id??Ey(I)?.id,[z,I]),D=Xu(P,{role:"combobox","aria-expanded":A?"true":"false","aria-haspopup":"listbox","aria-controls":A?F:void 0,"aria-labelledby":x,"aria-readonly":v||void 0,tabIndex:_?-1:0,ref:re,onFocus(J){d(!0),A&&E.current&&T(!1,An(j0,J.nativeEvent)),Y.start(0,()=>{y.set("forceMount",!0)})},onBlur(){u(!0),d(!1),h==="onBlur"&&S.commit(M)},onPointerMove({pointerType:J}){C.current=!1,y.set("touchModality",J==="touch")},onPointerDown({pointerType:J}){y.set("touchModality",J==="touch")},onKeyDown(){C.current=!0},onMouseDown(J){if(A)return;const ne=Xo(J.currentTarget);function oe(he){if(!X.current)return;const Ee=he.target;if(Fn(X.current,Ee)||Fn(K.current,Ee)||Ee===X.current)return;const te=Eve(X.current);he.clientX>=te.left-wg&&he.clientX<=te.right+wg&&he.clientY>=te.top-wg&&he.clientY<=te.bottom+wg||T(!1,An(fye,he))}H.start(0,()=>{ne.addEventListener("mouseup",oe,{once:!0})})}},S.getValidationProps,c,Z);D.role="combobox";const V=k.useMemo(()=>({...p,open:A,disabled:_,value:M,readOnly:v,placeholder:!q}),[p,A,_,M,v,q]);return hr("button",t,{ref:[n,X],state:V,stateAttributesMapping:Rve,props:D})}),Ove={value:()=>null},kve=k.forwardRef(function(t,n){const{className:r,render:i,children:s,...l}=t,{store:c,valueRef:u}=rs(),d=wt(c,vt.value),h=wt(c,vt.items),p=wt(c,vt.itemToStringLabel),g=wt(c,vt.serializedValue),x=k.useMemo(()=>({value:d,placeholder:!g}),[d,g]),y=typeof s=="function"?s(d):s??(Array.isArray(d)?dve(d,p):fve(d,h,p));return hr("span",t,{state:x,ref:[n,u],props:[{children:y},l],stateAttributesMapping:Ove})}),Mve=k.forwardRef(function(t,n){const{className:r,render:i,...s}=t,{store:l}=rs(),c=wt(l,vt.open),u=k.useMemo(()=>({open:c}),[c]);return hr("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:xve})}),jve=k.createContext(void 0),Pve=k.forwardRef(function(t,n){const{store:r}=rs(),i=wt(r,vt.mounted),s=wt(r,vt.forceMount);return i||s?j.jsx(jve.Provider,{value:!0,children:j.jsx(t0e,{ref:n,...t})}):null});function Dve(e){return $E(19)?e:e?"true":void 0}let F3={},L3={},V3="";function Nve(e){if(typeof document>"u")return!1;const t=Xo(e);return Cr(t).innerWidth-t.documentElement.clientWidth>0}function $ve(e){const t=Xo(e),n=t.documentElement,r=t.body,i=pc(n)?n:r,s=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=s}}function Ive(e){const t=Xo(e),n=t.documentElement,r=t.body,i=Cr(n);let s=0,l=0;const c=$o.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(V9&&(i.visualViewport?.scale??1)!==1)return()=>{};function d(){const g=i.getComputedStyle(n),x=i.getComputedStyle(r),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,l=n.scrollLeft,F3={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},V3=n.style.scrollBehavior,L3={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const S=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,E=g.overflowY==="scroll"||x.overflowY==="scroll",b=g.overflowX==="scroll"||x.overflowX==="scroll",C=Math.max(0,i.innerWidth-n.clientWidth),_=Math.max(0,i.innerHeight-n.clientHeight),A=parseFloat(x.marginTop)+parseFloat(x.marginBottom),M=parseFloat(x.marginLeft)+parseFloat(x.marginRight),P=pc(n)?n:r;if(u){n.style.scrollbarGutter=w,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(S||E)&&(n.style.overflowY="scroll"),(v||b)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||_?`calc(100dvh - ${A+_}px)`:"100dvh",width:M||C?`calc(100vw - ${M+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,F3),Object.assign(r.style,L3),u||(n.scrollTop=s,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=V3)}function p(){h(),c.request(d)}return d(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class zve{lockCount=0;restore=null;timeoutLock=Qu.create();timeoutUnlock=Qu.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Xo(t).documentElement,i=Cr(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=ji;return}const s=Tge||!Nve(t);this.restore=s?$ve(t):Ive(t)}}const Fve=new zve;function Lve(e=!0,t=null){rt(()=>{if(e)return Fve.acquire(t)},[e,t])}const N6=k.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Vve(){return k.useContext(N6)}function YE(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,s=nt(i),l=k.useRef(0),c=Yo(qve).current,u=Yo(Uve).current,[d,h]=k.useState(0),p=k.useRef(d),g=nt((S,v)=>{u.set(S,v??null),p.current+=1,h(p.current)}),x=nt(S=>{u.delete(S),p.current+=1,h(p.current)}),y=k.useMemo(()=>{const S=new Map;return Array.from(u.keys()).filter(E=>E.isConnected).sort(Bve).forEach((E,b)=>{const C=u.get(E)??{};S.set(E,{...C,index:b})}),S},[u,d]);rt(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const S=new MutationObserver(v=>{const E=new Set,b=C=>E.has(C)?E.delete(C):E.add(C);v.forEach(C=>{C.removedNodes.forEach(b),C.addedNodes.forEach(b)}),E.size===0&&(p.current+=1,h(p.current))});return y.forEach((v,E)=>{E.parentElement&&S.observe(E.parentElement,{childList:!0})}),()=>{S.disconnect()}},[y]),rt(()=>{p.current===d&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),l.current=y.size),s(y)},[s,y,n,r,d]),rt(()=>()=>{n.current=[]},[n]),rt(()=>()=>{r&&(r.current=[])},[r]);const T=nt(S=>(c.add(S),()=>{c.delete(S)}));rt(()=>{c.forEach(S=>S(y))},[c,y]);const w=k.useMemo(()=>({register:g,unregister:x,subscribeMapChange:T,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,x,T,n,r,l]);return j.jsx(N6.Provider,{value:w,children:t})}function Uve(){return new Map}function qve(){return new Set}function Bve(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Hve=k.createContext(void 0);function z0(){return k.useContext(Hve)?.direction??"ltr"}const Kve=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:l,elements:c,middlewareData:u}=t,{element:d,padding:h=0,offsetParent:p="real"}=Ps(e,t)||{};if(d==null)return{};const g=Z9(h),x={x:n,y:r},y=qE(i),T=UE(y),w=await l.getDimensions(d),S=y==="y",v=S?"top":"left",E=S?"bottom":"right",b=S?"clientHeight":"clientWidth",C=s.reference[T]+s.reference[y]-x[y]-s.floating[T],_=x[y]-s.reference[y],A=p==="real"?await l.getOffsetParent?.(d):c.floating;let M=c.floating[b]||s.floating[T];(!M||!await l.isElement?.(A))&&(M=c.floating[b]||s.floating[T]);const P=C/2-_/2,I=M/2-w[T]/2-1,z=Math.min(g[v],I),q=Math.min(g[E],I),K=z,X=M-w[T]-q,Y=M/2-w[T]/2+P,H=px(K,Y,X),Z=!u.arrow&&Ja(i)!=null&&Y!==H&&s.reference[T]/2-(Y<K?z:q)-w[T]/2<0,ee=Z?Y<K?Y-K:Y-X:0;return{[y]:x[y]+ee,data:{[y]:H,centerOffset:Y-H-ee,...Z&&{alignmentOffset:ee}},reset:Z}}}),Gve=(e,t)=>({...Kve(e),options:[e,t]}),Zve={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,s=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await G0e().fn(e)).data?.referenceHidden||s}}}},Wve={sideX:"left",sideY:"top"};function $6(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function U3(e,t,n){const{rects:r,placement:i}=e;return{side:$6(t,Ni(i),n),align:Ja(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Yve(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:u=5,sticky:d=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:x,mounted:y,collisionAvoidance:T,shiftCrossAxis:w=!1,nodeId:S,adaptiveOrigin:v,lazyFlip:E=!1,externalTree:b}=e,[C,_]=k.useState(null);!y&&C!==null&&_(null);const A=T.side||"flip",M=T.align||"flip",P=T.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,z=nt(I),q=I?z:t,K=Ur(t),Y=z0()==="rtl",H=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Y?"left":"right","inline-start":Y?"right":"left"}[r],Z=s==="center"?H:`${H}-${s}`;let ee=u;const ae=1,re=r==="bottom"?ae:0,$=r==="top"?ae:0,B=r==="right"?ae:0,F=r==="left"?ae:0;typeof ee=="number"?ee={top:ee+re,right:ee+F,bottom:ee+$,left:ee+B}:ee&&(ee={top:(ee.top||0)+re,right:(ee.right||0)+F,bottom:(ee.bottom||0)+$,left:(ee.left||0)+B});const D={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:ee},V=k.useRef(null),J=Ur(i),ne=Ur(l),Ee=[U0e(Tt=>{const Yt=U3(Tt,r,Y),Ft=typeof J.current=="function"?J.current(Yt):J.current,Xt=typeof ne.current=="function"?ne.current(Yt):ne.current;return{mainAxis:Ft,crossAxis:Xt,alignmentAxis:Xt}},[typeof i!="function"?i:0,typeof l!="function"?l:0,Y,r])],te=M==="none"&&A!=="shift",ie=!te&&(d||w||A==="shift"),le=A==="none"?null:H0e({...D,padding:{top:ee.top+ae,right:ee.right+ae,bottom:ee.bottom+ae,left:ee.left+ae},mainAxis:!w&&A==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),Se=te?null:q0e(Tt=>{const Yt=Xo(Tt.elements.floating).documentElement;return{...D,rootBoundary:w?{x:0,y:0,width:Yt.clientWidth,height:Yt.clientHeight}:void 0,mainAxis:M!=="none",crossAxis:ie,limiter:d||w?void 0:B0e(Ft=>{if(!V.current)return{};const{width:Xt,height:dn}=V.current.getBoundingClientRect(),ut=Qi(Ni(Ft.placement)),mt=ut==="y"?Xt:dn,ft=ut==="y"?ee.left+ee.right:ee.top+ee.bottom;return{offset:mt/2+ft/2}})}},[D,d,w,ee,M]);A==="shift"||M==="shift"||s==="center"?Ee.push(Se,le):Ee.push(le,Se),Ee.push(K0e({...D,apply({elements:{floating:Tt},rects:{reference:Yt},availableWidth:Ft,availableHeight:Xt}){Object.entries({"--available-width":`${Ft}px`,"--available-height":`${Xt}px`,"--anchor-width":`${Yt.width}px`,"--anchor-height":`${Yt.height}px`}).forEach(([dn,ut])=>{Tt.style.setProperty(dn,ut)})}}),Gve(()=>({element:V.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Tt){const{elements:Yt,middlewareData:Ft,placement:Xt,rects:dn,y:ut}=Tt,mt=Ni(Xt),ft=Qi(mt),bt=V.current,Qt=Ft.arrow?.x||0,kn=Ft.arrow?.y||0,Rr=bt?.clientWidth||0,Ar=bt?.clientHeight||0,ir=Qt+Rr/2,ri=kn+Ar/2,Cn=Math.abs(Ft.shift?.y||0),pr=dn.reference.height/2,In=typeof i=="function"?i(U3(Tt,r,Y)):i,Jt=Cn>In,er={top:`${ir}px calc(100% + ${In}px)`,bottom:`${ir}px ${-In}px`,left:`calc(100% + ${In}px) ${ri}px`,right:`${-In}px ${ri}px`}[mt],Yr=`${ir}px ${dn.reference.y+pr-ut}px`;return Yt.floating.style.setProperty("--transform-origin",ie&&ft==="y"&&Jt?Yr:er),{}}},Zve,v),rt(()=>{!y&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,x]);const Re=k.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:we,elements:Ie,x:Pe,y:ye,middlewareData:Ue,update:De,placement:We,context:ze,isPositioned:Ve,floatingStyles:qe}=tve({rootContext:x,placement:Z,middleware:Ee,strategy:n,whileElementsMounted:g?void 0:(...Tt)=>$3(...Tt,Re),nodeId:S,externalTree:b}),{sideX:dt,sideY:Ce}=Ue.adaptiveOrigin||Wve,pe=Ve?n:"fixed",Ne=k.useMemo(()=>v?{position:pe,[dt]:Pe,[Ce]:ye}:{position:pe,...qe},[v,pe,dt,Pe,Ce,ye,qe]),He=k.useRef(null);rt(()=>{if(!y)return;const Tt=K.current,Yt=typeof Tt=="function"?Tt():Tt,Xt=(q3(Yt)?Yt.current:Yt)||null||null;Xt!==He.current&&(we.setPositionReference(Xt),He.current=Xt)},[y,we,q,K]),k.useEffect(()=>{if(!y)return;const Tt=K.current;typeof Tt!="function"&&q3(Tt)&&Tt.current!==He.current&&(we.setPositionReference(Tt.current),He.current=Tt.current)},[y,we,q,K]),k.useEffect(()=>{if(g&&y&&Ie.domReference&&Ie.floating)return $3(Ie.domReference,Ie.floating,De,Re)},[g,y,Ie,De,Re]);const at=Ni(We),Et=$6(r,at,Y),xt=Ja(We)||"center",Ct=!!Ue.hide?.referenceHidden;rt(()=>{E&&y&&Ve&&_(at)},[E,y,Ve,at]);const Wt=k.useMemo(()=>({position:"absolute",top:Ue.arrow?.y,left:Ue.arrow?.x}),[Ue.arrow]),zt=Ue.arrow?.centerOffset!==0;return k.useMemo(()=>({positionerStyles:Ne,arrowStyles:Wt,arrowRef:V,arrowUncentered:zt,side:Et,align:xt,physicalSide:at,anchorHidden:Ct,refs:we,context:ze,isPositioned:Ve,update:De}),[Ne,Wt,V,zt,Et,xt,at,Ct,we,ze,Ve,De])}function q3(e){return e!=null&&"current"in e}const I6=k.createContext(void 0);function XE(){const e=k.useContext(I6);if(!e)throw new Error(Co(59));return e}const Xve=k.forwardRef(function(t,n){const{cutout:r,...i}=t;let s;if(r){const l=r?.getBoundingClientRect();s=`polygon(
123
+ 0% 0%,
124
+ 100% 0%,
125
+ 100% 100%,
126
+ 0% 100%,
127
+ 0% 0%,
128
+ ${l.left}px ${l.top}px,
129
+ ${l.left}px ${l.bottom}px,
130
+ ${l.right}px ${l.bottom}px,
131
+ ${l.right}px ${l.top}px,
132
+ ${l.left}px ${l.top}px
133
+ )`}return j.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});function Iy(e,t){e&&Object.assign(e.style,t)}const z6={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Qve={position:"fixed"},Jve=k.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:s,render:l,side:c="bottom",align:u="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g,arrowPadding:x=5,sticky:y=!1,disableAnchorTracking:T,alignItemWithTrigger:w=!0,collisionAvoidance:S=qme,...v}=t,{store:E,listRef:b,labelsRef:C,alignItemWithTriggerActiveRef:_,selectedItemTextRef:A,valuesRef:M,initialValueRef:P,popupRef:I,setValue:z}=rs(),q=k6(),K=wt(E,vt.open),X=wt(E,vt.mounted),Y=wt(E,vt.modal),H=wt(E,vt.value),Z=wt(E,vt.touchModality),ee=wt(E,vt.positionerElement),ae=wt(E,vt.triggerElement),re=wt(E,vt.isItemEqualToValue),$=k.useRef(null),B=k.useRef(null),[F,D]=k.useState(w),V=X&&F&&!Z;!X&&F!==w&&D(w),rt(()=>{X||(vt.scrollUpArrowVisible(E.state)&&E.set("scrollUpArrowVisible",!1),vt.scrollDownArrowVisible(E.state)&&E.set("scrollDownArrowVisible",!1))},[E,X]),k.useImperativeHandle(_,()=>V),Lve((V||Y)&&K&&!Z,ae);const J=Yve({anchor:r,floatingRootContext:q,positionMethod:i,mounted:X,side:c,sideOffset:d,align:u,alignOffset:h,arrowPadding:x,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:T??V,collisionAvoidance:S,keepMounted:!0}),ne=V?"none":J.side,oe=V?Qve:J.positionerStyles,he=k.useMemo(()=>{const we={};return K||(we.pointerEvents="none"),{role:"presentation",hidden:!X,style:{...oe,...we}}},[K,X,oe]),Ee=k.useMemo(()=>({open:K,side:ne,align:J.align,anchorHidden:J.anchorHidden}),[K,ne,J.align,J.anchorHidden]),te=nt(we=>{E.set("positionerElement",we)}),ie=hr("div",t,{ref:[n,te],state:Ee,stateAttributesMapping:j6,props:[he,v]}),le=k.useRef(0),Se=nt(we=>{if(we.size===0&&le.current===0||M.current.length===0)return;const Ie=le.current;if(le.current=we.size,we.size===Ie)return;const Pe=An(tf);if(Ie!==0&&!E.state.multiple&&H!==null&&bx(M.current,H,re)===-1){const Ue=P.current,We=Ue!=null&&kS(M.current,Ue,re)?Ue:null;z(We,Pe),We===null&&(E.set("selectedIndex",null),A.current=null)}if(Ie!==0&&E.state.multiple&&Array.isArray(H)){const ye=H.filter(Ue=>kS(M.current,Ue,re));(ye.length!==H.length||ye.some(Ue=>!kS(H,Ue,re)))&&(z(ye,Pe),ye.length===0&&(E.set("selectedIndex",null),A.current=null))}if(K&&V){E.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};Iy(ee,ye),Iy(I.current,ye)}}),Re=k.useMemo(()=>({...J,side:ne,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:D,scrollUpArrowRef:$,scrollDownArrowRef:B}),[J,ne,V,D]);return j.jsx(YE,{elementsRef:b,labelsRef:C,onMapChange:Se,children:j.jsxs(I6.Provider,{value:Re,children:[X&&Y&&j.jsx(Xve,{inert:Dve(!K),cutout:ae}),ie]})})});function F6(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const xg="base-ui-disable-scrollbar",xx={className:xg,element:j.jsx("style",{href:xg,precedence:"base-ui:low",children:`.${xg}{scrollbar-width:none}.${xg}::-webkit-scrollbar{display:none}`})},ebe=k.createContext(void 0);function tbe(e){return k.useContext(ebe)}const Mu="ArrowUp",Ll="ArrowDown",bh="ArrowLeft",ju="ArrowRight",Yh="Home",Xh="End",L6=new Set([bh,ju]),nbe=new Set([bh,ju,Yh,Xh]),V6=new Set([Mu,Ll]),rbe=new Set([Mu,Ll,Yh,Xh]),U6=new Set([...L6,...V6]),ibe=new Set([...U6,Yh,Xh]),obe=new Set([Mu,Ll,bh,ju,Yh,Xh]),sbe="Shift",abe="Control",lbe="Alt",cbe="Meta",ube=new Set([sbe,abe,lbe,cbe]);function fbe(e){return Jn(e)&&e.tagName==="INPUT"}function B3(e){return!!(fbe(e)&&e.selectionStart!=null||Jn(e)&&e.tagName==="TEXTAREA")}function H3(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,s=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const u=K3(e,t,"left"),d=_g(e),h=_g(t);n==="ltr"&&(u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?i=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:u-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(i=u-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(u-h.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?i=u-h.scrollMarginLeft-d.scrollPaddingLeft:u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(i=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const u=K3(e,t,"top"),d=_g(e),h=_g(t);u-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?s=u-h.scrollMarginTop-d.scrollPaddingTop:u+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(s=u+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:i,top:s,behavior:"auto"})}function K3(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function _g(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function dbe(e){return e==="starting"?Vme:di}const hbe={...j6,...M6},pbe=k.forwardRef(function(t,n){const{render:r,className:i,...s}=t,{store:l,popupRef:c,onOpenChangeComplete:u,setOpen:d,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:x,handleScrollArrowVisibility:y,scrollHandlerRef:T}=rs(),{side:w,align:S,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:E,scrollDownArrowRef:b,scrollUpArrowRef:C}=XE(),_=tbe()!=null,A=k6(),M=pi(),P=wt(l,vt.id),I=wt(l,vt.open),z=wt(l,vt.mounted),q=wt(l,vt.popupProps),K=wt(l,vt.transitionStatus),X=wt(l,vt.triggerElement),Y=wt(l,vt.positionerElement),H=wt(l,vt.listElement),Z=k.useRef(0),ee=k.useRef(!1),ae=k.useRef(0),re=k.useRef(!1),$=k.useRef({}),B=P0(),F=nt(ne=>{if(!Y||!c.current||!re.current)return;if(ee.current||!v){y();return}const oe=Y.style.top==="0px",he=Y.style.bottom==="0px",Ee=Y.getBoundingClientRect().height,te=Xo(Y),ie=getComputedStyle(Y),le=parseFloat(ie.marginTop),Se=parseFloat(ie.marginBottom),Re=te.documentElement.clientHeight-le-Se,we=ne.scrollTop,Ie=ne.scrollHeight,Pe=ne.clientHeight,ye=Ie-Pe;let Ue=null,De=null,We=!1;if(oe){const ze=ye-we,Ve=Ee+ze,qe=Math.min(Ve,Re);Ue=qe,qe!==Re?De=ye:We=!0}else if(he){const ze=we-0,Ve=Ee+ze,qe=Math.min(Ve,Re),dt=Ve-Re;Ue=qe,qe!==Re?De=0:(We=!0,we<ye&&(De=we-(ze-dt)))}Ue!=null&&(Y.style.height=`${Ue}px`),De!=null&&(ne.scrollTop=De),We&&(ee.current=!0),y()});k.useImperativeHandle(T,()=>F,[F]),$0({open:I,ref:c,onComplete(){I&&u?.(!0)}});const D=k.useMemo(()=>({open:I,transitionStatus:K,side:w,align:S}),[I,K,w,S]);rt(()=>{!Y||!c.current||Object.keys($.current).length||($.current={top:Y.style.top||"0",left:Y.style.left||"0",right:Y.style.right,height:Y.style.height,bottom:Y.style.bottom,minHeight:Y.style.minHeight,maxHeight:Y.style.maxHeight,marginTop:Y.style.marginTop,marginBottom:Y.style.marginBottom})},[c,Y]),rt(()=>{z||v||(re.current=!1,ee.current=!1,Z.current=0,ae.current=0,Iy(Y,$.current))},[z,v,Y,c]),rt(()=>{const ne=c.current;if(!(!z||!X||!Y||!ne)){if(!v){re.current=!0,B.request(y);return}queueMicrotask(()=>{const oe=getComputedStyle(Y),he=getComputedStyle(ne),Ee=Xo(X),te=Cr(Y),ie=X.getBoundingClientRect(),le=Y.getBoundingClientRect(),Se=ie.left,Re=ie.height,we=H||ne,Ie=we.scrollHeight,Pe=parseFloat(he.borderBottomWidth),ye=parseFloat(oe.marginTop)||10,Ue=parseFloat(oe.marginBottom)||10,De=parseFloat(oe.minHeight)||100,We=5,ze=5,Ve=20,qe=Ee.documentElement.clientHeight-ye-Ue,dt=Ee.documentElement.clientWidth,Ce=qe-ie.bottom+Re,pe=p.current,Ne=h.current;let He=0,at=0;if(pe&&Ne){const mt=Ne.getBoundingClientRect(),ft=pe.getBoundingClientRect(),bt=mt.left-Se,Qt=ft.left-le.left,kn=mt.top-ie.top+mt.height/2,Rr=ft.top-le.top+ft.height/2;He=bt-Qt,at=Rr-kn}const Et=Ce+at+Ue+Pe;let xt=Math.min(qe,Et);const Ct=qe-ye-Ue,Wt=Et-xt,zt=Math.max(We,Se+He),Tt=dt-ze,Yt=Math.max(0,zt+le.width-Tt);Y.style.left=`${zt-Yt}px`,Y.style.height=`${xt}px`,Y.style.maxHeight="auto",Y.style.marginTop=`${ye}px`,Y.style.marginBottom=`${Ue}px`,ne.style.height="100%";const Ft=we.scrollHeight-we.clientHeight,Xt=Wt>=Ft;Xt&&(xt=Math.min(qe,le.height)-(Wt-Ft));const dn=ie.top<Ve||ie.bottom>qe-Ve||xt<Math.min(Ie,De),ut=(te.visualViewport?.scale??1)!==1&&V9;if(dn||ut){re.current=!0,Iy(Y,$.current),Wo.flushSync(()=>E(!1));return}if(Xt){const mt=Math.max(0,qe-Et);Y.style.top=le.height>=Ct?"0":`${mt}px`,Y.style.height=`${xt}px`,we.scrollTop=we.scrollHeight-we.clientHeight,Z.current=Math.max(De,xt)}else Y.style.bottom="0",Z.current=Math.max(De,xt),we.scrollTop=Wt;Z.current===qe&&(ee.current=!0),y(),setTimeout(()=>{re.current=!0})})}},[l,z,Y,X,h,p,c,y,v,E,B,b,C,H]),k.useEffect(()=>{if(!v||!Y||!z)return;const ne=Cr(Y);function oe(he){d(!1,An(dye,he))}return ne.addEventListener("resize",oe),()=>{ne.removeEventListener("resize",oe)}},[d,v,Y,z]);const V={...H?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":x||void 0,id:`${P}-list`},onKeyDown(ne){g.current=!0,_&&obe.has(ne.key)&&ne.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(ne){if(F6(ne)||ne.pointerType==="touch")return;const oe=ne.currentTarget;M.start(0,()=>{l.set("activeIndex",null),oe.focus({preventScroll:!0})})},onScroll(ne){H||T.current?.(ne.currentTarget)},...v&&{style:H?{height:"100%"}:z6}},J=hr("div",t,{ref:[n,c],state:D,stateAttributesMapping:hbe,props:[q,V,dbe(K),{className:!H&&v?xx.className:void 0},s]});return j.jsxs(k.Fragment,{children:[xx.element,j.jsx(s0e,{context:A,modal:!1,disabled:!z,restoreFocus:!0,children:J})]})}),mbe=k.forwardRef(function(t,n){const{className:r,render:i,...s}=t,{store:l,scrollHandlerRef:c}=rs(),{alignItemWithTriggerActive:u}=XE(),d=wt(l,vt.hasScrollArrows),h=wt(l,vt.touchModality),p=wt(l,vt.multiple),x={id:`${wt(l,vt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(T){c.current?.(T.currentTarget)},...u&&{style:z6},className:d&&!h?xx.className:void 0},y=nt(T=>{l.set("listElement",T)});return hr("div",t,{ref:[n,y],props:[x,s]})});let q6=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function QE(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:s}=e,{register:l,unregister:c,subscribeMapChange:u,elementsRef:d,labelsRef:h,nextIndexRef:p}=Vve(),g=k.useRef(-1),[x,y]=k.useState(s??(i===q6.GuessFromOrder?()=>{if(g.current===-1){const S=p.current;p.current+=1,g.current=S}return g.current}:-1)),T=k.useRef(null),w=k.useCallback(S=>{if(T.current=S,x!==-1&&S!==null&&(d.current[x]=S,h)){const v=t!==void 0;h.current[x]=v?t:r?.current?.textContent??S.textContent}},[x,d,h,t,r]);return rt(()=>{if(s!=null)return;const S=T.current;if(S)return l(S,n),()=>{c(S)}},[s,l,c,n]),rt(()=>{if(s==null)return u(S=>{const v=T.current?S.get(T.current)?.index:null;v!=null&&y(v)})},[s,u,y]),k.useMemo(()=>({ref:w,index:x}),[x,w])}const B6=k.createContext(void 0);function JE(){const e=k.useContext(B6);if(!e)throw new Error(Co(57));return e}const gbe=k.memo(k.forwardRef(function(t,n){const{render:r,className:i,value:s=null,label:l,disabled:c=!1,nativeButton:u=!1,...d}=t,h=k.useRef(null),p=QE({label:l,textRef:h,indexGuessBehavior:q6.GuessFromOrder}),{store:g,getItemProps:x,setOpen:y,setValue:T,selectionRef:w,typingRef:S,valuesRef:v,keyboardActiveRef:E,multiple:b,highlightItemOnHover:C}=rs(),_=pi(),A=wt(g,vt.isActive,p.index),M=wt(g,vt.isSelected,p.index,s),P=wt(g,vt.isSelectedByFocus,p.index),I=wt(g,vt.isItemEqualToValue),z=p.index,q=z!==-1,K=k.useRef(null),X=Ur(z);rt(()=>{if(!q)return;const J=v.current;return J[z]=s,()=>{delete J[z]}},[q,z,s,v]),rt(()=>{if(!q)return;const J=g.state.value;let ne=J;b&&Array.isArray(J)&&J.length>0&&(ne=J[J.length-1]),ne!==void 0&&nf(ne,s,I)&&g.set("selectedIndex",z)},[q,z,b,I,g,s]);const Y=k.useMemo(()=>({disabled:c,selected:M,highlighted:A}),[c,M,A]),H=x({active:A,selected:M});H.onFocus=void 0,H.id=void 0;const Z=k.useRef(null),ee=k.useRef("mouse"),ae=k.useRef(!1),{getButtonProps:re,buttonRef:$}=WE({disabled:c,focusableWhenDisabled:!0,native:u});function B(J){const ne=g.state.value;if(b){const oe=Array.isArray(ne)?ne:[],he=M?cve(oe,s,I):[...oe,s];T(he,An(yS,J))}else T(s,An(yS,J)),y(!1,An(yS,J))}const F={role:"option","aria-selected":M,"aria-disabled":c||void 0,tabIndex:A?0:-1,onFocus(){g.set("activeIndex",z)},onMouseEnter(){!E.current&&g.state.selectedIndex===null&&g.set("activeIndex",z)},onMouseMove(){C&&g.set("activeIndex",z)},onMouseLeave(J){!C||E.current||F6(J)||_.start(0,()=>{g.state.activeIndex===z&&g.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(J){Z.current=J.key,g.set("activeIndex",z)},onClick(J){ae.current=!1,!(J.type==="keydown"&&Z.current===null)&&(c||Z.current===" "&&S.current||ee.current!=="touch"&&!A||(Z.current=null,B(J.nativeEvent)))},onPointerEnter(J){ee.current=J.pointerType},onPointerDown(J){ee.current=J.pointerType,ae.current=!0},onMouseUp(J){if(c)return;if(ae.current){ae.current=!1;return}const ne=!w.current.allowSelectedMouseUp&&M,oe=!w.current.allowUnselectedMouseUp&&!M;ne||oe||ee.current!=="touch"&&!A||B(J.nativeEvent)}},D=hr("div",t,{ref:[$,n,p.ref,K],state:Y,props:[H,F,d,re]}),V=k.useMemo(()=>({selected:M,indexRef:X,textRef:h,selectedByFocus:P,hasRegistered:q}),[M,X,h,P,q]);return j.jsx(B6.Provider,{value:V,children:D})})),ybe=k.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=JE();return r||i?j.jsx(vbe,{...t,ref:n}):null}),vbe=k.memo(k.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...s}=e,{selected:l}=JE(),c=k.useRef(null),{transitionStatus:u,setMounted:d}=GE(l),h=k.useMemo(()=>({selected:l,transitionStatus:u}),[l,u]),p=hr("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:M6});return $0({open:l,ref:c,onComplete(){l||d(!1)}}),p})),bbe=k.memo(k.forwardRef(function(t,n){const{indexRef:r,textRef:i,selectedByFocus:s,hasRegistered:l}=JE(),{selectedItemTextRef:c}=rs(),{className:u,render:d,...h}=t,p=k.useCallback(x=>{if(!x||!l)return;const y=c.current===null||!c.current.isConnected;(s||y&&r.current===0)&&(c.current=x)},[c,r,s,l]);return hr("div",t,{ref:[p,n,i],props:h})})),H6=k.forwardRef(function(t,n){const{render:r,className:i,direction:s,keepMounted:l=!1,...c}=t,{store:u,popupRef:d,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:g}=rs(),{side:x,scrollDownArrowRef:y,scrollUpArrowRef:T}=XE(),w=s==="up"?vt.scrollUpArrowVisible:vt.scrollDownArrowVisible,S=wt(u,w),v=wt(u,vt.touchModality),E=S&&!v,b=pi(),C=s==="up"?T:y,{transitionStatus:_,setMounted:A}=GE(E);rt(()=>(g.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,g]),$0({open:E,ref:C,onComplete(){E||A(!1)}});const M=k.useMemo(()=>({direction:s,visible:E,side:x,transitionStatus:_}),[s,E,x,_]),I=hr("div",t,{ref:[n,C],state:M,props:[{"aria-hidden":!0,children:s==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||b.isStarted())return;u.set("activeIndex",null);function K(){const X=u.state.listElement??d.current;if(!X)return;u.set("activeIndex",null),p();const Y=X.scrollTop===0,H=Math.round(X.scrollTop+X.clientHeight)>=X.scrollHeight;if(h.current.length===0&&(s==="up"?u.set("scrollUpArrowVisible",!Y):u.set("scrollDownArrowVisible",!H)),s==="up"&&Y||s==="down"&&H){b.clear();return}if((u.state.listElement||d.current)&&h.current&&h.current.length>0){const ee=h.current,ae=C.current?.offsetHeight||0;if(s==="up"){let re=0;const $=X.scrollTop+ae;for(let F=0;F<ee.length;F+=1){const D=ee[F];if(D&&D.offsetTop>=$){re=F;break}}const B=Math.max(0,re-1);if(B<re){const F=ee[B];F&&(X.scrollTop=Math.max(0,F.offsetTop-ae))}else X.scrollTop=0}else{let re=ee.length-1;const $=X.scrollTop+X.clientHeight-ae;for(let F=0;F<ee.length;F+=1){const D=ee[F];if(D&&D.offsetTop+D.offsetHeight>$){re=Math.max(0,F-1);break}}const B=Math.min(ee.length-1,re+1);if(B>re){const F=ee[B];F&&(X.scrollTop=F.offsetTop+F.offsetHeight-X.clientHeight+ae)}else X.scrollTop=X.scrollHeight-X.clientHeight}}b.start(40,K)}b.start(40,K)},onMouseLeave(){b.clear()}},c]});return E||l?I:null}),Sbe=k.forwardRef(function(t,n){return j.jsx(H6,{...t,ref:n,direction:"down"})}),wbe=k.forwardRef(function(t,n){return j.jsx(H6,{...t,ref:n,direction:"up"})}),xbe=pve;function _be({className:e,size:t="default",children:n,...r}){return j.jsxs(Ave,{className:gn("cursor-pointer relative inline-flex w-full min-w-36 select-none items-center justify-between gap-2 rounded-lg border border-input bg-background bg-clip-padding px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] text-left text-base/5 shadow-xs outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-placeholder:text-muted-foreground data-disabled:opacity-64 sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:opacity-72 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none",t==="sm"&&"gap-1.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)]",t==="lg"&&"py-[calc(--spacing(2)-1px)]",e),"data-slot":"select-trigger",...r,children:[n,j.jsx(Mve,{"data-slot":"select-icon",children:j.jsx(yee,{className:"-me-1 size-4 opacity-72"})})]})}function Ebe({className:e,...t}){return j.jsx(kve,{className:gn("flex-1 truncate",e),"data-slot":"select-value",...t})}function Cbe({className:e,children:t,sideOffset:n=4,alignItemWithTrigger:r=!0,...i}){return j.jsx(Pve,{children:j.jsx(Jve,{alignItemWithTrigger:r,className:"z-50 select-none","data-slot":"select-positioner",sideOffset:n,children:j.jsxs(pbe,{className:"origin-(--transform-origin) transition-[scale,opacity] has-data-[side=none]:scale-100 has-data-starting-style:scale-98 has-data-starting-style:opacity-0 has-data-[side=none]:transition-none","data-slot":"select-popup",...i,children:[j.jsx(wbe,{className:"top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover","data-slot":"select-scroll-up-arrow",children:j.jsx(mee,{className:"relative size-4"})}),j.jsx("span",{className:"relative block h-full rounded-lg border bg-popover bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg dark:not-in-data-[slot=group]:bg-clip-border",children:j.jsx(mbe,{className:gn("max-h-(--available-height) min-w-(--anchor-width) overflow-y-auto p-1",e),"data-slot":"select-list",children:t})}),j.jsx(Sbe,{className:"bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover","data-slot":"select-scroll-down-arrow",children:j.jsx(hee,{className:"relative size-4"})})]})})})}function Eg({className:e,children:t,...n}){return j.jsxs(gbe,{className:gn("grid in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),"data-slot":"select-item",...n,children:[j.jsx(ybe,{className:"col-start-1",children:j.jsx("svg",{fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/1500/svg",children:j.jsx("path",{d:"M5.252 12.7 10.2 18.63 18.748 5.37"})})}),j.jsx(bbe,{className:"col-start-2 min-w-0",children:t})]})}const K6=k.createContext(void 0);function Sh(){const e=k.useContext(K6);if(e===void 0)throw new Error(Co(64));return e}let Tbe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const F0={tabActivationDirection:e=>({[Tbe.activationDirection]:e})},Rbe=k.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:s,orientation:l="horizontal",render:c,value:u,...d}=t,h=z0(),p=k.useRef([]),[g,x]=k.useState(()=>new Map),[y,T]=My({controlled:u,default:i,name:"Tabs",state:"value"}),[w,S]=k.useState(()=>new Map),[v,E]=k.useState("none"),b=nt((K,X)=>{s?.(K,X),!X.isCanceled&&(T(K),E(X.activationDirection))}),C=nt((K,X)=>{x(Y=>{if(Y.get(K)===X)return Y;const H=new Map(Y);return H.set(K,X),H})}),_=nt((K,X)=>{x(Y=>{if(!Y.has(K)||Y.get(K)!==X)return Y;const H=new Map(Y);return H.delete(K),H})}),A=k.useCallback(K=>g.get(K),[g]),M=k.useCallback(K=>{for(const X of w.values())if(K===X?.value)return X?.id},[w]),P=k.useCallback(K=>{if(K===void 0)return null;for(const[X,Y]of w.entries())if(Y!=null&&K===(Y.value??Y.index))return X;return null},[w]),I=k.useMemo(()=>({direction:h,getTabElementBySelectedValue:P,getTabIdByPanelValue:M,getTabPanelIdByValue:A,onValueChange:b,orientation:l,registerMountedTabPanel:C,setTabMap:S,unregisterMountedTabPanel:_,tabActivationDirection:v,value:y}),[h,P,M,A,b,l,C,S,_,v,y]),q=hr("div",t,{state:{orientation:l,tabActivationDirection:v},ref:n,props:d,stateAttributesMapping:F0});return j.jsx(K6.Provider,{value:I,children:j.jsx(YE,{elementsRef:p,children:q})})}),G6="data-composite-item-active";function Abe(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=D6(),{ref:i,index:s}=QE(e),l=n===s,c=k.useRef(null),u=Ga(i,c);return{compositeProps:k.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(s)},onMouseMove(){const h=c.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!p&&h.focus()}}),[l,r,s,t]),compositeRef:u,index:s}}const Z6=k.createContext(void 0);function W6(){const e=k.useContext(Z6);if(e===void 0)throw new Error(Co(65));return e}const Obe=k.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:s,value:l,id:c,nativeButton:u=!0,...d}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=Sh(),{activateOnFocus:x,highlightedTabIndex:y,onTabActivation:T,setHighlightedTabIndex:w,tabsListElement:S}=W6(),v=Gh(c),E=k.useMemo(()=>({disabled:i,id:v,value:l}),[i,v,l]),{compositeProps:b,compositeRef:C,index:_}=Abe({metadata:E}),A=l===h,M=k.useRef(!1);rt(()=>{if(M.current){M.current=!1;return}if(!(A&&_>-1&&y!==_))return;const ae=S;if(ae!=null){const re=Cs(Xo(ae));if(re&&Fn(ae,re))return}w(_)},[A,_,y,w,i,S]);const{getButtonProps:P,buttonRef:I}=WE({disabled:i,native:u,focusableWhenDisabled:!0}),z=p(l),q=k.useRef(!1),K=k.useRef(!1);function X(ae){A||i||T(l,An(tf,ae.nativeEvent,void 0,{activationDirection:"none"}))}function Y(ae){A||(_>-1&&w(_),!i&&x&&(!q.current||q.current&&K.current)&&T(l,An(tf,ae.nativeEvent,void 0,{activationDirection:"none"})))}function H(ae){if(A||i)return;q.current=!0;function re(){q.current=!1,K.current=!1}(!ae.button||ae.button===0)&&(K.current=!0,Xo(ae.currentTarget).addEventListener("pointerup",re,{once:!0}))}const Z=k.useMemo(()=>({disabled:i,active:A,orientation:g}),[i,A,g]);return hr("button",t,{state:Z,ref:[n,I,C],props:[b,{role:"tab","aria-controls":z,"aria-selected":A,id:v,onClick:X,onFocus:Y,onPointerDown:H,[G6]:A?"":void 0,onKeyDownCapture(){M.current=!0}},d,P]})}),kbe='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;const l=getComputedStyle(e).direction;let n=0,o=0,c=0,r=0,f=0,s=0;if(null!=i&&null!=e){const t=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=i.getBoundingClientRect();n=u-t.left+e.scrollLeft-e.clientLeft,c=d-t.top+e.scrollTop-e.clientTop,f=h,s=p,o="ltr"===l?e.scrollWidth-n-f-e.clientLeft:n-e.clientLeft,r=e.scrollHeight-c-s-e.clientTop}function u(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}u("left",n),u("right",o),u("top",c),u("bottom",r),u("width",f),u("height",s),f>0&&s>0&&t.removeAttribute("hidden")}();';let ru=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Mbe={...F0,activeTabPosition:()=>null,activeTabSize:()=>null},jbe=k.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:s=!1,...l}=t,{getTabElementBySelectedValue:c,orientation:u,tabActivationDirection:d,value:h}=Sh(),{tabsListElement:p}=W6(),[g,x]=k.useState(!1),{value:y}=Sh(),T=z0();IE(()=>x(!0));const w=Hye();k.useEffect(()=>{if(h!=null&&p!=null&&typeof ResizeObserver<"u"){const X=new ResizeObserver(w);return X.observe(p),()=>{X.disconnect()}}},[h,p,w]);let S=0,v=0,E=0,b=0,C=0,_=0,A=!1;if(h!=null&&p!=null){const X=c(h);if(A=!0,X!=null){const Y=p.getBoundingClientRect(),{left:H,top:Z,width:ee,height:ae}=X.getBoundingClientRect();S=H-Y.left+p.scrollLeft-p.clientLeft,E=Z-Y.top+p.scrollTop-p.clientTop,C=ee,_=ae,v=T==="ltr"?p.scrollWidth-S-C-p.clientLeft:S-p.clientLeft,b=p.scrollHeight-E-_-p.clientTop}}const M=k.useMemo(()=>A?{left:S,right:v,top:E,bottom:b}:null,[S,v,E,b,A]),P=k.useMemo(()=>A?{width:C,height:_}:null,[C,_,A]),I=k.useMemo(()=>{if(A)return{[ru.activeTabLeft]:`${S}px`,[ru.activeTabRight]:`${v}px`,[ru.activeTabTop]:`${E}px`,[ru.activeTabBottom]:`${b}px`,[ru.activeTabWidth]:`${C}px`,[ru.activeTabHeight]:`${_}px`}},[S,v,E,b,C,_,A]),z=A&&C>0&&_>0,q=k.useMemo(()=>({orientation:u,activeTabPosition:M,activeTabSize:P,tabActivationDirection:d}),[u,M,P,d]),K=hr("span",t,{state:q,ref:n,props:[{role:"presentation",style:I,hidden:!z},l,{suppressHydrationWarning:!0}],stateAttributesMapping:Mbe});return y==null?null:j.jsxs(k.Fragment,{children:[K,!g&&s&&j.jsx("script",{dangerouslySetInnerHTML:{__html:kbe},suppressHydrationWarning:!0})]})});let Pbe=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Dbe=k.forwardRef(function(t,n){const{className:r,value:i,render:s,keepMounted:l=!1,...c}=t,{value:u,getTabIdByPanelValue:d,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:x}=Sh(),y=Gh(),T=k.useMemo(()=>({id:y,value:i}),[y,i]),{ref:w,index:S}=QE({metadata:T}),v=i!==u,E=d(i),b=k.useMemo(()=>({hidden:v,orientation:h,tabActivationDirection:p}),[v,h,p]),C=hr("div",t,{state:b,ref:[n,w],props:[{"aria-labelledby":E,hidden:v,id:y??void 0,role:"tabpanel",tabIndex:v?-1:0,[Pbe.index]:S},c],stateAttributesMapping:F0});return rt(()=>{if(!(v&&!l)&&y!=null)return g(i,y),()=>{x(i,y)}},[v,l,i,y,g,x]),!v||l?C:null});function Nbe(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const $be=[];function Ibe(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:s="both",direction:l,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:d,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:x=$be}=e,[y,T]=k.useState(0),w=n>1,S=k.useRef(null),v=Ga(S,d),E=k.useRef([]),b=k.useRef(!1),C=c??y,_=nt((P,I=!1)=>{if((u??T)(P),I){const z=E.current[P];H3(S.current,z,l,s)}}),A=nt(P=>{if(P.size===0||b.current)return;b.current=!0;const I=Array.from(P.keys()),z=I.find(K=>K?.hasAttribute(G6))??null,q=z?I.indexOf(z):-1;q!==-1&&_(q),H3(S.current,z,l,s)}),M=k.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,ref:v,onFocus(P){!S.current||!B3(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const I=h?ibe:U6;if(!I.has(P.key)||zbe(P,x)||!S.current)return;const q=l==="rtl",K=q?bh:ju,X={horizontal:K,vertical:Ll,both:K}[s],Y=q?ju:bh,H={horizontal:Y,vertical:Mu,both:Y}[s];if(B3(P.target)&&!Nbe(P.target)){const F=P.target.selectionStart,D=P.target.selectionEnd,V=P.target.value??"";if(F==null||P.shiftKey||F!==D||P.key!==H&&F<V.length||P.key!==X&&F>0)return}let Z=C;const ee=qg(E,g),ae=gx(E,g);if(w){const F=t||Array.from({length:E.current.length},()=>({width:1,height:1})),D=Y9(F,n,i),V=D.findIndex(ne=>ne!=null&&!$a(E,ne,g)),J=D.reduce((ne,oe,he)=>oe!=null&&!$a(E,oe,g)?he:ne,-1);Z=D[W9({current:D.map(ne=>ne?E.current[ne]:null)},{event:P,orientation:s,loopFocus:r,cols:n,disabledIndices:Q9([...g||E.current.map((ne,oe)=>$a(E,oe)?oe:void 0),void 0],D),minIndex:V,maxIndex:J,prevIndex:X9(C>ae?ee:C,F,D,n,P.key===Ll?"bl":P.key===ju?"tr":"tl"),rtl:q})]}const re={horizontal:[K],vertical:[Ll],both:[K,Ll]}[s],$={horizontal:[Y],vertical:[Mu],both:[Y,Mu]}[s],B=w?I:{horizontal:h?nbe:L6,vertical:h?rbe:V6,both:I}[s];h&&(P.key===Yh?Z=ee:P.key===Xh&&(Z=ae)),Z===C&&(re.includes(P.key)||$.includes(P.key))&&(r&&Z===ae&&re.includes(P.key)?Z=ee:r&&Z===ee&&$.includes(P.key)?Z=ae:Z=Fr(E,{startingIndex:Z,decrement:$.includes(P.key),disabledIndices:g})),Z!==C&&!Ru(E,Z)&&(p&&P.stopPropagation(),B.has(P.key)&&P.preventDefault(),_(Z,!0),queueMicrotask(()=>{E.current[Z]?.focus()}))}}),[n,i,l,g,E,h,C,w,t,r,v,x,_,s,p]);return k.useMemo(()=>({props:M,highlightedIndex:C,onHighlightedIndexChange:_,elementsRef:E,disabledIndices:g,onMapChange:A,relayKeyboardEvent:M.onKeyDown}),[M,C,_,E,g,A])}function zbe(e,t){for(const n of ube.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Fbe(e){const{render:t,className:n,refs:r=Wu,props:i=Wu,state:s=di,stateAttributesMapping:l,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,dense:h,itemSizes:p,loopFocus:g,cols:x,enableHomeAndEndKeys:y,onMapChange:T,stopEventPropagation:w=!0,rootRef:S,disabledIndices:v,modifierKeys:E,highlightItemOnHover:b=!1,tag:C="div",..._}=e,A=z0(),{props:M,highlightedIndex:P,onHighlightedIndexChange:I,elementsRef:z,onMapChange:q,relayKeyboardEvent:K}=Ibe({itemSizes:p,cols:x,loopFocus:g,dense:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:S,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:A,disabledIndices:v,modifierKeys:E}),X=hr(C,e,{state:s,ref:r,props:[M,...i,_],stateAttributesMapping:l}),Y=k.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:I,highlightItemOnHover:b,relayKeyboardEvent:K}),[P,I,b,K]);return j.jsx(P6.Provider,{value:Y,children:j.jsx(YE,{elementsRef:z,onMapChange:H=>{T?.(H),q(H)},children:X})})}const Lbe=k.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:s=!0,render:l,...c}=t,{getTabElementBySelectedValue:u,onValueChange:d,orientation:h,value:p,setTabMap:g,tabActivationDirection:x}=Sh(),[y,T]=k.useState(0),[w,S]=k.useState(null),v=Vbe(p,h,w,u),E=nt((A,M)=>{if(A!==p){const P=v(A);M.activationDirection=P,d(A,M)}}),b=k.useMemo(()=>({orientation:h,tabActivationDirection:x}),[h,x]),C={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},_=k.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:E,setHighlightedTabIndex:T,tabsListElement:w,value:p}),[r,y,E,T,w,p]);return j.jsx(Z6.Provider,{value:_,children:j.jsx(Fbe,{render:l,className:i,state:b,refs:[n,S],props:[C,c],stateAttributesMapping:F0,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:s,orientation:h,onHighlightedIndexChange:T,onMapChange:g,disabledIndices:Wu})})});function G3(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:s}=t.getBoundingClientRect(),l=n-i,c=r-s;return{left:l,top:c}}function Vbe(e,t,n,r){const[i,s]=k.useState(null);return rt(()=>{if(e==null||n==null){s(null);return}const l=r(e);if(l==null){s(null);return}const{left:c,top:u}=G3(l,n);s(t==="horizontal"?c:u)},[t,r,n,e]),k.useCallback(l=>{if(l===e)return"none";if(l==null)return s(null),"none";if(l!=null&&n!=null){const c=r(l);if(c!=null){const{left:u,top:d}=G3(c,n);if(i==null)return s(t==="horizontal"?u:d),"none";if(t==="horizontal"){if(u<i)return s(u),"left";if(u>i)return s(u),"right"}else{if(d<i)return s(d),"up";if(d>i)return s(d),"down"}}}return"none"},[r,t,i,n,e])}function Ube({className:e,...t}){return j.jsx(Rbe,{className:gn("flex flex-col gap-2 data-[orientation=vertical]:flex-row",e),"data-slot":"tabs",...t})}function qbe({variant:e="default",className:t,children:n,...r}){return j.jsxs(Lbe,{className:gn("relative z-0 flex w-fit items-center justify-center gap-x-0.5 text-muted-foreground","data-[orientation=vertical]:flex-col",e==="default"?"rounded-lg bg-muted p-0.5 text-muted-foreground/72":"data-[orientation=vertical]:px-1 data-[orientation=horizontal]:py-1 *:data-[slot=tabs-trigger]:hover:bg-accent",t),"data-slot":"tabs-list",...r,children:[n,j.jsx(jbe,{className:gn("-translate-y-(--active-tab-bottom) absolute bottom-0 left-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) transition-[width,translate] duration-200 ease-in-out",e==="underline"?"data-[orientation=vertical]:-translate-x-px z-10 bg-primary data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5 data-[orientation=horizontal]:translate-y-px":"-z-1 rounded-md bg-background shadow-sm dark:bg-accent"),"data-slot":"tab-indicator"})]})}function Z3({className:e,...t}){return j.jsx(Obe,{className:gn("flex flex-1 shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-transparent font-medium text-sm outline-none transition-[color,background-color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring data-disabled:pointer-events-none data-disabled:opacity-64 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0","hover:text-muted-foreground data-active:text-foreground","gap-1.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1.5)-1px)]","data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start",e),"data-slot":"tabs-trigger",...t})}function W3({className:e,...t}){return j.jsx(Dbe,{className:gn("flex-1 outline-none",e),"data-slot":"tabs-content",...t})}const Bbe=()=>{const e=zs(),{openaiRef:t,openaiObject:n}=cf(e.name),{setToolData:r}=Is(),i=(s,l)=>{const c=t?.current;c?.contentWindow?.openai&&(c.contentWindow.openai[s]=l,r(e.name,{openaiObject:{...n,[s]:l}}))};return n?j.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:j.jsxs(Ube,{defaultValue:"widget-state",className:"gap-0",children:[j.jsxs(qbe,{className:"border-b border-border w-full",children:[j.jsx(Z3,{value:"properties",children:"Properties"}),j.jsx(Z3,{value:"widget-state",children:"Widget State"})]}),j.jsx(W3,{value:"properties",className:"p-4",children:j.jsxs(mye,{children:[j.jsxs(bS,{children:[j.jsx(SS,{children:"Display Mode"}),j.jsxs(xbe,{value:n.displayMode,onValueChange:s=>i("displayMode",s),"aria-label":"Select framework",items:[{label:"Inline",value:"inline"},{label:"Fullscreen",value:"fullscreen"},{label:"Pip",value:"pip"},{label:"Modal",value:"modal"}],name:"displayMode",required:!0,children:[j.jsx(_be,{children:j.jsx(Ebe,{})}),j.jsxs(Cbe,{children:[j.jsx(Eg,{value:"inline",children:"Inline"}),j.jsx(Eg,{value:"fullscreen",children:"Fullscreen"}),j.jsx(Eg,{value:"pip",children:"Pip"}),j.jsx(Eg,{value:"modal",children:"Modal"})]})]})]}),j.jsxs(bS,{children:[j.jsx(SS,{children:"Theme"}),j.jsxs(Ime,{children:[j.jsx(Lu,{variant:n.theme==="light"?"default":"outline",onClick:()=>i("theme","light"),children:j.jsx(Mee,{})}),j.jsx(Lu,{variant:n.theme==="dark"?"default":"outline",onClick:()=>i("theme","dark"),children:j.jsx(Ree,{})})]})]}),j.jsxs(bS,{children:[j.jsx(SS,{children:"Locale"}),j.jsx(yye,{value:n.locale,onChange:s=>i("locale",s.target.value)})]})]})}),j.jsx(W3,{value:"widget-state",className:"p-4",children:j.jsx(p9,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})})]})}):null};function Hbe(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function Kbe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function Gbe({log:e}){const[t,n]=k.useState(!1),r=Object.keys(e.args).length>0,i=r?Kbe(e.args):null;return j.jsxs("div",{children:[j.jsxs("div",{onClick:()=>n(!t),className:`flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 ${r?"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30":""}`,children:[j.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:Hbe(e.timestamp)}),j.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command}),r?j.jsxs(j.Fragment,{children:[j.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),j.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:i})]}):null]}),t&&r&&j.jsx("div",{className:"px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50",children:j.jsx("pre",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(e.args,null,2)})})]})}function Zbe(){const e=zs(),{setToolData:t}=Is(),{openaiLogs:n}=cf(e.name),r=k.useRef(null),i=()=>{t(e.name,{openaiLogs:[]})};return k.useEffect(()=>{const s=r.current;s&&(s.scrollTop=s.scrollHeight)},[n]),j.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[j.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[j.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"OpenAI API Logs"}),n.length>0&&j.jsxs(Lu,{variant:"ghost",size:"sm",onClick:i,children:[j.jsx(Pee,{className:"w-3 h-3"}),"Clear"]})]}),j.jsx("div",{ref:r,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:n.map(s=>j.jsx(Gbe,{log:s},s.id))})]})}const L0=k.createContext(null);L0.displayName="PanelGroupContext";const Qn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},e2=10,Bl=k.useLayoutEffect,Y3=of.useId,Wbe=typeof Y3=="function"?Y3:()=>null;let Ybe=0;function t2(e=null){const t=Wbe(),n=k.useRef(e||t||null);return n.current===null&&(n.current=""+Ybe++),e??n.current}function Y6({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:s,id:l,maxSize:c,minSize:u,onCollapse:d,onExpand:h,onResize:p,order:g,style:x,tagName:y="div",...T}){const w=k.useContext(L0);if(w===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:v,getPanelSize:E,getPanelStyle:b,groupId:C,isPanelCollapsed:_,reevaluatePanelConstraints:A,registerPanel:M,resizePanel:P,unregisterPanel:I}=w,z=t2(l),q=k.useRef({callbacks:{onCollapse:d,onExpand:h,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:c,minSize:u},id:z,idIsFromProps:l!==void 0,order:g});k.useRef({didLogMissingDefaultSizeWarning:!1}),Bl(()=>{const{callbacks:X,constraints:Y}=q.current,H={...Y};q.current.id=z,q.current.idIsFromProps=l!==void 0,q.current.order=g,X.onCollapse=d,X.onExpand=h,X.onResize=p,Y.collapsedSize=n,Y.collapsible=r,Y.defaultSize=i,Y.maxSize=c,Y.minSize=u,(H.collapsedSize!==Y.collapsedSize||H.collapsible!==Y.collapsible||H.maxSize!==Y.maxSize||H.minSize!==Y.minSize)&&A(q.current,H)}),Bl(()=>{const X=q.current;return M(X),()=>{I(X)}},[g,z,M,I]),k.useImperativeHandle(s,()=>({collapse:()=>{S(q.current)},expand:X=>{v(q.current,X)},getId(){return z},getSize(){return E(q.current)},isCollapsed(){return _(q.current)},isExpanded(){return!_(q.current)},resize:X=>{P(q.current,X)}}),[S,v,E,_,z,P]);const K=b(q.current,i);return k.createElement(y,{...T,children:e,className:t,id:z,style:{...K,...x},[Qn.groupId]:C,[Qn.panel]:"",[Qn.panelCollapsible]:r||void 0,[Qn.panelId]:z,[Qn.panelSize]:parseFloat(""+K.flexGrow).toFixed(1)})}const X6=k.forwardRef((e,t)=>k.createElement(Y6,{...e,forwardedRef:t}));Y6.displayName="Panel";X6.displayName="forwardRef(Panel)";let _x=null,Gg=-1,_a=null;function Xbe(e,t,n){const r=(t&nz)!==0,i=(t&rz)!==0,s=(t&iz)!==0,l=(t&oz)!==0;if(t){if(r)return s?"se-resize":l?"ne-resize":"e-resize";if(i)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Qbe(){_a!==null&&(document.head.removeChild(_a),_x=null,_a=null,Gg=-1)}function MS(e,t,n){var r,i;const s=Xbe(e,t);if(_x!==s){if(_x=s,_a===null&&(_a=document.createElement("style"),document.head.appendChild(_a)),Gg>=0){var l;(l=_a.sheet)===null||l===void 0||l.removeRule(Gg)}Gg=(r=(i=_a.sheet)===null||i===void 0?void 0:i.insertRule(`*{cursor: ${s} !important;}`))!==null&&r!==void 0?r:-1}}function Q6(e){return e.type==="keydown"}function J6(e){return e.type.startsWith("pointer")}function ez(e){return e.type.startsWith("mouse")}function V0(e){if(J6(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(ez(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Jbe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function e1e(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function t1e(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:J3(e),b:J3(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;jt(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Q3(X3(n.a)),b:Q3(X3(n.b))};if(i.a===i.b){const s=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let c=s.length;for(;c--;){const u=s[c];if(u===l.a)return 1;if(u===l.b)return-1}}return Math.sign(i.a-i.b)}const n1e=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function r1e(e){var t;const n=getComputedStyle((t=tz(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function i1e(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||r1e(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||n1e.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function X3(e){let t=e.length;for(;t--;){const n=e[t];if(jt(n,"Missing node"),i1e(n))return n}return null}function Q3(e){return e&&Number(getComputedStyle(e).zIndex)||0}function J3(e){const t=[];for(;e;)t.push(e),e=tz(e);return t}function tz(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const nz=1,rz=2,iz=4,oz=8,o1e=Jbe()==="coarse";let So=[],Pu=!1,Ea=new Map,U0=new Map;const wh=new Set;function s1e(e,t,n,r,i){var s;const{ownerDocument:l}=t,c={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},u=(s=Ea.get(l))!==null&&s!==void 0?s:0;return Ea.set(l,u+1),wh.add(c),zy(),function(){var h;U0.delete(e),wh.delete(c);const p=(h=Ea.get(l))!==null&&h!==void 0?h:1;if(Ea.set(l,p-1),zy(),p===1&&Ea.delete(l),So.includes(c)){const g=So.indexOf(c);g>=0&&So.splice(g,1),q0(),i("up",!0,null)}}}function a1e(e){const{target:t}=e,{x:n,y:r}=V0(e);Pu=!0,n2({target:t,x:n,y:r}),zy(),So.length>0&&(Fy("down",e),q0(),e.preventDefault(),sz(t)||e.stopImmediatePropagation())}function jS(e){const{x:t,y:n}=V0(e);if(Pu&&e.type!=="pointerleave"&&e.buttons===0&&(Pu=!1,Fy("up",e)),!Pu){const{target:r}=e;n2({target:r,x:t,y:n})}Fy("move",e),q0(),So.length>0&&e.preventDefault()}function PS(e){const{target:t}=e,{x:n,y:r}=V0(e);U0.clear(),Pu=!1,So.length>0&&(e.preventDefault(),sz(t)||e.stopImmediatePropagation()),Fy("up",e),n2({target:t,x:n,y:r}),q0(),zy()}function sz(e){let t=e;for(;t;){if(t.hasAttribute(Qn.resizeHandle))return!0;t=t.parentElement}return!1}function n2({target:e,x:t,y:n}){So.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),wh.forEach(i=>{const{element:s,hitAreaMargins:l}=i,c=s.getBoundingClientRect(),{bottom:u,left:d,right:h,top:p}=c,g=o1e?l.coarse:l.fine;if(t>=d-g&&t<=h+g&&n>=p-g&&n<=u+g){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&t1e(r,s)>0){let y=r,T=!1;for(;y&&!y.contains(s);){if(e1e(y.getBoundingClientRect(),c)){T=!0;break}y=y.parentElement}if(T)return}So.push(i)}})}function DS(e,t){U0.set(e,t)}function q0(){let e=!1,t=!1;So.forEach(r=>{const{direction:i}=r;i==="horizontal"?e=!0:t=!0});let n=0;U0.forEach(r=>{n|=r}),e&&t?MS("intersection",n):e?MS("horizontal",n):t?MS("vertical",n):Qbe()}let NS;function zy(){var e;(e=NS)===null||e===void 0||e.abort(),NS=new AbortController;const t={capture:!0,signal:NS.signal};wh.size&&(Pu?(So.length>0&&Ea.forEach((n,r)=>{const{body:i}=r;n>0&&(i.addEventListener("contextmenu",PS,t),i.addEventListener("pointerleave",jS,t),i.addEventListener("pointermove",jS,t))}),Ea.forEach((n,r)=>{const{body:i}=r;i.addEventListener("pointerup",PS,t),i.addEventListener("pointercancel",PS,t)})):Ea.forEach((n,r)=>{const{body:i}=r;n>0&&(i.addEventListener("pointerdown",a1e,t),i.addEventListener("pointermove",jS,t))}))}function Fy(e,t){wh.forEach(n=>{const{setResizeHandlerState:r}=n,i=So.includes(n);r(e,i,t)})}function l1e(){const[e,t]=k.useState(0);return k.useCallback(()=>t(n=>n+1),[])}function jt(e,t){if(!e)throw console.error(t),Error(t)}function ec(e,t,n=e2){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ts(e,t,n=e2){return ec(e,t,n)===0}function Oi(e,t,n){return ec(e,t,n)===0}function c1e(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],s=t[r];if(!Oi(i,s,n))return!1}return!0}function Su({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];jt(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:s,maxSize:l=100,minSize:c=0}=r;if(ec(n,c)<0)if(s){const u=(i+c)/2;ec(n,u)<0?n=i:n=c}else n=c;return n=Math.min(l,n),n=parseFloat(n.toFixed(e2)),n}function Pd({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:s}){if(Oi(e,0))return t;const l=[...t],[c,u]=r;jt(c!=null,"Invalid first pivot index"),jt(u!=null,"Invalid second pivot index");let d=0;if(s==="keyboard"){{const p=e<0?u:c,g=n[p];jt(g,`Panel constraints not found for index ${p}`);const{collapsedSize:x=0,collapsible:y,minSize:T=0}=g;if(y){const w=t[p];if(jt(w!=null,`Previous layout not found for panel index ${p}`),Oi(w,x)){const S=T-w;ec(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{const p=e<0?c:u,g=n[p];jt(g,`No panel constraints found for index ${p}`);const{collapsedSize:x=0,collapsible:y,minSize:T=0}=g;if(y){const w=t[p];if(jt(w!=null,`Previous layout not found for panel index ${p}`),Oi(w,T)){const S=w-x;ec(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const p=e<0?1:-1;let g=e<0?u:c,x=0;for(;;){const T=t[g];jt(T!=null,`Previous layout not found for panel index ${g}`);const S=Su({panelConstraints:n,panelIndex:g,size:100})-T;if(x+=S,g+=p,g<0||g>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-y:y}{let g=e<0?c:u;for(;g>=0&&g<n.length;){const x=Math.abs(e)-Math.abs(d),y=t[g];jt(y!=null,`Previous layout not found for panel index ${g}`);const T=y-x,w=Su({panelConstraints:n,panelIndex:g,size:T});if(!Oi(y,w)&&(d+=y-w,l[g]=w,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?g--:g++}}if(c1e(i,l))return i;{const p=e<0?u:c,g=t[p];jt(g!=null,`Previous layout not found for panel index ${p}`);const x=g+d,y=Su({panelConstraints:n,panelIndex:p,size:x});if(l[p]=y,!Oi(y,x)){let T=x-y,S=e<0?u:c;for(;S>=0&&S<n.length;){const v=l[S];jt(v!=null,`Previous layout not found for panel index ${S}`);const E=v+T,b=Su({panelConstraints:n,panelIndex:S,size:E});if(Oi(v,b)||(T-=b-v,l[S]=b),Oi(T,0))break;e>0?S--:S++}}}const h=l.reduce((p,g)=>g+p,0);return Oi(h,100)?l:i}function u1e({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,s=0,l=0;const c=n[0];jt(c!=null,"No pivot index found"),t.forEach((p,g)=>{const{constraints:x}=p,{maxSize:y=100,minSize:T=0}=x;g===c?(r=T,i=y):(s+=T,l+=y)});const u=Math.min(i,100-s),d=Math.max(r,100-l),h=e[c];return{valueMax:u,valueMin:d,valueNow:h}}function xh(e,t=document){return Array.from(t.querySelectorAll(`[${Qn.resizeHandleId}][data-panel-group-id="${e}"]`))}function az(e,t,n=document){const i=xh(e,n).findIndex(s=>s.getAttribute(Qn.resizeHandleId)===t);return i??null}function lz(e,t,n){const r=az(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function f1e(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function cz(e,t=document){if(f1e(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function B0(e,t=document){const n=t.querySelector(`[${Qn.resizeHandleId}="${e}"]`);return n||null}function d1e(e,t,n,r=document){var i,s,l,c;const u=B0(t,r),d=xh(e,r),h=u?d.indexOf(u):-1,p=(i=(s=n[h])===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:null,g=(l=(c=n[h+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[p,g]}function h1e({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:s,setLayout:l}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Bl(()=>{if(!s)return;const c=xh(n,s);for(let u=0;u<i.length-1;u++){const{valueMax:d,valueMin:h,valueNow:p}=u1e({layout:r,panelsArray:i,pivotIndices:[u,u+1]}),g=c[u];if(g!=null){const x=i[u];jt(x,`No panel data found for index "${u}"`),g.setAttribute("aria-controls",x.id),g.setAttribute("aria-valuemax",""+Math.round(d)),g.setAttribute("aria-valuemin",""+Math.round(h)),g.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{c.forEach((u,d)=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})}},[n,r,i,s]),k.useEffect(()=>{if(!s)return;const c=t.current;jt(c,"Eager values not found");const{panelDataArray:u}=c,d=cz(n,s);jt(d!=null,`No group found for id "${n}"`);const h=xh(n,s);jt(h,`No resize handles found for group id "${n}"`);const p=h.map(g=>{const x=g.getAttribute(Qn.resizeHandleId);jt(x,"Resize handle element has no handle id attribute");const[y,T]=d1e(n,x,u,s);if(y==null||T==null)return()=>{};const w=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const v=u.findIndex(E=>E.id===y);if(v>=0){const E=u[v];jt(E,`No panel data found for index ${v}`);const b=r[v],{collapsedSize:C=0,collapsible:_,minSize:A=0}=E.constraints;if(b!=null&&_){const M=Pd({delta:Oi(b,C)?A-C:C-b,initialLayout:r,panelConstraints:u.map(P=>P.constraints),pivotIndices:lz(n,x,s),prevLayout:r,trigger:"keyboard"});r!==M&&l(M)}}break}}};return g.addEventListener("keydown",w),()=>{g.removeEventListener("keydown",w)}});return()=>{p.forEach(g=>g())}},[s,e,t,n,r,i,l])}function ej(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function uz(e,t){const n=e==="horizontal",{x:r,y:i}=V0(t);return n?r:i}function p1e(e,t,n,r,i){const s=n==="horizontal",l=B0(t,i);jt(l,`No resize handle element found for id "${t}"`);const c=l.getAttribute(Qn.groupId);jt(c,"Resize handle element has no group id attribute");let{initialCursorPosition:u}=r;const d=uz(n,e),h=cz(c,i);jt(h,`No group element found for id "${c}"`);const p=h.getBoundingClientRect(),g=s?p.width:p.height;return(d-u)/g*100}function m1e(e,t,n,r,i,s){if(Q6(e)){const l=n==="horizontal";let c=0;e.shiftKey?c=100:i!=null?c=i:c=10;let u=0;switch(e.key){case"ArrowDown":u=l?0:c;break;case"ArrowLeft":u=l?-c:0;break;case"ArrowRight":u=l?c:0;break;case"ArrowUp":u=l?0:-c;break;case"End":u=100;break;case"Home":u=-100;break}return u}else return r==null?0:p1e(e,t,n,r,s)}function g1e({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,i=100;for(let s=0;s<e.length;s++){const l=n[s];jt(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;c!=null&&(r++,t[s]=c,i-=c)}for(let s=0;s<e.length;s++){const l=n[s];jt(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;if(c!=null)continue;const u=e.length-r,d=i/u;r++,t[s]=d,i-=d}return t}function iu(e,t,n){t.forEach((r,i)=>{const s=e[i];jt(s,`Panel data not found for index ${i}`);const{callbacks:l,constraints:c,id:u}=s,{collapsedSize:d=0,collapsible:h}=c,p=n[u];if(p==null||r!==p){n[u]=r;const{onCollapse:g,onExpand:x,onResize:y}=l;y&&y(r,p),h&&(g||x)&&(x&&(p==null||Ts(p,d))&&!Ts(r,d)&&x(),g&&(p==null||!Ts(p,d))&&Ts(r,d)&&g())}})}function Cg(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function y1e({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:s=3}){const l=n[i];let c;return l==null?c=e!=null?e.toFixed(s):"1":r.length===1?c="1":c=l.toFixed(s),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function v1e(e,t=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)}}function tj(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function fz(e){return`react-resizable-panels:${e}`}function dz(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:i,order:s}=t;return i?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function hz(e,t){try{const n=fz(e),r=t.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function b1e(e,t,n){var r,i;const s=(r=hz(e,n))!==null&&r!==void 0?r:{},l=dz(t);return(i=s[l])!==null&&i!==void 0?i:null}function S1e(e,t,n,r,i){var s;const l=fz(e),c=dz(t),u=(s=hz(e,i))!==null&&s!==void 0?s:{};u[c]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(l,JSON.stringify(u))}catch(d){console.error(d)}}function nj({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,l)=>s+l,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!Oi(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const l=n[s];jt(l!=null,`No layout data found for index ${s}`);const c=100/r*l;n[s]=c}let i=0;for(let s=0;s<t.length;s++){const l=n[s];jt(l!=null,`No layout data found for index ${s}`);const c=Su({panelConstraints:t,panelIndex:s,size:l});l!=c&&(i+=l-c,n[s]=c)}if(!Oi(i,0))for(let s=0;s<t.length;s++){const l=n[s];jt(l!=null,`No layout data found for index ${s}`);const c=l+i,u=Su({panelConstraints:t,panelIndex:s,size:c});if(l!==u&&(i-=u-l,n[s]=u,Oi(i,0)))break}return n}const w1e=100,Dd={getItem:e=>(tj(Dd),Dd.getItem(e)),setItem:(e,t)=>{tj(Dd),Dd.setItem(e,t)}},rj={};function pz({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:i,id:s=null,onLayout:l=null,keyboardResizeBy:c=null,storage:u=Dd,style:d,tagName:h="div",...p}){const g=t2(s),x=k.useRef(null),[y,T]=k.useState(null),[w,S]=k.useState([]),v=l1e(),E=k.useRef({}),b=k.useRef(new Map),C=k.useRef(0),_=k.useRef({autoSaveId:e,direction:r,dragState:y,id:g,keyboardResizeBy:c,onLayout:l,storage:u}),A=k.useRef({layout:w,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(i,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:F}=A.current;return F},setLayout:F=>{const{onLayout:D}=_.current,{layout:V,panelDataArray:J}=A.current,ne=nj({layout:F,panelConstraints:J.map(oe=>oe.constraints)});ej(V,ne)||(S(ne),A.current.layout=ne,D&&D(ne),iu(J,ne,E.current))}}),[]),Bl(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=y,_.current.id=g,_.current.onLayout=l,_.current.storage=u}),h1e({committedValuesRef:_,eagerValuesRef:A,groupId:g,layout:w,panelDataArray:A.current.panelDataArray,setLayout:S,panelGroupElement:x.current}),k.useEffect(()=>{const{panelDataArray:F}=A.current;if(e){if(w.length===0||w.length!==F.length)return;let D=rj[e];D==null&&(D=v1e(S1e,w1e),rj[e]=D);const V=[...F],J=new Map(b.current);D(e,V,J,w,u)}},[e,w,u]),k.useEffect(()=>{});const M=k.useCallback(F=>{const{onLayout:D}=_.current,{layout:V,panelDataArray:J}=A.current;if(F.constraints.collapsible){const ne=J.map(te=>te.constraints),{collapsedSize:oe=0,panelSize:he,pivotIndices:Ee}=Pl(J,F,V);if(jt(he!=null,`Panel size not found for panel "${F.id}"`),!Ts(he,oe)){b.current.set(F.id,he);const ie=lu(J,F)===J.length-1?he-oe:oe-he,le=Pd({delta:ie,initialLayout:V,panelConstraints:ne,pivotIndices:Ee,prevLayout:V,trigger:"imperative-api"});Cg(V,le)||(S(le),A.current.layout=le,D&&D(le),iu(J,le,E.current))}}},[]),P=k.useCallback((F,D)=>{const{onLayout:V}=_.current,{layout:J,panelDataArray:ne}=A.current;if(F.constraints.collapsible){const oe=ne.map(Se=>Se.constraints),{collapsedSize:he=0,panelSize:Ee=0,minSize:te=0,pivotIndices:ie}=Pl(ne,F,J),le=D??te;if(Ts(Ee,he)){const Se=b.current.get(F.id),Re=Se!=null&&Se>=le?Se:le,Ie=lu(ne,F)===ne.length-1?Ee-Re:Re-Ee,Pe=Pd({delta:Ie,initialLayout:J,panelConstraints:oe,pivotIndices:ie,prevLayout:J,trigger:"imperative-api"});Cg(J,Pe)||(S(Pe),A.current.layout=Pe,V&&V(Pe),iu(ne,Pe,E.current))}}},[]),I=k.useCallback(F=>{const{layout:D,panelDataArray:V}=A.current,{panelSize:J}=Pl(V,F,D);return jt(J!=null,`Panel size not found for panel "${F.id}"`),J},[]),z=k.useCallback((F,D)=>{const{panelDataArray:V}=A.current,J=lu(V,F);return y1e({defaultSize:D,dragState:y,layout:w,panelData:V,panelIndex:J})},[y,w]),q=k.useCallback(F=>{const{layout:D,panelDataArray:V}=A.current,{collapsedSize:J=0,collapsible:ne,panelSize:oe}=Pl(V,F,D);return jt(oe!=null,`Panel size not found for panel "${F.id}"`),ne===!0&&Ts(oe,J)},[]),K=k.useCallback(F=>{const{layout:D,panelDataArray:V}=A.current,{collapsedSize:J=0,collapsible:ne,panelSize:oe}=Pl(V,F,D);return jt(oe!=null,`Panel size not found for panel "${F.id}"`),!ne||ec(oe,J)>0},[]),X=k.useCallback(F=>{const{panelDataArray:D}=A.current;D.push(F),D.sort((V,J)=>{const ne=V.order,oe=J.order;return ne==null&&oe==null?0:ne==null?-1:oe==null?1:ne-oe}),A.current.panelDataArrayChanged=!0,v()},[v]);Bl(()=>{if(A.current.panelDataArrayChanged){A.current.panelDataArrayChanged=!1;const{autoSaveId:F,onLayout:D,storage:V}=_.current,{layout:J,panelDataArray:ne}=A.current;let oe=null;if(F){const Ee=b1e(F,ne,V);Ee&&(b.current=new Map(Object.entries(Ee.expandToSizes)),oe=Ee.layout)}oe==null&&(oe=g1e({panelDataArray:ne}));const he=nj({layout:oe,panelConstraints:ne.map(Ee=>Ee.constraints)});ej(J,he)||(S(he),A.current.layout=he,D&&D(he),iu(ne,he,E.current))}}),Bl(()=>{const F=A.current;return()=>{F.layout=[]}},[]);const Y=k.useCallback(F=>{let D=!1;const V=x.current;return V&&window.getComputedStyle(V,null).getPropertyValue("direction")==="rtl"&&(D=!0),function(ne){ne.preventDefault();const oe=x.current;if(!oe)return()=>null;const{direction:he,dragState:Ee,id:te,keyboardResizeBy:ie,onLayout:le}=_.current,{layout:Se,panelDataArray:Re}=A.current,{initialLayout:we}=Ee??{},Ie=lz(te,F,oe);let Pe=m1e(ne,F,he,Ee,ie,oe);const ye=he==="horizontal";ye&&D&&(Pe=-Pe);const Ue=Re.map(ze=>ze.constraints),De=Pd({delta:Pe,initialLayout:we??Se,panelConstraints:Ue,pivotIndices:Ie,prevLayout:Se,trigger:Q6(ne)?"keyboard":"mouse-or-touch"}),We=!Cg(Se,De);(J6(ne)||ez(ne))&&C.current!=Pe&&(C.current=Pe,!We&&Pe!==0?ye?DS(F,Pe<0?nz:rz):DS(F,Pe<0?iz:oz):DS(F,0)),We&&(S(De),A.current.layout=De,le&&le(De),iu(Re,De,E.current))}},[]),H=k.useCallback((F,D)=>{const{onLayout:V}=_.current,{layout:J,panelDataArray:ne}=A.current,oe=ne.map(Se=>Se.constraints),{panelSize:he,pivotIndices:Ee}=Pl(ne,F,J);jt(he!=null,`Panel size not found for panel "${F.id}"`);const ie=lu(ne,F)===ne.length-1?he-D:D-he,le=Pd({delta:ie,initialLayout:J,panelConstraints:oe,pivotIndices:Ee,prevLayout:J,trigger:"imperative-api"});Cg(J,le)||(S(le),A.current.layout=le,V&&V(le),iu(ne,le,E.current))},[]),Z=k.useCallback((F,D)=>{const{layout:V,panelDataArray:J}=A.current,{collapsedSize:ne=0,collapsible:oe}=D,{collapsedSize:he=0,collapsible:Ee,maxSize:te=100,minSize:ie=0}=F.constraints,{panelSize:le}=Pl(J,F,V);le!=null&&(oe&&Ee&&Ts(le,ne)?Ts(ne,he)||H(F,he):le<ie?H(F,ie):le>te&&H(F,te))},[H]),ee=k.useCallback((F,D)=>{const{direction:V}=_.current,{layout:J}=A.current;if(!x.current)return;const ne=B0(F,x.current);jt(ne,`Drag handle element not found for id "${F}"`);const oe=uz(V,D);T({dragHandleId:F,dragHandleRect:ne.getBoundingClientRect(),initialCursorPosition:oe,initialLayout:J})},[]),ae=k.useCallback(()=>{T(null)},[]),re=k.useCallback(F=>{const{panelDataArray:D}=A.current,V=lu(D,F);V>=0&&(D.splice(V,1),delete E.current[F.id],A.current.panelDataArrayChanged=!0,v())},[v]),$=k.useMemo(()=>({collapsePanel:M,direction:r,dragState:y,expandPanel:P,getPanelSize:I,getPanelStyle:z,groupId:g,isPanelCollapsed:q,isPanelExpanded:K,reevaluatePanelConstraints:Z,registerPanel:X,registerResizeHandle:Y,resizePanel:H,startDragging:ee,stopDragging:ae,unregisterPanel:re,panelGroupElement:x.current}),[M,y,r,P,I,z,g,q,K,Z,X,Y,H,ee,ae,re]),B={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(L0.Provider,{value:$},k.createElement(h,{...p,children:t,className:n,id:s,ref:x,style:{...B,...d},[Qn.group]:"",[Qn.groupDirection]:r,[Qn.groupId]:g}))}const mz=k.forwardRef((e,t)=>k.createElement(pz,{...e,forwardedRef:t}));pz.displayName="PanelGroup";mz.displayName="forwardRef(PanelGroup)";function lu(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Pl(e,t,n){const r=lu(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],l=n[r];return{...t.constraints,panelSize:l,pivotIndices:s}}function x1e({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){k.useEffect(()=>{if(e||n==null||r==null)return;const i=B0(t,r);if(i==null)return;const s=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const c=i.getAttribute(Qn.groupId);jt(c,`No group element found for id "${c}"`);const u=xh(c,r),d=az(c,t,r);jt(d!==null,`No resize element found for id "${t}"`);const h=l.shiftKey?d>0?d-1:u.length-1:d+1<u.length?d+1:0;u[h].focus();break}}};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}},[r,e,t,n])}function gz({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:s,onClick:l,onDragging:c,onFocus:u,onPointerDown:d,onPointerUp:h,style:p={},tabIndex:g=0,tagName:x="div",...y}){var T,w;const S=k.useRef(null),v=k.useRef({onClick:l,onDragging:c,onPointerDown:d,onPointerUp:h});k.useEffect(()=>{v.current.onClick=l,v.current.onDragging=c,v.current.onPointerDown=d,v.current.onPointerUp=h});const E=k.useContext(L0);if(E===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:b,groupId:C,registerResizeHandle:_,startDragging:A,stopDragging:M,panelGroupElement:P}=E,I=t2(i),[z,q]=k.useState("inactive"),[K,X]=k.useState(!1),[Y,H]=k.useState(null),Z=k.useRef({state:z});Bl(()=>{Z.current.state=z}),k.useEffect(()=>{if(n)H(null);else{const $=_(I);H(()=>$)}},[n,I,_]);const ee=(T=r?.coarse)!==null&&T!==void 0?T:15,ae=(w=r?.fine)!==null&&w!==void 0?w:5;k.useEffect(()=>{if(n||Y==null)return;const $=S.current;jt($,"Element ref not attached");let B=!1;return s1e(I,$,b,{coarse:ee,fine:ae},(D,V,J)=>{if(!V){q("inactive");return}switch(D){case"down":{q("drag"),B=!1,jt(J,'Expected event to be defined for "down" action'),A(I,J);const{onDragging:ne,onPointerDown:oe}=v.current;ne?.(!0),oe?.();break}case"move":{const{state:ne}=Z.current;B=!0,ne!=="drag"&&q("hover"),jt(J,'Expected event to be defined for "move" action'),Y(J);break}case"up":{q("hover"),M();const{onClick:ne,onDragging:oe,onPointerUp:he}=v.current;oe?.(!1),he?.(),B||ne?.();break}}})},[ee,b,n,ae,_,I,Y,A,M]),x1e({disabled:n,handleId:I,resizeHandler:Y,panelGroupElement:P});const re={touchAction:"none",userSelect:"none"};return k.createElement(x,{...y,children:e,className:t,id:i,onBlur:()=>{X(!1),s?.()},onFocus:()=>{X(!0),u?.()},ref:S,role:"separator",style:{...re,...p},tabIndex:g,[Qn.groupDirection]:b,[Qn.groupId]:C,[Qn.resizeHandle]:"",[Qn.resizeHandleActive]:z==="drag"?"pointer":K?"keyboard":void 0,[Qn.resizeHandleEnabled]:!n,[Qn.resizeHandleId]:I,[Qn.resizeHandleState]:z})}gz.displayName="PanelResizeHandle";function yz({className:e,...t}){return j.jsx(mz,{"data-slot":"resizable-panel-group",className:gn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function Ly({...e}){return j.jsx(X6,{"data-slot":"resizable-panel",...e})}function vz({withHandle:e,className:t,...n}){return j.jsx(gz,{"data-slot":"resizable-handle",className:gn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&j.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:j.jsx(_ee,{className:"size-2.5"})})})}function bz({key:e,defaultSizePercent:t,minSizePercent:n=10,maxSizePercent:r=90}){const[i,s]=Bpe(e,{defaultValue:Math.max(n,Math.min(r,t))}),l=k.useCallback(c=>{const u=Math.max(n,Math.min(r,c));s(u)},[n,r,s]);return{size:Math.max(n,Math.min(r,i??t)),onResize:l}}const _1e=()=>{const e=zs(),t=cf(e.name),n=bz({key:"skybridge-emulator-input-column-width",defaultSizePercent:35,minSizePercent:20,maxSizePercent:60}),r=!!(e?._meta?.["ui/resourceUri"]&&t?.response&&!t.response.isError);return j.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:[j.jsxs(yz,{direction:"horizontal",className:"flex flex-1 overflow-hidden border-b border-border",onLayout:i=>{i[0]!==void 0&&n.onResize(i[0])},children:[j.jsx(Ly,{defaultSize:n.size,minSize:20,maxSize:60,children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(Zpe,{})})}),j.jsx(vz,{}),j.jsx(Ly,{defaultSize:100-n.size,minSize:30,children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(nme,{})})})]}),r&&j.jsxs("div",{className:"flex overflow-hidden bg-card relative h-[60%]",children:[j.jsxs("div",{className:"flex flex-col flex-1 h-full overflow-hidden bg-card border-r border-border",children:[j.jsx("div",{className:"border-b border-border",children:j.jsx(Nme,{})}),j.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:j.jsx(Zbe,{})})]}),j.jsx("div",{className:"flex flex-col overflow-hidden w-[400px] flex-none min-h-0",children:j.jsx("div",{className:"overflow-auto",children:j.jsx(Bbe,{})})})]})]})};function E1e(){const e=D4(),{setSelectedTool:t}=Is(),n=zs();return j.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:j.jsxs("aside",{className:"h-full flex flex-col",children:[j.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[j.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),j.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),j.jsx("div",{className:"flex-1 overflow-y-auto",children:j.jsx("div",{className:"p-2",children:e?.length===0?j.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools available"}):j.jsx("div",{className:"space-y-1",children:e?.map(r=>{const i=r.name===n?.name;return j.jsxs("button",{onClick:()=>t(r.name),className:gn("w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",i&&"bg-accent text-accent-foreground"),children:[j.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[j.jsx("div",{className:gn("font-semibold text-sm leading-tight truncate",i&&"text-accent-foreground"),children:r.name}),r.description&&j.jsx("div",{className:gn("text-xs leading-snug text-muted-foreground","line-clamp-2",i&&"text-accent-foreground/80"),children:r.description})]}),i&&j.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},r.name)})})})})]})})}function C1e(){const e=zs(),t=bz({key:"skybridge-emulator-tools-list-width",defaultSizePercent:20,minSizePercent:15,maxSizePercent:40});return j.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[j.jsx(Dee,{}),j.jsxs(yz,{direction:"horizontal",className:"flex flex-1 overflow-hidden",onLayout:n=>{n[0]!==void 0&&t.onResize(n[0])},children:[j.jsx(Ly,{defaultSize:t.size,minSize:15,maxSize:40,children:j.jsx(E1e,{})}),j.jsx(vz,{}),j.jsx(Ly,{defaultSize:100-t.size,minSize:30,children:j.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?j.jsx(_1e,{}):j.jsx(hoe,{})})})]})]})}const T1e=new JF;function R1e(){return j.jsx(eL,{client:T1e,children:j.jsx(C1e,{})})}MF.createRoot(document.getElementById("root")).render(j.jsx(k.StrictMode,{children:j.jsx(R1e,{})}))});export default A1e();