@cursor/july 0.1.10 → 0.1.12

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 (197) hide show
  1. package/AGENTS.md +1 -0
  2. package/dist/bin/agent-serve.js +17 -3
  3. package/dist/channels/github/github-channel.d.ts.map +1 -1
  4. package/dist/channels/github/github-channel.js +2 -1
  5. package/dist/channels/github/types.d.ts +4 -0
  6. package/dist/channels/github/types.d.ts.map +1 -1
  7. package/dist/channels/slack/cursor-account.d.ts.map +1 -1
  8. package/dist/channels/slack/cursor-account.js +1 -1
  9. package/dist/channels/slack/dispatch.d.ts +13 -0
  10. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  11. package/dist/channels/slack/dispatch.js +36 -11
  12. package/dist/channels/slack/eval-directive.d.ts +63 -0
  13. package/dist/channels/slack/eval-directive.d.ts.map +1 -0
  14. package/dist/channels/slack/eval-directive.js +283 -0
  15. package/dist/channels/slack/index.d.ts +1 -0
  16. package/dist/channels/slack/index.d.ts.map +1 -1
  17. package/dist/channels/slack/index.js +1 -0
  18. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  19. package/dist/channels/slack/slack-channel.js +4 -2
  20. package/dist/channels/slack/types.d.ts +7 -0
  21. package/dist/channels/slack/types.d.ts.map +1 -1
  22. package/dist/connections.d.ts +10 -5
  23. package/dist/connections.d.ts.map +1 -1
  24. package/dist/connections.js +10 -5
  25. package/dist/docs/404.html +2 -2
  26. package/dist/docs/ab.html +4 -4
  27. package/dist/docs/assets/{app.CY2buaEE.js → app.Dh_JkJjI.js} +1 -1
  28. package/dist/docs/assets/chunks/@localSearchIndexroot.Er_R50vY.js +1 -0
  29. package/dist/docs/assets/chunks/{VPLocalSearchBox.Ix954SFJ.js → VPLocalSearchBox.CptQNLkR.js} +1 -1
  30. package/dist/docs/assets/chunks/{theme.PDwuJbyi.js → theme.DWflH-LQ.js} +2 -2
  31. package/dist/docs/assets/{deployment.md.DC5-ImcM.js → deployment.md.TecHo0_2.js} +3 -3
  32. package/dist/docs/assets/{deployment.md.DC5-ImcM.lean.js → deployment.md.TecHo0_2.lean.js} +1 -1
  33. package/dist/docs/assets/guides_mcp-oauth.md.DqmEOQY1.js +29 -0
  34. package/dist/docs/assets/guides_mcp-oauth.md.DqmEOQY1.lean.js +1 -0
  35. package/dist/docs/assets/{index.md.COiu-1jL.js → index.md.t0TM2Qzz.js} +3 -3
  36. package/dist/docs/assets/{index.md.COiu-1jL.lean.js → index.md.t0TM2Qzz.lean.js} +1 -1
  37. package/dist/docs/assets/{reference_cli.md.CjfiV2Q-.js → reference_cli.md.B74NrVzb.js} +3 -3
  38. package/dist/docs/assets/{reference_cli.md.CjfiV2Q-.lean.js → reference_cli.md.B74NrVzb.lean.js} +1 -1
  39. package/dist/docs/assets/{reference_connections.md.FbWupyzW.js → reference_connections.md.CsSr3rDz.js} +8 -3
  40. package/dist/docs/assets/{reference_connections.md.FbWupyzW.lean.js → reference_connections.md.CsSr3rDz.lean.js} +1 -1
  41. package/dist/docs/assets/reference_prompt.md.BaiweQxE.js +1 -0
  42. package/dist/docs/assets/reference_prompt.md.BaiweQxE.lean.js +1 -0
  43. package/dist/docs/assets/{reference_tools.md.CqgJroI0.js → reference_tools.md.BRSDnTbN.js} +16 -3
  44. package/dist/docs/assets/{reference_tools.md.CqgJroI0.lean.js → reference_tools.md.BRSDnTbN.lean.js} +1 -1
  45. package/dist/docs/assets/{troubleshooting.md.DkovjS7h.js → troubleshooting.md.CmQkmnzC.js} +1 -1
  46. package/dist/docs/assets/{troubleshooting.md.DkovjS7h.lean.js → troubleshooting.md.CmQkmnzC.lean.js} +1 -1
  47. package/dist/docs/building-with-agents.html +4 -4
  48. package/dist/docs/concepts.html +4 -4
  49. package/dist/docs/deployment.html +7 -7
  50. package/dist/docs/evals.html +4 -4
  51. package/dist/docs/example-agents/approval-buddy.html +4 -4
  52. package/dist/docs/example-agents/benny.html +4 -4
  53. package/dist/docs/example-agents/bugbot.html +4 -4
  54. package/dist/docs/example-agents/codebase-wiki.html +4 -4
  55. package/dist/docs/example-agents/codeowners-review.html +4 -4
  56. package/dist/docs/example-agents/concierge.html +4 -4
  57. package/dist/docs/example-agents/fsd.html +4 -4
  58. package/dist/docs/example-agents/index.html +4 -4
  59. package/dist/docs/example-agents/knowledge-base.html +4 -4
  60. package/dist/docs/example-agents/oncall.html +4 -4
  61. package/dist/docs/example-agents/security-reviewer.html +4 -4
  62. package/dist/docs/example-agents/slack-agent.html +4 -4
  63. package/dist/docs/example-agents/weather-agent.html +4 -4
  64. package/dist/docs/guides/agent-to-agent.html +4 -4
  65. package/dist/docs/guides/cloud-runtime.html +4 -4
  66. package/dist/docs/guides/github.html +4 -4
  67. package/dist/docs/guides/human-in-the-loop.html +4 -4
  68. package/dist/docs/guides/mcp-oauth.html +53 -0
  69. package/dist/docs/guides/slack.html +4 -4
  70. package/dist/docs/guides/webhooks.html +4 -4
  71. package/dist/docs/hashmap.json +1 -1
  72. package/dist/docs/hillclimbing.html +4 -4
  73. package/dist/docs/index.html +6 -6
  74. package/dist/docs/quickstart.html +4 -4
  75. package/dist/docs/reference/agent-config.html +4 -4
  76. package/dist/docs/reference/channels.html +4 -4
  77. package/dist/docs/reference/cli.html +6 -6
  78. package/dist/docs/reference/connections.html +12 -7
  79. package/dist/docs/reference/hooks.html +4 -4
  80. package/dist/docs/reference/http-api.html +4 -4
  81. package/dist/docs/reference/instructions.html +4 -4
  82. package/dist/docs/reference/playground.html +4 -4
  83. package/dist/docs/reference/project-layout.html +4 -4
  84. package/dist/docs/reference/prompt.html +33 -0
  85. package/dist/docs/reference/schedules.html +4 -4
  86. package/dist/docs/reference/sessions.html +4 -4
  87. package/dist/docs/reference/skills.html +5 -5
  88. package/dist/docs/reference/subagents.html +4 -4
  89. package/dist/docs/reference/tools.html +20 -7
  90. package/dist/docs/scaffolding-agents.html +4 -4
  91. package/dist/docs/storage.html +4 -4
  92. package/dist/docs/troubleshooting.html +5 -5
  93. package/dist/evals.d.ts +39 -0
  94. package/dist/evals.d.ts.map +1 -1
  95. package/dist/index.d.ts +3 -1
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +2 -1
  98. package/dist/internal/cli-mcp-oauth.d.ts +16 -0
  99. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -0
  100. package/dist/internal/cli-mcp-oauth.js +194 -0
  101. package/dist/internal/cli-mcp.d.ts +4 -1
  102. package/dist/internal/cli-mcp.d.ts.map +1 -1
  103. package/dist/internal/cli-mcp.js +19 -1
  104. package/dist/internal/cursor/account-mcp.d.ts +17 -4
  105. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  106. package/dist/internal/cursor/account-mcp.js +105 -17
  107. package/dist/internal/cursor-event-relay.d.ts +2 -0
  108. package/dist/internal/cursor-event-relay.d.ts.map +1 -1
  109. package/dist/internal/cursor-event-relay.js +3 -0
  110. package/dist/internal/discovery.d.ts.map +1 -1
  111. package/dist/internal/discovery.js +64 -10
  112. package/dist/internal/distribution.d.ts.map +1 -1
  113. package/dist/internal/distribution.js +1 -0
  114. package/dist/internal/json-dir-store.js +100 -0
  115. package/dist/internal/logs-client.js +1 -1
  116. package/dist/internal/mcp-host.d.ts.map +1 -1
  117. package/dist/internal/mcp-host.js +49 -26
  118. package/dist/internal/mcp-oauth.d.ts +88 -0
  119. package/dist/internal/mcp-oauth.d.ts.map +1 -0
  120. package/dist/internal/mcp-oauth.js +385 -0
  121. package/dist/internal/resolved-connections.d.ts.map +1 -1
  122. package/dist/internal/resolved-connections.js +4 -1
  123. package/dist/internal/sdk-runner.d.ts +9 -0
  124. package/dist/internal/sdk-runner.d.ts.map +1 -1
  125. package/dist/internal/sdk-runner.js +28 -2
  126. package/dist/internal/server.d.ts.map +1 -1
  127. package/dist/internal/server.js +13 -5
  128. package/dist/internal/session-engine.d.ts +7 -9
  129. package/dist/internal/session-engine.d.ts.map +1 -1
  130. package/dist/internal/session-engine.js +96 -64
  131. package/dist/internal/sessions-client.d.ts.map +1 -1
  132. package/dist/internal/sessions-client.js +2 -1
  133. package/dist/internal/stream-progress.d.ts.map +1 -1
  134. package/dist/internal/stream-progress.js +8 -4
  135. package/dist/internal/turn-governor.d.ts +54 -0
  136. package/dist/internal/turn-governor.d.ts.map +1 -0
  137. package/dist/internal/turn-governor.js +111 -0
  138. package/dist/playground/assets/index-1dzluIcW.js +86 -0
  139. package/dist/playground/assets/index-kZjeJs1v.css +1 -0
  140. package/dist/playground/index.html +2 -2
  141. package/dist/prompt.d.ts +39 -0
  142. package/dist/prompt.d.ts.map +1 -0
  143. package/dist/prompt.js +70 -0
  144. package/dist/types.d.ts +78 -5
  145. package/dist/types.d.ts.map +1 -1
  146. package/dist/types.js +6 -0
  147. package/docs/README.md +4 -0
  148. package/docs/deployment.md +6 -1
  149. package/docs/guides/mcp-oauth.md +157 -0
  150. package/docs/reference/cli.md +28 -0
  151. package/docs/reference/connections.md +28 -0
  152. package/docs/reference/prompt.md +47 -0
  153. package/docs/reference/tools.md +21 -0
  154. package/docs/troubleshooting.md +11 -0
  155. package/package.json +9 -2
  156. package/skills/create-agent/SKILL.md +7 -3
  157. package/skills/framework-map/SKILL.md +1 -0
  158. package/skills/mcp-auth/SKILL.md +138 -0
  159. package/src/bin/agent-serve.ts +20 -3
  160. package/src/channels/github/github-channel.ts +2 -0
  161. package/src/channels/github/types.ts +4 -0
  162. package/src/channels/slack/cursor-account.ts +2 -0
  163. package/src/channels/slack/dispatch.ts +49 -0
  164. package/src/channels/slack/eval-directive.ts +348 -0
  165. package/src/channels/slack/index.ts +1 -0
  166. package/src/channels/slack/slack-channel.ts +3 -0
  167. package/src/channels/slack/types.ts +7 -0
  168. package/src/connections.ts +10 -5
  169. package/src/evals.ts +43 -0
  170. package/src/index.ts +3 -0
  171. package/src/internal/cli-mcp-oauth.ts +254 -0
  172. package/src/internal/cli-mcp.ts +25 -2
  173. package/src/internal/cursor/account-mcp.ts +153 -41
  174. package/src/internal/cursor-event-relay.ts +5 -0
  175. package/src/internal/discovery.ts +70 -8
  176. package/src/internal/distribution.ts +1 -0
  177. package/src/internal/logs-client.ts +1 -1
  178. package/src/internal/mcp-host.ts +33 -9
  179. package/src/internal/mcp-oauth.ts +496 -0
  180. package/src/internal/resolved-connections.ts +6 -1
  181. package/src/internal/sdk-runner.ts +37 -1
  182. package/src/internal/server.ts +13 -5
  183. package/src/internal/session-engine.ts +115 -74
  184. package/src/internal/sessions-client.ts +2 -1
  185. package/src/internal/stream-progress.ts +8 -0
  186. package/src/internal/turn-governor.ts +145 -0
  187. package/src/prompt.ts +83 -0
  188. package/src/types.ts +76 -6
  189. package/dist/channels/slack/post-update-delivery.d.ts +0 -85
  190. package/dist/channels/slack/post-update-delivery.d.ts.map +0 -1
  191. package/dist/docs/assets/chunks/@localSearchIndexroot.OfDZ5CXg.js +0 -1
  192. package/dist/internal/persistence-coordinator.d.ts +0 -127
  193. package/dist/internal/persistence-coordinator.d.ts.map +0 -1
  194. package/dist/persistence.d.ts +0 -184
  195. package/dist/persistence.d.ts.map +0 -1
  196. package/dist/playground/assets/index-C0-QEG4O.js +0 -86
  197. package/dist/playground/assets/index-z3JY9O2x.css +0 -1
@@ -0,0 +1,86 @@
1
+ function sz(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function rh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xg={exports:{}},Nu={};var Rw;function oz(){if(Rw)return Nu;Rw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return Nu.Fragment=t,Nu.jsx=n,Nu.jsxs=n,Nu}var Cw;function az(){return Cw||(Cw=1,Xg.exports=oz()),Xg.exports}var v=az(),Qg={exports:{}},Et={};var Aw;function lz(){if(Aw)return Et;Aw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function y(B){return B===null||typeof B!="object"?null:(B=g&&B[g]||B["@@iterator"],typeof B=="function"?B:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,T={};function E(B,G,O){this.props=B,this.context=G,this.refs=T,this.updater=O||k}E.prototype.isReactComponent={},E.prototype.setState=function(B,G){if(typeof B!="object"&&typeof B!="function"&&B!=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,G,"setState")},E.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function R(){}R.prototype=E.prototype;function _(B,G,O){this.props=B,this.context=G,this.refs=T,this.updater=O||k}var C=_.prototype=new R;C.constructor=_,S(C,E.prototype),C.isPureReactComponent=!0;var A=Array.isArray;function N(){}var I={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function H(B,G,O){var ie=O.ref;return{$$typeof:e,type:B,key:G,ref:ie!==void 0?ie:null,props:O}}function L(B,G){return H(B.type,G,B.props)}function Z(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function K(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(O){return G[O]})}var q=/\/+/g;function z(B,G){return typeof B=="object"&&B!==null&&B.key!=null?K(""+B.key):G.toString(36)}function j(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(N,N):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function F(B,G,O,ie,te){var ne=typeof B;(ne==="undefined"||ne==="boolean")&&(B=null);var le=!1;if(B===null)le=!0;else switch(ne){case"bigint":case"string":case"number":le=!0;break;case"object":switch(B.$$typeof){case e:case t:le=!0;break;case h:return le=B._init,F(le(B._payload),G,O,ie,te)}}if(le)return te=te(B),le=ie===""?"."+z(B,0):ie,A(te)?(O="",le!=null&&(O=le.replace(q,"$&/")+"/"),F(te,G,O,"",function(Se){return Se})):te!=null&&(Z(te)&&(te=L(te,O+(te.key==null||B&&B.key===te.key?"":(""+te.key).replace(q,"$&/")+"/")+le)),G.push(te)),1;le=0;var pe=ie===""?".":ie+":";if(A(B))for(var ye=0;ye<B.length;ye++)ie=B[ye],ne=pe+z(ie,ye),le+=F(ie,G,O,ne,te);else if(ye=y(B),typeof ye=="function")for(B=ye.call(B),ye=0;!(ie=B.next()).done;)ie=ie.value,ne=pe+z(ie,ye++),le+=F(ie,G,O,ne,te);else if(ne==="object"){if(typeof B.then=="function")return F(j(B),G,O,ie,te);throw G=String(B),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return le}function U(B,G,O){if(B==null)return B;var ie=[],te=0;return F(B,ie,"","",function(ne){return G.call(O,ne,te++)}),ie}function P(B){if(B._status===-1){var G=B._result;G=G(),G.then(function(O){(B._status===0||B._status===-1)&&(B._status=1,B._result=O)},function(O){(B._status===0||B._status===-1)&&(B._status=2,B._result=O)}),B._status===-1&&(B._status=0,B._result=G)}if(B._status===1)return B._result.default;throw B._result}var W=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},D={map:U,forEach:function(B,G,O){U(B,function(){G.apply(this,arguments)},O)},count:function(B){var G=0;return U(B,function(){G++}),G},toArray:function(B){return U(B,function(G){return G})||[]},only:function(B){if(!Z(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Et.Activity=m,Et.Children=D,Et.Component=E,Et.Fragment=n,Et.Profiler=s,Et.PureComponent=_,Et.StrictMode=r,Et.Suspense=d,Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Et.__COMPILER_RUNTIME={__proto__:null,c:function(B){return I.H.useMemoCache(B)}},Et.cache=function(B){return function(){return B.apply(null,arguments)}},Et.cacheSignal=function(){return null},Et.cloneElement=function(B,G,O){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ie=S({},B.props),te=B.key;if(G!=null)for(ne in G.key!==void 0&&(te=""+G.key),G)!$.call(G,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&G.ref===void 0||(ie[ne]=G[ne]);var ne=arguments.length-2;if(ne===1)ie.children=O;else if(1<ne){for(var le=Array(ne),pe=0;pe<ne;pe++)le[pe]=arguments[pe+2];ie.children=le}return H(B.type,te,ie)},Et.createContext=function(B){return B={$$typeof:l,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:a,_context:B},B},Et.createElement=function(B,G,O){var ie,te={},ne=null;if(G!=null)for(ie in G.key!==void 0&&(ne=""+G.key),G)$.call(G,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(te[ie]=G[ie]);var le=arguments.length-2;if(le===1)te.children=O;else if(1<le){for(var pe=Array(le),ye=0;ye<le;ye++)pe[ye]=arguments[ye+2];te.children=pe}if(B&&B.defaultProps)for(ie in le=B.defaultProps,le)te[ie]===void 0&&(te[ie]=le[ie]);return H(B,ne,te)},Et.createRef=function(){return{current:null}},Et.forwardRef=function(B){return{$$typeof:c,render:B}},Et.isValidElement=Z,Et.lazy=function(B){return{$$typeof:h,_payload:{_status:-1,_result:B},_init:P}},Et.memo=function(B,G){return{$$typeof:p,type:B,compare:G===void 0?null:G}},Et.startTransition=function(B){var G=I.T,O={};I.T=O;try{var ie=B(),te=I.S;te!==null&&te(O,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(N,W)}catch(ne){W(ne)}finally{G!==null&&O.types!==null&&(G.types=O.types),I.T=G}},Et.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Et.use=function(B){return I.H.use(B)},Et.useActionState=function(B,G,O){return I.H.useActionState(B,G,O)},Et.useCallback=function(B,G){return I.H.useCallback(B,G)},Et.useContext=function(B){return I.H.useContext(B)},Et.useDebugValue=function(){},Et.useDeferredValue=function(B,G){return I.H.useDeferredValue(B,G)},Et.useEffect=function(B,G){return I.H.useEffect(B,G)},Et.useEffectEvent=function(B){return I.H.useEffectEvent(B)},Et.useId=function(){return I.H.useId()},Et.useImperativeHandle=function(B,G,O){return I.H.useImperativeHandle(B,G,O)},Et.useInsertionEffect=function(B,G){return I.H.useInsertionEffect(B,G)},Et.useLayoutEffect=function(B,G){return I.H.useLayoutEffect(B,G)},Et.useMemo=function(B,G){return I.H.useMemo(B,G)},Et.useOptimistic=function(B,G){return I.H.useOptimistic(B,G)},Et.useReducer=function(B,G,O){return I.H.useReducer(B,G,O)},Et.useRef=function(B){return I.H.useRef(B)},Et.useState=function(B){return I.H.useState(B)},Et.useSyncExternalStore=function(B,G,O){return I.H.useSyncExternalStore(B,G,O)},Et.useTransition=function(){return I.H.useTransition()},Et.version="19.2.6",Et}var Nw;function Dc(){return Nw||(Nw=1,Qg.exports=lz()),Qg.exports}var x=Dc();const Gu=rh(x),ih=sz({__proto__:null,default:Gu},[x]);var Jg={exports:{}},Ou={},eb={exports:{}},tb={};var Ow;function uz(){return Ow||(Ow=1,(function(e){function t(F,U){var P=F.length;F.push(U);e:for(;0<P;){var W=P-1>>>1,D=F[W];if(0<s(D,U))F[W]=U,F[P]=D,P=W;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var U=F[0],P=F.pop();if(P!==U){F[0]=P;e:for(var W=0,D=F.length,B=D>>>1;W<B;){var G=2*(W+1)-1,O=F[G],ie=G+1,te=F[ie];if(0>s(O,P))ie<D&&0>s(te,O)?(F[W]=te,F[ie]=P,W=ie):(F[W]=O,F[G]=P,W=G);else if(ie<D&&0>s(te,P))F[W]=te,F[ie]=P,W=ie;else break e}}return U}function s(F,U){var P=F.sortIndex-U.sortIndex;return P!==0?P:F.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],p=[],h=1,m=null,g=3,y=!1,k=!1,S=!1,T=!1,E=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function C(F){for(var U=n(p);U!==null;){if(U.callback===null)r(p);else if(U.startTime<=F)r(p),U.sortIndex=U.expirationTime,t(d,U);else break;U=n(p)}}function A(F){if(S=!1,C(F),!k)if(n(d)!==null)k=!0,N||(N=!0,K());else{var U=n(p);U!==null&&j(A,U.startTime-F)}}var N=!1,I=-1,$=5,H=-1;function L(){return T?!0:!(e.unstable_now()-H<$)}function Z(){if(T=!1,N){var F=e.unstable_now();H=F;var U=!0;try{e:{k=!1,S&&(S=!1,R(I),I=-1),y=!0;var P=g;try{t:{for(C(F),m=n(d);m!==null&&!(m.expirationTime>F&&L());){var W=m.callback;if(typeof W=="function"){m.callback=null,g=m.priorityLevel;var D=W(m.expirationTime<=F);if(F=e.unstable_now(),typeof D=="function"){m.callback=D,C(F),U=!0;break t}m===n(d)&&r(d),C(F)}else r(d);m=n(d)}if(m!==null)U=!0;else{var B=n(p);B!==null&&j(A,B.startTime-F),U=!1}}break e}finally{m=null,g=P,y=!1}U=void 0}}finally{U?K():N=!1}}}var K;if(typeof _=="function")K=function(){_(Z)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,z=q.port2;q.port1.onmessage=Z,K=function(){z.postMessage(null)}}else K=function(){E(Z,0)};function j(F,U){I=E(function(){F(e.unstable_now())},U)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var P=g;g=U;try{return F()}finally{g=P}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(F,U){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var P=g;g=F;try{return U()}finally{g=P}},e.unstable_scheduleCallback=function(F,U,P){var W=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?W+P:W):P=W,F){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=P+D,F={id:h++,callback:U,priorityLevel:F,startTime:P,expirationTime:D,sortIndex:-1},P>W?(F.sortIndex=P,t(p,F),n(d)===null&&F===n(p)&&(S?(R(I),I=-1):S=!0,j(A,P-W))):(F.sortIndex=D,t(d,F),k||y||(k=!0,N||(N=!0,K()))),F},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(F){var U=g;return function(){var P=g;g=U;try{return F.apply(this,arguments)}finally{g=P}}}})(tb)),tb}var Mw;function cz(){return Mw||(Mw=1,eb.exports=uz()),eb.exports}var nb={exports:{}},lr={};var Iw;function fz(){if(Iw)return lr;Iw=1;var e=Dc();function t(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)p+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+d+"; visit "+p+" 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},s=Symbol.for("react.portal");function a(d,p,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:p,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return lr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,lr.createPortal=function(d,p){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return a(d,p,null,h)},lr.flushSync=function(d){var p=l.T,h=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=p,r.p=h,r.d.f()}},lr.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(d,p))},lr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},lr.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var h=p.as,m=c(h,p.crossOrigin),g=typeof p.integrity=="string"?p.integrity:void 0,y=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;h==="style"?r.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:y}):h==="script"&&r.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:y,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},lr.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var h=c(p.as,p.crossOrigin);r.d.M(d,{crossOrigin:h,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(d)},lr.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var h=p.as,m=c(h,p.crossOrigin);r.d.L(d,h,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},lr.preloadModule=function(d,p){if(typeof d=="string")if(p){var h=c(p.as,p.crossOrigin);r.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:h,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(d)},lr.requestFormReset=function(d){r.d.r(d)},lr.unstable_batchedUpdates=function(d,p){return d(p)},lr.useFormState=function(d,p,h){return l.H.useFormState(d,p,h)},lr.useFormStatus=function(){return l.H.useHostTransitionStatus()},lr.version="19.2.6",lr}var Dw;function q_(){if(Dw)return nb.exports;Dw=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(),nb.exports=fz(),nb.exports}var zw;function dz(){if(zw)return Ou;zw=1;var e=cz(),t=Dc(),n=q_();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(a(i)!==i)throw Error(r(188))}function p(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,f=o;;){var b=u.return;if(b===null)break;var w=b.alternate;if(w===null){if(f=b.return,f!==null){u=f;continue}break}if(b.child===w.child){for(w=b.child;w;){if(w===u)return d(b),i;if(w===f)return d(b),o;w=w.sibling}throw Error(r(188))}if(u.return!==f.return)u=b,f=w;else{for(var M=!1,V=b.child;V;){if(V===u){M=!0,u=b,f=w;break}if(V===f){M=!0,f=b,u=w;break}V=V.sibling}if(!M){for(V=w.child;V;){if(V===u){M=!0,u=w,f=b;break}if(V===f){M=!0,f=w,u=b;break}V=V.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==f)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:o}function h(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=h(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function K(i){return i===null||typeof i!="object"?null:(i=Z&&i[Z]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case T:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList";case H:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case _:return i.displayName||"Context";case R:return(i._context.displayName||"Context")+".Consumer";case C:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return o=i.displayName||null,o!==null?o:z(i.type)||"Memo";case $:o=i._payload,i=i._init;try{return z(i(o))}catch{}}return null}var j=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},W=[],D=-1;function B(i){return{current:i}}function G(i){0>D||(i.current=W[D],W[D]=null,D--)}function O(i,o){D++,W[D]=i.current,i.current=o}var ie=B(null),te=B(null),ne=B(null),le=B(null);function pe(i,o){switch(O(ne,o),O(te,i),O(ie,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?YS(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=YS(o),i=XS(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(ie),O(ie,i)}function ye(){G(ie),G(te),G(ne)}function Se(i){i.memoizedState!==null&&O(le,i);var o=ie.current,u=XS(o,i.type);o!==u&&(O(te,i),O(ie,u))}function ze(i){te.current===i&&(G(ie),G(te)),le.current===i&&(G(le),_u._currentValue=P)}var he,Te;function Re(i){if(he===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);he=o&&o[1]||"",Te=-1<u.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+he+i+Te}var Oe=!1;function ve(i,o){if(!i||Oe)return"";Oe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(o){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(be){var me=be}Reflect.construct(i,[],Ae)}else{try{Ae.call()}catch(be){me=be}i.call(Ae.prototype)}}else{try{throw Error()}catch(be){me=be}(Ae=i())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(be){if(be&&me&&typeof be.stack=="string")return[be.stack,me.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=f.DetermineComponentFrameRoot(),M=w[0],V=w[1];if(M&&V){var Q=M.split(`
4
+ `),de=V.split(`
5
+ `);for(b=f=0;f<Q.length&&!Q[f].includes("DetermineComponentFrameRoot");)f++;for(;b<de.length&&!de[b].includes("DetermineComponentFrameRoot");)b++;if(f===Q.length||b===de.length)for(f=Q.length-1,b=de.length-1;1<=f&&0<=b&&Q[f]!==de[b];)b--;for(;1<=f&&0<=b;f--,b--)if(Q[f]!==de[b]){if(f!==1||b!==1)do if(f--,b--,0>b||Q[f]!==de[b]){var ke=`
6
+ `+Q[f].replace(" at new "," at ");return i.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",i.displayName)),ke}while(1<=f&&0<=b);break}}}finally{Oe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Re(u):""}function xe(i,o){switch(i.tag){case 26:case 27:case 5:return Re(i.type);case 16:return Re("Lazy");case 13:return i.child!==o&&o!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return ve(i.type,!1);case 11:return ve(i.type.render,!1);case 1:return ve(i.type,!0);case 31:return Re("Activity");default:return""}}function Me(i){try{var o="",u=null;do o+=xe(i,u),u=i,i=i.return;while(i);return o}catch(f){return`
7
+ Error generating stack: `+f.message+`
8
+ `+f.stack}}var Ce=Object.prototype.hasOwnProperty,Pe=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,ce=e.unstable_shouldYield,oe=e.unstable_requestPaint,re=e.unstable_now,_e=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,Ue=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,Ye=e.log,ot=e.unstable_setDisableYieldValue,it=null,nt=null;function vt(i){if(typeof Ye=="function"&&ot(i),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(it,i)}catch{}}var st=Math.clz32?Math.clz32:Ot,xt=Math.log,We=Math.LN2;function Ot(i){return i>>>=0,i===0?32:31-(xt(i)/We|0)|0}var Be=256,Ke=262144,ht=4194304;function Xe(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Y(i,o,u){var f=i.pendingLanes;if(f===0)return 0;var b=0,w=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var V=f&134217727;return V!==0?(f=V&~w,f!==0?b=Xe(f):(M&=V,M!==0?b=Xe(M):u||(u=V&~i,u!==0&&(b=Xe(u))))):(V=f&~w,V!==0?b=Xe(V):M!==0?b=Xe(M):u||(u=f&~i,u!==0&&(b=Xe(u)))),b===0?0:o!==0&&o!==b&&(o&w)===0&&(w=b&-b,u=o&-o,w>=u||w===32&&(u&4194048)!==0)?o:b}function X(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function we(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Ge(){var i=ht;return ht<<=1,(ht&62914560)===0&&(ht=4194304),i}function lt(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function St(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function $e(i,o,u,f,b,w){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var V=i.entanglements,Q=i.expirationTimes,de=i.hiddenUpdates;for(u=M&~u;0<u;){var ke=31-st(u),Ae=1<<ke;V[ke]=0,Q[ke]=-1;var me=de[ke];if(me!==null)for(de[ke]=null,ke=0;ke<me.length;ke++){var be=me[ke];be!==null&&(be.lane&=-536870913)}u&=~Ae}f!==0&&Le(i,f,0),w!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=w&~(M&~o))}function Le(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var f=31-st(o);i.entangledLanes|=o,i.entanglements[f]=i.entanglements[f]|1073741824|u&261930}function qe(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var f=31-st(u),b=1<<f;b&o|i[f]&o&&(i[f]|=o),u&=~b}}function Wt(i,o){var u=o&-o;return u=(u&42)!==0?1:tt(u),(u&(i.suspendedLanes|o))!==0?0:u}function tt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Dt(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Kn(){var i=U.p;return i!==0?i:(i=window.event,i===void 0?32:xw(i.type))}function Qn(i,o){var u=U.p;try{return U.p=i,o()}finally{U.p=u}}var _n=Math.random().toString(36).slice(2),an="__reactFiber$"+_n,Jn="__reactProps$"+_n,Gi="__reactContainer$"+_n,jl="__reactEvents$"+_n,sf="__reactListeners$"+_n,pa="__reactHandles$"+_n,of="__reactResources$"+_n,ko="__reactMarker$"+_n;function Pl(i){delete i[an],delete i[Jn],delete i[jl],delete i[sf],delete i[pa]}function yr(i){var o=i[an];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Gi]||u[an]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=iw(i);i!==null;){if(u=i[an])return u;i=iw(i)}return o}i=u,u=i.parentNode}return null}function Vi(i){if(i=i[an]||i[Gi]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function Cs(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function As(i){var o=i[of];return o||(o=i[of]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function zn(i){i[ko]=!0}var af=new Set,So={};function Ki(i,o){De(i,o),De(i+"Capture",o)}function De(i,o){for(So[i]=o,i=0;i<o.length;i++)af.add(o[i])}var at=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Mt={},Yt={};function On(i){return Ce.call(Yt,i)?!0:Ce.call(Mt,i)?!1:at.test(i)?Yt[i]=!0:(Mt[i]=!0,!1)}function ar(i,o,u){if(On(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var f=o.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function $r(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function Tr(i,o,u,f){if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+f)}}function cn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Br(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function lf(i,o,u){var f=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var b=f.get,w=f.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,w.call(this,M)}}),Object.defineProperty(i,o,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function ha(i){if(!i._valueTracker){var o=Br(i)?"checked":"value";i._valueTracker=lf(i,o,""+i[o])}}function $l(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return i&&(f=Br(i)?i.checked?"true":"false":i.value),i=f,i!==u?(o.setValue(i),!0):!1}function ma(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Yh=/[\n"\\]/g;function _r(i){return i.replace(Yh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Bl(i,o,u,f,b,w,M,V){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),o!=null?M==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+cn(o)):i.value!==""+cn(o)&&(i.value=""+cn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?ga(i,M,cn(o)):u!=null?ga(i,M,cn(u)):f!=null&&i.removeAttribute("value"),b==null&&w!=null&&(i.defaultChecked=!!w),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?i.name=""+cn(V):i.removeAttribute("name")}function wo(i,o,u,f,b,w,M,V){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),o!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){ha(i);return}u=u!=null?""+cn(u):"",o=o!=null?""+cn(o):u,V||o===i.value||(i.value=o),i.defaultValue=o}f=f??b,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=V?i.checked:!!f,i.defaultChecked=!!f,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ha(i)}function ga(i,o,u){o==="number"&&ma(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function er(i,o,u,f){if(i=i.options,o){o={};for(var b=0;b<u.length;b++)o["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=o.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&f&&(i[u].defaultSelected=!0)}else{for(u=""+cn(u),o=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,f&&(i[b].defaultSelected=!0);return}o!==null||i[b].disabled||(o=i[b])}o!==null&&(o.selected=!0)}}function uf(i,o,u){if(o!=null&&(o=""+cn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+cn(u):""}function ba(i,o,u,f){if(o==null){if(f!=null){if(u!=null)throw Error(r(92));if(j(f)){if(1<f.length)throw Error(r(93));f=f[0]}u=f}u==null&&(u=""),o=u}u=cn(o),i.defaultValue=u,f=i.textContent,f===u&&f!==""&&f!==null&&(i.value=f),ha(i)}function mt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var cf=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 Ln(i,o,u){var f=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":f?i.setProperty(o,u):typeof u!="number"||u===0||cf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function Xt(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||o!=null&&o.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var b in o)f=o[b],o.hasOwnProperty(b)&&u[b]!==f&&Ln(i,b,f)}else for(var w in o)o.hasOwnProperty(w)&&Ln(i,w,o[w])}function Ns(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zi=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"]]),Fl=/^[\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 Os(i){return Fl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Fe(){}var Je=null;function Tt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Pt=null,Sn=null;function Jr(i){var o=Vi(i);if(o&&(i=o.stateNode)){var u=i[Jn]||null;e:switch(i=o.stateNode,o.type){case"input":if(Bl(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+_r(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==i&&f.form===i.form){var b=f[Jn]||null;if(!b)throw Error(r(90));Bl(f,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(o=0;o<u.length;o++)f=u[o],f.form===i.form&&$l(f)}break e;case"textarea":uf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&er(i,!!u.multiple,o,!1)}}}var Ul=!1;function ff(i,o,u){if(Ul)return i(o,u);Ul=!0;try{var f=i(o);return f}finally{if(Ul=!1,(Pt!==null||Sn!==null)&&(Qf(),Pt&&(o=Pt,i=Sn,Sn=Pt=null,Jr(o),i)))for(o=0;o<i.length;o++)Jr(i[o])}}function ql(i,o){var u=i.stateNode;if(u===null)return null;var f=u[Jn]||null;if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var Wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xh=!1;if(Wi)try{var Hl={};Object.defineProperty(Hl,"passive",{get:function(){Xh=!0}}),window.addEventListener("test",Hl,Hl),window.removeEventListener("test",Hl,Hl)}catch{Xh=!1}var Ms=null,Qh=null,df=null;function Xx(){if(df)return df;var i,o=Qh,u=o.length,f,b="value"in Ms?Ms.value:Ms.textContent,w=b.length;for(i=0;i<u&&o[i]===b[i];i++);var M=u-i;for(f=1;f<=M&&o[u-f]===b[w-f];f++);return df=b.slice(i,1<f?1-f:void 0)}function pf(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function hf(){return!0}function Qx(){return!1}function Rr(i){function o(u,f,b,w,M){this._reactName=u,this._targetInst=b,this.type=f,this.nativeEvent=w,this.target=M,this.currentTarget=null;for(var V in i)i.hasOwnProperty(V)&&(u=i[V],this[V]=u?u(w):w[V]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?hf:Qx,this.isPropagationStopped=Qx,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=hf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=hf)},persist:function(){},isPersistent:hf}),o}var Eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mf=Rr(Eo),Gl=m({},Eo,{view:0,detail:0}),rI=Rr(Gl),Jh,em,Vl,gf=m({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nm,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Vl&&(Vl&&i.type==="mousemove"?(Jh=i.screenX-Vl.screenX,em=i.screenY-Vl.screenY):em=Jh=0,Vl=i),Jh)},movementY:function(i){return"movementY"in i?i.movementY:em}}),Jx=Rr(gf),iI=m({},gf,{dataTransfer:0}),sI=Rr(iI),oI=m({},Gl,{relatedTarget:0}),tm=Rr(oI),aI=m({},Eo,{animationName:0,elapsedTime:0,pseudoElement:0}),lI=Rr(aI),uI=m({},Eo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),cI=Rr(uI),fI=m({},Eo,{data:0}),ek=Rr(fI),dI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pI={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"},hI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mI(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=hI[i])?!!o[i]:!1}function nm(){return mI}var gI=m({},Gl,{key:function(i){if(i.key){var o=dI[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=pf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?pI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nm,charCode:function(i){return i.type==="keypress"?pf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?pf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),bI=Rr(gI),yI=m({},gf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tk=Rr(yI),vI=m({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nm}),xI=Rr(vI),kI=m({},Eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),SI=Rr(kI),wI=m({},gf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),EI=Rr(wI),TI=m({},Eo,{newState:0,oldState:0}),_I=Rr(TI),RI=[9,13,27,32],rm=Wi&&"CompositionEvent"in window,Kl=null;Wi&&"documentMode"in document&&(Kl=document.documentMode);var CI=Wi&&"TextEvent"in window&&!Kl,nk=Wi&&(!rm||Kl&&8<Kl&&11>=Kl),rk=" ",ik=!1;function sk(i,o){switch(i){case"keyup":return RI.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ok(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ya=!1;function AI(i,o){switch(i){case"compositionend":return ok(o);case"keypress":return o.which!==32?null:(ik=!0,rk);case"textInput":return i=o.data,i===rk&&ik?null:i;default:return null}}function NI(i,o){if(ya)return i==="compositionend"||!rm&&sk(i,o)?(i=Xx(),df=Qh=Ms=null,ya=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return nk&&o.locale!=="ko"?null:o.data;default:return null}}var OI={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 ak(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!OI[i.type]:o==="textarea"}function lk(i,o,u,f){Pt?Sn?Sn.push(f):Sn=[f]:Pt=f,o=sd(o,"onChange"),0<o.length&&(u=new mf("onChange","change",null,u,f),i.push({event:u,listeners:o}))}var Zl=null,Wl=null;function MI(i){HS(i,0)}function bf(i){var o=Cs(i);if($l(o))return i}function uk(i,o){if(i==="change")return o}var ck=!1;if(Wi){var im;if(Wi){var sm="oninput"in document;if(!sm){var fk=document.createElement("div");fk.setAttribute("oninput","return;"),sm=typeof fk.oninput=="function"}im=sm}else im=!1;ck=im&&(!document.documentMode||9<document.documentMode)}function dk(){Zl&&(Zl.detachEvent("onpropertychange",pk),Wl=Zl=null)}function pk(i){if(i.propertyName==="value"&&bf(Wl)){var o=[];lk(o,Wl,i,Tt(i)),ff(MI,o)}}function II(i,o,u){i==="focusin"?(dk(),Zl=o,Wl=u,Zl.attachEvent("onpropertychange",pk)):i==="focusout"&&dk()}function DI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return bf(Wl)}function zI(i,o){if(i==="click")return bf(o)}function LI(i,o){if(i==="input"||i==="change")return bf(o)}function jI(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Fr=typeof Object.is=="function"?Object.is:jI;function Yl(i,o){if(Fr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var b=u[f];if(!Ce.call(o,b)||!Fr(i[b],o[b]))return!1}return!0}function hk(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function mk(i,o){var u=hk(i);i=0;for(var f;u;){if(u.nodeType===3){if(f=i+u.textContent.length,i<=o&&f>=o)return{node:u,offset:o-i};i=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=hk(u)}}function gk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?gk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function bk(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ma(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=ma(i.document)}return o}function om(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var PI=Wi&&"documentMode"in document&&11>=document.documentMode,va=null,am=null,Xl=null,lm=!1;function yk(i,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;lm||va==null||va!==ma(f)||(f=va,"selectionStart"in f&&om(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Xl&&Yl(Xl,f)||(Xl=f,f=sd(am,"onSelect"),0<f.length&&(o=new mf("onSelect","select",null,o,u),i.push({event:o,listeners:f}),o.target=va)))}function To(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var xa={animationend:To("Animation","AnimationEnd"),animationiteration:To("Animation","AnimationIteration"),animationstart:To("Animation","AnimationStart"),transitionrun:To("Transition","TransitionRun"),transitionstart:To("Transition","TransitionStart"),transitioncancel:To("Transition","TransitionCancel"),transitionend:To("Transition","TransitionEnd")},um={},vk={};Wi&&(vk=document.createElement("div").style,"AnimationEvent"in window||(delete xa.animationend.animation,delete xa.animationiteration.animation,delete xa.animationstart.animation),"TransitionEvent"in window||delete xa.transitionend.transition);function _o(i){if(um[i])return um[i];if(!xa[i])return i;var o=xa[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in vk)return um[i]=o[u];return i}var xk=_o("animationend"),kk=_o("animationiteration"),Sk=_o("animationstart"),$I=_o("transitionrun"),BI=_o("transitionstart"),FI=_o("transitioncancel"),wk=_o("transitionend"),Ek=new Map,cm="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(" ");cm.push("scrollEnd");function bi(i,o){Ek.set(i,o),Ki(o,[i])}var yf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ei=[],ka=0,fm=0;function vf(){for(var i=ka,o=fm=ka=0;o<i;){var u=ei[o];ei[o++]=null;var f=ei[o];ei[o++]=null;var b=ei[o];ei[o++]=null;var w=ei[o];if(ei[o++]=null,f!==null&&b!==null){var M=f.pending;M===null?b.next=b:(b.next=M.next,M.next=b),f.pending=b}w!==0&&Tk(u,b,w)}}function xf(i,o,u,f){ei[ka++]=i,ei[ka++]=o,ei[ka++]=u,ei[ka++]=f,fm|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function dm(i,o,u,f){return xf(i,o,u,f),kf(i)}function Ro(i,o){return xf(i,null,null,o),kf(i)}function Tk(i,o,u){i.lanes|=u;var f=i.alternate;f!==null&&(f.lanes|=u);for(var b=!1,w=i.return;w!==null;)w.childLanes|=u,f=w.alternate,f!==null&&(f.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(b=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,b&&o!==null&&(b=31-st(u),i=w.hiddenUpdates,f=i[b],f===null?i[b]=[o]:f.push(o),o.lane=u|536870912),w):null}function kf(i){if(50<vu)throw vu=0,kg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Sa={};function UI(i,o,u,f){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(i,o,u,f){return new UI(i,o,u,f)}function pm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Yi(i,o){var u=i.alternate;return u===null?(u=Ur(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function _k(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Sf(i,o,u,f,b,w){var M=0;if(f=i,typeof i=="function")pm(i)&&(M=1);else if(typeof i=="string")M=KD(i,u,ie.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case H:return i=Ur(31,u,o,b),i.elementType=H,i.lanes=w,i;case S:return Co(u.children,b,w,o);case T:M=8,b|=24;break;case E:return i=Ur(12,u,o,b|2),i.elementType=E,i.lanes=w,i;case A:return i=Ur(13,u,o,b),i.elementType=A,i.lanes=w,i;case N:return i=Ur(19,u,o,b),i.elementType=N,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case _:M=10;break e;case R:M=9;break e;case C:M=11;break e;case I:M=14;break e;case $:M=16,f=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),f=null}return o=Ur(M,u,o,b),o.elementType=i,o.type=f,o.lanes=w,o}function Co(i,o,u,f){return i=Ur(7,i,f,o),i.lanes=u,i}function hm(i,o,u){return i=Ur(6,i,null,o),i.lanes=u,i}function Rk(i){var o=Ur(18,null,null,0);return o.stateNode=i,o}function mm(i,o,u){return o=Ur(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var Ck=new WeakMap;function ti(i,o){if(typeof i=="object"&&i!==null){var u=Ck.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Me(o)},Ck.set(i,o),o)}return{value:i,source:o,stack:Me(o)}}var wa=[],Ea=0,wf=null,Ql=0,ni=[],ri=0,Is=null,Ai=1,Ni="";function Xi(i,o){wa[Ea++]=Ql,wa[Ea++]=wf,wf=i,Ql=o}function Ak(i,o,u){ni[ri++]=Ai,ni[ri++]=Ni,ni[ri++]=Is,Is=i;var f=Ai;i=Ni;var b=32-st(f)-1;f&=~(1<<b),u+=1;var w=32-st(o)+b;if(30<w){var M=b-b%5;w=(f&(1<<M)-1).toString(32),f>>=M,b-=M,Ai=1<<32-st(o)+b|u<<b|f,Ni=w+i}else Ai=1<<w|u<<b|f,Ni=i}function gm(i){i.return!==null&&(Xi(i,1),Ak(i,1,0))}function bm(i){for(;i===wf;)wf=wa[--Ea],wa[Ea]=null,Ql=wa[--Ea],wa[Ea]=null;for(;i===Is;)Is=ni[--ri],ni[ri]=null,Ni=ni[--ri],ni[ri]=null,Ai=ni[--ri],ni[ri]=null}function Nk(i,o){ni[ri++]=Ai,ni[ri++]=Ni,ni[ri++]=Is,Ai=o.id,Ni=o.overflow,Is=i}var tr=null,hn=null,Ut=!1,Ds=null,ii=!1,ym=Error(r(519));function zs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jl(ti(o,i)),ym}function Ok(i){var o=i.stateNode,u=i.type,f=i.memoizedProps;switch(o[an]=i,o[Jn]=f,u){case"dialog":Lt("cancel",o),Lt("close",o);break;case"iframe":case"object":case"embed":Lt("load",o);break;case"video":case"audio":for(u=0;u<ku.length;u++)Lt(ku[u],o);break;case"source":Lt("error",o);break;case"img":case"image":case"link":Lt("error",o),Lt("load",o);break;case"details":Lt("toggle",o);break;case"input":Lt("invalid",o),wo(o,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Lt("invalid",o);break;case"textarea":Lt("invalid",o),ba(o,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||f.suppressHydrationWarning===!0||ZS(o.textContent,u)?(f.popover!=null&&(Lt("beforetoggle",o),Lt("toggle",o)),f.onScroll!=null&&Lt("scroll",o),f.onScrollEnd!=null&&Lt("scrollend",o),f.onClick!=null&&(o.onclick=Fe),o=!0):o=!1,o||zs(i,!0)}function Mk(i){for(tr=i.return;tr;)switch(tr.tag){case 5:case 31:case 13:ii=!1;return;case 27:case 3:ii=!0;return;default:tr=tr.return}}function Ta(i){if(i!==tr)return!1;if(!Ut)return Mk(i),Ut=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Lg(i.type,i.memoizedProps)),u=!u),u&&hn&&zs(i),Mk(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));hn=rw(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));hn=rw(i)}else o===27?(o=hn,Ws(i.type)?(i=Fg,Fg=null,hn=i):hn=o):hn=tr?oi(i.stateNode.nextSibling):null;return!0}function Ao(){hn=tr=null,Ut=!1}function vm(){var i=Ds;return i!==null&&(Or===null?Or=i:Or.push.apply(Or,i),Ds=null),i}function Jl(i){Ds===null?Ds=[i]:Ds.push(i)}var xm=B(null),No=null,Qi=null;function Ls(i,o,u){O(xm,o._currentValue),o._currentValue=u}function Ji(i){i._currentValue=xm.current,G(xm)}function km(i,o,u){for(;i!==null;){var f=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),i===u)break;i=i.return}}function Sm(i,o,u,f){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var w=b.dependencies;if(w!==null){var M=b.child;w=w.firstContext;e:for(;w!==null;){var V=w;w=b;for(var Q=0;Q<o.length;Q++)if(V.context===o[Q]){w.lanes|=u,V=w.alternate,V!==null&&(V.lanes|=u),km(w.return,u,i),f||(M=null);break e}w=V.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=u,w=M.alternate,w!==null&&(w.lanes|=u),km(M,u,i),M=null}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===i){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}}function _a(i,o,u,f){i=null;for(var b=o,w=!1;b!==null;){if(!w){if((b.flags&524288)!==0)w=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var M=b.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var V=b.type;Fr(b.pendingProps.value,M.value)||(i!==null?i.push(V):i=[V])}}else if(b===le.current){if(M=b.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(_u):i=[_u])}b=b.return}i!==null&&Sm(o,i,u,f),o.flags|=262144}function Ef(i){for(i=i.firstContext;i!==null;){if(!Fr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Oo(i){No=i,Qi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function nr(i){return Ik(No,i)}function Tf(i,o){return No===null&&Oo(i),Ik(i,o)}function Ik(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},Qi===null){if(i===null)throw Error(r(308));Qi=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Qi=Qi.next=o;return u}var qI=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,f){i.push(f)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},HI=e.unstable_scheduleCallback,GI=e.unstable_NormalPriority,jn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wm(){return{controller:new qI,data:new Map,refCount:0}}function eu(i){i.refCount--,i.refCount===0&&HI(GI,function(){i.controller.abort()})}var tu=null,Em=0,Ra=0,Ca=null;function VI(i,o){if(tu===null){var u=tu=[];Em=0,Ra=Rg(),Ca={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Em++,o.then(Dk,Dk),o}function Dk(){if(--Em===0&&tu!==null){Ca!==null&&(Ca.status="fulfilled");var i=tu;tu=null,Ra=0,Ca=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function KI(i,o){var u=[],f={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){f.status="fulfilled",f.value=o;for(var b=0;b<u.length;b++)(0,u[b])(o)},function(b){for(f.status="rejected",f.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),f}var zk=F.S;F.S=function(i,o){yS=re(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&VI(i,o),zk!==null&&zk(i,o)};var Mo=B(null);function Tm(){var i=Mo.current;return i!==null?i:ln.pooledCache}function _f(i,o){o===null?O(Mo,Mo.current):O(Mo,o.pool)}function Lk(){var i=Tm();return i===null?null:{parent:jn._currentValue,pool:i}}var Aa=Error(r(460)),_m=Error(r(474)),Rf=Error(r(542)),Cf={then:function(){}};function jk(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Pk(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Fe,Fe),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Bk(i),i;default:if(typeof o.status=="string")o.then(Fe,Fe);else{if(i=ln,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(f){if(o.status==="pending"){var b=o;b.status="fulfilled",b.value=f}},function(f){if(o.status==="pending"){var b=o;b.status="rejected",b.reason=f}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Bk(i),i}throw Do=o,Aa}}function Io(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Do=u,Aa):u}}var Do=null;function $k(){if(Do===null)throw Error(r(459));var i=Do;return Do=null,i}function Bk(i){if(i===Aa||i===Rf)throw Error(r(483))}var Na=null,nu=0;function Af(i){var o=nu;return nu+=1,Na===null&&(Na=[]),Pk(Na,i,o)}function ru(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Nf(i,o){throw o.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function Fk(i){function o(ae,se){if(i){var ue=ae.deletions;ue===null?(ae.deletions=[se],ae.flags|=16):ue.push(se)}}function u(ae,se){if(!i)return null;for(;se!==null;)o(ae,se),se=se.sibling;return null}function f(ae){for(var se=new Map;ae!==null;)ae.key!==null?se.set(ae.key,ae):se.set(ae.index,ae),ae=ae.sibling;return se}function b(ae,se){return ae=Yi(ae,se),ae.index=0,ae.sibling=null,ae}function w(ae,se,ue){return ae.index=ue,i?(ue=ae.alternate,ue!==null?(ue=ue.index,ue<se?(ae.flags|=67108866,se):ue):(ae.flags|=67108866,se)):(ae.flags|=1048576,se)}function M(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function V(ae,se,ue,Ee){return se===null||se.tag!==6?(se=hm(ue,ae.mode,Ee),se.return=ae,se):(se=b(se,ue),se.return=ae,se)}function Q(ae,se,ue,Ee){var ut=ue.type;return ut===S?ke(ae,se,ue.props.children,Ee,ue.key):se!==null&&(se.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===$&&Io(ut)===se.type)?(se=b(se,ue.props),ru(se,ue),se.return=ae,se):(se=Sf(ue.type,ue.key,ue.props,null,ae.mode,Ee),ru(se,ue),se.return=ae,se)}function de(ae,se,ue,Ee){return se===null||se.tag!==4||se.stateNode.containerInfo!==ue.containerInfo||se.stateNode.implementation!==ue.implementation?(se=mm(ue,ae.mode,Ee),se.return=ae,se):(se=b(se,ue.children||[]),se.return=ae,se)}function ke(ae,se,ue,Ee,ut){return se===null||se.tag!==7?(se=Co(ue,ae.mode,Ee,ut),se.return=ae,se):(se=b(se,ue),se.return=ae,se)}function Ae(ae,se,ue){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=hm(""+se,ae.mode,ue),se.return=ae,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return ue=Sf(se.type,se.key,se.props,null,ae.mode,ue),ru(ue,se),ue.return=ae,ue;case k:return se=mm(se,ae.mode,ue),se.return=ae,se;case $:return se=Io(se),Ae(ae,se,ue)}if(j(se)||K(se))return se=Co(se,ae.mode,ue,null),se.return=ae,se;if(typeof se.then=="function")return Ae(ae,Af(se),ue);if(se.$$typeof===_)return Ae(ae,Tf(ae,se),ue);Nf(ae,se)}return null}function me(ae,se,ue,Ee){var ut=se!==null?se.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ut!==null?null:V(ae,se,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return ue.key===ut?Q(ae,se,ue,Ee):null;case k:return ue.key===ut?de(ae,se,ue,Ee):null;case $:return ue=Io(ue),me(ae,se,ue,Ee)}if(j(ue)||K(ue))return ut!==null?null:ke(ae,se,ue,Ee,null);if(typeof ue.then=="function")return me(ae,se,Af(ue),Ee);if(ue.$$typeof===_)return me(ae,se,Tf(ae,ue),Ee);Nf(ae,ue)}return null}function be(ae,se,ue,Ee,ut){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ae=ae.get(ue)||null,V(se,ae,""+Ee,ut);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return ae=ae.get(Ee.key===null?ue:Ee.key)||null,Q(se,ae,Ee,ut);case k:return ae=ae.get(Ee.key===null?ue:Ee.key)||null,de(se,ae,Ee,ut);case $:return Ee=Io(Ee),be(ae,se,ue,Ee,ut)}if(j(Ee)||K(Ee))return ae=ae.get(ue)||null,ke(se,ae,Ee,ut,null);if(typeof Ee.then=="function")return be(ae,se,ue,Af(Ee),ut);if(Ee.$$typeof===_)return be(ae,se,ue,Tf(se,Ee),ut);Nf(se,Ee)}return null}function Qe(ae,se,ue,Ee){for(var ut=null,Gt=null,et=se,Ct=se=0,Bt=null;et!==null&&Ct<ue.length;Ct++){et.index>Ct?(Bt=et,et=null):Bt=et.sibling;var Vt=me(ae,et,ue[Ct],Ee);if(Vt===null){et===null&&(et=Bt);break}i&&et&&Vt.alternate===null&&o(ae,et),se=w(Vt,se,Ct),Gt===null?ut=Vt:Gt.sibling=Vt,Gt=Vt,et=Bt}if(Ct===ue.length)return u(ae,et),Ut&&Xi(ae,Ct),ut;if(et===null){for(;Ct<ue.length;Ct++)et=Ae(ae,ue[Ct],Ee),et!==null&&(se=w(et,se,Ct),Gt===null?ut=et:Gt.sibling=et,Gt=et);return Ut&&Xi(ae,Ct),ut}for(et=f(et);Ct<ue.length;Ct++)Bt=be(et,ae,Ct,ue[Ct],Ee),Bt!==null&&(i&&Bt.alternate!==null&&et.delete(Bt.key===null?Ct:Bt.key),se=w(Bt,se,Ct),Gt===null?ut=Bt:Gt.sibling=Bt,Gt=Bt);return i&&et.forEach(function(eo){return o(ae,eo)}),Ut&&Xi(ae,Ct),ut}function dt(ae,se,ue,Ee){if(ue==null)throw Error(r(151));for(var ut=null,Gt=null,et=se,Ct=se=0,Bt=null,Vt=ue.next();et!==null&&!Vt.done;Ct++,Vt=ue.next()){et.index>Ct?(Bt=et,et=null):Bt=et.sibling;var eo=me(ae,et,Vt.value,Ee);if(eo===null){et===null&&(et=Bt);break}i&&et&&eo.alternate===null&&o(ae,et),se=w(eo,se,Ct),Gt===null?ut=eo:Gt.sibling=eo,Gt=eo,et=Bt}if(Vt.done)return u(ae,et),Ut&&Xi(ae,Ct),ut;if(et===null){for(;!Vt.done;Ct++,Vt=ue.next())Vt=Ae(ae,Vt.value,Ee),Vt!==null&&(se=w(Vt,se,Ct),Gt===null?ut=Vt:Gt.sibling=Vt,Gt=Vt);return Ut&&Xi(ae,Ct),ut}for(et=f(et);!Vt.done;Ct++,Vt=ue.next())Vt=be(et,ae,Ct,Vt.value,Ee),Vt!==null&&(i&&Vt.alternate!==null&&et.delete(Vt.key===null?Ct:Vt.key),se=w(Vt,se,Ct),Gt===null?ut=Vt:Gt.sibling=Vt,Gt=Vt);return i&&et.forEach(function(iz){return o(ae,iz)}),Ut&&Xi(ae,Ct),ut}function nn(ae,se,ue,Ee){if(typeof ue=="object"&&ue!==null&&ue.type===S&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:e:{for(var ut=ue.key;se!==null;){if(se.key===ut){if(ut=ue.type,ut===S){if(se.tag===7){u(ae,se.sibling),Ee=b(se,ue.props.children),Ee.return=ae,ae=Ee;break e}}else if(se.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===$&&Io(ut)===se.type){u(ae,se.sibling),Ee=b(se,ue.props),ru(Ee,ue),Ee.return=ae,ae=Ee;break e}u(ae,se);break}else o(ae,se);se=se.sibling}ue.type===S?(Ee=Co(ue.props.children,ae.mode,Ee,ue.key),Ee.return=ae,ae=Ee):(Ee=Sf(ue.type,ue.key,ue.props,null,ae.mode,Ee),ru(Ee,ue),Ee.return=ae,ae=Ee)}return M(ae);case k:e:{for(ut=ue.key;se!==null;){if(se.key===ut)if(se.tag===4&&se.stateNode.containerInfo===ue.containerInfo&&se.stateNode.implementation===ue.implementation){u(ae,se.sibling),Ee=b(se,ue.children||[]),Ee.return=ae,ae=Ee;break e}else{u(ae,se);break}else o(ae,se);se=se.sibling}Ee=mm(ue,ae.mode,Ee),Ee.return=ae,ae=Ee}return M(ae);case $:return ue=Io(ue),nn(ae,se,ue,Ee)}if(j(ue))return Qe(ae,se,ue,Ee);if(K(ue)){if(ut=K(ue),typeof ut!="function")throw Error(r(150));return ue=ut.call(ue),dt(ae,se,ue,Ee)}if(typeof ue.then=="function")return nn(ae,se,Af(ue),Ee);if(ue.$$typeof===_)return nn(ae,se,Tf(ae,ue),Ee);Nf(ae,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,se!==null&&se.tag===6?(u(ae,se.sibling),Ee=b(se,ue),Ee.return=ae,ae=Ee):(u(ae,se),Ee=hm(ue,ae.mode,Ee),Ee.return=ae,ae=Ee),M(ae)):u(ae,se)}return function(ae,se,ue,Ee){try{nu=0;var ut=nn(ae,se,ue,Ee);return Na=null,ut}catch(et){if(et===Aa||et===Rf)throw et;var Gt=Ur(29,et,null,ae.mode);return Gt.lanes=Ee,Gt.return=ae,Gt}}}var zo=Fk(!0),Uk=Fk(!1),js=!1;function Rm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cm(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ps(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function $s(i,o,u){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Zt&2)!==0){var b=f.pending;return b===null?o.next=o:(o.next=b.next,b.next=o),f.pending=o,o=kf(i),Tk(i,null,u),o}return xf(i,f,o,u),kf(i)}function iu(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,qe(i,u)}}function Am(i,o){var u=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var b=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?b=w=M:w=w.next=M,u=u.next}while(u!==null);w===null?b=w=o:w=w.next=o}else b=w=o;u={baseState:f.baseState,firstBaseUpdate:b,lastBaseUpdate:w,shared:f.shared,callbacks:f.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var Nm=!1;function su(){if(Nm){var i=Ca;if(i!==null)throw i}}function ou(i,o,u,f){Nm=!1;var b=i.updateQueue;js=!1;var w=b.firstBaseUpdate,M=b.lastBaseUpdate,V=b.shared.pending;if(V!==null){b.shared.pending=null;var Q=V,de=Q.next;Q.next=null,M===null?w=de:M.next=de,M=Q;var ke=i.alternate;ke!==null&&(ke=ke.updateQueue,V=ke.lastBaseUpdate,V!==M&&(V===null?ke.firstBaseUpdate=de:V.next=de,ke.lastBaseUpdate=Q))}if(w!==null){var Ae=b.baseState;M=0,ke=de=Q=null,V=w;do{var me=V.lane&-536870913,be=me!==V.lane;if(be?($t&me)===me:(f&me)===me){me!==0&&me===Ra&&(Nm=!0),ke!==null&&(ke=ke.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Qe=i,dt=V;me=o;var nn=u;switch(dt.tag){case 1:if(Qe=dt.payload,typeof Qe=="function"){Ae=Qe.call(nn,Ae,me);break e}Ae=Qe;break e;case 3:Qe.flags=Qe.flags&-65537|128;case 0:if(Qe=dt.payload,me=typeof Qe=="function"?Qe.call(nn,Ae,me):Qe,me==null)break e;Ae=m({},Ae,me);break e;case 2:js=!0}}me=V.callback,me!==null&&(i.flags|=64,be&&(i.flags|=8192),be=b.callbacks,be===null?b.callbacks=[me]:be.push(me))}else be={lane:me,tag:V.tag,payload:V.payload,callback:V.callback,next:null},ke===null?(de=ke=be,Q=Ae):ke=ke.next=be,M|=me;if(V=V.next,V===null){if(V=b.shared.pending,V===null)break;be=V,V=be.next,be.next=null,b.lastBaseUpdate=be,b.shared.pending=null}}while(!0);ke===null&&(Q=Ae),b.baseState=Q,b.firstBaseUpdate=de,b.lastBaseUpdate=ke,w===null&&(b.shared.lanes=0),Hs|=M,i.lanes=M,i.memoizedState=Ae}}function qk(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Hk(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)qk(u[i],o)}var Oa=B(null),Of=B(0);function Gk(i,o){i=ls,O(Of,i),O(Oa,o),ls=i|o.baseLanes}function Om(){O(Of,ls),O(Oa,Oa.current)}function Mm(){ls=Of.current,G(Oa),G(Of)}var qr=B(null),si=null;function Bs(i){var o=i.alternate;O(Mn,Mn.current&1),O(qr,i),si===null&&(o===null||Oa.current!==null||o.memoizedState!==null)&&(si=i)}function Im(i){O(Mn,Mn.current),O(qr,i),si===null&&(si=i)}function Vk(i){i.tag===22?(O(Mn,Mn.current),O(qr,i),si===null&&(si=i)):Fs()}function Fs(){O(Mn,Mn.current),O(qr,qr.current)}function Hr(i){G(qr),si===i&&(si=null),G(Mn)}var Mn=B(0);function Mf(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||$g(u)||Bg(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var es=0,Rt=null,en=null,Pn=null,If=!1,Ma=!1,Lo=!1,Df=0,au=0,Ia=null,ZI=0;function Rn(){throw Error(r(321))}function Dm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Fr(i[u],o[u]))return!1;return!0}function zm(i,o,u,f,b,w){return es=w,Rt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,F.H=i===null||i.memoizedState===null?A0:Ym,Lo=!1,w=u(f,b),Lo=!1,Ma&&(w=Zk(o,u,f,b)),Kk(i),w}function Kk(i){F.H=cu;var o=en!==null&&en.next!==null;if(es=0,Pn=en=Rt=null,If=!1,au=0,Ia=null,o)throw Error(r(300));i===null||$n||(i=i.dependencies,i!==null&&Ef(i)&&($n=!0))}function Zk(i,o,u,f){Rt=i;var b=0;do{if(Ma&&(Ia=null),au=0,Ma=!1,25<=b)throw Error(r(301));if(b+=1,Pn=en=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}F.H=N0,w=o(u,f)}while(Ma);return w}function WI(){var i=F.H,o=i.useState()[0];return o=typeof o.then=="function"?lu(o):o,i=i.useState()[0],(en!==null?en.memoizedState:null)!==i&&(Rt.flags|=1024),o}function Lm(){var i=Df!==0;return Df=0,i}function jm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Pm(i){if(If){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}If=!1}es=0,Pn=en=Rt=null,Ma=!1,au=Df=0,Ia=null}function vr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pn===null?Rt.memoizedState=Pn=i:Pn=Pn.next=i,Pn}function In(){if(en===null){var i=Rt.alternate;i=i!==null?i.memoizedState:null}else i=en.next;var o=Pn===null?Rt.memoizedState:Pn.next;if(o!==null)Pn=o,en=i;else{if(i===null)throw Rt.alternate===null?Error(r(467)):Error(r(310));en=i,i={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},Pn===null?Rt.memoizedState=Pn=i:Pn=Pn.next=i}return Pn}function zf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lu(i){var o=au;return au+=1,Ia===null&&(Ia=[]),i=Pk(Ia,i,o),o=Rt,(Pn===null?o.memoizedState:Pn.next)===null&&(o=o.alternate,F.H=o===null||o.memoizedState===null?A0:Ym),i}function Lf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return lu(i);if(i.$$typeof===_)return nr(i)}throw Error(r(438,String(i)))}function $m(i){var o=null,u=Rt.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var f=Rt.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(o={data:f.data.map(function(b){return b.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=zf(),Rt.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),f=0;f<i;f++)u[f]=L;return o.index++,u}function ts(i,o){return typeof o=="function"?o(i):o}function jf(i){var o=In();return Bm(o,en,i)}function Bm(i,o,u){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=u;var b=i.baseQueue,w=f.pending;if(w!==null){if(b!==null){var M=b.next;b.next=w.next,w.next=M}o.baseQueue=b=w,f.pending=null}if(w=i.baseState,b===null)i.memoizedState=w;else{o=b.next;var V=M=null,Q=null,de=o,ke=!1;do{var Ae=de.lane&-536870913;if(Ae!==de.lane?($t&Ae)===Ae:(es&Ae)===Ae){var me=de.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ae===Ra&&(ke=!0);else if((es&me)===me){de=de.next,me===Ra&&(ke=!0);continue}else Ae={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=Ae,M=w):Q=Q.next=Ae,Rt.lanes|=me,Hs|=me;Ae=de.action,Lo&&u(w,Ae),w=de.hasEagerState?de.eagerState:u(w,Ae)}else me={lane:Ae,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=me,M=w):Q=Q.next=me,Rt.lanes|=Ae,Hs|=Ae;de=de.next}while(de!==null&&de!==o);if(Q===null?M=w:Q.next=V,!Fr(w,i.memoizedState)&&($n=!0,ke&&(u=Ca,u!==null)))throw u;i.memoizedState=w,i.baseState=M,i.baseQueue=Q,f.lastRenderedState=w}return b===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function Fm(i){var o=In(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=u.dispatch,b=u.pending,w=o.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do w=i(w,M.action),M=M.next;while(M!==b);Fr(w,o.memoizedState)||($n=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,f]}function Wk(i,o,u){var f=Rt,b=In(),w=Ut;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Fr((en||b).memoizedState,u);if(M&&(b.memoizedState=u,$n=!0),b=b.queue,Hm(Qk.bind(null,f,b,i),[i]),b.getSnapshot!==o||M||Pn!==null&&Pn.memoizedState.tag&1){if(f.flags|=2048,Da(9,{destroy:void 0},Xk.bind(null,f,b,u,o),null),ln===null)throw Error(r(349));w||(es&127)!==0||Yk(f,o,u)}return u}function Yk(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Rt.updateQueue,o===null?(o=zf(),Rt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function Xk(i,o,u,f){o.value=u,o.getSnapshot=f,Jk(o)&&e0(i)}function Qk(i,o,u){return u(function(){Jk(o)&&e0(i)})}function Jk(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Fr(i,u)}catch{return!0}}function e0(i){var o=Ro(i,2);o!==null&&Mr(o,i,2)}function Um(i){var o=vr();if(typeof i=="function"){var u=i;if(i=u(),Lo){vt(!0);try{u()}finally{vt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:i},o}function t0(i,o,u,f){return i.baseState=u,Bm(i,en,typeof f=="function"?f:ts)}function YI(i,o,u,f,b){if(Bf(i))throw Error(r(485));if(i=o.action,i!==null){var w={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){w.listeners.push(M)}};F.T!==null?u(!0):w.isTransition=!1,f(w),u=o.pending,u===null?(w.next=o.pending=w,n0(o,w)):(w.next=u.next,o.pending=u.next=w)}}function n0(i,o){var u=o.action,f=o.payload,b=i.state;if(o.isTransition){var w=F.T,M={};F.T=M;try{var V=u(b,f),Q=F.S;Q!==null&&Q(M,V),r0(i,o,V)}catch(de){qm(i,o,de)}finally{w!==null&&M.types!==null&&(w.types=M.types),F.T=w}}else try{w=u(b,f),r0(i,o,w)}catch(de){qm(i,o,de)}}function r0(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){i0(i,o,f)},function(f){return qm(i,o,f)}):i0(i,o,u)}function i0(i,o,u){o.status="fulfilled",o.value=u,s0(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,n0(i,u)))}function qm(i,o,u){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=u,s0(o),o=o.next;while(o!==f)}i.action=null}function s0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function o0(i,o){return o}function a0(i,o){if(Ut){var u=ln.formState;if(u!==null){e:{var f=Rt;if(Ut){if(hn){t:{for(var b=hn,w=ii;b.nodeType!==8;){if(!w){b=null;break t}if(b=oi(b.nextSibling),b===null){b=null;break t}}w=b.data,b=w==="F!"||w==="F"?b:null}if(b){hn=oi(b.nextSibling),f=b.data==="F!";break e}}zs(f)}f=!1}f&&(o=u[0])}}return u=vr(),u.memoizedState=u.baseState=o,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o0,lastRenderedState:o},u.queue=f,u=_0.bind(null,Rt,f),f.dispatch=u,f=Um(!1),w=Wm.bind(null,Rt,!1,f.queue),f=vr(),b={state:o,dispatch:null,action:i,pending:null},f.queue=b,u=YI.bind(null,Rt,b,w,u),b.dispatch=u,f.memoizedState=i,[o,u,!1]}function l0(i){var o=In();return u0(o,en,i)}function u0(i,o,u){if(o=Bm(i,o,o0)[0],i=jf(ts)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var f=lu(o)}catch(M){throw M===Aa?Rf:M}else f=o;o=In();var b=o.queue,w=b.dispatch;return u!==o.memoizedState&&(Rt.flags|=2048,Da(9,{destroy:void 0},XI.bind(null,b,u),null)),[f,w,i]}function XI(i,o){i.action=o}function c0(i){var o=In(),u=en;if(u!==null)return u0(o,u,i);In(),o=o.memoizedState,u=In();var f=u.queue.dispatch;return u.memoizedState=i,[o,f,!1]}function Da(i,o,u,f){return i={tag:i,create:u,deps:f,inst:o,next:null},o=Rt.updateQueue,o===null&&(o=zf(),Rt.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(f=u.next,u.next=i,i.next=f,o.lastEffect=i),i}function f0(){return In().memoizedState}function Pf(i,o,u,f){var b=vr();Rt.flags|=i,b.memoizedState=Da(1|o,{destroy:void 0},u,f===void 0?null:f)}function $f(i,o,u,f){var b=In();f=f===void 0?null:f;var w=b.memoizedState.inst;en!==null&&f!==null&&Dm(f,en.memoizedState.deps)?b.memoizedState=Da(o,w,u,f):(Rt.flags|=i,b.memoizedState=Da(1|o,w,u,f))}function d0(i,o){Pf(8390656,8,i,o)}function Hm(i,o){$f(2048,8,i,o)}function QI(i){Rt.flags|=4;var o=Rt.updateQueue;if(o===null)o=zf(),Rt.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function p0(i){var o=In().memoizedState;return QI({ref:o,nextImpl:i}),function(){if((Zt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function h0(i,o){return $f(4,2,i,o)}function m0(i,o){return $f(4,4,i,o)}function g0(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function b0(i,o,u){u=u!=null?u.concat([i]):null,$f(4,4,g0.bind(null,o,i),u)}function Gm(){}function y0(i,o){var u=In();o=o===void 0?null:o;var f=u.memoizedState;return o!==null&&Dm(o,f[1])?f[0]:(u.memoizedState=[i,o],i)}function v0(i,o){var u=In();o=o===void 0?null:o;var f=u.memoizedState;if(o!==null&&Dm(o,f[1]))return f[0];if(f=i(),Lo){vt(!0);try{i()}finally{vt(!1)}}return u.memoizedState=[f,o],f}function Vm(i,o,u){return u===void 0||(es&1073741824)!==0&&($t&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=xS(),Rt.lanes|=i,Hs|=i,u)}function x0(i,o,u,f){return Fr(u,o)?u:Oa.current!==null?(i=Vm(i,u,f),Fr(i,o)||($n=!0),i):(es&42)===0||(es&1073741824)!==0&&($t&261930)===0?($n=!0,i.memoizedState=u):(i=xS(),Rt.lanes|=i,Hs|=i,o)}function k0(i,o,u,f,b){var w=U.p;U.p=w!==0&&8>w?w:8;var M=F.T,V={};F.T=V,Wm(i,!1,o,u);try{var Q=b(),de=F.S;if(de!==null&&de(V,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var ke=KI(Q,f);uu(i,o,ke,Kr(i))}else uu(i,o,f,Kr(i))}catch(Ae){uu(i,o,{then:function(){},status:"rejected",reason:Ae},Kr())}finally{U.p=w,M!==null&&V.types!==null&&(M.types=V.types),F.T=M}}function JI(){}function Km(i,o,u,f){if(i.tag!==5)throw Error(r(476));var b=S0(i).queue;k0(i,b,o,P,u===null?JI:function(){return w0(i),u(f)})}function S0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:P},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function w0(i){var o=S0(i);o.next===null&&(o=i.alternate.memoizedState),uu(i,o.next.queue,{},Kr())}function Zm(){return nr(_u)}function E0(){return In().memoizedState}function T0(){return In().memoizedState}function eD(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Kr();i=Ps(u);var f=$s(o,i,u);f!==null&&(Mr(f,o,u),iu(f,o,u)),o={cache:wm()},i.payload=o;return}o=o.return}}function tD(i,o,u){var f=Kr();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Bf(i)?R0(o,u):(u=dm(i,o,u,f),u!==null&&(Mr(u,i,f),C0(u,o,f)))}function _0(i,o,u){var f=Kr();uu(i,o,u,f)}function uu(i,o,u,f){var b={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Bf(i))R0(o,b);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var M=o.lastRenderedState,V=w(M,u);if(b.hasEagerState=!0,b.eagerState=V,Fr(V,M))return xf(i,o,b,0),ln===null&&vf(),!1}catch{}if(u=dm(i,o,b,f),u!==null)return Mr(u,i,f),C0(u,o,f),!0}return!1}function Wm(i,o,u,f){if(f={lane:2,revertLane:Rg(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Bf(i)){if(o)throw Error(r(479))}else o=dm(i,u,f,2),o!==null&&Mr(o,i,2)}function Bf(i){var o=i.alternate;return i===Rt||o!==null&&o===Rt}function R0(i,o){Ma=If=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function C0(i,o,u){if((u&4194048)!==0){var f=o.lanes;f&=i.pendingLanes,u|=f,o.lanes=u,qe(i,u)}}var cu={readContext:nr,use:Lf,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useLayoutEffect:Rn,useInsertionEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useSyncExternalStore:Rn,useId:Rn,useHostTransitionStatus:Rn,useFormState:Rn,useActionState:Rn,useOptimistic:Rn,useMemoCache:Rn,useCacheRefresh:Rn};cu.useEffectEvent=Rn;var A0={readContext:nr,use:Lf,useCallback:function(i,o){return vr().memoizedState=[i,o===void 0?null:o],i},useContext:nr,useEffect:d0,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Pf(4194308,4,g0.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Pf(4194308,4,i,o)},useInsertionEffect:function(i,o){Pf(4,2,i,o)},useMemo:function(i,o){var u=vr();o=o===void 0?null:o;var f=i();if(Lo){vt(!0);try{i()}finally{vt(!1)}}return u.memoizedState=[f,o],f},useReducer:function(i,o,u){var f=vr();if(u!==void 0){var b=u(o);if(Lo){vt(!0);try{u(o)}finally{vt(!1)}}}else b=o;return f.memoizedState=f.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},f.queue=i,i=i.dispatch=tD.bind(null,Rt,i),[f.memoizedState,i]},useRef:function(i){var o=vr();return i={current:i},o.memoizedState=i},useState:function(i){i=Um(i);var o=i.queue,u=_0.bind(null,Rt,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Gm,useDeferredValue:function(i,o){var u=vr();return Vm(u,i,o)},useTransition:function(){var i=Um(!1);return i=k0.bind(null,Rt,i.queue,!0,!1),vr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var f=Rt,b=vr();if(Ut){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),ln===null)throw Error(r(349));($t&127)!==0||Yk(f,o,u)}b.memoizedState=u;var w={value:u,getSnapshot:o};return b.queue=w,d0(Qk.bind(null,f,w,i),[i]),f.flags|=2048,Da(9,{destroy:void 0},Xk.bind(null,f,w,u,o),null),u},useId:function(){var i=vr(),o=ln.identifierPrefix;if(Ut){var u=Ni,f=Ai;u=(f&~(1<<32-st(f)-1)).toString(32)+u,o="_"+o+"R_"+u,u=Df++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=ZI++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Zm,useFormState:a0,useActionState:a0,useOptimistic:function(i){var o=vr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Wm.bind(null,Rt,!0,u),u.dispatch=o,[i,o]},useMemoCache:$m,useCacheRefresh:function(){return vr().memoizedState=eD.bind(null,Rt)},useEffectEvent:function(i){var o=vr(),u={impl:i};return o.memoizedState=u,function(){if((Zt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Ym={readContext:nr,use:Lf,useCallback:y0,useContext:nr,useEffect:Hm,useImperativeHandle:b0,useInsertionEffect:h0,useLayoutEffect:m0,useMemo:v0,useReducer:jf,useRef:f0,useState:function(){return jf(ts)},useDebugValue:Gm,useDeferredValue:function(i,o){var u=In();return x0(u,en.memoizedState,i,o)},useTransition:function(){var i=jf(ts)[0],o=In().memoizedState;return[typeof i=="boolean"?i:lu(i),o]},useSyncExternalStore:Wk,useId:E0,useHostTransitionStatus:Zm,useFormState:l0,useActionState:l0,useOptimistic:function(i,o){var u=In();return t0(u,en,i,o)},useMemoCache:$m,useCacheRefresh:T0};Ym.useEffectEvent=p0;var N0={readContext:nr,use:Lf,useCallback:y0,useContext:nr,useEffect:Hm,useImperativeHandle:b0,useInsertionEffect:h0,useLayoutEffect:m0,useMemo:v0,useReducer:Fm,useRef:f0,useState:function(){return Fm(ts)},useDebugValue:Gm,useDeferredValue:function(i,o){var u=In();return en===null?Vm(u,i,o):x0(u,en.memoizedState,i,o)},useTransition:function(){var i=Fm(ts)[0],o=In().memoizedState;return[typeof i=="boolean"?i:lu(i),o]},useSyncExternalStore:Wk,useId:E0,useHostTransitionStatus:Zm,useFormState:c0,useActionState:c0,useOptimistic:function(i,o){var u=In();return en!==null?t0(u,en,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:$m,useCacheRefresh:T0};N0.useEffectEvent=p0;function Xm(i,o,u,f){o=i.memoizedState,u=u(f,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Qm={enqueueSetState:function(i,o,u){i=i._reactInternals;var f=Kr(),b=Ps(f);b.payload=o,u!=null&&(b.callback=u),o=$s(i,b,f),o!==null&&(Mr(o,i,f),iu(o,i,f))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var f=Kr(),b=Ps(f);b.tag=1,b.payload=o,u!=null&&(b.callback=u),o=$s(i,b,f),o!==null&&(Mr(o,i,f),iu(o,i,f))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Kr(),f=Ps(u);f.tag=2,o!=null&&(f.callback=o),o=$s(i,f,u),o!==null&&(Mr(o,i,u),iu(o,i,u))}};function O0(i,o,u,f,b,w,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,w,M):o.prototype&&o.prototype.isPureReactComponent?!Yl(u,f)||!Yl(b,w):!0}function M0(i,o,u,f){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==i&&Qm.enqueueReplaceState(o,o.state,null)}function jo(i,o){var u=o;if("ref"in o){u={};for(var f in o)f!=="ref"&&(u[f]=o[f])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function I0(i){yf(i)}function D0(i){console.error(i)}function z0(i){yf(i)}function Ff(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function L0(i,o,u){try{var f=i.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function Jm(i,o,u){return u=Ps(u),u.tag=3,u.payload={element:null},u.callback=function(){Ff(i,o)},u}function j0(i){return i=Ps(i),i.tag=3,i}function P0(i,o,u,f){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var w=f.value;i.payload=function(){return b(w)},i.callback=function(){L0(o,u,f)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){L0(o,u,f),typeof b!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this));var V=f.stack;this.componentDidCatch(f.value,{componentStack:V!==null?V:""})})}function nD(i,o,u,f,b){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=u.alternate,o!==null&&_a(o,u,b,!0),u=qr.current,u!==null){switch(u.tag){case 31:case 13:return si===null?Jf():u.alternate===null&&Cn===0&&(Cn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,f===Cf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([f]):o.add(f),Eg(i,f,b)),!1;case 22:return u.flags|=65536,f===Cf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([f]):u.add(f)),Eg(i,f,b)),!1}throw Error(r(435,u.tag))}return Eg(i,f,b),Jf(),!1}if(Ut)return o=qr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=b,f!==ym&&(i=Error(r(422),{cause:f}),Jl(ti(i,u)))):(f!==ym&&(o=Error(r(423),{cause:f}),Jl(ti(o,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,f=ti(f,u),b=Jm(i.stateNode,f,b),Am(i,b),Cn!==4&&(Cn=2)),!1;var w=Error(r(520),{cause:f});if(w=ti(w,u),yu===null?yu=[w]:yu.push(w),Cn!==4&&(Cn=2),o===null)return!0;f=ti(f,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=Jm(u.stateNode,f,i),Am(u,i),!1;case 1:if(o=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Gs===null||!Gs.has(w))))return u.flags|=65536,b&=-b,u.lanes|=b,b=j0(b),P0(b,i,u,f),Am(u,b),!1}u=u.return}while(u!==null);return!1}var eg=Error(r(461)),$n=!1;function rr(i,o,u,f){o.child=i===null?Uk(o,null,u,f):zo(o,i.child,u,f)}function $0(i,o,u,f,b){u=u.render;var w=o.ref;if("ref"in f){var M={};for(var V in f)V!=="ref"&&(M[V]=f[V])}else M=f;return Oo(o),f=zm(i,o,u,M,w,b),V=Lm(),i!==null&&!$n?(jm(i,o,b),ns(i,o,b)):(Ut&&V&&gm(o),o.flags|=1,rr(i,o,f,b),o.child)}function B0(i,o,u,f,b){if(i===null){var w=u.type;return typeof w=="function"&&!pm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,F0(i,o,w,f,b)):(i=Sf(u.type,null,f,o,o.mode,b),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!lg(i,b)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:Yl,u(M,f)&&i.ref===o.ref)return ns(i,o,b)}return o.flags|=1,i=Yi(w,f),i.ref=o.ref,i.return=o,o.child=i}function F0(i,o,u,f,b){if(i!==null){var w=i.memoizedProps;if(Yl(w,f)&&i.ref===o.ref)if($n=!1,o.pendingProps=f=w,lg(i,b))(i.flags&131072)!==0&&($n=!0);else return o.lanes=i.lanes,ns(i,o,b)}return tg(i,o,u,f,b)}function U0(i,o,u,f){var b=f.children,w=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((o.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(f=o.child=i.child,b=0;f!==null;)b=b|f.lanes|f.childLanes,f=f.sibling;f=b&~w}else f=0,o.child=null;return q0(i,o,w,u,f)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&_f(o,w!==null?w.cachePool:null),w!==null?Gk(o,w):Om(),Vk(o);else return f=o.lanes=536870912,q0(i,o,w!==null?w.baseLanes|u:u,u,f)}else w!==null?(_f(o,w.cachePool),Gk(o,w),Fs(),o.memoizedState=null):(i!==null&&_f(o,null),Om(),Fs());return rr(i,o,b,u),o.child}function fu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function q0(i,o,u,f,b){var w=Tm();return w=w===null?null:{parent:jn._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&_f(o,null),Om(),Vk(o),i!==null&&_a(i,o,f,!0),o.childLanes=b,null}function Uf(i,o){return o=Hf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function H0(i,o,u){return zo(o,i.child,null,u),i=Uf(o,o.pendingProps),i.flags|=2,Hr(o),o.memoizedState=null,i}function rD(i,o,u){var f=o.pendingProps,b=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Ut){if(f.mode==="hidden")return i=Uf(o,f),o.lanes=536870912,fu(null,i);if(Im(o),(i=hn)?(i=nw(i,ii),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Is!==null?{id:Ai,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},u=Rk(i),u.return=o,o.child=u,tr=o,hn=null)):i=null,i===null)throw zs(o);return o.lanes=536870912,null}return Uf(o,f)}var w=i.memoizedState;if(w!==null){var M=w.dehydrated;if(Im(o),b)if(o.flags&256)o.flags&=-257,o=H0(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if($n||_a(i,o,u,!1),b=(u&i.childLanes)!==0,$n||b){if(f=ln,f!==null&&(M=Wt(f,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,Ro(i,M),Mr(f,i,M),eg;Jf(),o=H0(i,o,u)}else i=w.treeContext,hn=oi(M.nextSibling),tr=o,Ut=!0,Ds=null,ii=!1,i!==null&&Nk(o,i),o=Uf(o,f),o.flags|=4096;return o}return i=Yi(i.child,{mode:f.mode,children:f.children}),i.ref=o.ref,o.child=i,i.return=o,i}function qf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function tg(i,o,u,f,b){return Oo(o),u=zm(i,o,u,f,void 0,b),f=Lm(),i!==null&&!$n?(jm(i,o,b),ns(i,o,b)):(Ut&&f&&gm(o),o.flags|=1,rr(i,o,u,b),o.child)}function G0(i,o,u,f,b,w){return Oo(o),o.updateQueue=null,u=Zk(o,f,u,b),Kk(i),f=Lm(),i!==null&&!$n?(jm(i,o,w),ns(i,o,w)):(Ut&&f&&gm(o),o.flags|=1,rr(i,o,u,w),o.child)}function V0(i,o,u,f,b){if(Oo(o),o.stateNode===null){var w=Sa,M=u.contextType;typeof M=="object"&&M!==null&&(w=nr(M)),w=new u(f,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Qm,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=f,w.state=o.memoizedState,w.refs={},Rm(o),M=u.contextType,w.context=typeof M=="object"&&M!==null?nr(M):Sa,w.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Xm(o,u,M,f),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(M=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),M!==w.state&&Qm.enqueueReplaceState(w,w.state,null),ou(o,f,w,b),su(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(i===null){w=o.stateNode;var V=o.memoizedProps,Q=jo(u,V);w.props=Q;var de=w.context,ke=u.contextType;M=Sa,typeof ke=="object"&&ke!==null&&(M=nr(ke));var Ae=u.getDerivedStateFromProps;ke=typeof Ae=="function"||typeof w.getSnapshotBeforeUpdate=="function",V=o.pendingProps!==V,ke||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(V||de!==M)&&M0(o,w,f,M),js=!1;var me=o.memoizedState;w.state=me,ou(o,f,w,b),su(),de=o.memoizedState,V||me!==de||js?(typeof Ae=="function"&&(Xm(o,u,Ae,f),de=o.memoizedState),(Q=js||O0(o,u,Q,f,me,de,M))?(ke||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=de),w.props=f,w.state=de,w.context=M,f=Q):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{w=o.stateNode,Cm(i,o),M=o.memoizedProps,ke=jo(u,M),w.props=ke,Ae=o.pendingProps,me=w.context,de=u.contextType,Q=Sa,typeof de=="object"&&de!==null&&(Q=nr(de)),V=u.getDerivedStateFromProps,(de=typeof V=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Ae||me!==Q)&&M0(o,w,f,Q),js=!1,me=o.memoizedState,w.state=me,ou(o,f,w,b),su();var be=o.memoizedState;M!==Ae||me!==be||js||i!==null&&i.dependencies!==null&&Ef(i.dependencies)?(typeof V=="function"&&(Xm(o,u,V,f),be=o.memoizedState),(ke=js||O0(o,u,ke,f,me,be,Q)||i!==null&&i.dependencies!==null&&Ef(i.dependencies))?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,be,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,be,Q)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=be),w.props=f,w.state=be,w.context=Q,f=ke):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),f=!1)}return w=f,qf(i,o),f=(o.flags&128)!==0,w||f?(w=o.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,i!==null&&f?(o.child=zo(o,i.child,null,b),o.child=zo(o,null,u,b)):rr(i,o,u,b),o.memoizedState=w.state,i=o.child):i=ns(i,o,b),i}function K0(i,o,u,f){return Ao(),o.flags|=256,rr(i,o,u,f),o.child}var ng={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rg(i){return{baseLanes:i,cachePool:Lk()}}function ig(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Vr),i}function Z0(i,o,u){var f=o.pendingProps,b=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(Mn.current&2)!==0),M&&(b=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Ut){if(b?Bs(o):Fs(),(i=hn)?(i=nw(i,ii),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Is!==null?{id:Ai,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},u=Rk(i),u.return=o,o.child=u,tr=o,hn=null)):i=null,i===null)throw zs(o);return Bg(i)?o.lanes=32:o.lanes=536870912,null}var V=f.children;return f=f.fallback,b?(Fs(),b=o.mode,V=Hf({mode:"hidden",children:V},b),f=Co(f,b,u,null),V.return=o,f.return=o,V.sibling=f,o.child=V,f=o.child,f.memoizedState=rg(u),f.childLanes=ig(i,M,u),o.memoizedState=ng,fu(null,f)):(Bs(o),sg(o,V))}var Q=i.memoizedState;if(Q!==null&&(V=Q.dehydrated,V!==null)){if(w)o.flags&256?(Bs(o),o.flags&=-257,o=og(i,o,u)):o.memoizedState!==null?(Fs(),o.child=i.child,o.flags|=128,o=null):(Fs(),V=f.fallback,b=o.mode,f=Hf({mode:"visible",children:f.children},b),V=Co(V,b,u,null),V.flags|=2,f.return=o,V.return=o,f.sibling=V,o.child=f,zo(o,i.child,null,u),f=o.child,f.memoizedState=rg(u),f.childLanes=ig(i,M,u),o.memoizedState=ng,o=fu(null,f));else if(Bs(o),Bg(V)){if(M=V.nextSibling&&V.nextSibling.dataset,M)var de=M.dgst;M=de,f=Error(r(419)),f.stack="",f.digest=M,Jl({value:f,source:null,stack:null}),o=og(i,o,u)}else if($n||_a(i,o,u,!1),M=(u&i.childLanes)!==0,$n||M){if(M=ln,M!==null&&(f=Wt(M,u),f!==0&&f!==Q.retryLane))throw Q.retryLane=f,Ro(i,f),Mr(M,i,f),eg;$g(V)||Jf(),o=og(i,o,u)}else $g(V)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,hn=oi(V.nextSibling),tr=o,Ut=!0,Ds=null,ii=!1,i!==null&&Nk(o,i),o=sg(o,f.children),o.flags|=4096);return o}return b?(Fs(),V=f.fallback,b=o.mode,Q=i.child,de=Q.sibling,f=Yi(Q,{mode:"hidden",children:f.children}),f.subtreeFlags=Q.subtreeFlags&65011712,de!==null?V=Yi(de,V):(V=Co(V,b,u,null),V.flags|=2),V.return=o,f.return=o,f.sibling=V,o.child=f,fu(null,f),f=o.child,V=i.child.memoizedState,V===null?V=rg(u):(b=V.cachePool,b!==null?(Q=jn._currentValue,b=b.parent!==Q?{parent:Q,pool:Q}:b):b=Lk(),V={baseLanes:V.baseLanes|u,cachePool:b}),f.memoizedState=V,f.childLanes=ig(i,M,u),o.memoizedState=ng,fu(i.child,f)):(Bs(o),u=i.child,i=u.sibling,u=Yi(u,{mode:"visible",children:f.children}),u.return=o,u.sibling=null,i!==null&&(M=o.deletions,M===null?(o.deletions=[i],o.flags|=16):M.push(i)),o.child=u,o.memoizedState=null,u)}function sg(i,o){return o=Hf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Hf(i,o){return i=Ur(22,i,null,o),i.lanes=0,i}function og(i,o,u){return zo(o,i.child,null,u),i=sg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function W0(i,o,u){i.lanes|=o;var f=i.alternate;f!==null&&(f.lanes|=o),km(i.return,o,u)}function ag(i,o,u,f,b,w){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:b,treeForkCount:w}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=f,M.tail=u,M.tailMode=b,M.treeForkCount=w)}function Y0(i,o,u){var f=o.pendingProps,b=f.revealOrder,w=f.tail;f=f.children;var M=Mn.current,V=(M&2)!==0;if(V?(M=M&1|2,o.flags|=128):M&=1,O(Mn,M),rr(i,o,f,u),f=Ut?Ql:0,!V&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&W0(i,u,o);else if(i.tag===19)W0(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(u=o.child,b=null;u!==null;)i=u.alternate,i!==null&&Mf(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=o.child,o.child=null):(b=u.sibling,u.sibling=null),ag(o,!1,b,u,w,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=o.child,o.child=null;b!==null;){if(i=b.alternate,i!==null&&Mf(i)===null){o.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}ag(o,!0,u,null,w,f);break;case"together":ag(o,!1,null,null,void 0,f);break;default:o.memoizedState=null}return o.child}function ns(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Hs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(_a(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,u=Yi(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=Yi(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function lg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Ef(i)))}function iD(i,o,u){switch(o.tag){case 3:pe(o,o.stateNode.containerInfo),Ls(o,jn,i.memoizedState.cache),Ao();break;case 27:case 5:Se(o);break;case 4:pe(o,o.stateNode.containerInfo);break;case 10:Ls(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Im(o),null;break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(Bs(o),o.flags|=128,null):(u&o.child.childLanes)!==0?Z0(i,o,u):(Bs(o),i=ns(i,o,u),i!==null?i.sibling:null);Bs(o);break;case 19:var b=(i.flags&128)!==0;if(f=(u&o.childLanes)!==0,f||(_a(i,o,u,!1),f=(u&o.childLanes)!==0),b){if(f)return Y0(i,o,u);o.flags|=128}if(b=o.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),O(Mn,Mn.current),f)break;return null;case 22:return o.lanes=0,U0(i,o,u,o.pendingProps);case 24:Ls(o,jn,i.memoizedState.cache)}return ns(i,o,u)}function X0(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)$n=!0;else{if(!lg(i,u)&&(o.flags&128)===0)return $n=!1,iD(i,o,u);$n=(i.flags&131072)!==0}else $n=!1,Ut&&(o.flags&1048576)!==0&&Ak(o,Ql,o.index);switch(o.lanes=0,o.tag){case 16:e:{var f=o.pendingProps;if(i=Io(o.elementType),o.type=i,typeof i=="function")pm(i)?(f=jo(i,f),o.tag=1,o=V0(null,o,i,f,u)):(o.tag=0,o=tg(null,o,i,f,u));else{if(i!=null){var b=i.$$typeof;if(b===C){o.tag=11,o=$0(null,o,i,f,u);break e}else if(b===I){o.tag=14,o=B0(null,o,i,f,u);break e}}throw o=z(i)||i,Error(r(306,o,""))}}return o;case 0:return tg(i,o,o.type,o.pendingProps,u);case 1:return f=o.type,b=jo(f,o.pendingProps),V0(i,o,f,b,u);case 3:e:{if(pe(o,o.stateNode.containerInfo),i===null)throw Error(r(387));f=o.pendingProps;var w=o.memoizedState;b=w.element,Cm(i,o),ou(o,f,null,u);var M=o.memoizedState;if(f=M.cache,Ls(o,jn,f),f!==w.cache&&Sm(o,[jn],u,!0),su(),f=M.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=K0(i,o,f,u);break e}else if(f!==b){b=ti(Error(r(424)),o),Jl(b),o=K0(i,o,f,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,hn=oi(i.firstChild),tr=o,Ut=!0,Ds=null,ii=!0,u=Uk(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ao(),f===b){o=ns(i,o,u);break e}rr(i,o,f,u)}o=o.child}return o;case 26:return qf(i,o),i===null?(u=lw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ut||(u=o.type,i=o.pendingProps,f=od(ne.current).createElement(u),f[an]=o,f[Jn]=i,ir(f,u,i),zn(f),o.stateNode=f):o.memoizedState=lw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Se(o),i===null&&Ut&&(f=o.stateNode=sw(o.type,o.pendingProps,ne.current),tr=o,ii=!0,b=hn,Ws(o.type)?(Fg=b,hn=oi(f.firstChild)):hn=b),rr(i,o,o.pendingProps.children,u),qf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Ut&&((b=f=hn)&&(f=DD(f,o.type,o.pendingProps,ii),f!==null?(o.stateNode=f,tr=o,hn=oi(f.firstChild),ii=!1,b=!0):b=!1),b||zs(o)),Se(o),b=o.type,w=o.pendingProps,M=i!==null?i.memoizedProps:null,f=w.children,Lg(b,w)?f=null:M!==null&&Lg(b,M)&&(o.flags|=32),o.memoizedState!==null&&(b=zm(i,o,WI,null,null,u),_u._currentValue=b),qf(i,o),rr(i,o,f,u),o.child;case 6:return i===null&&Ut&&((i=u=hn)&&(u=zD(u,o.pendingProps,ii),u!==null?(o.stateNode=u,tr=o,hn=null,i=!0):i=!1),i||zs(o)),null;case 13:return Z0(i,o,u);case 4:return pe(o,o.stateNode.containerInfo),f=o.pendingProps,i===null?o.child=zo(o,null,f,u):rr(i,o,f,u),o.child;case 11:return $0(i,o,o.type,o.pendingProps,u);case 7:return rr(i,o,o.pendingProps,u),o.child;case 8:return rr(i,o,o.pendingProps.children,u),o.child;case 12:return rr(i,o,o.pendingProps.children,u),o.child;case 10:return f=o.pendingProps,Ls(o,o.type,f.value),rr(i,o,f.children,u),o.child;case 9:return b=o.type._context,f=o.pendingProps.children,Oo(o),b=nr(b),f=f(b),o.flags|=1,rr(i,o,f,u),o.child;case 14:return B0(i,o,o.type,o.pendingProps,u);case 15:return F0(i,o,o.type,o.pendingProps,u);case 19:return Y0(i,o,u);case 31:return rD(i,o,u);case 22:return U0(i,o,u,o.pendingProps);case 24:return Oo(o),f=nr(jn),i===null?(b=Tm(),b===null&&(b=ln,w=wm(),b.pooledCache=w,w.refCount++,w!==null&&(b.pooledCacheLanes|=u),b=w),o.memoizedState={parent:f,cache:b},Rm(o),Ls(o,jn,b)):((i.lanes&u)!==0&&(Cm(i,o),ou(o,null,null,u),su()),b=i.memoizedState,w=o.memoizedState,b.parent!==f?(b={parent:f,cache:f},o.memoizedState=b,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=b),Ls(o,jn,f)):(f=w.cache,Ls(o,jn,f),f!==b.cache&&Sm(o,[jn],u,!0))),rr(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function rs(i){i.flags|=4}function ug(i,o,u,f,b){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(ES())i.flags|=8192;else throw Do=Cf,_m}else i.flags&=-16777217}function Q0(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!pw(o))if(ES())i.flags|=8192;else throw Do=Cf,_m}function Gf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Ge():536870912,i.lanes|=o,Pa|=o)}function du(i,o){if(!Ut)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function mn(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,f=0;if(o)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags&65011712,f|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags,f|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=f,i.childLanes=u,o}function sD(i,o,u){var f=o.pendingProps;switch(bm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mn(o),null;case 1:return mn(o),null;case 3:return u=o.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),Ji(jn),ye(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Ta(o)?rs(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,vm())),mn(o),null;case 26:var b=o.type,w=o.memoizedState;return i===null?(rs(o),w!==null?(mn(o),Q0(o,w)):(mn(o),ug(o,b,null,f,u))):w?w!==i.memoizedState?(rs(o),mn(o),Q0(o,w)):(mn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==f&&rs(o),mn(o),ug(o,b,i,f,u)),null;case 27:if(ze(o),u=ne.current,b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&rs(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return mn(o),null}i=ie.current,Ta(o)?Ok(o):(i=sw(b,f,u),o.stateNode=i,rs(o))}return mn(o),null;case 5:if(ze(o),b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&rs(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return mn(o),null}if(w=ie.current,Ta(o))Ok(o);else{var M=od(ne.current);switch(w){case 1:w=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:w=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":w=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":w=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":w=M.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof f.is=="string"?M.createElement("select",{is:f.is}):M.createElement("select"),f.multiple?w.multiple=!0:f.size&&(w.size=f.size);break;default:w=typeof f.is=="string"?M.createElement(b,{is:f.is}):M.createElement(b)}}w[an]=o,w[Jn]=f;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)w.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break e;for(;M.sibling===null;){if(M.return===null||M.return===o)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=w;e:switch(ir(w,b,f),b){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&rs(o)}}return mn(o),ug(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==f&&rs(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(r(166));if(i=ne.current,Ta(o)){if(i=o.stateNode,u=o.memoizedProps,f=null,b=tr,b!==null)switch(b.tag){case 27:case 5:f=b.memoizedProps}i[an]=o,i=!!(i.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||ZS(i.nodeValue,u)),i||zs(o,!0)}else i=od(i).createTextNode(f),i[an]=o,o.stateNode=i}return mn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(f=Ta(o),u!==null){if(i===null){if(!f)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[an]=o}else Ao(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;mn(o),i=!1}else u=vm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Hr(o),o):(Hr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return mn(o),null;case 13:if(f=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=Ta(o),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[an]=o}else Ao(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;mn(o),b=!1}else b=vm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return o.flags&256?(Hr(o),o):(Hr(o),null)}return Hr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=f!==null,i=i!==null&&i.memoizedState!==null,u&&(f=o.child,b=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(b=f.alternate.memoizedState.cachePool.pool),w=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(w=f.memoizedState.cachePool.pool),w!==b&&(f.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Gf(o,o.updateQueue),mn(o),null);case 4:return ye(),i===null&&Og(o.stateNode.containerInfo),mn(o),null;case 10:return Ji(o.type),mn(o),null;case 19:if(G(Mn),f=o.memoizedState,f===null)return mn(o),null;if(b=(o.flags&128)!==0,w=f.rendering,w===null)if(b)du(f,!1);else{if(Cn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Mf(i),w!==null){for(o.flags|=128,du(f,!1),i=w.updateQueue,o.updateQueue=i,Gf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)_k(u,i),u=u.sibling;return O(Mn,Mn.current&1|2),Ut&&Xi(o,f.treeForkCount),o.child}i=i.sibling}f.tail!==null&&re()>Yf&&(o.flags|=128,b=!0,du(f,!1),o.lanes=4194304)}else{if(!b)if(i=Mf(w),i!==null){if(o.flags|=128,b=!0,i=i.updateQueue,o.updateQueue=i,Gf(o,i),du(f,!0),f.tail===null&&f.tailMode==="hidden"&&!w.alternate&&!Ut)return mn(o),null}else 2*re()-f.renderingStartTime>Yf&&u!==536870912&&(o.flags|=128,b=!0,du(f,!1),o.lanes=4194304);f.isBackwards?(w.sibling=o.child,o.child=w):(i=f.last,i!==null?i.sibling=w:o.child=w,f.last=w)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=re(),i.sibling=null,u=Mn.current,O(Mn,b?u&1|2:u&1),Ut&&Xi(o,f.treeForkCount),i):(mn(o),null);case 22:case 23:return Hr(o),Mm(),f=o.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(o.flags|=8192):f&&(o.flags|=8192),f?(u&536870912)!==0&&(o.flags&128)===0&&(mn(o),o.subtreeFlags&6&&(o.flags|=8192)):mn(o),u=o.updateQueue,u!==null&&Gf(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==u&&(o.flags|=2048),i!==null&&G(Mo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),Ji(jn),mn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function oD(i,o){switch(bm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Ji(jn),ye(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return ze(o),null;case 31:if(o.memoizedState!==null){if(Hr(o),o.alternate===null)throw Error(r(340));Ao()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Hr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Ao()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return G(Mn),null;case 4:return ye(),null;case 10:return Ji(o.type),null;case 22:case 23:return Hr(o),Mm(),i!==null&&G(Mo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Ji(jn),null;case 25:return null;default:return null}}function J0(i,o){switch(bm(o),o.tag){case 3:Ji(jn),ye();break;case 26:case 27:case 5:ze(o);break;case 4:ye();break;case 31:o.memoizedState!==null&&Hr(o);break;case 13:Hr(o);break;case 19:G(Mn);break;case 10:Ji(o.type);break;case 22:case 23:Hr(o),Mm(),i!==null&&G(Mo);break;case 24:Ji(jn)}}function pu(i,o){try{var u=o.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var b=f.next;u=b;do{if((u.tag&i)===i){f=void 0;var w=u.create,M=u.inst;f=w(),M.destroy=f}u=u.next}while(u!==b)}}catch(V){Jt(o,o.return,V)}}function Us(i,o,u){try{var f=o.updateQueue,b=f!==null?f.lastEffect:null;if(b!==null){var w=b.next;f=w;do{if((f.tag&i)===i){var M=f.inst,V=M.destroy;if(V!==void 0){M.destroy=void 0,b=o;var Q=u,de=V;try{de()}catch(ke){Jt(b,Q,ke)}}}f=f.next}while(f!==w)}}catch(ke){Jt(o,o.return,ke)}}function eS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Hk(o,u)}catch(f){Jt(i,i.return,f)}}}function tS(i,o,u){u.props=jo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(f){Jt(i,o,f)}}function hu(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof u=="function"?i.refCleanup=u(f):u.current=f}}catch(b){Jt(i,o,b)}}function Oi(i,o){var u=i.ref,f=i.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(b){Jt(i,o,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){Jt(i,o,b)}else u.current=null}function nS(i){var o=i.type,u=i.memoizedProps,f=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break e;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(b){Jt(i,i.return,b)}}function cg(i,o,u){try{var f=i.stateNode;CD(f,i.type,u,o),f[Jn]=o}catch(b){Jt(i,i.return,b)}}function rS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ws(i.type)||i.tag===4}function fg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||rS(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ws(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function dg(i,o,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Fe));else if(f!==4&&(f===27&&Ws(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(dg(i,o,u),i=i.sibling;i!==null;)dg(i,o,u),i=i.sibling}function Vf(i,o,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(f!==4&&(f===27&&Ws(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Vf(i,o,u),i=i.sibling;i!==null;)Vf(i,o,u),i=i.sibling}function iS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var f=i.type,b=o.attributes;b.length;)o.removeAttributeNode(b[0]);ir(o,f,u),o[an]=i,o[Jn]=u}catch(w){Jt(i,i.return,w)}}var is=!1,Bn=!1,pg=!1,sS=typeof WeakSet=="function"?WeakSet:Set,Zn=null;function aD(i,o){if(i=i.containerInfo,Dg=pd,i=bk(i),om(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var b=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var M=0,V=-1,Q=-1,de=0,ke=0,Ae=i,me=null;t:for(;;){for(var be;Ae!==u||b!==0&&Ae.nodeType!==3||(V=M+b),Ae!==w||f!==0&&Ae.nodeType!==3||(Q=M+f),Ae.nodeType===3&&(M+=Ae.nodeValue.length),(be=Ae.firstChild)!==null;)me=Ae,Ae=be;for(;;){if(Ae===i)break t;if(me===u&&++de===b&&(V=M),me===w&&++ke===f&&(Q=M),(be=Ae.nextSibling)!==null)break;Ae=me,me=Ae.parentNode}Ae=be}u=V===-1||Q===-1?null:{start:V,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(zg={focusedElem:i,selectionRange:u},pd=!1,Zn=o;Zn!==null;)if(o=Zn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Zn=i;else for(;Zn!==null;){switch(o=Zn,w=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=o,b=w.memoizedProps,w=w.memoizedState,f=u.stateNode;try{var Qe=jo(u.type,b);i=f.getSnapshotBeforeUpdate(Qe,w),f.__reactInternalSnapshotBeforeUpdate=i}catch(dt){Jt(u,u.return,dt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Pg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Pg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,Zn=i;break}Zn=o.return}}function oS(i,o,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:os(i,u),f&4&&pu(5,u);break;case 1:if(os(i,u),f&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){Jt(u,u.return,M)}else{var b=jo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(b,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){Jt(u,u.return,M)}}f&64&&eS(u),f&512&&hu(u,u.return);break;case 3:if(os(i,u),f&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{Hk(i,o)}catch(M){Jt(u,u.return,M)}}break;case 27:o===null&&f&4&&iS(u);case 26:case 5:os(i,u),o===null&&f&4&&nS(u),f&512&&hu(u,u.return);break;case 12:os(i,u);break;case 31:os(i,u),f&4&&uS(i,u);break;case 13:os(i,u),f&4&&cS(i,u),f&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=gD.bind(null,u),LD(i,u))));break;case 22:if(f=u.memoizedState!==null||is,!f){o=o!==null&&o.memoizedState!==null||Bn,b=is;var w=Bn;is=f,(Bn=o)&&!w?as(i,u,(u.subtreeFlags&8772)!==0):os(i,u),is=b,Bn=w}break;case 30:break;default:os(i,u)}}function aS(i){var o=i.alternate;o!==null&&(i.alternate=null,aS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Pl(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var gn=null,Cr=!1;function ss(i,o,u){for(u=u.child;u!==null;)lS(i,o,u),u=u.sibling}function lS(i,o,u){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(it,u)}catch{}switch(u.tag){case 26:Bn||Oi(u,o),ss(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Bn||Oi(u,o);var f=gn,b=Cr;Ws(u.type)&&(gn=u.stateNode,Cr=!1),ss(i,o,u),wu(u.stateNode),gn=f,Cr=b;break;case 5:Bn||Oi(u,o);case 6:if(f=gn,b=Cr,gn=null,ss(i,o,u),gn=f,Cr=b,gn!==null)if(Cr)try{(gn.nodeType===9?gn.body:gn.nodeName==="HTML"?gn.ownerDocument.body:gn).removeChild(u.stateNode)}catch(w){Jt(u,o,w)}else try{gn.removeChild(u.stateNode)}catch(w){Jt(u,o,w)}break;case 18:gn!==null&&(Cr?(i=gn,ew(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Va(i)):ew(gn,u.stateNode));break;case 4:f=gn,b=Cr,gn=u.stateNode.containerInfo,Cr=!0,ss(i,o,u),gn=f,Cr=b;break;case 0:case 11:case 14:case 15:Us(2,u,o),Bn||Us(4,u,o),ss(i,o,u);break;case 1:Bn||(Oi(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"&&tS(u,o,f)),ss(i,o,u);break;case 21:ss(i,o,u);break;case 22:Bn=(f=Bn)||u.memoizedState!==null,ss(i,o,u),Bn=f;break;default:ss(i,o,u)}}function uS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Va(i)}catch(u){Jt(o,o.return,u)}}}function cS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Va(i)}catch(u){Jt(o,o.return,u)}}function lD(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new sS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new sS),o;default:throw Error(r(435,i.tag))}}function Kf(i,o){var u=lD(i);o.forEach(function(f){if(!u.has(f)){u.add(f);var b=bD.bind(null,i,f);f.then(b,b)}})}function Ar(i,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var b=u[f],w=i,M=o,V=M;e:for(;V!==null;){switch(V.tag){case 27:if(Ws(V.type)){gn=V.stateNode,Cr=!1;break e}break;case 5:gn=V.stateNode,Cr=!1;break e;case 3:case 4:gn=V.stateNode.containerInfo,Cr=!0;break e}V=V.return}if(gn===null)throw Error(r(160));lS(w,M,b),gn=null,Cr=!1,w=b.alternate,w!==null&&(w.return=null),b.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)fS(o,i),o=o.sibling}var yi=null;function fS(i,o){var u=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ar(o,i),Nr(i),f&4&&(Us(3,i,i.return),pu(3,i),Us(5,i,i.return));break;case 1:Ar(o,i),Nr(i),f&512&&(Bn||u===null||Oi(u,u.return)),f&64&&is&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var b=yi;if(Ar(o,i),Nr(i),f&512&&(Bn||u===null||Oi(u,u.return)),f&4){var w=u!==null?u.memoizedState:null;if(f=i.memoizedState,u===null)if(f===null)if(i.stateNode===null){e:{f=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(f){case"title":w=b.getElementsByTagName("title")[0],(!w||w[ko]||w[an]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=b.createElement(f),b.head.insertBefore(w,b.querySelector("head > title"))),ir(w,f,u),w[an]=i,zn(w),f=w;break e;case"link":var M=fw("link","href",b).get(f+(u.href||""));if(M){for(var V=0;V<M.length;V++)if(w=M[V],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(V,1);break t}}w=b.createElement(f),ir(w,f,u),b.head.appendChild(w);break;case"meta":if(M=fw("meta","content",b).get(f+(u.content||""))){for(V=0;V<M.length;V++)if(w=M[V],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(V,1);break t}}w=b.createElement(f),ir(w,f,u),b.head.appendChild(w);break;default:throw Error(r(468,f))}w[an]=i,zn(w),f=w}i.stateNode=f}else dw(b,i.type,i.stateNode);else i.stateNode=cw(b,f,i.memoizedProps);else w!==f?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,f===null?dw(b,i.type,i.stateNode):cw(b,f,i.memoizedProps)):f===null&&i.stateNode!==null&&cg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Ar(o,i),Nr(i),f&512&&(Bn||u===null||Oi(u,u.return)),u!==null&&f&4&&cg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Ar(o,i),Nr(i),f&512&&(Bn||u===null||Oi(u,u.return)),i.flags&32){b=i.stateNode;try{mt(b,"")}catch(Qe){Jt(i,i.return,Qe)}}f&4&&i.stateNode!=null&&(b=i.memoizedProps,cg(i,b,u!==null?u.memoizedProps:b)),f&1024&&(pg=!0);break;case 6:if(Ar(o,i),Nr(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,u=i.stateNode;try{u.nodeValue=f}catch(Qe){Jt(i,i.return,Qe)}}break;case 3:if(ud=null,b=yi,yi=ad(o.containerInfo),Ar(o,i),yi=b,Nr(i),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Va(o.containerInfo)}catch(Qe){Jt(i,i.return,Qe)}pg&&(pg=!1,dS(i));break;case 4:f=yi,yi=ad(i.stateNode.containerInfo),Ar(o,i),Nr(i),yi=f;break;case 12:Ar(o,i),Nr(i);break;case 31:Ar(o,i),Nr(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Kf(i,f)));break;case 13:Ar(o,i),Nr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Wf=re()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Kf(i,f)));break;case 22:b=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,de=is,ke=Bn;if(is=de||b,Bn=ke||Q,Ar(o,i),Bn=ke,is=de,Nr(i),f&8192)e:for(o=i.stateNode,o._visibility=b?o._visibility&-2:o._visibility|1,b&&(u===null||Q||is||Bn||Po(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(w=Q.stateNode,b)M=w.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{V=Q.stateNode;var Ae=Q.memoizedProps.style,me=Ae!=null&&Ae.hasOwnProperty("display")?Ae.display:null;V.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Qe){Jt(Q,Q.return,Qe)}}}else if(o.tag===6){if(u===null){Q=o;try{Q.stateNode.nodeValue=b?"":Q.memoizedProps}catch(Qe){Jt(Q,Q.return,Qe)}}}else if(o.tag===18){if(u===null){Q=o;try{var be=Q.stateNode;b?tw(be,!0):tw(Q.stateNode,!1)}catch(Qe){Jt(Q,Q.return,Qe)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}f&4&&(f=i.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,Kf(i,u))));break;case 19:Ar(o,i),Nr(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,Kf(i,f)));break;case 30:break;case 21:break;default:Ar(o,i),Nr(i)}}function Nr(i){var o=i.flags;if(o&2){try{for(var u,f=i.return;f!==null;){if(rS(f)){u=f;break}f=f.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,w=fg(i);Vf(i,w,b);break;case 5:var M=u.stateNode;u.flags&32&&(mt(M,""),u.flags&=-33);var V=fg(i);Vf(i,V,M);break;case 3:case 4:var Q=u.stateNode.containerInfo,de=fg(i);dg(i,de,Q);break;default:throw Error(r(161))}}catch(ke){Jt(i,i.return,ke)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function dS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;dS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function os(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)oS(i,o.alternate,o),o=o.sibling}function Po(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Us(4,o,o.return),Po(o);break;case 1:Oi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&tS(o,o.return,u),Po(o);break;case 27:wu(o.stateNode);case 26:case 5:Oi(o,o.return),Po(o);break;case 22:o.memoizedState===null&&Po(o);break;case 30:Po(o);break;default:Po(o)}i=i.sibling}}function as(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,b=i,w=o,M=w.flags;switch(w.tag){case 0:case 11:case 15:as(b,w,u),pu(4,w);break;case 1:if(as(b,w,u),f=w,b=f.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(de){Jt(f,f.return,de)}if(f=w,b=f.updateQueue,b!==null){var V=f.stateNode;try{var Q=b.shared.hiddenCallbacks;if(Q!==null)for(b.shared.hiddenCallbacks=null,b=0;b<Q.length;b++)qk(Q[b],V)}catch(de){Jt(f,f.return,de)}}u&&M&64&&eS(w),hu(w,w.return);break;case 27:iS(w);case 26:case 5:as(b,w,u),u&&f===null&&M&4&&nS(w),hu(w,w.return);break;case 12:as(b,w,u);break;case 31:as(b,w,u),u&&M&4&&uS(b,w);break;case 13:as(b,w,u),u&&M&4&&cS(b,w);break;case 22:w.memoizedState===null&&as(b,w,u),hu(w,w.return);break;case 30:break;default:as(b,w,u)}o=o.sibling}}function hg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&eu(u))}function mg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&eu(i))}function vi(i,o,u,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)pS(i,o,u,f),o=o.sibling}function pS(i,o,u,f){var b=o.flags;switch(o.tag){case 0:case 11:case 15:vi(i,o,u,f),b&2048&&pu(9,o);break;case 1:vi(i,o,u,f);break;case 3:vi(i,o,u,f),b&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&eu(i)));break;case 12:if(b&2048){vi(i,o,u,f),i=o.stateNode;try{var w=o.memoizedProps,M=w.id,V=w.onPostCommit;typeof V=="function"&&V(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){Jt(o,o.return,Q)}}else vi(i,o,u,f);break;case 31:vi(i,o,u,f);break;case 13:vi(i,o,u,f);break;case 23:break;case 22:w=o.stateNode,M=o.alternate,o.memoizedState!==null?w._visibility&2?vi(i,o,u,f):mu(i,o):w._visibility&2?vi(i,o,u,f):(w._visibility|=2,za(i,o,u,f,(o.subtreeFlags&10256)!==0||!1)),b&2048&&hg(M,o);break;case 24:vi(i,o,u,f),b&2048&&mg(o.alternate,o);break;default:vi(i,o,u,f)}}function za(i,o,u,f,b){for(b=b&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,M=o,V=u,Q=f,de=M.flags;switch(M.tag){case 0:case 11:case 15:za(w,M,V,Q,b),pu(8,M);break;case 23:break;case 22:var ke=M.stateNode;M.memoizedState!==null?ke._visibility&2?za(w,M,V,Q,b):mu(w,M):(ke._visibility|=2,za(w,M,V,Q,b)),b&&de&2048&&hg(M.alternate,M);break;case 24:za(w,M,V,Q,b),b&&de&2048&&mg(M.alternate,M);break;default:za(w,M,V,Q,b)}o=o.sibling}}function mu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,f=o,b=f.flags;switch(f.tag){case 22:mu(u,f),b&2048&&hg(f.alternate,f);break;case 24:mu(u,f),b&2048&&mg(f.alternate,f);break;default:mu(u,f)}o=o.sibling}}var gu=8192;function La(i,o,u){if(i.subtreeFlags&gu)for(i=i.child;i!==null;)hS(i,o,u),i=i.sibling}function hS(i,o,u){switch(i.tag){case 26:La(i,o,u),i.flags&gu&&i.memoizedState!==null&&ZD(u,yi,i.memoizedState,i.memoizedProps);break;case 5:La(i,o,u);break;case 3:case 4:var f=yi;yi=ad(i.stateNode.containerInfo),La(i,o,u),yi=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=gu,gu=16777216,La(i,o,u),gu=f):La(i,o,u));break;default:La(i,o,u)}}function mS(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function bu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var f=o[u];Zn=f,bS(f,i)}mS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)gS(i),i=i.sibling}function gS(i){switch(i.tag){case 0:case 11:case 15:bu(i),i.flags&2048&&Us(9,i,i.return);break;case 3:bu(i);break;case 12:bu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Zf(i)):bu(i);break;default:bu(i)}}function Zf(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var f=o[u];Zn=f,bS(f,i)}mS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Us(8,o,o.return),Zf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Zf(o));break;default:Zf(o)}i=i.sibling}}function bS(i,o){for(;Zn!==null;){var u=Zn;switch(u.tag){case 0:case 11:case 15:Us(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:eu(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,Zn=f;else e:for(u=i;Zn!==null;){f=Zn;var b=f.sibling,w=f.return;if(aS(f),f===u){Zn=null;break e}if(b!==null){b.return=w,Zn=b;break e}Zn=w}}}var uD={getCacheForType:function(i){var o=nr(jn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return nr(jn).controller.signal}},cD=typeof WeakMap=="function"?WeakMap:Map,Zt=0,ln=null,zt=null,$t=0,Qt=0,Gr=null,qs=!1,ja=!1,gg=!1,ls=0,Cn=0,Hs=0,$o=0,bg=0,Vr=0,Pa=0,yu=null,Or=null,yg=!1,Wf=0,yS=0,Yf=1/0,Xf=null,Gs=null,Hn=0,Vs=null,$a=null,us=0,vg=0,xg=null,vS=null,vu=0,kg=null;function Kr(){return(Zt&2)!==0&&$t!==0?$t&-$t:F.T!==null?Rg():Kn()}function xS(){if(Vr===0)if(($t&536870912)===0||Ut){var i=Ke;Ke<<=1,(Ke&3932160)===0&&(Ke=262144),Vr=i}else Vr=536870912;return i=qr.current,i!==null&&(i.flags|=32),Vr}function Mr(i,o,u){(i===ln&&(Qt===2||Qt===9)||i.cancelPendingCommit!==null)&&(Ba(i,0),Ks(i,$t,Vr,!1)),St(i,u),((Zt&2)===0||i!==ln)&&(i===ln&&((Zt&2)===0&&($o|=u),Cn===4&&Ks(i,$t,Vr,!1)),Mi(i))}function kS(i,o,u){if((Zt&6)!==0)throw Error(r(327));var f=!u&&(o&127)===0&&(o&i.expiredLanes)===0||X(i,o),b=f?pD(i,o):wg(i,o,!0),w=f;do{if(b===0){ja&&!f&&Ks(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!fD(u)){b=wg(i,o,!1),w=!1;continue}if(b===2){if(w=o,i.errorRecoveryDisabledLanes&w)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;e:{var V=i;b=yu;var Q=V.current.memoizedState.isDehydrated;if(Q&&(Ba(V,M).flags|=256),M=wg(V,M,!1),M!==2){if(gg&&!Q){V.errorRecoveryDisabledLanes|=w,$o|=w,b=4;break e}w=Or,Or=b,w!==null&&(Or===null?Or=w:Or.push.apply(Or,w))}b=M}if(w=!1,b!==2)continue}}if(b===1){Ba(i,0),Ks(i,o,0,!0);break}e:{switch(f=i,w=b,w){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Ks(f,o,Vr,!qs);break e;case 2:Or=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(b=Wf+300-re(),10<b)){if(Ks(f,o,Vr,!qs),Y(f,0,!0)!==0)break e;us=o,f.timeoutHandle=QS(SS.bind(null,f,u,Or,Xf,yg,o,Vr,$o,Pa,qs,w,"Throttled",-0,0),b);break e}SS(f,u,Or,Xf,yg,o,Vr,$o,Pa,qs,w,null,-0,0)}}break}while(!0);Mi(i)}function SS(i,o,u,f,b,w,M,V,Q,de,ke,Ae,me,be){if(i.timeoutHandle=-1,Ae=o.subtreeFlags,Ae&8192||(Ae&16785408)===16785408){Ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fe},hS(o,w,Ae);var Qe=(w&62914560)===w?Wf-re():(w&4194048)===w?yS-re():0;if(Qe=WD(Ae,Qe),Qe!==null){us=w,i.cancelPendingCommit=Qe(NS.bind(null,i,o,w,u,f,b,M,V,Q,ke,Ae,null,me,be)),Ks(i,w,M,!de);return}}NS(i,o,w,u,f,b,M,V,Q)}function fD(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var b=u[f],w=b.getSnapshot;b=b.value;try{if(!Fr(w(),b))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ks(i,o,u,f){o&=~bg,o&=~$o,i.suspendedLanes|=o,i.pingedLanes&=~o,f&&(i.warmLanes|=o),f=i.expirationTimes;for(var b=o;0<b;){var w=31-st(b),M=1<<w;f[w]=-1,b&=~M}u!==0&&Le(i,u,o)}function Qf(){return(Zt&6)===0?(xu(0),!1):!0}function Sg(){if(zt!==null){if(Qt===0)var i=zt.return;else i=zt,Qi=No=null,Pm(i),Na=null,nu=0,i=zt;for(;i!==null;)J0(i.alternate,i),i=i.return;zt=null}}function Ba(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,OD(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),us=0,Sg(),ln=i,zt=u=Yi(i.current,null),$t=o,Qt=0,Gr=null,qs=!1,ja=X(i,o),gg=!1,Pa=Vr=bg=$o=Hs=Cn=0,Or=yu=null,yg=!1,(o&8)!==0&&(o|=o&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=o;0<f;){var b=31-st(f),w=1<<b;o|=i[b],f&=~w}return ls=o,vf(),u}function wS(i,o){Rt=null,F.H=cu,o===Aa||o===Rf?(o=$k(),Qt=3):o===_m?(o=$k(),Qt=4):Qt=o===eg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Gr=o,zt===null&&(Cn=1,Ff(i,ti(o,i.current)))}function ES(){var i=qr.current;return i===null?!0:($t&4194048)===$t?si===null:($t&62914560)===$t||($t&536870912)!==0?i===si:!1}function TS(){var i=F.H;return F.H=cu,i===null?cu:i}function _S(){var i=F.A;return F.A=uD,i}function Jf(){Cn=4,qs||($t&4194048)!==$t&&qr.current!==null||(ja=!0),(Hs&134217727)===0&&($o&134217727)===0||ln===null||Ks(ln,$t,Vr,!1)}function wg(i,o,u){var f=Zt;Zt|=2;var b=TS(),w=_S();(ln!==i||$t!==o)&&(Xf=null,Ba(i,o)),o=!1;var M=Cn;e:do try{if(Qt!==0&&zt!==null){var V=zt,Q=Gr;switch(Qt){case 8:Sg(),M=6;break e;case 3:case 2:case 9:case 6:qr.current===null&&(o=!0);var de=Qt;if(Qt=0,Gr=null,Fa(i,V,Q,de),u&&ja){M=0;break e}break;default:de=Qt,Qt=0,Gr=null,Fa(i,V,Q,de)}}dD(),M=Cn;break}catch(ke){wS(i,ke)}while(!0);return o&&i.shellSuspendCounter++,Qi=No=null,Zt=f,F.H=b,F.A=w,zt===null&&(ln=null,$t=0,vf()),M}function dD(){for(;zt!==null;)RS(zt)}function pD(i,o){var u=Zt;Zt|=2;var f=TS(),b=_S();ln!==i||$t!==o?(Xf=null,Yf=re()+500,Ba(i,o)):ja=X(i,o);e:do try{if(Qt!==0&&zt!==null){o=zt;var w=Gr;t:switch(Qt){case 1:Qt=0,Gr=null,Fa(i,o,w,1);break;case 2:case 9:if(jk(w)){Qt=0,Gr=null,CS(o);break}o=function(){Qt!==2&&Qt!==9||ln!==i||(Qt=7),Mi(i)},w.then(o,o);break e;case 3:Qt=7;break e;case 4:Qt=5;break e;case 7:jk(w)?(Qt=0,Gr=null,CS(o)):(Qt=0,Gr=null,Fa(i,o,w,7));break;case 5:var M=null;switch(zt.tag){case 26:M=zt.memoizedState;case 5:case 27:var V=zt;if(M?pw(M):V.stateNode.complete){Qt=0,Gr=null;var Q=V.sibling;if(Q!==null)zt=Q;else{var de=V.return;de!==null?(zt=de,ed(de)):zt=null}break t}}Qt=0,Gr=null,Fa(i,o,w,5);break;case 6:Qt=0,Gr=null,Fa(i,o,w,6);break;case 8:Sg(),Cn=6;break e;default:throw Error(r(462))}}hD();break}catch(ke){wS(i,ke)}while(!0);return Qi=No=null,F.H=f,F.A=b,Zt=u,zt!==null?0:(ln=null,$t=0,vf(),Cn)}function hD(){for(;zt!==null&&!ce();)RS(zt)}function RS(i){var o=X0(i.alternate,i,ls);i.memoizedProps=i.pendingProps,o===null?ed(i):zt=o}function CS(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=G0(u,o,o.pendingProps,o.type,void 0,$t);break;case 11:o=G0(u,o,o.pendingProps,o.type.render,o.ref,$t);break;case 5:Pm(o);default:J0(u,o),o=zt=_k(o,ls),o=X0(u,o,ls)}i.memoizedProps=i.pendingProps,o===null?ed(i):zt=o}function Fa(i,o,u,f){Qi=No=null,Pm(o),Na=null,nu=0;var b=o.return;try{if(nD(i,b,o,u,$t)){Cn=1,Ff(i,ti(u,i.current)),zt=null;return}}catch(w){if(b!==null)throw zt=b,w;Cn=1,Ff(i,ti(u,i.current)),zt=null;return}o.flags&32768?(Ut||f===1?i=!0:ja||($t&536870912)!==0?i=!1:(qs=i=!0,(f===2||f===9||f===3||f===6)&&(f=qr.current,f!==null&&f.tag===13&&(f.flags|=16384))),AS(o,i)):ed(o)}function ed(i){var o=i;do{if((o.flags&32768)!==0){AS(o,qs);return}i=o.return;var u=sD(o.alternate,o,ls);if(u!==null){zt=u;return}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Cn===0&&(Cn=5)}function AS(i,o){do{var u=oD(i.alternate,i);if(u!==null){u.flags&=32767,zt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){zt=i;return}zt=i=u}while(i!==null);Cn=6,zt=null}function NS(i,o,u,f,b,w,M,V,Q){i.cancelPendingCommit=null;do td();while(Hn!==0);if((Zt&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=fm,$e(i,u,w,M,V,Q),i===ln&&(zt=ln=null,$t=0),$a=o,Vs=i,us=u,vg=w,xg=b,vS=f,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,yD(Ie,function(){return zS(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||f){f=F.T,F.T=null,b=U.p,U.p=2,M=Zt,Zt|=4;try{aD(i,o,u)}finally{Zt=M,U.p=b,F.T=f}}Hn=1,OS(),MS(),IS()}}function OS(){if(Hn===1){Hn=0;var i=Vs,o=$a,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=F.T,F.T=null;var f=U.p;U.p=2;var b=Zt;Zt|=4;try{fS(o,i);var w=zg,M=bk(i.containerInfo),V=w.focusedElem,Q=w.selectionRange;if(M!==V&&V&&V.ownerDocument&&gk(V.ownerDocument.documentElement,V)){if(Q!==null&&om(V)){var de=Q.start,ke=Q.end;if(ke===void 0&&(ke=de),"selectionStart"in V)V.selectionStart=de,V.selectionEnd=Math.min(ke,V.value.length);else{var Ae=V.ownerDocument||document,me=Ae&&Ae.defaultView||window;if(me.getSelection){var be=me.getSelection(),Qe=V.textContent.length,dt=Math.min(Q.start,Qe),nn=Q.end===void 0?dt:Math.min(Q.end,Qe);!be.extend&&dt>nn&&(M=nn,nn=dt,dt=M);var ae=mk(V,dt),se=mk(V,nn);if(ae&&se&&(be.rangeCount!==1||be.anchorNode!==ae.node||be.anchorOffset!==ae.offset||be.focusNode!==se.node||be.focusOffset!==se.offset)){var ue=Ae.createRange();ue.setStart(ae.node,ae.offset),be.removeAllRanges(),dt>nn?(be.addRange(ue),be.extend(se.node,se.offset)):(ue.setEnd(se.node,se.offset),be.addRange(ue))}}}}for(Ae=[],be=V;be=be.parentNode;)be.nodeType===1&&Ae.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Ae.length;V++){var Ee=Ae[V];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}pd=!!Dg,zg=Dg=null}finally{Zt=b,U.p=f,F.T=u}}i.current=o,Hn=2}}function MS(){if(Hn===2){Hn=0;var i=Vs,o=$a,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=F.T,F.T=null;var f=U.p;U.p=2;var b=Zt;Zt|=4;try{oS(i,o.alternate,o)}finally{Zt=b,U.p=f,F.T=u}}Hn=3}}function IS(){if(Hn===4||Hn===3){Hn=0,oe();var i=Vs,o=$a,u=us,f=vS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Hn=5:(Hn=0,$a=Vs=null,DS(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(Gs=null),Dt(u),o=o.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(it,o,void 0,(o.current.flags&128)===128)}catch{}if(f!==null){o=F.T,b=U.p,U.p=2,F.T=null;try{for(var w=i.onRecoverableError,M=0;M<f.length;M++){var V=f[M];w(V.value,{componentStack:V.stack})}}finally{F.T=o,U.p=b}}(us&3)!==0&&td(),Mi(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===kg?vu++:(vu=0,kg=i):vu=0,xu(0)}}function DS(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,eu(o)))}function td(){return OS(),MS(),IS(),zS()}function zS(){if(Hn!==5)return!1;var i=Vs,o=vg;vg=0;var u=Dt(us),f=F.T,b=U.p;try{U.p=32>u?32:u,F.T=null,u=xg,xg=null;var w=Vs,M=us;if(Hn=0,$a=Vs=null,us=0,(Zt&6)!==0)throw Error(r(331));var V=Zt;if(Zt|=4,gS(w.current),pS(w,w.current,M,u),Zt=V,xu(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(it,w)}catch{}return!0}finally{U.p=b,F.T=f,DS(i,o)}}function LS(i,o,u){o=ti(u,o),o=Jm(i.stateNode,o,2),i=$s(i,o,2),i!==null&&(St(i,2),Mi(i))}function Jt(i,o,u){if(i.tag===3)LS(i,i,u);else for(;o!==null;){if(o.tag===3){LS(o,i,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Gs===null||!Gs.has(f))){i=ti(u,i),u=j0(2),f=$s(o,u,2),f!==null&&(P0(u,f,o,i),St(f,2),Mi(f));break}}o=o.return}}function Eg(i,o,u){var f=i.pingCache;if(f===null){f=i.pingCache=new cD;var b=new Set;f.set(o,b)}else b=f.get(o),b===void 0&&(b=new Set,f.set(o,b));b.has(u)||(gg=!0,b.add(u),i=mD.bind(null,i,o,u),o.then(i,i))}function mD(i,o,u){var f=i.pingCache;f!==null&&f.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,ln===i&&($t&u)===u&&(Cn===4||Cn===3&&($t&62914560)===$t&&300>re()-Wf?(Zt&2)===0&&Ba(i,0):bg|=u,Pa===$t&&(Pa=0)),Mi(i)}function jS(i,o){o===0&&(o=Ge()),i=Ro(i,o),i!==null&&(St(i,o),Mi(i))}function gD(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),jS(i,u)}function bD(i,o){var u=0;switch(i.tag){case 31:case 13:var f=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(o),jS(i,u)}function yD(i,o){return Pe(i,o)}var nd=null,Ua=null,Tg=!1,rd=!1,_g=!1,Zs=0;function Mi(i){i!==Ua&&i.next===null&&(Ua===null?nd=Ua=i:Ua=Ua.next=i),rd=!0,Tg||(Tg=!0,xD())}function xu(i,o){if(!_g&&rd){_g=!0;do for(var u=!1,f=nd;f!==null;){if(i!==0){var b=f.pendingLanes;if(b===0)var w=0;else{var M=f.suspendedLanes,V=f.pingedLanes;w=(1<<31-st(42|i)+1)-1,w&=b&~(M&~V),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,FS(f,w))}else w=$t,w=Y(f,f===ln?w:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(w&3)===0||X(f,w)||(u=!0,FS(f,w));f=f.next}while(u);_g=!1}}function vD(){PS()}function PS(){rd=Tg=!1;var i=0;Zs!==0&&ND()&&(i=Zs);for(var o=re(),u=null,f=nd;f!==null;){var b=f.next,w=$S(f,o);w===0?(f.next=null,u===null?nd=b:u.next=b,b===null&&(Ua=u)):(u=f,(i!==0||(w&3)!==0)&&(rd=!0)),f=b}Hn!==0&&Hn!==5||xu(i),Zs!==0&&(Zs=0)}function $S(i,o){for(var u=i.suspendedLanes,f=i.pingedLanes,b=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var M=31-st(w),V=1<<M,Q=b[M];Q===-1?((V&u)===0||(V&f)!==0)&&(b[M]=we(V,o)):Q<=o&&(i.expiredLanes|=V),w&=~V}if(o=ln,u=$t,u=Y(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,u===0||i===o&&(Qt===2||Qt===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&ge(f),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||X(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(f!==null&&ge(f),Dt(u)){case 2:case 8:u=fe;break;case 32:u=Ie;break;case 268435456:u=Ze;break;default:u=Ie}return f=BS.bind(null,i),u=Pe(u,f),i.callbackPriority=o,i.callbackNode=u,o}return f!==null&&f!==null&&ge(f),i.callbackPriority=2,i.callbackNode=null,2}function BS(i,o){if(Hn!==0&&Hn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(td()&&i.callbackNode!==u)return null;var f=$t;return f=Y(i,i===ln?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(kS(i,f,o),$S(i,re()),i.callbackNode!=null&&i.callbackNode===u?BS.bind(null,i):null)}function FS(i,o){if(td())return null;kS(i,o,!0)}function xD(){MD(function(){(Zt&6)!==0?Pe(J,vD):PS()})}function Rg(){if(Zs===0){var i=Ra;i===0&&(i=Be,Be<<=1,(Be&261888)===0&&(Be=256)),Zs=i}return Zs}function US(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Os(""+i)}function qS(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function kD(i,o,u,f,b){if(o==="submit"&&u&&u.stateNode===b){var w=US((b[Jn]||null).action),M=f.submitter;M&&(o=(o=M[Jn]||null)?US(o.formAction):M.getAttribute("formAction"),o!==null&&(w=o,M=null));var V=new mf("action","action",null,f,b);i.push({event:V,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Zs!==0){var Q=M?qS(b,M):new FormData(b);Km(u,{pending:!0,data:Q,method:b.method,action:w},null,Q)}}else typeof w=="function"&&(V.preventDefault(),Q=M?qS(b,M):new FormData(b),Km(u,{pending:!0,data:Q,method:b.method,action:w},w,Q))},currentTarget:b}]})}}for(var Cg=0;Cg<cm.length;Cg++){var Ag=cm[Cg],SD=Ag.toLowerCase(),wD=Ag[0].toUpperCase()+Ag.slice(1);bi(SD,"on"+wD)}bi(xk,"onAnimationEnd"),bi(kk,"onAnimationIteration"),bi(Sk,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi($I,"onTransitionRun"),bi(BI,"onTransitionStart"),bi(FI,"onTransitionCancel"),bi(wk,"onTransitionEnd"),De("onMouseEnter",["mouseout","mouseover"]),De("onMouseLeave",["mouseout","mouseover"]),De("onPointerEnter",["pointerout","pointerover"]),De("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ku="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(" "),ED=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ku));function HS(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var f=i[u],b=f.event;f=f.listeners;e:{var w=void 0;if(o)for(var M=f.length-1;0<=M;M--){var V=f[M],Q=V.instance,de=V.currentTarget;if(V=V.listener,Q!==w&&b.isPropagationStopped())break e;w=V,b.currentTarget=de;try{w(b)}catch(ke){yf(ke)}b.currentTarget=null,w=Q}else for(M=0;M<f.length;M++){if(V=f[M],Q=V.instance,de=V.currentTarget,V=V.listener,Q!==w&&b.isPropagationStopped())break e;w=V,b.currentTarget=de;try{w(b)}catch(ke){yf(ke)}b.currentTarget=null,w=Q}}}}function Lt(i,o){var u=o[jl];u===void 0&&(u=o[jl]=new Set);var f=i+"__bubble";u.has(f)||(GS(o,i,2,!1),u.add(f))}function Ng(i,o,u){var f=0;o&&(f|=4),GS(u,i,f,o)}var id="_reactListening"+Math.random().toString(36).slice(2);function Og(i){if(!i[id]){i[id]=!0,af.forEach(function(u){u!=="selectionchange"&&(ED.has(u)||Ng(u,!1,i),Ng(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[id]||(o[id]=!0,Ng("selectionchange",!1,o))}}function GS(i,o,u,f){switch(xw(o)){case 2:var b=QD;break;case 8:b=JD;break;default:b=Vg}u=b.bind(null,o,u,i),b=void 0,!Xh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(b=!0),f?b!==void 0?i.addEventListener(o,u,{capture:!0,passive:b}):i.addEventListener(o,u,!0):b!==void 0?i.addEventListener(o,u,{passive:b}):i.addEventListener(o,u,!1)}function Mg(i,o,u,f,b){var w=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var M=f.tag;if(M===3||M===4){var V=f.stateNode.containerInfo;if(V===b)break;if(M===4)for(M=f.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;V!==null;){if(M=yr(V),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){f=w=M;continue e}V=V.parentNode}}f=f.return}ff(function(){var de=w,ke=Tt(u),Ae=[];e:{var me=Ek.get(i);if(me!==void 0){var be=mf,Qe=i;switch(i){case"keypress":if(pf(u)===0)break e;case"keydown":case"keyup":be=bI;break;case"focusin":Qe="focus",be=tm;break;case"focusout":Qe="blur",be=tm;break;case"beforeblur":case"afterblur":be=tm;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=Jx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=sI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=xI;break;case xk:case kk:case Sk:be=lI;break;case wk:be=SI;break;case"scroll":case"scrollend":be=rI;break;case"wheel":be=EI;break;case"copy":case"cut":case"paste":be=cI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=tk;break;case"toggle":case"beforetoggle":be=_I}var dt=(o&4)!==0,nn=!dt&&(i==="scroll"||i==="scrollend"),ae=dt?me!==null?me+"Capture":null:me;dt=[];for(var se=de,ue;se!==null;){var Ee=se;if(ue=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ue===null||ae===null||(Ee=ql(se,ae),Ee!=null&&dt.push(Su(se,Ee,ue))),nn)break;se=se.return}0<dt.length&&(me=new be(me,Qe,null,u,ke),Ae.push({event:me,listeners:dt}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",be=i==="mouseout"||i==="pointerout",me&&u!==Je&&(Qe=u.relatedTarget||u.fromElement)&&(yr(Qe)||Qe[Gi]))break e;if((be||me)&&(me=ke.window===ke?ke:(me=ke.ownerDocument)?me.defaultView||me.parentWindow:window,be?(Qe=u.relatedTarget||u.toElement,be=de,Qe=Qe?yr(Qe):null,Qe!==null&&(nn=a(Qe),dt=Qe.tag,Qe!==nn||dt!==5&&dt!==27&&dt!==6)&&(Qe=null)):(be=null,Qe=de),be!==Qe)){if(dt=Jx,Ee="onMouseLeave",ae="onMouseEnter",se="mouse",(i==="pointerout"||i==="pointerover")&&(dt=tk,Ee="onPointerLeave",ae="onPointerEnter",se="pointer"),nn=be==null?me:Cs(be),ue=Qe==null?me:Cs(Qe),me=new dt(Ee,se+"leave",be,u,ke),me.target=nn,me.relatedTarget=ue,Ee=null,yr(ke)===de&&(dt=new dt(ae,se+"enter",Qe,u,ke),dt.target=ue,dt.relatedTarget=nn,Ee=dt),nn=Ee,be&&Qe)t:{for(dt=TD,ae=be,se=Qe,ue=0,Ee=ae;Ee;Ee=dt(Ee))ue++;Ee=0;for(var ut=se;ut;ut=dt(ut))Ee++;for(;0<ue-Ee;)ae=dt(ae),ue--;for(;0<Ee-ue;)se=dt(se),Ee--;for(;ue--;){if(ae===se||se!==null&&ae===se.alternate){dt=ae;break t}ae=dt(ae),se=dt(se)}dt=null}else dt=null;be!==null&&VS(Ae,me,be,dt,!1),Qe!==null&&nn!==null&&VS(Ae,nn,Qe,dt,!0)}}e:{if(me=de?Cs(de):window,be=me.nodeName&&me.nodeName.toLowerCase(),be==="select"||be==="input"&&me.type==="file")var Gt=uk;else if(ak(me))if(ck)Gt=LI;else{Gt=DI;var et=II}else be=me.nodeName,!be||be.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?de&&Ns(de.elementType)&&(Gt=uk):Gt=zI;if(Gt&&(Gt=Gt(i,de))){lk(Ae,Gt,u,ke);break e}et&&et(i,me,de),i==="focusout"&&de&&me.type==="number"&&de.memoizedProps.value!=null&&ga(me,"number",me.value)}switch(et=de?Cs(de):window,i){case"focusin":(ak(et)||et.contentEditable==="true")&&(va=et,am=de,Xl=null);break;case"focusout":Xl=am=va=null;break;case"mousedown":lm=!0;break;case"contextmenu":case"mouseup":case"dragend":lm=!1,yk(Ae,u,ke);break;case"selectionchange":if(PI)break;case"keydown":case"keyup":yk(Ae,u,ke)}var Ct;if(rm)e:{switch(i){case"compositionstart":var Bt="onCompositionStart";break e;case"compositionend":Bt="onCompositionEnd";break e;case"compositionupdate":Bt="onCompositionUpdate";break e}Bt=void 0}else ya?sk(i,u)&&(Bt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Bt="onCompositionStart");Bt&&(nk&&u.locale!=="ko"&&(ya||Bt!=="onCompositionStart"?Bt==="onCompositionEnd"&&ya&&(Ct=Xx()):(Ms=ke,Qh="value"in Ms?Ms.value:Ms.textContent,ya=!0)),et=sd(de,Bt),0<et.length&&(Bt=new ek(Bt,i,null,u,ke),Ae.push({event:Bt,listeners:et}),Ct?Bt.data=Ct:(Ct=ok(u),Ct!==null&&(Bt.data=Ct)))),(Ct=CI?AI(i,u):NI(i,u))&&(Bt=sd(de,"onBeforeInput"),0<Bt.length&&(et=new ek("onBeforeInput","beforeinput",null,u,ke),Ae.push({event:et,listeners:Bt}),et.data=Ct)),kD(Ae,i,de,u,ke)}HS(Ae,o)})}function Su(i,o,u){return{instance:i,listener:o,currentTarget:u}}function sd(i,o){for(var u=o+"Capture",f=[];i!==null;){var b=i,w=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||w===null||(b=ql(i,u),b!=null&&f.unshift(Su(i,b,w)),b=ql(i,o),b!=null&&f.push(Su(i,b,w))),i.tag===3)return f;i=i.return}return[]}function TD(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function VS(i,o,u,f,b){for(var w=o._reactName,M=[];u!==null&&u!==f;){var V=u,Q=V.alternate,de=V.stateNode;if(V=V.tag,Q!==null&&Q===f)break;V!==5&&V!==26&&V!==27||de===null||(Q=de,b?(de=ql(u,w),de!=null&&M.unshift(Su(u,de,Q))):b||(de=ql(u,w),de!=null&&M.push(Su(u,de,Q)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var _D=/\r\n?/g,RD=/\u0000|\uFFFD/g;function KS(i){return(typeof i=="string"?i:""+i).replace(_D,`
9
+ `).replace(RD,"")}function ZS(i,o){return o=KS(o),KS(i)===o}function tn(i,o,u,f,b,w){switch(u){case"children":typeof f=="string"?o==="body"||o==="textarea"&&f===""||mt(i,f):(typeof f=="number"||typeof f=="bigint")&&o!=="body"&&mt(i,""+f);break;case"className":$r(i,"class",f);break;case"tabIndex":$r(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":$r(i,u,f);break;case"style":Xt(i,f,w);break;case"data":if(o!=="object"){$r(i,"data",f);break}case"src":case"href":if(f===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(u);break}f=Os(""+f),i.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(o!=="input"&&tn(i,o,"name",b.name,b,null),tn(i,o,"formEncType",b.formEncType,b,null),tn(i,o,"formMethod",b.formMethod,b,null),tn(i,o,"formTarget",b.formTarget,b,null)):(tn(i,o,"encType",b.encType,b,null),tn(i,o,"method",b.method,b,null),tn(i,o,"target",b.target,b,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(u);break}f=Os(""+f),i.setAttribute(u,f);break;case"onClick":f!=null&&(i.onclick=Fe);break;case"onScroll":f!=null&&Lt("scroll",i);break;case"onScrollEnd":f!=null&&Lt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}u=Os(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,""+f):i.removeAttribute(u);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":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":f===!0?i.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,f):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(u,f):i.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(u):i.setAttribute(u,f);break;case"popover":Lt("beforetoggle",i),Lt("toggle",i),ar(i,"popover",f);break;case"xlinkActuate":Tr(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Tr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Tr(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Tr(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Tr(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Tr(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Tr(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":ar(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Zi.get(u)||u,ar(i,u,f))}}function Ig(i,o,u,f,b,w){switch(u){case"style":Xt(i,f,w);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof f=="string"?mt(i,f):(typeof f=="number"||typeof f=="bigint")&&mt(i,""+f);break;case"onScroll":f!=null&&Lt("scroll",i);break;case"onScrollEnd":f!=null&&Lt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=Fe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!So.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),o=u.slice(2,b?u.length-7:void 0),w=i[Jn]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(o,w,b),typeof f=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,f,b);break e}u in i?i[u]=f:f===!0?i.setAttribute(u,""):ar(i,u,f)}}}function ir(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Lt("error",i),Lt("load",i);var f=!1,b=!1,w;for(w in u)if(u.hasOwnProperty(w)){var M=u[w];if(M!=null)switch(w){case"src":f=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:tn(i,o,w,M,u,null)}}b&&tn(i,o,"srcSet",u.srcSet,u,null),f&&tn(i,o,"src",u.src,u,null);return;case"input":Lt("invalid",i);var V=w=M=b=null,Q=null,de=null;for(f in u)if(u.hasOwnProperty(f)){var ke=u[f];if(ke!=null)switch(f){case"name":b=ke;break;case"type":M=ke;break;case"checked":Q=ke;break;case"defaultChecked":de=ke;break;case"value":w=ke;break;case"defaultValue":V=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,o));break;default:tn(i,o,f,ke,u,null)}}wo(i,w,V,Q,de,M,b,!1);return;case"select":Lt("invalid",i),f=M=w=null;for(b in u)if(u.hasOwnProperty(b)&&(V=u[b],V!=null))switch(b){case"value":w=V;break;case"defaultValue":M=V;break;case"multiple":f=V;default:tn(i,o,b,V,u,null)}o=w,u=M,i.multiple=!!f,o!=null?er(i,!!f,o,!1):u!=null&&er(i,!!f,u,!0);return;case"textarea":Lt("invalid",i),w=b=f=null;for(M in u)if(u.hasOwnProperty(M)&&(V=u[M],V!=null))switch(M){case"value":f=V;break;case"defaultValue":b=V;break;case"children":w=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:tn(i,o,M,V,u,null)}ba(i,f,b,w);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(f=u[Q],f!=null)&&(Q==="selected"?i.selected=f&&typeof f!="function"&&typeof f!="symbol":tn(i,o,Q,f,u,null));return;case"dialog":Lt("beforetoggle",i),Lt("toggle",i),Lt("cancel",i),Lt("close",i);break;case"iframe":case"object":Lt("load",i);break;case"video":case"audio":for(f=0;f<ku.length;f++)Lt(ku[f],i);break;case"image":Lt("error",i),Lt("load",i);break;case"details":Lt("toggle",i);break;case"embed":case"source":case"link":Lt("error",i),Lt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(f=u[de],f!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:tn(i,o,de,f,u,null)}return;default:if(Ns(o)){for(ke in u)u.hasOwnProperty(ke)&&(f=u[ke],f!==void 0&&Ig(i,o,ke,f,u,void 0));return}}for(V in u)u.hasOwnProperty(V)&&(f=u[V],f!=null&&tn(i,o,V,f,u,null))}function CD(i,o,u,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,w=null,M=null,V=null,Q=null,de=null,ke=null;for(be in u){var Ae=u[be];if(u.hasOwnProperty(be)&&Ae!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":Q=Ae;default:f.hasOwnProperty(be)||tn(i,o,be,null,f,Ae)}}for(var me in f){var be=f[me];if(Ae=u[me],f.hasOwnProperty(me)&&(be!=null||Ae!=null))switch(me){case"type":w=be;break;case"name":b=be;break;case"checked":de=be;break;case"defaultChecked":ke=be;break;case"value":M=be;break;case"defaultValue":V=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,o));break;default:be!==Ae&&tn(i,o,me,be,f,Ae)}}Bl(i,M,V,Q,de,ke,w,b);return;case"select":be=M=V=me=null;for(w in u)if(Q=u[w],u.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":be=Q;default:f.hasOwnProperty(w)||tn(i,o,w,null,f,Q)}for(b in f)if(w=f[b],Q=u[b],f.hasOwnProperty(b)&&(w!=null||Q!=null))switch(b){case"value":me=w;break;case"defaultValue":V=w;break;case"multiple":M=w;default:w!==Q&&tn(i,o,b,w,f,Q)}o=V,u=M,f=be,me!=null?er(i,!!u,me,!1):!!f!=!!u&&(o!=null?er(i,!!u,o,!0):er(i,!!u,u?[]:"",!1));return;case"textarea":be=me=null;for(V in u)if(b=u[V],u.hasOwnProperty(V)&&b!=null&&!f.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:tn(i,o,V,null,f,b)}for(M in f)if(b=f[M],w=u[M],f.hasOwnProperty(M)&&(b!=null||w!=null))switch(M){case"value":me=b;break;case"defaultValue":be=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==w&&tn(i,o,M,b,f,w)}uf(i,me,be);return;case"option":for(var Qe in u)me=u[Qe],u.hasOwnProperty(Qe)&&me!=null&&!f.hasOwnProperty(Qe)&&(Qe==="selected"?i.selected=!1:tn(i,o,Qe,null,f,me));for(Q in f)me=f[Q],be=u[Q],f.hasOwnProperty(Q)&&me!==be&&(me!=null||be!=null)&&(Q==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":tn(i,o,Q,me,f,be));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 dt in u)me=u[dt],u.hasOwnProperty(dt)&&me!=null&&!f.hasOwnProperty(dt)&&tn(i,o,dt,null,f,me);for(de in f)if(me=f[de],be=u[de],f.hasOwnProperty(de)&&me!==be&&(me!=null||be!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,o));break;default:tn(i,o,de,me,f,be)}return;default:if(Ns(o)){for(var nn in u)me=u[nn],u.hasOwnProperty(nn)&&me!==void 0&&!f.hasOwnProperty(nn)&&Ig(i,o,nn,void 0,f,me);for(ke in f)me=f[ke],be=u[ke],!f.hasOwnProperty(ke)||me===be||me===void 0&&be===void 0||Ig(i,o,ke,me,f,be);return}}for(var ae in u)me=u[ae],u.hasOwnProperty(ae)&&me!=null&&!f.hasOwnProperty(ae)&&tn(i,o,ae,null,f,me);for(Ae in f)me=f[Ae],be=u[Ae],!f.hasOwnProperty(Ae)||me===be||me==null&&be==null||tn(i,o,Ae,me,f,be)}function WS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function AD(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var b=u[f],w=b.transferSize,M=b.initiatorType,V=b.duration;if(w&&V&&WS(M)){for(M=0,V=b.responseEnd,f+=1;f<u.length;f++){var Q=u[f],de=Q.startTime;if(de>V)break;var ke=Q.transferSize,Ae=Q.initiatorType;ke&&WS(Ae)&&(Q=Q.responseEnd,M+=ke*(Q<V?1:(V-de)/(Q-de)))}if(--f,o+=8*(w+M)/(b.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Dg=null,zg=null;function od(i){return i.nodeType===9?i:i.ownerDocument}function YS(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function XS(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function Lg(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var jg=null;function ND(){var i=window.event;return i&&i.type==="popstate"?i===jg?!1:(jg=i,!0):(jg=null,!1)}var QS=typeof setTimeout=="function"?setTimeout:void 0,OD=typeof clearTimeout=="function"?clearTimeout:void 0,JS=typeof Promise=="function"?Promise:void 0,MD=typeof queueMicrotask=="function"?queueMicrotask:typeof JS<"u"?function(i){return JS.resolve(null).then(i).catch(ID)}:QS;function ID(i){setTimeout(function(){throw i})}function Ws(i){return i==="head"}function ew(i,o){var u=o,f=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(f===0){i.removeChild(b),Va(o);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")wu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,wu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,V=w.nodeName;w[ko]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&wu(i.ownerDocument.body);u=b}while(u);Va(o)}function tw(i,o){var u=i;i=0;do{var f=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=f}while(u)}function Pg(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Pg(u),Pl(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function DD(i,o,u,f){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[ko])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var w=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=oi(i.nextSibling),i===null)break}return null}function zD(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=oi(i.nextSibling),i===null))return null;return i}function nw(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=oi(i.nextSibling),i===null))return null;return i}function $g(i){return i.data==="$?"||i.data==="$~"}function Bg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function LD(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var f=function(){o(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function oi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var Fg=null;function rw(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return oi(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function iw(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function sw(i,o,u){switch(o=od(u),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function wu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Pl(i)}var ai=new Map,ow=new Set;function ad(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var cs=U.d;U.d={f:jD,r:PD,D:$D,C:BD,L:FD,m:UD,X:HD,S:qD,M:GD};function jD(){var i=cs.f(),o=Qf();return i||o}function PD(i){var o=Vi(i);o!==null&&o.tag===5&&o.type==="form"?w0(o):cs.r(i)}var qa=typeof document>"u"?null:document;function aw(i,o,u){var f=qa;if(f&&typeof o=="string"&&o){var b=_r(o);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),ow.has(b)||(ow.add(b),i={rel:i,crossOrigin:u,href:o},f.querySelector(b)===null&&(o=f.createElement("link"),ir(o,"link",i),zn(o),f.head.appendChild(o)))}}function $D(i){cs.D(i),aw("dns-prefetch",i,null)}function BD(i,o){cs.C(i,o),aw("preconnect",i,o)}function FD(i,o,u){cs.L(i,o,u);var f=qa;if(f&&i&&o){var b='link[rel="preload"][as="'+_r(o)+'"]';o==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+_r(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+_r(u.imageSizes)+'"]')):b+='[href="'+_r(i)+'"]';var w=b;switch(o){case"style":w=Ha(i);break;case"script":w=Ga(i)}ai.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),ai.set(w,i),f.querySelector(b)!==null||o==="style"&&f.querySelector(Eu(w))||o==="script"&&f.querySelector(Tu(w))||(o=f.createElement("link"),ir(o,"link",i),zn(o),f.head.appendChild(o)))}}function UD(i,o){cs.m(i,o);var u=qa;if(u&&i){var f=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+_r(f)+'"][href="'+_r(i)+'"]',w=b;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ga(i)}if(!ai.has(w)&&(i=m({rel:"modulepreload",href:i},o),ai.set(w,i),u.querySelector(b)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Tu(w)))return}f=u.createElement("link"),ir(f,"link",i),zn(f),u.head.appendChild(f)}}}function qD(i,o,u){cs.S(i,o,u);var f=qa;if(f&&i){var b=As(f).hoistableStyles,w=Ha(i);o=o||"default";var M=b.get(w);if(!M){var V={loading:0,preload:null};if(M=f.querySelector(Eu(w)))V.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=ai.get(w))&&Ug(i,u);var Q=M=f.createElement("link");zn(Q),ir(Q,"link",i),Q._p=new Promise(function(de,ke){Q.onload=de,Q.onerror=ke}),Q.addEventListener("load",function(){V.loading|=1}),Q.addEventListener("error",function(){V.loading|=2}),V.loading|=4,ld(M,o,f)}M={type:"stylesheet",instance:M,count:1,state:V},b.set(w,M)}}}function HD(i,o){cs.X(i,o);var u=qa;if(u&&i){var f=As(u).hoistableScripts,b=Ga(i),w=f.get(b);w||(w=u.querySelector(Tu(b)),w||(i=m({src:i,async:!0},o),(o=ai.get(b))&&qg(i,o),w=u.createElement("script"),zn(w),ir(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(b,w))}}function GD(i,o){cs.M(i,o);var u=qa;if(u&&i){var f=As(u).hoistableScripts,b=Ga(i),w=f.get(b);w||(w=u.querySelector(Tu(b)),w||(i=m({src:i,async:!0,type:"module"},o),(o=ai.get(b))&&qg(i,o),w=u.createElement("script"),zn(w),ir(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(b,w))}}function lw(i,o,u,f){var b=(b=ne.current)?ad(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=Ha(u.href),u=As(b).hoistableStyles,f=u.get(o),f||(f={type:"style",instance:null,count:0,state:null},u.set(o,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Ha(u.href);var w=As(b).hoistableStyles,M=w.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,M),(w=b.querySelector(Eu(i)))&&!w._p&&(M.instance=w,M.state.loading=5),ai.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},ai.set(i,u),w||VD(b,i,u,M.state))),o&&f===null)throw Error(r(528,""));return M}if(o&&f!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ga(u),u=As(b).hoistableScripts,f=u.get(o),f||(f={type:"script",instance:null,count:0,state:null},u.set(o,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Ha(i){return'href="'+_r(i)+'"'}function Eu(i){return'link[rel="stylesheet"]['+i+"]"}function uw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function VD(i,o,u,f){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?f.loading=1:(o=i.createElement("link"),f.preload=o,o.addEventListener("load",function(){return f.loading|=1}),o.addEventListener("error",function(){return f.loading|=2}),ir(o,"link",u),zn(o),i.head.appendChild(o))}function Ga(i){return'[src="'+_r(i)+'"]'}function Tu(i){return"script[async]"+i}function cw(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var f=i.querySelector('style[data-href~="'+_r(u.href)+'"]');if(f)return o.instance=f,zn(f),f;var b=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),zn(f),ir(f,"style",b),ld(f,u.precedence,i),o.instance=f;case"stylesheet":b=Ha(u.href);var w=i.querySelector(Eu(b));if(w)return o.state.loading|=4,o.instance=w,zn(w),w;f=uw(u),(b=ai.get(b))&&Ug(f,b),w=(i.ownerDocument||i).createElement("link"),zn(w);var M=w;return M._p=new Promise(function(V,Q){M.onload=V,M.onerror=Q}),ir(w,"link",f),o.state.loading|=4,ld(w,u.precedence,i),o.instance=w;case"script":return w=Ga(u.src),(b=i.querySelector(Tu(w)))?(o.instance=b,zn(b),b):(f=u,(b=ai.get(w))&&(f=m({},u),qg(f,b)),i=i.ownerDocument||i,b=i.createElement("script"),zn(b),ir(b,"link",f),i.head.appendChild(b),o.instance=b);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(f=o.instance,o.state.loading|=4,ld(f,u.precedence,i));return o.instance}function ld(i,o,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=f.length?f[f.length-1]:null,w=b,M=0;M<f.length;M++){var V=f[M];if(V.dataset.precedence===o)w=V;else if(w!==b)break}w?w.parentNode.insertBefore(i,w.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function Ug(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function qg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var ud=null;function fw(i,o,u){if(ud===null){var f=new Map,b=ud=new Map;b.set(u,f)}else b=ud,f=b.get(u),f||(f=new Map,b.set(u,f));if(f.has(i))return f;for(f.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var w=u[b];if(!(w[ko]||w[an]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(o)||"";M=i+M;var V=f.get(M);V?V.push(w):f.set(M,[w])}}return f}function dw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function KD(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function pw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function ZD(i,o,u,f){if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=Ha(f.href),w=o.querySelector(Eu(b));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=cd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,zn(w);return}w=o.ownerDocument||o,f=uw(f),(b=ai.get(b))&&Ug(f,b),w=w.createElement("link"),zn(w);var M=w;M._p=new Promise(function(V,Q){M.onload=V,M.onerror=Q}),ir(w,"link",f),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=cd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Hg=0;function WD(i,o){return i.stylesheets&&i.count===0&&dd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var f=setTimeout(function(){if(i.stylesheets&&dd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&Hg===0&&(Hg=62500*AD());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&dd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>Hg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(b)}}:null}function cd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var fd=null;function dd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,fd=new Map,o.forEach(YD,i),fd=null,cd.call(i))}function YD(i,o){if(!(o.state.loading&4)){var u=fd.get(i);if(u)var f=u.get(null);else{u=new Map,fd.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<b.length;w++){var M=b[w];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),f=M)}f&&u.set(null,f)}b=o.instance,M=b.getAttribute("data-precedence"),w=u.get(M)||f,w===f&&u.set(null,b),u.set(M,b),this.count++,f=cd.bind(this),b.addEventListener("load",f),b.addEventListener("error",f),w?w.parentNode.insertBefore(b,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),o.state.loading|=4}}var _u={$$typeof:_,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function XD(i,o,u,f,b,w,M,V,Q){this.tag=1,this.containerInfo=i,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=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=f,this.onUncaughtError=b,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function hw(i,o,u,f,b,w,M,V,Q,de,ke,Ae){return i=new XD(i,o,u,M,Q,de,ke,Ae,V),o=1,w===!0&&(o|=24),w=Ur(3,null,null,o),i.current=w,w.stateNode=i,o=wm(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:f,isDehydrated:u,cache:o},Rm(w),i}function mw(i){return i?(i=Sa,i):Sa}function gw(i,o,u,f,b,w){b=mw(b),f.context===null?f.context=b:f.pendingContext=b,f=Ps(o),f.payload={element:u},w=w===void 0?null:w,w!==null&&(f.callback=w),u=$s(i,f,o),u!==null&&(Mr(u,i,o),iu(u,i,o))}function bw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Gg(i,o){bw(i,o),(i=i.alternate)&&bw(i,o)}function yw(i){if(i.tag===13||i.tag===31){var o=Ro(i,67108864);o!==null&&Mr(o,i,67108864),Gg(i,67108864)}}function vw(i){if(i.tag===13||i.tag===31){var o=Kr();o=tt(o);var u=Ro(i,o);u!==null&&Mr(u,i,o),Gg(i,o)}}var pd=!0;function QD(i,o,u,f){var b=F.T;F.T=null;var w=U.p;try{U.p=2,Vg(i,o,u,f)}finally{U.p=w,F.T=b}}function JD(i,o,u,f){var b=F.T;F.T=null;var w=U.p;try{U.p=8,Vg(i,o,u,f)}finally{U.p=w,F.T=b}}function Vg(i,o,u,f){if(pd){var b=Kg(f);if(b===null)Mg(i,o,f,hd,u),kw(i,f);else if(tz(b,i,o,u,f))f.stopPropagation();else if(kw(i,f),o&4&&-1<ez.indexOf(i)){for(;b!==null;){var w=Vi(b);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=Xe(w.pendingLanes);if(M!==0){var V=w;for(V.pendingLanes|=2,V.entangledLanes|=2;M;){var Q=1<<31-st(M);V.entanglements[1]|=Q,M&=~Q}Mi(w),(Zt&6)===0&&(Yf=re()+500,xu(0))}}break;case 31:case 13:V=Ro(w,2),V!==null&&Mr(V,w,2),Qf(),Gg(w,2)}if(w=Kg(f),w===null&&Mg(i,o,f,hd,u),w===b)break;b=w}b!==null&&f.stopPropagation()}else Mg(i,o,f,null,u)}}function Kg(i){return i=Tt(i),Zg(i)}var hd=null;function Zg(i){if(hd=null,i=yr(i),i!==null){var o=a(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return hd=i,null}function xw(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(_e()){case J:return 2;case fe:return 8;case Ie:case Ue:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var Wg=!1,Ys=null,Xs=null,Qs=null,Ru=new Map,Cu=new Map,Js=[],ez="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 kw(i,o){switch(i){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Xs=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":Ru.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cu.delete(o.pointerId)}}function Au(i,o,u,f,b,w){return i===null||i.nativeEvent!==w?(i={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[b]},o!==null&&(o=Vi(o),o!==null&&yw(o)),i):(i.eventSystemFlags|=f,o=i.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),i)}function tz(i,o,u,f,b){switch(o){case"focusin":return Ys=Au(Ys,i,o,u,f,b),!0;case"dragenter":return Xs=Au(Xs,i,o,u,f,b),!0;case"mouseover":return Qs=Au(Qs,i,o,u,f,b),!0;case"pointerover":var w=b.pointerId;return Ru.set(w,Au(Ru.get(w)||null,i,o,u,f,b)),!0;case"gotpointercapture":return w=b.pointerId,Cu.set(w,Au(Cu.get(w)||null,i,o,u,f,b)),!0}return!1}function Sw(i){var o=yr(i.target);if(o!==null){var u=a(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,Qn(i.priority,function(){vw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Qn(i.priority,function(){vw(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function md(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Kg(i.nativeEvent);if(u===null){u=i.nativeEvent;var f=new u.constructor(u.type,u);Je=f,u.target.dispatchEvent(f),Je=null}else return o=Vi(u),o!==null&&yw(o),i.blockedOn=u,!1;o.shift()}return!0}function ww(i,o,u){md(i)&&u.delete(o)}function nz(){Wg=!1,Ys!==null&&md(Ys)&&(Ys=null),Xs!==null&&md(Xs)&&(Xs=null),Qs!==null&&md(Qs)&&(Qs=null),Ru.forEach(ww),Cu.forEach(ww)}function gd(i,o){i.blockedOn===o&&(i.blockedOn=null,Wg||(Wg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nz)))}var bd=null;function Ew(i){bd!==i&&(bd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bd===i&&(bd=null);for(var o=0;o<i.length;o+=3){var u=i[o],f=i[o+1],b=i[o+2];if(typeof f!="function"){if(Zg(f||u)===null)continue;break}var w=Vi(u);w!==null&&(i.splice(o,3),o-=3,Km(w,{pending:!0,data:b,method:u.method,action:f},f,b))}}))}function Va(i){function o(Q){return gd(Q,i)}Ys!==null&&gd(Ys,i),Xs!==null&&gd(Xs,i),Qs!==null&&gd(Qs,i),Ru.forEach(o),Cu.forEach(o);for(var u=0;u<Js.length;u++){var f=Js[u];f.blockedOn===i&&(f.blockedOn=null)}for(;0<Js.length&&(u=Js[0],u.blockedOn===null);)Sw(u),u.blockedOn===null&&Js.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var b=u[f],w=u[f+1],M=b[Jn]||null;if(typeof w=="function")M||Ew(u);else if(M){var V=null;if(w&&w.hasAttribute("formAction")){if(b=w,M=w[Jn]||null)V=M.formAction;else if(Zg(b)!==null)continue}else V=M.action;typeof V=="function"?u[f+1]=V:(u.splice(f,3),f-=3),Ew(u)}}}function Tw(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(M){return b=M})},focusReset:"manual",scroll:"manual"})}function o(){b!==null&&(b(),b=null),f||setTimeout(u,20)}function u(){if(!f&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),b!==null&&(b(),b=null)}}}function Yg(i){this._internalRoot=i}yd.prototype.render=Yg.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,f=Kr();gw(u,f,i,o,null,null)},yd.prototype.unmount=Yg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;gw(i.current,2,null,i,null,null),Qf(),o[Gi]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var o=Kn();i={blockedOn:null,target:i,priority:o};for(var u=0;u<Js.length&&o!==0&&o<Js[u].priority;u++);Js.splice(u,0,i),u===0&&Sw(i)}};var _w=t.version;if(_w!=="19.2.6")throw Error(r(527,_w,"19.2.6"));U.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=p(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var rz={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vd.isDisabled&&vd.supportsFiber)try{it=vd.inject(rz),nt=vd}catch{}}return Ou.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,f="",b=I0,w=D0,M=z0;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=hw(i,1,!1,null,null,u,f,null,b,w,M,Tw),i[Gi]=o.current,Og(i),new Yg(o)},Ou.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var f=!1,b="",w=I0,M=D0,V=z0,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(V=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=hw(i,1,!0,o,u??null,f,b,Q,w,M,V,Tw),o.context=mw(null),u=o.current,f=Kr(),f=tt(f),b=Ps(f),b.callback=null,$s(u,b,f),u=f,o.current.lanes=u,St(o,u),Mi(o),i[Gi]=o.current,Og(i),new yd(o)},Ou.version="19.2.6",Ou}var Lw;function pz(){if(Lw)return Jg.exports;Lw=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(),Jg.exports=dz(),Jg.exports}var hz=pz(),Mu={},jw;function mz(){if(jw)return Mu;jw=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,l,c;return s!=null&&(a=s.disableCache===!0,l=s.disableMix===!0,c=s.transform),function(){for(var p=[],h="",m=null,g="",y=a?null:e,k=new Array(arguments.length),S=0;S<arguments.length;S++)k[S]=arguments[S];for(;k.length>0;){var T=k.pop();if(!(T==null||T===!1)){if(Array.isArray(T)){for(var E=0;E<T.length;E++)k.push(T[E]);continue}var R=c!=null?c(T):T;if(R.$$css!=null){var _="";if(y!=null&&y.has(R)){var C=y.get(R);C!=null&&(_=C[0],g=C[2],p.push.apply(p,C[1]),y=C[3])}else{var A=[];for(var N in R){var I=R[N];if(N===t){var $=R[N];$!==!0&&(g=g?$+"; "+g:$);continue}typeof I=="string"||I===null?p.includes(N)||(p.push(N),y!=null&&A.push(N),typeof I=="string"&&(_+=_?" "+I:I)):console.error("styleq: ".concat(N," typeof ").concat(String(I),' is not "string" or "null".'))}if(y!=null){var H=new WeakMap;y.set(R,[_,A,g,H]),y=H}}_&&(h=h?_+" "+h:_)}else if(l)m==null&&(m={}),m=Object.assign({},R,m);else{var L=null;for(var Z in R){var K=R[Z];K!==void 0&&(p.includes(Z)||(K!=null&&(m==null&&(m={}),L==null&&(L={}),L[Z]=K),p.push(Z),y=null))}L!=null&&(m=Object.assign(L,m))}}}var q=[h,m,g];return q}}var r=Mu.styleq=n();return r.factory=n,Mu}var gz=mz();function Nn(...e){const[t,n,r]=gz.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}function H_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=H_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=H_(e))&&(r&&(r+=" "),r+=t);return r}function wn(...e){return bz(e)}function En({rootClass:e,stylexStyles:t,className:n,style:r}){const s=Nn(t);return{className:wn(e,s.className,n),style:{...s.style,...r}}}const Si={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",khDVqt:"ui-uxw1ft",kMv6JI:"ui-1acoasx",kIxVMA:"ui-1rlb8dw",ksF3WI:"ui-tg4lcy",kYm2EN:"ui-10zfh2d",kqGeR4:"ui-ipogy4",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},sizeSm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1jg1sa",kGO01o:"ui-18d9i69",kE3dHu:"ui-1rplcre",$$css:!0},sizeBase:{kLKAdn:"ui-493x5y",kpe85a:"ui-g31tg3",kGO01o:"ui-b6dno7",kE3dHu:"ui-43mhey",$$css:!0},pill:{kIxVMA:"ui-c8ce4q",ksF3WI:"ui-j5toj7",kYm2EN:"ui-16ti9za",kqGeR4:"ui-11hym3f",$$css:!0},pillSizeSm:{kLKAdn:"ui-493x5y",kpe85a:"ui-1yxiud8",kGO01o:"ui-b6dno7",kE3dHu:"ui-yab65l",$$css:!0},pillSizeBase:{kLKAdn:"ui-5pb957",kpe85a:"ui-17v7654",kGO01o:"ui-1mmyrcj",kE3dHu:"ui-1lfpczk",$$css:!0},variantAccent:{kMwMTN:"ui-kbann2",kWkggS:"ui-gsjhps",$$css:!0},variantNeutral:{kMwMTN:"ui-19aaqeu",kWkggS:"ui-i07v4r",$$css:!0},variantSuccess:{kMwMTN:"ui-1w5rjie",kWkggS:"ui-1buh4up",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-1xvwvse",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-1xnwcy6",$$css:!0}};function yz({pill:e,size:t,variant:n}){return[Si.base,t==="sm"?Si.sizeSm:Si.sizeBase,e?[Si.pill,t==="sm"?Si.pillSizeSm:Si.pillSizeBase]:null,vz(n)]}function vz(e){switch(e){case"accent":return Si.variantAccent;case"neutral":return Si.variantNeutral;case"success":return Si.variantSuccess;case"warn":return Si.variantWarn;case"danger":return Si.variantDanger}}function sa({children:e,variant:t="neutral",size:n="base",pill:r=!1,as:s="span",className:a,style:l,...c}){const d=En({rootClass:"ui-status-badge",stylexStyles:yz({pill:r,size:n,variant:t}),className:a,style:l});return v.jsx(s,{className:d.className,style:d.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function xz(e,t){return function(r,...s){const a=new URL(e);return a.searchParams.set("code",r.toString()),s.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Xn=xz("https://base-ui.com/production-error","Base UI"),Pw={};function wr(e,t){const n=x.useRef(Pw);return n.current===Pw&&(n.current=e(t)),n}function ks(e,t,n,r){const s=wr(G_).current;return Sz(s,e,t,n,r)&&V_(s,[e,t,n,r]),s.callback}function kz(e){const t=wr(G_).current;return wz(t,e)&&V_(t,e),t.callback}function G_(){return{callback:null,cleanup:null,refs:[]}}function Sz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function wz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function V_(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 s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[s]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=r[s];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}const Ez=parseInt(x.version,10);function bv(e){return Ez>=e}function $w(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(bv(19)?n?.ref:t.ref)??null}function py(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Tz(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function _z(e,t){return typeof e=="function"?e(t):e}function Rz(e,t){return typeof e=="function"?e(t):e}const yv={};function zc(e,t,n,r,s){if(!n&&!r&&!s&&!e)return vp(t);let a=vp(e);return t&&(a=Vu(a,t)),n&&(a=Vu(a,n)),r&&(a=Vu(a,r)),s&&(a=Vu(a,s)),a}function Cz(e){if(e.length===0)return yv;if(e.length===1)return vp(e[0]);let t=vp(e[0]);for(let n=1;n<e.length;n+=1)t=Vu(t,e[n]);return t}function vp(e){return vv(e)?{...Z_(e,yv)}:Az(e)}function Vu(e,t){return vv(t)?Z_(t,e):Nz(e,t)}function Az(e){const t={...e};for(const n in t){const r=t[n];K_(n,r)&&(t[n]=W_(r))}return t}function Nz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=py(e.style,r);break}case"className":{e[n]=Y_(e.className,r);break}default:K_(n,r)?e[n]=Oz(e[n],r):e[n]=r}}return e}function K_(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function vv(e){return typeof e=="function"}function Z_(e,t){return vv(e)?e(t):e??yv}function Oz(e,t){return t?e?n=>{if(X_(n)){const s=n;xp(s);const a=t(s);return s.baseUIHandlerPrevented||e?.(s),a}const r=t(n);return e?.(n),r}:W_(t):e}function W_(e){return e&&(t=>(X_(t)&&xp(t),e(t)))}function xp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Y_(e,t){return t?e?t+" "+e:t:e}function X_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function or(){}const uc=Object.freeze([]),hr=Object.freeze({}),Mz={style:{transition:"none"}},Iz="data-base-ui-click-trigger",Dz={fallbackAxisSide:"none"},zz={fallbackAxisSide:"end"},Lz={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function xn(e,t,n={}){const r=t.render,s=jz(t,n);if(n.enabled===!1)return null;const a=n.state??hr;return Bz(e,r,s,a)}function jz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=hr,ref:l,props:c,stateAttributesMapping:d,enabled:p=!0}=t,h=p?_z(n,a):void 0,m=p?Rz(r,a):void 0,g=p?Tz(a,d):hr,y=p&&c?Pz(c):void 0,k=p?py(g,y)??{}:hr;return typeof document<"u"&&(p?Array.isArray(l)?k.ref=kz([k.ref,$w(s),...l]):k.ref=ks(k.ref,$w(s),l):ks(null,null)),p?(h!==void 0&&(k.className=Y_(k.className,h)),m!==void 0&&(k.style=py(k.style,m)),k):hr}function Pz(e){return Array.isArray(e)?Cz(e):zc(void 0,e)}const $z=Symbol.for("react.lazy");function Bz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=zc(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===$z&&(a=x.Children.toArray(t)[0]),x.cloneElement(a,s)}if(e&&typeof e=="string")return Fz(e,n);throw new Error(Xn(8))}function Fz(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}let Xo=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Uz={[Xo.startingStyle]:""},qz={[Xo.endingStyle]:""},oa={transitionStatus(e){return e==="starting"?Uz:e==="ending"?qz:null}};let xv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xo.startingStyle]="startingStyle",e[e.endingStyle=Xo.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),kp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Hz={[kp.popupOpen]:""},Gz={[kp.popupOpen]:"",[kp.pressed]:""},Vz={[xv.open]:""},Kz={[xv.closed]:""},Zz={[xv.anchorHidden]:""},Wz={open(e){return e?Hz:null}},Yz={open(e){return e?Gz:null}},sh={open(e){return e?Vz:Kz},anchorHidden(e){return e?Zz:null}};function oh(){return typeof window<"u"}function Yn(e){return ah(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ui(e){var t;return(t=(ah(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ah(e){return oh()?e instanceof Node||e instanceof yn(e).Node:!1}function yt(e){return oh()?e instanceof Element||e instanceof yn(e).Element:!1}function It(e){return oh()?e instanceof HTMLElement||e instanceof yn(e).HTMLElement:!1}function co(e){return!oh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function ho(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Xz(e){return/^(table|td|th)$/.test(Yn(e))}function lh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Qz=/transform|translate|scale|rotate|perspective|filter/,Jz=/paint|layout|strict|content/,Bo=e=>!!e&&e!=="none";let rb;function kv(e){const t=yt(e)?Er(e):e;return Bo(t.transform)||Bo(t.translate)||Bo(t.scale)||Bo(t.rotate)||Bo(t.perspective)||!Lc()&&(Bo(t.backdropFilter)||Bo(t.filter))||Qz.test(t.willChange||"")||Jz.test(t.contain||"")}function eL(e){let t=Fi(e);for(;It(t)&&!hi(t);){if(kv(t))return t;if(lh(t))return null;t=Fi(t)}return null}function Lc(){return rb==null&&(rb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rb}function hi(e){return/^(html|body|#document)$/.test(Yn(e))}function Er(e){return yn(e).getComputedStyle(e)}function uh(e){return yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(Yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||co(e)&&e.host||Ui(e);return co(t)?t.host:t}function Q_(e){const t=Fi(e);return hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:It(t)&&ho(t)?t:Q_(t)}function oo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Q_(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=yn(s);if(a){const c=hy(l);return t.concat(l,l.visualViewport||[],ho(s)?s:[],c&&n?oo(c):[])}else return t.concat(s,oo(s,[],n))}function hy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ib=ih[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tL=ib&&ib!==x.useLayoutEffect?ib:e=>e();function Ve(e){const t=wr(nL).current;return t.next=e,tL(t.effect),t.trampoline}function nL(){const e={next:void 0,callback:rL,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function rL(){}const iL={...ih},sL=()=>{},He=typeof document<"u"?x.useLayoutEffect:sL,J_=x.createContext(void 0);function eR(e=!1){const t=x.useContext(J_);if(t===void 0&&!e)throw new Error(Xn(16));return t}function oL(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:x.useMemo(()=>{const p={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(p.tabIndex=s,!a&&n&&(p.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(p["aria-disabled"]=n),a&&(!t||c)&&(p.disabled=n),p},[r,n,t,l,c,a,s])}}function jc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=x.useRef(null),c=eR(!0),d=a??c!==void 0,{props:p}=oL({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:s}),h=x.useCallback(()=>{const y=l.current;sb(y)&&d&&t&&p.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,p.disabled,d]);He(h,[h]);const m=x.useCallback((y={})=>{const{onClick:k,onMouseDown:S,onKeyUp:T,onKeyDown:E,onPointerDown:R,..._}=y;return zc({type:s?"button":void 0,onClick(A){if(t){A.preventDefault();return}k?.(A)},onMouseDown(A){t||S?.(A)},onKeyDown(A){if(t||(xp(A),E?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,I=A.currentTarget,$=sb(I),H=!s&&aL(I),L=N&&(s?$:!H),Z=A.key==="Enter",K=A.key===" ",q=I.getAttribute("role"),z=q?.startsWith("menuitem")||q==="option"||q==="gridcell";if(N&&d&&K){if(A.defaultPrevented&&z)return;A.preventDefault(),H||s&&$?(I.click(),A.preventBaseUIHandler()):L&&(k?.(A),A.preventBaseUIHandler());return}L&&(!s&&(K||Z)&&A.preventDefault(),!s&&Z&&k?.(A))},onKeyUp(A){if(!t){if(xp(A),T?.(A),A.target===A.currentTarget&&s&&d&&sb(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!d&&A.key===" "&&k?.(A)}},onPointerDown(A){if(t){A.preventDefault();return}R?.(A)}},s?void 0:{role:"button"},p,_)},[t,p,d,s]),g=Ve(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:g}}function sb(e){return It(e)&&e.tagName==="BUTTON"}function aL(e){return!!(e?.tagName==="A"&&e?.href)}const Ss="none",hl="trigger-press",ui="trigger-hover",up="trigger-focus",Sv="outside-press",ob="item-press",ch="focus-out",wv="escape-key",ab="list-navigation",lL="cancel-open",uL="disabled",my="imperative-action",cL="window-resize";function _t(e,t,n,r){let s=!1,a=!1;const l=r??hr;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...l}}let Bw=0;function fL(e,t="mui"){const[n,r]=x.useState(e),s=e||n;return x.useEffect(()=>{n==null&&(Bw+=1,r(`${t}-${Bw}`))},[n,t]),s}const Fw=iL.useId;function fh(e,t){if(Fw!==void 0){const n=Fw();return e??(t?`${t}-${n}`:n)}return fL(e,t)}function dh(e){return fh(e,"base-ui")}const dL=[];function ph(e){x.useEffect(e,dL)}const Iu=0;class Ti{static create(){return new Ti}currentId=Iu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Iu,n()},t)}isStarted(){return this.currentId!==Iu}clear=()=>{this.currentId!==Iu&&(clearTimeout(this.currentId),this.currentId=Iu)};disposeEffect=()=>this.clear}function fi(){const e=wr(Ti.create).current;return ph(e.disposeEffect),e}const Rl=typeof navigator<"u",lb=hL(),tR=gL(),nR=mL(),Ev=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),rR=lb.platform==="MacIntel"&&lb.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(lb.platform),iR=Rl&&/apple/i.test(navigator.vendor),gy=Rl&&/android/i.test(tR)||/android/i.test(nR),pL=Rl&&tR.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,sR=nR.includes("jsdom/");function hL(){if(!Rl)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 mL(){if(!Rl)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function gL(){if(!Rl)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function Wr(e){e.preventDefault(),e.stopPropagation()}function bL(e){return"nativeEvent"in e}function oR(e){return e.pointerType===""&&e.isTrusted?!0:gy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function aR(e){return sR?!1:!gy&&e.width===0&&e.height===0||gy&&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 ml(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function lR(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function yL(e,t){return t!=null&&!ml(t)?0:typeof e=="function"?e():e}function Sp(e,t,n){const r=yL(e,n);return typeof r=="number"?r:r?.[t]}function Uw(e){return typeof e=="function"?e():e}function uR(e,t){return t||e==="click"||e==="mousedown"}const vL=x.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ti,currentIdRef:{current:null},currentContextRef:{current:null}});function xL(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:s}=t,a=x.useContext(vL),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:p,currentContextRef:h,hasProvider:m,timeout:g}=a,[y,k]=x.useState(!1);return He(()=>{function S(){k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=p.current}if(l.current&&!s&&l.current===r){if(k(!1),d){const T=r;return g.start(d,()=>{n.select("open")||l.current&&l.current!==T||S()}),()=>{g.clear()}}S()}},[s,r,l,c,d,p,h,g,n]),He(()=>{if(!s)return;const S=h.current,T=l.current;g.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:k},l.current=r,c.current={open:0,close:Sp(p.current,"close")},T!==null&&T!==r?(k(!0),S?.setIsInstantPhase(!0),S?.onOpenChange(!1,_t(Ss))):(k(!1),S?.setIsInstantPhase(!1))},[s,r,n,l,c,d,p,h,g]),He(()=>()=>{h.current=null},[h]),x.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function Nt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Pi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function Un(e){const t=wr(kL,e).current;return t.next=e,He(t.effect),t}function kL(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const xd=null;class SL{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 s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(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 kd=new SL;class An{static create(){return new An}static request(t){return kd.request(t)}static cancel(t){return kd.cancel(t)}currentId=xd;request(t){this.cancel(),this.currentId=kd.request(()=>{this.currentId=xd,t()})}cancel=()=>{this.currentId!==xd&&(kd.cancel(this.currentId),this.currentId=xd)};disposeEffect=()=>this.cancel}function Pc(){const e=wr(An.create).current;return ph(e.disposeEffect),e}function Ft(e){return e?.ownerDocument||document}const cR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},fR={...cR,position:"fixed",top:0,left:0},wL={...cR,position:"absolute"},wp=x.forwardRef(function(t,n){const[r,s]=x.useState();He(()=>{iR&&s("button")},[]);const a={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:fR,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),by="data-base-ui-focusable",dR="active",pR="selected",hR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ao="ArrowLeft",lo="ArrowRight",Tv="ArrowUp",$c="ArrowDown";function Dr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function kt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&co(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function gr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ep(e,t){if(!yt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(kt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function xi(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 EL(e){return e.matches("html,body")}function hh(e){return It(e)&&e.matches(hR)}function TL(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${hR}`)!=null}function yy(e){return e?e.getAttribute("role")==="combobox"&&hh(e):!1}function _L(e){if(!e||sR)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Tp(e){return e?e.hasAttribute(by)?e:e.querySelector(`[${by}]`)||e:null}const RL=["top","right","bottom","left"],gl=Math.min,Yr=Math.max,bl=Math.round,ys=Math.floor,$i=e=>({x:e,y:e}),CL={left:"right",right:"left",bottom:"top",top:"bottom"};function vy(e,t,n){return Yr(e,gl(t,n))}function ws(e,t){return typeof e=="function"?e(t):e}function jr(e){return e.split("-")[0]}function mo(e){return e.split("-")[1]}function _v(e){return e==="x"?"y":"x"}function Rv(e){return e==="y"?"height":"width"}function di(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cv(e){return _v(di(e))}function AL(e,t,n){n===void 0&&(n=!1);const r=mo(e),s=Cv(e),a=Rv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=_p(l)),[l,_p(l)]}function NL(e){const t=_p(e);return[xy(e),t,xy(t)]}function xy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qw=["left","right"],Hw=["right","left"],OL=["top","bottom"],ML=["bottom","top"];function IL(e,t,n){switch(e){case"top":case"bottom":return n?t?Hw:qw:t?qw:Hw;case"left":case"right":return t?OL:ML;default:return[]}}function DL(e,t,n,r){const s=mo(e);let a=IL(jr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(xy)))),a}function _p(e){const t=jr(e);return CL[t]+e.slice(t.length)}function zL(e){return{top:0,right:0,bottom:0,left:0,...e}}function mR(e){return typeof e!="number"?zL(e):{top:e,right:e,bottom:e,left:e}}function cc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Sd(e,t,n){return Math.floor(e/t)!==n}function fc(e,t){return t<0||t>=e.length}function cp(e,t){return dr(e.current,{disabledIndices:t})}function ky(e,t){return dr(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function dr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let a=t;do a+=n?-s:s;while(a>=0&&a<=e.length-1&&vs(e,a,r));return a}function gR(e,{event:t,orientation:n,loopFocus:r,onLoop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:p,prevIndex:h,stopEvent:m=!1}){let g=h,y;if(t.key===Tv?y="up":t.key===$c&&(y="down"),y){const k=[],S=[];let T=!1,E=0;{let H=null,L=-1;e.forEach((Z,K)=>{if(Z==null)return;E+=1;const q=Z.closest('[role="row"]');q&&(T=!0),(q!==H||L===-1)&&(H=q,L+=1,k[L]=[]),k[L].push(K),S[K]=L})}let R=!1,_=0;if(T)for(const H of k){const L=H.length;L>_&&(_=L),L!==l&&(R=!0)}const C=R&&E<e.length,A=_||l,N=H=>{if(!R||h===-1)return;const L=S[h];if(L==null)return;const Z=k[L].indexOf(h),K=H==="up"?-1:1;for(let q=L+K,z=0;z<k.length;z+=1,q+=K){if(q<0||q>=k.length){if(!r||C)return;if(q=q<0?k.length-1:0,s){const F=Math.min(Z,k[q].length-1),U=k[q][F]??k[q][0],P=s(t,h,U);q=S[P]??q}}const j=k[q];for(let F=Math.min(Z,j.length-1);F>=0;F-=1){const U=j[F];if(!vs(e,U,c))return U}}},I=H=>{if(!C||h===-1)return;const L=h%A,Z=H==="up"?-A:A,K=p-p%A,q=ys(p/A)+1;for(let z=h-L+Z,j=0;j<q;j+=1,z+=Z){if(z<0||z>p){if(!r)return;z=z<0?K:0}const F=Math.min(z+A-1,p);for(let U=Math.min(z+L,F);U>=z;U-=1)if(!vs(e,U,c))return U}};m&&Wr(t);const $=N(y)??I(y);if($!==void 0)g=$;else if(h===-1)g=y==="up"?p:d;else if(g=dr(e,{startingIndex:h,amount:A,decrement:y==="up",disabledIndices:c}),r){if(y==="up"&&(h-A<d||g<0)){const H=h%A,L=p%A,Z=p-(L-H);L===H?g=p:g=L>H?Z:Z-A,s&&(g=s(t,h,g))}y==="down"&&h+A>p&&(g=dr(e,{startingIndex:h%A-A,amount:A,disabledIndices:c}),s&&(g=s(t,h,g)))}fc(e,g)&&(g=h)}if(n==="both"){const k=ys(h/l);t.key===(a?ao:lo)&&(m&&Wr(t),h%l!==l-1?(g=dr(e,{startingIndex:h,disabledIndices:c}),r&&Sd(g,l,k)&&(g=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g)))):r&&(g=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))),Sd(g,l,k)&&(g=h)),t.key===(a?lo:ao)&&(m&&Wr(t),h%l!==0?(g=dr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),r&&Sd(g,l,k)&&(g=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}),s&&(g=s(t,h,g)))):r&&(g=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}),s&&(g=s(t,h,g))),Sd(g,l,k)&&(g=h));const S=ys(p/l)===k;fc(e,g)&&(r&&S?(g=t.key===(a?lo:ao)?p:dr(e,{startingIndex:h-h%l-1,disabledIndices:c}),s&&(g=s(t,h,g))):g=h)}return g}function bR(e,t,n){const r=[];let s=0;return e.forEach(({width:a,height:l},c)=>{let d=!1;for(n&&(s=0);!d;){const p=[];for(let h=0;h<a;h+=1)for(let m=0;m<l;m+=1)p.push(s+h+m*t);s%t+a<=t&&p.every(h=>r[h]==null)?(p.forEach(h=>{r[h]=c}),d=!0):s+=1}}),[...r]}function yR(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e);default:return-1}}function vR(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function vs(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?mh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function mh(e){return typeof e.checkVisibility=="function"?e.checkVisibility():Er(e).display!=="none"}const LL='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function jL(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return co(n)?n.host:null}function Sy(e){for(const t of Array.from(e.children))if(Yn(t)==="summary")return t;return null}function PL(e,t){const n=Sy(t);return!!n&&(e===n||kt(n,e))}function xR(e){const t=e?Yn(e):"";return e!=null&&e.matches(LL)&&(t!=="summary"||e.parentElement!=null&&Yn(e.parentElement)==="details"&&Sy(e.parentElement)===e)&&(t!=="details"||Sy(e)==null)&&(t!=="input"||e.type!=="hidden")}function kR(e){if(!xR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=jL(t)){const n=Yn(t)==="slot";if(t.hasAttribute("inert")||t!==e&&Yn(t)==="details"&&!t.open&&!PL(e,t)||t.hasAttribute("hidden")||!n&&!mh(t))return!1}return!0}function SR(e){const t=e.tabIndex;if(t<0){const n=Yn(e);if(n==="details"||n==="audio"||n==="video"||It(e)&&e.isContentEditable)return 0}return t}function ub(e){if(Yn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function $L(e,t){const n=ub(e);if(!n)return!0;const r=t.find(s=>{const a=ub(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=ub(s);return a?.name===n.name&&a.form===n.form})===n}function wR(e){if(It(e)&&Yn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return It(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ER(e,t){wR(e).forEach(n=>{xR(n)&&t.push(n),ER(n,t)})}function TR(e,t,n){wR(e).forEach(r=>{It(r)&&r.matches(t)&&n.push(r),TR(r,t,n)})}function Av(e){return kR(e)&&SR(e)>=0}function _R(e){const t=[];return ER(e,t),t.filter(kR)}function gh(e){const t=_R(e);return t.filter(n=>SR(n)>=0&&$L(n,t))}function RR(e,t){const n=gh(e),r=n.length;if(r===0)return;const s=Dr(Ft(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function CR(e){return RR(Ft(e).body,1)||e}function AR(e){return RR(Ft(e).body,-1)||e}function Xu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kt(n,r)}function BL(e){gh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Gw(e){const t=[];TR(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Bi(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Bi(e,s.id,n)])}function Vw(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function dc(e){return`data-base-ui-${e}`}let wd=0;function fp(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(wd);const a=()=>e?.focus({preventScroll:n});if(s)return a(),or;const l=requestAnimationFrame(a);return wd=l,()=>{wd===l&&(cancelAnimationFrame(l),wd=0)}}const cb={inert:new WeakMap,"aria-hidden":new WeakMap},Kw="data-base-ui-inert",wy={inert:new WeakSet,"aria-hidden":new WeakSet};let Du=new WeakMap,fb=0;function FL(e){return wy[e]}function NR(e){return e?co(e)?e.host:NR(e.parentNode):null}const db=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=NR(n);return e.contains(r)?r:null}).filter(n=>n!=null),Zw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Ww=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Yn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function UL(e,t,n,r,{mark:s=!0,markerIgnoreElements:a=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,d=null;const p=db(t,e),h=s?db(t,a):[],m=new Set(h),g=s?Ww(t,Zw(p),new Set(p)).filter(S=>!m.has(S)):[],y=[],k=[];if(l){const S=cb[l],T=FL(l);d=T,c=S;const E=db(t,Array.from(t.querySelectorAll("[aria-live]"))),R=p.concat(E);Ww(t,Zw(R),new Set(R)).forEach(C=>{const A=C.getAttribute(l),N=A!==null&&A!=="false",I=(S.get(C)||0)+1;S.set(C,I),y.push(C),I===1&&N&&T.add(C),N||C.setAttribute(l,l==="inert"?"":"true")})}return s&&g.forEach(S=>{const T=(Du.get(S)||0)+1;Du.set(S,T),k.push(S),T===1&&S.setAttribute(Kw,"")}),fb+=1,()=>{c&&y.forEach(S=>{const E=(c.get(S)||0)-1;c.set(S,E),E||(!d?.has(S)&&l&&S.removeAttribute(l),d?.delete(S))}),s&&k.forEach(S=>{const T=(Du.get(S)||0)-1;Du.set(S,T),T||S.removeAttribute(Kw)}),fb-=1,fb||(cb.inert=new WeakMap,cb["aria-hidden"]=new WeakMap,wy.inert=new WeakSet,wy["aria-hidden"]=new WeakSet,Du=new WeakMap)}}function Yw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0,markerIgnoreElements:a=[]}=t,l=Ft(e[0]).body;return UL(e,l,n,r,{mark:s,markerIgnoreElements:a})}var Ri=q_();const OR=x.createContext(null),MR=()=>x.useContext(OR),qL=dc("portal");function IR(e={}){const{ref:t,container:n,componentProps:r=hr,elementProps:s}=e,a=fh(),c=MR()?.portalNode,[d,p]=x.useState(null),[h,m]=x.useState(null),g=Ve(T=>{T!==null&&m(T)}),y=x.useRef(null);He(()=>{if(n===null){y.current&&(y.current=null,m(null),p(null));return}if(a==null)return;const T=(n&&(ah(n)?n:n.current))??c??document.body;if(T==null){y.current&&(y.current=null,m(null),p(null));return}y.current!==T&&(y.current=T,m(null),p(T))},[n,c,a]);const k=xn("div",r,{ref:[t,g],props:[{id:a,[qL]:""},s]});return{portalNode:h,portalSubtree:d&&k?Ri.createPortal(k,d):null}}const HL=x.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,renderGuards:c,style:d,...p}=t,{portalNode:h,portalSubtree:m}=IR({container:s,ref:n,componentProps:t,elementProps:p}),g=x.useRef(null),y=x.useRef(null),k=x.useRef(null),S=x.useRef(null),[T,E]=x.useState(null),R=x.useRef(!1),_=T?.modal,C=T?.open,A=typeof c=="boolean"?c:!!T&&!T.modal&&T.open&&!!h;x.useEffect(()=>{if(!h||_)return;function I($){h&&$.relatedTarget&&Xu($)&&($.type==="focusin"?R.current&&(Gw(h),R.current=!1):(BL(h),R.current=!0))}return Pi(Nt(h,"focusin",I,!0),Nt(h,"focusout",I,!0))},[h,_]),x.useEffect(()=>{!h||C!==!1||(Gw(h),R.current=!1)},[C,h]);const N=x.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:S,portalNode:h,setFocusManagerState:E}),[h]);return v.jsxs(x.Fragment,{children:[m,v.jsxs(OR.Provider,{value:N,children:[A&&h&&v.jsx(wp,{"data-type":"outside",ref:g,onFocus:I=>{if(Xu(I,h))k.current?.focus();else{const $=T?T.domReference:null;AR($)?.focus()}}}),A&&h&&v.jsx("span",{"aria-owns":h.id,style:Lz}),h&&Ri.createPortal(r,h),A&&h&&v.jsx(wp,{"data-type":"outside",ref:y,onFocus:I=>{if(Xu(I,h))S.current?.focus();else{const $=T?T.domReference:null;CR($)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,_t(ch,I.nativeEvent))}}})]})]})});function GL(){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 VL=x.createContext(null),KL=x.createContext(null),bh=()=>x.useContext(VL)?.id||null,Cl=e=>{const t=x.useContext(KL);return e??t};function ps(e){return e==null?e:"current"in e?e.current:e}function ZL(e,t){const n=yn(gr(e));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 Xw=20;let io=[];function Nv(){io=io.filter(e=>e.deref()?.isConnected)}function WL(e){Nv(),e&&Yn(e)!=="body"&&(io.push(new WeakRef(e)),io.length>Xw&&(io=io.slice(-Xw)))}function pb(){return Nv(),io[io.length-1]?.deref()}function YL(e){return e?Av(e)?e:gh(e)[0]||e:null}function XL(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():mh(e)}function Qw(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=_R(e).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Av(a)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||r.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 QL(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:p="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:g,externalTree:y,getInsideElements:k}=e,S="rootStore"in t?t.rootStore:t,T=S.useState("open"),E=S.useState("domReferenceElement"),R=S.useState("floatingElement"),{events:_,dataRef:C}=S.context,A=Ve(()=>C.current.floatingContext?.nodeId),N=s===!1,I=yy(E)&&N,$=x.useRef(["content"]),H=Un(s),L=Un(a),Z=Un(p),K=Cl(y),q=MR(),z=x.useRef(!1),j=x.useRef(!1),F=x.useRef(!1),U=x.useRef(null),P=x.useRef(""),W=x.useRef(""),D=x.useRef(null),B=x.useRef(null),G=ks(D,g,q?.beforeInsideRef),O=ks(B,q?.afterInsideRef),ie=fi(),te=fi(),ne=Pc(),le=q!=null,pe=Tp(R),ye=Ve((he=pe)=>he?gh(he):[]),Se=Ve(()=>k?.().filter(he=>he!=null)??[]);x.useEffect(()=>{if(r||!c)return;function he(Re){Re.key==="Tab"&&kt(pe,Dr(Ft(pe)))&&ye().length===0&&!I&&Wr(Re)}const Te=Ft(pe);return Nt(Te,"keydown",he)},[r,E,pe,c,$,I,ye]),x.useEffect(()=>{if(r||!T)return;const he=Ft(pe);function Te(){F.current=!1}function Re(ve){const xe=gr(ve),Me=Se(),Ce=kt(R,xe)||kt(E,xe)||kt(q?.portalNode,xe)||Me.some(Pe=>Pe===xe||kt(Pe,xe));F.current=!Ce,W.current=ve.pointerType||"keyboard",xe?.closest(`[${Iz}]`)&&(j.current=!0)}function Oe(){W.current="keyboard"}return Pi(Nt(he,"pointerdown",Re,!0),Nt(he,"pointerup",Te,!0),Nt(he,"pointercancel",Te,!0),Nt(he,"keydown",Oe,!0))},[r,R,E,pe,T,q,Se]),x.useEffect(()=>{if(r||!d)return;const he=Ft(pe);function Te(){j.current=!0,te.start(0,()=>{j.current=!1})}function Re(Me){const Ce=gr(Me);Av(Ce)&&(U.current=Ce)}function Oe(Me){const Ce=Me.relatedTarget,Pe=Me.currentTarget,ge=gr(Me);queueMicrotask(()=>{const ce=A(),oe=S.context.triggerElements,re=Se(),_e=Ce?.hasAttribute(dc("focus-guard"))&&[D.current,B.current,q?.beforeInsideRef.current,q?.afterInsideRef.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,ps(m),ps(h)].includes(Ce),J=!(kt(E,Ce)||kt(R,Ce)||kt(Ce,R)||kt(q?.portalNode,Ce)||re.some(fe=>fe===Ce||kt(fe,Ce))||Ce!=null&&oe.hasElement(Ce)||oe.hasMatchingElement(fe=>kt(fe,Ce))||_e||K&&(Bi(K.nodesRef.current,ce).find(fe=>kt(fe.context?.elements.floating,Ce)||kt(fe.context?.elements.domReference,Ce))||Vw(K.nodesRef.current,ce).find(fe=>[fe.context?.elements.floating,Tp(fe.context?.elements.floating)].includes(Ce)||fe.context?.elements.domReference===Ce)));if(Pe===E&&pe&&Qw(pe,$),l&&Pe!==E&&!XL(ge)&&Dr(he)===he.body){if(It(pe)&&(pe.focus(),l==="popup")){ne.request(()=>{pe.focus()});return}const fe=ye(),Ie=U.current,Ue=(Ie&&fe.includes(Ie)?Ie:null)||fe[fe.length-1]||pe;It(Ue)&&Ue.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(I||!c)&&Ce&&J&&!j.current&&(I||Ce!==pb())&&(z.current=!0,S.setOpen(!1,_t(ch,Me)))})}function ve(){F.current||(C.current.insideReactTree=!0,ie.start(0,()=>{C.current.insideReactTree=!1}))}const xe=It(E)?E:null;if(!(!R&&!xe))return Pi(xe&&Nt(xe,"focusout",Oe),xe&&Nt(xe,"pointerdown",Te),R&&Nt(R,"focusin",Re),R&&Nt(R,"focusout",Oe),R&&q&&Nt(R,"focusout",ve,!0))},[r,E,R,pe,c,K,q,S,d,l,ye,I,A,$,C,ie,te,ne,h,m,Se]),x.useEffect(()=>{if(r||!R||!T)return;const he=Array.from(q?.portalNode?.querySelectorAll(`[${dc("portal")}]`)||[]),Re=(K?Vw(K.nodesRef.current,A()):[]).find(Pe=>yy(Pe.context?.elements.domReference||null))?.context?.elements.domReference,ve=[...[R,...he,D.current,B.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,...Se()],Re,ps(m),ps(h),I?E:null].filter(Pe=>Pe!=null),xe=Yw(ve,{ariaHidden:c||I,mark:!1}),Me=[R,...he].filter(Pe=>Pe!=null),Ce=Yw(Me);return()=>{Ce(),xe()}},[T,r,E,R,c,$,q,I,K,A,h,m,Se]),He(()=>{if(!T||r||!It(pe))return;const he=Ft(pe),Te=Dr(he);queueMicrotask(()=>{const Re=H.current,Oe=typeof Re=="function"?Re(Z.current||""):Re;if(Oe===void 0||Oe===!1||kt(pe,Te))return;let xe=null;const Me=()=>(xe==null&&(xe=ye(pe)),xe[0]||pe);let Ce;Oe===!0||Oe===null?Ce=Me():Ce=ps(Oe),Ce=Ce||Me(),fp(Ce,{preventScroll:Ce===pe})})},[r,T,pe,N,ye,H,Z]),He(()=>{if(r||!pe)return;const he=Ft(pe),Te=Dr(he);WL(Te);function Re(ve){if(ve.open||(P.current=ZL(ve.nativeEvent,W.current)),ve.reason===ui&&ve.nativeEvent.type==="mouseleave"&&(z.current=!0),ve.reason===Sv)if(ve.nested)z.current=!1;else if(oR(ve.nativeEvent)||aR(ve.nativeEvent))z.current=!1;else{let xe=!1;Ft(pe).createElement("div").focus({get preventScroll(){return xe=!0,!1}}),xe?z.current=!1:z.current=!0}}_.on("openchange",Re);function Oe(){const ve=L.current;let xe=typeof ve=="function"?ve(P.current):ve;if(xe===void 0||xe===!1)return null;if(xe===null&&(xe=!0),typeof xe=="boolean"){const Ce=E||pb();return Ce&&Ce.isConnected?Ce:null}const Me=E||pb();return ps(xe)||Me||null}return()=>{_.off("openchange",Re);const ve=Dr(he),xe=Se(),Me=kt(R,ve)||xe.some(ge=>ge===ve||kt(ge,ve))||K&&Bi(K.nodesRef.current,A(),!1).some(ge=>kt(ge.context?.elements.floating,ve)),Ce=L.current,Pe=Oe();queueMicrotask(()=>{const ge=YL(Pe),ce=typeof Ce!="boolean";Ce&&!z.current&&It(ge)&&(!(!ce&&ge!==ve&&ve!==he.body)||Me)&&ge.focus({preventScroll:!0}),z.current=!1})}},[r,R,pe,L,C,_,K,E,A,Se]),He(()=>{if(!Ev||T||!R)return;const he=Dr(Ft(R));!It(he)||!hh(he)||kt(R,he)&&he.blur()},[T,R]),He(()=>{if(!(r||!q))return q.setFocusManagerState({modal:c,closeOnFocusOut:d,open:T,onOpenChange:S.setOpen,domReference:E}),()=>{q.setFocusManagerState(null)}},[r,q,c,T,S,d,E]),He(()=>{if(!(r||!pe))return Qw(pe,$),()=>{queueMicrotask(Nv)}},[r,pe,$]);const ze=!r&&(c?!I:!0)&&(le||c);return v.jsxs(x.Fragment,{children:[ze&&v.jsx(wp,{"data-type":"inside",ref:G,onFocus:he=>{if(c){const Te=ye();fp(Te[Te.length-1])}else q?.portalNode&&(z.current=!1,Xu(he,q.portalNode)?CR(E)?.focus():ps(m??q.beforeOutsideRef)?.focus())}}),n,ze&&v.jsx(wp,{"data-type":"inside",ref:O,onFocus:he=>{c?fp(ye()[0]):q?.portalNode&&(d&&(z.current=!0),Xu(he,q.portalNode)?AR(E)?.focus():ps(h??q.afterOutsideRef)?.focus())}})]})}function JL(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:d=!0,touchOpenDelay:p=0,reason:h=hl}=t,m=x.useRef(void 0),g=Pc(),y=fi(),k=x.useMemo(()=>({onPointerDown(S){m.current=S.pointerType},onMouseDown(S){const T=m.current,E=S.nativeEvent,R=n.select("open");if(S.button!==0||a==="click"||ml(T,!0)&&c)return;const _=r.current.openEvent,C=_?.type,A=n.select("domReferenceElement")!==S.currentTarget,N=R&&A||!(R&&l&&(!(_&&d)||C==="click"||C==="mousedown")),I=gr(E);if(hh(I)){const H=_t(h,E,I);N&&T==="touch"&&p>0?y.start(p,()=>{n.setOpen(!0,H)}):n.setOpen(N,H);return}const $=S.currentTarget;g.request(()=>{const H=_t(h,E,$);N&&T==="touch"&&p>0?y.start(p,()=>{n.setOpen(!0,H)}):n.setOpen(N,H)})},onClick(S){if(a==="mousedown-only")return;const T=m.current;if(a==="mousedown"&&T){m.current=void 0;return}if(ml(T,!0)&&c)return;const E=n.select("open"),R=r.current.openEvent,_=n.select("domReferenceElement")!==S.currentTarget,C=E&&_||!(E&&l&&(!(R&&d)||lR(R))),A=_t(h,S.nativeEvent,S.currentTarget);C&&T==="touch"&&p>0?y.start(p,()=>{n.setOpen(!0,A)}):n.setOpen(C,A)},onKeyDown(){m.current=void 0}}),[r,a,c,n,d,l,g,y,p,h]);return x.useMemo(()=>s?{reference:k}:hr,[s,k])}function e2(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let p=a.width,h=a.height,m=a.x,g=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,g-=r||0,p=0,h=0,!s||d?(p=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,g=c&&t.y!=null?t.y:g):s&&!d&&(h=t.axis==="x"?a.height:h,p=t.axis==="y"?a.width:p),s=!0,{width:p,height:h,x:m,y:g,top:g,right:m+p,bottom:g+h,left:m}}}}function Jw(e){return e!=null&&e.clientX!=null}function t2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:c=!0,axis:d="both"}=t,p=x.useRef(!1),h=x.useRef(null),[m,g]=x.useState(),[y,k]=x.useState([]),S=Ve((C,A,N)=>{p.current||l.current.openEvent&&!Jw(l.current.openEvent)||n.set("positionReference",e2(N??a,{x:C,y:A,axis:d,dataRef:l,pointerType:m}))}),T=Ve(C=>{r?h.current||k([]):S(C.clientX,C.clientY,C.currentTarget)}),E=ml(m)?s:r,R=x.useCallback(()=>{if(!E||!c)return;const C=yn(s);function A(N){const I=gr(N);kt(s,I)?(h.current?.(),h.current=null):S(N.clientX,N.clientY)}if(!l.current.openEvent||Jw(l.current.openEvent)){const N=()=>{h.current?.(),h.current=null};return h.current=Nt(C,"mousemove",A),N}n.set("positionReference",a)},[E,c,s,l,a,n,S]);x.useEffect(()=>R(),[R,y]),x.useEffect(()=>{c&&!s&&(p.current=!1)},[c,s]),x.useEffect(()=>{!c&&r&&(p.current=!0)},[c,r]);const _=x.useMemo(()=>{function C(A){g(A.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:T,onMouseEnter:T}},[T]);return x.useMemo(()=>c?{reference:_,trigger:_}:{},[c,_])}const n2={intentional:"onClick",sloppy:"onPointerDown"};function r2(){return!1}function i2(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function DR(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:p="sloppy",referencePress:h=r2,referencePressEvent:m="sloppy",bubbles:g,externalTree:y}=t,k=Cl(y),S=Ve(typeof d=="function"?d:()=>!1),T=typeof d=="function"?S:d,E=T!==!1,R=Ve(()=>p),_=x.useRef(!1),C=x.useRef(!1),A=x.useRef(!1),{escapeKey:N,outsidePress:I}=i2(g),$=x.useRef(null),H=fi(),L=fi(),Z=Ve(()=>{L.clear(),a.current.insideReactTree=!1}),K=x.useRef(!1),q=x.useRef(""),z=Ve(h),j=Ve(B=>{if(!r||!l||!c||B.key!=="Escape"||K.current)return;const G=a.current.floatingContext?.nodeId,O=k?Bi(k.nodesRef.current,G):[];if(!N&&O.length>0){let ne=!0;if(O.forEach(le=>{le.context?.open&&!le.context.dataRef.current.__escapeKeyBubbles&&(ne=!1)}),!ne)return}const ie=bL(B)?B.nativeEvent:B,te=_t(wv,ie);n.setOpen(!1,te),!N&&!te.isPropagationAllowed&&B.stopPropagation()}),F=Ve(()=>{a.current.insideReactTree=!0,L.start(0,Z)});x.useEffect(()=>{if(!r||!l)return;a.current.__escapeKeyBubbles=N,a.current.__outsidePressBubbles=I;const B=new Ti,G=new Ti;function O(){B.clear(),K.current=!0}function ie(){B.start(Lc()?5:0,()=>{K.current=!1})}function te(){A.current=!0,G.start(0,()=>{A.current=!1})}function ne(){_.current=!1,C.current=!1}function le(){const oe=q.current,re=oe==="pen"||!oe?"mouse":oe,_e=R(),J=typeof _e=="function"?_e():_e;return typeof J=="string"?J:J[re]}function pe(oe){const re=le();return re==="intentional"&&oe.type!=="click"||re==="sloppy"&&oe.type==="click"}function ye(oe){const re=a.current.floatingContext?.nodeId,_e=k&&Bi(k.nodesRef.current,re).some(J=>xi(oe,J.context?.elements.floating));return xi(oe,n.select("floatingElement"))||xi(oe,n.select("domReferenceElement"))||_e}function Se(oe){if(pe(oe)){Z();return}if(a.current.insideReactTree){Z();return}const re=gr(oe),_e=`[${dc("inert")}]`,J=yt(re)?re.getRootNode():null,fe=Array.from((co(J)?J:Ft(n.select("floatingElement"))).querySelectorAll(_e)),Ie=n.context.triggerElements;if(re&&(Ie.hasElement(re)||Ie.hasMatchingElement(ot=>kt(ot,re))))return;let Ue=yt(re)?re:null;for(;Ue&&!hi(Ue);){const ot=Fi(Ue);if(hi(ot)||!yt(ot))break;Ue=ot}if(fe.length&&yt(re)&&!EL(re)&&!kt(re,n.select("floatingElement"))&&fe.every(ot=>!kt(Ue,ot)))return;if(It(re)&&!("touches"in oe)){const ot=hi(re),it=Er(re),nt=/auto|scroll/,vt=ot||nt.test(it.overflowX),st=ot||nt.test(it.overflowY),xt=vt&&re.clientWidth>0&&re.scrollWidth>re.clientWidth,We=st&&re.clientHeight>0&&re.scrollHeight>re.clientHeight,Ot=it.direction==="rtl",Be=We&&(Ot?oe.offsetX<=re.offsetWidth-re.clientWidth:oe.offsetX>re.clientWidth),Ke=xt&&oe.offsetY>re.clientHeight;if(Be||Ke)return}if(ye(oe))return;if(le()==="intentional"&&A.current){G.clear(),A.current=!1;return}if(typeof T=="function"&&!T(oe))return;const Ze=a.current.floatingContext?.nodeId,Ye=k?Bi(k.nodesRef.current,Ze):[];if(Ye.length>0){let ot=!0;if(Ye.forEach(it=>{it.context?.open&&!it.context.dataRef.current.__outsidePressBubbles&&(ot=!1)}),!ot)return}n.setOpen(!1,_t(Sv,oe)),Z()}function ze(oe){le()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!l||xi(oe,n.select("floatingElement"))||xi(oe,n.select("domReferenceElement"))||Se(oe)}function he(oe){if(le()!=="sloppy"||!n.select("open")||!l||xi(oe,n.select("floatingElement"))||xi(oe,n.select("domReferenceElement")))return;const re=oe.touches[0];re&&($.current={startTime:Date.now(),startX:re.clientX,startY:re.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}function Te(oe,re){const _e=gr(oe);if(!_e)return;const J=Nt(_e,oe.type,()=>{re(oe),J()})}function Re(oe){q.current="touch",Te(oe,he)}function Oe(oe){H.clear(),oe.type==="pointerdown"&&(q.current=oe.pointerType),!(oe.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)&&Te(oe,re=>{re.type==="pointerdown"?ze(re):Se(re)})}function ve(oe){if(!_.current)return;const re=C.current;if(ne(),le()==="intentional"){if(oe.type==="pointercancel"){re&&te();return}if(!ye(oe)){if(re){te();return}typeof T=="function"&&!T(oe)||(G.clear(),A.current=!0,Z())}}}function xe(oe){if(le()!=="sloppy"||!$.current||xi(oe,n.select("floatingElement"))||xi(oe,n.select("domReferenceElement")))return;const re=oe.touches[0];if(!re)return;const _e=Math.abs(re.clientX-$.current.startX),J=Math.abs(re.clientY-$.current.startY),fe=Math.sqrt(_e*_e+J*J);fe>5&&($.current.dismissOnTouchEnd=!0),fe>10&&(Se(oe),H.clear(),$.current=null)}function Me(oe){Te(oe,xe)}function Ce(oe){le()!=="sloppy"||!$.current||xi(oe,n.select("floatingElement"))||xi(oe,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&Se(oe),H.clear(),$.current=null)}function Pe(oe){Te(oe,Ce)}const ge=Ft(s),ce=Pi(c&&Pi(Nt(ge,"keydown",j),Nt(ge,"compositionstart",O),Nt(ge,"compositionend",ie)),E&&Pi(Nt(ge,"click",Oe,!0),Nt(ge,"pointerdown",Oe,!0),Nt(ge,"pointerup",ve,!0),Nt(ge,"pointercancel",ve,!0),Nt(ge,"mousedown",Oe,!0),Nt(ge,"mouseup",ve,!0),Nt(ge,"touchstart",Re,!0),Nt(ge,"touchmove",Me,!0),Nt(ge,"touchend",Pe,!0)));return()=>{ce(),B.clear(),G.clear(),ne(),A.current=!1}},[a,s,c,E,T,r,l,N,I,j,Z,R,k,n,H]),x.useEffect(Z,[T,Z]);const U=x.useMemo(()=>({onKeyDown:j,[n2[m]]:B=>{z()&&n.setOpen(!1,_t(hl,B.nativeEvent))},...m!=="intentional"&&{onClick(B){z()&&n.setOpen(!1,_t(hl,B.nativeEvent))}}}),[j,n,m,z]),P=Ve(B=>{if(!r||!l||B.button!==0)return;const G=gr(B.nativeEvent);kt(n.select("floatingElement"),G)&&(_.current||(_.current=!0,C.current=!1))}),W=Ve(B=>{!r||!l||(B.defaultPrevented||B.nativeEvent.defaultPrevented)&&_.current&&(C.current=!0)}),D=x.useMemo(()=>({onKeyDown:j,onPointerDown:W,onMouseDown:W,onClickCapture:F,onMouseDownCapture(B){F(),P(B)},onPointerDownCapture(B){F(),P(B)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[j,F,P,W]);return x.useMemo(()=>l?{reference:U,floating:D,trigger:U}:{},[l,U,D])}function eE(e,t,n){let{reference:r,floating:s}=e;const a=di(t),l=Cv(t),c=Rv(l),d=jr(t),p=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,g=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}switch(mo(t)){case"start":y[l]-=g*(n&&p?-1:1);break;case"end":y[l]+=g*(n&&p?-1:1);break}return y}async function s2(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:p="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=ws(t,e),k=mR(y),T=c[g?m==="floating"?"reference":"floating":m],E=cc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(T)))==null||n?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:p,rootBoundary:h,strategy:d})),R=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},A=cc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:R,offsetParent:_,strategy:d}):R);return{top:(E.top-A.top+k.top)/C.y,bottom:(A.bottom-E.bottom+k.bottom)/C.y,left:(E.left-A.left+k.left)/C.x,right:(A.right-E.right+k.right)/C.x}}const o2=50,a2=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:s2},d=await(l.isRTL==null?void 0:l.isRTL(t));let p=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=eE(p,r,d),g=r,y=0;const k={};for(let S=0;S<a.length;S++){const T=a[S];if(!T)continue;const{name:E,fn:R}=T,{x:_,y:C,data:A,reset:N}=await R({x:h,y:m,initialPlacement:r,placement:g,strategy:s,middlewareData:k,rects:p,platform:c,elements:{reference:e,floating:t}});h=_??h,m=C??m,k[E]={...k[E],...A},N&&y<o2&&(y++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(p=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=eE(p,g,d)),S=-1)}return{x:h,y:m,placement:g,strategy:s,middlewareData:k}},l2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:d,elements:p}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...T}=ws(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=jr(s),R=di(c),_=jr(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(p.floating)),A=g||(_||!S?[_p(c)]:NL(c)),N=k!=="none";!g&&N&&A.push(...DL(c,S,k,C));const I=[c,...A],$=await d.detectOverflow(t,T),H=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&H.push($[E]),m){const z=AL(s,l,C);H.push($[z[0]],$[z[1]])}if(L=[...L,{placement:s,overflows:H}],!H.every(z=>z<=0)){var Z,K;const z=(((Z=a.flip)==null?void 0:Z.index)||0)+1,j=I[z];if(j&&(!(m==="alignment"?R!==di(j):!1)||L.every(P=>di(P.placement)===R?P.overflows[0]>0:!0)))return{data:{index:z,overflows:L},reset:{placement:j}};let F=(K=L.filter(U=>U.overflows[0]<=0).sort((U,P)=>U.overflows[1]-P.overflows[1])[0])==null?void 0:K.placement;if(!F)switch(y){case"bestFit":{var q;const U=(q=L.filter(P=>{if(N){const W=di(P.placement);return W===R||W==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(W=>W>0).reduce((W,D)=>W+D,0)]).sort((P,W)=>P[1]-W[1])[0])==null?void 0:q[0];U&&(F=U);break}case"initialPlacement":F=c;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function tE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nE(e){return RL.some(t=>e[t]>=0)}const u2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=ws(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=tE(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:nE(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=tE(l,n.floating);return{data:{escapedOffsets:c,escaped:nE(c)}}}default:return{}}}}},zR=new Set(["left","top"]);async function c2(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=jr(n),c=mo(n),d=di(n)==="y",p=zR.has(l)?-1:1,h=a&&d?-1:1,m=ws(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:k}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof k=="number"&&(y=c==="end"?k*-1:k),d?{x:y*h,y:g*p}:{x:g*p,y:y*h}}const f2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,d=await c2(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},d2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:E=>{let{x:R,y:_}=E;return{x:R,y:_}}},...p}=ws(e,t),h={x:n,y:r},m=await a.detectOverflow(t,p),g=di(jr(s)),y=_v(g);let k=h[y],S=h[g];if(l){const E=y==="y"?"top":"left",R=y==="y"?"bottom":"right",_=k+m[E],C=k-m[R];k=vy(_,k,C)}if(c){const E=g==="y"?"top":"left",R=g==="y"?"bottom":"right",_=S+m[E],C=S-m[R];S=vy(_,S,C)}const T=d.fn({...t,[y]:k,[g]:S});return{...T,data:{x:T.x-n,y:T.y-r,enabled:{[y]:l,[g]:c}}}}}},p2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:p=!0}=ws(e,t),h={x:n,y:r},m=di(s),g=_v(m);let y=h[g],k=h[m];const S=ws(c,t),T=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=g==="y"?"height":"width",C=a.reference[g]-a.floating[_]+T.mainAxis,A=a.reference[g]+a.reference[_]-T.mainAxis;y<C?y=C:y>A&&(y=A)}if(p){var E,R;const _=g==="y"?"width":"height",C=zR.has(jr(s)),A=a.reference[m]-a.floating[_]+(C&&((E=l.offset)==null?void 0:E[m])||0)+(C?0:T.crossAxis),N=a.reference[m]+a.reference[_]+(C?0:((R=l.offset)==null?void 0:R[m])||0)-(C?T.crossAxis:0);k<A?k=A:k>N&&(k=N)}return{[g]:y,[m]:k}}}},h2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:c}=t,{apply:d=()=>{},...p}=ws(e,t),h=await l.detectOverflow(t,p),m=jr(s),g=mo(s),y=di(s)==="y",{width:k,height:S}=a.floating;let T,E;m==="top"||m==="bottom"?(T=m,E=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(E=m,T=g==="end"?"top":"bottom");const R=S-h.top-h.bottom,_=k-h.left-h.right,C=gl(S-h[T],R),A=gl(k-h[E],_),N=!t.middlewareData.shift;let I=C,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=R),N&&!g){const L=Yr(h.left,0),Z=Yr(h.right,0),K=Yr(h.top,0),q=Yr(h.bottom,0);y?$=k-2*(L!==0||Z!==0?L+Z:Yr(h.left,h.right)):I=S-2*(K!==0||q!==0?K+q:Yr(h.top,h.bottom))}await d({...t,availableWidth:$,availableHeight:I});const H=await l.getDimensions(c.floating);return k!==H.width||S!==H.height?{reset:{rects:!0}}:{}}}};function LR(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=It(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=bl(n)!==a||bl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Ov(e){return yt(e)?e:e.contextElement}function ol(e){const t=Ov(e);if(!It(t))return $i(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=LR(t);let l=(a?bl(n.width):n.width)/r,c=(a?bl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const m2=$i(0);function jR(e){const t=yn(e);return!Lc()||!t.visualViewport?m2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function Qo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ov(e);let l=$i(1);t&&(r?yt(r)&&(l=ol(r)):l=ol(e));const c=g2(a,n,r)?jR(a):$i(0);let d=(s.left+c.x)/l.x,p=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a){const g=yn(a),y=r&&yt(r)?yn(r):r;let k=g,S=hy(k);for(;S&&r&&y!==k;){const T=ol(S),E=S.getBoundingClientRect(),R=Er(S),_=E.left+(S.clientLeft+parseFloat(R.paddingLeft))*T.x,C=E.top+(S.clientTop+parseFloat(R.paddingTop))*T.y;d*=T.x,p*=T.y,h*=T.x,m*=T.y,d+=_,p+=C,k=yn(S),S=hy(k)}}return cc({width:h,height:m,x:d,y:p})}function yh(e,t){const n=uh(e).scrollLeft;return t?t.left+n:Qo(Ui(e)).left+n}function PR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-yh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function b2(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Ui(r),c=t?lh(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},p=$i(1);const h=$i(0),m=It(r);if((m||!m&&!a)&&((Yn(r)!=="body"||ho(l))&&(d=uh(r)),m)){const y=Qo(r);p=ol(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=l&&!m&&!a?PR(l,d):$i(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-d.scrollLeft*p.x+h.x+g.x,y:n.y*p.y-d.scrollTop*p.y+h.y+g.y}}function y2(e){return Array.from(e.getClientRects())}function v2(e){const t=Ui(e),n=uh(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+yh(e);const c=-n.scrollTop;return Er(r).direction==="rtl"&&(l+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:c}}const rE=25;function x2(e,t){const n=yn(e),r=Ui(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,d=0;if(s){a=s.width,l=s.height;const h=Lc();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const p=yh(r);if(p<=0){const h=r.ownerDocument,m=h.body,g=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,k=Math.abs(r.clientWidth-m.clientWidth-y);k<=rE&&(a-=k)}else p<=rE&&(a+=p);return{width:a,height:l,x:c,y:d}}function k2(e,t){const n=Qo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=It(e)?ol(e):$i(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,p=r*a.y;return{width:l,height:c,x:d,y:p}}function iE(e,t,n){let r;if(t==="viewport")r=x2(e,n);else if(t==="document")r=v2(Ui(e));else if(yt(t))r=k2(t,n);else{const s=jR(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return cc(r)}function $R(e,t){const n=Fi(e);return n===t||!yt(n)||hi(n)?!1:Er(n).position==="fixed"||$R(n,t)}function S2(e,t){const n=t.get(e);if(n)return n;let r=oo(e,[],!1).filter(c=>yt(c)&&Yn(c)!=="body"),s=null;const a=Er(e).position==="fixed";let l=a?Fi(e):e;for(;yt(l)&&!hi(l);){const c=Er(l),d=kv(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||ho(l)&&!d&&$R(e,l))?r=r.filter(h=>h!==l):s=c,l=Fi(l)}return t.set(e,r),r}function w2(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?lh(t)?[]:S2(t,this._c):[].concat(n),r],c=iE(t,l[0],s);let d=c.top,p=c.right,h=c.bottom,m=c.left;for(let g=1;g<l.length;g++){const y=iE(t,l[g],s);d=Yr(y.top,d),p=gl(y.right,p),h=gl(y.bottom,h),m=Yr(y.left,m)}return{width:p-m,height:h-d,x:m,y:d}}function E2(e){const{width:t,height:n}=LR(e);return{width:t,height:n}}function T2(e,t,n){const r=It(t),s=Ui(t),a=n==="fixed",l=Qo(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=$i(0);function p(){d.x=yh(s)}if(r||!r&&!a)if((Yn(t)!=="body"||ho(s))&&(c=uh(t)),r){const y=Qo(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&p();a&&!r&&s&&p();const h=s&&!r&&!a?PR(s,c):$i(0),m=l.left+c.scrollLeft-d.x-h.x,g=l.top+c.scrollTop-d.y-h.y;return{x:m,y:g,width:l.width,height:l.height}}function hb(e){return Er(e).position==="static"}function sE(e,t){if(!It(e)||Er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ui(e)===n&&(n=n.ownerDocument.body),n}function BR(e,t){const n=yn(e);if(lh(e))return n;if(!It(e)){let s=Fi(e);for(;s&&!hi(s);){if(yt(s)&&!hb(s))return s;s=Fi(s)}return n}let r=sE(e,t);for(;r&&Xz(r)&&hb(r);)r=sE(r,t);return r&&hi(r)&&hb(r)&&!kv(r)?n:r||eL(e)||n}const _2=async function(e){const t=this.getOffsetParent||BR,n=this.getDimensions,r=await n(e.floating);return{reference:T2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function R2(e){return Er(e).direction==="rtl"}const FR={convertOffsetParentRelativeRectToViewportRelativeRect:b2,getDocumentElement:Ui,getClippingRect:w2,getOffsetParent:BR,getElementRects:_2,getClientRects:y2,getDimensions:E2,getScale:ol,isElement:yt,isRTL:R2};function UR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C2(e,t){let n=null,r;const s=Ui(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const p=e.getBoundingClientRect(),{left:h,top:m,width:g,height:y}=p;if(c||t(),!g||!y)return;const k=ys(m),S=ys(s.clientWidth-(h+g)),T=ys(s.clientHeight-(m+y)),E=ys(h),_={rootMargin:-k+"px "+-S+"px "+-T+"px "+-E+"px",threshold:Yr(0,gl(1,d))||1};let C=!0;function A(N){const I=N[0].intersectionRatio;if(I!==d){if(!C)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!UR(p,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(A,{..._,root:s.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return l(!0),a}function Rp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,p=Ov(e),h=s||a?[...p?oo(p):[],...t?oo(t):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const m=p&&c?C2(p,n):null;let g=-1,y=null;l&&(y=new ResizeObserver(E=>{let[R]=E;R&&R.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=y)==null||_.observe(t)})),n()}),p&&!d&&y.observe(p),t&&y.observe(t));let k,S=d?Qo(e):null;d&&T();function T(){const E=Qo(e);S&&!UR(S,E)&&n(),S=E,k=requestAnimationFrame(T)}return n(),()=>{var E;h.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),m?.(),(E=y)==null||E.disconnect(),y=null,d&&cancelAnimationFrame(k)}}const A2=f2,N2=d2,O2=l2,M2=h2,I2=u2,D2=p2,z2=(e,t,n)=>{const r=new Map,s={platform:FR,...n},a={...s.platform,_c:r};return a2(e,t,{...s,platform:a})};var L2=typeof document<"u",j2=function(){},dp=L2?x.useLayoutEffect:j2;function Cp(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,s;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(!Cp(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!Cp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function qR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oE(e,t){const n=qR(e);return Math.round(t*n)/n}function mb(e){const t=x.useRef(e);return dp(()=>{t.current=e}),t}function HR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:d,open:p}=e,[h,m]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=x.useState(r);Cp(g,r)||y(r);const[k,S]=x.useState(null),[T,E]=x.useState(null),R=x.useCallback(P=>{P!==N.current&&(N.current=P,S(P))},[]),_=x.useCallback(P=>{P!==I.current&&(I.current=P,E(P))},[]),C=a||k,A=l||T,N=x.useRef(null),I=x.useRef(null),$=x.useRef(h),H=d!=null,L=mb(d),Z=mb(s),K=mb(p),q=x.useCallback(()=>{if(!N.current||!I.current)return;const P={placement:t,strategy:n,middleware:g};Z.current&&(P.platform=Z.current),z2(N.current,I.current,P).then(W=>{const D={...W,isPositioned:K.current!==!1};z.current&&!Cp($.current,D)&&($.current=D,Ri.flushSync(()=>{m(D)}))})},[g,t,n,Z,K]);dp(()=>{p===!1&&$.current.isPositioned&&($.current.isPositioned=!1,m(P=>({...P,isPositioned:!1})))},[p]);const z=x.useRef(!1);dp(()=>(z.current=!0,()=>{z.current=!1}),[]),dp(()=>{if(C&&(N.current=C),A&&(I.current=A),C&&A){if(L.current)return L.current(C,A,q);q()}},[C,A,q,L,H]);const j=x.useMemo(()=>({reference:N,floating:I,setReference:R,setFloating:_}),[R,_]),F=x.useMemo(()=>({reference:C,floating:A}),[C,A]),U=x.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const W=oE(F.floating,h.x),D=oE(F.floating,h.y);return c?{...P,transform:"translate("+W+"px, "+D+"px)",...qR(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:D}},[n,c,F.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:q,refs:j,elements:F,floatingStyles:U}),[h,q,j,F,U])}const Mv=(e,t)=>{const n=A2(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iv=(e,t)=>{const n=N2(e);return{name:n.name,fn:n.fn,options:[e,t]}},P2=(e,t)=>({fn:D2(e).fn,options:[e,t]}),Dv=(e,t)=>{const n=O2(e);return{name:n.name,fn:n.fn,options:[e,t]}},zv=(e,t)=>{const n=M2(e);return{name:n.name,fn:n.fn,options:[e,t]}},$2=(e,t)=>{const n=I2(e);return{name:n.name,fn:n.fn,options:[e,t]}},rt=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Xn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var gb={exports:{}},bb={};var aE;function B2(){if(aE)return bb;aE=1;var e=Dc();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var y=g(),k=r({inst:{value:y,getSnapshot:g}}),S=k[0].inst,T=k[1];return a(function(){S.value=y,S.getSnapshot=g,d(S)&&T({inst:S})},[m,y,g]),s(function(){return d(S)&&T({inst:S}),m(function(){d(S)&&T({inst:S})})},[m]),l(y),y}function d(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!n(m,y)}catch{return!0}}function p(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return bb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,bb}var lE;function GR(){return lE||(lE=1,gb.exports=B2()),gb.exports}var Lv=GR(),yb={exports:{}},vb={};var uE;function F2(){if(uE)return vb;uE=1;var e=Dc(),t=GR();function n(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return vb.useSyncExternalStoreWithSelector=function(p,h,m,g,y){var k=a(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=c(function(){function E(N){if(!R){if(R=!0,_=N,N=g(N),y!==void 0&&S.hasValue){var I=S.value;if(y(I,N))return C=I}return C=N}if(I=C,r(_,N))return I;var $=g(N);return y!==void 0&&y(I,$)?(_=N,I):(_=N,C=$)}var R=!1,_,C,A=m===void 0?null:m;return[function(){return E(h())},A===null?void 0:function(){return E(A())}]},[h,m,g,y]);var T=s(p,k[0],k[1]);return l(function(){S.hasValue=!0,S.value=T},[T]),d(T),T},vb}var cE;function U2(){return cE||(cE=1,yb.exports=F2()),yb.exports}var q2=U2();const Ey=[];let Ty;function H2(){return Ty}function G2(e){Ey.push(e)}function VR(e){const t=(n,r)=>{const s=wr(K2).current;let a;try{Ty=s;for(const l of Ey)l.before(s);a=e(n,r);for(const l of Ey)l.after(s);s.didInitialize=!0}finally{Ty=void 0}return a};return t.displayName=e.displayName||e.name,t}function V2(e){return x.forwardRef(VR(e))}function K2(){return{didInitialize:!1}}const Z2=bv(19),W2=Z2?X2:Q2;function bt(e,t,n,r,s){return W2(e,t,n,r,s)}function Y2(e,t,n,r,s){const a=x.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return Lv.useSyncExternalStore(e.subscribe,a,a)}G2({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,s))&&(t=!0,r.value=s,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),Lv.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function X2(e,t,n,r,s){const a=H2();if(!a)return Y2(e,t,n,r,s);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s),didChange:!1},a.syncHooks.push(c)),c.value}function Q2(e,t,n,r,s){return q2.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class KR{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])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return bt(this,t,n,r,s)}}class ZR extends KR{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t),He(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;He(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);He(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=n!==void 0;He(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return x.useDebugValue(t),bt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){x.useDebugValue(t);const r=Ve(n??or);this.context[t]=r}useStateSetter(t){const n=x.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 s=r(this.state);return n(s,s,this),this.subscribe(a=>{const l=r(a);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}function J2(){const[,e]=x.useState({});return x.useCallback(()=>{e({})},[])}const ej={open:rt(e=>e.open),transitionStatus:rt(e=>e.transitionStatus),domReferenceElement:rt(e=>e.domReferenceElement),referenceElement:rt(e=>e.positionReference??e.referenceElement),floatingElement:rt(e=>e.floatingElement),floatingId:rt(e=>e.floatingId)};class jv extends ZR{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:GL(),nested:r,triggerElements:a},ej),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&lR(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function Bc(e,t=!1,n=!1){const[r,s]=x.useState(e&&t?"idle":void 0),[a,l]=x.useState(e);return e&&!a&&(l(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),He(()=>{if(!e&&a&&r!=="ending"&&n){const c=An.request(()=>{s("ending")});return()=>{An.cancel(c)}}},[e,a,r,n]),He(()=>{if(!e||t)return;const c=An.request(()=>{s(void 0)});return()=>{An.cancel(c)}},[t,e]),He(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=An.request(()=>{s("idle")});return()=>{An.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function WR(e,t=!1,n=!0){const r=Pc();return Ve((s,a=null)=>{r.cancel();const l=ps(e);if(l==null)return;const c=l,d=()=>{Ri.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function p(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||d()}).catch(()=>{if(n){a?.aborted||d();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&p()})}if(t){const h=Xo.startingStyle;if(!c.hasAttribute(h)){r.request(p);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),p())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(p)})}function aa(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ve(s),l=WR(r,n,!1);x.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}function tj(e,t){const n=x.useRef(null),r=x.useRef(null);return x.useCallback(s=>{if(e!==void 0){if(n.current!==null){const a=n.current,l=r.current,c=t.context.triggerElements.getById(a);l&&c===l&&t.context.triggerElements.delete(a),n.current=null,r.current=null}s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function nj(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=tj(e,n),l=Ve(c=>{if(a(c),!c||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:c,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return He(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function rj(e){const t=e.useState("open");He(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,s]=n.value;e.update({activeTriggerId:r,activeTriggerElement:s})}}},[t,e])}function ij(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Bc(e);t.useSyncedValues({mounted:r,transitionStatus:a});const l=Ve(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return aa({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:a}}class Pv{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function sj(){return new jv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Pv,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function oj(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:sj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:hr,inactiveTriggerProps:hr,popupProps:hr}}const Ed=rt(e=>e.triggerIdProp??e.activeTriggerId),aj={open:rt(e=>e.openProp??e.open),mounted:rt(e=>e.mounted),transitionStatus:rt(e=>e.transitionStatus),floatingRootContext:rt(e=>e.floatingRootContext),preventUnmountingOnClose:rt(e=>e.preventUnmountingOnClose),payload:rt(e=>e.payload),activeTriggerId:Ed,activeTriggerElement:rt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:rt((e,t)=>t!==void 0&&Ed(e)===t),isOpenedByTrigger:rt((e,t)=>t!==void 0&&Ed(e)===t&&e.open),isMountedByTrigger:rt((e,t)=>t!==void 0&&Ed(e)===t&&e.mounted),triggerProps:rt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:rt(e=>e.popupProps),popupElement:rt(e=>e.popupElement),positionerElement:rt(e=>e.positionerElement)};function YR(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=fh(),a=bh()!=null,l=wr(()=>new jv({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Pv,floatingId:s,syncOnly:!1,nested:a})).current;return He(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=yt(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l}function lj(e={}){const{nodeId:t,externalTree:n}=e,r=YR(e),s=e.rootContext||r,a={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[l,c]=x.useState(null),d=x.useRef(null),p=Cl(n);He(()=>{a.domReference&&(d.current=a.domReference)},[a.domReference]);const h=HR({...e,elements:{...a,...l&&{reference:l}}}),m=x.useCallback($=>{const H=yt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;c(H),h.refs.setReference(H)},[h.refs]),[g,y]=x.useState(void 0),[k,S]=x.useState(null);s.useSyncedValue("referenceElement",g??null);const T=yt(g)?g:null;s.useSyncedValue("domReferenceElement",g===void 0?a.domReference:T),s.useSyncedValue("floatingElement",k);const E=x.useCallback($=>{(yt($)||$===null)&&(d.current=$,y($)),(yt(h.refs.reference.current)||h.refs.reference.current===null||$!==null&&!yt($))&&h.refs.setReference($)},[h.refs,y]),R=x.useCallback($=>{S($),h.refs.setFloating($)},[h.refs]),_=x.useMemo(()=>({...h.refs,setReference:E,setFloating:R,setPositionReference:m,domReference:d}),[h.refs,E,R,m]),C=x.useMemo(()=>({...h.elements,domReference:a.domReference}),[h.elements,a.domReference]),A=s.useState("open"),N=s.useState("floatingId"),I=x.useMemo(()=>({...h,dataRef:s.context.dataRef,open:A,onOpenChange:s.setOpen,events:s.context.events,floatingId:N,refs:_,elements:C,nodeId:t,rootStore:s}),[h,_,C,t,s,A,N]);return He(()=>{s.context.dataRef.current.floatingContext=I;const $=p?.nodesRef.current.find(H=>H.id===t);$&&($.context=I)}),x.useMemo(()=>({...h,context:I,refs:_,elements:C,rootStore:s}),[h,_,C,I,s])}function uj(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,s=fh(),a=bh()!=null,l=t.useState("open"),c=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),p=t.context.triggerElements,h=wr(()=>new jv({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:d,triggerElements:p,onOpenChange:r,floatingId:s,syncOnly:!0,nested:a})).current;return He(()=>{const m={open:l,floatingId:s,referenceElement:c,floatingElement:d};yt(c)&&(m.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(m.positionReference=c),h.update(m)},[l,s,c,d,h]),h.context.onOpenChange=r,h.context.nested=a,h}const xb=pL&&iR;function cj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:s}=n.context,{enabled:a=!0,delay:l}=t,c=x.useRef(!1),d=x.useRef(null),p=fi(),h=x.useRef(!0);x.useEffect(()=>{const g=n.select("domReferenceElement");if(!a)return;const y=yn(g);function k(){const E=n.select("domReferenceElement");!n.select("open")&&It(E)&&E===Dr(Ft(E))&&(c.current=!0)}function S(){h.current=!0}function T(){h.current=!1}return Pi(Nt(y,"blur",k),xb&&Nt(y,"keydown",S,!0),xb&&Nt(y,"pointerdown",T,!0))},[n,a]),x.useEffect(()=>{if(!a)return;function g(y){if(y.reason===hl||y.reason===wv){const k=n.select("domReferenceElement");yt(k)&&(d.current=k,c.current=!0)}}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,a,n]);const m=x.useMemo(()=>({onMouseLeave(){c.current=!1,d.current=null},onFocus(g){const y=g.currentTarget;if(c.current){if(d.current===y)return;c.current=!1,d.current=null}const k=gr(g.nativeEvent);if(yt(k)){if(xb&&!g.relatedTarget){if(!h.current&&!hh(k))return}else if(!_L(k))return}const S=Ep(g.relatedTarget,n.context.triggerElements),{nativeEvent:T,currentTarget:E}=g,R=typeof l=="function"?l():l;if(n.select("open")&&S||R===0||R===void 0){n.setOpen(!0,_t(up,T,E));return}p.start(R,()=>{c.current||n.setOpen(!0,_t(up,T,E))})},onBlur(g){c.current=!1,d.current=null;const y=g.relatedTarget,k=g.nativeEvent,S=yt(y)&&y.hasAttribute(dc("focus-guard"))&&y.getAttribute("data-type")==="outside";p.start(0,()=>{const T=n.select("domReferenceElement"),E=Dr(Ft(T));!y&&E===T||kt(s.current.floatingContext?.refs.floating.current,E)||kt(T,E)||S||Ep(y??E,n.context.triggerElements)||n.setOpen(!1,_t(up,k))})}}),[s,n,p,l]);return x.useMemo(()=>a?{reference:m,trigger:m}:{},[a,m])}class $v{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ti,this.restTimeout=new Ti,this.handleCloseOptions=void 0}static create(){return new $v}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Ap=new WeakMap;function Np(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Ap.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Ap.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function XR(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Ap.get(n);a&&a!==e&&Np(a),Np(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Ap.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function QR(e){const t=wr($v.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),ph(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function fj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:c=!0,closeDelay:d=0,nodeId:p}=t,h=QR(n),m=Cl(),g=bh(),y=Ve(()=>uR(l.current.openEvent?.type,h.interactedInside)),k=Ve(()=>{const C=l.current.openEvent?.type;return C?.includes("mouse")&&C!=="mousedown"}),S=Ve(C=>Ep(C,n.context.triggerElements)),T=x.useCallback(C=>{const A=Sp(d,"close",h.pointerType),N=()=>{n.setOpen(!1,_t(ui,C)),m?.events.emit("floating.closed",C)};A?h.openChangeTimeout.start(A,N):(h.openChangeTimeout.clear(),N())},[d,n,h,m]),E=Ve(()=>{Np(h)}),R=Ve(C=>{const A=gr(C);if(!TL(A)){h.interactedInside=!1;return}h.interactedInside=A?.closest("[aria-haspopup]")!=null});He(()=>{r||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,E())},[r,h,E]),x.useEffect(()=>E,[E]),He(()=>{if(c&&r&&h.handleCloseOptions?.blockPointerEvents&&k()&&yt(a)&&s){const C=a,A=s,N=Ft(s),I=m?.nodesRef.current.find(H=>H.id===g)?.context?.elements.floating;I&&(I.style.pointerEvents="");const $=h.handleCloseOptions?.getScope?.()??h.pointerEventsScopeElement??I??C.closest("[data-rootownerid]")??N.body;return XR(h,{scopeElement:$,referenceElement:C,floatingElement:A}),()=>{E()}}},[c,r,a,s,h,k,m,g,E]);const _=fi();x.useEffect(()=>{if(!c)return;function C(){h.openChangeTimeout.clear(),_.clear(),m?.events.off("floating.closed",N),E()}function A($){if(m&&g&&Bi(m.nodesRef.current,g).length>0){m.events.on("floating.closed",N);return}if(S($.relatedTarget))return;const H=l.current.floatingContext?.nodeId??p,L=$.relatedTarget;if(!(m&&H&&yt(L)&&Bi(m.nodesRef.current,H,!1).some(K=>kt(K.context?.elements.floating,L)))){if(h.handler){h.handler($);return}E(),y()||T($)}}function N($){!m||!g||Bi(m.nodesRef.current,g).length>0||_.start(0,()=>{m.events.off("floating.closed",N),n.setOpen(!1,_t(ui,$)),m.events.emit("floating.closed",$)})}const I=s;return Pi(I&&Nt(I,"mouseenter",C),I&&Nt(I,"mouseleave",A),I&&Nt(I,"pointerdown",R,!0),()=>{m?.events.off("floating.closed",N)})},[c,s,n,l,p,y,S,T,E,R,h,m,g,_])}const dj={current:null};function pj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:s}=n.context,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:p=0,move:h=!0,triggerElementRef:m=dj,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:k,isClosing:S}=t,T=Cl(g),E=QR(n),R=x.useRef(!1),_=Un(c),C=Un(l),A=Un(p),N=Un(a),I=Un(S);y&&(E.handleCloseOptions=_.current?.__options);const $=Ve(()=>uR(r.current.openEvent?.type,E.interactedInside)),H=Ve(z=>Ep(z,n.context.triggerElements)),L=Ve((z,j,F)=>{const U=n.context.triggerElements;if(U.hasElement(j))return!z||!kt(z,j);if(!yt(F))return!1;const P=F;return U.hasMatchingElement(W=>kt(W,P))&&(!z||!kt(z,P))}),Z=Ve((z,j=!0)=>{const F=Sp(C.current,"close",E.pointerType);F?E.openChangeTimeout.start(F,()=>{n.setOpen(!1,_t(ui,z)),T?.events.emit("floating.closed",z)}):j&&(E.openChangeTimeout.clear(),n.setOpen(!1,_t(ui,z)),T?.events.emit("floating.closed",z))}),K=Ve(()=>{if(!E.handler)return;Ft(n.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0}),q=Ve(()=>{Np(E)});return x.useEffect(()=>K,[K]),x.useEffect(()=>{if(!a)return;function z(j){j.open?R.current=!1:(R.current=j.reason===ui,K(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return s.on("openchange",z),()=>{s.off("openchange",z)}},[a,s,E,K]),x.useEffect(()=>{if(!a)return;const z=m.current??(y?n.select("domReferenceElement"):null);if(!yt(z))return;function j(U){if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,d&&!ml(E.pointerType))return;const P=Uw(A.current),W=Sp(C.current,"open",E.pointerType),D=gr(U),B=U.currentTarget??null,G=n.select("domReferenceElement");let O=B;if(yt(D)&&!n.context.triggerElements.hasElement(D)){for(const he of n.context.triggerElements.elements())if(kt(he,D)){O=he;break}}yt(B)&&yt(G)&&!n.context.triggerElements.hasElement(B)&&kt(B,G)&&(O=G);const ie=O==null?!1:L(G,O,D),te=n.select("open"),ne=I.current?.()??n.select("transitionStatus")==="ending",le=!te&&ne&&R.current,pe=!ie&&yt(O)&&yt(G)&&kt(G,O)&&le,ye=P>0&&!W,Se=ie&&(te||le)||pe,ze=!te||ie;if(Se){n.setOpen(!0,_t(ui,U,O));return}ye||(W?E.openChangeTimeout.start(W,()=>{ze&&n.setOpen(!0,_t(ui,U,O))}):ze&&n.setOpen(!0,_t(ui,U,O)))}function F(U){if($()){q();return}K();const P=n.select("domReferenceElement"),W=Ft(P);E.restTimeout.clear(),E.restTimeoutPending=!1;const D=r.current.floatingContext??k?.();if(H(U.relatedTarget))return;if(_.current&&D){n.select("open")||E.openChangeTimeout.clear();const O=m.current;E.handler=_.current({...D,tree:T,x:U.clientX,y:U.clientY,onClose(){q(),K(),N.current&&!$()&&O===n.select("domReferenceElement")&&Z(U,!0)}}),W.addEventListener("mousemove",E.handler),E.handler(U);return}(E.pointerType!=="touch"||!kt(n.select("floatingElement"),U.relatedTarget))&&Z(U)}return h?Pi(Nt(z,"mousemove",j,{once:!0}),Nt(z,"mouseenter",j),Nt(z,"mouseleave",F)):Pi(Nt(z,"mouseenter",j),Nt(z,"mouseleave",F))},[K,q,r,C,Z,n,a,_,E,y,L,$,H,d,h,A,m,T,N,k,I]),x.useMemo(()=>{if(!a)return;function z(j){E.pointerType=j.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(j){const{nativeEvent:F}=j,U=j.currentTarget,P=n.select("domReferenceElement"),W=n.select("open"),D=L(P,U,j.target);if(d&&!ml(E.pointerType))return;if(W&&D&&E.handleCloseOptions?.blockPointerEvents){const O=n.select("floatingElement");if(O){const ie=E.handleCloseOptions?.getScope?.()??U.ownerDocument.body;XR(E,{scopeElement:ie,referenceElement:U,floatingElement:O})}}const B=Uw(A.current);if(W&&!D||B===0||!D&&E.restTimeoutPending&&j.movementX**2+j.movementY**2<2)return;E.restTimeout.clear();function G(){if(E.restTimeoutPending=!1,$())return;const O=n.select("open");!E.blockMouseMove&&(!O||D)&&n.setOpen(!0,_t(ui,F,U))}E.pointerType==="touch"?Ri.flushSync(()=>{G()}):D&&W?G():(E.restTimeoutPending=!0,E.restTimeout.start(B,G))}}},[a,E,$,L,d,n,A])}function JR(e=[]){const t=e.map(p=>p?.reference),n=e.map(p=>p?.floating),r=e.map(p=>p?.item),s=e.map(p=>p?.trigger),a=x.useCallback(p=>Td(p,e,"reference"),t),l=x.useCallback(p=>Td(p,e,"floating"),n),c=x.useCallback(p=>Td(p,e,"item"),r),d=x.useCallback(p=>Td(p,e,"trigger"),s);return x.useMemo(()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:c,getTriggerProps:d}),[a,l,c,d])}function Td(e,t,n){const r=new Map,s=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[by]="");for(const l in e)s&&e&&(l===dR||l===pR)||(a[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const d=t[l]?.[n];typeof d=="function"?c=e?d(e):null:c=d,c&&fE(a,c,s,r)}return fE(a,e,s,r),a}function fE(e,t,n,r){for(const s in t){const a=t[s];n&&(s===dR||s===pR)||(s.startsWith("on")?(r.has(s)||r.set(s,[]),typeof a=="function"&&(r.get(s)?.push(a),e[s]=(...l)=>r.get(s)?.map(c=>c(...l)).find(c=>c!==void 0))):e[s]=a)}}function hj(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 mj="Escape";function vh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function _d(e,t){return vh(t,e===Tv||e===$c,e===ao||e===lo)}function kb(e,t,n){return vh(t,e===$c,n?e===ao:e===lo)||e==="Enter"||e===" "||e===""}function gj(e,t,n){return vh(t,n?e===ao:e===lo,e===$c)}function bj(e,t,n,r){const s=n?e===lo:e===ao,a=e===Tv;return t==="both"||t==="horizontal"&&r&&r>1?e===mj:vh(t,s,a)}function yj(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:d,onNavigate:p=()=>{},enabled:h=!0,selectedIndex:m=null,allowEscape:g=!1,loopFocus:y=!1,nested:k=!1,rtl:S=!1,virtual:T=!1,focusItemOnOpen:E="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:_=!0,disabledIndices:C=void 0,orientation:A="vertical",parentOrientation:N,cols:I=1,id:$,resetOnPointerLeave:H=!0,externalTree:L}=t,Z=Tp(s),K=Un(Z),q=bh(),z=Cl(L);He(()=>{l.current.orientation=A},[l,A]);const j=yy(a),F=x.useRef(E),U=x.useRef(m??-1),P=x.useRef(null),W=x.useRef(!0),D=Ve(ge=>{p(U.current===-1?null:U.current,ge)}),B=x.useRef(D),G=x.useRef(!!s),O=x.useRef(r),ie=x.useRef(!1),te=x.useRef(!1),ne=x.useRef(null),le=Un(C),pe=Un(r),ye=Un(m),Se=Un(H),ze=Ve(()=>{function ge(_e){T?z?.events.emit("virtualfocus",_e):ne.current=fp(_e,{sync:ie.current,preventScroll:!0})}const ce=c.current[U.current],oe=te.current;ce&&ge(ce),(ie.current?_e=>_e():requestAnimationFrame)(()=>{const _e=c.current[U.current]||ce;if(!_e)return;ce||ge(_e),Re&&(oe||!W.current)&&_e.scrollIntoView?.({block:"nearest",inline:"nearest"})})});He(()=>{h&&(r&&s?(U.current=m??-1,F.current&&m!=null&&(te.current=!0,D())):G.current&&(U.current=-1,B.current()))},[h,r,s,m,D]),He(()=>{if(h){if(!r){ie.current=!1;return}if(s)if(d==null){if(ie.current=!1,ye.current!=null)return;if(G.current&&(U.current=-1,ze()),(!O.current||!G.current)&&F.current&&(P.current!=null||F.current===!0&&P.current==null)){let ge=0;const ce=()=>{c.current[0]==null?(ge<2&&(ge?requestAnimationFrame:queueMicrotask)(ce),ge+=1):(U.current=P.current==null||kb(P.current,A,S)||k?cp(c):ky(c),P.current=null,D())};ce()}}else fc(c.current,d)||(U.current=d,ze(),te.current=!1)}},[h,r,s,d,ye,k,c,A,S,D,ze,le]),He(()=>{if(!h||s||!z||T||!G.current)return;const ge=z.nodesRef.current,ce=ge.find(_e=>_e.id===q)?.context?.elements.floating,oe=Dr(Ft(s)),re=ge.some(_e=>_e.context&&kt(_e.context.elements.floating,oe));ce&&!re&&W.current&&ce.focus({preventScroll:!0})},[h,s,z,q,T]),He(()=>{B.current=D,O.current=r,G.current=!!s}),He(()=>{r||(P.current=null,F.current=E)},[r,E]);const he=d!=null,Te=Ve(ge=>{if(!pe.current)return;const ce=c.current.indexOf(ge.currentTarget);ce!==-1&&(U.current!==ce||d!==ce)&&(U.current=ce,D(ge))}),Re=x.useMemo(()=>({onFocus(ce){ie.current=!0,Te(ce)},onClick:({currentTarget:ce})=>ce.focus({preventScroll:!0}),onMouseMove(ce){ie.current=!0,te.current=!1,R&&Te(ce)},onPointerLeave(ce){if(!pe.current||!W.current||ce.pointerType==="touch")return;ie.current=!0;const oe=ce.relatedTarget;if(!hj(ce)&&!(!R||c.current.includes(oe))&&Se.current&&(ne.current?.(),ne.current=null,U.current=-1,D(ce),!T)){const re=K.current,_e=Dr(Ft(re));re&&kt(re,_e)&&re.focus({preventScroll:!0})}}}),[Te,pe,K,R,c,D,Se,T]),Oe=x.useCallback(()=>N??z?.nodesRef.current.find(ge=>ge.id===q)?.context?.dataRef?.current.orientation,[q,z,N]),ve=Ve(ge=>{if(W.current=!1,ie.current=!0,ge.which===229||!pe.current&&ge.currentTarget===K.current)return;if(k&&bj(ge.key,A,S,I)){_d(ge.key,Oe())||Wr(ge),n.setOpen(!1,_t(ab,ge.nativeEvent)),It(a)&&(T?z?.events.emit("virtualfocus",a):a.focus());return}const ce=U.current,oe=cp(c,C),re=ky(c,C);if(j||(ge.key==="Home"&&(Wr(ge),U.current=oe,D(ge)),ge.key==="End"&&(Wr(ge),U.current=re,D(ge))),I>1){const _e=Array.from({length:c.current.length},()=>({width:1,height:1})),J=bR(_e,I,!1),fe=J.findIndex(Ze=>Ze!=null&&!vs(c.current,Ze,C)),Ie=J.reduce((Ze,Ye,ot)=>Ye!=null&&!vs(c.current,Ye,C)?ot:Ze,-1),Ue=J[gR(J.map(Ze=>Ze!=null?c.current[Ze]:null),{event:ge,orientation:A,loopFocus:y,rtl:S,cols:I,disabledIndices:vR([...(typeof C!="function"?C:null)||c.current.map((Ze,Ye)=>vs(c.current,Ye,C)?Ye:void 0),void 0],J),minIndex:fe,maxIndex:Ie,prevIndex:yR(U.current>re?oe:U.current,_e,J,I,ge.key===$c?"bl":ge.key===(S?ao:lo)?"tr":"tl"),stopEvent:!0})];if(Ue!=null&&(U.current=Ue,D(ge)),A==="both")return}if(_d(ge.key,A)){if(Wr(ge),r&&!T&&Dr(ge.currentTarget.ownerDocument)===ge.currentTarget){U.current=kb(ge.key,A,S)?oe:re,D(ge);return}kb(ge.key,A,S)?y?ce>=re?g&&ce!==c.current.length?U.current=-1:(ie.current=!1,U.current=oe):U.current=dr(c.current,{startingIndex:ce,disabledIndices:C}):U.current=Math.min(re,dr(c.current,{startingIndex:ce,disabledIndices:C})):y?ce<=oe?g&&ce!==-1?U.current=c.current.length:(ie.current=!1,U.current=re):U.current=dr(c.current,{startingIndex:ce,decrement:!0,disabledIndices:C}):U.current=Math.max(oe,dr(c.current,{startingIndex:ce,decrement:!0,disabledIndices:C})),fc(c.current,U.current)&&(U.current=-1),D(ge)}}),xe=x.useMemo(()=>T&&r&&he&&{"aria-activedescendant":`${$}-${d}`},[T,r,he,$,d]),Me=x.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...j?{}:xe,onKeyDown(ge){if(ge.key==="Tab"&&ge.shiftKey&&r&&!T){const ce=gr(ge.nativeEvent);if(ce&&!kt(K.current,ce))return;Wr(ge),n.setOpen(!1,_t(ch,ge.nativeEvent)),It(a)&&a.focus();return}ve(ge)},onPointerMove(){W.current=!0}}),[xe,ve,K,A,j,n,r,T,a]),Ce=x.useMemo(()=>{function ge(oe){E==="auto"&&oR(oe.nativeEvent)&&(F.current=!T)}function ce(oe){F.current=E,E==="auto"&&aR(oe.nativeEvent)&&(F.current=!0)}return{onKeyDown(oe){const re=n.select("open");W.current=!1;const _e=oe.key.startsWith("Arrow"),J=gj(oe.key,Oe(),S),fe=_d(oe.key,A),Ie=(k?J:fe)||oe.key==="Enter"||oe.key.trim()==="";if(T&&re)return ve(oe);if(!(!re&&!_&&_e)){if(Ie){const Ue=_d(oe.key,Oe());P.current=k&&Ue?null:oe.key}if(k){J&&(Wr(oe),re?(U.current=cp(c,le.current),D(oe)):n.setOpen(!0,_t(ab,oe.nativeEvent,oe.currentTarget)));return}fe&&(ye.current!=null&&(U.current=ye.current),Wr(oe),!re&&_?n.setOpen(!0,_t(ab,oe.nativeEvent,oe.currentTarget)):ve(oe),re&&D(oe))}},onFocus(oe){n.select("open")&&!T&&(U.current=-1,D(oe))},onPointerDown:ce,onPointerEnter:ce,onMouseDown:ge,onClick:ge}},[ve,le,E,c,k,D,n,_,A,Oe,S,ye,T]),Pe=x.useMemo(()=>({...xe,...Ce}),[xe,Ce]);return x.useMemo(()=>h?{reference:Pe,floating:Me,item:Re,trigger:Ce}:{},[h,Pe,Me,Ce,Re])}function vj(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,s=n.useState("open"),{listRef:a,elementsRef:l,activeIndex:c,onMatch:d,onTypingChange:p,enabled:h=!0,resetMs:m=750,selectedIndex:g=null}=t,y=fi(),k=x.useRef(""),S=x.useRef(g??c??-1),T=x.useRef(null);He(()=>{!s&&g!==null||(y.clear(),T.current=null,k.current!==""&&(k.current=""))},[s,g,y]),He(()=>{s&&k.current===""&&(S.current=g??c??-1)},[s,g,c]);const E=Ve(N=>{N?r.current.typing||(r.current.typing=N,p?.(N)):r.current.typing&&(r.current.typing=N,p?.(N))}),R=Ve(N=>{function I(j){const F=l?.current[j];return!F||mh(F)}function $(j,F,U=0){if(j.length===0)return-1;const P=(U%j.length+j.length)%j.length,W=F.toLocaleLowerCase();for(let D=0;D<j.length;D+=1){const B=(P+D)%j.length;if(!(!j[B]?.toLocaleLowerCase().startsWith(W)||!I(B)))return B}return-1}const H=a.current;if(k.current.length>0&&N.key===" "&&(Wr(N),E(!0)),k.current.length>0&&k.current[0]!==" "&&$(H,k.current)===-1&&N.key!==" "&&E(!1),H==null||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;s&&N.key!==" "&&(Wr(N),E(!0));const L=k.current==="";L&&(S.current=g??c??-1),H.every(j=>j?j[0]?.toLocaleLowerCase()!==j[1]?.toLocaleLowerCase():!0)&&k.current===N.key&&(k.current="",S.current=T.current),k.current+=N.key,y.start(m,()=>{k.current="",S.current=T.current,E(!1)});const q=((L?g??c??-1:S.current)??0)+1,z=$(H,k.current,q);z!==-1?(d?.(z),T.current=z):N.key!==" "&&(k.current="",E(!1))}),_=Ve(N=>{const I=N.relatedTarget,$=n.select("domReferenceElement"),H=n.select("floatingElement"),L=kt($,I),Z=kt(H,I);L||Z||(y.clear(),k.current="",S.current=T.current,E(!1))}),C=x.useMemo(()=>({onKeyDown:R,onBlur:_}),[R,_]),A=x.useMemo(()=>({onKeyDown:R,onBlur:_}),[R,_]);return x.useMemo(()=>h?{reference:C,floating:A}:{},[h,C,A])}const dE=.1,xj=dE*dE,rn=.5;function Rd(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Cd(e,t,n,r,s,a,l,c,d,p){let h=!1;return Rd(e,t,n,r,s,a)&&(h=!h),Rd(e,t,s,a,l,c)&&(h=!h),Rd(e,t,l,c,d,p)&&(h=!h),Rd(e,t,d,p,n,r)&&(h=!h),h}function kj(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Ad(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),d=Math.min(r,a),p=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=p}function Sj(e={}){const{blockPointerEvents:t=!1}=e,n=new Ti,r=({x:s,y:a,placement:l,elements:c,onClose:d,nodeId:p,tree:h})=>{const m=l?.split("-")[0];let g=!1,y=null,k=null,S=typeof performance<"u"?performance.now():0;function T(R,_){const C=performance.now(),A=C-S;if(y===null||k===null||A===0)return y=R,k=_,S=C,!1;const N=R-y,I=_-k,$=N*N+I*I,H=A*A*xj;return y=R,k=_,S=C,$<H}function E(){n.clear(),d()}return function(_){n.clear();const C=c.domReference,A=c.floating;if(!C||!A||m==null||s==null||a==null)return;const{clientX:N,clientY:I}=_,$=gr(_),H=_.type==="mouseleave",L=kt(A,$),Z=kt(C,$);if(L&&(g=!0,!H))return;if(Z&&(g=!1,!H)){g=!0;return}if(H&&yt(_.relatedTarget)&&kt(A,_.relatedTarget))return;function K(){return!!(h&&Bi(h.nodesRef.current,p).length>0)}function q(){K()||E()}if(K())return;const z=C.getBoundingClientRect(),j=A.getBoundingClientRect(),F=s>j.right-j.width/2,U=a>j.bottom-j.height/2,P=j.width>z.width,W=j.height>z.height,D=(P?z:j).left,B=(P?z:j).right,G=(W?z:j).top,O=(W?z:j).bottom;if(m==="top"&&a>=z.bottom-1||m==="bottom"&&a<=z.top+1||m==="left"&&s>=z.right-1||m==="right"&&s<=z.left+1){q();return}let ie=!1;switch(m){case"top":ie=Ad(N,I,D,z.top+1,B,j.bottom-1);break;case"bottom":ie=Ad(N,I,D,j.top+1,B,z.bottom-1);break;case"left":ie=Ad(N,I,j.right-1,O,z.left+1,G);break;case"right":ie=Ad(N,I,z.right-1,O,j.left+1,G);break}if(ie)return;if(g&&!kj(N,I,z)){q();return}if(!H&&T(N,I)){q();return}let te=!1;switch(m){case"top":{const ne=P?rn/2:rn*4,le=P||F?s+ne:s-ne,pe=P?s-ne:F?s+ne:s-ne,ye=a+rn+1,Se=F||P?j.bottom-rn:j.top,ze=F?P?j.bottom-rn:j.top:j.bottom-rn;te=Cd(N,I,le,ye,pe,ye,j.left,Se,j.right,ze);break}case"bottom":{const ne=P?rn/2:rn*4,le=P||F?s+ne:s-ne,pe=P?s-ne:F?s+ne:s-ne,ye=a-rn,Se=F||P?j.top+rn:j.bottom,ze=F?P?j.top+rn:j.bottom:j.top+rn;te=Cd(N,I,le,ye,pe,ye,j.left,Se,j.right,ze);break}case"left":{const ne=W?rn/2:rn*4,le=W||U?a+ne:a-ne,pe=W?a-ne:U?a+ne:a-ne,ye=s+rn+1,Se=U||W?j.right-rn:j.left,ze=U?W?j.right-rn:j.left:j.right-rn;te=Cd(N,I,Se,j.top,ze,j.bottom,ye,le,ye,pe);break}case"right":{const ne=W?rn/2:rn*4,le=W||U?a+ne:a-ne,pe=W?a-ne:U?a+ne:a-ne,ye=s-rn,Se=U||W?j.left+rn:j.right,ze=U?W?j.left+rn:j.right:j.left+rn;te=Cd(N,I,ye,le,ye,pe,Se,j.top,ze,j.bottom);break}}te?g||n.start(40,q):q()}};return r.__options={...e,blockPointerEvents:t},r}const al="ArrowUp",Ho="ArrowDown",pc="ArrowLeft",ll="ArrowRight",Fc="Home",Uc="End",eC=new Set([pc,ll]),wj=new Set([pc,ll,Fc,Uc]),tC=new Set([al,Ho]),Ej=new Set([al,Ho,Fc,Uc]),nC=new Set([...eC,...tC]),Tj=new Set([...nC,Fc,Uc]),_j=new Set([al,Ho,pc,ll,Fc,Uc]),Rj="Shift",Cj="Control",Aj="Alt",Nj="Meta",Oj=new Set([Rj,Cj,Aj,Nj]);function Mj(e){return It(e)&&e.tagName==="INPUT"}function pE(e){return!!(Mj(e)&&e.selectionStart!=null||It(e)&&e.tagName==="TEXTAREA")}function hE(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const d=mE(e,t,"left"),p=Nd(e),h=Nd(t);n==="ltr"&&(d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight?s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight:d-h.scrollMarginLeft<e.scrollLeft+p.scrollPaddingLeft&&(s=d-h.scrollMarginLeft-p.scrollPaddingLeft)),n==="rtl"&&(d-h.scrollMarginRight<e.scrollLeft+p.scrollPaddingLeft?s=d-h.scrollMarginLeft-p.scrollPaddingLeft:d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-p.scrollPaddingRight&&(s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+p.scrollPaddingRight))}if(c&&r!=="horizontal"){const d=mE(e,t,"top"),p=Nd(e),h=Nd(t);d-h.scrollMarginTop<e.scrollTop+p.scrollPaddingTop?a=d-h.scrollMarginTop-p.scrollPaddingTop:d+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-p.scrollPaddingBottom&&(a=d+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+p.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function mE(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[r],t.offsetParent!==e);)t=t.offsetParent;return s}function Nd(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 Ij(e){return bv(19)?e:e?"true":void 0}const Dj=x.forwardRef(function(t,n){const{cutout:r,...s}=t;let a;if(r){const l=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${l.left}px ${l.top}px,${l.left}px ${l.bottom}px,${l.right}px ${l.bottom}px,${l.right}px ${l.top}px,${l.left}px ${l.top}px)`}return v.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});function rC(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}let gE={},bE={},yE="";function zj(e){if(typeof document>"u")return!1;const t=Ft(e);return yn(t).innerWidth-t.documentElement.clientWidth>0}function Lj(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Ft(e),r=n.documentElement,s=n.body,a=ho(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const d=a.offsetWidth;a.style.overflowY="hidden";const p=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===p}function jj(e){const t=Ft(e),n=t.documentElement,r=t.body,s=ho(n)?n:r,a={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,a)}}function Pj(e){const t=Ft(e),n=t.documentElement,r=t.body,s=yn(n);let a=0,l=0,c=!1;const d=An.create();if(Ev&&(s.visualViewport?.scale??1)!==1)return()=>{};function p(){const y=s.getComputedStyle(n),k=s.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,gE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},yE=n.style.scrollBehavior,bE={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 R=n.scrollHeight>n.clientHeight,_=n.scrollWidth>n.clientWidth,C=y.overflowY==="scroll"||k.overflowY==="scroll",A=y.overflowX==="scroll"||k.overflowX==="scroll",N=Math.max(0,s.innerWidth-r.clientWidth),I=Math.max(0,s.innerHeight-r.clientHeight),$=parseFloat(k.marginTop)+parseFloat(k.marginBottom),H=parseFloat(k.marginLeft)+parseFloat(k.marginRight),L=ho(n)?n:r;if(c=Lj(e),c){n.style.scrollbarGutter=E,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(R||C)&&(n.style.overflowY="scroll"),(_||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||I?`calc(100dvh - ${$+I}px)`:"100dvh",width:H||N?`calc(100vw - ${H+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,gE),Object.assign(r.style,bE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=yE)}function m(){h(),d.request(p)}p();const g=Nt(s,"resize",m);return()=>{d.cancel(),h(),typeof s.removeEventListener=="function"&&g()}}class $j{lockCount=0;restore=null;timeoutLock=Ti.create();timeoutUnlock=Ti.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=Ft(t).documentElement,s=yn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=or;return}const a=rR||!zj(t);this.restore=a?jj(t):Pj(t)}}const Bj=new $j;function Fj(e=!0,t=null){He(()=>{if(e)return Bj.acquire(t)},[e,t])}function Uj(e){const t=x.useRef(""),n=x.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:x.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function iC(e,t){const n=x.useRef(e),r=Ve(t);He(()=>{n.current!==e&&r(n.current)},[e,r]),He(()=>{n.current=e},[e])}function qj(e){const[t,n]=x.useState(null),r=Ve((l,c)=>{e||n(c||(rR?"touch":""))});iC(e,l=>{l&&!e&&n(null)});const{onClick:s,onPointerDown:a}=Uj(r);return x.useMemo(()=>({openMethod:t,triggerProps:{onClick:s,onPointerDown:a}}),[t,s,a])}const Hj={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-bower":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},Gj={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-bower":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""};function Vj(e,t="outline"){return t==="filled"?Gj[e]:Hj[e]}const Kj=new Set(["ui-progress-spin","cursor-icon-spin"]);function Zj(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&Kj.has(t.animationName)&&(t.startTime=0)}const _y=x.createContext(void 0);function Ts({iconSize:e,iconButtonSize:t,iconButtonSubtleHover:n,buttonSize:r,buttonVariant:s,menuSize:a,disabled:l,children:c}){const d=x.useContext(_y),p=x.useMemo(()=>({iconSize:e??d?.iconSize,iconButtonSize:t??d?.iconButtonSize,iconButtonSubtleHover:n??d?.iconButtonSubtleHover,buttonSize:r??d?.buttonSize,buttonVariant:s??d?.buttonVariant,menuSize:a??d?.menuSize,disabled:l??d?.disabled}),[r,s,l,t,n,e,a,d]);return v.jsx(_y.Provider,{value:p,children:c})}function Al(){return x.useContext(_y)}const Wj="sm",Kt={base:{kKX8nH:"ui-1j61x8r",k63SB2:"ui-etm3q0",kGuDYH:"ui-1tachi3",kMv6JI:"ui-1qt6sjn",kLWn49:"ui-o5v014",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kMwMTN:"ui-1heor9g",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kXLuUW:"ui-xymvpz",kMnn75:"ui-krqix3",kJwUce:"ui-1403hyl",k9WMMc:"ui-2b8uid",kP9fke:"ui-6mezaz",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kfSwDN:"ui-87ps6o",kO7zv1:"ui-1winvzj","--icon-size":"ui-1u4itkb","--icon-weight":"ui-1q5xvfy",kgeoSG:"ui-1yj7g93",$$css:!0},noPresetSize:{$$css:!0},sizeXs:{"--icon-size":"ui-aiyo0p",$$css:!0},sizeSm:{"--icon-size":"ui-1u4itkb",$$css:!0},sizeBase:{"--icon-size":"ui-xfpx3u",$$css:!0},sizeLg:{"--icon-size":"ui-1qxde8p",$$css:!0},sizeXl:{"--icon-size":"ui-dyy2ci",$$css:!0},size2xl:{"--icon-size":"ui-7lg4th",$$css:!0},noColor:{$$css:!0},colorPrimary:{kMwMTN:"ui-1nqczng",$$css:!0},colorSecondary:{kMwMTN:"ui-1mh7f6w",$$css:!0},colorTertiary:{kMwMTN:"ui-1lbmi28",$$css:!0},colorQuaternary:{kMwMTN:"ui-1qh17o",$$css:!0},colorGitAdded:{kMwMTN:"ui-15wwr8d",$$css:!0},colorGitModified:{kMwMTN:"ui-eedwss",$$css:!0},colorGitRemoved:{kMwMTN:"ui-fowoju",$$css:!0},colorGitUntracked:{kMwMTN:"ui-1p7vtww",$$css:!0},colorCyan:{kMwMTN:"ui-1rbygr4",$$css:!0},colorBlue:{kMwMTN:"ui-101qeuz",$$css:!0},colorRed:{kMwMTN:"ui-ku4wcm",$$css:!0},colorGreen:{kMwMTN:"ui-p6nzhx",$$css:!0},colorYellow:{kMwMTN:"ui-1hn9r2r",$$css:!0},colorMagenta:{kMwMTN:"ui-pwp9en",$$css:!0},colorOrange:{kMwMTN:"ui-4qtrdv",$$css:!0},colorPurple:{kMwMTN:"ui-1b0hn6l",$$css:!0},colorAccent:{kMwMTN:"ui-scuw3h",$$css:!0},colorBrand:{kMwMTN:"ui-v3vxec",$$css:!0},noModifier:{$$css:!0},modifierSpin:{kKVMdj:"ui-138fvbv",k44tkh:"ui-lmf4m6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0},modifierDisabled:{kSiTet:"ui-ti2d7y",$$css:!0},modifierHidden:{k33iCy:"ui-lshs6z",$$css:!0},capTrim:{kQypYc:"ui-14ymb62",$$css:!0}};function Yj(e,t,n){return[Kt.base,Xj(e),Qj(t),Jj(n)]}function Xj(e){if(typeof e=="number")return Kt.noPresetSize;switch(e){case"xs":return Kt.sizeXs;case"sm":return Kt.sizeSm;case"base":return Kt.sizeBase;case"lg":return Kt.sizeLg;case"xl":return Kt.sizeXl;case"2xl":return Kt.size2xl}}function Qj(e){switch(e){case"primary":return Kt.colorPrimary;case"secondary":return Kt.colorSecondary;case"tertiary":return Kt.colorTertiary;case"quaternary":return Kt.colorQuaternary;case"git-added":return Kt.colorGitAdded;case"git-modified":return Kt.colorGitModified;case"git-removed":return Kt.colorGitRemoved;case"git-untracked":return Kt.colorGitUntracked;case"cyan":return Kt.colorCyan;case"blue":return Kt.colorBlue;case"red":return Kt.colorRed;case"green":return Kt.colorGreen;case"yellow":return Kt.colorYellow;case"magenta":return Kt.colorMagenta;case"orange":return Kt.colorOrange;case"purple":return Kt.colorPurple;case"accent":return Kt.colorAccent;case"brand":return Kt.colorBrand;case void 0:return Kt.noColor}}function Jj(e){switch(e){case"spin":return Kt.modifierSpin;case"disabled":return Kt.modifierDisabled;case"hidden":return Kt.modifierHidden;case void 0:return Kt.noModifier}}function vn({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,style:d,title:p,"aria-label":h,"aria-hidden":m,ref:g}){const y=Al(),k=x.useCallback(C=>{typeof g=="function"?g(C):g&&(g.current=C),C&&t==="spin"&&n&&Zj(C)},[g,t,n]),S=s??y?.iconSize??Wj,T=typeof S=="number",E=Vj(e,r),R={...E?{"--cursor-icon-content":`"${E}"`}:{},...T?{"--icon-size":`${S}px`}:{},...d},_=En({rootClass:"ui-icon",stylexStyles:[Yj(S,a,t),l&&Kt.capTrim],className:wn("cursor-icon",c),style:R});return v.jsx("i",{ref:k,className:_.className,"data-icon-name":e,"data-size":T?void 0:S,"data-color":a,style:_.style,title:p??h,"aria-hidden":m??(h?void 0:!0)})}const eP=x.createContext({root:null});function Nl(){return x.useContext(eP).root}const tP={dropdown:"--ui-portal-layer-z-index-dropdown",tooltip:"--ui-portal-layer-z-index-tooltip",modal:"--ui-portal-layer-z-index-modal",popover:"--ui-portal-layer-z-index-popover"},nP={},rP=3e3,iP=10;let vE=rP;function sP(){const e=vE;return vE+=iP,{zIndex:e,release:()=>{}}}const oP=x.createContext(null);function aP(){return x.useContext(oP)}function qc(e,t){const n=aP(),[r,s]=x.useState(null);x.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??sP();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=x.useMemo(()=>r===null?nP:{[tP[e]]:String(r)},[r,e]);return x.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const sC=x.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:d,...p}=t,{getButtonProps:h,buttonRef:m}=jc({disabled:a,focusableWhenDisabled:l,native:c});return xn("button",t,{state:{disabled:a},ref:[n,m],props:[p,h]})}),Qu={appearance:{kWkggS:"ui-elcf9h ui-g74ub2 ui-rtw4ju ui-sb1tfo",kMwMTN:"ui-gl2jp8 ui-qfdz8i",ku685b:"ui-1ccstgr",k1ekBW:"ui-fvdr79",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},press:{k3aq6I:"ui-3oybdh ui-e60hhf ui-uupxpy",k3nNDw:"ui-1g0ag68",k6sLGO:"ui-1dwv3re ui-1m8dlog",$$css:!0},colors:{"--ui-button-bg":"ui-111vzy2 ui-t5wej4 ui-1sjyo5b ui-qonjy5 ui-10044h7 ui-1drs4uv ui-13jyg4j ui-1j69ez6 ui-302ab4 ui-g2i9b0 ui-r4lqou ui-pao5x2 ui-1ro2ofv ui-30b146","--ui-button-bg-hover":"ui-10ckxxq ui-oscw6f ui-8d82ot ui-mos3b0 ui-1t8wa0f ui-lqo1w6 ui-2wqsua ui-qk0cz2 ui-1kvkcw9 ui-1m41tzx ui-1mteyat ui-jlo7vo ui-177gn09 ui-16088v2","--ui-button-fg":"ui-18rr0f6 ui-1o44y6p ui-i60mju ui-ikqzok ui-rwu1v7 ui-1vzhgcd ui-6tdgcd ui-11yajtv ui-1q0um21 ui-ad8cx6","--ui-button-fg-hover":"ui-nas032 ui-kadu3d ui-11ldjh5 ui-13zxv71 ui-qrgd1v ui-1b2v7cv ui-woi75s ui-1f4h542 ui-1t883ao ui-1hodyhg",$$css:!0}},lP={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},fo={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},xs={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},oC={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},uP={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},cP={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},fP={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Ol={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Bv={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},zu={root:{kB7OPa:"ui-9f619",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-9r1u3d ui-e9wtb7","--ui-button-bg":"ui-1gwrc9l ui-y7d307 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-nywj2b ui-hqa6pe ui-e032zu","--ui-button-fg":"ui-1j06k8m ui-qalphj ui-qcpbnv ui-ub8mre ui-alrmhx","--ui-button-fg-hover":"ui-1zbqel ui-1w2jsj1 ui-dwlvx9 ui-1389b1p ui-13ie2ji","--ui-md-state-color":"ui-1w18epr",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kfSwDN:"ui-87ps6o",kFalU9:"ui-ggy1nq",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",kSiTet:"ui-1hc1fzr ui-1szrgyu",kfzvcC:"ui-67bb7w ui-7gqb9v",k9WMMc:"ui-2b8uid",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},revealRowActive:{k1xSpc:"ui-1s85apg ui-i8sxwt ui-14aajud",kmuXW:"ui-2lah0s",$$css:!0},frameContent:{kE3dHu:"ui-1uhho1l",kpe85a:"ui-1xpa7k",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},dP={xs:{kZKoxP:"ui-1vatr1o",kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",kOIVth:"ui-xhr3t",$$css:!0},sm:{kZKoxP:"ui-1a6rlst",kLKAdn:"ui-exx8yu",kpe85a:"ui-g31tg3",kGO01o:"ui-18d9i69",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kZKoxP:"ui-1e94bgo",kLKAdn:"ui-exx8yu",kpe85a:"ui-17v7654",kGO01o:"ui-18d9i69",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",kOIVth:"ui-11twubx",$$css:!0},lg:{kZKoxP:"ui-170hpbr",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",kOIVth:"ui-pkkfsy",$$css:!0},xl:{kZKoxP:"ui-t8t6p",kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",kaIpWk:"ui-1043rbw",$$css:!0}},pP={xs:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0},sm:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0},md:{kLKAdn:"ui-exx8yu",kpe85a:"ui-16b7oty",kGO01o:"ui-18d9i69",kE3dHu:"ui-o7x2bt",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1jkygx",kGO01o:"ui-18d9i69",kE3dHu:"ui-1o7kk3e",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kpe85a:"ui-1yraood",kGO01o:"ui-18d9i69",kE3dHu:"ui-1jpuwqu",$$css:!0}},xE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},kbs:{kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",$$css:!0}},ki={root:zu.root,fontSmoothing:Bv.root,align:{center:null,left:zu.alignLeft},reveal:{always:null,rowActive:zu.revealRowActive},frame:{container:null,content:zu.frameContent},shape:{rounded:null,pill:zu.shapePill},size:dP,pillSize:pP,typography:{xs:fo.root,sm:xs.root,md:xs.root,lg:xs.root,xl:oC.root},labelGroup:xE.labelGroup,kbs:[fo.root,xE.kbs]},hP="md",mP="primary",gP="neutral",bP={xs:"sm",sm:"base",md:"sm",lg:"sm",xl:"lg"},yP={primary:mP,secondary:gP,text:"default"};function Gn({variant:e,color:t,size:n,shape:r="rounded",frame:s="container",reveal:a="always",align:l,disabled:c,children:d,kbs:p,className:h,style:m,rootStyle:g,...y}){const k=Al(),S=e??k?.buttonVariant??"tint",T=n??k?.buttonSize??hP,E=c??k?.disabled,R=t??yP[S],_=Nn(ki.root,ki.fontSmoothing,Qu.appearance,(S==="primary"||S==="secondary")&&Qu.colors,ki.size[T],ki.typography[T],ki.align[l??"center"],ki.reveal[a],ki.shape[r],r==="pill"&&ki.pillSize[T],ki.frame[s],g,{"ui--default-marker":"ui--default-marker",$$css:!0});let C=d;if(p!=null){const A=Nn(ki.labelGroup),N=Nn(ki.kbs);C=v.jsxs("span",{className:wn("ui-button__label-group",A.className),style:A.style,children:[d,v.jsx("span",{className:wn("ui-button__kbs",N.className),style:N.style,children:p})]})}return v.jsx(sC,{...y,className:wn("ui-button",_.className,h),style:{..._.style,...m},"data-variant":S,"data-size":T,"data-shape":r!=="rounded"?r:void 0,"data-frame":s!=="container"?s:void 0,"data-color":R,"data-align":l==="left"?l:void 0,"data-reveal":a!=="always"?a:void 0,disabled:E,children:v.jsx(Ts,{iconSize:bP[T],children:C})})}function Hc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function hc({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=x.useRef(e!==void 0),[a,l]=x.useState(t),c=s?e:a,d=x.useCallback(p=>{s||l(p)},[]);return[c,d]}let kE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",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})({}),SE=(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 vP={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ku={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},xP={disabled:!1,...Ku},Gc={valid(e){return e===null?null:e?{[SE.valid]:""}:{[SE.invalid]:""}}};function kP(e){return x.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[kE.checked]:""}:{[kE.unchecked]:""}},...Gc}),[e.indeterminate])}const SP=x.createContext({invalid:void 0,name:void 0,validityData:{state:vP,errors:[],error:"",value:"",initialValue:null},setValidityData:or,disabled:void 0,touched:Ku.touched,setTouched:or,dirty:Ku.dirty,setDirty:or,filled:Ku.filled,setFilled:or,focused:Ku.focused,setFocused:or,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:xP,markedDirtyRef:{current:!1},registerFieldControl:or,validation:{getValidationProps:(e=hr)=>e,getInputValidationProps:(e=hr)=>e,inputRef:{current:null},commit:async()=>{}}});function Vc(e=!0){const t=x.useContext(SP);if(t.setValidityData===or&&!e)throw new Error(Xn(28));return t}function aC(e,t){const{enabled:n=!0,getValue:r,id:s,value:a}=t,{registerFieldControl:l}=Vc(),c=x.useRef(null);c.current||(c.current=Symbol()),He(()=>{const d=c.current;if(!(!d||!n))return l(d,{controlRef:e,getValue:r,id:s,value:a}),()=>{l(d,void 0)}},[e,n,r,s,l,a])}const wP=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:or,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function EP(){return x.useContext(wP)}const TP=x.createContext({controlId:void 0,registerControlId:or,labelId:void 0,setLabelId:or,messageIds:[],setMessageIds:or,getDescriptionProps:e=>e});function Fv(){return x.useContext(TP)}const _P=x.createContext(void 0);function RP(){const e=x.useContext(_P);if(e===void 0)throw new Error(Xn(14));return e}const CP=x.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,d=RP(),p=d.checked||d.indeterminate,{mounted:h,transitionStatus:m,setMounted:g}=Bc(p),y=x.useRef(null),k={...d,transitionStatus:m};aa({open:p,ref:y,onComplete(){p||g(!1)}});const S=kP(d),T=x.useMemo(()=>({...S,...oa,...Gc}),[S]),E=l||h,R=xn("span",t,{ref:[n,y],state:k,stateAttributesMapping:T,props:c});return E?R:null}),AP="md",wE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kMeerF:"ui-1k57tk5 ui-1gv1zob",k3XXqK:"ui-1t137rt ui-1rsevuf",kjBf7l:"ui-1uczgqu ui-14qs42y",kInvED:"ui-1wfwxd8 ui-1i57s2w",kSiTet:"ui-1hc1fzr ui-1goyyu5",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-12oqio5",kMwMTN:"ui-1lriclw",kWkggS:"ui-i07v4r ui-190xqy7",kVAM5u:"ui-1tjqsyf ui-14ytyh1",k3aq6I:"ui-3oybdh ui-78fr0e",k3nNDw:"ui-1g0ag68",k1ekBW:"ui-1lxufdw",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-2s4hoy",kZKoxP:"ui-px1j5t",$$css:!0},md:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},lg:{kzqmXN:"ui-1xx3ewh",kZKoxP:"ui-14dyci",$$css:!0}},NP={primary:{"--ui-checkbox-bg":"ui-x0sf4j","--ui-checkbox-border":"ui-14p436a","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},green:{"--ui-checkbox-bg":"ui-1g72fie","--ui-checkbox-border":"ui-165ap9x","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},neutral:{"--ui-checkbox-bg":"ui-1rpsy8r","--ui-checkbox-border":"ui-mtpsoh","--ui-checkbox-glyph":"ui-qnctk6",$$css:!0}},OP={sm:9,md:10,lg:11},EE={"--icon-weight":"700"};function MP({indeterminate:e,interactive:t,size:n,variant:r}){const s=Nn(wE.root,wE[n],NP[r]),a={className:"ui-10l6tqk ui-10a8y8t ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-n9if97 ui-7pq1vu ui-sagj69 ui-6ekqhr ui-g01cxk ui-hhdk15 ui-nyzrob ui-h98lc ui-1nrvvgt ui-cntms"},l=OP[n];return v.jsx("span",{"aria-hidden":"true",className:wn("ui-checkbox__box",s.className),style:s.style,children:t?v.jsx(CP,{className:wn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,d)=>v.jsx("span",{...c,children:v.jsx(vn,{name:d.indeterminate?"minus":"check",size:l,style:EE})}),style:a.style}):v.jsx("span",{className:wn("ui-checkbox__icon",a.className),style:a.style,children:v.jsx(vn,{name:e?"minus":"check",size:l,style:EE})})})}function lC({checked:e,disabled:t,indeterminate:n=!1,size:r=AP,variant:s="primary"}){const a={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker"};return v.jsx("span",{"aria-hidden":"true",className:wn("ui-checkbox",a.className),style:a.style,"data-component":"checkbox","data-size":r,"data-variant":s,"data-checked":e||void 0,"data-disabled":t||void 0,"data-indeterminate":n||void 0,children:v.jsx(MP,{indeterminate:n,interactive:!1,size:r,variant:s})})}function IP(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,a=t!==void 0,[l,c]=hc({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:h}=Bc(l,!0,!0),[m,g]=x.useState(l),[{height:y,width:k},S]=x.useState({height:void 0,width:void 0}),T=dh(),[E,R]=x.useState(),_=E??T,[C,A]=x.useState(!1),[N,I]=x.useState(!1),$=x.useRef(null),H=x.useRef(null),L=x.useRef(null),Z=x.useRef(null),K=WR(Z,!1),q=Ve(z=>{const j=!l,F=_t(hl,z.nativeEvent);if(r(j,F),F.isCanceled)return;const U=Z.current;H.current==="css-animation"&&U!=null&&U.style.removeProperty("animation-name"),!C&&!N&&(H.current!=null&&H.current!=="css-animation"&&!d&&j&&p(!0),H.current==="css-animation"&&(!m&&j&&g(!0),!d&&j&&p(!0))),c(j),H.current==="none"&&d&&!j&&p(!1)});return He(()=>{a&&H.current==="none"&&!l&&p(!1)},[a,l,t,p]),x.useMemo(()=>({abortControllerRef:$,animationTypeRef:H,disabled:s,handleTrigger:q,height:y,mounted:d,open:l,panelId:_,panelRef:Z,runOnceAnimationsFinish:K,setDimensions:S,setHiddenUntilFound:A,setKeepMounted:I,setMounted:p,setOpen:c,setPanelIdState:R,setVisible:g,transitionDimensionRef:L,transitionStatus:h,visible:m,width:k}),[$,H,s,q,y,d,l,_,Z,K,S,A,I,p,c,g,L,h,m,k])}const uC=x.createContext(void 0);function cC(){const e=x.useContext(uC);if(e===void 0)throw new Error(Xn(15));return e}let Ju=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Xo.startingStyle]="startingStyle",e[e.endingStyle=Xo.endingStyle]="endingStyle",e})({}),DP=(function(e){return e.panelOpen="data-panel-open",e})({});const zP={[Ju.open]:""},LP={[Ju.closed]:""},jP={open(e){return e?{[DP.panelOpen]:""}:null}},PP={open(e){return e?zP:LP}},fC={...PP,...oa},$P=x.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:d,style:p,...h}=t,m=Ve(c),g=IP({open:d,defaultOpen:a,onOpenChange:m,disabled:l}),y=x.useMemo(()=>({open:g.open,disabled:g.disabled,transitionStatus:g.transitionStatus}),[g.open,g.disabled,g.transitionStatus]),k=x.useMemo(()=>({...g,onOpenChange:m,state:y}),[g,m,y]),S=xn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:fC});return v.jsx(uC.Provider,{value:k,children:S})}),BP={...jP,...oa},TE=x.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=cC(),{className:d,disabled:p=c,id:h,render:m,nativeButton:g=!0,style:y,...k}=t,{getButtonProps:S,buttonRef:T}=jc({disabled:p,focusableWhenDisabled:!0,native:g}),E=x.useMemo(()=>({"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a}),[r,s,a]);return xn("button",t,{state:l,ref:[n,T],props:[E,k,S],stateAttributesMapping:BP})});let FP=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function UP(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:s,hiddenUntilFound:a,keepMounted:l,id:c,mounted:d,onOpenChange:p,open:h,panelRef:m,runOnceAnimationsFinish:g,setDimensions:y,setMounted:k,setOpen:S,setVisible:T,transitionDimensionRef:E,visible:R,width:_}=e,C=x.useRef(!1),A=x.useRef(null),N=x.useRef(h),I=x.useRef(h),$=Pc(),H=x.useMemo(()=>n.current==="css-animation"?!R:!h&&!d,[h,d,R,n]),L=Ve(K=>{if(!K)return;if(n.current==null||E.current==null){const j=getComputedStyle(K),F=j.animationName!=="none"&&j.animationName!=="",U=j.transitionDuration!=="0s"&&j.transitionDuration!=="";F&&U||(j.animationName==="none"&&j.transitionDuration!=="0s"?n.current="css-transition":j.animationName!=="none"&&j.transitionDuration==="0s"?n.current="css-animation":n.current="none"),K.getAttribute(FP.orientation)==="horizontal"||j.transitionProperty.indexOf("width")>-1?E.current="width":E.current="height"}if(n.current!=="css-transition")return;(s===void 0||_===void 0)&&(y({height:K.scrollHeight,width:K.scrollWidth}),I.current&&K.style.setProperty("transition-duration","0s"));let q=-1,z=-1;return q=An.request(()=>{I.current=!1,z=An.request(()=>{setTimeout(()=>{K.style.removeProperty("transition-duration")})})}),()=>{An.cancel(q),An.cancel(z)}}),Z=ks(r,m,L);return He(()=>{if(n.current!=="css-transition")return;const K=m.current;if(!K)return;let q=-1;if(t.current!=null&&(t.current.abort(),t.current=null),h){const z={"justify-content":K.style.justifyContent,"align-items":K.style.alignItems,"align-content":K.style.alignContent,"justify-items":K.style.justifyItems};Object.keys(z).forEach(j=>{K.style.setProperty(j,"initial","important")}),!I.current&&!l&&K.setAttribute(Ju.startingStyle,""),y({height:K.scrollHeight,width:K.scrollWidth}),q=An.request(()=>{Object.entries(z).forEach(([j,F])=>{F===""?K.style.removeProperty(j):K.style.setProperty(j,F)})})}else{if(K.scrollHeight===0&&K.scrollWidth===0)return;y({height:K.scrollHeight,width:K.scrollWidth});const z=new AbortController;t.current=z;const j=z.signal;let F=null;const U=Ju.endingStyle;return F=new MutationObserver(P=>{P.some(D=>D.type==="attributes"&&D.attributeName===U)&&(F?.disconnect(),F=null,g(()=>{y({height:0,width:0}),K.style.removeProperty("content-visibility"),k(!1),t.current===z&&(t.current=null)},j))}),F.observe(K,{attributes:!0,attributeFilter:[U]}),()=>{F?.disconnect(),$.cancel(),t.current===z&&(z.abort(),t.current=null)}}return()=>{An.cancel(q)}},[t,n,$,a,l,d,h,m,g,y,k]),He(()=>{if(n.current!=="css-animation")return;const K=m.current;K&&(A.current=K.style.animationName||A.current,K.style.setProperty("animation-name","none"),y({height:K.scrollHeight,width:K.scrollWidth}),!N.current&&!C.current&&K.style.removeProperty("animation-name"),h?(t.current!=null&&(t.current.abort(),t.current=null),k(!0),T(!0)):(t.current=new AbortController,g(()=>{k(!1),T(!1),t.current=null},t.current.signal)))},[t,n,h,m,g,y,k,T,R]),ph(()=>{const K=An.request(()=>{N.current=!1});return()=>An.cancel(K)}),He(()=>{if(!a)return;const K=m.current;if(!K)return;let q=-1,z=-1;return h&&C.current&&(K.style.transitionDuration="0s",y({height:K.scrollHeight,width:K.scrollWidth}),q=An.request(()=>{C.current=!1,z=An.request(()=>{setTimeout(()=>{K.style.removeProperty("transition-duration")})})})),()=>{An.cancel(q),An.cancel(z)}},[a,h,m,y]),He(()=>{const K=m.current;K&&a&&H&&(K.setAttribute("hidden","until-found"),n.current==="css-transition"&&K.setAttribute(Ju.startingStyle,""))},[a,H,n,m]),x.useEffect(function(){const q=m.current;if(!q)return;function z(j){C.current=!0,S(!0),p(!0,_t(Ss,j))}return Nt(q,"beforematch",z)},[p,m,S]),x.useMemo(()=>({props:{hidden:H,id:c,ref:Z}}),[H,c,Z])}let _E=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const qP=x.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:d,...p}=t,{abortControllerRef:h,animationTypeRef:m,height:g,mounted:y,onOpenChange:k,open:S,panelId:T,panelRef:E,runOnceAnimationsFinish:R,setDimensions:_,setHiddenUntilFound:C,setKeepMounted:A,setMounted:N,setPanelIdState:I,setOpen:$,setVisible:H,state:L,transitionDimensionRef:Z,visible:K,width:q,transitionStatus:z}=cC(),j=s??!1,F=a??!1;He(()=>{if(c)return I(c),()=>{I(void 0)}},[c,I]),He(()=>{C(j)},[C,j]),He(()=>{A(F)},[A,F]);const{props:U}=UP({abortControllerRef:h,animationTypeRef:m,externalRef:n,height:g,hiddenUntilFound:j,id:T,keepMounted:F,mounted:y,onOpenChange:k,open:S,panelRef:E,runOnceAnimationsFinish:R,setDimensions:_,setMounted:N,setOpen:$,setVisible:H,transitionDimensionRef:Z,visible:K,width:q});aa({open:S&&z==="idle",ref:E,onComplete(){S&&_({height:void 0,width:void 0})}});const P=x.useMemo(()=>({...L,transitionStatus:z}),[L,z]),W=xn("div",t,{state:P,ref:[n,E],props:[U,{style:{[_E.collapsiblePanelHeight]:g===void 0?"auto":`${g}px`,[_E.collapsiblePanelWidth]:q===void 0?"auto":`${q}px`}},p],stateAttributesMapping:fC});return F||j||y?W:null}),RE={buttonReset:{kWkggS:"ui-jbqb8w",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",keoZOQ:"ui-dj266r",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k71WvV:"ui-14z9mp",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-1heor9g",k9WMMc:"ui-1yc453h",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-1bqaal",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0},detailsButton:{ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kkrTdU:"ui-1ypdohk",kMnn75:"ui-ujl8zx",k1TLXF:"ui-r5o5jz ui-9ojkr9 ui-1e7jyuc",k1ekBW:"ui-eirdtl",kIyJzY:"ui-7pq1vu ui-6xbvzw ui-1nk6rg0",kAMwcw:"ui-1bt1wk1",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0}};function HP({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:d,tone:p}){const h={0:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},4:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy"},2:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},6:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b"},1:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},5:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},3:{className:"ui-2lah0s ui-19aaqeu ui-1dkqrid ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},7:{className:"ui-2lah0s ui-20ajya ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-4b2ntj ui-1uq8sgy ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"}}[(p==="muted"||p==="tertiary")<<2|!!d<<1|!!a<<0],m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},4:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},6:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},5:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"},7:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b ui-1o6vebl ui-akli9p ui-1ta4xzc ui-1t23j8t ui-g7jpbn ui-17xo24v ui-1c74tu6 ui-1esw782 ui-a4qsjk"}}[(p==="muted")<<2|!!d<<1|!!(a&&l)<<0],g={className:"ui-2lah0s ui-1kde42o ui-4b2ntj ui-7zots3 ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556"};return v.jsxs(v.Fragment,{children:[s!=null&&v.jsx("span",{className:wn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),v.jsx("span",{className:wn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&v.jsx("span",{ref:r,className:wn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&v.jsx(vn,{ref:t,name:"chevron-right",className:wn("ui-collapsible-chevron",g.className),style:g.style,size:10})]})}function mi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,leadingIcon:s,disabled:a=!1,expandable:l=!0,loading:c=!1,shimmerDetails:d=!0,tabularNums:p=!1,tone:h="default",children:m,headerRef:g,detailsRef:y,chevronRef:k,className:S,contentClassName:T,open:E,defaultOpen:R,onOpenChange:_,...C}){const A=n!==void 0,N=l&&A,I=E!==void 0,[$,H]=x.useState(()=>R??!1),L=I?!!E:$,Z=(O,ie)=>{I||H(O),_?.(O,ie)},K=A?v.jsx("button",{type:"button",...Nn(RE.buttonReset,RE.detailsButton,r),disabled:a,onClick:O=>{O.stopPropagation(),n(O)},children:t}):t,q=l&&m!=null&&typeof m!="boolean",z={className:"ui-78zum5 ui-dt5ytf"},j={0:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui--default-marker"},4:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui--default-marker"},2:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui--default-marker"},6:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui--default-marker"},1:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-byyjgo ui--default-marker"},5:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-byyjgo ui--default-marker"},3:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-1k57tk5 ui-1t137rt ui-1ypdohk ui-byyjgo ui--default-marker"},7:{className:"ui-78zum5 ui-6s0dn4 ui-87ps6o ui-11twubx ui-jlip5 ui-kyw5k8 ui-6ikm8r ui-10wlt62 ui-lyipyv ui-hwpfco ui-1evy7pa ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-byyjgo ui--default-marker"}}[!!(l&&!A)<<2|!!(l&&!a)<<1|!!a<<0],F={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!a<<0],U={className:"ui-2lah0s ui-1kde42o ui-4b2ntj ui-7zots3 ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1 ui-1hc1fzr"},P={className:"ui-rvj5dj ui-1kd3hbs ui-1tu4anv ui-18ke684 ui-xohm7r ui-pv8u57 ui-1qn9uv2 ui-4wkmsb ui-g3p6pi ui-1ys8gui"},W={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},D={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},B={"data-component":"collapsible-header",className:wn("ui-collapsible-header",j.className),style:j.style},G=v.jsx(HP,{action:e,chevronRef:k,details:K,detailsRef:y,leadingIcon:s,loading:c,shimmerDetails:d,showChevron:l&&!A,tabularNums:p,tone:h});return v.jsxs($P,{...C,open:N?L:E,defaultOpen:N?void 0:R,onOpenChange:N?Z:_,disabled:a,"data-expandable":l?"":void 0,"data-loading":c?"":void 0,className:wn("ui-collapsible",z.className,S),style:z.style,children:[N?v.jsxs("div",{...B,ref:g,onClick:()=>{a||Z(!L)},children:[G,v.jsx(TE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:F.className,style:F.style,...q?null:{"aria-controls":void 0},onClick:O=>{a||O.stopPropagation()},children:v.jsx(vn,{ref:k,name:"chevron-right",className:wn("ui-collapsible-chevron",U.className),style:U.style,size:10})})]}):l?v.jsx(TE,{...B,ref:g,...q?null:{"aria-controls":void 0},onClick:O=>{a||O.stopPropagation()},children:G}):v.jsx("div",{...B,ref:g,children:G}),q&&v.jsx(qP,{keepMounted:!0,className:wn("ui-collapsible-content-view",P.className),style:P.style,children:v.jsx("div",{className:W.className,style:W.style,children:v.jsx("div",{className:wn("ui-collapsible-content",D.className,T),style:D.style,children:m})})})]})}function GP(e){return xn(e.defaultTagName??"div",e,e)}var VP=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Op=VP.join(","),dC=typeof Element>"u",yl=dC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mp=!dC&&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},Ip=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ip(t.parentNode));return l},KP=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},pC=function(t,n,r){if(Ip(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Op));return n&&yl.call(t,Op)&&s.unshift(t),s=s.filter(r),s},Dp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Ip(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,p=Dp(d,!0,r);r.flatten?s.push.apply(s,p):s.push({scopeParent:l,candidates:p})}else{var h=yl.call(l,Op);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!Ip(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&g){var y=Dp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},hC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},mC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||KP(t))&&!hC(t)?0:t.tabIndex},ZP=function(t,n){var r=mC(t);return r<0&&n&&!hC(t)?0:r},WP=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},gC=function(t){return t.tagName==="INPUT"},YP=function(t){return gC(t)&&t.type==="hidden"},XP=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},QP=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},JP=function(t){if(!t.name)return!0;var n=t.form||Mp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=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 a=QP(s,t.form);return!a||a===t},e$=function(t){return gC(t)&&t.type==="radio"},t$=function(t){return e$(t)&&!JP(t)},n$=function(t){var n,r=t&&Mp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var p,h,m;r=Mp(s),s=(p=r)===null||p===void 0?void 0:p.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},CE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},r$=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=yl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(yl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var p=t.parentElement,h=Mp(t);if(p&&!p.shadowRoot&&s(p)===!0)return CE(t);t.assignedSlot?t=t.assignedSlot:!p&&h!==t.ownerDocument?t=h.host:t=p}t=d}if(n$(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return CE(t);return!1},i$=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 s=n.children.item(r);if(s.tagName==="LEGEND")return yl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Ry=function(t,n){return!(n.disabled||YP(n)||r$(n,t)||XP(n)||i$(n))},Cy=function(t,n){return!(t$(n)||mC(n)<0||!Ry(t,n))},s$=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},bC=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,d=ZP(c,l),p=l?bC(s.candidates):c;d===0?l?n.push.apply(n,p):n.push(c):r.push({documentOrder:a,tabIndex:d,item:s,isScope:l,content:p})}),r.sort(WP).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},xh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Dp([t],n.includeContainer,{filter:Cy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:s$}):r=pC(t,n.includeContainer,Cy.bind(null,n)),bC(r)},o$=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Dp([t],n.includeContainer,{filter:Ry.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=pC(t,n.includeContainer,Ry.bind(null,n)),r},yC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yl.call(t,Op)===!1?!1:Cy(n,t)};function a$(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function vC(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function l$(){return/apple/i.test(navigator.vendor)}function Ay(){const e=/android/i;return e.test(a$())||e.test(vC())}function u$(){return vC().includes("jsdom/")}const AE="data-floating-ui-focusable",c$="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Sb="ArrowLeft",wb="ArrowRight",f$="ArrowUp",d$="ArrowDown";function no(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&co(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ro(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Eb(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 p$(e){return e.matches("html,body")}function pr(e){return e?.ownerDocument||document}function xC(e){return It(e)&&e.matches(c$)}function Ny(e){return e?e.getAttribute("role")==="combobox"&&xC(e):!1}function zp(e){return e?e.hasAttribute(AE)?e:e.querySelector("["+AE+"]")||e:null}function Ko(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...Ko(e,s.id,n)])}function h$(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),Ko(e,a).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function NE(e,t){var n;let r=[],s=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;s;){const a=e.find(l=>l.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function sr(e){e.preventDefault(),e.stopPropagation()}function m$(e){return"nativeEvent"in e}function kC(e){return e.mozInputSource===0&&e.isTrusted?!0:Ay()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function SC(e){return u$()?!1:!Ay()&&e.width===0&&e.height===0||Ay()&&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 mc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var g$=typeof document<"u",b$=function(){},on=g$?x.useLayoutEffect:b$;const y$={...ih};function Wn(e){const t=x.useRef(e);return on(()=>{t.current=e}),t}const v$=y$.useInsertionEffect,x$=v$||(e=>e());function Dn(e){const t=x.useRef(()=>{});return x$(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function Od(e,t,n){return Math.floor(e/t)!==n}function ec(e,t){return t<0||t>=e.current.length}function Tb(e,t){return cr(e,{disabledIndices:t})}function OE(e,t){return cr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=t===void 0?{}:t,l=n;do l+=r?-a:a;while(l>=0&&l<=e.current.length-1&&pp(e,l,s));return l}function k$(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:p,prevIndex:h,stopEvent:m=!1}=t,g=h;if(n.key===f$){if(m&&sr(n),h===-1)g=p;else if(g=cr(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<d||g<0)){const y=h%l,k=p%l,S=p-(k-y);k===y?g=p:g=k>y?S:S-l}ec(e,g)&&(g=h)}if(n.key===d$&&(m&&sr(n),h===-1?g=d:(g=cr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>p&&(g=cr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),ec(e,g)&&(g=h)),r==="both"){const y=ys(h/l);n.key===(a?Sb:wb)&&(m&&sr(n),h%l!==l-1?(g=cr(e,{startingIndex:h,disabledIndices:c}),s&&Od(g,l,y)&&(g=cr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(g=cr(e,{startingIndex:h-h%l-1,disabledIndices:c})),Od(g,l,y)&&(g=h)),n.key===(a?wb:Sb)&&(m&&sr(n),h%l!==0?(g=cr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Od(g,l,y)&&(g=cr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(g=cr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Od(g,l,y)&&(g=h));const k=ys(p/l)===y;ec(e,g)&&(s&&k?g=n.key===(a?wb:Sb)?p:cr(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function S$(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:d}=a,p=!1;for(n&&(s=0);!p;){const h=[];for(let m=0;m<c;m++)for(let g=0;g<d;g++)h.push(s+m+g*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),p=!0):s++}}),[...r]}function w$(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function E$(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function pp(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Kc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wC(e,t){const n=xh(e,Kc()),r=n.length;if(r===0)return;const s=no(pr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function EC(e){return wC(pr(e).body,1)||e}function TC(e){return wC(pr(e).body,-1)||e}function tc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xr(n,r)}function T$(e){xh(e,Kc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ME(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Zc(e){const t=x.useRef(void 0),n=x.useCallback(r=>{const s=e.map(a=>{if(a!=null){if(typeof a=="function"){const l=a,c=l(r);return typeof c=="function"?c:()=>{l(null)}}return a.current=r,()=>{a.current=null}}});return()=>{s.forEach(a=>a?.())}},e);return x.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function _$(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 _C=x.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function RC(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=x.useState(()=>new Set),l=x.useCallback(p=>{a(h=>new Set(h).add(p))},[]),c=x.useCallback(p=>{a(h=>{const m=new Set(h);return m.delete(p),m})},[]),d=x.useMemo(()=>{const p=new Map;return Array.from(s.keys()).sort(_$).forEach((m,g)=>{p.set(m,g)}),p},[s]);return v.jsx(_C.Provider,{value:x.useMemo(()=>({register:l,unregister:c,map:d,elementsRef:n,labelsRef:r}),[l,c,d,n,r]),children:t})}function kh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=x.useContext(_C),[c,d]=x.useState(null),p=x.useRef(null),h=x.useCallback(m=>{if(p.current=m,c!==null&&(a.current[c]=m,l)){var g;const y=t!==void 0;l.current[c]=y?t:(g=m?.textContent)!=null?g:null}},[c,a,l,t]);return on(()=>{const m=p.current;if(m)return n(m),()=>{r(m)}},[n,r]),on(()=>{const m=p.current?s.get(p.current):null;m!=null&&d(m)},[s]),x.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const R$="data-floating-ui-focusable",IE="active",DE="selected",Wc="ArrowLeft",Yc="ArrowRight",CC="ArrowUp",Sh="ArrowDown",C$={...ih};let zE=!1,A$=0;const LE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+A$++;function N$(){const[e,t]=x.useState(()=>zE?LE():void 0);return on(()=>{e==null&&t(LE())},[]),x.useEffect(()=>{zE=!0},[]),e}const O$=C$.useId,wh=O$||N$;function AC(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const NC=x.createContext(null),OC=x.createContext(null),go=()=>{var e;return((e=x.useContext(NC))==null?void 0:e.id)||null},bo=()=>x.useContext(OC);function MC(e){const t=wh(),n=bo(),s=go();return on(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function IC(e){const{children:t,id:n}=e,r=go();return v.jsx(NC.Provider,{value:x.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function M$(e){const{children:t}=e,n=x.useRef([]),r=x.useCallback(l=>{n.current=[...n.current,l]},[]),s=x.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=x.useState(()=>AC());return v.jsx(OC.Provider,{value:x.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function vl(e){return"data-floating-ui-"+e}function ur(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const jE=vl("safe-polygon");function _b(e,t,n){if(n&&!mc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Rb(e){return typeof e=="function"?e():e}function DC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:d=0,handleClose:p=null,mouseOnly:h=!1,restMs:m=0,move:g=!0}=t,y=bo(),k=go(),S=Wn(p),T=Wn(d),E=Wn(n),R=Wn(m),_=x.useRef(),C=x.useRef(-1),A=x.useRef(),N=x.useRef(-1),I=x.useRef(!0),$=x.useRef(!1),H=x.useRef(()=>{}),L=x.useRef(!1),Z=Dn(()=>{var U;const P=(U=s.current.openEvent)==null?void 0:U.type;return P?.includes("mouse")&&P!=="mousedown"});x.useEffect(()=>{if(!c)return;function U(P){let{open:W}=P;W||(ur(C),ur(N),I.current=!0,L.current=!1)}return a.on("openchange",U),()=>{a.off("openchange",U)}},[c,a]),x.useEffect(()=>{if(!c||!S.current||!n)return;function U(W){Z()&&r(!1,W,"hover")}const P=pr(l.floating).documentElement;return P.addEventListener("mouseleave",U),()=>{P.removeEventListener("mouseleave",U)}},[l.floating,n,r,c,S,Z]);const K=x.useCallback(function(U,P,W){P===void 0&&(P=!0),W===void 0&&(W="hover");const D=_b(T.current,"close",_.current);D&&!A.current?(ur(C),C.current=window.setTimeout(()=>r(!1,U,W),D)):P&&(ur(C),r(!1,U,W))},[T,r]),q=Dn(()=>{H.current(),A.current=void 0}),z=Dn(()=>{if($.current){const U=pr(l.floating).body;U.style.pointerEvents="",U.removeAttribute(jE),$.current=!1}}),j=Dn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);x.useEffect(()=>{if(!c)return;function U(G){if(ur(C),I.current=!1,h&&!mc(_.current)||Rb(R.current)>0&&!_b(T.current,"open"))return;const O=_b(T.current,"open",_.current);O?C.current=window.setTimeout(()=>{E.current||r(!0,G,"hover")},O):n||r(!0,G,"hover")}function P(G){if(j()){z();return}H.current();const O=pr(l.floating);if(ur(N),L.current=!1,S.current&&s.current.floatingContext){n||ur(C),A.current=S.current({...s.current.floatingContext,tree:y,x:G.clientX,y:G.clientY,onClose(){z(),q(),j()||K(G,!0,"safe-polygon")}});const te=A.current;O.addEventListener("mousemove",te),H.current=()=>{O.removeEventListener("mousemove",te)};return}(_.current!=="touch"||!xr(l.floating,G.relatedTarget))&&K(G)}function W(G){j()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:y,x:G.clientX,y:G.clientY,onClose(){z(),q(),j()||K(G)}})(G))}function D(){ur(C)}function B(G){j()||K(G,!1)}if(yt(l.domReference)){const G=l.domReference,O=l.floating;return n&&G.addEventListener("mouseleave",W),g&&G.addEventListener("mousemove",U,{once:!0}),G.addEventListener("mouseenter",U),G.addEventListener("mouseleave",P),O&&(O.addEventListener("mouseleave",W),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",B)),()=>{n&&G.removeEventListener("mouseleave",W),g&&G.removeEventListener("mousemove",U),G.removeEventListener("mouseenter",U),G.removeEventListener("mouseleave",P),O&&(O.removeEventListener("mouseleave",W),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",B))}}},[l,c,e,h,g,K,q,z,r,n,E,y,T,S,s,j,R]),on(()=>{var U;if(c&&n&&(U=S.current)!=null&&(U=U.__options)!=null&&U.blockPointerEvents&&Z()){$.current=!0;const W=l.floating;if(yt(l.domReference)&&W){var P;const D=pr(l.floating).body;D.setAttribute(jE,"");const B=l.domReference,G=y==null||(P=y.nodesRef.current.find(O=>O.id===k))==null||(P=P.context)==null?void 0:P.elements.floating;return G&&(G.style.pointerEvents=""),D.style.pointerEvents="none",B.style.pointerEvents="auto",W.style.pointerEvents="auto",()=>{D.style.pointerEvents="",B.style.pointerEvents="",W.style.pointerEvents=""}}}},[c,n,k,l,y,S,Z]),on(()=>{n||(_.current=void 0,L.current=!1,q(),z())},[n,q,z]),x.useEffect(()=>()=>{q(),ur(C),ur(N),z()},[c,l.domReference,q,z]);const F=x.useMemo(()=>{function U(P){_.current=P.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(P){const{nativeEvent:W}=P;function D(){!I.current&&!E.current&&r(!0,W,"hover")}h&&!mc(_.current)||n||Rb(R.current)===0||L.current&&P.movementX**2+P.movementY**2<2||(ur(N),_.current==="touch"?D():(L.current=!0,N.current=window.setTimeout(D,Rb(R.current))))}}},[h,r,n,E,R]);return x.useMemo(()=>c?{reference:F}:{},[c,F])}let PE=0;function qo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(PE);const a=()=>e?.focus({preventScroll:n});s?a():PE=requestAnimationFrame(a)}function Cb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&co(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function I$(e){return"composedPath"in e?e.composedPath()[0]:e.target}function D$(e){return e?.ownerDocument||document}const ul={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function $E(e){return e==="inert"?ul.inert:e==="aria-hidden"?ul["aria-hidden"]:ul.none}let Md=new WeakSet,Id={},Ab=0;const z$=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,zC=e=>e&&(e.host||zC(e.parentNode)),L$=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function j$(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=L$(t,e),c=new Set,d=new Set(l),p=[];Id[s]||(Id[s]=new WeakMap);const h=Id[s];l.forEach(m),g(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function g(y){!y||d.has(y)||[].forEach.call(y.children,k=>{if(Yn(k)!=="script")if(c.has(k))g(k);else{const S=a?k.getAttribute(a):null,T=S!==null&&S!=="false",E=$E(a),R=(E.get(k)||0)+1,_=(h.get(k)||0)+1;E.set(k,R),h.set(k,_),p.push(k),R===1&&T&&Md.add(k),_===1&&k.setAttribute(s,""),!T&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return Ab++,()=>{p.forEach(y=>{const k=$E(a),T=(k.get(y)||0)-1,E=(h.get(y)||0)-1;k.set(y,T),h.set(y,E),T||(!Md.has(y)&&a&&y.removeAttribute(a),Md.delete(y)),E||y.removeAttribute(s)}),Ab--,Ab||(ul.inert=new WeakMap,ul["aria-hidden"]=new WeakMap,ul.none=new WeakMap,Md=new WeakSet,Id={})}}function BE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=D$(e[0]).body;return j$(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Eh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Lp=x.forwardRef(function(t,n){const[r,s]=x.useState();on(()=>{l$()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[vl("focus-guard")]:"",style:Eh};return v.jsx("span",{...t,...a})}),LC=x.createContext(null),FE=vl("portal");function P$(e){e===void 0&&(e={});const{id:t,root:n}=e,r=wh(),s=jC(),[a,l]=x.useState(null),c=x.useRef(null);return on(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),on(()=>{if(!r||c.current)return;const d=t?document.getElementById(t):null;if(!d)return;const p=document.createElement("div");p.id=r,p.setAttribute(FE,""),d.appendChild(p),c.current=p,l(p)},[t,r]),on(()=>{if(n===null||!r||c.current)return;let d=n||s?.portalNode;d&&!ah(d)&&(d=d.current),d=d||document.body;let p=null;t&&(p=document.createElement("div"),p.id=t,d.appendChild(p));const h=document.createElement("div");h.id=r,h.setAttribute(FE,""),d=p||d,d.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function Uv(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=P$({id:n,root:r}),[l,c]=x.useState(null),d=x.useRef(null),p=x.useRef(null),h=x.useRef(null),m=x.useRef(null),g=l?.modal,y=l?.open,k=!!l&&!l.modal&&l.open&&s&&!!(r||a);return x.useEffect(()=>{if(!a||!s||g)return;function S(T){a&&tc(T)&&(T.type==="focusin"?ME:T$)(a)}return a.addEventListener("focusin",S,!0),a.addEventListener("focusout",S,!0),()=>{a.removeEventListener("focusin",S,!0),a.removeEventListener("focusout",S,!0)}},[a,s,g]),x.useEffect(()=>{a&&(y||ME(a))},[y,a]),v.jsxs(LC.Provider,{value:x.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:p,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&v.jsx(Lp,{"data-type":"outside",ref:d,onFocus:S=>{if(tc(S,a)){var T;(T=h.current)==null||T.focus()}else{const E=l?l.domReference:null,R=TC(E);R?.focus()}}}),k&&a&&v.jsx("span",{"aria-owns":a.id,style:Eh}),a&&Ri.createPortal(t,a),k&&a&&v.jsx(Lp,{"data-type":"outside",ref:p,onFocus:S=>{if(tc(S,a)){var T;(T=m.current)==null||T.focus()}else{const E=l?l.domReference:null,R=EC(E);R?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const jC=()=>x.useContext(LC);function UE(e){return x.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const $$=20;let so=[];function qv(){so=so.filter(e=>e.isConnected)}function B$(e){qv(),e&&Yn(e)!=="body"&&(so.push(e),so.length>$$&&(so=so.slice(-20)))}function qE(){return qv(),so[so.length-1]}function F$(e){const t=Kc();return yC(e,t)?e:xh(e,t)[0]||e}function HE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Kc(),a=o$(e,r).filter(c=>{const d=c.getAttribute("data-tabindex")||"";return yC(c,r)||c.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const U$=x.forwardRef(function(t,n){return v.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Eh})});function Hv(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:d=!1,modal:p=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:g=!1,getInsideElements:y=()=>[]}=e,{open:k,onOpenChange:S,events:T,dataRef:E,elements:{domReference:R,floating:_}}=t,C=Dn(()=>{var he;return(he=E.current.floatingContext)==null?void 0:he.nodeId}),A=Dn(y),N=typeof l=="number"&&l<0,I=Ny(R)&&N,$=z$(),H=$?a:!0,L=!H||$&&g,Z=Wn(s),K=Wn(l),q=Wn(c),z=bo(),j=jC(),F=x.useRef(null),U=x.useRef(null),P=x.useRef(!1),W=x.useRef(!1),D=x.useRef(-1),B=x.useRef(-1),G=j!=null,O=zp(_),ie=Dn(function(he){return he===void 0&&(he=O),he?xh(he,Kc()):[]}),te=Dn(he=>{const Te=ie(he);return Z.current.map(Re=>R&&Re==="reference"?R:O&&Re==="floating"?O:Te).filter(Boolean).flat()});x.useEffect(()=>{if(r||!p)return;function he(Re){if(Re.key==="Tab"){xr(O,no(pr(O)))&&ie().length===0&&!I&&sr(Re);const Oe=te(),ve=ro(Re);Z.current[0]==="reference"&&ve===R&&(sr(Re),Re.shiftKey?qo(Oe[Oe.length-1]):qo(Oe[1])),Z.current[1]==="floating"&&ve===O&&Re.shiftKey&&(sr(Re),qo(Oe[0]))}}const Te=pr(O);return Te.addEventListener("keydown",he),()=>{Te.removeEventListener("keydown",he)}},[r,R,O,p,Z,I,ie,te]),x.useEffect(()=>{if(r||!_)return;function he(Te){const Re=ro(Te),ve=ie().indexOf(Re);ve!==-1&&(D.current=ve)}return _.addEventListener("focusin",he),()=>{_.removeEventListener("focusin",he)}},[r,_,ie]),x.useEffect(()=>{if(r||!m)return;function he(){W.current=!0,setTimeout(()=>{W.current=!1})}function Te(ve){const xe=ve.relatedTarget,Me=ve.currentTarget,Ce=ro(ve);queueMicrotask(()=>{const Pe=C(),ge=!(xr(R,xe)||xr(_,xe)||xr(xe,_)||xr(j?.portalNode,xe)||xe!=null&&xe.hasAttribute(vl("focus-guard"))||z&&(Ko(z.nodesRef.current,Pe).find(ce=>{var oe,re;return xr((oe=ce.context)==null?void 0:oe.elements.floating,xe)||xr((re=ce.context)==null?void 0:re.elements.domReference,xe)})||NE(z.nodesRef.current,Pe).find(ce=>{var oe,re,_e;return[(oe=ce.context)==null?void 0:oe.elements.floating,zp((re=ce.context)==null?void 0:re.elements.floating)].includes(xe)||((_e=ce.context)==null?void 0:_e.elements.domReference)===xe})));if(Me===R&&O&&HE(O,Z),d&&Me!==R&&!(Ce!=null&&Ce.isConnected)&&no(pr(O))===pr(O).body){It(O)&&O.focus();const ce=D.current,oe=ie(),re=oe[ce]||oe[oe.length-1]||O;It(re)&&re.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(I||!p)&&xe&&ge&&!W.current&&xe!==qE()&&(P.current=!0,S(!1,ve,"focus-out"))})}const Re=!!(!z&&j);function Oe(){ur(B),E.current.insideReactTree=!0,B.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(_&&It(R))return R.addEventListener("focusout",Te),R.addEventListener("pointerdown",he),_.addEventListener("focusout",Te),Re&&_.addEventListener("focusout",Oe,!0),()=>{R.removeEventListener("focusout",Te),R.removeEventListener("pointerdown",he),_.removeEventListener("focusout",Te),Re&&_.removeEventListener("focusout",Oe,!0)}},[r,R,_,O,p,z,j,S,m,d,ie,I,C,Z,E]);const ne=x.useRef(null),le=x.useRef(null),pe=UE([ne,j?.beforeInsideRef]),ye=UE([le,j?.afterInsideRef]);x.useEffect(()=>{var he,Te;if(r||!_)return;const Re=Array.from((j==null||(he=j.portalNode)==null?void 0:he.querySelectorAll("["+vl("portal")+"]"))||[]),ve=(Te=(z?NE(z.nodesRef.current,C()):[]).find(Ce=>{var Pe;return Ny(((Pe=Ce.context)==null?void 0:Pe.elements.domReference)||null)}))==null||(Te=Te.context)==null?void 0:Te.elements.domReference,xe=[_,ve,...Re,...A(),F.current,U.current,ne.current,le.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,Z.current.includes("reference")||I?R:null].filter(Ce=>Ce!=null),Me=p||I?BE(xe,!L,L):BE(xe);return()=>{Me()}},[r,R,_,p,Z,j,I,H,L,z,C,A]),on(()=>{if(r||!It(O))return;const he=pr(O),Te=no(he);queueMicrotask(()=>{const Re=te(O),Oe=K.current,ve=(typeof Oe=="number"?Re[Oe]:Oe.current)||O,xe=xr(O,Te);!N&&!xe&&k&&qo(ve,{preventScroll:ve===O})})},[r,k,O,N,te,K]),on(()=>{if(r||!O)return;const he=pr(O),Te=no(he);B$(Te);function Re(xe){let{reason:Me,event:Ce,nested:Pe}=xe;if(["hover","safe-polygon"].includes(Me)&&Ce.type==="mouseleave"&&(P.current=!0),Me==="outside-press")if(Pe)P.current=!1;else if(kC(Ce)||SC(Ce))P.current=!1;else{let ge=!1;document.createElement("div").focus({get preventScroll(){return ge=!0,!1}}),ge?P.current=!1:P.current=!0}}T.on("openchange",Re);const Oe=he.createElement("span");Oe.setAttribute("tabindex","-1"),Oe.setAttribute("aria-hidden","true"),Object.assign(Oe.style,Eh),G&&R&&R.insertAdjacentElement("afterend",Oe);function ve(){if(typeof q.current=="boolean"){const xe=R||qE();return xe&&xe.isConnected?xe:Oe}return q.current.current||Oe}return()=>{T.off("openchange",Re);const xe=no(he),Me=xr(_,xe)||z&&Ko(z.nodesRef.current,C(),!1).some(Pe=>{var ge;return xr((ge=Pe.context)==null?void 0:ge.elements.floating,xe)}),Ce=ve();queueMicrotask(()=>{const Pe=F$(Ce);q.current&&!P.current&&It(Pe)&&(!(Pe!==xe&&xe!==he.body)||Me)&&Pe.focus({preventScroll:!0}),Oe.remove()})}},[r,_,O,q,E,T,z,G,R,C]),x.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(qv)}),[r]),on(()=>{if(!r&&j)return j.setFocusManagerState({modal:p,closeOnFocusOut:m,open:k,onOpenChange:S,domReference:R}),()=>{j.setFocusManagerState(null)}},[r,j,p,k,S,m,R]),on(()=>{r||O&&HE(O,Z)},[r,O,Z]);function Se(he){return r||!h||!p?null:v.jsx(U$,{ref:he==="start"?F:U,onClick:Te=>S(!1,Te.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const ze=!r&&H&&(p?!I:!0)&&(G||p);return v.jsxs(v.Fragment,{children:[ze&&v.jsx(Lp,{"data-type":"inside",ref:pe,onFocus:he=>{if(p){const Re=te();qo(s[0]==="reference"?Re[0]:Re[Re.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(P.current=!1,tc(he,j.portalNode)){const Re=EC(R);Re?.focus()}else{var Te;(Te=j.beforeOutsideRef.current)==null||Te.focus()}}}),!I&&Se("start"),n,Se("end"),ze&&v.jsx(Lp,{"data-type":"inside",ref:ye,onFocus:he=>{if(p)qo(te()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(m&&(P.current=!0),tc(he,j.portalNode)){const Re=TC(R);Re?.focus()}else{var Te;(Te=j.afterOutsideRef.current)==null||Te.focus()}}})]})}function GE(e){return It(e.target)&&e.target.tagName==="BUTTON"}function q$(e){return It(e.target)&&e.target.tagName==="A"}function VE(e){return xC(e)}function PC(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:p=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,g=x.useRef(),y=x.useRef(!1),k=x.useMemo(()=>({onPointerDown(S){g.current=S.pointerType},onMouseDown(S){const T=g.current;S.button===0&&c!=="click"&&(mc(T,!0)&&p||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const T=g.current;if(c==="mousedown"&&g.current){g.current=void 0;return}mc(T,!0)&&p||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){g.current=void 0,!(S.defaultPrevented||!h||GE(S))&&(S.key===" "&&!VE(a)&&(S.preventDefault(),y.current=!0),!q$(S)&&S.key==="Enter"&&r(!(n&&d),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||GE(S)||VE(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&d),S.nativeEvent,"click"))}}),[s,a,c,p,h,r,n,m,d]);return x.useMemo(()=>l?{reference:k}:{},[l,k])}const H$={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},G$={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},KE=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function $C(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:y,capture:k}=t,S=bo(),T=Dn(typeof d=="function"?d:()=>!1),E=typeof d=="function"?T:d,R=x.useRef(!1),{escapeKey:_,outsidePress:C}=KE(y),{escapeKey:A,outsidePress:N}=KE(k),I=x.useRef(!1),$=Dn(z=>{var j;if(!n||!l||!c||z.key!=="Escape"||I.current)return;const F=(j=a.current.floatingContext)==null?void 0:j.nodeId,U=S?Ko(S.nodesRef.current,F):[];if(!_&&(z.stopPropagation(),U.length>0)){let P=!0;if(U.forEach(W=>{var D;if((D=W.context)!=null&&D.open&&!W.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}r(!1,m$(z)?z.nativeEvent:z,"escape-key")}),H=Dn(z=>{var j;const F=()=>{var U;$(z),(U=ro(z))==null||U.removeEventListener("keydown",F)};(j=ro(z))==null||j.addEventListener("keydown",F)}),L=Dn(z=>{var j;const F=a.current.insideReactTree;a.current.insideReactTree=!1;const U=R.current;if(R.current=!1,p==="click"&&U||F||typeof E=="function"&&!E(z))return;const P=ro(z),W="["+vl("inert")+"]",D=pr(s.floating).querySelectorAll(W);let B=yt(P)?P:null;for(;B&&!hi(B);){const te=Fi(B);if(hi(te)||!yt(te))break;B=te}if(D.length&&yt(P)&&!p$(P)&&!xr(P,s.floating)&&Array.from(D).every(te=>!xr(B,te)))return;if(It(P)&&q){const te=hi(P),ne=Er(P),le=/auto|scroll/,pe=te||le.test(ne.overflowX),ye=te||le.test(ne.overflowY),Se=pe&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,ze=ye&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,he=ne.direction==="rtl",Te=ze&&(he?z.offsetX<=P.offsetWidth-P.clientWidth:z.offsetX>P.clientWidth),Re=Se&&z.offsetY>P.clientHeight;if(Te||Re)return}const G=(j=a.current.floatingContext)==null?void 0:j.nodeId,O=S&&Ko(S.nodesRef.current,G).some(te=>{var ne;return Eb(z,(ne=te.context)==null?void 0:ne.elements.floating)});if(Eb(z,s.floating)||Eb(z,s.domReference)||O)return;const ie=S?Ko(S.nodesRef.current,G):[];if(ie.length>0){let te=!0;if(ie.forEach(ne=>{var le;if((le=ne.context)!=null&&le.open&&!ne.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,z,"outside-press")}),Z=Dn(z=>{var j;const F=()=>{var U;L(z),(U=ro(z))==null||U.removeEventListener(p,F)};(j=ro(z))==null||j.addEventListener(p,F)});x.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=_,a.current.__outsidePressBubbles=C;let z=-1;function j(D){r(!1,D,"ancestor-scroll")}function F(){window.clearTimeout(z),I.current=!0}function U(){z=window.setTimeout(()=>{I.current=!1},Lc()?5:0)}const P=pr(s.floating);c&&(P.addEventListener("keydown",A?H:$,A),P.addEventListener("compositionstart",F),P.addEventListener("compositionend",U)),E&&P.addEventListener(p,N?Z:L,N);let W=[];return g&&(yt(s.domReference)&&(W=oo(s.domReference)),yt(s.floating)&&(W=W.concat(oo(s.floating))),!yt(s.reference)&&s.reference&&s.reference.contextElement&&(W=W.concat(oo(s.reference.contextElement)))),W=W.filter(D=>{var B;return D!==((B=P.defaultView)==null?void 0:B.visualViewport)}),W.forEach(D=>{D.addEventListener("scroll",j,{passive:!0})}),()=>{c&&(P.removeEventListener("keydown",A?H:$,A),P.removeEventListener("compositionstart",F),P.removeEventListener("compositionend",U)),E&&P.removeEventListener(p,N?Z:L,N),W.forEach(D=>{D.removeEventListener("scroll",j)}),window.clearTimeout(z)}},[a,s,c,E,p,n,r,g,l,_,C,$,A,H,L,N,Z]),x.useEffect(()=>{a.current.insideReactTree=!1},[a,E,p]);const K=x.useMemo(()=>({onKeyDown:$,...h&&{[H$[m]]:z=>{r(!1,z.nativeEvent,"reference-press")},...m!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}}}}),[$,r,h,m]),q=x.useMemo(()=>({onKeyDown:$,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[G$[p]]:()=>{a.current.insideReactTree=!0}}),[$,p,a]);return x.useMemo(()=>l?{reference:K,floating:q}:{},[l,K,q])}function V$(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=wh(),a=x.useRef({}),[l]=x.useState(()=>AC()),c=go()!=null,[d,p]=x.useState(r.reference),h=Dn((y,k,S)=>{a.current.openEvent=y?k:void 0,l.emit("openchange",{open:y,event:k,reason:S,nested:c}),n?.(y,k,S)}),m=x.useMemo(()=>({setPositionReference:p}),[]),g=x.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return x.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:g,events:l,floatingId:s,refs:m}),[t,h,g,l,s,m])}function BC(e){e===void 0&&(e={});const{nodeId:t}=e,n=V$({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=x.useState(null),[c,d]=x.useState(null),h=s?.domReference||a,m=x.useRef(null),g=bo();on(()=>{h&&(m.current=h)},[h]);const y=HR({...e,elements:{...s,...c&&{reference:c}}}),k=x.useCallback(_=>{const C=yt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;d(C),y.refs.setReference(C)},[y.refs]),S=x.useCallback(_=>{(yt(_)||_===null)&&(m.current=_,l(_)),(yt(y.refs.reference.current)||y.refs.reference.current===null||_!==null&&!yt(_))&&y.refs.setReference(_)},[y.refs]),T=x.useMemo(()=>({...y.refs,setReference:S,setPositionReference:k,domReference:m}),[y.refs,S,k]),E=x.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),R=x.useMemo(()=>({...y,...r,refs:T,elements:E,nodeId:t}),[y,T,E,t,r]);return on(()=>{r.dataRef.current.floatingContext=R;const _=g?.nodesRef.current.find(C=>C.id===t);_&&(_.context=R)}),x.useMemo(()=>({...y,context:R,refs:T,elements:E}),[y,T,E,R])}function Nb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[IE]:l,[DE]:c,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[R$]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(d=>{let[p,h]=d;if(!(s&&[IE,DE].includes(p)))if(p.indexOf("on")===0){if(r.has(p)||r.set(p,[]),typeof h=="function"){var m;(m=r.get(p))==null||m.push(h),l[p]=function(){for(var g,y=arguments.length,k=new Array(y),S=0;S<y;S++)k[S]=arguments[S];return(g=r.get(p))==null?void 0:g.map(T=>T(...k)).find(T=>T!==void 0)}}}else l[p]=h}),l),{})}}function FC(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),s=x.useCallback(c=>Nb(c,e,"reference"),t),a=x.useCallback(c=>Nb(c,e,"floating"),n),l=x.useCallback(c=>Nb(c,e,"item"),r);return x.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const K$="Escape";function Th(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Dd(e,t){return Th(t,e===CC||e===Sh,e===Wc||e===Yc)}function Ob(e,t,n){return Th(t,e===Sh,n?e===Wc:e===Yc)||e==="Enter"||e===" "||e===""}function ZE(e,t,n){return Th(t,n?e===Wc:e===Yc,e===Sh)}function WE(e,t,n,r){const s=n?e===Yc:e===Wc,a=e===CC;return t==="both"||t==="horizontal"&&r&&r>1?e===K$:Th(t,s,a)}function UC(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:d=()=>{},enabled:p=!0,selectedIndex:h=null,allowEscape:m=!1,loop:g=!1,nested:y=!1,rtl:k=!1,virtual:S=!1,focusItemOnOpen:T="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:R=!0,disabledIndices:_=void 0,orientation:C="vertical",parentOrientation:A,cols:N=1,scrollItemIntoView:I=!0,virtualItemRef:$,itemSizes:H,dense:L=!1}=t,Z=zp(s.floating),K=Wn(Z),q=go(),z=bo();on(()=>{e.dataRef.current.orientation=C},[e,C]);const j=Dn(()=>{d(P.current===-1?null:P.current)}),F=Ny(s.domReference),U=x.useRef(T),P=x.useRef(h??-1),W=x.useRef(null),D=x.useRef(!0),B=x.useRef(j),G=x.useRef(!!s.floating),O=x.useRef(n),ie=x.useRef(!1),te=x.useRef(!1),ne=Wn(_),le=Wn(n),pe=Wn(I),ye=Wn(h),[Se,ze]=x.useState(),[he,Te]=x.useState(),Re=Dn(()=>{function ce(J){if(S){var fe;(fe=J.id)!=null&&fe.endsWith("-fui-option")&&(J.id=a+"-"+Math.random().toString(16).slice(2,10)),ze(J.id),z?.events.emit("virtualfocus",J),$&&($.current=J)}else qo(J,{sync:ie.current,preventScroll:!0})}const oe=l.current[P.current],re=te.current;oe&&ce(oe),(ie.current?J=>J():requestAnimationFrame)(()=>{const J=l.current[P.current]||oe;if(!J)return;oe||ce(J);const fe=pe.current;fe&&ve&&(re||!D.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof fe=="boolean"?{block:"nearest",inline:"nearest"}:fe))})});on(()=>{p&&(n&&s.floating?U.current&&h!=null&&(te.current=!0,P.current=h,j()):G.current&&(P.current=-1,B.current()))},[p,n,s.floating,h,j]),on(()=>{if(p&&n&&s.floating)if(c==null){if(ie.current=!1,ye.current!=null)return;if(G.current&&(P.current=-1,Re()),(!O.current||!G.current)&&U.current&&(W.current!=null||U.current===!0&&W.current==null)){let ce=0;const oe=()=>{l.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(oe),ce++):(P.current=W.current==null||Ob(W.current,C,k)||y?Tb(l,ne.current):OE(l,ne.current),W.current=null,j())};oe()}}else ec(l,c)||(P.current=c,Re(),te.current=!1)},[p,n,s.floating,c,ye,y,l,C,k,j,Re,ne]),on(()=>{var ce;if(!p||s.floating||!z||S||!G.current)return;const oe=z.nodesRef.current,re=(ce=oe.find(fe=>fe.id===q))==null||(ce=ce.context)==null?void 0:ce.elements.floating,_e=no(pr(s.floating)),J=oe.some(fe=>fe.context&&xr(fe.context.elements.floating,_e));re&&!J&&D.current&&re.focus({preventScroll:!0})},[p,s.floating,z,q,S]),on(()=>{if(!p||!z||!S||q)return;function ce(oe){Te(oe.id),$&&($.current=oe)}return z.events.on("virtualfocus",ce),()=>{z.events.off("virtualfocus",ce)}},[p,z,S,q,$]),on(()=>{B.current=j,O.current=n,G.current=!!s.floating}),on(()=>{n||(W.current=null,U.current=T)},[n,T]);const Oe=c!=null,ve=x.useMemo(()=>{function ce(re){if(!le.current)return;const _e=l.current.indexOf(re);_e!==-1&&P.current!==_e&&(P.current=_e,j())}return{onFocus(re){let{currentTarget:_e}=re;ie.current=!0,ce(_e)},onClick:re=>{let{currentTarget:_e}=re;return _e.focus({preventScroll:!0})},onMouseMove(re){let{currentTarget:_e}=re;ie.current=!0,te.current=!1,E&&ce(_e)},onPointerLeave(re){let{pointerType:_e}=re;if(!(!D.current||_e==="touch")&&(ie.current=!0,!!E&&(P.current=-1,j(),!S))){var J;(J=K.current)==null||J.focus({preventScroll:!0})}}}},[le,K,E,l,j,S]),xe=x.useCallback(()=>{var ce;return A??(z==null||(ce=z.nodesRef.current.find(oe=>oe.id===q))==null||(ce=ce.context)==null||(ce=ce.dataRef)==null?void 0:ce.current.orientation)},[q,z,A]),Me=Dn(ce=>{if(D.current=!1,ie.current=!0,ce.which===229||!le.current&&ce.currentTarget===K.current)return;if(y&&WE(ce.key,C,k,N)){Dd(ce.key,xe())||sr(ce),r(!1,ce.nativeEvent,"list-navigation"),It(s.domReference)&&(S?z?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const oe=P.current,re=Tb(l,_),_e=OE(l,_);if(F||(ce.key==="Home"&&(sr(ce),P.current=re,j()),ce.key==="End"&&(sr(ce),P.current=_e,j())),N>1){const J=H||Array.from({length:l.current.length},()=>({width:1,height:1})),fe=S$(J,N,L),Ie=fe.findIndex(Ye=>Ye!=null&&!pp(l,Ye,_)),Ue=fe.reduce((Ye,ot,it)=>ot!=null&&!pp(l,ot,_)?it:Ye,-1),Ze=fe[k$({current:fe.map(Ye=>Ye!=null?l.current[Ye]:null)},{event:ce,orientation:C,loop:g,rtl:k,cols:N,disabledIndices:E$([...(typeof _!="function"?_:null)||l.current.map((Ye,ot)=>pp(l,ot,_)?ot:void 0),void 0],fe),minIndex:Ie,maxIndex:Ue,prevIndex:w$(P.current>_e?re:P.current,J,fe,N,ce.key===Sh?"bl":ce.key===(k?Wc:Yc)?"tr":"tl"),stopEvent:!0})];if(Ze!=null&&(P.current=Ze,j()),C==="both")return}if(Dd(ce.key,C)){if(sr(ce),n&&!S&&no(ce.currentTarget.ownerDocument)===ce.currentTarget){P.current=Ob(ce.key,C,k)?re:_e,j();return}Ob(ce.key,C,k)?g?P.current=oe>=_e?m&&oe!==l.current.length?-1:re:cr(l,{startingIndex:oe,disabledIndices:_}):P.current=Math.min(_e,cr(l,{startingIndex:oe,disabledIndices:_})):g?P.current=oe<=re?m&&oe!==-1?l.current.length:_e:cr(l,{startingIndex:oe,decrement:!0,disabledIndices:_}):P.current=Math.max(re,cr(l,{startingIndex:oe,decrement:!0,disabledIndices:_})),ec(l,P.current)&&(P.current=-1),j()}}),Ce=x.useMemo(()=>S&&n&&Oe&&{"aria-activedescendant":he||Se},[S,n,Oe,he,Se]),Pe=x.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...F?{}:Ce,onKeyDown:Me,onPointerMove(){D.current=!0}}),[Ce,Me,C,F]),ge=x.useMemo(()=>{function ce(re){T==="auto"&&kC(re.nativeEvent)&&(U.current=!0)}function oe(re){U.current=T,T==="auto"&&SC(re.nativeEvent)&&(U.current=!0)}return{...Ce,onKeyDown(re){D.current=!1;const _e=re.key.startsWith("Arrow"),J=["Home","End"].includes(re.key),fe=_e||J,Ie=ZE(re.key,C,k),Ue=WE(re.key,C,k,N),Ze=ZE(re.key,xe(),k),Ye=Dd(re.key,C),ot=(y?Ze:Ye)||re.key==="Enter"||re.key.trim()==="";if(S&&n){const st=z?.nodesRef.current.find(We=>We.parentId==null),xt=z&&st?h$(z.nodesRef.current,st.id):null;if(fe&&xt&&$){const We=new KeyboardEvent("keydown",{key:re.key,bubbles:!0});if(Ie||Ue){var it,nt;const Ot=((it=xt.context)==null?void 0:it.elements.domReference)===re.currentTarget,Be=Ue&&!Ot?(nt=xt.context)==null?void 0:nt.elements.domReference:Ie?l.current.find(Ke=>Ke?.id===Se):null;Be&&(sr(re),Be.dispatchEvent(We),Te(void 0))}if((Ye||J)&&xt.context&&xt.context.open&&xt.parentId&&re.currentTarget!==xt.context.elements.domReference){var vt;sr(re),(vt=xt.context.elements.domReference)==null||vt.dispatchEvent(We);return}}return Me(re)}if(!(!n&&!R&&_e)){if(ot){const st=Dd(re.key,xe());W.current=y&&st?null:re.key}if(y){Ze&&(sr(re),n?(P.current=Tb(l,ne.current),j()):r(!0,re.nativeEvent,"list-navigation"));return}Ye&&(h!=null&&(P.current=h),sr(re),!n&&R?r(!0,re.nativeEvent,"list-navigation"):Me(re),n&&j())}},onFocus(){n&&!S&&(P.current=-1,j())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:ce,onClick:ce}},[Se,Ce,N,Me,ne,T,l,y,j,r,n,R,C,xe,k,h,z,S,$]);return x.useMemo(()=>p?{reference:ge,floating:Pe,item:ve}:{},[p,ge,Pe,ve])}const Z$=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qC(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:d="dialog"}=t,p=wh(),h=((n=a.domReference)==null?void 0:n.id)||p,m=x.useMemo(()=>{var R;return((R=zp(a.floating))==null?void 0:R.id)||l},[a.floating,l]),g=(r=Z$.get(d))!=null?r:d,k=go()!=null,S=x.useMemo(()=>g==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":s?m:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:h},...g==="menu"&&k&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[g,m,k,s,h,d]),T=x.useMemo(()=>{const R={id:m,...g&&{role:g}};return g==="tooltip"||d==="label"?R:{...R,...g==="menu"&&{"aria-labelledby":h}}},[g,m,h,d]),E=x.useCallback(R=>{let{active:_,selected:C}=R;const A={role:"option",..._&&{id:m+"-fui-option"}};switch(d){case"select":case"combobox":return{...A,"aria-selected":C}}return{}},[m,d]);return x.useMemo(()=>c?{reference:S,floating:T,item:E}:{},[c,S,T,E])}const YE=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ka(e,t){return typeof e=="function"?e(t):e}function W$(e,t){const[n,r]=x.useState(e);return e&&!n&&r(!0),x.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function Y$(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,d]=x.useState("unmounted"),p=W$(n,l);return!p&&c==="close"&&d("unmounted"),on(()=>{if(r){if(n){d("initial");const h=requestAnimationFrame(()=>{Ri.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(h)}}d("close")}},[n,r]),{isMounted:p,status:c}}function HC(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,d=c.split("-")[0],p=x.useMemo(()=>({side:d,placement:c}),[d,c]),h=typeof l=="number",m=(h?l:l.open)||0,g=(h?l:l.close)||0,[y,k]=x.useState(()=>({...Ka(a,p),...Ka(n,p)})),{isMounted:S,status:T}=Y$(e,{duration:l}),E=Wn(n),R=Wn(r),_=Wn(s),C=Wn(a);return on(()=>{const A=Ka(E.current,p),N=Ka(_.current,p),I=Ka(C.current,p),$=Ka(R.current,p)||Object.keys(A).reduce((H,L)=>(H[L]="",H),{});if(T==="initial"&&k(H=>({transitionProperty:H.transitionProperty,...I,...A})),T==="open"&&k({transitionProperty:Object.keys($).map(YE).join(","),transitionDuration:m+"ms",...I,...$}),T==="close"){const H=N||A;k({transitionProperty:Object.keys(H).map(YE).join(","),transitionDuration:g+"ms",...I,...H})}},[g,_,E,R,C,m,T,p]),{isMounted:S,styles:y}}function GC(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:d,enabled:p=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:g=[],selectedIndex:y=null}=t,k=x.useRef(-1),S=x.useRef(""),T=x.useRef((n=y??l)!=null?n:-1),E=x.useRef(null),R=Dn(c),_=Dn(d),C=Wn(h),A=Wn(g);on(()=>{r&&(ur(k),E.current=null,S.current="")},[r]),on(()=>{if(r&&S.current===""){var L;T.current=(L=y??l)!=null?L:-1}},[r,y,l]);const N=Dn(L=>{L?s.current.typing||(s.current.typing=L,_(L)):s.current.typing&&(s.current.typing=L,_(L))}),I=Dn(L=>{function Z(F,U,P){const W=C.current?C.current(U,P):U.find(D=>D?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return W?F.indexOf(W):-1}const K=a.current;if(S.current.length>0&&S.current[0]!==" "&&(Z(K,K,S.current)===-1?N(!1):L.key===" "&&sr(L)),K==null||A.current.includes(L.key)||L.key.length!==1||L.ctrlKey||L.metaKey||L.altKey)return;r&&L.key!==" "&&(sr(L),N(!0)),K.every(F=>{var U,P;return F?((U=F[0])==null?void 0:U.toLocaleLowerCase())!==((P=F[1])==null?void 0:P.toLocaleLowerCase()):!0})&&S.current===L.key&&(S.current="",T.current=E.current),S.current+=L.key,ur(k),k.current=window.setTimeout(()=>{S.current="",T.current=E.current,N(!1)},m);const z=T.current,j=Z(K,[...K.slice((z||0)+1),...K.slice(0,(z||0)+1)],S.current);j!==-1?(R(j),E.current=j):L.key!==" "&&(S.current="",N(!1))}),$=x.useMemo(()=>({onKeyDown:I}),[I]),H=x.useMemo(()=>({onKeyDown:I,onKeyUp(L){L.key===" "&&N(!1)}}),[I,N]);return x.useMemo(()=>p?{reference:$,floating:H}:{},[p,$,H])}function VC(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...VC(e,s.id,n)])}function XE(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[d,p]=t[l]||[0,0],[h,m]=t[c]||[0,0];p>=r!=m>=r&&n<=(h-d)*(r-p)/(m-p)+d&&(s=!s)}return s}function X$(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function KC(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,d=typeof performance<"u"?performance.now():0;function p(m,g){const y=performance.now(),k=y-d;if(l===null||c===null||k===0)return l=m,c=g,d=y,null;const S=m-l,T=g-c,R=Math.sqrt(S*S+T*T)/k;return l=m,c=g,d=y,R}const h=m=>{let{x:g,y,placement:k,elements:S,onClose:T,nodeId:E,tree:R}=m;return function(C){function A(){ur(s),T()}if(ur(s),!S.domReference||!S.floating||k==null||g==null||y==null)return;const{clientX:N,clientY:I}=C,$=[N,I],H=I$(C),L=C.type==="mouseleave",Z=Cb(S.floating,H),K=Cb(S.domReference,H),q=S.domReference.getBoundingClientRect(),z=S.floating.getBoundingClientRect(),j=k.split("-")[0],F=g>z.right-z.width/2,U=y>z.bottom-z.height/2,P=X$($,q),W=z.width>q.width,D=z.height>q.height,B=(W?q:z).left,G=(W?q:z).right,O=(D?q:z).top,ie=(D?q:z).bottom;if(Z&&(a=!0,!L))return;if(K&&(a=!1),K&&!L){a=!0;return}if(L&&yt(C.relatedTarget)&&Cb(S.floating,C.relatedTarget)||R&&VC(R.nodesRef.current,E).length)return;if(j==="top"&&y>=q.bottom-1||j==="bottom"&&y<=q.top+1||j==="left"&&g>=q.right-1||j==="right"&&g<=q.left+1)return A();let te=[];switch(j){case"top":te=[[B,q.top+1],[B,z.bottom-1],[G,z.bottom-1],[G,q.top+1]];break;case"bottom":te=[[B,z.top+1],[B,q.bottom-1],[G,q.bottom-1],[G,z.top+1]];break;case"left":te=[[z.right-1,ie],[z.right-1,O],[q.left+1,O],[q.left+1,ie]];break;case"right":te=[[q.right-1,ie],[q.right-1,O],[z.left+1,O],[z.left+1,ie]];break}function ne(le){let[pe,ye]=le;switch(j){case"top":{const Se=[W?pe+t/2:F?pe+t*4:pe-t*4,ye+t+1],ze=[W?pe-t/2:F?pe+t*4:pe-t*4,ye+t+1],he=[[z.left,F||W?z.bottom-t:z.top],[z.right,F?W?z.bottom-t:z.top:z.bottom-t]];return[Se,ze,...he]}case"bottom":{const Se=[W?pe+t/2:F?pe+t*4:pe-t*4,ye-t],ze=[W?pe-t/2:F?pe+t*4:pe-t*4,ye-t],he=[[z.left,F||W?z.top+t:z.bottom],[z.right,F?W?z.top+t:z.bottom:z.top+t]];return[Se,ze,...he]}case"left":{const Se=[pe+t+1,D?ye+t/2:U?ye+t*4:ye-t*4],ze=[pe+t+1,D?ye-t/2:U?ye+t*4:ye-t*4];return[...[[U||D?z.right-t:z.left,z.top],[U?D?z.right-t:z.left:z.right-t,z.bottom]],Se,ze]}case"right":{const Se=[pe-t,D?ye+t/2:U?ye+t*4:ye-t*4],ze=[pe-t,D?ye-t/2:U?ye+t*4:ye-t*4],he=[[U||D?z.left+t:z.right,z.top],[U?D?z.left+t:z.right:z.left+t,z.bottom]];return[Se,ze,...he]}}}if(!XE([N,I],te)){if(a&&!P)return A();if(!L&&r){const le=p(C.clientX,C.clientY);if(le!==null&&le<.1)return A()}XE([N,I],ne([g,y]))?!a&&r&&(s.current=window.setTimeout(A,40)):A()}}};return h.__options={blockPointerEvents:n},h}function Ne(e,t,n){function r(c,d){var p;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(p=c._zod).traits??(p.traits=new Set),c._zod.traits.add(e),t(c,d);for(const h in l.prototype)h in c||Object.defineProperty(c,h,{value:l.prototype[h].bind(c)});c._zod.constr=l,c._zod.def=d}const s=n?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function l(c){var d;const p=n?.Parent?new a:this;r(p,c),(d=p._zod).deferred??(d.deferred=[]);for(const h of p._zod.deferred)h();return p}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 cl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ZC extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const WC={};function Jo(e){return WC}function Q$(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Oy(e,t){return typeof t=="bigint"?t.toString():t}function Gv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Vv(e){return e==null}function Kv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const QE=Symbol("evaluating");function pn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==QE)return r===void 0&&(r=QE,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function la(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ua(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function JE(e){return JSON.stringify(e)}const YC="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const J$=Gv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function gc(e){if(jp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(jp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function XC(e){return gc(e)?{...e}:Array.isArray(e)?[...e]:e}const e3=new Set(["string","number","symbol"]);function _h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yo(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function wt(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 t3(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function n3(e,t){const n=e._zod.def,r=ua(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return la(this,"shape",s),s},checks:[]});return yo(e,r)}function r3(e,t){const n=e._zod.def,r=ua(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return la(this,"shape",s),s},checks:[]});return yo(e,r)}function i3(e,t){if(!gc(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 s=ua(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return la(this,"shape",a),a},checks:[]});return yo(e,s)}function s3(e,t){if(!gc(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 la(this,"shape",r),r},checks:e._zod.def.checks};return yo(e,n)}function o3(e,t){const n=ua(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return la(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return yo(e,n)}function a3(e,t,n){const r=ua(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)a[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return la(this,"shape",a),a},checks:[]});return yo(t,r)}function l3(e,t,n){const r=ua(t._zod.def,{get shape(){const s=t._zod.def.shape,a={...s};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(a[l]=new e({type:"nonoptional",innerType:s[l]}))}else for(const l in s)a[l]=new e({type:"nonoptional",innerType:s[l]});return la(this,"shape",a),a},checks:[]});return yo(t,r)}function rl(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 QC(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function zd(e){return typeof e=="string"?e:e?.message}function ea(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=zd(e.inst?._zod.def?.error?.(e))??zd(t?.error?.(e))??zd(n.customError?.(e))??zd(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Zv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function bc(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const JC=(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,Oy,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},eA=Ne("$ZodError",JC),tA=Ne("$ZodError",JC,{Parent:Error});function u3(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function c3(e,t){const n=t||function(a){return a.message},r={_errors:[]},s=a=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>s({issues:c}));else if(l.code==="invalid_key")s({issues:l.issues});else if(l.code==="invalid_element")s({issues:l.issues});else if(l.path.length===0)r._errors.push(n(l));else{let c=r,d=0;for(;d<l.path.length;){const p=l.path[d];d===l.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(n(l))):c[p]=c[p]||{_errors:[]},c=c[p],d++}}};return s(e),r}const Wv=e=>(t,n,r,s)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new cl;if(l.issues.length){const c=new(s?.Err??e)(l.issues.map(d=>ea(d,a,Jo())));throw YC(c,s?.callee),c}return l.value},Yv=e=>async(t,n,r,s)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(s?.Err??e)(l.issues.map(d=>ea(d,a,Jo())));throw YC(c,s?.callee),c}return l.value},Rh=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new cl;return a.issues.length?{success:!1,error:new(e??eA)(a.issues.map(l=>ea(l,s,Jo())))}:{success:!0,data:a.value}},f3=Rh(tA),Ch=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},s);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>ea(l,s,Jo())))}:{success:!0,data:a.value}},d3=Ch(tA),p3=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Wv(e)(t,n,s)},h3=e=>(t,n,r)=>Wv(e)(t,n,r),m3=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Yv(e)(t,n,s)},g3=e=>async(t,n,r)=>Yv(e)(t,n,r),b3=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Rh(e)(t,n,s)},y3=e=>(t,n,r)=>Rh(e)(t,n,r),v3=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ch(e)(t,n,s)},x3=e=>async(t,n,r)=>Ch(e)(t,n,r),k3=/^[cC][^\s-]{8,}$/,S3=/^[0-9a-z]+$/,w3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,E3=/^[0-9a-vA-V]{20}$/,T3=/^[A-Za-z0-9]{27}$/,_3=/^[a-zA-Z0-9_-]{21}$/,R3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,C3=/^([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})$/,e1=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)$/,A3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,N3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function O3(){return new RegExp(N3,"u")}const M3=/^(?:(?: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])$/,I3=/^(([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}|:))$/,D3=/^((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])$/,z3=/^(([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])$/,L3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nA=/^[A-Za-z0-9_-]*$/,j3=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,P3=/^\+(?:[0-9]){6,14}[0-9]$/,rA="(?:(?:\\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])))",$3=new RegExp(`^${rA}$`);function iA(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 B3(e){return new RegExp(`^${iA(e)}$`)}function F3(e){const t=iA({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(`^${rA}T(?:${r})$`)}const U3=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},q3=/^(?:true|false)$/i,H3=/^[^A-Z]*$/,G3=/^[^a-z]*$/,qi=Ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),V3=Ne("$ZodCheckMaxLength",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Vv(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const l=Zv(s);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),K3=Ne("$ZodCheckMinLength",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Vv(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const l=Zv(s);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Z3=Ne("$ZodCheckLengthEquals",(e,t)=>{var n;qi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Vv(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,a=s.length;if(a===t.length)return;const l=Zv(s),c=a>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})}}),Ah=Ne("$ZodCheckStringFormat",(e,t)=>{var n,r;qi.init(e,t),e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),W3=Ne("$ZodCheckRegex",(e,t)=>{Ah.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})}}),Y3=Ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=H3),Ah.init(e,t)}),X3=Ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=G3),Ah.init(e,t)}),Q3=Ne("$ZodCheckIncludes",(e,t)=>{qi.init(e,t);const n=_h(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),J3=Ne("$ZodCheckStartsWith",(e,t)=>{qi.init(e,t);const n=new RegExp(`^${_h(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.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})}}),e6=Ne("$ZodCheckEndsWith",(e,t)=>{qi.init(e,t);const n=new RegExp(`.*${_h(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.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})}}),t6=Ne("$ZodCheckOverwrite",(e,t)=>{qi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class n6{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),s=Math.min(...r.map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(s)).map(l=>" ".repeat(this.indent*2)+l);for(const l of a)this.content.push(l)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...n,s.join(`
11
+ `))}}const r6={major:4,minor:1,patch:11},qn=Ne("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=r6;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const a of s._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(l,c,d)=>{let p=rl(l),h;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(p)continue;const g=l.issues.length,y=m._zod.check(l);if(y instanceof Promise&&d?.async===!1)throw new cl;if(h||y instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await y,l.issues.length!==g&&(p||(p=rl(l,g)))});else{if(l.issues.length===g)continue;p||(p=rl(l,g))}}return h?h.then(()=>l):l},a=(l,c,d)=>{if(rl(l))return l.aborted=!0,l;const p=s(c,r,d);if(p instanceof Promise){if(d.async===!1)throw new cl;return p.then(h=>e._zod.parse(h,d))}return e._zod.parse(p,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const p=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return p instanceof Promise?p.then(h=>a(h,l,c)):a(p,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new cl;return d.then(p=>s(p,r,c))}return s(d,r,c)}}e["~standard"]={validate:s=>{try{const a=f3(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return d3(e,s).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),Xv=Ne("$ZodString",(e,t)=>{qn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??U3(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}}),kn=Ne("$ZodStringFormat",(e,t)=>{Ah.init(e,t),Xv.init(e,t)}),i6=Ne("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=C3),kn.init(e,t)}),s6=Ne("$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=e1(r))}else t.pattern??(t.pattern=e1());kn.init(e,t)}),o6=Ne("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=A3),kn.init(e,t)}),a6=Ne("$ZodURL",(e,t)=>{kn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:j3.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.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=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),l6=Ne("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=O3()),kn.init(e,t)}),u6=Ne("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=_3),kn.init(e,t)}),c6=Ne("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=k3),kn.init(e,t)}),f6=Ne("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=S3),kn.init(e,t)}),d6=Ne("$ZodULID",(e,t)=>{t.pattern??(t.pattern=w3),kn.init(e,t)}),p6=Ne("$ZodXID",(e,t)=>{t.pattern??(t.pattern=E3),kn.init(e,t)}),h6=Ne("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=T3),kn.init(e,t)}),m6=Ne("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=F3(t)),kn.init(e,t)}),g6=Ne("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$3),kn.init(e,t)}),b6=Ne("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=B3(t)),kn.init(e,t)}),y6=Ne("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=R3),kn.init(e,t)}),v6=Ne("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=M3),kn.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),x6=Ne("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=I3),kn.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.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})}}}),k6=Ne("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=D3),kn.init(e,t)}),S6=Ne("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=z3),kn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,a]=r;if(!a)throw new Error;const l=Number(a);if(`${l}`!==a)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function sA(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const w6=Ne("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=L3),kn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{sA(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function E6(e){if(!nA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return sA(n)}const T6=Ne("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nA),kn.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{E6(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_6=Ne("$ZodE164",(e,t)=>{t.pattern??(t.pattern=P3),kn.init(e,t)});function R6(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const C6=Ne("$ZodJWT",(e,t)=>{kn.init(e,t),e._zod.check=n=>{R6(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),A6=Ne("$ZodBoolean",(e,t)=>{qn.init(e,t),e._zod.pattern=q3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),N6=Ne("$ZodUnknown",(e,t)=>{qn.init(e,t),e._zod.parse=n=>n}),O6=Ne("$ZodNever",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function t1(e,t,n){e.issues.length&&t.issues.push(...QC(n,e.issues)),t.value[n]=e.value}const M6=Ne("$ZodArray",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const a=[];for(let l=0;l<s.length;l++){const c=s[l],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?a.push(d.then(p=>t1(p,n,l))):t1(d,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Pp(e,t,n,r){e.issues.length&&t.issues.push(...QC(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function oA(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=t3(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function aA(e,t,n,r,s,a){const l=[],c=s.keySet,d=s.catchall._zod,p=d.def.type;for(const h of Object.keys(t)){if(c.has(h))continue;if(p==="never"){l.push(h);continue}const m=d.run({value:t[h],issues:[]},r);m instanceof Promise?e.push(m.then(g=>Pp(g,n,h,t))):Pp(m,n,h,t)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const I6=Ne("$ZodObject",(e,t)=>{if(qn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Gv(()=>oA(t));pn(e._zod,"propValues",()=>{const c=t.shape,d={};for(const p in c){const h=c[p]._zod;if(h.values){d[p]??(d[p]=new Set);for(const m of h.values)d[p].add(m)}}return d});const s=jp,a=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const p=c.value;if(!s(p))return c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c;c.value={};const h=[],m=l.shape;for(const g of l.keys){const k=m[g]._zod.run({value:p[g],issues:[]},d);k instanceof Promise?h.push(k.then(S=>Pp(S,c,g,p))):Pp(k,c,g,p)}return a?aA(h,p,c,d,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),D6=Ne("$ZodObjectJIT",(e,t)=>{I6.init(e,t);const n=e._zod.parse,r=Gv(()=>oA(t)),s=g=>{const y=new n6(["shape","payload","ctx"]),k=r.value,S=_=>{const C=JE(_);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const T=Object.create(null);let E=0;for(const _ of k.keys)T[_]=`key_${E++}`;y.write("const newResult = {};");for(const _ of k.keys){const C=T[_],A=JE(_);y.write(`const ${C} = ${S(_)};`),y.write(`
12
+ if (${C}.issues.length) {
13
+ payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
14
+ ...iss,
15
+ path: iss.path ? [${A}, ...iss.path] : [${A}]
16
+ })));
17
+ }
18
+
19
+
20
+ if (${C}.value === undefined) {
21
+ if (${A} in input) {
22
+ newResult[${A}] = undefined;
23
+ }
24
+ } else {
25
+ newResult[${A}] = ${C}.value;
26
+ }
27
+
28
+ `)}y.write("payload.value = newResult;"),y.write("return payload;");const R=y.compile();return(_,C)=>R(g,_,C)};let a;const l=jp,c=!WC.jitless,p=c&&J$.value,h=t.catchall;let m;e._zod.parse=(g,y)=>{m??(m=r.value);const k=g.value;return l(k)?c&&p&&y?.async===!1&&y.jitless!==!0?(a||(a=s(t.shape)),g=a(g,y),h?aA([],k,g,y,m,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:k,inst:e}),g)}});function n1(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const s=e.filter(a=>!rl(a));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>ea(l,r,Jo())))}),t)}const z6=Ne("$ZodUnion",(e,t)=>{qn.init(e,t),pn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),pn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),pn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),pn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${s.map(a=>Kv(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,a)=>{if(n)return r(s,a);let l=!1;const c=[];for(const d of t.options){const p=d._zod.run({value:s.value,issues:[]},a);if(p instanceof Promise)c.push(p),l=!0;else{if(p.issues.length===0)return p;c.push(p)}}return l?Promise.all(c).then(d=>n1(d,s,e,a)):n1(c,s,e,a)}}),L6=Ne("$ZodIntersection",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,a=t.left._zod.run({value:s,issues:[]},r),l=t.right._zod.run({value:s,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([d,p])=>r1(n,d,p)):r1(n,a,l)}});function My(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(gc(e)&&gc(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(const a of r){const l=My(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};s[a]=l.data}return{valid:!0,data:s}}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 s=e[r],a=t[r],l=My(s,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function r1(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),rl(e))return e;const r=My(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 j6=Ne("$ZodEnum",(e,t)=>{qn.init(e,t);const n=Q$(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>e3.has(typeof s)).map(s=>typeof s=="string"?_h(s):s.toString()).join("|")})$`),e._zod.parse=(s,a)=>{const l=s.value;return r.has(l)||s.issues.push({code:"invalid_value",values:n,input:l,inst:e}),s}}),P6=Ne("$ZodTransform",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ZC(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(l=>(n.value=l,n));if(s instanceof Promise)throw new cl;return n.value=s,n}});function i1(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $6=Ne("$ZodOptional",(e,t)=>{qn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",pn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),pn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Kv(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>i1(a,n.value)):i1(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),B6=Ne("$ZodNullable",(e,t)=>{qn.init(e,t),pn(e._zod,"optin",()=>t.innerType._zod.optin),pn(e._zod,"optout",()=>t.innerType._zod.optout),pn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Kv(n.source)}|null)$`):void 0}),pn(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)}),F6=Ne("$ZodDefault",(e,t)=>{qn.init(e,t),e._zod.optin="optional",pn(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 s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>s1(a,t)):s1(s,t)}});function s1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const U6=Ne("$ZodPrefault",(e,t)=>{qn.init(e,t),e._zod.optin="optional",pn(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))}),q6=Ne("$ZodNonOptional",(e,t)=>{qn.init(e,t),pn(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 s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>o1(a,e)):o1(s,e)}});function o1(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 H6=Ne("$ZodCatch",(e,t)=>{qn.init(e,t),pn(e._zod,"optin",()=>t.innerType._zod.optin),pn(e._zod,"optout",()=>t.innerType._zod.optout),pn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>ea(l,r,Jo()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>ea(a,r,Jo()))},input:n.value}),n.issues=[]),n)}}),G6=Ne("$ZodPipe",(e,t)=>{qn.init(e,t),pn(e._zod,"values",()=>t.in._zod.values),pn(e._zod,"optin",()=>t.in._zod.optin),pn(e._zod,"optout",()=>t.out._zod.optout),pn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>Ld(l,t.in,r)):Ld(a,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(a=>Ld(a,t.out,r)):Ld(s,t.out,r)}});function Ld(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const V6=Ne("$ZodReadonly",(e,t)=>{qn.init(e,t),pn(e._zod,"propValues",()=>t.innerType._zod.propValues),pn(e._zod,"values",()=>t.innerType._zod.values),pn(e._zod,"optin",()=>t.innerType._zod.optin),pn(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a1):a1(s)}});function a1(e){return e.value=Object.freeze(e.value),e}const K6=Ne("$ZodCustom",(e,t)=>{qi.init(e,t),qn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(a=>l1(a,n,r,e));l1(s,n,r,e)}});function l1(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(bc(s))}}class Z6{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 s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function W6(){return new Z6}const jd=W6();function Y6(e,t){return new e({type:"string",...wt(t)})}function X6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...wt(t)})}function u1(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...wt(t)})}function Q6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...wt(t)})}function J6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...wt(t)})}function eB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...wt(t)})}function tB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...wt(t)})}function nB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...wt(t)})}function rB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...wt(t)})}function iB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...wt(t)})}function sB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...wt(t)})}function oB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...wt(t)})}function aB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...wt(t)})}function lB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...wt(t)})}function uB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...wt(t)})}function cB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...wt(t)})}function fB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...wt(t)})}function dB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...wt(t)})}function pB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...wt(t)})}function hB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...wt(t)})}function mB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...wt(t)})}function gB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...wt(t)})}function bB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...wt(t)})}function yB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...wt(t)})}function vB(e,t){return new e({type:"string",format:"date",check:"string_format",...wt(t)})}function xB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...wt(t)})}function kB(e,t){return new e({type:"string",format:"duration",check:"string_format",...wt(t)})}function SB(e,t){return new e({type:"boolean",...wt(t)})}function wB(e){return new e({type:"unknown"})}function EB(e,t){return new e({type:"never",...wt(t)})}function lA(e,t){return new V3({check:"max_length",...wt(t),maximum:e})}function $p(e,t){return new K3({check:"min_length",...wt(t),minimum:e})}function uA(e,t){return new Z3({check:"length_equals",...wt(t),length:e})}function TB(e,t){return new W3({check:"string_format",format:"regex",...wt(t),pattern:e})}function _B(e){return new Y3({check:"string_format",format:"lowercase",...wt(e)})}function RB(e){return new X3({check:"string_format",format:"uppercase",...wt(e)})}function CB(e,t){return new Q3({check:"string_format",format:"includes",...wt(t),includes:e})}function AB(e,t){return new J3({check:"string_format",format:"starts_with",...wt(t),prefix:e})}function NB(e,t){return new e6({check:"string_format",format:"ends_with",...wt(t),suffix:e})}function Xc(e){return new t6({check:"overwrite",tx:e})}function OB(e){return Xc(t=>t.normalize(e))}function MB(){return Xc(e=>e.trim())}function IB(){return Xc(e=>e.toLowerCase())}function DB(){return Xc(e=>e.toUpperCase())}function zB(e,t,n){return new e({type:"array",element:t,...wt(n)})}function LB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...wt(n)})}function jB(e){const t=PB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(bc(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(bc(s))}},e(n.value,n)));return t}function PB(e,t){const n=new qi({check:"custom",...wt(t)});return n._zod.check=e,n}const $B=Ne("ZodISODateTime",(e,t)=>{m6.init(e,t),Tn.init(e,t)});function BB(e){return yB($B,e)}const FB=Ne("ZodISODate",(e,t)=>{g6.init(e,t),Tn.init(e,t)});function UB(e){return vB(FB,e)}const qB=Ne("ZodISOTime",(e,t)=>{b6.init(e,t),Tn.init(e,t)});function HB(e){return xB(qB,e)}const GB=Ne("ZodISODuration",(e,t)=>{y6.init(e,t),Tn.init(e,t)});function VB(e){return kB(GB,e)}const KB=(e,t)=>{eA.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>c3(e,n)},flatten:{value:n=>u3(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Oy,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Oy,2)}},isEmpty:{get(){return e.issues.length===0}}})},gi=Ne("ZodError",KB,{Parent:Error}),ZB=Wv(gi),WB=Yv(gi),YB=Rh(gi),XB=Ch(gi),QB=p3(gi),JB=h3(gi),e4=m3(gi),t4=g3(gi),n4=b3(gi),r4=y3(gi),i4=v3(gi),s4=x3(gi),Vn=Ne("ZodType",(e,t)=>(qn.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ua(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>yo(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>ZB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>YB(e,n,r),e.parseAsync=async(n,r)=>WB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>XB(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>QB(e,n,r),e.decode=(n,r)=>JB(e,n,r),e.encodeAsync=async(n,r)=>e4(e,n,r),e.decodeAsync=async(n,r)=>t4(e,n,r),e.safeEncode=(n,r)=>n4(e,n,r),e.safeDecode=(n,r)=>r4(e,n,r),e.safeEncodeAsync=async(n,r)=>i4(e,n,r),e.safeDecodeAsync=async(n,r)=>s4(e,n,r),e.refine=(n,r)=>e.check(Y4(n,r)),e.superRefine=n=>e.check(X4(n)),e.overwrite=n=>e.check(Xc(n)),e.optional=()=>d1(e),e.nullable=()=>p1(e),e.nullish=()=>d1(p1(e)),e.nonoptional=n=>q4(e,n),e.array=()=>N4(e),e.or=n=>I4([e,n]),e.and=n=>z4(e,n),e.transform=n=>h1(e,j4(n)),e.default=n=>B4(e,n),e.prefault=n=>U4(e,n),e.catch=n=>G4(e,n),e.pipe=n=>h1(e,n),e.readonly=()=>Z4(e),e.describe=n=>{const r=e.clone();return jd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return jd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return jd.get(e);const r=e.clone();return jd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),cA=Ne("_ZodString",(e,t)=>{Xv.init(e,t),Vn.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(TB(...r)),e.includes=(...r)=>e.check(CB(...r)),e.startsWith=(...r)=>e.check(AB(...r)),e.endsWith=(...r)=>e.check(NB(...r)),e.min=(...r)=>e.check($p(...r)),e.max=(...r)=>e.check(lA(...r)),e.length=(...r)=>e.check(uA(...r)),e.nonempty=(...r)=>e.check($p(1,...r)),e.lowercase=r=>e.check(_B(r)),e.uppercase=r=>e.check(RB(r)),e.trim=()=>e.check(MB()),e.normalize=(...r)=>e.check(OB(...r)),e.toLowerCase=()=>e.check(IB()),e.toUpperCase=()=>e.check(DB())}),o4=Ne("ZodString",(e,t)=>{Xv.init(e,t),cA.init(e,t),e.email=n=>e.check(X6(a4,n)),e.url=n=>e.check(nB(l4,n)),e.jwt=n=>e.check(bB(w4,n)),e.emoji=n=>e.check(rB(u4,n)),e.guid=n=>e.check(u1(c1,n)),e.uuid=n=>e.check(Q6(Pd,n)),e.uuidv4=n=>e.check(J6(Pd,n)),e.uuidv6=n=>e.check(eB(Pd,n)),e.uuidv7=n=>e.check(tB(Pd,n)),e.nanoid=n=>e.check(iB(c4,n)),e.guid=n=>e.check(u1(c1,n)),e.cuid=n=>e.check(sB(f4,n)),e.cuid2=n=>e.check(oB(d4,n)),e.ulid=n=>e.check(aB(p4,n)),e.base64=n=>e.check(hB(x4,n)),e.base64url=n=>e.check(mB(k4,n)),e.xid=n=>e.check(lB(h4,n)),e.ksuid=n=>e.check(uB(m4,n)),e.ipv4=n=>e.check(cB(g4,n)),e.ipv6=n=>e.check(fB(b4,n)),e.cidrv4=n=>e.check(dB(y4,n)),e.cidrv6=n=>e.check(pB(v4,n)),e.e164=n=>e.check(gB(S4,n)),e.datetime=n=>e.check(BB(n)),e.date=n=>e.check(UB(n)),e.time=n=>e.check(HB(n)),e.duration=n=>e.check(VB(n))});function fA(e){return Y6(o4,e)}const Tn=Ne("ZodStringFormat",(e,t)=>{kn.init(e,t),cA.init(e,t)}),a4=Ne("ZodEmail",(e,t)=>{o6.init(e,t),Tn.init(e,t)}),c1=Ne("ZodGUID",(e,t)=>{i6.init(e,t),Tn.init(e,t)}),Pd=Ne("ZodUUID",(e,t)=>{s6.init(e,t),Tn.init(e,t)}),l4=Ne("ZodURL",(e,t)=>{a6.init(e,t),Tn.init(e,t)}),u4=Ne("ZodEmoji",(e,t)=>{l6.init(e,t),Tn.init(e,t)}),c4=Ne("ZodNanoID",(e,t)=>{u6.init(e,t),Tn.init(e,t)}),f4=Ne("ZodCUID",(e,t)=>{c6.init(e,t),Tn.init(e,t)}),d4=Ne("ZodCUID2",(e,t)=>{f6.init(e,t),Tn.init(e,t)}),p4=Ne("ZodULID",(e,t)=>{d6.init(e,t),Tn.init(e,t)}),h4=Ne("ZodXID",(e,t)=>{p6.init(e,t),Tn.init(e,t)}),m4=Ne("ZodKSUID",(e,t)=>{h6.init(e,t),Tn.init(e,t)}),g4=Ne("ZodIPv4",(e,t)=>{v6.init(e,t),Tn.init(e,t)}),b4=Ne("ZodIPv6",(e,t)=>{x6.init(e,t),Tn.init(e,t)}),y4=Ne("ZodCIDRv4",(e,t)=>{k6.init(e,t),Tn.init(e,t)}),v4=Ne("ZodCIDRv6",(e,t)=>{S6.init(e,t),Tn.init(e,t)}),x4=Ne("ZodBase64",(e,t)=>{w6.init(e,t),Tn.init(e,t)}),k4=Ne("ZodBase64URL",(e,t)=>{T6.init(e,t),Tn.init(e,t)}),S4=Ne("ZodE164",(e,t)=>{_6.init(e,t),Tn.init(e,t)}),w4=Ne("ZodJWT",(e,t)=>{C6.init(e,t),Tn.init(e,t)}),E4=Ne("ZodBoolean",(e,t)=>{A6.init(e,t),Vn.init(e,t)});function T4(e){return SB(E4,e)}const _4=Ne("ZodUnknown",(e,t)=>{N6.init(e,t),Vn.init(e,t)});function f1(){return wB(_4)}const R4=Ne("ZodNever",(e,t)=>{O6.init(e,t),Vn.init(e,t)});function C4(e){return EB(R4,e)}const A4=Ne("ZodArray",(e,t)=>{M6.init(e,t),Vn.init(e,t),e.element=t.element,e.min=(n,r)=>e.check($p(n,r)),e.nonempty=n=>e.check($p(1,n)),e.max=(n,r)=>e.check(lA(n,r)),e.length=(n,r)=>e.check(uA(n,r)),e.unwrap=()=>e.element});function N4(e,t){return zB(A4,e,t)}const O4=Ne("ZodObject",(e,t)=>{D6.init(e,t),Vn.init(e,t),pn(e,"shape",()=>t.shape),e.keyof=()=>dA(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:f1()}),e.loose=()=>e.clone({...e._zod.def,catchall:f1()}),e.strict=()=>e.clone({...e._zod.def,catchall:C4()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>i3(e,n),e.safeExtend=n=>s3(e,n),e.merge=n=>o3(e,n),e.pick=n=>n3(e,n),e.omit=n=>r3(e,n),e.partial=(...n)=>a3(pA,e,n[0]),e.required=(...n)=>l3(hA,e,n[0])});function Qv(e,t){const n={type:"object",shape:e??{},...wt(t)};return new O4(n)}const M4=Ne("ZodUnion",(e,t)=>{z6.init(e,t),Vn.init(e,t),e.options=t.options});function I4(e,t){return new M4({type:"union",options:e,...wt(t)})}const D4=Ne("ZodIntersection",(e,t)=>{L6.init(e,t),Vn.init(e,t)});function z4(e,t){return new D4({type:"intersection",left:e,right:t})}const Iy=Ne("ZodEnum",(e,t)=>{j6.init(e,t),Vn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Iy({...t,checks:[],...wt(s),entries:a})},e.exclude=(r,s)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new Iy({...t,checks:[],...wt(s),entries:a})}});function dA(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Iy({type:"enum",entries:n,...wt(t)})}const L4=Ne("ZodTransform",(e,t)=>{P6.init(e,t),Vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ZC(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(bc(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(bc(l))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(a=>(n.value=a,n)):(n.value=s,n)}});function j4(e){return new L4({type:"transform",transform:e})}const pA=Ne("ZodOptional",(e,t)=>{$6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function d1(e){return new pA({type:"optional",innerType:e})}const P4=Ne("ZodNullable",(e,t)=>{B6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function p1(e){return new P4({type:"nullable",innerType:e})}const $4=Ne("ZodDefault",(e,t)=>{F6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function B4(e,t){return new $4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():XC(t)}})}const F4=Ne("ZodPrefault",(e,t)=>{U6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function U4(e,t){return new F4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():XC(t)}})}const hA=Ne("ZodNonOptional",(e,t)=>{q6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function q4(e,t){return new hA({type:"nonoptional",innerType:e,...wt(t)})}const H4=Ne("ZodCatch",(e,t)=>{H6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function G4(e,t){return new H4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const V4=Ne("ZodPipe",(e,t)=>{G6.init(e,t),Vn.init(e,t),e.in=t.in,e.out=t.out});function h1(e,t){return new V4({type:"pipe",in:e,out:t})}const K4=Ne("ZodReadonly",(e,t)=>{V6.init(e,t),Vn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Z4(e){return new K4({type:"readonly",innerType:e})}const W4=Ne("ZodCustom",(e,t)=>{K6.init(e,t),Vn.init(e,t)});function Y4(e,t={}){return LB(W4,e,t)}function X4(e){return jB(e)}function mA(e,t){var a;let n=null;const r=()=>(n===null&&(n=t()),n);return a=class{constructor(c){this.type=e,this.payload=c}static get schema(){return r()}},a.type=e,a}const gs=class gs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return gs.instance||(gs.instance=new gs),gs.instance}static subscribe(t){return gs.getInstance().subscribeToChanges(t)}static isDragActive(){return gs.getInstance().hasData()}notifyListeners(){for(const t of this.listeners)t()}subscribeToChanges(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setData(t){this.data!==t&&(this.data=t,this.notifyListeners())}getData(){return this.data}getValidatedData(t){if(!this.data)return null;for(const n of t)if(this.data instanceof n)return n.schema.safeParse(this.data.payload).success?this.data:null;return null}hasAnyClass(t){return this.data?t.some(n=>this.data instanceof n):!1}clearData(){this.data!==null&&(this.data=null,this.notifyListeners())}hasData(){return this.data!==null}};gs.instance=null;let pi=gs;function Mb(e,t){if(!t?.length||!e.dataTransfer)return!1;for(const n of e.dataTransfer.types)for(const r of t)if(n.toLowerCase()===r.toLowerCase())return!0;return!1}function Q4(e,t){const n=e.relatedTarget;if(n!==null&&t.contains(n))return!1;const r=t.defaultView;return r?e.clientX<=0||e.clientY<=0||e.clientX>=r.innerWidth||e.clientY>=r.innerHeight:!0}function J4(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,d=x.useRef(null),p=x.useRef(null),h=x.useRef(0),m=x.useRef(null),[g,y]=x.useState(!1),[k,S]=x.useState(!1),T=x.useRef(g);T.current=g;const E=x.useCallback(()=>{h.current=0,y(!1),S(!1)},[]),R=x.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);x.useEffect(()=>{if(!g)return;const I=p.current?.ownerDocument??document,$=()=>{R(),E()};return I.addEventListener("mousemove",$,!0),()=>{I.removeEventListener("mousemove",$,!0)}},[g,R,E]);const _=x.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});_.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const C=x.useRef(r);C.current=r;const A=x.useMemo(()=>Array.isArray(t)?t:[t],[t]),N=x.useCallback(I=>{if(p.current=I,d.current&&(d.current(),d.current=null),h.current=0,I!==null&&(y(!1),S(!1)),!I||n)return;const $=pi.getInstance(),H=P=>{if(h.current++,h.current===1){y(!0);const W=!n&&$.hasAnyClass(A),D=W||!n&&Mb(P,C.current);S(D);const B=W?$.getValidatedData(A):null;_.current.onDragEnter?.(P,B)}},L=P=>{h.current=Math.max(0,h.current-1),h.current===0&&(R(),E(),_.current.onDragLeave?.(P))},Z=P=>{const W=!n&&$.hasAnyClass(A),D=!W&&!n&&Mb(P,C.current);if(W||D){if(P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect=W?"move":"copy"),h.current===0){h.current=1,y(!0),S(!0);const B=W?$.getValidatedData(A):null;_.current.onDragEnter?.(P,B)}if(_.current.onDragOver&&m.current===null){const B=W?$.getValidatedData(A):null;m.current=requestAnimationFrame(()=>{m.current=null,_.current.onDragOver?.(P,B)})}}},K=P=>{if(P.preventDefault(),R(),E(),$.hasAnyClass(A)){const W=$.getValidatedData(A),{onDrop:D}=_.current;D&&(D(P,W),P.stopPropagation())}else if(Mb(P,C.current)){const{onDrop:W}=_.current;W&&(W(P,null),P.stopPropagation())}};I.addEventListener("dragenter",H),I.addEventListener("dragleave",L),I.addEventListener("dragover",Z),I.addEventListener("drop",K);const q=I.ownerDocument,z=()=>{(h.current!==0||T.current)&&(R(),E())},j=()=>z(),F=()=>z(),U=P=>{Q4(P,q)&&z()};q.addEventListener("drop",j,!0),q.addEventListener("dragend",F,!0),q.addEventListener("dragleave",U,!0),d.current=()=>{I.removeEventListener("dragenter",H),I.removeEventListener("dragleave",L),I.removeEventListener("dragover",Z),I.removeEventListener("drop",K),q.removeEventListener("drop",j,!0),q.removeEventListener("dragend",F,!0),q.removeEventListener("dragleave",U,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,A,E,R]);return x.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:N,isOver:g,canDrop:k,isDropBlocked:g&&!k}}function eF(){const e=x.useRef(void 0),t=x.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=x.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return x.useEffect(()=>t,[t]),x.useMemo(()=>({dispose:t,request:n}),[t,n])}function Dy({deltaX:e,deltaY:t,mapVerticalWheelToHorizontal:n,axisBehavior:r="dominant",mappedBehavior:s="dominant"}){if(n){let c;return s==="dominant"&&Math.abs(t)>Math.abs(e)?c=t:c=e||t,c===0?null:c}if(r==="raw")return e===0?null:e;const a=Math.abs(e),l=Math.abs(t);return e===0||a<=l?null:e}const tF="hover",nF=4,rF=20;class iF{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),d=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===d?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=d,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(rF,t));const n=this._trackSize-this._thumbSize,r=this._scrollSize-this._viewportSize;this._thumbRatio=r>0?n/r:0,this._thumbPosition=this._computeThumbPosition()}_computeThumbPosition(){return!this._isScrollable||this._thumbRatio===0?0:Math.round(this._scrollPosition*this._thumbRatio)}isScrollable(){return this._isScrollable}getThumbSize(){return this._thumbSize}getThumbPosition(){return this._thumbPosition}getScrollPositionFromThumbDelta(t,n){return!this._isScrollable||this._thumbRatio===0?0:Math.round(n+t/this._thumbRatio)}getScrollPositionFromTrackOffset(t){if(!this._isScrollable||this._thumbRatio===0)return 0;const n=Math.max(0,Math.min(this._trackSize-this._thumbSize,t-this._thumbSize/2));return Math.round(n/this._thumbRatio)}}const sl=class sl{constructor(t){this.thumbInsetStart=0,this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null,this.resizeObserver=null,this.boundOnScroll=null,this.boundOnThumbDown=null,this.boundOnTrackDown=null,this.boundOnWheel=null,this.dragCleanup=null,this.pendingSyncThumbFrame=null,this.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new iF,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1}get horizontal(){return this.direction==="horizontal"}attach(){this.attachScrollListener(),this.attachResizeObserver(),this.attachPointerEvents(),this.attachWheelForwarding(),this.scheduleSyncThumb()}detach(){this.detachScrollListener(),this.detachResizeObserver(),this.detachPointerEvents(),this.detachWheelForwarding(),this.pendingSyncThumbFrame!==null&&(cancelAnimationFrame(this.pendingSyncThumbFrame),this.pendingSyncThumbFrame=null),this.horizontalWheelResetTimer&&(clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=null),this.horizontalWheelAxisLock=null}attachScrollListener(){this.boundOnScroll=this.handleScroll.bind(this),this.viewport.addEventListener("scroll",this.boundOnScroll,{passive:!0})}detachScrollListener(){this.boundOnScroll&&(this.viewport.removeEventListener("scroll",this.boundOnScroll),this.boundOnScroll=null)}handleScroll(){const t=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop;if(this.state.setScrollPosition(t)){const n=this.state.getThumbPosition();this.thumb.style.transform=this.getThumbTransform(n)}}attachResizeObserver(){this.resizeObserver=new ResizeObserver(()=>this.scheduleSyncThumb()),this.resizeObserver.observe(this.viewport),this.resizeObserver.observe(this.content),this.resizeObserver.observe(this.scrollbar)}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null}scheduleSyncThumb(){this.pendingSyncThumbFrame===null&&(this.pendingSyncThumbFrame=requestAnimationFrame(()=>{this.pendingSyncThumbFrame=null,this.syncThumb()}))}syncThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)&&this.applyThumbStyle()}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const d=(this.horizontal?c.clientX:c.clientY)-n,p=this.state.getScrollPositionFromThumbDelta(d,r);this.horizontal?this.viewport.scrollLeft=p:this.viewport.scrollTop=p},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect(),r=this.horizontal?t.clientX-n.left:t.clientY-n.top-this.thumbInsetStart,s=this.state.getScrollPositionFromTrackOffset(r);this.horizontal?this.viewport.scrollLeft=s:this.viewport.scrollTop=s}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=Dy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!0,mappedBehavior:"prefer-horizontal"});else{if(this.horizontalWheelAxisLock||(this.horizontalWheelAxisLock=Math.abs(t.deltaX)>Math.abs(t.deltaY)?"x":"y"),this.horizontalWheelResetTimer&&clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=setTimeout(()=>{this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null},sl.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Dy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!1,axisBehavior:"raw"}),r===null){t.preventDefault(),t.stopPropagation();return}}if(r===null)return;const s=Math.max(0,Math.min(n,this.viewport.scrollLeft+r));this.viewport.scrollLeft=s,t.preventDefault(),t.stopPropagation()}else this.viewport.scrollTop+=t.deltaY},this.scrollbar.addEventListener("wheel",this.boundOnWheel,{passive:!1})}detachWheelForwarding(){this.boundOnWheel&&(this.scrollbar.removeEventListener("wheel",this.boundOnWheel),this.boundOnWheel=null)}getThumbTransform(t){return this.horizontal?`translateX(${t}px)`:`translateY(${t+this.thumbInsetStart}px)`}getThumbInsetStart(){if(this.horizontal)return 0;const t=getComputedStyle(this.scrollbar).getPropertyValue(sl.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};sl.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",sl.WHEEL_GESTURE_RESET_MS=150;let Bp=sl;const sF={base:{"--scrollbar-size":"ui-1ekbvf6","--scrollbar-inset":"ui-1logqu4","--scrollbar-thumb-top-offset":"ui-1fx8caa","--scroll-area-scroll-padding":"ui-8ddqcf",kVAEAm:"ui-1n2onr6",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",k1xSpc:"ui-rvj5dj",k52YG4:"ui-ypqxfk",$$css:!0}},Zu={base:{kJuA4N:"ui-175mniq",kAzted:"ui-2lwn1j",kskxy:"ui-mz0i5r",kaIpWk:"ui-1pjcqnp",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kaPefq:"ui-1fu52t7",kC2sXz:"ui-1ufbpdf",k9lH4S:"ui-3oazx1",kphCe6:"ui-19l4kpp",kvh3hx:"ui-1t1jukp",kacamN:"ui-1e4zzel",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0},horizontal:{kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kvh3hx:"ui-7p5m3t",kacamN:"ui-y5w88m",$$css:!0},both:{kXHlph:"ui-w2csxc",kORKVm:"ui-1odjw0f",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kZeWKH:"ui-ish69e",$$css:!0},maskGeometry:{kn1fP1:"ui-3b2oae",kJcbqH:"ui-16fucec",$$css:!0},mask:e=>[{kX1K2I:e!=null?"ui-wjwp01":e,kAExgp:e!=null?"ui-11jd449":e,$$css:!0},{"--x-maskImage":e??void 0,"--x-WebkitMaskImage":e??void 0}]};function oF(e,t,n,r){return`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}, black calc(100% - ${t}), rgba(0, 0, 0, ${r}) 100%)`}function aF(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}const Ib={base:{kB7OPa:"ui-9f619",kzqmXN:"ui-eq5yr9",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-193iq5w",kAzted:"ui-1us19tq",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",$$css:!0},horizontal:{kzqmXN:"ui-14atkfc",kZKoxP:"ui-g7h5cd",kXwgrk:"ui-1q0g3np",$$css:!0},both:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-1x1rfll",kZKoxP:"ui-t7dq6l",kXwgrk:"ui-dt5ytf",$$css:!0}},Lu={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1n327nk",k87sOh:"ui-16271f3",kCIrl2:"ui-zkb8sy",krVfgx:"ui-1c87l4o",kbCHJM:"ui-1t8mvi6",kzqmXN:"ui-790ffn",kfzvcC:"ui-67bb7w",k1xSpc:"ui-1lliihq ui-y36ywk",$$css:!0},horizontal:{k87sOh:"ui-80663w",kCIrl2:"ui-zkb8sy",krVfgx:"ui-1gncbth",kbCHJM:"ui-17roi93",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",$$css:!0},bothVertical:{krVfgx:"ui-1143y87",$$css:!0},bothHorizontal:{kCIrl2:"ui-1u4w851",$$css:!0},visibilityNever:{k1xSpc:"ui-1s85apg",$$css:!0}},Db={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-3m8u43",krVfgx:"ui-dd4er5",kbCHJM:"ui-u96u03",kAzted:"ui-4jlmx6",kzqmXN:"ui-790ffn",kaIpWk:"ui-1i4c3av",kWkggS:"ui-1m4ooaa ui-1kik0b9 ui-19p5jqy ui-gk890x",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w",k3aq6I:"ui-oww4n8",k1ekBW:"ui-1e8aii2",kIyJzY:"ui-1vaoic9 ui-144st5w",kAMwcw:"ui-1aiz5cx",$$css:!0},horizontal:{k87sOh:"ui-13vifvy",kCIrl2:"ui-wukr4l",krVfgx:"ui-1ey2m1c",kbCHJM:"ui-u96u03",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",kAzted:"ui-65nank",k7Eaqz:"ui-cbmsab",$$css:!0},hoverHidden:{kSiTet:"ui-g01cxk ui-4gyw5p ui-gorybd",$$css:!0}};function lF(){return sF.base}function uF({direction:e,masked:t}){return[Zu.base,e==="horizontal"?Zu.horizontal:null,e==="both"?Zu.both:null,t?Zu.maskGeometry:null]}function cF(e){return[Ib.base,e==="horizontal"?Ib.horizontal:null,e==="both"?Ib.both:null]}function m1({direction:e,orientation:t,visibility:n}){return[Lu.base,t==="horizontal"?Lu.horizontal:null,e==="both"&&t==="vertical"?Lu.bothVertical:null,e==="both"&&t==="horizontal"?Lu.bothHorizontal:null,n==="never"?Lu.visibilityNever:null]}function g1(e,t){return[Db.base,e==="horizontal"?Db.horizontal:null,t?Db.hoverHidden:null]}const fF=1e4,$d=5,gA=x.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:d,contentStyle:p,overlay:h,style:m,scrollbarVisibility:g=tF,isScrollbarRevealed:y=!1,direction:k="vertical",topFadeSize:S,bottomFadeSize:T,topFadeStartOpacity:E=0,bottomFadeStartOpacity:R=0,autoScrollToBottom:_=!1,scrollTrigger:C,autoScrollPauseTimeout:A=fF,onScrollStateChange:N,mapVerticalWheelToHorizontal:I=!1,scrollPadding:$=nF,scrollbarInset:H,onPointerEnter:L,onPointerLeave:Z,...K},q){const z=x.useRef(null),j=x.useRef(null),F=x.useRef(null),U=x.useRef(null),P=x.useRef(null),W=x.useRef(null),D=x.useRef(null),B=k!=="horizontal",G=k!=="vertical",O=I&&!B,[ie,te]=x.useState(!1),[ne,le]=x.useState(!1),[pe,ye]=x.useState(!1),Se=x.useRef(!1);Se.current=pe;const ze=x.useRef(0),he=x.useRef(0),Te=x.useRef(null),Re=x.useRef(null);x.useLayoutEffect(()=>{const Be=j.current,Ke=F.current;if(!Be||!Ke)return;const ht=[];if(B){const Xe=U.current,Y=P.current;Xe&&Y&&ht.push(new Bp({viewport:Be,content:Ke,scrollbar:Xe,thumb:Y,direction:"vertical",mapVerticalWheelToHorizontal:O}))}if(G){const Xe=W.current,Y=D.current;Xe&&Y&&ht.push(new Bp({viewport:Be,content:Ke,scrollbar:Xe,thumb:Y,direction:"horizontal",mapVerticalWheelToHorizontal:O}))}if(ht.length!==0){for(const Xe of ht)Xe.attach();return()=>{for(const Xe of ht)Xe.detach()}}},[B,G,O]);const Oe=x.useCallback(()=>{const Be=j.current;return Be?{scrollTop:Be.scrollTop,scrollHeight:Be.scrollHeight,clientHeight:Be.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ve=x.useCallback((Be=!1)=>{const Ke=j.current;Ke&&Ke.scrollTo({top:Ke.scrollHeight,behavior:Be?"smooth":"instant"})},[]),xe=x.useCallback((Be=!1)=>{const Ke=j.current;Ke&&Ke.scrollTo({top:0,behavior:Be?"smooth":"instant"})},[]),Me=x.useCallback(()=>{Re.current===null&&(Re.current=requestAnimationFrame(()=>{Re.current=null,!Se.current&&ve(!1)}))},[ve]),Ce=x.useCallback(()=>{_&&(Se.current||Me())},[_,Me]);x.useImperativeHandle(q,()=>({scrollToBottom:ve,scrollToTop:xe,requestAutoScroll:Ce,getScrollPosition:Oe,get rootElement(){return z.current},get viewportElement(){return j.current}}),[ve,xe,Ce,Oe]);const Pe=x.useCallback(()=>{const Be=j.current;if(!Be)return;const{scrollTop:Ke,scrollHeight:ht,clientHeight:Xe}=Be,{isAtTop:Y,isAtBottom:X}=aF({scrollTop:Ke,scrollHeight:ht,clientHeight:Xe,threshold:$d});te(!Y),le(!X),N?.({isAtBottom:X,isAtTop:Y}),X&&Se.current&&(ye(!1),Te.current&&(clearTimeout(Te.current),Te.current=null));const we=ht<he.current-$d,Ge=ht>he.current+$d,lt=Ke<ze.current-$d;lt&&!we&&!X&&_&&!Se.current&&(ye(!0),Te.current&&clearTimeout(Te.current),Te.current=setTimeout(()=>{ye(!1),Te.current=null},A)),Ge&&_&&!Se.current&&!X&&!lt&&Me(),we&&_&&!Se.current&&!X&&Me(),ze.current=Ke,he.current=ht},[N,_,A,Me]),ge=eF(),ce=x.useCallback(()=>{ge.request(Pe)},[ge,Pe]);x.useEffect(()=>{const Be=j.current,Ke=F.current;if(!Be)return;const ht=()=>{ce()};Be.addEventListener("scroll",ht,{passive:!0});const Xe=new ResizeObserver(Pe);return Xe.observe(Be),Ke&&Xe.observe(Ke),()=>{Be.removeEventListener("scroll",ht),Xe.disconnect(),ge.dispose()}},[Pe,ce,ge]),x.useEffect(()=>{C!==void 0&&_&&(Se.current||Me())},[C,_,Me]),x.useEffect(()=>{if(!B)return;const Be=j.current;if(!Be)return;const Ke=ht=>{const Xe=ht.deltaY;if(Xe===0)return;const Y=Be.scrollHeight-Be.clientHeight;if(Y<=0)return;const X=Be.scrollTop,we=X<=0&&Xe<0,Ge=X>=Y-.5&&Xe>0;we||Ge||ht.stopPropagation()};return Be.addEventListener("wheel",Ke,{passive:!0}),()=>Be.removeEventListener("wheel",Ke)},[B]),x.useEffect(()=>{if(!G)return;const Be=j.current;if(!Be)return;const Ke=Xe=>{const Y=Dy({deltaX:Xe.deltaX,deltaY:Xe.deltaY,mapVerticalWheelToHorizontal:O});if(Y===null)return;const X=Be.scrollWidth-Be.clientWidth;if(X<=0)return;const we=Be.scrollLeft;if(!(Y<0&&we<=0)&&!(Y>0&&we>=X-.5)){if(!O){Xe.stopPropagation();return}Xe.preventDefault(),Be.scrollLeft=we+Y}},ht=O?{passive:!1,capture:!0}:{passive:!0,capture:!0};return Be.addEventListener("wheel",Ke,ht),()=>Be.removeEventListener("wheel",Ke,ht)},[G,O]);const oe=S!==void 0||T!==void 0,re=S??24,_e=T??24,J=g==="hover",[fe,Ie]=x.useState(!1);x.useLayoutEffect(()=>{J&&Ie(z.current?.matches(":hover")??!1)},[J]);const Ue=x.useCallback(Be=>{Ie(!0),L?.(Be)},[L]),Ze=x.useCallback(Be=>{Ie(!1),Z?.(Be)},[Z]),Ye=J&&!fe&&!y;x.useEffect(()=>()=>{Te.current&&clearTimeout(Te.current),Re.current!==null&&(cancelAnimationFrame(Re.current),Re.current=null)},[]);const ot={"--scroll-area-scroll-padding":`${$}px`,...H!==void 0?{"--scrollbar-inset":`${H}px`}:void 0},it=En({rootClass:"ui-scroll-area",stylexStyles:[lF(),c],className:wn(oe&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...ot,...m}}),nt=En({rootClass:"ui-scroll-area__viewport",stylexStyles:[uF({direction:k,masked:oe}),d,oe?Zu.mask(oF(ie?`${re}px`:"0px",ne?`${_e}px`:"0px",E,R)):null],className:l}),vt=En({rootClass:"ui-scroll-area__content",stylexStyles:[cF(k),p]}),st=En({rootClass:"ui-scroll-area__scrollbar",stylexStyles:m1({direction:k,orientation:"vertical",visibility:g})}),xt=Nn(g1("vertical",Ye)),We=En({rootClass:"ui-scroll-area__scrollbar",stylexStyles:m1({direction:k,orientation:"horizontal",visibility:g})}),Ot=Nn(g1("horizontal",Ye));return v.jsxs("div",{ref:z,className:it.className,style:it.style,"data-scroll-padding":$,"data-visibility":g,"data-direction":k,...K,onPointerEnter:J?Ue:L,onPointerLeave:J?Ze:Z,children:[v.jsx("div",{ref:j,className:nt.className,style:nt.style,children:v.jsx("div",{ref:F,className:vt.className,style:vt.style,children:t})}),h,B&&v.jsx("div",{ref:U,className:st.className,style:st.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:v.jsx("div",{ref:P,className:xt.className,style:xt.style,"data-orientation":"vertical"})}),G&&v.jsx("div",{ref:W,className:We.className,style:We.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:v.jsx("div",{ref:D,className:Ot.className,style:Ot.style,"data-orientation":"horizontal"})})]})}),Fp=x.createContext(!1);function bA({children:e,dismiss:t}){const n=x.use(Fp);return v.jsx(Fp.Provider,{value:n||t,children:e})}function zy(e,t,n){const[r,s]=x.useState(t),a=e!==void 0?e:r,l=x.useCallback(c=>{const d=typeof c=="function"?c(a):c;e===void 0&&s(d),n?.(d)},[e,a,n]);return[a,l]}const zb={fontFamily:{sans:"var(--cursor-font-family, var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif))",mono:"var(--cursor-font-family-mono, var(--monaco-monospace-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace))"},scrollbar:{verticalSize:"var(--vscode-scrollbar-vertical-size, 14px)",horizontalSize:"var(--vscode-scrollbar-horizontal-size, 12px)",thumbBackground:"var(--vscode-scrollbarSlider-background)",thumbHoverBackground:"var(--vscode-scrollbarSlider-hoverBackground)",thumbActiveBackground:"var(--vscode-scrollbarSlider-activeBackground)"},syntax:{foreground:"#d6d6dd",background:"#181818",keyword:"#82d2ce",string:"#e394dc",function:"#efb080",number:"#ebc88d",comment:"#E4E4E45E",constant:"#f8c762",parameter:"#d6d6dd",punctuation:"#d6d6dd",link:"#87c3ff",stringExpression:"#e394dc"}},dF={1:1,2:2},Ly={instant:50,fast:100,normal:150,slow:200,slower:300},yA={default:"ease",in:"ease-in",out:"ease-out",inOut:"ease-in-out",inStrong:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",outStrong:"cubic-bezier(0.165, 0.84, 0.44, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},pF={"ne-0.25":-1,"ne-0.5":-2,"ne-0.75":-3,"ne-1":-4,"ne-1.25":-5,"ne-1.5":-6,"ne-1.75":-7,"ne-2":-8,"ne-2.25":-9,"ne-2.5":-10,"ne-2.75":-11,"ne-3":-12,"ne-3.25":-13,"ne-3.5":-14,"ne-3.75":-15,"ne-4":-16,"ne-4.25":-17,"ne-4.5":-18,"ne-4.75":-19,"ne-5":-20,"0.25":1,"0.5":2,"0.75":3,1:4,"1.25":5,"1.5":6,"1.75":7,2:8,"2.25":9,"2.5":10,"2.75":11,3:12,"3.25":13,"3.5":14,"3.75":15,4:16,"4.25":17,"4.5":18,"4.75":19,5:20,"5.5":22,6:24,"6.5":26,7:28,"7.5":30,8:32,"8.5":34,9:36,"9.5":38,10:40,11:44,12:48,13:52,14:56,15:60,16:64,17:68,18:72,19:76,20:80},hF={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,full:9999},mF={xs:20,sm:24,base:28,lg:32},gF={xs:11,sm:12,base:13,lg:14},bF={xs:14,sm:16,base:18,lg:20},yF={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},vF=.98,xF=2,b1={open:Ly.fast,close:Ly.fast},kF=yA.outQuint;function vA(e){const[t,n]=e.split("-");switch(t){case"top":case"right":case"bottom":case"left":return{side:t,alignment:n==="start"||n==="end"?n:void 0};default:throw new Error(`Unsupported floating placement: ${e}`)}}function SF(e){const{side:t,alignment:n}=vA(e);switch(t){case"top":return`${y1(n)} bottom`;case"right":return`left ${v1(n)}`;case"bottom":return`${y1(n)} top`;case"left":return`right ${v1(n)}`}}function wF(e,t={}){const{side:n}=vA(e),r=t.offset??xF,s=t.scale??vF;switch(n){case"top":return`translate3d(0, ${r}px, 0) scale(${s})`;case"right":return`translate3d(-${r}px, 0, 0) scale(${s})`;case"bottom":return`translate3d(0, -${r}px, 0) scale(${s})`;case"left":return`translate3d(${r}px, 0, 0) scale(${s})`}}function EF(e,t){return{opacity:0,transform:wF(e,t)}}function TF(e){return{transformOrigin:SF(e),transitionTimingFunction:kF}}function _F({closeDuration:e=b1.close,transform:t}={}){return{duration:{open:b1.open,close:e},initial:({placement:n})=>EF(n,t),common:({placement:n})=>TF(n)}}function y1(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function v1(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function RF(){const e=x.useRef(!0),t=x.useRef(void 0),n=x.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=x.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return x.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),x.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const CF=300,xA=x.createContext(null);function kA({children:e}){const[t,n]=x.useState(null),r=RF(),s=x.useCallback(c=>{r.cancel(),n(c)},[r]),a=x.useCallback(c=>{r.schedule(()=>{n(d=>d===c?null:d)},CF)},[r]),l=x.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return v.jsx(xA.Provider,{value:l,children:e})}function AF(e,t){const n=x.useContext(xA),r=n?.markOpen,s=n?.markClosed;return x.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const Ml="data-ui-menu-item-region",SA=x.createContext("body");function nc({value:e,children:t}){return v.jsx(SA.Provider,{value:e,children:t})}function Qc(){return x.useContext(SA)}const NF='[role="menuitem"]',x1=["pointermove","mousemove"];function wA(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="Home"||e.key==="End")return!0;if(!e.ctrlKey||e.metaKey)return!1;const t=e.key.toLowerCase();return t==="n"||t==="p"}function OF(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function MF(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Ml)===t)return r;return null}function EA(e,t,n){queueMicrotask(()=>{const r=MF(e,t);n(r??null)})}function TA(e,t){if(!(e instanceof Element))return null;const n=e.closest(NF);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function IF(e,t){if(!e)return()=>{};for(const n of x1)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of x1)e.removeEventListener(n,t)}}function k1({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=OF(r,n);if(!a)return!1;e.preventDefault(),e.stopPropagation();const l=document.activeElement===e.currentTarget;return a.focus(),a.dispatchEvent(new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0})),l&&document.activeElement===a&&s?.(),!0}function _A(){const[e,t]=x.useState(!0),n=x.useCallback(()=>{t(!1)},[]),r=x.useCallback(()=>{t(!0)},[]),s=x.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const DF=50;function zF(e,t){x.useLayoutEffect(()=>{if(!e)return;const n=t.current;if(!(n instanceof HTMLElement))return;const r=n.closest('[role="menu"]');if(r!=null)return r.style.pointerEvents="none",n.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents=""}},[e,t])}function LF(){return{name:"bottomAnchor",fn({y:e,placement:t,rects:n,elements:r}){if(!t.startsWith("top"))return{};const s=r.floating.offsetParent,a=s===document.body&&window.getComputedStyle(s).position==="static";return{data:{bottom:(!s||s===document.documentElement||a?document.documentElement.clientHeight||window.innerHeight:s.clientHeight)-e-n.floating.height}}}}}function Nh(e=200){const t=x.useRef(0);return x.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),x.useCallback(n=>{const r=n.target,s=r instanceof Node?r.ownerDocument:document,a=Date.now(),l=s?.hasFocus()??document.hasFocus(),c=a>=t.current;return l&&c},[])}const jF={open:0,close:0},PF={opacity:1,transform:"none"},Jv=x.createContext(null);function Ci(){const e=x.useContext(Jv);if(!e)throw new Error("Menu components must be used within <Menu>");return e}function $F({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:d=!0,closeOnSelect:p,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:g=!0,focusItemOnOpen:y=!1,virtualFocus:k=!1,shouldKeepOpenDuringDrag:S=!1,lockPositionWhileOpen:T=!1,enableClick:E=!0,strategy:R}){const _=MC(),[C,A]=zy(t,n,r),[N,I]=x.useState(""),$=x.useRef(null),[H,L]=x.useState(!1),[Z,K]=x.useState(!1),[q,z]=zy(s,null,a),{focusItemOnHoverEnabled:j,markKeyboardNavigation:F,markPointerNavigation:U,resetFocusItemOnHover:P}=_A(),W=x.useRef([]),D=x.useRef([]),B=x.useRef(null),G=x.useCallback(_e=>{A(_e),_e?(I(""),B.current=null):z(null),P()},[P,A,z]),O=x.useRef(!1);x.useEffect(()=>{const _e=O.current;O.current=C,!_e&&C&&I(""),_e!==C&&P()},[C,P]);const{refs:ie,floatingStyles:te,middlewareData:ne,context:le,update:pe}=BC({nodeId:_,open:C,onOpenChange:G,placement:l,strategy:R,middleware:[Mv(c),...d?[Dv()]:[],Iv(),zv({padding:8,apply({availableHeight:_e,elements:J}){J.floating.style.setProperty("--ui-menu-available-height",`${Math.max(0,Math.floor(_e))}px`)}}),LF()],whileElementsMounted:T?void 0:Rp,transform:!1}),ye=DC(le,{enabled:Z,delay:{open:75},handleClose:KC({blockPointerEvents:!0,requireIntent:!1})}),Se=PC(le,{enabled:E&&!Z}),ze=Nh(),he=x.useCallback(_e=>S&&pi.getInstance().hasData()?!1:ze(_e),[S,ze]),Te=$C(le,{outsidePressEvent:"click",outsidePress:he}),Re=qC(le,{role:"menu"}),Oe=UC(le,{listRef:W,activeIndex:q,onNavigate:z,loop:!1,virtual:k||H,focusItemOnOpen:y,focusItemOnHover:j}),ve=GC(le,{listRef:D,activeIndex:q,onMatch:H?void 0:z,enabled:!H}),{getReferenceProps:xe,getFloatingProps:Me,getItemProps:Ce}=FC([ye,Se,Te,Re,Oe,ve]),Pe=x.useCallback(_e=>({...xe(_e),ref:ie.setReference,"aria-haspopup":"menu","aria-expanded":C}),[xe,ie.setReference,C]),ge=m?{duration:jF,initial:PF}:_F(h?{closeDuration:0}:void 0),{isMounted:ce,styles:oe}=HC(le,ge),re=x.useMemo(()=>({isOpen:C,isMounted:ce,setIsOpen:A,activeIndex:q,setActiveIndex:z,markKeyboardNavigation:F,markPointerNavigation:U,virtualFocus:k,searchValue:N,setSearchValue:I,hasSearchInput:H,setHasSearchInput:L,enableHover:Z,setHasHoverTrigger:K,closeOnSelect:p,returnFocusOnSelect:g,nodeId:_,listRef:W,labelsRef:D,searchInputRef:$,refs:ie,floatingStyles:te,middlewareData:ne,transitionStyles:oe,context:le,updateFloating:pe,getReferenceProps:xe,getFloatingProps:Me,getItemProps:Ce,getTriggerProps:Pe,dismissCauseRef:B,shouldAllowPointerInteraction:he}),[C,ce,A,q,z,F,U,k,N,H,Z,p,g,_,ie,te,ne,oe,le,pe,xe,Me,Ce,Pe,he]);return v.jsx(IC,{id:_,children:v.jsx(Jv.Provider,{value:re,children:v.jsx(kA,{children:e})})})}const RA=x.createContext(null);function Jc(){const e=x.useContext(RA);if(!e)throw new Error("MenuItem must be used within Menu.Content or Menu.SubContent");return e}function CA({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=x.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return v.jsx(RA.Provider,{value:c,children:e})}const AA=x.createContext(void 0);function Oh(e){const t=x.useContext(AA);if(t===void 0&&!e)throw new Error(Xn(72));return t}const BF={...aj,disabled:rt(e=>e.disabled),instantType:rt(e=>e.instantType),isInstantPhase:rt(e=>e.isInstantPhase),trackCursorAxis:rt(e=>e.trackCursorAxis),disableHoverablePopup:rt(e=>e.disableHoverablePopup),lastOpenChangeReason:rt(e=>e.openChangeReason),closeOnClick:rt(e=>e.closeOnClick),closeDelay:rt(e=>e.closeDelay),hasViewport:rt(e=>e.hasViewport)};class Mh extends ZR{constructor(t){super({...FF(),...t},{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Pv},BF)}setOpen=(t,n)=>{const r=n.reason,s=r===ui,a=t&&r===up,l=!t&&(r===hl||r===wv);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,n);const c=()=>{const d={open:t,openChangeReason:r};a?d.instantType="focus":l?d.instantType="dismiss":r===ui&&(d.instantType=void 0);const p=n.trigger?.id??null;(p||t)&&(d.activeTriggerId=p,d.activeTriggerElement=n.trigger??null),this.update(d)};s?Ri.flushSync(c):c()};static useStore(t,n){const r=wr(()=>new Mh(n)).current,s=t??r,a=uj({popupStore:s,onOpenChange:s.setOpen});return s.state.floatingRootContext=a,s}}function FF(){return{...oj(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const NA=VR(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:p,handle:h,triggerId:m,defaultTriggerId:g=null,children:y}=t,k=Mh.useStore(h?.store,{open:r,openProp:s,activeTriggerId:g,triggerIdProp:m});rC(()=>{s===void 0&&k.state.open===!1&&r===!0&&k.update({open:!0,activeTriggerId:g})}),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",d),k.useContextCallback("onOpenChangeComplete",p);const S=k.useState("open"),T=!n&&S,E=k.useState("activeTriggerId"),R=k.useState("payload");k.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),He(()=>{S&&n&&k.setOpen(!1,_t(uL))},[S,n,k]),k.useSyncedValue("disabled",n),rj(k);const{forceUnmount:_,transitionStatus:C}=ij(T,k),A=k.select("floatingRootContext"),N=k.useState("isInstantPhase"),I=k.useState("instantType"),$=k.useState("lastOpenChangeReason"),H=x.useRef(null);He(()=>{C==="ending"&&$===Ss||C!=="ending"&&N?(I!=="delay"&&(H.current=I),k.set("instantType","delay")):H.current!==null&&(k.set("instantType",H.current),H.current=null)},[C,N,$,I,k]),He(()=>{T&&E==null&&k.set("payload",void 0)},[k,E,T]);const L=x.useCallback(()=>{k.setOpen(!1,UF(k,my))},[k]);x.useImperativeHandle(c,()=>({unmount:_,close:L}),[_,L]);const Z=DR(A,{enabled:!n,referencePress:()=>k.select("closeOnClick")}),K=t2(A,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:q,getFloatingProps:z,getTriggerProps:j}=JR([Z,K]),F=x.useMemo(()=>q(),[q]),U=x.useMemo(()=>j(),[j]),P=x.useMemo(()=>z(),[z]);return k.useSyncedValues({activeTriggerProps:F,inactiveTriggerProps:U,popupProps:P}),v.jsx(AA.Provider,{value:k,children:typeof y=="function"?y({payload:R}):y})});function UF(e,t){const n=_t(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const qF=x.createContext(void 0);function HF(){return x.useContext(qF)}let GF=(function(e){return e[e.popupOpen=kp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const VF=600,OA=V2(function(t,n){const{className:r,render:s,handle:a,payload:l,disabled:c,delay:d,closeOnClick:p=!0,closeDelay:h,id:m,style:g,...y}=t,k=Oh(!0),S=a?.store??k;if(!S)throw new Error(Xn(82));const T=dh(m),E=S.useState("isTriggerActive",T),R=S.useState("isOpenedByTrigger",T),_=S.useState("floatingRootContext"),C=x.useRef(null),A=d??VF,N=h??0,{registerTrigger:I,isMountedByThisTrigger:$}=nj(T,C,S,{payload:l,closeOnClick:p,closeDelay:N}),H=HF(),{delayRef:L,isInstantPhase:Z,hasProvider:K}=xL(_,{open:R});S.useSyncedValue("isInstantPhase",Z);const q=S.useState("disabled"),z=c??q,j=S.useState("trackCursorAxis"),F=S.useState("disableHoverablePopup"),U=pj(_,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!F&&j!=="both"?Sj():null,restMs(){const G=H?.delay,O=typeof L.current=="object"?L.current.open:void 0;let ie=A;return K&&(O!==0?ie=d??G??A:ie=0),ie},delay(){const G=typeof L.current=="object"?L.current.close:void 0;let O=N;return h==null&&K&&(O=G),{close:O}},triggerElementRef:C,isActiveTrigger:E,isClosing:()=>S.select("transitionStatus")==="ending"}),P=cj(_,{enabled:!z}).reference,W={open:R},D=S.useState("triggerProps",$);return xn("button",t,{state:W,ref:[n,I,C],props:[U,P,D,{onPointerDown(){S.set("closeOnClick",p)},id:T,[GF.triggerDisabled]:z?"":void 0},y],stateAttributesMapping:Wz})}),MA=x.createContext(void 0);function KF(){const e=x.useContext(MA);if(e===void 0)throw new Error(Xn(70));return e}const ZF=x.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...d}=t,{portalNode:p,portalSubtree:h}=IR({container:s,ref:n,componentProps:t,elementProps:d});return!h&&!p?null:v.jsxs(x.Fragment,{children:[h,p&&Ri.createPortal(r,p)]})}),IA=x.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Oh().useState("mounted")||r?v.jsx(MA.Provider,{value:r,children:v.jsx(ZF,{ref:n,...s})}):null}),DA=x.createContext(void 0);function WF(){const e=x.useContext(DA);if(e===void 0)throw new Error(Xn(71));return e}const YF=x.createContext(void 0);function ex(){return x.useContext(YF)?.direction??"ltr"}const XF=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:p,padding:h=0,offsetParent:m="real"}=ws(e,t)||{};if(p==null)return{};const g=mR(h),y={x:n,y:r},k=Cv(s),S=Rv(k),T=await l.getDimensions(p),E=k==="y",R=E?"top":"left",_=E?"bottom":"right",C=E?"clientHeight":"clientWidth",A=a.reference[S]+a.reference[k]-y[k]-a.floating[S],N=y[k]-a.reference[k],I=m==="real"?await l.getOffsetParent?.(p):c.floating;let $=c.floating[C]||a.floating[S];(!$||!await l.isElement?.(I))&&($=c.floating[C]||a.floating[S]);const H=A/2-N/2,L=$/2-T[S]/2-1,Z=Math.min(g[R],L),K=Math.min(g[_],L),q=Z,z=$-T[S]-K,j=$/2-T[S]/2+H,F=vy(q,j,z),U=!d.arrow&&mo(s)!=null&&j!==F&&a.reference[S]/2-(j<q?Z:K)-T[S]/2<0,P=U?j<q?j-q:j-z:0;return{[k]:y[k]+P,data:{[k]:F,centerOffset:j-F-P,...U&&{alignmentOffset:P}},reset:U}}}),QF=(e,t)=>({...XF(e),options:[e,t]}),JF={name:"hide",async fn(e){const{width:t,height:n,x:r,y:s}=e.rects.reference,a=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:(await $2().fn(e)).data?.referenceHidden||a}}}},hp={sideX:"left",sideY:"top"},eU={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,d=yn(s),p=d.getComputedStyle(s);if(!(p.transitionDuration!=="0s"&&p.transitionDuration!==""))return{x:t,y:n,data:hp};const m=await a.getOffsetParent?.(s);let g={width:0,height:0};if(l==="fixed"&&d?.visualViewport)g={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){const R=Ft(s);g={width:R.documentElement.clientWidth,height:R.documentElement.clientHeight}}else await a.isElement?.(m)&&(g=await a.getDimensions(m));const y=jr(c);let k=t,S=n;y==="left"&&(k=g.width-(t+r.width)),y==="top"&&(S=g.height-(n+r.height));const T=y==="left"?"right":hp.sideX,E=y==="top"?"bottom":hp.sideY;return{x:k,y:S,data:{sideX:T,sideY:E}}}};function zA(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 S1(e,t,n){const{rects:r,placement:s}=e;return{side:zA(t,jr(s),n),align:mo(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function LA(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:p=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,keepMounted:g=!1,floatingRootContext:y,mounted:k,collisionAvoidance:S,shiftCrossAxis:T=!1,nodeId:E,adaptiveOrigin:R,lazyFlip:_=!1,externalTree:C}=e,[A,N]=x.useState(null);!k&&A!==null&&N(null);const I=S.side||"flip",$=S.align||"flip",H=S.fallbackAxisSide||"end",L=typeof t=="function"?t:void 0,Z=Ve(L),K=L?Z:t,q=Un(t),z=Un(k),F=ex()==="rtl",U=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":F?"left":"right","inline-start":F?"right":"left"}[r],P=a==="center"?U:`${U}-${a}`;let W=d;const D=1,B=r==="bottom"?D:0,G=r==="top"?D:0,O=r==="right"?D:0,ie=r==="left"?D:0;typeof W=="number"?W={top:W+B,right:W+ie,bottom:W+G,left:W+O}:W&&(W={top:(W.top||0)+B,right:(W.right||0)+ie,bottom:(W.bottom||0)+G,left:(W.left||0)+O});const te={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:W},ne=x.useRef(null),le=Un(s),pe=Un(l),ze=[Mv(We=>{const Ot=S1(We,r,F),Be=typeof le.current=="function"?le.current(Ot):le.current,Ke=typeof pe.current=="function"?pe.current(Ot):pe.current;return{mainAxis:Be,crossAxis:Ke,alignmentAxis:Ke}},[typeof s!="function"?s:0,typeof l!="function"?l:0,F,r])],he=$==="none"&&I!=="shift",Te=!he&&(p||T||I==="shift"),Re=I==="none"?null:Dv({...te,padding:{top:W.top+D,right:W.right+D,bottom:W.bottom+D,left:W.left+D},mainAxis:!T&&I==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:H}),Oe=he?null:Iv(We=>{const Ot=Ft(We.elements.floating).documentElement;return{...te,rootBoundary:T?{x:0,y:0,width:Ot.clientWidth,height:Ot.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:Te,limiter:p||T?void 0:P2(Be=>{if(!ne.current)return{};const{width:Ke,height:ht}=ne.current.getBoundingClientRect(),Xe=di(jr(Be.placement)),Y=Xe==="y"?Ke:ht,X=Xe==="y"?W.left+W.right:W.top+W.bottom;return{offset:Y/2+X/2}})}},[te,p,T,W,$]);I==="shift"||$==="shift"||a==="center"?ze.push(Oe,Re):ze.push(Re,Oe),ze.push(zv({...te,apply({elements:{floating:We},availableWidth:Ot,availableHeight:Be,rects:Ke}){if(!z.current)return;const ht=We.style;ht.setProperty("--available-width",`${Ot}px`),ht.setProperty("--available-height",`${Be}px`);const Xe=yn(We).devicePixelRatio||1,{x:Y,y:X,width:we,height:Ge}=Ke.reference,lt=(Math.round((Y+we)*Xe)-Math.round(Y*Xe))/Xe,St=(Math.round((X+Ge)*Xe)-Math.round(X*Xe))/Xe;ht.setProperty("--anchor-width",`${lt}px`),ht.setProperty("--anchor-height",`${St}px`)}}),QF(()=>({element:ne.current||Ft(ne.current).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(We){const{elements:Ot,middlewareData:Be,placement:Ke,rects:ht,y:Xe}=We,Y=jr(Ke),X=di(Y),we=ne.current,Ge=Be.arrow?.x||0,lt=Be.arrow?.y||0,St=we?.clientWidth||0,$e=we?.clientHeight||0,Le=Ge+St/2,qe=lt+$e/2,Wt=Math.abs(Be.shift?.y||0),tt=ht.reference.height/2,Dt=typeof s=="function"?s(S1(We,r,F)):s,Kn=Wt>Dt,Qn={top:`${Le}px calc(100% + ${Dt}px)`,bottom:`${Le}px ${-Dt}px`,left:`calc(100% + ${Dt}px) ${qe}px`,right:`${-Dt}px ${qe}px`}[Y],_n=`${Le}px ${ht.reference.y+tt-Xe}px`;return Ot.floating.style.setProperty("--transform-origin",Te&&X==="y"&&Kn?_n:Qn),{}}},JF,R),He(()=>{!k&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[k,y]);const ve=x.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:xe,elements:Me,x:Ce,y:Pe,middlewareData:ge,update:ce,placement:oe,context:re,isPositioned:_e,floatingStyles:J}=lj({rootContext:y,open:g?k:void 0,placement:P,middleware:ze,strategy:n,whileElementsMounted:g?void 0:(...We)=>Rp(...We,ve),nodeId:E,externalTree:C}),{sideX:fe,sideY:Ie}=ge.adaptiveOrigin||hp,Ue=_e?n:"fixed",Ze=x.useMemo(()=>{const We=R?{position:Ue,[fe]:Ce,[Ie]:Pe}:{position:Ue,...J};return _e||(We.opacity=0),We},[R,Ue,fe,Ce,Ie,Pe,J,_e]),Ye=x.useRef(null);He(()=>{if(!k)return;const We=q.current,Ot=typeof We=="function"?We():We,Ke=(w1(Ot)?Ot.current:Ot)||null||null;Ke!==Ye.current&&(xe.setPositionReference(Ke),Ye.current=Ke)},[k,xe,K,q]),x.useEffect(()=>{if(!k)return;const We=q.current;typeof We!="function"&&w1(We)&&We.current!==Ye.current&&(xe.setPositionReference(We.current),Ye.current=We.current)},[k,xe,K,q]),x.useEffect(()=>{if(g&&k&&Me.domReference&&Me.floating)return Rp(Me.domReference,Me.floating,ce,ve)},[g,k,Me,ce,ve]);const ot=jr(oe),it=zA(r,ot,F),nt=mo(oe)||"center",vt=!!ge.hide?.referenceHidden;He(()=>{_&&k&&_e&&N(ot)},[_,k,_e,ot]);const st=x.useMemo(()=>({position:"absolute",top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),xt=ge.arrow?.centerOffset!==0;return x.useMemo(()=>({positionerStyles:Ze,arrowStyles:st,arrowRef:ne,arrowUncentered:xt,side:it,align:nt,physicalSide:ot,anchorHidden:vt,refs:xe,context:re,isPositioned:_e,update:ce}),[Ze,st,ne,xt,it,nt,ot,vt,xe,re,_e,ce])}function w1(e){return e!=null&&"current"in e}function tx(e){return e==="starting"?Mz:hr}function jA(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const d={...n};return c&&(d.pointerEvents="none"),xn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:d},tx(r),s],stateAttributesMapping:sh})}const PA=x.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:T=zz,style:E,...R}=t,_=Oh(),C=KF(),A=_.useState("open"),N=_.useState("mounted"),I=_.useState("trackCursorAxis"),$=_.useState("disableHoverablePopup"),H=_.useState("floatingRootContext"),L=_.useState("instantType"),Z=_.useState("transitionStatus"),K=_.useState("hasViewport"),q=LA({anchor:a,positionMethod:l,floatingRootContext:H,mounted:N,side:c,sideOffset:p,align:d,alignOffset:h,collisionBoundary:m,collisionPadding:g,sticky:k,arrowPadding:y,disableAnchorTracking:S,keepMounted:C,collisionAvoidance:T,adaptiveOrigin:K?eU:void 0}),z=x.useMemo(()=>({open:A,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:I!=="none"?"tracking-cursor":L}),[A,q.side,q.align,q.anchorHidden,I,L]),j=jA(t,z,{styles:q.positionerStyles,transitionStatus:Z,props:R,refs:[n,_.useStateSetter("positionerElement")],hidden:!N,inert:!A||I==="both"||$});return v.jsx(DA.Provider,{value:q,children:j})}),tU={...sh,...oa},$A=x.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Oh(),{side:d,align:p}=WF(),h=c.useState("open"),m=c.useState("instantType"),g=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext");aa({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=c.useState("disabled"),T=c.useState("closeDelay");return fj(k,{enabled:!S,closeDelay:T}),xn("div",t,{state:{open:h,side:d,align:p,instant:m,transitionStatus:g},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,tx(g),l],stateAttributesMapping:tU})});function nU(e){const[t,n]=x.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function E1(e){const t=Er(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=It(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(bl(n)!==a||bl(r)!==l)&&(n=a,r=l),{width:n,height:r}}class rU{constructor(){this.store=new Mh}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Xn(81,t));this.store.setOpen(!0,_t(my,void 0,n))}close(){this.store.setOpen(!1,_t(my,void 0,void 0))}get isOpen(){return this.store.state.open}}function iU(){return new rU}const sU={root:{k6sLGO:"ui-1q1rmc8",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-6o7n8i",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",kSiTet:"ui-1hc1fzr ui-1hw7zpd ui-iyypsa",k3aq6I:"ui-1c071of ui-17ll0io ui-2um2vg ui-1ahjy9u ui-s2p038 ui-fld6f8 ui-14hpypv ui-1296zyv ui-1h7md5i",$$css:!0}},BA=sU.root,FA={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},surface:{kB7OPa:"ui-9f619",kWkggS:"ui-f1vpex",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-2kampu",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-hnkhp4",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1jfuf7k",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1l09f48",kaIpWk:"ui-1m7fhj7",kGVxlE:"ui-14cu5b6",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},UA=FA.positioner,qA=FA.surface,HA="top",nx=300,Ih=100;function oU(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function aU(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function lU(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function rx(e,t,n){const{side:r,align:s}=x.useMemo(()=>oU(e),[e]),{sideOffset:a,alignOffset:l}=x.useMemo(()=>aU(t),[t]),c=x.useMemo(()=>lU(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c}}function T1(e){const t=x.useRef(e);return x.useLayoutEffect(()=>{t.current=e},[e]),t}function uU(e,t){const n=T1(e),r=T1(t);return x.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const d=c.target,p=a.defaultView?.Element;if(p===void 0||!(d instanceof p))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&d.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const cU=Ih;function GA(e,t){return t?Math.max(e,cU):e}const fU={base:{kzqmXN:"ui-ezivpi",kLKAdn:"ui-uve7l6 ui-6qmaip",kpe85a:"ui-1yxiud8 ui-1qgu5t4",kGO01o:"ui-1rgtt3y ui-l66g7a",kE3dHu:"ui-yab65l ui-1ri4ohi",ks0D6T:"ui-w5ewwj ui-1f7jnj6",kHjlTd:"ui-j0a0fe",kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",k1xSpc:"ui-1lliihq ui-106y27v",kXwgrk:"ui-1q0g3np ui-7b3dt5",kGNEyG:"ui-13iwyz6 ui-wai511",$$css:!0}};function VA(){return fU.base}const KA=x.createContext(null),ZA=x.createContext(null);function Up({children:e,placement:t=HA,offset:n=8,delay:r,closeDelay:s,sameAxisOnly:a=!1,disabled:l=!1,surfaceStyle:c,surfaceClassName:d,claimPortalLayer:p=!1,onOpenChange:h}){const m=x.use(KA),g=m?.open??r??nx,y=m?.close??s??Ih,k=x.useMemo(()=>iU(),[]),S=x.useRef(null),[T,E]=x.useState(!1),[R,_]=x.useState(!1),[C,A]=x.useState(!1),N=x.use(Fp),I=x.useCallback((q,z)=>{S.current=q,_(z),A(!1)},[]),$=x.useCallback(q=>{S.current===q&&(A(!0),k.close(),S.current=null,_(!1))},[k]),H=x.useCallback(q=>{q||(S.current=null,_(!1)),E(q),h?.(q)},[h]),{portalLayerStyles:L}=qc("tooltip",p&&T),Z=N||C,K=x.useMemo(()=>({handle:k,delay:g,closeDelay:y,markTriggerActive:I,closeIfTriggerActive:$}),[k,g,y,I,$]);return v.jsxs(ZA.Provider,{value:K,children:[e,v.jsx(dU,{activeInteractive:R,disabled:l,handle:k,offset:n,onOpenChange:H,placement:t,positionerStyle:p?L:void 0,sameAxisOnly:a,suppressPopup:Z,surfaceClassName:d,surfaceStyle:c})]})}function dU({handle:e,activeInteractive:t,placement:n,offset:r,sameAxisOnly:s,disabled:a,suppressPopup:l,surfaceStyle:c,surfaceClassName:d,positionerStyle:p,onOpenChange:h}){const m=Nl(),g=rx(n,r,s);return v.jsx(NA,{disabled:a||l,disableHoverablePopup:!t,handle:e,onOpenChange:h,children:({payload:y})=>l||y?.content===null||y?.content===void 0?null:v.jsx(hU,{align:g.align,alignOffset:g.alignOffset,collisionAvoidance:g.collisionAvoidance,handle:e,payload:y,portalRoot:m,positionerStyle:p,side:g.side,sideOffset:g.sideOffset,surfaceClassName:d,surfaceStyle:c})})}function pU({content:e,popupRef:t}){return x.useLayoutEffect(()=>{t.current!==null&&(t.current.scrollTop=0)},[t]),typeof e=="function"?e():e}function hU({payload:e,handle:t,portalRoot:n,surfaceStyle:r,surfaceClassName:s,positionerStyle:a,side:l,align:c,sideOffset:d,alignOffset:p,collisionAvoidance:h}){const m=x.useRef(null),g=uU(t,e.triggerId),y=x.useCallback(T=>{m.current=T;const E=g(T);if(T!==null)return()=>{m.current===T&&(m.current=null),E?.()}},[g]),k=Nn(UA),S=En({rootClass:"ui-tooltip",stylexStyles:[qA,VA(),BA,r,e.surfaceStyle],className:wn(s,e.tooltipClassName)});return v.jsx(IA,{container:n??void 0,children:v.jsx(PA,{align:c,alignOffset:p,className:k.className,collisionAvoidance:h,collisionPadding:8,side:l,sideOffset:d,style:{...k.style,...a},children:v.jsx($A,{"aria-label":e.ariaLabel,className:S.className,ref:y,role:"tooltip",style:S.style,children:v.jsx(pU,{content:e.content,popupRef:m},e.contentKey)})})})}function mU({handle:e,children:t,content:n,contentKey:r,disabled:s=!1,surfaceStyle:a,tooltipClassName:l,delay:c,closeDelay:d,interactive:p=!1,"aria-label":h,id:m,onMouseEnter:g,onFocus:y,onPotentialActivate:k,...S}){const T=x.useId(),E=m??T,R=x.Children.only(t),_=x.isValidElement(R),C=x.useCallback(I=>{k?.(E,p),g?.(I)},[p,g,k,E]),A=x.useCallback(I=>{k?.(E,p),y?.(I)},[p,y,k,E]),N=x.useMemo(()=>({ariaLabel:h,content:n,contentKey:r??E,surfaceStyle:a,tooltipClassName:l,triggerId:E}),[h,n,r,a,l,E]);return _?v.jsx(OA,{...S,closeDelay:d,delay:c,disabled:s,handle:e,id:E,onFocus:A,onMouseEnter:C,payload:N,render:R}):v.jsx(v.Fragment,{children:t})}function gU({children:e,content:t,disabled:n=!1,delay:r,closeDelay:s,interactive:a=!1,"aria-label":l,id:c,...d}){const p=x.use(ZA),h=x.useId(),m=c??h;if(x.useLayoutEffect(()=>{if(p==null)return;const y=p.closeIfTriggerActive;return()=>{y(m)}},[p,m]),p==null)return v.jsx(v.Fragment,{children:e});const g=GA(s??p.closeDelay??Ih,a);return v.jsx(mU,{...d,"aria-label":l,closeDelay:g,content:t,delay:r??p.delay??nx,disabled:n,handle:p.handle,id:m,interactive:a,onPotentialActivate:p.markTriggerActive,children:e})}(function(e){e.Trigger=gU})(Up||(Up={}));const Lb={base:{"--ui-menu-row-padding-block":"ui-kd6fbz","--ui-menu-row-padding-inline":"ui-1ucplye","--ui-menu-row-gap":"ui-1fi38xd","--ui-menu-row-border-radius":"ui-1swa0pb","--ui-menu-item-left-width":"ui-1bm229x","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-so2ig8","--ui-menu-section-title-padding-inline":"ui-e020nh",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kY2c9j:"ui-fc2p8",kWkggS:"ui-f1vpex",kaIpWk:"ui-1043rbw",kGVxlE:"ui-137jh17",kVAEAm:"ui-1n2onr6",kMv6JI:"ui-1acoasx",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kMwMTN:"ui-1wd3ewq",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",ktR8K2:"ui-awy1a7",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{"--ui-menu-row-padding-block":"ui-1jjxvf6","--ui-menu-row-padding-inline":"ui-18k90n9","--ui-menu-row-gap":"ui-vzyzmz","--ui-menu-item-left-width":"ui-eurstk","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-14atyw8","--ui-menu-section-title-padding-inline":"ui-mhevzc","--ui-menu-row-border-radius":"ui-1jr1u8k",kaIpWk:"ui-1m7fhj7",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",kGVxlE:"ui-1gnnqk1",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kc3QkE:"ui-1h1zc6f",$$css:!0}},bU={base:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kY2c9j:"ui-cfsmg2",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kysU6D:"ui-jyslct",kkrTdU:"ui-t0e3qv",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0}},_i={inner:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",k2VNRW:"ui-3gzrov",$$css:!0},layout:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",$$css:!0},bodyScroll:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",$$css:!0},header:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0},footer:{kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",$$css:!0},layoutCard:{kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-137jh17",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-137jh17",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},list:{kH6xsr:"ui-3ct3a4",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-12mrbbr",$$css:!0},virtualizedList:{kOIVth:"ui-xhr3t",$$css:!0},virtualizedRow:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",$$css:!0},virtualizedScroller:{kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},li={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-1kk7d6x",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kLKAdn:"ui-1xgckd",kpe85a:"ui-9cta2o",kGO01o:"ui-1mv37q2",kE3dHu:"ui-1166h4g",kaIpWk:"ui-1w5zb4f",kkrTdU:"ui-1ypdohk",kWkggS:"ui-jbqb8w",$$css:!0},focused:{kWkggS:"ui-flfp0o",$$css:!0},submenuHover:{kWkggS:"ui-qjnua1",$$css:!0},selected:{kWkggS:"ui-i07v4r",$$css:!0},disabled:{kMwMTN:"ui-4b2ntj",kkrTdU:"ui-t0e3qv",$$css:!0},disabledFocused:{kWkggS:"ui-jbqb8w",$$css:!0},hasDescription:{kGNEyG:"ui-1cy8zhl",$$css:!0},muted:{kMwMTN:"ui-1e4uaio",$$css:!0},mutedFocused:{kMwMTN:"ui-19aaqeu",$$css:!0},indent:{kE3dHu:"ui-20x7kn",$$css:!0},expanded:{kWkggS:"ui-flfp0o",$$css:!0},topAlign:{kGNEyG:"ui-1cy8zhl",$$css:!0}},wi={left:{kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1kvrb00",kZKoxP:"ui-1gv9yxp",$$css:!0},leftDescription:{kGNEyG:"ui-1cy8zhl",kLKAdn:"ui-uve7l6",$$css:!0},leftWide:{kzqmXN:"ui-1td3qas",$$css:!0},content:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",$$css:!0},right:{kmuXW:"ui-2lah0s",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kMwMTN:"ui-19aaqeu",$$css:!0},rightDescription:{kGNEyG:"ui-1cy8zhl",keoZOQ:"ui-1k5org8",$$css:!0},rightDisabled:{kMwMTN:"ui-1e4uaio",$$css:!0},submenuRight:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-euugli",kUk6DE:"ui-98rzlu",kLWn49:"ui-1evy7pa",$$css:!0},title:{kzqmXN:"ui-h8yej3",kUk6DE:"ui-98rzlu",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},description:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj",$$css:!0}},Zo={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},wrapperInline:{kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",kOIVth:"ui-ehausa",$$css:!0},title:{kMwMTN:"ui-1wd3ewq",$$css:!0},titleInline:{kzQI83:"ui-1ikap7u",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitle:{kMwMTN:"ui-4b2ntj",$$css:!0},subtitleInline:{kzQI83:"ui-gyuaek",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitleWrap:{khDVqt:"ui-eaf4i8",kXHlph:"ui-1plvlek",kORKVm:"ui-ryxfnj",kg5iWk:"ui-brixnn",$$css:!0}},qp={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-12mrbbr",kDDIq6:"ui-1xlr596",kSOckA:"ui-1g2vuzn",kMvyRg:"ui-ythbmo",keqDnY:"ui-1avyhxm",kqzSUC:"ui-66k34r",k4XnTM:"ui-1xwbszb",k3fB1G:"ui-k09vcf",kJePX0:"ui-1w8lxg1",kfctMW:"ui-cy3hch",kiBhmJ:"ui-daw2lg",k8c0Y5:"ui-1w1m56g",kgJ9Hf:"ui-1tyhgdo",kaDzy6:"ui-1s44eir",kMY8PA:"ui-uj3c0",kjtpqk:"ui-1eu76s7",kpiC9T:"ui-1v6oizs",kaGYpq:"ui-7j25xs",kDXkox:"ui-gacwfc",kQfWG7:"ui-18byea3",k8jt7o:"ui-1b7fwf8",$$css:!0},title:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1bjvzyu",kGO01o:"ui-cnij5n",kE3dHu:"ui-qqt8gd",kMwMTN:"ui-4b2ntj",$$css:!0},titleAction:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",$$css:!0},textAction:{kmuXW:"ui-2lah0s",kEafiO:"ui-972fbf",kWqL5O:"ui-gfja2r",kt9PQ7:"ui-1qhh985",kZ1KPB:"ui-yj58a3",kWkggS:"ui-jbqb8w",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-4b2ntj ui-7gh5u8",kkrTdU:"ui-1ypdohk",kaIpWk:"ui-1e1y6u3",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},yU={divider:{k1xSpc:"ui-1lliihq",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",keoZOQ:"ui-qzbcqm",km5ZXQ:"ui-1v0icgf",k1K539:"ui-15m4i5y",koQZXg:"ui-gmkh7b",kfzvcC:"ui-47corl",$$css:!0}},vU={row:{kLKAdn:"ui-fs8kq3",kpe85a:"ui-9cta2o",kGO01o:"ui-b6dno7",kE3dHu:"ui-1166h4g",$$css:!0}},WA={surface:{kzqmXN:"ui-1oysuqx",kskxy:"ui-uyqlj2",kORKVm:"ui-1odjw0f",kfzvcC:"ui-67bb7w",k5wCbM:"ui-1597r2g",k6w4Gs:"ui-xkn5u1",$$css:!0},surfaceWide:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-c74ic2",$$css:!0}},Hp={empty:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1jkygx",kGO01o:"ui-cnij5n",kE3dHu:"ui-1o7kk3e",kMwMTN:"ui-4b2ntj",k9WMMc:"ui-2b8uid",$$css:!0},emptyIndent:{kE3dHu:"ui-1hl851k",$$css:!0},loading:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-ehausa",kLKAdn:"ui-13ly8rp",kpe85a:"ui-1jkygx",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1o7kk3e",kMwMTN:"ui-4b2ntj",$$css:!0},loadingSpinner:{kKVMdj:"ui-138fvbv",k44tkh:"ui-1q3qbx4 ui-1s1fvk8",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}};function xU(e,t=!1){return[Lb.base,xs.root,e==="md"&&Lb.sizeMd,t&&Lb.hasAttachment]}function kU(){return bU.base}function SU(){return _i.inner}function wU(e=!1){return[_i.layout,e&&_i.layoutCard]}function EU(){return _i.attachment}function TU(){return _i.bodyScroll}function _U(){return _i.header}function RU(){return _i.footer}function CU(e=!1){return[_i.list,e&&_i.virtualizedList]}function AU(){return _i.virtualizedRow}function NU(){return _i.virtualizedScroller}function ix(e={}){return[li.base,e.selected&&li.selected,e.inSubmenu&&!e.disabled&&li.submenuHover,e.focused&&li.focused,e.expanded&&li.expanded,e.disabled&&li.disabled,e.disabled&&e.focused&&li.disabledFocused,e.hasDescription&&li.hasDescription,e.variant==="muted"&&li.muted,e.variant==="muted"&&e.focused&&li.mutedFocused,e.indent&&li.indent,e.topAlign&&li.topAlign]}function OU(e={}){return[wi.left,e.hasDescription&&wi.leftDescription,e.wideLeft&&wi.leftWide]}function MU(){return wi.content}function IU(e={}){return[wi.right,e.hasDescription&&wi.rightDescription,e.disabled&&wi.rightDisabled]}function DU(){return wi.submenuRight}function zU(){return wi.wrapper}function LU(){return[Ol.root,wi.title]}function jU(){return[fo.root,Ol.root,wi.description]}function PU(e){return[Zo.wrapper,e&&Zo.wrapperInline]}function $U(e){return[Ol.root,Zo.title,e&&Zo.titleInline]}function BU({inline:e,wrap:t}){return[fo.root,Ol.root,Zo.subtitle,e&&Zo.subtitleInline,t&&Zo.subtitleWrap]}function FU(){return vU.row}function UU(){return qp.wrapper}function qU(e){return[fo.root,qp.title,e&&qp.titleAction]}function HU(){return qp.textAction}function GU(){return yU.divider}function YA(){return WA.surface}function VU(){return WA.surfaceWide}function KU(e){return[fo.root,Hp.empty,e&&Hp.emptyIndent]}function ZU(){return[xs.root,Hp.loading]}function WU(){return Hp.loadingSpinner}const YU="ui-menu",sx="ui-menu__backdrop",XU="ui-menu__list",QU="ui-menu__content",JU="ui-menu__layout",e9="ui-menu__body-scroll",t9="ui-menu__header",n9="ui-menu__footer",r9="ui-menu__attachment",i9="ui-menu__row",s9="ui-menu__item-left",o9="ui-menu__item-content",a9="ui-menu__item-right",l9="ui-menu__item-wrapper",u9="ui-menu__item-title",c9="ui-menu__item-description",f9="ui-menu__text-wrapper",d9="ui-menu__title",p9="ui-menu__subtitle",h9="ui-menu__search-row",m9="ui-menu__section",g9="ui-menu__section-title",b9="ui-menu__section-text-action",y9="ui-menu__virtualized-section-divider",v9="ui-menu__submenu-trigger",x9="ui-menu__submenu-right-section",k9="ui-menu__toggle-row",XA="ui-menu__tooltip",S9="ui-menu__empty",w9="ui-menu__loading",E9="ui-menu__loading-spinner",T9="ui-menu__virtualized-row",_9="ui-menu__virtualized-scroller";function Ht(e,t,n={}){return En({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function ox({className:e,size:t,style:n,hasAttachment:r=!1}){return Ht(YU,xU(t,r),{className:e,style:n})}function QA(e){return Ht(sx,kU(),{style:e})}function ax(e=!1){return Ht(XU,CU(e),{className:e?"ui-menu__list--virtualized":void 0})}function lx(){return Ht(QU,SU())}function JA(e,t=!1){return Ht(JU,wU(t),{style:e})}function R9(){return Ht(r9,EU())}function C9(){return Ht(e9,TU())}function eN(){return Ht(t9,_U())}function tN(){return Ht(n9,RU())}function ux(e={}){return Ht(i9,[{"ui--default-marker":"ui--default-marker",$$css:!0},ix(e)],{className:e.className})}function A9(e={}){return Ht(k9,ix(e),{className:e.className})}function N9(e={}){return Ht(v9,ix(e),{className:e.className})}function O9(e={}){return Ht(s9,OU(e))}function M9(){return Ht(o9,MU())}function I9(e={}){return Ht(a9,IU(e))}function cx(){return Ht(l9,zU())}function fx(){return Ht(u9,LU())}function dx(){return Ht(c9,jU())}function D9(e){return Ht(f9,PU(e))}function z9(e){return Ht(d9,$U(e))}function L9({inline:e,wrap:t}){return Ht(p9,BU({inline:e,wrap:t}))}function j9(e){return Ht(h9,FU(),{className:e})}function _1(){return Ht(m9,UU())}function nN(e){return Ht(g9,qU(e))}function P9(){return Ht(b9,HU())}function $9(){return Ht(y9,GU())}function B9(){return Ht(x9,DU())}function F9(e){return Ht(S9,KU(e))}function U9(){return Ht(w9,ZU())}function q9(){return Ht(T9,AU())}function H9(){return Ht(_9,NU())}const Dh=Ht(XA,YA()).className,G9=Ht(E9,WU()).className,Gp="submenuOpenChange",px=x.createContext(null);function zh(){return x.use(px)}function hx({children:e,layerNodeId:t}){const n=bo(),[r,s]=x.useState(new Set);x.useEffect(()=>{if(!n)return;const c=d=>{d.parentId===t&&s(p=>{const h=new Set(p);return d.isOpen?h.add(d.nodeId):h.delete(d.nodeId),h})};return n.events.on(Gp,c),()=>{n.events.off(Gp,c)}},[n,t]);const a=r.size>0,l=x.useMemo(()=>({hasOpenChild:a}),[a]);return v.jsx(px.Provider,{value:l,children:v.jsx(Up,{claimPortalLayer:!0,disabled:a,offset:6,placement:"right-start",sameAxisOnly:!0,surfaceClassName:XA,surfaceStyle:YA(),children:e})})}function rN({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=x.use(px);return c==null?v.jsx(v.Fragment,{children:e}):v.jsx(Up.Trigger,{closeDelay:a,content:t,contentKey:n,delay:s,disabled:r||c.hasOpenChild,interactive:!0,surfaceStyle:l,children:e})}function V9(e,t){const n=bo(),r=go();x.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Gp,s),()=>{t&&n.events.emit(Gp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}const K9=360,iN="--ui-menu-available-width",Z9="320px";function ju(e){return typeof e=="number"?`${e}px`:e}function jb(e){return`min(${e}, var(${iN}, 100vw))`}function mx(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":ju(t??"200px");return s?{width:l==="max-content"?l:jb(l),...n!=null&&{minWidth:jb(ju(n))},maxWidth:jb(r!=null?ju(r):Z9)}:{width:l,...n!=null&&{minWidth:ju(n)},...r!=null&&{maxWidth:ju(r)}}}const W9=mA("@@menu-content-noop",()=>Qv({}));function Y9({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,style:c,maxHeight:d,width:p,minWidth:h,maxWidth:m,size:g,backdrop:y,adaptiveHeight:k=!0,returnFocus:S,onKeyDownCapture:T,droppable:E,ref:R}){const _=Al(),{isOpen:C,isMounted:A,activeIndex:N,setActiveIndex:I,setIsOpen:$,markKeyboardNavigation:H,markPointerNavigation:L,virtualFocus:Z,searchValue:K,setSearchValue:q,hasSearchInput:z,searchInputRef:j,enableHover:F,closeOnSelect:U,nodeId:P,listRef:W,labelsRef:D,refs:B,floatingStyles:G,middlewareData:O,transitionStyles:ie,context:te,getFloatingProps:ne,getItemProps:le,dismissCauseRef:pe,returnFocusOnSelect:ye}=Ci(),Se=y??!F,ze=x.useRef(null),he=Z&&!z,Te=Nh(),Re=x.useSyncExternalStore(pi.subscribe,pi.isDragActive,pi.isDragActive),Oe=te.placement.startsWith("top"),ve=Oe&&A?O.bottomAnchor?.bottom??null:null,xe=x.useRef(null),Me=x.useRef(N),Ce=x.useRef(!1);x.useLayoutEffect(()=>{Me.current=N},[N]),x.useLayoutEffect(()=>{if(!C){Ce.current=!1;return}const X=$e=>{wA($e)&&(Ce.current=!0,H())},we=$e=>{const Le=TA($e,W);Le==null||Le===Me.current||I(Le)},Ge=$e=>{const Le=Ce.current;Ce.current=!1,L(),Le&&we($e.target)},lt=ze.current;document.addEventListener("keydown",X,!0);const St=IF(lt,Ge);return()=>{document.removeEventListener("keydown",X,!0),St()}},[C,W,H,L,I]),x.useLayoutEffect(()=>{if(!C){xe.current=null;return}if(!Z||N==null||xe.current===N||(xe.current=N,!Ce.current))return;const X=W.current[N]??null;if(!X)return;const we=requestAnimationFrame(()=>{X.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(we)},[C,Z,N,W]);const Pe=x.useCallback(X=>{if(X.key==="Escape"){pe.current="escape";return}if(X.ctrlKey&&!X.metaKey){const Ge=X.key.toLowerCase();if(Ge==="n"||Ge==="p"){X.preventDefault();const lt=W.current,St=lt.length;if(St===0)return;const $e=Me.current,Le=Ge==="n"?1:-1;let qe=$e==null?Ge==="n"?0:St-1:$e+Le;for(;qe>=0&&qe<St;){if(lt[qe]!=null){I(qe);return}qe+=Le}return}}if(!z)return;if(X.key.length===1&&!X.ctrlKey&&!X.metaKey&&!X.altKey){if(document.activeElement===j.current)return;X.preventDefault(),X.stopPropagation(),j.current?.focus(),q(K+X.key),EA(W,"body",I)}},[pe,z,W,j,K,I,q]),ge=x.useCallback(X=>{Te(X.nativeEvent)&&(pe.current="backdrop",$(!1))},[pe,$,Te]),ce=x.useCallback(X=>{if(!Te(X.nativeEvent))return;X.preventDefault(),pe.current="backdrop",$(!1);const lt=document.elementsFromPoint(X.clientX,X.clientY).find(St=>!St.classList.contains(sx));lt&&lt.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:X.clientX,clientY:X.clientY,screenX:X.screenX,screenY:X.screenY,button:X.button,buttons:X.buttons,ctrlKey:X.ctrlKey,shiftKey:X.shiftKey,altKey:X.altKey,metaKey:X.metaKey}))},[pe,$,Te]),oe=E!=null,{ref:re,isOver:_e,isDropBlocked:J}=J4({accept:E?.accept??W9,disabled:!oe||(E?.disabled??!1),onDragEnter:E?.onDragEnter,onDragOver:E?.onDragOver,onDragLeave:E?.onDragLeave,onDrop:E?.onDrop}),fe=Zc([B.setFloating,ze,R,oe?re:null]),Ie=Nl(),{zIndex:Ue,portalLayerStyles:Ze}=qc("popover",A);if(!A)return null;const Ye=g??_?.menuSize??"sm",ot={...G,...ie,...Ze,...Ue!==null?{zIndex:Ue}:{},...c,...mx({width:p,minWidth:h,maxWidth:m}),...Oe&&ve!==null?{top:"auto",bottom:ve}:{}},it={...Ze,...Ue!==null?{zIndex:Ue-1}:{},pointerEvents:oe&&Re?"none":void 0},nt=d==null?void 0:k?`min(${typeof d=="number"?`${d}px`:d}, var(--ui-menu-available-height, 100vh))`:d,vt=r!=null,st=QA(it),xt=ox({className:l,size:Ye,style:vt&&nt!==void 0?{...ot,maxHeight:nt}:ot,hasAttachment:vt}),We=JA(vt||nt===void 0?void 0:{maxHeight:nt},vt),Ot=eN(),Be=C9(),Ke=lx(),ht=ax(),Xe=tN(),Y=R9();return v.jsxs(Uv,{...Ie?{root:Ie}:{},children:[Se&&v.jsx("div",{className:st.className,style:st.style,onClick:ge,onContextMenu:ce,role:"none"}),v.jsx(Hv,{context:te,initialFocus:he?-1:j,returnFocus:S??(pe.current!=="backdrop"&&(pe.current!=="selection"||ye)),modal:!he,children:v.jsx("div",{ref:fe,className:xt.className,style:xt.style,tabIndex:-1,"data-size":Ye,"data-drop-active":oe&&_e&&!J?"":void 0,"data-drop-blocked":oe&&J?"":void 0,...a?{"data-testid":a}:{},...vt?{"aria-label":s??"Menu"}:{},...ne({onKeyDown:Pe,onKeyDownCapture:T,onMouseDown:Z?X=>{X.stopPropagation()}:void 0}),children:v.jsx(Ts,{menuSize:Ye,children:v.jsx(bA,{dismiss:!C,children:v.jsx(hx,{layerNodeId:P,children:v.jsx(CA,{activeIndex:N,setIsOpen:$,getItemProps:le,searchValue:K,closeOnSelect:U,virtualFocus:Z,children:v.jsxs(RC,{elementsRef:W,labelsRef:D,children:[v.jsxs("div",{className:We.className,style:We.style,...vt?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?v.jsx("div",{className:Ot.className,style:Ot.style,children:v.jsx(nc,{value:"header",children:t})}):null,v.jsx(gA,{className:Be.className,style:Be.style,maxHeight:"none",children:v.jsx("div",{className:Ke.className,style:Ke.style,children:v.jsx("ul",{role:"presentation",className:ht.className,style:ht.style,children:e})})}),n!=null?v.jsx("div",{className:Xe.className,style:Xe.style,children:v.jsx(nc,{value:"footer",children:n})}):null]}),r!=null?v.jsx("div",{className:Y.className,style:Y.style,children:v.jsx("div",{className:Ke.className,style:Ke.style,children:v.jsx(nc,{value:"footer",children:r})})}):null]})})})})})})})]})}function X9({children:e,indent:t=!1}){const n=F9(t);return v.jsx("div",{className:n.className,style:n.style,"data-indent":t||void 0,children:e})}const Q9=x.createContext(null);function J9(){return x.useContext(Q9)}const eq="application/x-cursor-draggable",tq=/\bElectron\/\d+/,Bd=rq("ui-i9pz9s"),nq="data-no-drag";let Go=!1,R1=!1;function rq(e){return e?.split(/\s+/).filter(Boolean)??[]}function Fd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function iq(){if(R1||typeof document>"u")return;R1=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Go=!1;return}Go=t.target.closest(`[${nq}]`)!==null},{capture:!0});const e=()=>{Go=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function sq(){return typeof navigator>"u"?!0:!tq.test(navigator.userAgent)}function oq({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=J9(),c=x.useRef(null),d=x.useRef({onDragStart:s,onDragEnd:a});d.current={onDragStart:s,onDragEnd:a};const p=x.useRef(t);p.current=t;const h=x.useRef(r);h.current=r;const m=x.useRef(l);m.current=l;const g=l?.activeDragId===e,y=x.useRef(g);return y.current=g,x.useEffect(()=>{const S=c.current;if(S)return Fd(S,Bd,!n&&g),()=>{Fd(S,Bd,!1)}},[n,g]),x.useEffect(()=>{const S=c.current;if(!S)return;if(n){S.removeAttribute("aria-grabbed");return}const T=g?"true":"false";S.getAttribute("aria-grabbed")!==T&&S.setAttribute("aria-grabbed",T)},[n,g]),{ref:x.useCallback(S=>{if(c.current=S,!S)return;Fd(S,Bd,!n&&y.current);const T=!n;if(S.draggable!==T&&(S.draggable=T),n)return;iq();const E=pi.getInstance(),R=C=>{if(Go){Go=!1,C.preventDefault(),C.stopPropagation();return}const A=p.current;E.setData(A);const N=S.ownerDocument,I=()=>{N.removeEventListener("dragend",I,!0),N.removeEventListener("drop",I,!0),N.removeEventListener("mousemove",I,!0),setTimeout(()=>{E.getData()===A&&(E.clearData(),Go=!1,m.current?.setDragging(null,null))},0)};if(N.addEventListener("dragend",I,!0),N.addEventListener("drop",I,!0),N.addEventListener("mousemove",I,!0),C.dataTransfer){const $=sq();C.dataTransfer.effectAllowed=$?"copyMove":"move",C.dataTransfer.setData(eq,A.type),$&&C.dataTransfer.setData("text/plain",A.type);const H=h.current;H&&C.dataTransfer.setDragImage(S,H.x,H.y)}m.current?.setDragging(e,A,{x:C.clientX,y:C.clientY}),d.current.onDragStart?.(C)},_=C=>{E.clearData(),Go=!1,m.current?.setDragging(null,null),d.current.onDragEnd?.(C)};return S.addEventListener("dragstart",R),S.addEventListener("dragend",_),()=>{S.removeEventListener("dragstart",R),S.removeEventListener("dragend",_),Fd(S,Bd,!1)}},[e,n]),isDragging:g}}const fn={base:{kMv6JI:"ui-1acoasx",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",$$css:!0},sizeInherit:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kb6lSQ:"ui-4gjf66",$$css:!0},variantCode:{kMv6JI:"ui-ul7cyv",$$css:!0},weightRegular:{k63SB2:"ui-20ajya",$$css:!0},weightMedium:{k63SB2:"ui-1yl5bsf",$$css:!0},weightSemibold:{k63SB2:"ui-13ebx5f",$$css:!0},weightBold:{k63SB2:"ui-1v8v64w",$$css:!0},colorPrimary:{kMwMTN:"ui-1wd3ewq",$$css:!0},colorSecondary:{kMwMTN:"ui-19aaqeu",$$css:!0},colorTertiary:{kMwMTN:"ui-4b2ntj",$$css:!0},colorQuaternary:{kMwMTN:"ui-1e4uaio",$$css:!0},colorActive:{kMwMTN:"ui-7qsbfx",$$css:!0},colorFocused:{kMwMTN:"ui-zlszhr",$$css:!0},colorRed:{kMwMTN:"ui-1jh5svw",$$css:!0},colorRedSecondary:{kMwMTN:"ui-o7cye4",$$css:!0},colorYellow:{kMwMTN:"ui-1izesbo",$$css:!0},colorYellowSecondary:{kMwMTN:"ui-14nh9a",$$css:!0},colorGreen:{kMwMTN:"ui-1w5rjie",$$css:!0},colorGreenSecondary:{kMwMTN:"ui-dki84f",$$css:!0},colorMagenta:{kMwMTN:"ui-xjecij",$$css:!0},colorMagentaSecondary:{kMwMTN:"ui-29qggb",$$css:!0},colorCyan:{kMwMTN:"ui-1d0l12",$$css:!0},colorCyanSecondary:{kMwMTN:"ui-l34bp",$$css:!0},colorOrange:{kMwMTN:"ui-11pqmr",$$css:!0},colorOrangeSecondary:{kMwMTN:"ui-11nfuof",$$css:!0},truncateStart:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",ksoyAI:"ui-zyj77d",k9WMMc:"ui-dpxx8g",$$css:!0}},aq={xs:lP.root,sm:fo.root,md:xs.root,lg:oC.root,xl:uP.root,"2xl":cP.root,"3xl":fP.root,inherit:fn.sizeInherit},lq={regular:fn.weightRegular,medium:fn.weightMedium,semibold:fn.weightSemibold,bold:fn.weightBold},uq={primary:fn.colorPrimary,secondary:fn.colorSecondary,tertiary:fn.colorTertiary,quaternary:fn.colorQuaternary,active:fn.colorActive,focused:fn.colorFocused,red:fn.colorRed,"red-secondary":fn.colorRedSecondary,yellow:fn.colorYellow,"yellow-secondary":fn.colorYellowSecondary,green:fn.colorGreen,"green-secondary":fn.colorGreenSecondary,magenta:fn.colorMagenta,"magenta-secondary":fn.colorMagentaSecondary,cyan:fn.colorCyan,"cyan-secondary":fn.colorCyanSecondary,orange:fn.colorOrange,"orange-secondary":fn.colorOrangeSecondary};function cq({color:e,size:t,truncate:n,variant:r,weight:s}){return[fn.base,Bv.root,aq[t],lq[s],r==="code"?fn.variantCode:null,e?uq[e]:null,n==="start"?fn.truncateStart:null,n==="end"?Ol.root:null]}function Vp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,className:d,style:p,ref:h,...m}){const g=a===!0?"end":a===!1?void 0:a??void 0,{className:y,style:k}=Nn(cq({color:s,size:n,truncate:g,variant:t,weight:r}));return v.jsx(e,{ref:h,className:wn("ui-text",y,d),style:{...k,...p},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":g,"data-numeric":l||void 0,...m,children:g==="start"?v.jsxs(v.Fragment,{children:["⁦",c,"⁩"]}):c})}function Lh({children:e,content:t,placement:n=HA,offset:r=8,openDelay:s=nx,closeDelay:a=Ih,disabled:l=!1,defaultOpen:c,open:d,anchor:p,"aria-label":h,className:m,surfaceStyle:g,sameAxisOnly:y=!1,interactive:k=!1,onOpenChange:S,onOpenChangeComplete:T,trackCursorAxis:E="none",ref:R,..._}){const C=x.use(KA),A=x.use(Fp),N=l||A,I=x.Children.only(e),$=x.isValidElement(I),H=Nl(),L=C?.open??s,Z=C?.close??a,K=GA(Z,k),q=(E==="x"||E==="both")&&!n.includes("-")?`${n}-start`:n,{side:z,align:j,sideOffset:F,alignOffset:U,collisionAvoidance:P}=rx(q,r,y),W=Nn(UA),D=En({rootClass:"ui-tooltip",stylexStyles:[qA,VA(),BA,g],className:m});return $?v.jsxs(NA,{defaultOpen:c,disabled:N,disableHoverablePopup:!k,onOpenChange:S,onOpenChangeComplete:T,open:d,trackCursorAxis:E,children:[v.jsx(OA,{..._,closeDelay:K,delay:L,disabled:N,ref:R,render:I}),A?null:v.jsx(IA,{container:H??void 0,children:v.jsx(PA,{align:j,alignOffset:U,anchor:p,className:W.className,collisionAvoidance:P,collisionPadding:8,side:z,sideOffset:F,style:W.style,children:v.jsx($A,{"aria-label":h,className:D.className,role:"tooltip",style:D.style,children:typeof t=="function"?t():t})})})]}):v.jsx(v.Fragment,{children:e})}function gx({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return zh()!=null?v.jsx(rN,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):v.jsx(Lh,{className:Dh,closeDelay:a,content:t,disabled:r,interactive:l,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:c,children:e})}function xl({children:e,disabled:t=!1,hasDescription:n=!1,leading:r,trailing:s,rightFallback:a,trailingAccessory:l,wideLeft:c=!1}){const d=s??a,p=d!=null||l!=null,h=O9({hasDescription:n,wideLeft:c}),m=M9(),g=I9({disabled:t,hasDescription:n});return v.jsxs(Ts,{iconSize:"base",children:[r!=null?v.jsx("span",{className:h.className,style:h.style,children:r}):null,v.jsx("div",{className:m.className,style:m.style,children:e}),p?v.jsxs("span",{className:g.className,style:g.style,children:[d,l]}):null]})}const sN=x.createContext(!1);function jh(){return x.useContext(sN)}const Ph=x.createContext(null);function $h(){const e=x.useContext(Ph);if(!e)throw new Error("SubMenu components must be used within <Menu.SubMenu>");return e}function oN({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:d=!1,onOpenChange:p,hoverOpenDelay:h,dismissOnReferenceScroll:m=!1,suppressSiblingPointerGuard:g=!1,virtualFocus:y=!1}){const k=MC(),[S,T]=zy(c,d,p),E=c!==void 0,R=t==="hover"&&(!E||r==null),[_,C]=x.useState(null),{focusItemOnHoverEnabled:A,markKeyboardNavigation:N,markPointerNavigation:I,resetFocusItemOnHover:$}=_A(),[H,L]=x.useState(""),[Z,K]=x.useState(!1),q=x.useRef([]),z=x.useRef([]),j=x.useRef(null);V9(k,S);const F=gq();x.useEffect(()=>{F&&F.setSubMenuOpen(S)},[S,F]);const U=x.useRef(S);x.useEffect(()=>{const J=U.current;U.current=S,J!==S&&(L(""),S||C(null),$())},[S,$]);const P=x.useCallback(J=>{T(J)},[T]);x.useEffect(()=>{if(F)return F.registerSubMenuOpener(()=>P(!0)),()=>{F.registerSubMenuOpener(null)}},[F,P]);const W=x.useCallback(J=>{!J&&t==="hover"&&Z&&j.current&&document.activeElement===j.current&&H.length>0||P(J)},[Z,H,P,t]),D=x.useCallback(()=>{P(!1)},[P]),G=n??(t==="hover"?"right-start":"bottom-start"),O={mainAxis:-2,alignmentAxis:-2},ne=s??(a?O:t==="hover"?O:4),{refs:le,floatingStyles:pe,context:ye}=BC({nodeId:k,open:S,onOpenChange:W,placement:G,middleware:[Mv(ne),Dv(),Iv({crossAxis:G.startsWith("left")||G.startsWith("right")}),zv({padding:8,apply({availableWidth:J,elements:fe}){fe.floating.style.setProperty(iN,`${Math.max(0,Math.floor(J))}px`)}})],whileElementsMounted:Rp,transform:!1});x.useLayoutEffect(()=>{const J=r?.current;J&&le.setReference(J)}),zF(R&&S&&!g,le.domReference);const{activeId:Se}=AF(k,S),ze=Se!=null?0:h??75,he=DC(ye,{enabled:R,delay:{open:ze},handleClose:KC({blockPointerEvents:!1,requireIntent:!1})}),Te=PC(ye,{enabled:t==="click"&&!E}),Re=Nh(),Oe=$C(ye,{ancestorScroll:m,bubbles:!0,outsidePressEvent:"click",outsidePress:Re}),ve=qC(ye,{role:"menu"}),xe=UC(ye,{listRef:q,activeIndex:_,onNavigate:C,nested:!0,loop:!0,focusItemOnOpen:!y,virtual:Z||y,focusItemOnHover:A}),Me=GC(ye,{listRef:z,activeIndex:_,onMatch:Z?void 0:C,enabled:!Z&&!y}),{getReferenceProps:Ce,getFloatingProps:Pe,getItemProps:ge}=FC([he,Te,Oe,ve,xe,Me]),ce=x.useCallback(()=>({...Ce(),ref:r?void 0:le.setReference,"aria-haspopup":"menu","aria-expanded":S}),[Ce,le.setReference,S,r]),{isMounted:oe,styles:re}=HC(ye,{duration:{open:0,close:DF},initial:{opacity:0,transform:"scale(1)"}}),_e=x.useMemo(()=>({isOpen:S,isMounted:oe,setIsOpen:P,closeFromKeyboard:D,activeIndex:_,setActiveIndex:C,markKeyboardNavigation:N,markPointerNavigation:I,trigger:t,closeOnSelect:l,nodeId:k,listRef:q,labelsRef:z,searchInputRef:j,searchValue:H,setSearchValue:L,hasSearchInput:Z,setHasSearchInput:K,refs:le,floatingStyles:pe,transitionStyles:re,context:ye,getReferenceProps:Ce,getFloatingProps:Pe,getItemProps:ge,getTriggerProps:ce,virtualFocus:y}),[S,oe,P,D,_,t,N,I,l,k,H,Z,y,le,pe,re,ye,Ce,Pe,ge,ce]);return v.jsx(IC,{id:k,children:v.jsx(Ph.Provider,{value:_e,children:e})})}function fq({children:e,disabled:t=!1,label:n,leading:r,trailing:s}){const{activeIndex:a,getItemProps:l}=Jc(),{shouldAllowPointerInteraction:c}=Ci(),d=$h(),p=Qc(),h=p==="body",m=n??(typeof e=="string"?e:""),{ref:g,index:y}=kh({label:m||null}),k=a===y,S=Zc([g,d.refs.setReference]),T=v.jsx(vn,{name:"chevron-right",color:"tertiary"}),E=N9({disabled:t,expanded:d.isOpen,focused:k}),R={role:"menuitem","aria-haspopup":"menu","aria-expanded":d.isOpen,"data-expanded":d.isOpen||void 0,tabIndex:k?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":k||void 0,[Ml]:p,className:E.className,style:E.style,...d.getReferenceProps(l({onMouseDown(A){c(A.nativeEvent)||(A.preventDefault(),A.stopPropagation())},onClick(A){c(A.nativeEvent)||(A.preventDefault(),A.stopPropagation())},onKeyDown(A){A.key==="ArrowRight"&&!t&&(A.preventDefault(),A.stopPropagation(),d.setIsOpen(!0))}}))},_=B9(),C=v.jsx(xl,{disabled:t,leading:r,trailing:s!=null?v.jsx("div",{className:_.className,style:_.style,children:s}):void 0,rightFallback:T,children:e});return h?v.jsx("li",{ref:S,...R,children:C}):v.jsx("div",{ref:S,...R,children:C})}function dq({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=$h(),c=t??(typeof e=="string"?e:""),d=h=>{a.disabled||(r?.(h),!h.defaultPrevented&&h.key==="ArrowRight"&&(h.preventDefault(),h.stopPropagation(),l.setIsOpen(!0)))},p=n?v.jsx(vn,{name:"chevron-right",color:"tertiary"}):void 0;return v.jsx(uN,{...a,itemLabel:c,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:d,trailingAccessory:p,children:e})}function pq({children:e,"aria-label":t,"data-testid":n,className:r,width:s,minWidth:a,maxWidth:l,maxHeight:c,size:d,contentPadding:p}){const h=Al(),m=$h(),g=Nl(),{portalLayerStyles:y}=qc("popover",m.isMounted),k=d??h?.menuSize??"sm",{virtualFocus:S}=m;if(!m.isMounted)return null;const T={...m.floatingStyles,...m.transitionStyles,...y,...mx({width:s,minWidth:a,maxWidth:l,clampToAvailableWidth:!0})},E=ox({className:r,size:k,style:T}),R=lx(),_=ax(),C=N=>{N.stopPropagation()},A=N=>{m.markPointerNavigation();const I=TA(N,m.listRef);I!=null&&I!==m.activeIndex&&m.setActiveIndex(I)};return v.jsx(Uv,{...g?{root:g}:{},children:v.jsx(Hv,{context:m.context,disabled:S,initialFocus:m.hasSearchInput?m.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:m.trigger==="click",children:v.jsx("div",{ref:m.refs.setFloating,className:E.className,style:E.style,"data-submenu":"","data-size":k,...n?{"data-testid":n}:{},...m.getFloatingProps({onClick:C,onMouseMove(N){A(N.target)},onPointerMove(N){A(N.target)},onKeyDown(N){if(wA(N)&&m.markKeyboardNavigation(),N.key==="ArrowLeft"||N.key==="Escape"){N.preventDefault(),N.stopPropagation(),m.closeFromKeyboard();const I=m.refs.domReference.current;I instanceof HTMLElement&&I.focus()}}}),children:v.jsx(sN.Provider,{value:!0,children:v.jsx(Ts,{menuSize:k,children:v.jsx(gA,{maxHeight:c,children:v.jsx("div",{className:R.className,style:p===void 0?R.style:{...R.style,padding:p,scrollPaddingBlock:p},children:v.jsx(hx,{layerNodeId:m.nodeId,children:v.jsx(CA,{activeIndex:m.activeIndex,setIsOpen:m.setIsOpen,getItemProps:m.getItemProps,searchValue:m.searchValue,closeOnSelect:m.closeOnSelect,virtualFocus:S,children:v.jsx(RC,{elementsRef:m.listRef,labelsRef:m.labelsRef,children:v.jsx("ul",{role:"menu","aria-label":t??"Submenu",className:_.className,style:_.style,children:v.jsx(kA,{children:e})})})})})})})})})})})})}function bx(){const e=x.useContext(Ph),{setIsOpen:t,dismissCauseRef:n}=Ci();return x.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function yx(e,t){const{searchValue:n}=Jc();return t||!n||!e?!0:e.toLowerCase().includes(n.toLowerCase())}const hq=mA("@@menu-item-noop",()=>Qv({})),mq=new hq({}),aN=x.createContext(null);function gq(){return x.useContext(aN)}function lN({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return yx(s,n)?v.jsx(uN,{...r,itemLabel:s,children:e}):null}function uN({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:d,onKeyDown:p,leading:h,trailing:m,tooltip:g,tooltipOpenDelay:y=0,tooltipCloseDelay:k=0,tooltipSurface:S="default",closeOnSelect:T,description:E,variant:R="default",selected:_=!1,indent:C=!1,wideLeftSection:A=!1,draggable:N,ref:I,itemLabel:$,referenceRef:H,itemPropsTransform:L,trailingAccessory:Z}){const{activeIndex:K,setIsOpen:q,getItemProps:z,closeOnSelect:j,virtualFocus:F}=Jc(),{shouldAllowPointerInteraction:U}=Ci(),P=jh(),W=bx(),D=Qc(),B=D==="body",G=T??j??!0,{ref:O,index:ie}=kh({label:$||null}),te=K===ie,[ne,le]=x.useState(!1);zh();const pe=x.useRef(null),ye=x.useId(),Se=N!=null,ze=N?.mode==="pointer",he=x.useSyncExternalStore(pi.subscribe,pi.isDragActive,pi.isDragActive),Te=x.useRef(null),Re=x.useRef(null),Oe=x.useRef(null),ve=x.useRef(null),xe=x.useRef(!1),[Me,Ce]=x.useState(null),{ref:Pe,isDragging:ge}=oq({id:N?.id??`menu-item-${ye}`,data:N?.data??mq,disabled:!Se||ze||(N?.disabled??!1),dragImageOffset:N?.dragImageOffset,onDragStart:N?.onDragStart,onDragEnd:N?.onDragEnd}),ce=Zc([O,H,I,Se&&!ze?Pe:null]),oe=x.useCallback(X=>{pe.current=X},[]),re=x.useMemo(()=>({setSubMenuOpen:le,isSubMenuOpen:ne,registerSubMenuOpener:oe}),[ne,oe]);x.useEffect(()=>()=>{Te.current?.(),Oe.current!=null&&cancelAnimationFrame(Oe.current)},[]);const _e=x.useCallback(()=>{Oe.current=null;const X=Re.current,we=ve.current;!X||!we||(X.style.transform=`translate3d(${we.x+8}px, ${we.y+8}px, 0)`)},[]),J=x.useCallback(X=>{ve.current=X,Oe.current==null&&(Oe.current=requestAnimationFrame(_e))},[_e]),fe=x.useCallback(X=>{Re.current=X,_e()},[_e]),Ie=()=>{if(a)return;const X={defaultPrevented:!1,preventDefault:()=>{X.defaultPrevented=!0}};d?.(X),G&&!X.defaultPrevented&&W(q)},Ue=X=>{if(xe.current){xe.current=!1,X.preventDefault(),X.stopPropagation();return}if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}Ie()},Ze=x.useCallback(X=>{if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}if(l?.(X),!X.defaultPrevented){if(ze&&N!=null&&!N.disabled&&X.button===0){Te.current?.();const we=pi.getInstance(),Ge=X.currentTarget,lt={clientX:X.clientX,clientY:X.clientY,isDragging:!1},St=()=>{document.removeEventListener("mousemove",$e,!0),document.removeEventListener("mouseup",Le,!0),Oe.current!=null&&(cancelAnimationFrame(Oe.current),Oe.current=null),ve.current=null,Te.current=null,we.clearData(),setTimeout(()=>{xe.current=!1},0)},$e=qe=>{const Wt=qe.clientX-lt.clientX,tt=qe.clientY-lt.clientY;if(!(!lt.isDragging&&Math.hypot(Wt,tt)<4)){if(!lt.isDragging){lt.isDragging=!0,xe.current=!0,we.setData(N.data);const Dt=Ge.getBoundingClientRect().width;J({x:qe.clientX,y:qe.clientY}),Ce(Dt),N.onPointerDragStart?.(qe)}qe.preventDefault(),J({x:qe.clientX,y:qe.clientY}),N.onPointerDragMove?.(qe)}},Le=qe=>{if(!lt.isDragging){St();return}qe.preventDefault(),Ce(null),N.onPointerDragEnd?.(qe),St()};Te.current=St,document.addEventListener("mousemove",$e,!0),document.addEventListener("mouseup",Le,!0)}F&&!Se&&X.preventDefault()}},[N,Se,ze,l,J,U,F]),Ye=x.useCallback(X=>{if(!U(X.nativeEvent)){X.preventDefault(),X.stopPropagation();return}c?.(X)},[c,U]),it=z({onClick:Ue,onKeyDown:X=>{a||(p?.(X),!X.defaultPrevented&&((X.key==="Enter"||X.key===" ")&&(X.preventDefault(),X.stopPropagation(),Ie()),X.key==="ArrowRight"&&pe.current&&(X.preventDefault(),X.stopPropagation(),pe.current())))},onMouseDown:Ze,onAuxClick:Ye}),nt=L?.(it)??it,vt=m!=null?v.jsx(aN.Provider,{value:re,children:m}):void 0,st=cx(),xt=fx(),We=dx(),Ot=E!=null?v.jsxs("div",{className:st.className,style:st.style,children:[v.jsx("div",{className:xt.className,style:xt.style,children:e}),v.jsx("div",{className:We.className,style:We.style,children:E})]}):e,Be=he||ne,Ke=ux({disabled:a,expanded:r===!0,focused:!he&&te,hasDescription:E!=null,indent:C,inSubmenu:P,selected:_,variant:R}),ht={role:"menuitem",tabIndex:te?0:-1,...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-expanded":r===!0||void 0,draggable:ze?!1:void 0,"data-disabled":a||void 0,"data-focused":!he&&te?!0:void 0,"data-menu-draggable":Se||void 0,"data-selected":_||void 0,"data-has-description":E!=null||void 0,"data-variant":R!=="default"?R:void 0,"data-indent":C||void 0,"data-wide-left":A||void 0,"data-dragging":ge||Me!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Ml]:D,className:Ke.className,style:Ke.style,...nt},Xe=Me!=null&&N?.preview!=null?Ri.createPortal(v.jsx("div",{"aria-hidden":"true",ref:fe,style:{left:0,pointerEvents:"none",position:"fixed",top:0,transform:"translate3d(-9999px, -9999px, 0)",width:Me,willChange:"transform",zIndex:1e4},children:N.preview}),document.body):null,Y=B?v.jsxs("li",{ref:ce,...ht,children:[v.jsx(xl,{disabled:a,hasDescription:E!=null,leading:h,trailing:vt,trailingAccessory:Z,wideLeft:A,children:Ot}),Xe]}):v.jsxs("div",{ref:ce,...ht,children:[v.jsx(xl,{disabled:a,hasDescription:E!=null,leading:h,trailing:vt,trailingAccessory:Z,wideLeft:A,children:Ot}),Xe]});return g!=null?v.jsx(gx,{closeDelay:k,content:g,disabled:Be,openDelay:y,surfaceStyle:S==="wide"?VU():void 0,children:Y}):Y}function vx(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=Fv(),l=dh(t),c=n?s:void 0,d=wr(()=>Symbol("labelable-control")),p=x.useRef(!1),h=x.useRef(t!=null),m=Ve(()=>{!p.current||a===or||(p.current=!1,a(d.current,void 0))});return He(()=>{if(a===or)return;let g;if(n){const y=r?.current;yt(y)&&y.closest("label")!=null?g=t??null:g=c??l}else if(t!=null)h.current=!0,g=t;else if(h.current)g=l;else{m();return}if(g===void 0){m();return}p.current=!0,a(d.current,g)},[t,r,c,a,n,l,d,m]),x.useEffect(()=>m,[m]),s??l}const bq=x.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:d=!1,onValueChange:p,defaultValue:h,autoFocus:m=!1,style:g,...y}=t,{state:k,name:S,disabled:T,setTouched:E,setDirty:R,validityData:_,setFocused:C,setFilled:A,validationMode:N,validation:I}=Vc(),$=T||d,H=S??l,L={...k,disabled:$},{labelId:Z}=Fv(),K=vx({id:a});He(()=>{const W=c!=null;I.inputRef.current?.value||W&&c!==""?A(!0):W&&c===""&&A(!1)},[I.inputRef,A,c]);const q=x.useRef(null);He(()=>{m&&q.current===Dr(Ft(q.current))&&C(!0)},[m,C]);const[z]=hc({controlled:c,default:h,name:"FieldControl",state:"value"}),j=c!==void 0,F=j?z:void 0,U=Ve(()=>I.inputRef.current?.value);return aC(I.inputRef,{id:K,value:F,getValue:U}),xn("input",t,{ref:[n,q],state:L,props:[{id:K,disabled:$,name:H,ref:I.inputRef,"aria-labelledby":Z,autoFocus:m,...j?{value:F}:{defaultValue:h},onChange(W){const D=W.currentTarget.value;p?.(D,_t(Ss,W.nativeEvent)),R(D!==_.initialValue),A(D!=="")},onFocus(){C(!0)},onBlur(W){E(!0),C(!1),N==="onBlur"&&I.commit(W.currentTarget.value)},onKeyDown(W){W.currentTarget.tagName==="INPUT"&&W.key==="Enter"&&(E(!0),I.commit(W.currentTarget.value))}},I.getInputValidationProps(),y],stateAttributesMapping:Gc})}),yq=x.forwardRef(function(t,n){return v.jsx(bq,{ref:n,...t})}),vq=x.createContext(void 0);function xq(){return x.useContext(vq)}const Pb={base:{kVAEAm:"ui-10l6tqk",krVfgx:"ui-r0fw0u",kCIrl2:"ui-7zl9wm",kzqmXN:"ui-jwey39",kZKoxP:"ui-wbbb81",kaIpWk:"ui-16rqkct",kfzvcC:"ui-47corl",$$css:!0},colorBlue:{kWkggS:"ui-1b558e3",$$css:!0},colorGreen:{kWkggS:"ui-15xcjd2",$$css:!0}};function kq(e){return[Pb.base,e==="green"?Pb.colorGreen:Pb.colorBlue]}function Sq({color:e="blue",className:t}){const n=En({rootClass:"ui-indicator-dot",stylexStyles:kq(e),className:t});return v.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const wq={root:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kmuXW:"ui-2lah0s",kB7OPa:"ui-9f619",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1e1y6u3 ui-zmqr1 ui-id2qid ui-1twr5m9 ui-12ip6lu",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kWkggS:"ui-px7pq3 ui-vzb8ri ui-1trtblk",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:"ui-1szrgyu",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kjBf7l:"ui-1uczgqu ui-1725o6r",kInvED:"ui-1wfwxd8 ui-7s97pk",kfzvcC:"ui-67bb7w ui-7gqb9v",kFalU9:"ui-ggy1nq",kVAEAm:"ui-1fxuinm",$$css:!0}},Eq={root:{"--ui-button-bg":"ui-1ny5ihx ui-1a4icse ui-11avru9 ui-gc53xt ui-aq07m7 ui-xrmxsc","--ui-button-bg-hover":"ui-19r40ui ui-dq8yea ui-1rlkm3m ui-16yx911 ui-158em9s ui-1pjq0pd ui-akc1e3 ui-tggix7 ui-1vwqxyx","--ui-button-fg":"ui-1ob79qu ui-1yx7ign ui-1a1fpz7 ui-1kzwtjc ui-135v23r ui-won08w ui-1uhjvfl ui-15er956 ui-19o3xs9 ui-84m9o2 ui-2e8925 ui-6ihjvw ui-1y5zcs1 ui-naf39y ui-1jvl9fz ui-1vrtm4l ui-7owuad","--ui-button-fg-hover":"ui-dargq2 ui-642cp ui-1c2l02l ui-9di03z ui-13rrmb8 ui-i858fd ui-e0u7db ui-yotk09 ui-jkwokp ui-1gocfna ui-1m105qf ui-5v9tdr ui-zwyx12 ui-11n8ln3 ui-1by8bgs ui-1lb5e6d ui-15t60d",$$css:!0}},Tq={xs:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},sm:{kzqmXN:"ui-1pwdyn5",kZKoxP:"ui-1vatr1o",$$css:!0},md:{kzqmXN:"ui-16bvwqk",kZKoxP:"ui-1a6rlst",$$css:!0},lg:{kzqmXN:"ui-1eu7oa3",kZKoxP:"ui-1e94bgo",$$css:!0}},_q={xs:{keoZOQ:"ui-u4j5zy",km5ZXQ:"ui-oxmne4",k1K539:"ui-11y930c",koQZXg:"ui-1vidcv1",$$css:!0},sm:{keoZOQ:"ui-zrgnep",km5ZXQ:"ui-1erxc0b",k1K539:"ui-11b1quy",koQZXg:"ui-3zwt15",$$css:!0},md:{keoZOQ:"ui-vqhhvk",km5ZXQ:"ui-1bxntau",k1K539:"ui-1dy9ubm",koQZXg:"ui-rwqdqc",$$css:!0},lg:{keoZOQ:"ui-kv60qn",km5ZXQ:"ui-1t00xno",k1K539:"ui-1hi8m59",koQZXg:"ui-eqy94b",$$css:!0}},Ud={root:wq.root,appearance:Eq.root,size:Tq,contentFrame:_q},Rq="md";function po({icon:e,iconVariant:t="outline",variant:n="default",shape:r="rounded",frame:s="container",size:a,pressed:l,subtleHover:c,suppressHoverBackground:d=!1,color:p,isSuccess:h=!1,className:m,style:g,disabled:y,indicatorDot:k=!1,indicatorDotColor:S="blue","aria-label":T,"aria-labelledby":E,...R}){const _=Al(),C=a??_?.iconButtonSize??Rq,A=C==="lg"?"base":"sm",N=c??_?.iconButtonSubtleHover??!1,I=y??_?.disabled,H=l!==void 0||(n==="toggle"||n==="tab"),L=H?l??!1:!1,Z=h?"check":e,K=Nn(Ud.root,Ud.appearance,Qu.appearance,Qu.press,(n==="primary"||n==="secondary")&&Qu.colors,Ud.size[C],s==="content"&&Ud.contentFrame[C]);return v.jsxs(sC,{...R,className:wn("ui-icon-button",K.className,m),style:{...K.style,...g},"data-variant":n,"data-shape":r!=="rounded"?r:void 0,"data-frame":s,"data-size":C,"data-color":p,"data-indicator-dot":k||void 0,"data-pressed":H?L:void 0,"data-subtle-hover":N||void 0,"data-suppress-hover-background":d||void 0,disabled:I,"aria-label":T,"aria-labelledby":E,"aria-pressed":l,children:[typeof Z=="string"?v.jsx(vn,{name:Z,variant:t,size:A,"aria-hidden":"true"}):v.jsx("span",{...{0:{className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014 ui-1u4itkb"},1:{className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014 ui-xfpx3u"}}[(A==="base")<<0],"aria-hidden":"true",children:Z}),k?v.jsx(Sq,{color:S}):null]})}function Cq(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function xx(e){if(!(Cq()?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey)return!1;switch(e.key.toLowerCase()){case"a":return e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),e.currentTarget.select(),!0;case"c":case"v":case"x":case"z":return e.nativeEvent.stopImmediatePropagation(),!0;default:return!1}}const qd={base:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},monoInput:{kGuDYH:"ui-pr5cyi",$$css:!0}};function Aq({className:e,disabled:t=!1,mono:n=!1,ref:r,style:s,onKeyDown:a,...l}){const c=En({rootClass:"ui-input-group__input",stylexStyles:[qd.base,t?qd.disabled:null,n?qd.mono:null,n?qd.monoInput:null],className:e,style:s}),d=x.useCallback(p=>{a?.(p),!p.defaultPrevented&&xx(p)},[a]);return v.jsx("input",{ref:r,className:c.className,style:c.style,disabled:t,onKeyDown:d,...l})}const Lr={base:{"--ui-input-group-border-width":"ui-1cx02xk","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4","--input-group-button-inset":"ui-1c59nzh",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j ui-9afaxg ui-4vz0kq",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-141kqco ui-7asvek ui-ajihsc",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba ui-illscj ui-1rfq9xa",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1arpupx ui-vv26sj ui-15k81bw",kaIpWk:"ui-1043rbw",kLKAdn:"ui-e8kt42",kpe85a:"ui-1b1zv1o",kGO01o:"ui-1ftrzfz",kE3dHu:"ui-1bgzvkm",kWkggS:"ui-flfp0o",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},disabled:{kLZC3w:"ui-1aeic0j",k26BEO:"ui-141kqco",kL6WhQ:"ui-17fyfba",kaZRDh:"ui-1arpupx",kkrTdU:"ui-1h6gzvc",kSiTet:"ui-byyjgo",$$css:!0},sizeBase:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-xlcw59","--input-group-button-inset":"ui-1ethuh",kZKoxP:"ui-1e94bgo",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1u9w55t",kZKoxP:"ui-170hpbr",kOIVth:"ui-pkkfsy",$$css:!0},sizeXl:{"--ui-input-group-padding-block":"ui-17wxzvn","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1ethuh",kOIVth:"ui-ehausa",$$css:!0},layoutTextarea:{kGNEyG:"ui-1cy8zhl",kZKoxP:"ui-t7dq6l",kAzted:"ui-16ry4p3",$$css:!0},layoutTextareaBase:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantElevated:{kWkggS:"ui-f1vpex",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-qjnua1 ui-aig341",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",$$css:!0},variantUnfilled:{"--ui-input-group-border-width":"ui-qkl0tc","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4",kWkggS:"ui-jbqb8w",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kOIVth:"ui-137clkk",kGVxlE:"ui-1gnnqk1 ui-15ysqaf",$$css:!0},variantUnfilledSize:{kZKoxP:"ui-t7dq6l",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Hd={field:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",kAzted:"ui-10fesj9",kHenm0:"ui-tt52l0",kORKVm:"ui-10wlt62",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},kl={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",koQZXg:"ui-j3b58b ui-fn0i77",km5ZXQ:"ui-1yf7rl7 ui-1qpi6ia",$$css:!0},textareaLayout:{kAzted:"ui-1tn5z8q",$$css:!0}},C1={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0}},Nq={base:Lr.sizeBase,lg:Lr.sizeLg,xl:Lr.sizeXl},Oq={base:Lr.layoutTextareaBase,lg:Lr.layoutTextareaLg,xl:null},Mq={container:null,content:Lr.frameContent},Iq={default:null,elevated:Lr.variantElevated,ghost:Lr.variantGhost,unfilled:Lr.variantUnfilled},Dq={rounded:null,pill:Lr.shapePill},cN=x.createContext(null);function ca(){const e=x.useContext(cN);if(!e)throw new Error("InputGroup compound components must be used within InputGroup.Root");return e}const zq={base:"sm",lg:"base",xl:"lg"},Lq={base:"xs",lg:"sm",xl:"md"},jq={base:"xs",lg:"sm",xl:"md"};function A1({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:d,children:p}){const h=xq(),m=l||h?.disabled===!0,g=En({rootClass:"ui-input-group",stylexStyles:[Lr.base,Nq[n],s==="textarea"?Lr.layoutTextarea:null,s==="textarea"?Oq[n]:null,Mq[t],Iq[e],e==="unfilled"?Lr.variantUnfilledSize:null,Dq[r],m?Lr.disabled:null,c],className:d});return v.jsx(cN.Provider,{value:{disabled:m,layout:s,mono:a},children:v.jsx(Ts,{iconSize:zq[n],iconButtonSize:Lq[n],buttonSize:jq[n],disabled:m||void 0,children:v.jsx("div",{className:g.className,style:g.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:p})})})}function Pq({className:e,disabled:t,ref:n,style:r,...s}){const a=ca(),l=a.disabled||t===!0;return v.jsx(yq,{...s,className:e,disabled:l,ref:n,render:v.jsx(Aq,{mono:a.mono}),style:r})}function $q({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:d,minRows:p=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:g=!1,rows:y,value:k,placeholder:S,focusedPlaceholder:T,...E}){const R=ca(),_=R.disabled||t===!0,C=En({rootClass:"ui-input-group__textarea",stylexStyles:[Hd.field,_?Hd.disabled:null,R.mono?Hd.mono:null,g?Hd.collapseBlur:null,r],className:e,style:s}),A=x.useRef(null),N=Zc([A,n]),[I,$]=x.useState(!1),H=p<1?1:p,L=h===void 0?void 0:h<H?H:h,Z=x.useCallback(()=>{if(!m)return;const P=A.current;if(!P)return;if(L===H&&(y===void 0||y===H)){P.style.height="",P.style.overflowY="auto";return}P.style.height="auto";const W=window.getComputedStyle(P),D=Number.parseFloat(W.lineHeight),B=Number.parseFloat(W.paddingTop)||0,G=Number.parseFloat(W.paddingBottom)||0,O=Number.parseFloat(W.borderTopWidth)||0,ie=Number.parseFloat(W.borderBottomWidth)||0,te=B+G+O+ie,ne=Number.isFinite(D)&&D>0?te+D*H:0,le=L!==void 0&&Number.isFinite(D)&&D>0?te+D*L:void 0,pe=Math.max(P.scrollHeight,ne),ye=le!==void 0?Math.min(pe,le):pe;P.style.height=`${ye}px`,P.style.overflowY=le!==void 0&&P.scrollHeight>le?"auto":"hidden"},[m,L,H,y]);x.useLayoutEffect(()=>{Z()},[k,Z]);const K=x.useCallback(P=>{a?.(P),!P.defaultPrevented&&xx(P)},[a]),q=x.useCallback(P=>{l?.(P),P.defaultPrevented||Z()},[l,Z]),z=x.useCallback(P=>{$(!0),c?.(P)},[c]),j=x.useCallback(P=>{$(!1),d?.(P)},[d]),F=y??H,U=I&&T!==void 0?T:S;return v.jsx("textarea",{ref:N,className:C.className,style:C.style,disabled:_,onKeyDown:K,rows:F,value:k,placeholder:U,...E,"data-textarea-collapse-blur":g?"":void 0,onInput:q,onFocus:z,onBlur:j})}function Bq({className:e,ref:t,...n}){const r=ca(),s=En({rootClass:"ui-input-group__addon",stylexStyles:[kl.base,r.layout==="textarea"?kl.textareaLayout:null],className:e});return v.jsx("span",{className:s.className,style:s.style,children:v.jsx(vn,{ref:t,...n})})}function Fq({className:e,disabled:t,ref:n,...r}){const s=ca(),a=s.disabled?!0:t,l=En({rootClass:"ui-input-group__addon",stylexStyles:[kl.base,s.layout==="textarea"?kl.textareaLayout:null],className:e});return v.jsx("span",{className:l.className,style:l.style,children:v.jsx(po,{ref:n,disabled:a,...r})})}function Uq({className:e,disabled:t,ref:n,...r}){const s=ca(),a=s.disabled?!0:t,l=En({rootClass:"ui-input-group__addon",stylexStyles:[kl.base,s.layout==="textarea"?kl.textareaLayout:null],className:e});return v.jsx("span",{className:l.className,style:l.style,children:v.jsx(Gn,{ref:n,disabled:a,...r})})}function qq({className:e,children:t}){const n=ca(),r=En({rootClass:"ui-input-group__span",stylexStyles:[C1.base,n.mono?C1.mono:null],className:e});return v.jsx("span",{className:r.className,style:r.style,children:t})}const Gd=Object.assign(A1,{Root:A1,Input:Pq,Textarea:$q,Icon:Bq,IconButton:Fq,Button:Uq,Span:qq,useContext:ca});function Bh({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,...c}){return v.jsxs(Gd.Root,{className:e,variant:t,size:n,disabled:s,children:[a!=null&&v.jsx(Gd.Icon,{name:a}),v.jsx(Gd.Input,{ref:r,...c}),l!=null&&v.jsx(Gd.Icon,{name:l})]})}function fN(){const e=x.useContext(Ph),t=x.useContext(Jv),n=e??t;if(!n)throw new Error("useMenuLayerContext must be used within a <Menu> or <Menu.SubMenu>");return n}function Hq({placeholder:e="Search...","aria-label":t,className:n,value:r,onValueChange:s,autoFocus:a=!1}){const c=Qc()==="body",{searchValue:d,setSearchValue:p,searchInputRef:h,activeIndex:m,setActiveIndex:g,listRef:y,setHasSearchInput:k}=fN(),S=x.useRef(null),T=r!==void 0&&s!==void 0,R=!T||a?h:S,_=T?r:d;x.useEffect(()=>{if(!T)return k(!0),()=>k(!1)},[T,k]),x.useLayoutEffect(()=>{if(T&&!a)return;const $=h.current;if(!$)return;$.focus({preventScroll:!0});const H=requestAnimationFrame(()=>{document.activeElement!==$&&$.focus({preventScroll:!0})});return()=>cancelAnimationFrame(H)},[T,a,h]);const C=$=>{T?s($.target.value):(p($.target.value),EA(y,"body",g),s?.($.target.value))},A=$=>{if(xx($))return;if($.ctrlKey&&!$.metaKey){const L=$.key.toLowerCase();if(L==="n"||L==="p"){$.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes($.key)&&!$.metaKey&&!$.ctrlKey&&!$.altKey&&$.stopPropagation(),T){$.key==="Enter"&&($.preventDefault(),$.stopPropagation());return}if($.key==="Enter"&&m!=null){$.preventDefault();const L=y.current[m];L&&(L.click(),h.current?.focus())}if($.key==="ArrowRight"){const L=$.currentTarget;if(!(L.selectionStart===L.value.length&&L.selectionEnd===L.value.length))return;k1({event:$,direction:"ArrowRight",activeIndex:m,listRef:y,restoreFocus:()=>h.current?.focus()});return}if($.key==="ArrowLeft"){const L=$.currentTarget;if(!(L.selectionStart===0&&L.selectionEnd===0))return;k1({event:$,direction:"ArrowLeft",activeIndex:m,listRef:y,restoreFocus:()=>h.current?.focus()})}},N=j9(n),I=v.jsx(Bh,{ref:R,type:"text",variant:"unfilled",size:"base",value:_,onChange:C,onKeyDown:A,placeholder:e,"aria-label":t??"Search menu items"});return c?v.jsx("li",{className:N.className,style:N.style,role:"none",children:I}):v.jsx("div",{className:N.className,style:N.style,role:"none",children:I})}function Gq({children:e,title:t,textAction:n,tooltip:r,noDivider:s}){const a=_1(),l=nN(n!=null),c=P9(),d=v.jsxs("div",{role:"group","aria-label":typeof t=="string"?t:void 0,className:a.className,style:a.style,"data-menu-section":!0,"data-no-divider":s||void 0,children:[t&&v.jsxs("div",{role:"presentation",className:l.className,style:l.style,"data-has-action":n!=null||void 0,children:[v.jsx("span",{children:t}),n!=null?v.jsx("button",{type:"button",className:c.className,style:c.style,onClick:n.onClick,children:n.label}):null]}),e]});if(r!=null){const p=_1();return v.jsx(Lh,{content:r,placement:"right",offset:6,openDelay:0,closeDelay:0,className:Dh,sameAxisOnly:!0,children:v.jsx("div",{className:p.className,style:p.style,"data-menu-section":!0,"data-no-divider":s||void 0,children:d})})}return d}const Vq=x.createContext(void 0);function Kq(){const e=x.useContext(Vq);if(e===void 0)throw new Error(Xn(63));return e}let N1=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",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 Zq={...Gc,checked(e){return e?{[N1.checked]:""}:{[N1.unchecked]:""}}},Wq=x.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{state:c}=Vc(),d=Kq(),p={...c,...d};return xn("span",t,{state:p,ref:n,stateAttributesMapping:Zq,props:l})}),Yq="md",O1={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kmuXW:"ui-2lah0s",kaIpWk:"ui-1i4c3av",kMeerF:"ui-1k57tk5 ui-x510wv",k3XXqK:"ui-1t137rt ui-15veape",kjBf7l:"ui-1uczgqu ui-1whe2fk",kInvED:"ui-1wfwxd8 ui-1edn9mt",kSiTet:"ui-1hc1fzr ui-vlaemc",kWkggS:"ui-59yu97 ui-1jnhqrh",k1ekBW:"ui-15406qy",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-23j0i4",kZKoxP:"ui-1vatr1o","--ui-switch-thumb-travel":"ui-sc32xf",$$css:!0},md:{kzqmXN:"ui-1td3qas",kZKoxP:"ui-1a6rlst","--ui-switch-thumb-travel":"ui-9pb0k7",$$css:!0},lg:{kzqmXN:"ui-1guw455",kZKoxP:"ui-1e94bgo","--ui-switch-thumb-travel":"ui-1c3f5sz",$$css:!0}},Xq={primary:{"--ui-switch-active-bg":"ui-i0s8m6",$$css:!0},green:{"--ui-switch-active-bg":"ui-1g3p0vo",$$css:!0},neutral:{"--ui-switch-active-bg":"ui-742exl",$$css:!0}};function Qq({interactive:e,size:t,variant:n}){const r=v.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-12peec7 ui-10z6xd1 ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?v.jsx(Wq,{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r}):v.jsx("span",{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r});return v.jsx("span",{"aria-hidden":"true",...Nn(O1.root,O1[t],Xq[n]),children:s})}function Jq({checked:e,disabled:t,size:n=Yq,variant:r="green"}){return v.jsx("span",{"aria-hidden":"true","data-component":"switch","data-size":n,"data-variant":r,"data-checked":e||void 0,"data-disabled":t||void 0,className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker",children:v.jsx(Qq,{interactive:!1,size:n,variant:r})})}function e8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return yx(s,n)?v.jsx(t8,{...r,itemLabel:s,children:e}):null}function t8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,trailing:d,tooltip:p,closeOnSelect:h,topAlign:m=!1,itemLabel:g}){const{activeIndex:y,getItemProps:k,setIsOpen:S,closeOnSelect:T}=Jc(),{shouldAllowPointerInteraction:E}=Ci(),R=jh(),_=bx(),C=Qc(),A=C==="body",N=h??T??!1,[I,$]=x.useState(r),H=n!==void 0,L=H?n:I,{ref:Z,index:K}=kh({label:g||null}),q=y===K,z=zh(),j=x.useCallback(()=>{if(a)return;const O=!L;H||$(O);const ie={defaultPrevented:!1,preventDefault:()=>{ie.defaultPrevented=!0}};s?.(O,ie),N&&!ie.defaultPrevented&&_(S)},[a,L,H,s,N,S,_]),F=x.useCallback(O=>{if(!E(O.nativeEvent)){O.preventDefault(),O.stopPropagation();return}O.preventDefault(),O.stopPropagation(),j()},[j,E]),U=x.useCallback(O=>{a||(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),j())},[a,j]),P=k({onClick:F,onKeyDown:U}),W=A9({disabled:a,focused:q,inSubmenu:R,topAlign:m}),D={role:"menuitemcheckbox","aria-checked":L,tabIndex:q?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-disabled":a||void 0,"data-focused":q||void 0,"data-top-align":m||void 0,...t?{"data-testid":t}:{},[Ml]:C,className:W.className,style:W.style,...P},B=v.jsx(xl,{disabled:a,leading:c,trailing:d,trailingAccessory:v.jsx(Jq,{checked:L,disabled:a,size:"sm",variant:l}),children:e}),G=A?v.jsx("li",{ref:Z,...D,children:B}):v.jsx("div",{ref:Z,...D,children:B});return p!=null?v.jsx(Lh,{content:p,placement:"right",offset:6,openDelay:0,closeDelay:0,disabled:z?.hasOpenChild??!1,className:Dh,sameAxisOnly:!0,children:G}):G}function n8({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=D9(n),a=z9(n),l=L9({inline:n,wrap:r});return v.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[v.jsx(Vp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?v.jsx(Vp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const r8=24;function i8({title:e,divider:t}){const n=nN(!1),r=$9();return v.jsxs(v.Fragment,{children:[t?v.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?v.jsx("div",{role:"presentation",className:n.className,style:{...n.style,height:r8,boxSizing:"border-box",overflow:"hidden"},children:v.jsx("span",{children:e})}):null]})}const yc=typeof window<"u"?x.useLayoutEffect:x.useEffect;function M1(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function s8({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:d}=x.useMemo(()=>({styleHeight:M1(l?.height),styleWidth:M1(l?.width)}),[l?.height,l?.width]),[p,h]=x.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&d!==void 0;return yc(()=>{if(s===null||m)return;const g=new ResizeObserver(y=>{for(const k of y){const{contentRect:S,target:T}=k;s===T&&h(E=>E.height===S.height&&E.width===S.width?E:{height:S.height,width:S.width})}});return g.observe(s,{box:e}),()=>{g?.unobserve(s)}},[e,m,s,c,d]),x.useMemo(()=>({height:c??p.height,width:d??p.width}),[p,c,d])}function o8(e){const t=x.useRef(()=>{throw new Error("Cannot call during render.")});return yc(()=>{t.current=e},[e]),x.useCallback(n=>t.current?.(n),[t])}function $b({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function uo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function rc(e,t){if(e===t)return!0;if(!!e!=!!t||(uo(e!==void 0),uo(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function dN({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n=="number")return t*n;{const r=e.get(e.size===0?0:e.size-1);uo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function a8({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:s,containerScrollOffset:a,containerSize:l}){if(n<0||n>=r)throw RangeError(`Invalid index specified: ${n}`,{cause:`Index ${n} is not within the range of 0 - ${r-1}`});const c=dN({cachedBounds:t,itemCount:r,itemSize:s}),d=t.get(n),p=Math.max(0,Math.min(c-l,d.scrollOffset)),h=Math.max(0,d.scrollOffset-l+d.size);switch(e==="smart"&&(a>=h&&a<=p?e="auto":e="center"),e){case"start":return p;case"end":return h;case"center":return d.scrollOffset<=l/2?0:d.scrollOffset+d.size/2>=c-l/2?c-l:d.scrollOffset+d.size/2-l/2;default:return a>=h&&a<=p?a:a<h?h:p}}function I1({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,d=0,p=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,d=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),p=Math.min(r-1,c+s),l<0&&(l=0,c=-1,d=0,p=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:d,stopIndexOverscan:p}}function l8({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(uo(s<e,`Invalid index ${s}`);r.size-1<s;){const l=r.size;let c;switch(typeof n){case"function":{c=n(l,t);break}case"number":{c=n;break}}if(l===0)r.set(l,{size:c,scrollOffset:0});else{const d=r.get(l-1);uo(d!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:d.scrollOffset+d.size,size:c})}}const a=r.get(s);return uo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function u8({itemCount:e,itemProps:t,itemSize:n}){return x.useMemo(()=>l8({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function c8({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(uo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),uo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function f8({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:d,overscanCount:p}){const[h,m]=x.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:g,startIndexOverscan:y,stopIndexVisible:k,stopIndexOverscan:S}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:T=n,width:E=n}=s8({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),R=x.useRef({height:0,width:0}),_=T,C=c8({containerSize:_,itemSize:c});x.useLayoutEffect(()=>{if(typeof d=="function"){const L=R.current;(L.height!==T||L.width!==E)&&(d({height:T,width:E},{...L}),L.height=T,L.width=E)}},[T,d,E]);const A=u8({itemCount:a,itemProps:l,itemSize:C}),N=x.useCallback(L=>A.get(L),[A]),I=x.useCallback(()=>dN({cachedBounds:A,itemCount:a,itemSize:C}),[A,a,C]),$=x.useCallback(L=>{const Z=$b({containerElement:e,direction:r,isRtl:s,scrollOffset:L});return I1({cachedBounds:A,containerScrollOffset:Z,containerSize:_,itemCount:a,overscanCount:p})},[A,e,_,r,s,a,p]);yc(()=>{const L=e?.scrollTop??0;m($(L))},[e,r,$]),yc(()=>{if(!e)return;const L=()=>{m(Z=>{const{scrollLeft:K,scrollTop:q}=e,z=$b({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),j=I1({cachedBounds:A,containerScrollOffset:z,containerSize:_,itemCount:a,overscanCount:p});return rc(j,Z)?Z:j})};return e.addEventListener("scroll",L),()=>{e.removeEventListener("scroll",L)}},[A,e,_,r,a,p]);const H=o8(({align:L="auto",containerScrollOffset:Z,index:K})=>{let q=a8({align:L,cachedBounds:A,containerScrollOffset:Z,containerSize:_,index:K,itemCount:a,itemSize:C});if(e){if(q=$b({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),typeof e.scrollTo!="function"){const z=$(q);rc(h,z)||m(z)}return q}});return{getCellBounds:N,getEstimatedSize:I,scrollToIndex:H,startIndexOverscan:y,startIndexVisible:g,stopIndexOverscan:S,stopIndexVisible:k}}function d8(e){return x.useMemo(()=>e,Object.values(e))}function p8(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return rc(n,a)&&rc(r,l)&&rc(s,c)}function h8(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const m8="data-react-window-index";function g8({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:d,rowHeight:p,rowProps:h,tagName:m="div",style:g,...y}){const k=d8(h),S=x.useMemo(()=>x.memo(c,p8),[c]),[T,E]=x.useState(null),R=h8(p),_=x.useMemo(()=>R?q=>p.getRowHeight(q)??p.getAverageRowHeight():p,[R,p]),{getCellBounds:C,getEstimatedSize:A,scrollToIndex:N,startIndexOverscan:I,startIndexVisible:$,stopIndexOverscan:H,stopIndexVisible:L}=f8({containerElement:T,containerStyle:g,defaultContainerSize:n,direction:"vertical",itemCount:d,itemProps:k,itemSize:_,onResize:s,overscanCount:l});x.useImperativeHandle(r,()=>({get element(){return T},scrollToRow({align:q="auto",behavior:z="auto",index:j}){const F=N({align:q,containerScrollOffset:T?.scrollTop??0,index:j});typeof T?.scrollTo=="function"&&T.scrollTo({behavior:z,top:F})}}),[T,N]),yc(()=>{if(!T)return;const q=Array.from(T.children).filter((z,j)=>{if(z.hasAttribute("aria-hidden"))return!1;const F=`${I+j}`;return z.setAttribute(m8,F),!0});if(R)return p.observeRowElements(q)},[T,R,p,I,H]),x.useEffect(()=>{I>=0&&H>=0&&a&&a({startIndex:$,stopIndex:L},{startIndex:I,stopIndex:H})},[a,I,$,H,L]);const Z=x.useMemo(()=>{const q=[];if(d>0)for(let z=I;z<=H;z++){const j=C(z);q.push(x.createElement(S,{...k,ariaAttributes:{"aria-posinset":z+1,"aria-setsize":d,role:"listitem"},key:z,index:z,style:{position:"absolute",left:0,transform:`translateY(${j.scrollOffset}px)`,height:R?void 0:j.size,width:"100%"}}))}return q},[S,C,R,d,k,I,H]),K=v.jsx("div",{"aria-hidden":!0,style:{height:A(),width:"100%",zIndex:-1}});return x.createElement(m,{role:"list",...y,className:t,ref:E,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...g}},Z,e,K)}const pN=x.createContext(null);function b8(){const e=x.useContext(pN);if(!e)throw new Error("VirtualizedMenuItem must be used within Menu.VirtualizedContent");return e}function y8({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=x.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return v.jsx(pN.Provider,{value:c,children:e})}const v8=4,D1="ui-menu--virtualized";function x8({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,d=q9();return v.jsx("div",{className:d.className,style:{...t,...d.style},onMouseMove:()=>a(e),children:s(l,e,c)})}function k8({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:d,style:p,maxHeight:h,width:m="200px",size:g,backdrop:y,closeOnSelect:k=!0,overscanCount:S=5,renderActivePreview:T,ref:E}){const R=Al(),{isOpen:_,isMounted:C,activeIndex:A,setActiveIndex:N,setIsOpen:I,virtualFocus:$,enableHover:H,nodeId:L,listRef:Z,labelsRef:K,searchValue:q,refs:z,floatingStyles:j,middlewareData:F,transitionStyles:U,context:P,getFloatingProps:W,getItemProps:D,dismissCauseRef:B,returnFocusOnSelect:G}=Ci(),O=x.useRef(null),ie=x.useRef(null),te=x.useRef(A);te.current=A;const ne=x.useRef(null),[le,pe]=x.useState(null),[ye,Se]=x.useState(null),ze=y??!H,he=Nh(),{portalLayerStyles:Te}=qc("popover",C),Re=x.useRef(null);x.useEffect(()=>{r?K.current=e.map(Y=>r(Y)):K.current=e.map(()=>null),Z.current.length!==e.length&&(Z.current.length=e.length)},[e,r,K,Z]);const Oe=P.placement.startsWith("top"),ve=Oe&&C?F.bottomAnchor?.bottom??null:null,xe=x.useRef(null);x.useLayoutEffect(()=>{if(!_){xe.current=null,Re.current=null;return}if(A==null||xe.current===A)return;xe.current=A;const Y=Re.current===A;Re.current=null,!Y&&(A<0||A>=e.length||ie.current?.scrollToRow({index:A,align:"smart",behavior:"instant"}))},[_,A,e.length]);const Me=x.useRef(q),Ce=x.useRef(_);x.useEffect(()=>{const Y=Me.current,X=Ce.current;Me.current=q,Ce.current=_,!(!_||!X||Y===q)&&(e.length>0&&ie.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),N(e.length>0?0:null))},[_,e.length,q,N]);const Pe=x.useCallback((Y,X)=>{ne.current=Y,pe(we=>we===Y?we:Y),Se(we=>we===X?we:X)},[]);x.useLayoutEffect(()=>{if(!_||A==null||A<0||A>=e.length){Pe(null,null);return}const Y=Z.current[A];Y!=null&&Pe(Y,A)},[A,_,e.length,Z,Pe]);const ge=x.useCallback((Y,X)=>{Y===te.current&&X!=null&&Pe(X,Y)},[Pe]),ce=x.useCallback(Y=>{A!==Y&&(Re.current=Y,N(Y))},[A,N]),oe=x.useCallback(Y=>{Y.key==="Escape"&&(B.current="escape")},[B]),re=x.useCallback(Y=>{he(Y.nativeEvent)&&(B.current="backdrop",I(!1))},[B,I,he]),_e=x.useCallback(Y=>{if(!he(Y.nativeEvent))return;Y.preventDefault(),B.current="backdrop",I(!1);const Ge=document.elementsFromPoint(Y.clientX,Y.clientY).find(lt=>!lt.classList.contains(sx));Ge&&Ge.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Y.clientX,clientY:Y.clientY,screenX:Y.screenX,screenY:Y.screenY,button:Y.button,buttons:Y.buttons,ctrlKey:Y.ctrlKey,shiftKey:Y.shiftKey,altKey:Y.altKey,metaKey:Y.metaKey}))},[B,I,he]),J=Zc([z.setFloating,O,E]),fe=Nl();if(!C)return null;const Ie=h??K9,Ue=typeof t=="number"?e.length*t:e.reduce((Y,X,we)=>Y+t(we),0),Ze=Math.min(Ue,Math.max(0,Ie-v8*2)),Ye=g??R?.menuSize??"sm",ot={...j,...U,...p,...mx({width:m}),...Te,...Oe&&ve!==null?{top:"auto",bottom:ve}:{}},it=QA(Te),nt=ox({className:d?`${D1} ${d}`:D1,size:Ye,style:ot}),vt=JA(),st=eN(),xt=lx(),We=ax(!0),Ot=H9(),Be=tN(),Ke=_&&ye!=null&&ye>=0&&ye<e.length&&le!=null&&T!=null?T(ye,{rowElement:le,menuContentElement:O.current}):null,ht=Ke!=null&&le!=null,Xe={items:e,activeIndex:A,renderItem:n,onMouseMove:ce};return v.jsxs(Uv,{...fe?{root:fe}:{},children:[ze&&v.jsx("div",{className:it.className,style:it.style,onClick:re,onContextMenu:_e,role:"none"}),v.jsx(Hv,{context:P,initialFocus:-1,returnFocus:B.current!=="backdrop"&&(B.current!=="selection"||G),modal:!$&&_,children:v.jsx("div",{ref:J,className:nt.className,style:nt.style,tabIndex:-1,"data-size":Ye,...W({onKeyDown:oe,onMouseDown:$?Y=>{Y.stopPropagation()}:void 0}),children:v.jsx(Ts,{menuSize:Ye,children:v.jsx("div",{className:vt.className,style:vt.style,role:"menu","aria-label":c??"Menu",children:v.jsx(bA,{dismiss:!_,children:v.jsx(hx,{layerNodeId:L,children:v.jsxs(y8,{activeIndex:A,setIsOpen:I,getItemProps:D,listRef:Z,closeOnSelect:k,onRowElementChange:ge,children:[s!=null?v.jsx("div",{className:st.className,style:st.style,children:v.jsx(nc,{value:"header",children:s})}):null,e.length>0?v.jsx("div",{className:xt.className,style:xt.style,children:v.jsx("div",{className:We.className,style:We.style,role:"presentation",children:v.jsx(g8,{listRef:ie,className:Ot.className,rowComponent:x8,rowProps:Xe,rowCount:e.length,rowHeight:t,overscanCount:S,style:{height:Ze,width:"100%",overflowX:"hidden",scrollbarWidth:"none"}})})}):l,a!=null?v.jsx("div",{className:Be.className,style:Be.style,children:v.jsx(nc,{value:"footer",children:a})}):null,T!=null?v.jsx(oN,{open:ht,placement:"right-start",anchorRef:ne,offset:6,closeOnSelect:!1,virtualFocus:!0,children:ht?Ke:null}):null]})})})})})})})]})}function S8({index:e,children:t,disabled:n=!1,onSelect:r,leading:s,trailing:a,wideLeftSection:l=!1,tooltip:c,tooltipContentKey:d,closeOnSelect:p,description:h,variant:m="default",checked:g,ref:y}){const{shouldAllowPointerInteraction:k}=Ci(),S=jh(),{activeIndex:T,setIsOpen:E,getItemProps:R,listRef:_,closeOnSelect:C,onRowElementChange:A}=b8(),N=p??C??!0,I=T===e,$=x.useCallback(G=>{_.current[e]=G,A?.(e,G),typeof y=="function"?y(G):y&&(y.current=G)},[e,_,A,y]),H=()=>{if(n)return;const G={defaultPrevented:!1,preventDefault:()=>{G.defaultPrevented=!0}};r?.(G),N&&!G.defaultPrevented&&E(!1)},K=R({onClick:G=>{if(!k(G.nativeEvent)){G.preventDefault(),G.stopPropagation();return}H()},onKeyDown:G=>{n||(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),H())}}),q=cx(),z=fx(),j=dx(),F=h!=null?v.jsxs("div",{className:q.className,style:q.style,children:[v.jsx("div",{className:z.className,style:z.style,children:t}),v.jsx("div",{className:j.className,style:j.style,children:h})]}):t,U=ux({disabled:n,focused:I,hasDescription:h!=null,inSubmenu:S,variant:m}),P=g!==void 0,W=P&&s==null?v.jsx(lC,{checked:g,disabled:n}):s,D=P?{role:"menuitemcheckbox","aria-checked":g,"data-checked":g||void 0}:{role:"menuitem"},B=v.jsx("li",{ref:$,...D,tabIndex:I?0:-1,"aria-disabled":n||void 0,"data-disabled":n||void 0,"data-focused":I||void 0,"data-has-description":h!=null||void 0,"data-variant":m!=="default"?m:void 0,"data-wide-left":l||void 0,[Ml]:"body",className:U.className,style:U.style,...K,children:v.jsx(xl,{disabled:n,hasDescription:h!=null,leading:W,trailing:a,wideLeft:l,children:F})});return c!=null?v.jsx(gx,{content:c,contentKey:d,children:B}):B}const Fh={root:{kUk6DE:"ui-98rzlu",kZKoxP:"ui-5yr21d",kAzted:"ui-2lwn1j",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kORKVm:"ui-1odjw0f",kLKAdn:"ui-1jowytg",kpe85a:"ui-1o9oefx",kGO01o:"ui-10ha4xm",kE3dHu:"ui-1cc8a3a",kB7OPa:"ui-9f619",$$css:!0},content:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",k9WMMc:"ui-2b8uid",ks0D6T:"ui-1dt7z5j",kzqmXN:"ui-izo9zl",kOIVth:"ui-11twubx",$$css:!0},message:{kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0},actions:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kwnvtZ:"ui-1a02dak",kOIVth:"ui-ehausa",keoZOQ:"ui-1e66mq1",$$css:!0}};function w8(){return Fh.root}function E8(){return Fh.content}function T8(){return Fh.message}function _8(){return Fh.actions}function vc({message:e,actions:t,errorText:n,className:r}){const s=En({rootClass:"ui-empty-state",stylexStyles:w8(),className:r}),a=Nn(E8()),l=Nn(T8()),c=Nn(_8());return v.jsx("div",{className:s.className,style:s.style,children:v.jsxs("div",{className:a.className,style:a.style,children:[v.jsx(Vp,{as:"p",className:l.className,style:l.style,color:"tertiary",size:"lg",children:e}),n!=null?v.jsx(Vp,{as:"p",className:l.className,style:l.style,color:"red",size:"lg",children:n}):null,t!=null?v.jsx("div",{className:c.className,style:c.style,children:t}):null]})})}const hN=x.createContext(null);function mN(){const e=x.useContext(hN);if(!e)throw new Error("Menu.ExpandableSection components must be used within <Menu.ExpandableSection>");return e}function R8({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=x.useState(t),l=n!==void 0,c=l?n:s,d=h=>{l||a(h),r?.(h)},p=()=>d(!c);return v.jsx(hN.Provider,{value:{expanded:c,setExpanded:d,toggle:p},children:e})}function C8({children:e,leading:t,trailing:n,label:r}){const{expanded:s,setExpanded:a,toggle:l}=mN(),c=typeof t=="function"?t(s):t,d=p=>{if(p.key==="ArrowRight"&&!s){p.preventDefault(),p.stopPropagation(),a(!0);return}p.key==="ArrowLeft"&&s&&(p.preventDefault(),p.stopPropagation(),a(!1))};return v.jsx(lN,{closeOnSelect:!1,wideLeftSection:!0,leading:c,trailing:n,label:r??(typeof e=="string"?e:void 0),onKeyDown:d,onSelect:l,children:e})}function A8({children:e}){const{expanded:t}=mN();return t?v.jsx(v.Fragment,{children:e}):null}function N8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return yx(s,n)?v.jsx(O8,{...r,itemLabel:s,children:e}):null}function O8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:d,tooltipOpenDelay:p=0,tooltipCloseDelay:h=0,closeOnSelect:m,itemLabel:g}){const{activeIndex:y,getItemProps:k,setIsOpen:S,closeOnSelect:T}=Jc(),{shouldAllowPointerInteraction:E}=Ci(),R=jh(),_=bx(),C=Qc(),A=C==="body",N=m??T??!1,[I,$]=x.useState(r),H=n!==void 0,L=H?n:I,{ref:Z,index:K}=kh({label:g||null}),q=y===K,z=zh(),j=x.useCallback(()=>{if(a)return;const Se=!L;H||$(Se);const ze={defaultPrevented:!1,preventDefault:()=>{ze.defaultPrevented=!0}};s?.(Se,ze),N&&!ze.defaultPrevented&&_(S)},[a,L,H,s,N,S,_]),F=x.useCallback(Se=>{if(!E(Se.nativeEvent)){Se.preventDefault(),Se.stopPropagation();return}Se.preventDefault(),Se.stopPropagation(),j()},[j,E]),U=x.useCallback(Se=>{a||(Se.key==="Enter"||Se.key===" ")&&(Se.preventDefault(),Se.stopPropagation(),j())},[a,j]),P=k({onClick:F,onKeyDown:U}),W=c!=null,D=ux({disabled:a,focused:q,hasDescription:W,inSubmenu:R}),B={role:"menuitemcheckbox","aria-checked":L,tabIndex:q?0:-1,"aria-disabled":a||void 0,"data-checked":L||void 0,"data-disabled":a||void 0,"data-focused":q||void 0,"data-has-description":W||void 0,...t?{"data-testid":t}:{},[Ml]:C,className:D.className,style:D.style,...P},G=v.jsx(lC,{checked:L,disabled:a}),O=cx(),ie=fx(),te=dx(),ne=W?v.jsxs("div",{className:O.className,style:O.style,children:[v.jsx("div",{className:ie.className,style:ie.style,children:e}),v.jsx("div",{className:te.className,style:te.style,children:c})]}):e,le=v.jsx(xl,{disabled:a,hasDescription:W,leading:G,trailing:l,children:ne}),pe=d!=null&&z!=null,ye=A?v.jsx("li",{ref:Z,...B,children:le}):v.jsx("div",{ref:Z,...B,children:le});return pe?v.jsx(rN,{closeDelay:h,content:d,openDelay:p,children:ye}):d!=null?v.jsx(Lh,{content:d,placement:"right",offset:6,openDelay:p,closeDelay:h,className:Dh,sameAxisOnly:!0,interactive:!0,children:ye}):ye}function M8({children:e}){const t=U9();return v.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[v.jsx(vn,{name:"loading",size:"base",className:G9}),v.jsx("span",{children:e??"Loading..."})]})}function z1({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:p,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:y,virtualFocus:k,shouldKeepOpenDuringDrag:S,lockPositionWhileOpen:T}){return v.jsx($F,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:p,instantClose:h,instantTransitions:m,returnFocusOnSelect:g,focusItemOnOpen:y,virtualFocus:k,shouldKeepOpenDuringDrag:S,lockPositionWhileOpen:T,children:e})}function I8(e){return go()===null?v.jsx(M$,{children:v.jsx(z1,{...e})}):v.jsx(z1,{...e})}function gN(e,t,n){const{ref:r,...s}=n,a=GP({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function D8({children:e,disabled:t=!1}){const{getTriggerProps:n}=Ci();return gN(e,t,n())}function z8({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Ci();x.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return gN(e,n,{...l,onPointerDown:c=>{l.onPointerDown?.(c),c.button===2&&a(!1)},onContextMenu:c=>{l.onContextMenu?.(c),a(!1),c.stopPropagation()},onClick:c=>{t&&(c.preventDefault(),c.stopPropagation(),t(c))}})}const L8=Object.assign(oN,{useContext:$h}),Pu=Object.assign(I8,{useContext:Ci,useLayerContext:fN,Trigger:D8,HoverTrigger:z8,Content:Y9,Item:lN,CheckboxItem:N8,TextItem:n8,SwitchItem:e8,Section:Gq,SearchInput:Hq,EmptyState:X9,LoadingState:M8,ExpandableSection:R8,ExpandableSectionTrigger:C8,ExpandableSectionContent:A8,SubMenu:L8,SubMenuItem:dq,SubMenuTrigger:fq,SubMenuContent:pq,VirtualizedContent:k8,VirtualizedItem:S8,VirtualizedSectionHeader:i8}),bN="data-composite-item-active",yN=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function j8(){return x.useContext(yN)}let vN=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function xN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:p,labelsRef:h,nextIndexRef:m}=j8(),g=x.useRef(-1),[y,k]=x.useState(a??(s===vN.GuessFromOrder?()=>{if(g.current===-1){const E=m.current;m.current+=1,g.current=E}return g.current}:-1)),S=x.useRef(null),T=x.useCallback(E=>{if(S.current=E,y!==-1&&E!==null&&(p.current[y]=E,h)){const R=t!==void 0;h.current[y]=R?t:r?.current?.textContent??E.textContent}},[y,p,h,t,r]);return He(()=>{if(a!=null)return;const E=S.current;if(E)return l(E,n),()=>{c(E)}},[a,l,c,n]),He(()=>{if(a==null)return d(E=>{const R=S.current?E.get(S.current)?.index:null;R!=null&&k(R)})},[a,d,k]),x.useMemo(()=>({ref:T,index:y}),[y,T])}function P8(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=eR(),{ref:s,index:a}=xN(e),l=n===a,c=x.useRef(null),d=ks(s,c);return{compositeProps:x.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!m&&h.focus()}}),[l,r,a,t]),compositeRef:d,index:a}}function jy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function kx(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ve(s),l=x.useRef(0),c=wr(B8).current,d=wr($8).current,[p,h]=x.useState(0),m=x.useRef(p),g=Ve((E,R)=>{d.set(E,R??null),m.current+=1,h(m.current)}),y=Ve(E=>{d.delete(E),m.current+=1,h(m.current)}),k=x.useMemo(()=>{const E=new Map;return Array.from(d.keys()).filter(_=>_.isConnected).sort(F8).forEach((_,C)=>{const A=d.get(_)??{};E.set(_,{...A,index:C})}),E},[d,p]);He(()=>{if(typeof MutationObserver!="function"||k.size===0)return;const E=new MutationObserver(R=>{const _=new Set,C=A=>_.has(A)?_.delete(A):_.add(A);R.forEach(A=>{A.removedNodes.forEach(C),A.addedNodes.forEach(C)}),_.size===0&&(m.current+=1,h(m.current))});return k.forEach((R,_)=>{_.parentElement&&E.observe(_.parentElement,{childList:!0})}),()=>{E.disconnect()}},[k]),He(()=>{m.current===p&&(n.current.length!==k.size&&(n.current.length=k.size),r&&r.current.length!==k.size&&(r.current.length=k.size),l.current=k.size),a(k)},[a,k,n,r,p]),He(()=>()=>{n.current=[]},[n]),He(()=>()=>{r&&(r.current=[])},[r]);const S=Ve(E=>(c.add(E),()=>{c.delete(E)}));He(()=>{c.forEach(E=>E(k))},[c,k]);const T=x.useMemo(()=>({register:g,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,y,S,n,r,l]);return v.jsx(yN.Provider,{value:T,children:t})}function $8(){return new Map}function B8(){return new Set}function F8(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}function U8(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const q8=[];function H8(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:s,dense:a=!1,orientation:l="both",direction:c,highlightedIndex:d,onHighlightedIndexChange:p,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:y,modifierKeys:k=q8}=e,[S,T]=x.useState(0),E=n>1,R=x.useRef(null),_=ks(R,h),C=x.useRef([]),A=x.useRef(!1),N=d??S,I=Ve((Z,K=!1)=>{if((p??T)(Z),K){const q=C.current[Z];hE(R.current,q,c,l)}}),$=Ve(Z=>{if(Z.size===0||A.current)return;A.current=!0;const K=Array.from(Z.keys()),q=K.find(j=>j?.hasAttribute(bN))??null,z=q?K.indexOf(q):-1;z!==-1&&I(z),hE(R.current,q,c,l)}),H=Ve((Z,K,q)=>s?s?.(Z,K,q,C):q),L=x.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:_,onFocus(Z){const K=R.current,q=gr(Z.nativeEvent);!K||q==null||!pE(q)||q.setSelectionRange(0,q.value.length??0)},onKeyDown(Z){const K=m?Tj:nC;if(!K.has(Z.key)||G8(Z,k)||!R.current)return;const z=c==="rtl",j=z?pc:ll,F={horizontal:j,vertical:Ho,both:j}[l],U=z?ll:pc,P={horizontal:U,vertical:al,both:U}[l],W=gr(Z.nativeEvent);if(W!=null&&pE(W)&&!U8(W)){const ne=W.selectionStart,le=W.selectionEnd,pe=W.value??"";if(ne==null||Z.shiftKey||ne!==le||Z.key!==P&&ne<pe.length||Z.key!==F&&ne>0)return}let D=N;const B=cp(C,y),G=ky(C,y);if(E){const ne=t||Array.from({length:C.current.length},()=>({width:1,height:1})),le=bR(ne,n,a),pe=le.findIndex(Se=>Se!=null&&!vs(C.current,Se,y)),ye=le.reduce((Se,ze,he)=>ze!=null&&!vs(C.current,ze,y)?he:Se,-1);D=le[gR(le.map(Se=>Se!=null?C.current[Se]:null),{event:Z,orientation:l,loopFocus:r,onLoop:H,cols:n,disabledIndices:vR([...y||C.current.map((Se,ze)=>vs(C.current,ze)?ze:void 0),void 0],le),minIndex:pe,maxIndex:ye,prevIndex:yR(N>G?B:N,ne,le,n,Z.key===Ho?"bl":Z.key===ll?"tr":"tl"),rtl:z})]}const O={horizontal:[j],vertical:[Ho],both:[j,Ho]}[l],ie={horizontal:[U],vertical:[al],both:[U,al]}[l],te=E?K:{horizontal:m?wj:eC,vertical:m?Ej:tC,both:K}[l];m&&(Z.key===Fc?D=B:Z.key===Uc&&(D=G)),D===N&&(O.includes(Z.key)||ie.includes(Z.key))&&(r&&D===G&&O.includes(Z.key)?(D=B,s&&(D=s(Z,N,D,C))):r&&D===B&&ie.includes(Z.key)?(D=G,s&&(D=s(Z,N,D,C))):D=dr(C.current,{startingIndex:D,decrement:ie.includes(Z.key),disabledIndices:y})),D!==N&&!fc(C.current,D)&&(g&&Z.stopPropagation(),te.has(Z.key)&&Z.preventDefault(),I(D,!0),queueMicrotask(()=>{C.current[D]?.focus()}))}}),[n,a,c,y,C,m,N,E,t,r,s,H,_,k,I,l,g]);return x.useMemo(()=>({props:L,highlightedIndex:N,onHighlightedIndexChange:I,elementsRef:C,disabledIndices:y,onMapChange:$,relayKeyboardEvent:L.onKeyDown}),[L,N,I,C,y,$])}function G8(e,t){for(const n of Oj.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function V8(e){const{render:t,className:n,style:r,refs:s=uc,props:a=uc,state:l=hr,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:p,orientation:h,dense:m,itemSizes:g,loopFocus:y,onLoop:k,cols:S,enableHomeAndEndKeys:T,onMapChange:E,stopEventPropagation:R=!0,rootRef:_,disabledIndices:C,modifierKeys:A,highlightItemOnHover:N=!1,tag:I="div",...$}=e,H=ex(),{props:L,highlightedIndex:Z,onHighlightedIndexChange:K,elementsRef:q,onMapChange:z,relayKeyboardEvent:j}=H8({itemSizes:g,cols:S,loopFocus:y,onLoop:k,dense:m,orientation:h,highlightedIndex:d,onHighlightedIndexChange:p,rootRef:_,stopEventPropagation:R,enableHomeAndEndKeys:T,direction:H,disabledIndices:C,modifierKeys:A}),F=xn(I,e,{state:l,ref:s,props:[L,...a,$],stateAttributesMapping:c}),U=x.useMemo(()=>({highlightedIndex:Z,onHighlightedIndexChange:K,highlightItemOnHover:N,relayKeyboardEvent:j}),[Z,K,N,j]);return v.jsx(J_.Provider,{value:U,children:v.jsx(kx,{elementsRef:q,onMapChange:P=>{E?.(P),z(P)},children:F})})}const kN=x.createContext(void 0);function Sx(){const e=x.useContext(kN);if(e===void 0)throw new Error(Xn(64));return e}let K8=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const wx={tabActivationDirection:e=>({[K8.activationDirection]:e})},Z8=x.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:d,style:p,...h}=t,m=Object.hasOwn(t,"defaultValue"),g=x.useRef([]),[y,k]=x.useState(()=>new Map),[S,T]=hc({controlled:d,default:s,name:"Tabs",state:"value"}),E=d!==void 0,[R,_]=x.useState(()=>new Map),C=x.useCallback(O=>{if(O===void 0)return null;for(const[ie,te]of R.entries())if(te!=null&&O===(te.value??te.index))return ie;return null},[R]),[A,N]=x.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:$}=A;let H=$,L=!1;I!==S&&(H=L1(I,S,l,R),L=I!=null&&S!=null&&C(S)==null);const Z=L?I:S,K=I!==Z||$!==H;He(()=>{K&&N({previousValue:Z,tabActivationDirection:H})},[Z,K,H]);const q=Ve((O,ie)=>{const te=L1(S,O,l,R);ie.activationDirection=te,a?.(O,ie),!ie.isCanceled&&T(O)}),z=Ve((O,ie)=>{k(te=>{if(te.get(O)===ie)return te;const ne=new Map(te);return ne.set(O,ie),ne})}),j=Ve((O,ie)=>{k(te=>{if(!te.has(O)||te.get(O)!==ie)return te;const ne=new Map(te);return ne.delete(O),ne})}),F=x.useCallback(O=>y.get(O),[y]),U=x.useCallback(O=>{for(const ie of R.values())if(O===ie?.value)return ie?.id},[R]),P=x.useMemo(()=>({getTabElementBySelectedValue:C,getTabIdByPanelValue:U,getTabPanelIdByValue:F,onValueChange:q,orientation:l,registerMountedTabPanel:z,setTabMap:_,unregisterMountedTabPanel:j,tabActivationDirection:H,value:S}),[C,U,F,q,l,z,_,j,H,S]),W=x.useMemo(()=>{for(const O of R.values())if(O!=null&&O.value===S)return O},[R,S]),D=x.useMemo(()=>{for(const O of R.values())if(O!=null&&!O.disabled)return O.value},[R]);He(()=>{if(E||R.size===0)return;const O=W?.disabled,ie=W==null&&S!==null;if(m&&O&&S===s||!O&&!ie)return;const ne=D??null;S!==ne&&(T(ne),N(le=>le.tabActivationDirection==="none"?le:{...le,tabActivationDirection:"none"}))},[s,D,m,E,W,T,R,S]);const G=xn("div",t,{state:{orientation:l,tabActivationDirection:H},ref:n,props:h,stateAttributesMapping:wx});return v.jsx(kN.Provider,{value:P,children:v.jsx(kx,{elementsRef:g,children:G})})});function L1(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[d,p]of r.entries()){if(p==null)continue;const h=p.value??p.index;if(e===h&&(s=d),t===h&&(a=d),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const SN=x.createContext(void 0);function wN(){const e=x.useContext(SN);if(e===void 0)throw new Error(Xn(65));return e}const W8=x.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:d=!0,style:p,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:y}=Sx(),{activateOnFocus:k,highlightedTabIndex:S,onTabActivation:T,registerTabResizeObserverElement:E,setHighlightedTabIndex:R,tabsListElement:_}=wN(),C=dh(c),A=x.useMemo(()=>({disabled:s,id:C,value:l}),[s,C,l]),{compositeProps:N,compositeRef:I,index:$}=P8({metadata:A}),H=l===m,L=x.useRef(!1),Z=x.useRef(null);x.useEffect(()=>{const G=Z.current;if(G)return E(G)},[E]),He(()=>{if(L.current){L.current=!1;return}if(!(H&&$>-1&&S!==$))return;const G=_;if(G!=null){const O=Dr(Ft(G));if(O&&kt(G,O))return}s||R($)},[H,$,S,R,s,_]);const{getButtonProps:K,buttonRef:q}=jc({disabled:s,native:d,focusableWhenDisabled:!0}),z=g(l),j=x.useRef(!1),F=x.useRef(!1);function U(G){H||s||T(l,_t(Ss,G.nativeEvent,void 0,{activationDirection:"none"}))}function P(G){H||($>-1&&!s&&R($),!s&&k&&(!j.current||j.current&&F.current)&&T(l,_t(Ss,G.nativeEvent,void 0,{activationDirection:"none"})))}function W(G){if(H||s)return;j.current=!0;function O(){j.current=!1,F.current=!1}(!G.button||G.button===0)&&(F.current=!0,Ft(G.currentTarget).addEventListener("pointerup",O,{once:!0}))}return xn("button",t,{state:{disabled:s,active:H,orientation:y},ref:[n,q,I,Z],props:[N,{role:"tab","aria-controls":z,"aria-selected":H,id:C,onClick:U,onFocus:P,onPointerDown:W,[bN]:H?"":void 0,onKeyDownCapture(){L.current=!0}},h,K]})});function Y8(){return or}function X8(){return!1}function Q8(){return!0}function J8(){return Lv.useSyncExternalStore(Y8,X8,Q8)}const e5='!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;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Za=(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 t5=x.createContext(void 0),n5={disableStyleElements:!1};function EN(){return x.useContext(t5)??n5}const r5={...wx,activeTabPosition:()=>null,activeTabSize:()=>null},i5=x.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:d}=EN(),{getTabElementBySelectedValue:p,orientation:h,tabActivationDirection:m,value:g}=Sx(),{tabsListElement:y,registerIndicatorUpdateListener:k}=wN(),S=J8(),T=J2();x.useEffect(()=>k(T),[k,T]);let E=0,R=0,_=0,C=0,A=0,N=0,I=!1;if(g!=null&&y!=null){const z=p(g);if(I=!0,z!=null){const{width:j,height:F}=E1(z),{width:U,height:P}=E1(y),W=z.getBoundingClientRect(),D=y.getBoundingClientRect(),B=U>0?D.width/U:1,G=P>0?D.height/P:1;if(Math.abs(B)>Number.EPSILON&&Math.abs(G)>Number.EPSILON){const ie=W.left-D.left,te=W.top-D.top;E=ie/B+y.scrollLeft-y.clientLeft,_=te/G+y.scrollTop-y.clientTop}else E=z.offsetLeft,_=z.offsetTop;A=j,N=F,R=y.scrollWidth-E-A,C=y.scrollHeight-_-N}}const $=x.useMemo(()=>I?{left:E,right:R,top:_,bottom:C}:null,[E,R,_,C,I]),H=x.useMemo(()=>I?{width:A,height:N}:null,[A,N,I]),L=x.useMemo(()=>{if(I)return{[Za.activeTabLeft]:`${E}px`,[Za.activeTabRight]:`${R}px`,[Za.activeTabTop]:`${_}px`,[Za.activeTabBottom]:`${C}px`,[Za.activeTabWidth]:`${A}px`,[Za.activeTabHeight]:`${N}px`}},[E,R,_,C,A,N,I]),Z=I&&A>0&&N>0,q=xn("span",t,{state:{orientation:h,activeTabPosition:$,activeTabSize:H,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:L,hidden:!Z},c,{suppressHydrationWarning:!0}],stateAttributesMapping:r5});return g==null?null:v.jsxs(x.Fragment,{children:[q,S&&a&&v.jsx("script",{nonce:d,dangerouslySetInnerHTML:{__html:e5},suppressHydrationWarning:!0})]})}),s5=x.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...d}=t,{onValueChange:p,orientation:h,value:m,setTabMap:g,tabActivationDirection:y}=Sx(),[k,S]=x.useState(0),[T,E]=x.useState(null),R=x.useRef(new Set),_=x.useRef(new Set),C=x.useRef(null),A=Ve(()=>{R.current.forEach(K=>{K()})});x.useEffect(()=>{if(typeof ResizeObserver>"u")return;const K=new ResizeObserver(()=>{R.current.size&&A()});return C.current=K,T&&K.observe(T),_.current.forEach(q=>{K.observe(q)}),()=>{K.disconnect(),C.current=null}},[T,A]);const N=Ve(K=>(R.current.add(K),()=>{R.current.delete(K)})),I=Ve(K=>(_.current.add(K),C.current?.observe(K),()=>{_.current.delete(K),C.current?.unobserve(K)})),$=Ve((K,q)=>{K!==m&&p(K,q)}),H={orientation:h,tabActivationDirection:y},L={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},Z=x.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:N,registerTabResizeObserverElement:I,onTabActivation:$,setHighlightedTabIndex:S,tabsListElement:T}),[r,k,N,I,$,S,T]);return v.jsx(SN.Provider,{value:Z,children:v.jsx(V8,{render:l,className:s,style:c,state:H,refs:[n,E],props:[L,d],stateAttributesMapping:wx,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:g,disabledIndices:uc})})}),j1={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kzQI83:"ui-1iyjqo2",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},default:{kWkggS:"ui-flfp0o",$$css:!0}},o5={sm:{kmVPX3:"ui-1e29tyv",kaIpWk:"ui-1sxf85j",$$css:!0},md:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0}},a5={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1ja2u2z",kfzvcC:"ui-47corl",kB7OPa:"ui-9f619",kbCHJM:"ui-vbikie",k87sOh:"ui-10uur0e",kzqmXN:"ui-offw1",kZKoxP:"ui-1gezbiy",kWkggS:"ui-i07v4r",k1ekBW:"ui-98hnz2",kIyJzY:"ui-1bqoo3p ui-sagj69",kAMwcw:"ui-1tkypeg",$$css:!0}},l5={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},Bb={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",khDVqt:"ui-uxw1ft",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w ui-x05fgs",$$css:!0}},u5={sm:{kZKoxP:"ui-jmh96e",kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1bl94mz",$$css:!0},md:{kZKoxP:"ui-1a6rlst",kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kZKoxP:"ui-1e94bgo",kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1e1y6u3",$$css:!0}},c5={sm:{kZKoxP:"ui-1a6rlst",kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kZKoxP:"ui-1e94bgo",kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kZKoxP:"ui-170hpbr",kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",$$css:!0}},TN=x.createContext(null);function f5(){const e=x.use(TN);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function d5({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":d,"aria-labelledby":p,...h}){const m=x.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return v.jsx(TN.Provider,{value:m,children:v.jsx(Z8,{...h,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,...{0:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-eq5yr9 ui-193iq5w"},1:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-193iq5w ui-h8yej3"}}[!!l<<0],children:v.jsxs(s5,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":p,"data-component":"segmented-control-list",...Nn(j1.base,r==="default"&&j1.default,r==="default"&&o5[s]),children:[c,r==="default"?v.jsx(i5,{"data-component":"segmented-control-indicator",...Nn(a5.base,l5[s])}):null]})})})}function p5({value:e,disabled:t=!1,children:n,...r}){const s=f5();return v.jsx(W8,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...Nn(Bb.base,s.size==="sm"?fo.root:xs.root,s.variant==="default"?u5[s.size]:c5[s.size],s.variant==="compact"&&Bb.compact,s.fullWidth&&Bb.fullWidth),children:n})}const P1=Object.assign(d5,{Item:p5}),_N="lg",bn={base:{kysU6D:"ui-jyslct",kWkggS:"ui-jbqb8w",kB7OPa:"ui-9f619",keoZOQ:"ui-dj266r",km5ZXQ:"ui-1yf7rl7",k1K539:"ui-at24cr",koQZXg:"ui-j3b58b",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-1wd3ewq",kkrTdU:"ui-1ypdohk ui-1s07b3s",kFalU9:"ui-ggy1nq",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1v8p93f",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-he5wa1",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-16stqrj",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-1g4hjc",kLKAdn:"ui-exx8yu",kpe85a:"ui-1xpa7k",kGO01o:"ui-18d9i69",kE3dHu:"ui-1uhho1l",kSiTet:"ui-1hc1fzr ui-ijokvz",kfzvcC:"ui-67bb7w ui-aqnwrm",$$css:!0},animated:{k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},variantDefault:{kWkggS:"ui-jbqb8w ui-1eethpc ui-10meh72",kLZC3w:"ui-1aeic0j",k26BEO:"ui-141kqco",kL6WhQ:"ui-17fyfba",kaZRDh:"ui-1arpupx",$$css:!0},variantOutline:{kWkggS:"ui-jbqb8w ui-q24i1q ui-10meh72",kLZC3w:"ui-2kampu ui-1tu4jgf ui-be7lqd",k26BEO:"ui-hnkhp4 ui-164kjn4 ui-1fput1a",kL6WhQ:"ui-1jfuf7k ui-1eracs6 ui-196izg0",kaZRDh:"ui-1l09f48 ui-zjd83m ui-1ts6nmb",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-1eethpc ui-10co6l2 ui-17lihdz",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-vvdyaj ui-1yqz6nd",$$css:!0},sizeLg:{kLKAdn:"ui-f6zju3",kpe85a:"ui-1pmtzvq",kGO01o:"ui-cnij5n",kE3dHu:"ui-v48mlq",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kpe85a:"ui-g31tg3",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},variantFilled:{kE3dHu:"ui-yab65l",kWkggS:"ui-i07v4r ui-18954eb ui-o0awiz",kLZC3w:"ui-1v8p93f",k26BEO:"ui-he5wa1",kL6WhQ:"ui-16stqrj",kaZRDh:"ui-1g4hjc",$$css:!0},shapeRounded:{kaIpWk:"ui-1043rbw",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0},variantUnfilled:{kWkggS:"ui-jbqb8w ui-1n5bzlp",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",k26BEO:"ui-1ws9gjp",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kaZRDh:"ui-1pjslub",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1yqz6nd",$$css:!0},frameContentLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",koQZXg:"ui-ya9nqx",km5ZXQ:"ui-17w4s1c",$$css:!0},frameContentMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",koQZXg:"ui-ns639v",km5ZXQ:"ui-1gl7awr",$$css:!0},frameContentFilledLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",koQZXg:"ui-1rdd0cc",km5ZXQ:"ui-17w4s1c",$$css:!0},frameContentFilledMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",koQZXg:"ui-1rdd0cc",km5ZXQ:"ui-1gl7awr",$$css:!0},frameContentUnfilledLg:{keoZOQ:"ui-1csnclf",k1K539:"ui-1bip7cd",koQZXg:"ui-1jvqspy",km5ZXQ:"ui-1xoqnk6",$$css:!0},frameContentUnfilledMd:{keoZOQ:"ui-13e19h0",k1K539:"ui-affzeg",koQZXg:"ui-13ywka",km5ZXQ:"ui-ds3n82",$$css:!0},frameContentHugFalseLg:{kzqmXN:"ui-lai49p",$$css:!0},frameContentHugFalseMd:{kzqmXN:"ui-u0r5jw",$$css:!0},frameContentHugFalseFilledLg:{kzqmXN:"ui-15uee3t",$$css:!0},frameContentHugFalseFilledMd:{kzqmXN:"ui-aiknzh",$$css:!0},frameContentHugFalseUnfilledLg:{kzqmXN:"ui-3pyy6g",$$css:!0},frameContentHugFalseUnfilledMd:{kzqmXN:"ui-yc13g",$$css:!0},hugFalse:{kzqmXN:"ui-h8yej3",kjj79g:"ui-13a6bvl",$$css:!0}},$1={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-dpxx8g",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},Fb={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",$$css:!0},muted:{kMwMTN:"ui-1lbmi28",$$css:!0},ghostOpen:{kMwMTN:"ui-1mh7f6w",$$css:!0}},Vd={base:{kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",$$css:!0},ghost:{kMwMTN:"ui-1lbmi28",$$css:!0},open:{kMwMTN:"ui-7qsbfx",$$css:!0},ghostOpen:{kMwMTN:"ui-1mh7f6w",$$css:!0}},h5="sm";function m5(e){return[bn.base,xs.root,{"ui--default-marker":"ui--default-marker",$$css:!0},e.animated?bn.animated:null,v5(e.variant),x5(e.size),e.variant==="filled"?bn.variantFilled:null,e.hug?null:bn.hugFalse,e.shape==="pill"?bn.shapePill:bn.shapeRounded,e.frame==="content"?k5(e):null,e.frame==="content"&&!e.hug?S5(e):null]}function g5(e){return[Ol.root,Bv.root,$1.base,e?$1.placeholder:null]}function b5(e,t){return[Fb.base,e==="ghost"||e==="unfilled"?Fb.muted:null,e==="ghost"&&t?Fb.ghostOpen:null]}function y5(e,t){return[Vd.base,e==="ghost"?Vd.ghost:null,t&&e!=="ghost"?Vd.open:null,t&&e==="ghost"?Vd.ghostOpen:null]}function v5(e){switch(e){case"default":return bn.variantDefault;case"outline":return bn.variantOutline;case"filled":return null;case"ghost":return bn.variantGhost;case"unfilled":return bn.variantUnfilled}}function x5(e){switch(e){case"lg":return bn.sizeLg;case"md":case"base":return bn.sizeMd}}function k5(e){const t=e.size==="lg";return e.variant==="filled"?t?bn.frameContentFilledLg:bn.frameContentFilledMd:e.variant==="unfilled"?t?bn.frameContentUnfilledLg:bn.frameContentUnfilledMd:t?bn.frameContentLg:bn.frameContentMd}function S5(e){const t=e.size==="lg";return e.variant==="filled"?t?bn.frameContentHugFalseFilledLg:bn.frameContentHugFalseFilledMd:e.variant==="unfilled"?t?bn.frameContentHugFalseUnfilledLg:bn.frameContentHugFalseUnfilledMd:t?bn.frameContentHugFalseLg:bn.frameContentHugFalseMd}function w5({children:e,variant:t="default",frame:n="container",shape:r="rounded",size:s=_N,hug:a=!0,className:l,style:c,disabled:d=!1,id:p,leading:h,trailing:m,open:g=!1,animated:y=!1,placeholder:k,hideChevron:S=!1,ref:T,...E}){const R=e==null&&k!=null,_=En({rootClass:"ui-select-trigger",stylexStyles:m5({animated:y,frame:n,hug:a,shape:r,size:s,variant:t}),className:l,style:c}),C=En({rootClass:"ui-select-label",stylexStyles:g5(R)}),A=Nn(b5(t,g)),N=En({rootClass:"ui-select-icon",stylexStyles:y5(t,g)});return v.jsxs("button",{...E,ref:T,type:"button",id:p,className:_.className,style:_.style,"data-variant":t,"data-component":"select","data-frame":n,"data-shape":r,"data-size":s,"data-hug":a,"data-open":g,"data-popup-open":g||void 0,"data-disabled":d||void 0,"data-animated":y||void 0,disabled:d,children:[h!=null&&v.jsx("span",{className:A.className,style:A.style,children:h}),v.jsx("span",{className:C.className,style:C.style,"data-placeholder":R||void 0,children:R?k:e}),m!=null&&v.jsx("span",{className:A.className,style:A.style,children:m}),S?null:v.jsx(vn,{name:t==="filled"||t==="ghost"||t==="unfilled"?"chevron-down":"chevrons-up-down",size:10,className:N.className,style:N.style})]})}const RN=x.createContext(null),CN=x.createContext(null);function _s(){const e=x.useContext(RN);if(e===null)throw new Error(Xn(60));return e}function AN(){const e=x.useContext(CN);if(e===null)throw new Error(Xn(61));return e}const E5=(e,t)=>Object.is(e,t);function Sl(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function T5(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:Sl(t,r,n))}function ic(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:Sl(r,t,n))}function _5(e,t,n){return e.filter(r=>!Sl(t,r,n))}function NN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function R5(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(NN(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function ON(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 jy(e)}function Ja(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jy(e.value):jy(e)}function MN(e,t,n){function r(){return ON(e,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]??r();if(Array.isArray(t)){const s=t,a=NN(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=a.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=a.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function C5(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(v.jsx(x.Fragment,{children:MN(s,t,n)},a)),r),[])}const gt={id:rt(e=>e.id),labelId:rt(e=>e.labelId),modal:rt(e=>e.modal),multiple:rt(e=>e.multiple),items:rt(e=>e.items),itemToStringLabel:rt(e=>e.itemToStringLabel),itemToStringValue:rt(e=>e.itemToStringValue),isItemEqualToValue:rt(e=>e.isItemEqualToValue),value:rt(e=>e.value),hasSelectedValue:rt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ja(t,r)!==""}),hasNullItemLabel:rt((e,t)=>t?R5(e.items):!1),open:rt(e=>e.open),mounted:rt(e=>e.mounted),forceMount:rt(e=>e.forceMount),transitionStatus:rt(e=>e.transitionStatus),openMethod:rt(e=>e.openMethod),activeIndex:rt(e=>e.activeIndex),selectedIndex:rt(e=>e.selectedIndex),isActive:rt((e,t)=>e.activeIndex===t),isSelected:rt((e,t,n)=>{const r=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(a=>Sl(n,a,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Sl(n,s,r)}),isSelectedByFocus:rt((e,t)=>e.selectedIndex===t),popupProps:rt(e=>e.popupProps),triggerProps:rt(e=>e.triggerProps),triggerElement:rt(e=>e.triggerElement),positionerElement:rt(e=>e.positionerElement),listElement:rt(e=>e.listElement),scrollUpArrowVisible:rt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:rt(e=>e.scrollDownArrowVisible),hasScrollArrows:rt(e=>e.hasScrollArrows)};function Wu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const hs=1;function IN(e,t){return Math.max(0,e-t)}function A5(e,t){if(t<=0)return 0;const n=Wu(e,0,t),r=n,s=t-n,a=r<=hs,l=s<=hs;return a&&l?r<=s?0:t:a?0:l?t:n}function N5(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:d,form:p,autoComplete:h,disabled:m=!1,readOnly:g=!1,required:y=!1,modal:k=!0,actionsRef:S,inputRef:T,onOpenChangeComplete:E,items:R,multiple:_=!1,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N=E5,highlightItemOnHover:I=!0,children:$}=e,{clearErrors:H}=EP(),{setDirty:L,setTouched:Z,setFocused:K,shouldValidateOnChange:q,validityData:z,setFilled:j,name:F,disabled:U,validation:P,validationMode:W}=Vc(),D=vx({id:t}),B=U||m,G=F??d,[O,ie]=hc({controlled:n,default:_?r??uc:r,name:"Select",state:"value"}),[te,ne]=hc({controlled:a,default:l,name:"Select",state:"open"}),le=x.useRef([]),pe=x.useRef([]),ye=x.useRef(null),Se=x.useRef(null),ze=x.useRef(0),he=x.useRef(null),Te=x.useRef([]),Re=x.useRef(!1),Oe=x.useRef(!1),ve=x.useRef(null),xe=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Me=x.useRef(!1),{mounted:Ce,setMounted:Pe,transitionStatus:ge}=Bc(te),{openMethod:ce,triggerProps:oe}=qj(te),re=wr(()=>new KR({id:D,labelId:void 0,modal:k,multiple:_,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,value:O,open:te,mounted:Ce,transitionStatus:ge,items:R,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,_e=bt(re,gt.activeIndex),J=bt(re,gt.selectedIndex),fe=bt(re,gt.triggerElement),Ie=bt(re,gt.positionerElement),Ue=nU(ce),Ze=ce??Ue,Ye=x.useMemo(()=>_&&Array.isArray(O)&&O.length===0?"":Ja(O,A),[_,O,A]),ot=x.useMemo(()=>_&&Array.isArray(O)?O.map(tt=>Ja(tt,A)):Ja(O,A),[_,O,A]),it=Un(re.state.triggerElement),nt=Ve(()=>ot);aC(it,{id:D,value:O,getValue:nt});const vt=x.useRef(O);He(()=>{O!==vt.current&&re.set("forceMount",!0)},[re,O]),He(()=>{j(_?Array.isArray(O)&&O.length>0:O!=null)},[_,O,j]),He(function(){if(te)return;const Dt=Te.current;if(_){const Qn=Array.isArray(O)?O:[];if(Qn.length===0){re.set("selectedIndex",null);return}const _n=Qn[Qn.length-1],an=ic(Dt,_n,N);re.set("selectedIndex",an===-1?null:an);return}const Kn=ic(Dt,O,N);re.set("selectedIndex",Kn===-1?null:Kn)},[_,te,O,Te,N,re]),iC(O,()=>{H(G),L(O!==z.initialValue),q()?P.commit(O):P.commit(O,!0)});const st=Ve((tt,Dt)=>{if(c?.(tt,Dt),!Dt.isCanceled&&(ne(tt),!tt&&(Dt.reason===ch||Dt.reason===Sv)&&(Z(!0),K(!1),W==="onBlur"&&P.commit(O)),!tt&&re.state.activeIndex!==null)){const Kn=le.current[re.state.activeIndex];queueMicrotask(()=>{Kn?.setAttribute("tabindex","-1")})}}),xt=Ve(()=>{Pe(!1),re.update({activeIndex:null,openMethod:null}),E?.(!1)});aa({enabled:!S,open:te,ref:ye,onComplete(){te||xt()}}),x.useImperativeHandle(S,()=>({unmount:xt}),[xt]);const We=Ve((tt,Dt)=>{s?.(tt,Dt),!Dt.isCanceled&&ie(tt)}),Ot=Ve(()=>{const tt=re.state.listElement||ye.current;if(!tt)return;const Dt=IN(tt.scrollHeight,tt.clientHeight),Kn=A5(tt.scrollTop,Dt),Qn=Kn>0,_n=Kn<Dt;re.state.scrollUpArrowVisible!==Qn&&re.set("scrollUpArrowVisible",Qn),re.state.scrollDownArrowVisible!==_n&&re.set("scrollDownArrowVisible",_n)}),Be=YR({open:te,onOpenChange:st,elements:{reference:fe,floating:Ie}}),Ke=JL(Be,{enabled:!g&&!B,event:"mousedown"}),ht=DR(Be,{bubbles:!1}),Xe=yj(Be,{enabled:!g&&!B,listRef:le,activeIndex:_e,selectedIndex:J,disabledIndices:uc,onNavigate(tt){tt===null&&!te||re.set("activeIndex",tt)},focusItemOnHover:I}),Y=vj(Be,{enabled:!g&&!B&&(te||!_),listRef:pe,activeIndex:_e,selectedIndex:J,onMatch(tt){te?re.set("activeIndex",tt):We(Te.current[tt],_t("none"))},onTypingChange(tt){Re.current=tt}}),{getReferenceProps:X,getFloatingProps:we,getItemProps:Ge}=JR([Ke,ht,Xe,Y]),lt=x.useMemo(()=>zc(X(),oe,D?{id:D}:hr),[X,oe,D]);rC(()=>{re.update({popupProps:we(),triggerProps:lt})}),He(()=>{re.update({id:D,modal:k,multiple:_,value:O,open:te,mounted:Ce,transitionStatus:ge,popupProps:we(),triggerProps:lt,items:R,itemToStringLabel:C,itemToStringValue:A,isItemEqualToValue:N,openMethod:Ze})},[re,D,k,_,O,te,Ce,ge,we,lt,R,C,A,N,Ze]);const St=x.useMemo(()=>({store:re,name:G,required:y,disabled:B,readOnly:g,multiple:_,itemToStringLabel:C,itemToStringValue:A,highlightItemOnHover:I,setValue:We,setOpen:st,listRef:le,popupRef:ye,scrollHandlerRef:Se,handleScrollArrowVisibility:Ot,scrollArrowsMountedCountRef:ze,getItemProps:Ge,events:Be.context.events,valueRef:he,valuesRef:Te,labelsRef:pe,typingRef:Re,selectionRef:xe,selectedItemTextRef:ve,validation:P,onOpenChangeComplete:E,keyboardActiveRef:Oe,alignItemWithTriggerActiveRef:Me,initialValueRef:vt}),[re,G,y,B,g,_,C,A,I,We,st,Ge,Be.context.events,P,E,Ot]),$e=ks(T,P.inputRef),Le=_&&Array.isArray(O)&&O.length>0,qe=_?void 0:G,Wt=x.useMemo(()=>!_||!Array.isArray(O)||!G?null:O.map(tt=>{const Dt=Ja(tt,A);return v.jsx("input",{type:"hidden",form:p,name:G,value:Dt},Dt)}),[_,O,p,G,A]);return v.jsx(RN.Provider,{value:St,children:v.jsxs(CN.Provider,{value:Be,children:[$,v.jsx("input",{...P.getInputValidationProps({onFocus(){re.state.triggerElement?.focus({focusVisible:!0})},onChange(tt){if(tt.nativeEvent.defaultPrevented)return;const Dt=tt.currentTarget.value,Kn=_t(Ss,tt.nativeEvent);function Qn(){if(_)return;const _n=Te.current.find(an=>Ja(an,A).toLowerCase()===Dt.toLowerCase()||ON(an,C).toLowerCase()===Dt.toLowerCase());_n!=null&&(L(_n!==z.initialValue),We(_n,Kn),q()&&P.commit(_n))}re.set("forceMount",!0),queueMicrotask(Qn)}}),id:D&&qe==null?`${D}-hidden-input`:void 0,form:p,name:qe,autoComplete:h,value:Ye,disabled:B,required:y&&!Le,readOnly:g,ref:$e,style:G?wL:fR,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Wt]})})}function O5(e,t){return e??t}function M5(e){const t=e.getBoundingClientRect(),n=yn(e),r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,d=parseFloat(s.width)||0,p=parseFloat(s.height)||0,h=Math.max(t.width,l,d),m=Math.max(t.height,c,p),g=h-t.width,y=m-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-y/2,bottom:t.bottom+y/2}}const Kd=2,I5=400,B1=200,D5={...Yz,...Gc,value:()=>null},z5=x.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:d,...p}=t,{setTouched:h,setFocused:m,validationMode:g,state:y,disabled:k}=Vc(),{labelId:S}=Fv(),{store:T,setOpen:E,selectionRef:R,validation:_,readOnly:C,required:A,alignItemWithTriggerActiveRef:N,disabled:I,keyboardActiveRef:$}=_s(),H=k||I||l,L=bt(T,gt.open),Z=bt(T,gt.value),K=bt(T,gt.triggerProps),q=bt(T,gt.positionerElement),z=bt(T,gt.listElement),j=bt(T,gt.id),F=bt(T,gt.labelId),U=bt(T,gt.hasSelectedValue),P=!U&&L,W=bt(T,gt.hasNullItemLabel,P),D=a??j,B=O5(S,F);vx({id:D});const G=Un(q),O=x.useRef(null),{getButtonProps:ie,buttonRef:te}=jc({disabled:H,native:c}),ne=Ve(Oe=>{T.set("triggerElement",Oe)}),le=ks(n,O,te,ne),pe=fi(),ye=fi(),Se=fi(),ze=fi();x.useEffect(()=>{if(L)return!(U||W)?Se.start(I5,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}):ze.start(B1,()=>{R.current.allowUnselectedMouseUp=!0,Se.start(B1,()=>{R.current.allowSelectedMouseUp=!0})}),()=>{Se.clear(),ze.clear()};R.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ye.clear()},[L,U,W,R,ye,Se,ze]);const he=x.useMemo(()=>z?.id??Tp(q)?.id,[z,q]),Te=zc(K,{id:D,role:"combobox","aria-expanded":L?"true":"false","aria-haspopup":"listbox","aria-controls":L?he:void 0,"aria-labelledby":B,"aria-readonly":C||void 0,"aria-required":A||void 0,tabIndex:H?-1:0,ref:le,onFocus(Oe){m(!0),L&&N.current&&E(!1,_t(Ss,Oe.nativeEvent)),pe.start(0,()=>{T.set("forceMount",!0)})},onBlur(Oe){kt(q,Oe.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&_.commit(Z))},onPointerMove(){$.current=!1},onKeyDown(){$.current=!0},onMouseDown(Oe){if(L)return;const ve=Ft(Oe.currentTarget);function xe(Me){if(!O.current)return;const Ce=Me.target;if(kt(O.current,Ce)||kt(G.current,Ce)||Ce===O.current)return;const Pe=M5(O.current);Me.clientX>=Pe.left-Kd&&Me.clientX<=Pe.right+Kd&&Me.clientY>=Pe.top-Kd&&Me.clientY<=Pe.bottom+Kd||E(!1,_t(lL,Me))}ye.start(0,()=>{ve.addEventListener("mouseup",xe,{once:!0})})}},_.getValidationProps,p,ie);Te.role="combobox";const Re={...y,open:L,disabled:H,value:Z,readOnly:C,placeholder:!U};return xn("button",t,{ref:[n,O],state:Re,stateAttributesMapping:D5,props:Te})}),L5={value:()=>null},j5=x.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...d}=t,{store:p,valueRef:h}=_s(),m=bt(p,gt.value),g=bt(p,gt.items),y=bt(p,gt.itemToStringLabel),k=bt(p,gt.hasSelectedValue),S=!k&&l!=null&&a==null,T=bt(p,gt.hasNullItemLabel,S),E={value:m,placeholder:!k};let R=null;return typeof a=="function"?R=a(m):a!=null?R=a:!k&&l!=null&&!T?R=l:Array.isArray(m)?R=C5(m,g,y):R=MN(m,g,y),xn("span",t,{state:E,ref:[n,h],props:[{children:R},d],stateAttributesMapping:L5})}),P5=x.createContext(void 0),$5=x.forwardRef(function(t,n){const{store:r}=_s(),s=bt(r,gt.mounted),a=bt(r,gt.forceMount);return s||a?v.jsx(P5.Provider,{value:!0,children:v.jsx(HL,{ref:n,...t})}):null}),B5={...sh,...oa},F5=x.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c}=_s(),d=bt(c,gt.open),p=bt(c,gt.mounted),h=bt(c,gt.transitionStatus);return xn("div",t,{state:{open:d,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:B5})}),DN=x.createContext(void 0);function zN(){const e=x.useContext(DN);if(!e)throw new Error(Xn(59));return e}function Kp(e,t){e&&Object.assign(e.style,t)}const LN={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},U5=20;function q5(e,t,n,r){const[s,a]=x.useState(!1);He(()=>{if(!e||!t||n==null){a(!1);return}const l=Ft(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-U5)},[e,t,n]),Fj(e&&(!t||s),r)}const H5={position:"fixed"},G5=x.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:d="center",sideOffset:p=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:g,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S,alignItemWithTrigger:T=!0,collisionAvoidance:E=Dz,style:R,..._}=t,{store:C,listRef:A,labelsRef:N,alignItemWithTriggerActiveRef:I,selectedItemTextRef:$,valuesRef:H,initialValueRef:L,popupRef:Z,setValue:K}=_s(),q=AN(),z=bt(C,gt.open),j=bt(C,gt.mounted),F=bt(C,gt.modal),U=bt(C,gt.value),P=bt(C,gt.openMethod),W=bt(C,gt.positionerElement),D=bt(C,gt.triggerElement),B=bt(C,gt.isItemEqualToValue),G=bt(C,gt.transitionStatus),O=x.useRef(null),ie=x.useRef(null),[te,ne]=x.useState(T),le=j&&te&&P!=="touch";!j&&te!==T&&ne(T),He(()=>{j||(gt.scrollUpArrowVisible(C.state)&&C.set("scrollUpArrowVisible",!1),gt.scrollDownArrowVisible(C.state)&&C.set("scrollDownArrowVisible",!1))},[C,j]),x.useImperativeHandle(I,()=>le),q5((le||F)&&z,P==="touch",W,D);const pe=LA({anchor:r,floatingRootContext:q,positionMethod:s,mounted:j,side:c,sideOffset:p,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:g,sticky:k,disableAnchorTracking:S??le,collisionAvoidance:E,keepMounted:!0}),ye=le?"none":pe.side,Se=le?H5:pe.positionerStyles,ze={open:z,side:ye,align:pe.align,anchorHidden:pe.anchorHidden},he=Ve(xe=>{C.set("positionerElement",xe)}),Te=jA(t,ze,{styles:Se,transitionStatus:G,props:_,refs:[n,he],hidden:!j,inert:!z}),Re=x.useRef(0),Oe=Ve(xe=>{if(xe.size===0&&Re.current===0||H.current.length===0)return;const Me=Re.current;if(Re.current=xe.size,xe.size===Me)return;const Ce=_t(Ss);if(Me!==0&&!C.state.multiple&&U!==null&&ic(H.current,U,B)===-1){const ge=L.current,oe=ge!=null&&ic(H.current,ge,B)!==-1?ge:null;K(oe,Ce),oe===null&&(C.set("selectedIndex",null),$.current=null)}if(Me!==0&&C.state.multiple&&Array.isArray(U)){const Pe=ce=>ic(H.current,ce,B)!==-1,ge=U.filter(ce=>Pe(ce));(ge.length!==U.length||ge.some(ce=>!T5(U,ce,B)))&&(K(ge,Ce),ge.length===0&&(C.set("selectedIndex",null),$.current=null))}if(z&&le){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Pe={height:""};Kp(W,Pe),Kp(Z.current,Pe)}}),ve=x.useMemo(()=>({...pe,side:ye,alignItemWithTriggerActive:le,setControlledAlignItemWithTrigger:ne,scrollUpArrowRef:O,scrollDownArrowRef:ie}),[pe,ye,le,ne]);return v.jsx(kx,{elementsRef:A,labelsRef:N,onMapChange:Oe,children:v.jsxs(DN.Provider,{value:ve,children:[j&&F&&v.jsx(Dj,{inert:Ij(!z),cutout:D}),Te]})})}),Zd="base-ui-disable-scrollbar",Py={className:Zd,getElement(e){return v.jsx("style",{nonce:e,href:Zd,precedence:"base-ui:low",children:`.${Zd}{scrollbar-width:none}.${Zd}::-webkit-scrollbar{display:none}`})}},V5=x.createContext(void 0);function K5(e){return x.useContext(V5)}const Z5={...sh,...oa},W5=x.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:d,popupRef:p,onOpenChangeComplete:h,setOpen:m,valueRef:g,selectedItemTextRef:y,keyboardActiveRef:k,multiple:S,handleScrollArrowVisibility:T,scrollHandlerRef:E,listRef:R,highlightItemOnHover:_}=_s(),{side:C,align:A,alignItemWithTriggerActive:N,isPositioned:I,setControlledAlignItemWithTrigger:$,scrollDownArrowRef:H,scrollUpArrowRef:L}=zN(),Z=K5()!=null,K=AN(),q=ex(),{nonce:z,disableStyleElements:j}=EN(),F=bt(d,gt.id),U=bt(d,gt.open),P=bt(d,gt.mounted),W=bt(d,gt.popupProps),D=bt(d,gt.transitionStatus),B=bt(d,gt.triggerElement),G=bt(d,gt.positionerElement),O=bt(d,gt.listElement),ie=x.useRef(!1),te=x.useRef(!1),ne=x.useRef({}),le=Pc(),pe=Ve(he=>{if(!G||!p.current||!te.current)return;if(ie.current||!N){T();return}const Te=G.style.top==="0px",Re=G.style.bottom==="0px";if(!Te&&!Re){T();return}const Oe=U1(G),ve=Yu(G.getBoundingClientRect().height,"y",Oe),xe=Ft(G),Me=getComputedStyle(G),Ce=parseFloat(Me.marginTop),Pe=parseFloat(Me.marginBottom),ge=F1(getComputedStyle(p.current)),ce=Math.min(xe.documentElement.clientHeight-Ce-Pe,ge),oe=he.scrollTop,re=Wd(he);let _e=0,J=null,fe=!1,Ie=!1;const Ue=it=>{G.style.height=`${it}px`},Ze=(it,nt)=>{const vt=Wu(it,0,ce-ve);vt>0&&Ue(ve+vt),he.scrollTop=nt,ce-(ve+vt)<=hs&&(ie.current=!0),T()},Ye=Te?re-oe:oe,ot=Math.min(ve+Ye,ce);if(_e=ot,Ye<=hs){Ze(Ye,Te?re:0);return}if(ce-ot>hs)Te?Ie=!0:J=0;else if(fe=!0,Re&&oe<re){const it=ve+Ye-ce;J=oe-(Ye-it)}if(_e=Math.ceil(_e),_e!==0&&Ue(_e),Ie||J!=null){const it=Wd(he),nt=Ie?it:Wu(J,0,it);Math.abs(he.scrollTop-nt)>hs&&(he.scrollTop=nt)}(fe||_e>=ce-hs)&&(ie.current=!0),T()});x.useImperativeHandle(E,()=>pe,[pe]),aa({open:U,ref:p,onComplete(){U&&h?.(!0)}});const ye={open:U,transitionStatus:D,side:C,align:A};He(()=>{!G||!p.current||Object.keys(ne.current).length||(ne.current={top:G.style.top||"0",left:G.style.left||"0",right:G.style.right,height:G.style.height,bottom:G.style.bottom,minHeight:G.style.minHeight,maxHeight:G.style.maxHeight,marginTop:G.style.marginTop,marginBottom:G.style.marginBottom})},[p,G]),He(()=>{U||N||(te.current=!1,ie.current=!1,Kp(G,ne.current))},[U,N,G,p]),He(()=>{const he=p.current;if(!U||!B||!G||!he||N&&!I||d.state.transitionStatus==="ending")return;if(!N){te.current=!0,le.request(T),he.style.removeProperty("--transform-origin");return}const Te=Y5(he);he.style.removeProperty("--transform-origin");try{const Re=y.current,Oe=g.current,ve=getComputedStyle(G),xe=getComputedStyle(he),Me=Ft(B),Ce=yn(G),Pe=U1(B),ge=Yd(B.getBoundingClientRect(),Pe),ce=Yd(G.getBoundingClientRect(),Pe),oe=ge.height,re=O||he,_e=re.scrollHeight,J=parseFloat(xe.borderBottomWidth),fe=parseFloat(ve.marginTop)||10,Ie=parseFloat(ve.marginBottom)||10,Ue=parseFloat(ve.minHeight)||100,Ze=F1(xe),Ye=5,ot=5,it=20,nt=Me.documentElement.clientHeight-fe-Ie,vt=Me.documentElement.clientWidth,st=nt-ge.bottom+oe;let xt,We=q==="rtl"?ge.right-ce.width:ge.left,Ot=0;if(Re&&Oe){const $e=Yd(Oe.getBoundingClientRect(),Pe);xt=Yd(Re.getBoundingClientRect(),Pe),We=ce.left+(q==="rtl"?$e.right-xt.right:$e.left-xt.left);const Le=$e.top-ge.top+$e.height/2;Ot=xt.top-ce.top+xt.height/2-Le}const Be=st+Ot+Ie+J;let Ke=Math.min(nt,Be);const ht=nt-fe-Ie,Xe=Be-Ke,Y=vt-ot;G.style.left=`${Wu(We,Ye,Y-ce.width)}px`,G.style.height=`${Ke}px`,G.style.maxHeight="auto",G.style.marginTop=`${fe}px`,G.style.marginBottom=`${Ie}px`,he.style.height="100%";const X=Wd(re),we=Xe>=X-hs;we&&(Ke=Math.min(nt,ce.height)-(Xe-X));const Ge=ge.top<it||ge.bottom>nt-it||Math.ceil(Ke)+hs<Math.min(_e,Ue),lt=(Ce.visualViewport?.scale??1)!==1&&Ev;if(Ge||lt){te.current=!0,Kp(G,ne.current),$(!1);return}const St=Math.max(Ue,Ke);if(we){const $e=Math.max(0,nt-Be);G.style.top=ce.height>=ht?"0":`${$e}px`,G.style.height=`${Ke}px`,re.scrollTop=Wd(re)}else G.style.bottom="0",re.scrollTop=Xe;if(xt){const $e=ce.top,Le=ce.height,qe=xt.top+xt.height/2,Wt=Le>0?(qe-$e)/Le*100:50,tt=Wu(Wt,0,100);he.style.setProperty("--transform-origin",`50% ${tt}%`)}(St===nt||Ke>=Ze)&&(ie.current=!0),T(),_&&d.state.selectedIndex===null&&d.state.activeIndex===null&&R.current[0]!=null&&d.set("activeIndex",0),te.current=!0}finally{Te()}},[d,U,G,B,g,y,p,T,N,$,le,H,L,O,R,_,q,I]),x.useEffect(()=>{if(!N||!G||!U)return;const he=yn(G);function Te(Re){m(!1,_t(cL,Re))}return Nt(he,"resize",Te)},[m,N,G,U]);const Se={...O?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${F}-list`},onKeyDown(he){k.current=!0,Z&&_j.has(he.key)&&he.stopPropagation()},onMouseMove(){k.current=!1},onScroll(he){O||pe(he.currentTarget)},...N&&{style:O?{height:"100%"}:LN}},ze=xn("div",t,{ref:[n,p],state:ye,stateAttributesMapping:Z5,props:[W,Se,tx(D),{className:!O&&N?Py.className:void 0},c]});return v.jsxs(x.Fragment,{children:[!j&&Py.getElement(z),v.jsx(QL,{context:K,modal:!1,disabled:!P,returnFocus:l,restoreFocus:!0,children:ze})]})});function F1(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Wd(e){return IN(e.scrollHeight,e.clientHeight)}function U1(e){return FR.getScale(e)}function Yu(e,t,n){return e/n[t]}function Yd(e,t){return cc({x:Yu(e.x,"x",t),y:Yu(e.y,"y",t),width:Yu(e.width,"x",t),height:Yu(e.height,"y",t)})}const q1=[["transform","none"],["scale","1"],["translate","0 0"]];function Y5(e){const{style:t}=e,n={};for(const[r,s]of q1)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of q1){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const X5=x.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,{store:c,scrollHandlerRef:d}=_s(),{alignItemWithTriggerActive:p}=zN(),h=bt(c,gt.hasScrollArrows),m=bt(c,gt.openMethod),g=bt(c,gt.multiple),k={id:`${bt(c,gt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(T){d.current?.(T.currentTarget)},...p&&{style:LN},className:h&&m!=="touch"?Py.className:void 0},S=Ve(T=>{c.set("listElement",T)});return xn("div",t,{ref:[n,S],props:[k,l]})}),jN=x.createContext(void 0);function Ex(){const e=x.useContext(jN);if(!e)throw new Error(Xn(57));return e}const Q5=x.memo(x.forwardRef(function(t,n){const{render:r,className:s,value:a=null,label:l,disabled:c=!1,nativeButton:d=!1,style:p,...h}=t,m=x.useRef(null),g=xN({label:l,textRef:m,indexGuessBehavior:vN.GuessFromOrder}),{store:y,getItemProps:k,setOpen:S,setValue:T,selectionRef:E,typingRef:R,valuesRef:_,multiple:C,selectedItemTextRef:A}=_s(),N=bt(y,gt.isActive,g.index),I=bt(y,gt.isSelected,g.index,a),$=bt(y,gt.isSelectedByFocus,g.index),H=bt(y,gt.isItemEqualToValue),L=g.index,Z=L!==-1,K=x.useRef(null),q=Un(L);He(()=>{if(!Z)return;const te=_.current;return te[L]=a,()=>{delete te[L]}},[Z,L,a,_]),He(()=>{if(!Z)return;const te=y.state.value;let ne=te;C&&Array.isArray(te)&&te.length>0&&(ne=te[te.length-1]),ne!==void 0&&Sl(a,ne,H)&&(y.set("selectedIndex",L),m.current&&(A.current=m.current))},[Z,L,C,H,y,a,A]);const z={disabled:c,selected:I,highlighted:N},j=k({active:N,selected:I});j.id=void 0;const F=x.useRef(null),U=x.useRef("mouse"),P=x.useRef(!1),{getButtonProps:W,buttonRef:D}=jc({disabled:c,focusableWhenDisabled:!0,native:d,composite:!0});function B(te){const ne=y.state.value;if(C){const le=Array.isArray(ne)?ne:[],pe=I?_5(le,a,H):[...le,a];T(pe,_t(ob,te))}else T(a,_t(ob,te)),S(!1,_t(ob,te))}const G={role:"option","aria-selected":I,tabIndex:N?0:-1,onTouchStart(){E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){F.current=te.key,y.set("activeIndex",L),te.key===" "&&R.current&&te.preventDefault()},onClick(te){P.current=!1,!(te.type==="keydown"&&F.current===null)&&(c||te.type==="keydown"&&F.current===" "&&R.current||U.current!=="touch"&&!N||(F.current=null,B(te.nativeEvent)))},onPointerEnter(te){U.current=te.pointerType},onPointerDown(te){U.current=te.pointerType,P.current=!0},onMouseUp(){if(c)return;if(P.current){P.current=!1;return}const te=!E.current.allowSelectedMouseUp&&I,ne=!E.current.allowUnselectedMouseUp&&!I;te||ne||U.current!=="touch"&&!N||K.current?.click()}},O=xn("div",t,{ref:[D,n,g.ref,K],state:z,props:[j,G,h,W]}),ie=x.useMemo(()=>({selected:I,indexRef:q,textRef:m,selectedByFocus:$,hasRegistered:Z}),[I,q,m,$,Z]);return v.jsx(jN.Provider,{value:ie,children:O})})),J5=x.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=Ex();return r||s?v.jsx(eH,{...t,ref:n}):null}),eH=x.memo(x.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=Ex(),d=x.useRef(null),{transitionStatus:p,setMounted:h}=Bc(c),g=xn("span",e,{ref:[t,d],state:{selected:c,transitionStatus:p},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:oa});return aa({open:c,ref:d,onComplete(){c||h(!1)}}),g})),tH=x.memo(x.forwardRef(function(t,n){const{indexRef:r,textRef:s,selectedByFocus:a,hasRegistered:l}=Ex(),{selectedItemTextRef:c}=_s(),{className:d,render:p,style:h,...m}=t,g=x.useCallback(k=>{if(!k||!l)return;const S=c.current===null||!c.current.isConnected;(a||S&&r.current===0)&&(c.current=k)},[c,r,a,l]);return xn("div",t,{ref:[g,n,s],props:m})})),$u={backdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",$$css:!0},backdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}],popup:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kskxy:"ui-2pj5ht",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kVAEAm:"ui-1n2onr6",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",kWkggS:"ui-f1vpex",kaIpWk:"ui-1043rbw",kGVxlE:"ui-137jh17",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kSiTet:"ui-1hc1fzr ui-1i2unn7",k3aq6I:"ui-3oybdh ui-1ejle5f",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-6o7n8i",kIyJzY:"ui-7pq1vu ui-sagj69",kAMwcw:"ui-6ekqhr",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-ldcgda",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{kaIpWk:"ui-1m7fhj7",$$css:!0},width:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},nH={root:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-1p5sq7k",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kLKAdn:"ui-1uagpmz",kpe85a:"ui-1qto6us",kGO01o:"ui-1aqjmib",kE3dHu:"ui-4aj6wr",kaIpWk:"ui-1e1y6u3",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0}},rH={sm:{"--ui-select-row-padding-block":"ui-gd7qnp","--ui-select-row-padding-inline":"ui-14f2bk","--ui-select-row-gap":"ui-vsfftw",$$css:!0},md:{"--ui-select-row-padding-block":"ui-fn83ix","--ui-select-row-padding-inline":"ui-x09acf","--ui-select-row-gap":"ui-8yiove",$$css:!0}},PN=x.createContext(null);function Tx(){const e=x.useContext(PN);if(!e)throw new Error("Select internals must be used within Select");return e}function iH(){const e=Tx(),t=e.hasValue?v.jsx(j5,{}):void 0;return v.jsx(z5,{disabled:e.disabled,id:e.id,...e.ariaLabel!==void 0?{"aria-label":e.ariaLabel}:{},...e.ariaLabelledBy!==void 0?{"aria-labelledby":e.ariaLabelledBy}:{},render:e.renderTrigger??((n,r)=>v.jsx(w5,{...n,animated:e.animated,className:wn(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,leading:e.leading,open:r.open,placeholder:e.placeholder,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function sH({children:e}){const t=Tx(),n=Nl(),{zIndex:r,portalLayerStyles:s}=qc("popover",t.open),a=rx(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth??200,c=En({rootClass:"ui-select-content",stylexStyles:[$u.popup,t.menuSize==="md"&&$u.sizeMd,$u.width(l)]});return v.jsxs($5,{container:n??void 0,style:s,children:[v.jsx(F5,{"data-component":"select-backdrop",...Nn($u.backdrop,r!==null&&$u.backdropZIndex(r-1))}),v.jsx(G5,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",side:a.side,sideOffset:a.sideOffset,className:"ui-fc2p8",children:v.jsx(W5,{className:c.className,"data-component":"select-popup","data-size":t.menuSize,style:c.style,children:v.jsx(Ts,{menuSize:t.menuSize,children:v.jsx(X5,{"aria-label":t.ariaLabel??"Select an option",className:"ui-78zum5 ui-dt5ytf ui-12mrbbr ui-2lwn1j ui-6ikm8r ui-1odjw0f ui-f6zju3 ui-g31tg3 ui-cnij5n ui-43mhey ui-3gzrov",children:e})})})})]})}function oH({option:e}){const t=Tx(),n=v.jsxs(Q5,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item",...Nn(nH.root,rH[t.menuSize],xs.root),children:[e.leading!=null?v.jsx("span",{className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:e.leading}):null,v.jsx(tH,{className:"ui-98rzlu ui-euugli",children:e.label}),e.trailing!=null?v.jsx("span",{className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:e.trailing}):null,v.jsx(J5,{"data-component":"select-item-indicator",className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-19aaqeu",children:v.jsx(vn,{name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:v.jsx(gx,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function aH({value:e,defaultValue:t,onChange:n,onValueChange:r,open:s,defaultOpen:a,onOpenChange:l,options:c,placeholder:d,variant:p="default",frame:h="container",shape:m="rounded",size:g=_N,menuSize:y,contentWidth:k,matchAnchorWidth:S=!1,hug:T=!0,disabled:E=!1,animated:R=!1,className:_,renderTrigger:C,placement:A="bottom-start",offset:N=4,"aria-label":I,"aria-labelledby":$,id:H,leading:L,trailing:Z,...K}){const[q,z]=x.useState(t),j=e!==void 0,F=j?e:q,U=F!=null&&c.some(ne=>ne.value===F),[P,W]=x.useState(a??!1),D=s??P,B=y??"sm",G=x.useCallback((ne,le)=>{r?.(ne,le),!le.isCanceled&&(j||z(ne),ne!==null&&n?.(ne))},[j,n,r]),O=x.useCallback((ne,le)=>{l?.(ne,le),!le.isCanceled&&s===void 0&&W(ne)},[l,s]),ie=x.useMemo(()=>({hasValue:U,variant:p,frame:h,shape:m,size:g,menuSize:B,hug:T,disabled:E,animated:R,open:D,placement:A,offset:N,id:H,ariaLabel:I,ariaLabelledBy:$,placeholder:d,leading:L,trailing:Z,className:_,renderTrigger:C,contentWidth:k,matchAnchorWidth:S}),[R,I,$,_,k,E,h,T,U,H,D,L,S,N,A,d,B,Z,C,m,g,p]),te=c.map(ne=>({label:ne.label,value:ne.value}));return v.jsx(PN.Provider,{value:ie,children:v.jsx(Ts,{iconSize:h5,children:v.jsxs(N5,{...K,defaultOpen:a,defaultValue:t,disabled:E,id:H,items:te,onOpenChange:O,onValueChange:G,open:s,value:e,children:[v.jsx(iH,{}),v.jsx(sH,{children:c.map((ne,le)=>v.jsx(oH,{option:ne},typeof ne.value=="string"||typeof ne.value=="number"?String(ne.value):le))})]})})})}const H1=e=>Number.isFinite(e)?e:0;function lH(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(H1(e*1e3)%1e3),nanoseconds:Math.trunc(H1(e*1e6)%1e3)}}function uH(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function cH(e){switch(typeof e){case"number":{if(Number.isFinite(e))return lH(e);break}case"bigint":return uH(e)}throw new TypeError("Expected a finite number or bigint")}const fH=e=>e===0||e===0n,dH=(e,t)=>t===1||t===1n?e:`${e}s`,pH=1e-7,hH=24n*60n*60n*1000n;function mH(e,t){const n=typeof e=="bigint";if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};const r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[];const a=(h,m)=>{const g=Math.floor(h*10**m+pH);return(Math.round(g)/10**m).toFixed(m)},l=(h,m,g,y)=>{if(!((s.length===0||!t.colonNotation)&&fH(h)&&!(t.colonNotation&&g==="m"))){if(y??=String(h),t.colonNotation){const k=y.includes(".")?y.split(".")[0].length:y.length,S=s.length>0?2:1;y="0".repeat(Math.max(0,S-k))+y}else y+=t.verbose?" "+dH(m,h):g;s.push(y)}},c=cH(e),d=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(d)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(d,"day","d"):(l(d/365n,"year","y"),l(d%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),g=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(g,"microsecond","µs"),l(y,"nanosecond","ns");else{const k=m+g/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,T=k>=1?Math.round(k):Math.ceil(k),E=S?k.toFixed(S):T;l(Number.parseFloat(E),"millisecond","ms",E)}}else{const h=(n?Number(e%hH):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,g=a(h,m),y=t.keepDecimalsOnWholeSeconds?g:g.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const p=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(p)}var $N="en",_x={},$y={};function BN(){return $N}function FN(e){$N=e}function gH(e){return _x[e]}function UN(e){if(!e)throw new Error("No locale data passed");_x[e.locale]=e,$y[e.locale.toLowerCase()]=e.locale}function G1(e){if(_x[e])return e;if($y[e.toLowerCase()])return $y[e.toLowerCase()]}function qN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return V1(e);case"best fit":return V1(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function V1(e){var t=G1(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=G1(e);if(r)return r}}var ee={af:function(t){return t==1?"one":"other"},ak:function(t){return t==0||t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"},ast:function(t){var n=String(t).split("."),r=!n[1];return t==1&&r?"one":"other"},be:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return s==1&&a!=11?"one":s>=2&&s<=4&&(a<12||a>14)?"few":r&&s==0||s>=5&&s<=9||a>=11&&a<=14?"many":"other"},blo:function(t){return t==0?"zero":t==1?"one":"other"},br:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2),l=r&&n[0].slice(-6);return s==1&&a!=11&&a!=71&&a!=91?"one":s==2&&a!=12&&a!=72&&a!=92?"two":(s==3||s==4||s==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&r&&l==0?"many":"other"},bs:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),p=s.slice(-2);return a&&l==1&&c!=11||d==1&&p!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||d>=2&&d<=4&&(p<12||p>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),d=r.slice(-2),p=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&d>=11&&d<=19?"zero":l==1&&c!=11||s==2&&p==1&&d!=11||s!=2&&p==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),p=s.slice(-2);return a&&l==1&&c!=11||d==1&&p!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};ee.as=ee.am;ee.az=ee.af;ee.bal=ee.af;ee.bg=ee.af;ee.bn=ee.am;ee.brx=ee.af;ee.ce=ee.af;ee.chr=ee.af;ee.csw=ee.ak;ee.cv=ee.blo;ee.de=ee.ast;ee.doi=ee.am;ee.ee=ee.af;ee.el=ee.af;ee.en=ee.ast;ee.eo=ee.af;ee.et=ee.ast;ee.eu=ee.af;ee.fa=ee.am;ee.fi=ee.ast;ee.fil=ee.ceb;ee.fo=ee.af;ee.fur=ee.af;ee.fy=ee.ast;ee.gl=ee.ast;ee.gu=ee.am;ee.ha=ee.af;ee.hi=ee.am;ee.hr=ee.bs;ee.hsb=ee.dsb;ee.hu=ee.af;ee.hy=ee.ff;ee.ia=ee.ast;ee.id=ee.dz;ee.ie=ee.ast;ee.ig=ee.dz;ee.ii=ee.dz;ee.it=ee.ca;ee.ja=ee.dz;ee.jgo=ee.af;ee.jv=ee.dz;ee.ka=ee.af;ee.kea=ee.dz;ee.kk=ee.af;ee.kl=ee.af;ee.km=ee.dz;ee.kn=ee.am;ee.ko=ee.dz;ee.kok=ee.am;ee.ks=ee.af;ee.ksh=ee.blo;ee.ku=ee.af;ee.ky=ee.af;ee.lb=ee.af;ee.lkt=ee.dz;ee.lld=ee.ca;ee.lo=ee.dz;ee.ml=ee.af;ee.mn=ee.af;ee.mr=ee.af;ee.ms=ee.dz;ee.my=ee.dz;ee.nb=ee.af;ee.ne=ee.af;ee.nl=ee.ast;ee.nn=ee.af;ee.no=ee.af;ee.nqo=ee.dz;ee.nso=ee.ak;ee.om=ee.af;ee.or=ee.af;ee.pa=ee.ak;ee.pcm=ee.am;ee.ps=ee.af;ee.rm=ee.af;ee.sah=ee.dz;ee.sc=ee.ast;ee.scn=ee.ca;ee.sd=ee.af;ee.sk=ee.cs;ee.so=ee.af;ee.sq=ee.af;ee.sr=ee.bs;ee.su=ee.dz;ee.sv=ee.ast;ee.sw=ee.ast;ee.syr=ee.af;ee.ta=ee.af;ee.te=ee.af;ee.th=ee.dz;ee.ti=ee.ak;ee.tk=ee.af;ee.tn=ee.af;ee.to=ee.dz;ee.tr=ee.af;ee.ug=ee.af;ee.uk=ee.ru;ee.ur=ee.ast;ee.uz=ee.af;ee.vec=ee.ca;ee.vi=ee.dz;ee.wae=ee.af;ee.wo=ee.dz;ee.xh=ee.af;ee.yi=ee.ast;ee.yo=ee.dz;ee.yue=ee.dz;ee.zh=ee.dz;ee.zu=ee.am;function K1(e){return e==="pt-PT"?e:yH(e)}var bH=/^([a-z0-9]+)/i;function yH(e){var t=e.match(bH);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xc(e)}function vH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kH(r.key),r)}}function xH(e,t,n){return t&&Z1(e.prototype,t),n&&Z1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kH(e){var t=SH(e,"string");return xc(t)=="symbol"?t:t+""}function SH(e,t){if(xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var By=(function(){function e(t,n){vH(this,e);var r=e.supportedLocalesOf(t);if(r.length===0)throw new RangeError("Unsupported locale: "+t);if(n&&n.type!=="cardinal")throw new RangeError('Only "cardinal" "type" is supported');this.$=ee[K1(r[0])]}return xH(e,[{key:"select",value:function(n){return this.$(n)}}],[{key:"supportedLocalesOf",value:function(n){return typeof n=="string"&&(n=[n]),n.filter(function(r){return ee[K1(r)]})}}]),e})();function wl(e){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function W1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Y1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W1(Object(n),!0).forEach(function(r){wH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wH(e,t,n){return(t=HN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X1(e,t){return RH(e)||_H(e,t)||TH(e,t)||EH()}function EH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TH(e,t){if(e){if(typeof e=="string")return Q1(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q1(e,t):void 0}}function Q1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _H(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,p=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){p=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw s}}return c}}function RH(e){if(Array.isArray(e))return e}function CH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HN(r.key),r)}}function NH(e,t,n){return t&&AH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HN(e){var t=OH(e,"string");return wl(t)=="symbol"?t:t+""}function OH(e,t){if(wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MH=["second","minute","hour","day","week","month","quarter","year"],IH=["auto","always"],DH=["long","short","narrow"],zH=["lookup","best fit"],Es=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};CH(this,e);var r=n.numeric,s=n.style,a=n.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",r!==void 0){if(IH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(DH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(zH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(BN()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");By.supportedLocalesOf(this.locale).length>0?this.pluralRules=new By(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=qN(this.locale,{localeMatcher:this.localeMatcher})}return NH(e,[{key:"format",value:function(){var n=J1(arguments),r=X1(n,2),s=r[0],a=r[1];return this.getRule(s,a).replace("{0}",this.formatNumber(Math.abs(s)))}},{key:"formatToParts",value:function(){var n=J1(arguments),r=X1(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var d=[];return c>0&&d.push({type:"literal",value:l.slice(0,c)}),d=d.concat(this.formatNumberToParts(Math.abs(s)).map(function(p){return Y1(Y1({},p),{},{unit:a})})),c+3<l.length-1&&d.push({type:"literal",value:l.slice(c+3)}),d}},{key:"getRule",value:function(n,r){var s=gH(this.locale)[this.style][r];if(typeof s=="string")return s;if(this.numeric==="auto"){if(n===-2||n===-1){var a=s["previous".concat(n===-1?"":"-"+Math.abs(n))];if(a)return a}else if(n===1||n===2){var l=s["next".concat(n===1?"":"-"+Math.abs(n))];if(l)return l}else if(n===0&&s.current)return s.current}var c=s[BH(n)?"past":"future"];if(typeof c=="string")return c;var d=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[d]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();Es.supportedLocalesOf=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(n){return qN(n,t)})};Es.addLocale=UN;Es.addDefaultLocale=function(e){UN(e),FN(e.locale)};Es.setDefaultLocale=FN;Es.getDefaultLocale=BN;Es.PluralRules=By;var Ub='Invalid "unit" argument';function LH(e){if(wl(e)==="symbol")throw new TypeError(Ub);if(typeof e!="string")throw new RangeError("".concat(Ub,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),MH.indexOf(e)<0)throw new RangeError("".concat(Ub,": ").concat(e));return e}var jH='Invalid "number" argument';function PH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(jH,": ").concat(e));return e}function $H(e){return 1/e===-1/0}function BH(e){return e<0||e===0&&$H(e)}function J1(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[PH(e[0]),LH(e[1])]}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}function FH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HH(r.key),r)}}function qH(e,t,n){return t&&UH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HH(e){var t=GH(e,"string");return ta(t)=="symbol"?t:t+""}function GH(e,t){if(ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eT=(function(){function e(){FH(this,e),this.cache={}}return qH(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var d=c[l];if(ta(n)!=="object")return;n=n[d]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,d=0,p=r;d<p.length;d++){var h=p[d];ta(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Fy(e){"@babel/helpers - typeof";return Fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fy(e)}function VH(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=KH(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KH(e,t){if(e){if(typeof e=="string")return tT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tT(e,t):void 0}}function tT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZH(e,t){for(var n=VH(e),r;!(r=n()).done;){var s=r.value;if(t(s))return s;for(var a=s.split("-");a.length>1;)if(a.pop(),s=a.join("-"),t(s))return s}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function WH(){var e=(typeof Intl>"u"?"undefined":Fy(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function Uy(e){"@babel/helpers - typeof";return Uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uy(e)}function YH(e){return QH(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var XH={}.constructor;function QH(e){return Uy(e)!==void 0&&e!==null&&e.constructor===XH}var bs=60,Zp=60*bs,Wo=24*Zp,qy=7*Wo,Hy=30.44*Wo,GN=146097/400*Wo;function fl(e){switch(e){case"second":return 1;case"minute":return bs;case"hour":return Zp;case"day":return Wo;case"week":return qy;case"month":return Hy;case"year":return GN}}function VN(e){return e.factor!==void 0?e.factor:fl(e.unit||e.formatAs)||1}function kc(e){return e==="floor"?Math.floor:Math.round}function Rx(e){return e==="floor"?1:.5}function Gy(e){"@babel/helpers - typeof";return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gy(e)}function KN(e,t){var n=t.prevStep,r=t.timestamp,s=t.now,a=t.future,l=t.round,c;return n&&(n.id||n.unit)&&(c=e["threshold_for_".concat(n.id||n.unit)]),c===void 0&&e.threshold!==void 0&&(c=e.threshold,typeof c=="function"&&(c=c(s,a))),c===void 0&&(c=e.minTime),Gy(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(p,h){return nT(p,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=nT(e.formatAs,n.formatAs,{round:l})):c=0),c===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),c}function nT(e,t,n){var r=n.round,s=fl(e),a=fl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Rx(r))}function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(e)}function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function JH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rT(Object(n),!0).forEach(function(r){e7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e7(e,t,n){return(t=t7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t7(e){var t=n7(e,"string");return Sc(t)=="symbol"?t:t+""}function n7(e,t){if(Sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=s7(e,l);var c=i7(e,t,{now:r,future:s,round:a});{if(c){var d=e[e.indexOf(c)-1],p=e[e.indexOf(c)+1];return[d,c,p]}return[void 0,void 0,e[0]]}}function i7(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=ZN(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var d=kc(a)(Math.abs(t)/VN(c)/c.granularity)*c.granularity;if(d===0&&l>0)return e[l-1]}return c}}}function ZN(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=KN(e[r],JH({prevStep:e[r-1],timestamp:n.now-t*1e3},n));return s===void 0||Math.abs(t)<s?r-1:r===e.length-1?r:ZN(e,t,n,r+1)}function s7(e,t){return e.filter(function(n){var r=n.unit,s=n.formatAs;return r=r||s,r?t.indexOf(r)>=0:!0})}function o7(e,t,n){var r=n.now,s=n.round;if(fl(e)){var a=fl(e)*1e3,l=t>r,c=Math.abs(t-r),d=kc(s)(c/a)*a;return l?d>0?c-d+l7(s,a):c-d+1:-(c-d)+a7(s,a)}}function a7(e,t){return Rx(e)*t}function l7(e,t){return(1-Rx(e))*t+1}var u7=365*24*60*60*1e3,WN=1e3*u7;function c7(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,d=e.getTime?e.getTime():e,p=function(k){return o7(k,d,{now:a,round:c})},h=d7(l?t:s,d,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(d,{getTimeToNextUpdateForUnit:p,getRoundFunction:kc,now:a,future:l,round:c})),m===void 0)){var g=t.unit||t.formatAs;g&&(m=p(g))}return m===void 0?h:Math.min(m,h)}}function f7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=KN(e,{timestamp:t,now:r,future:s,round:a,prevStep:l});if(c!==void 0)return s?t-c*1e3+1:c===0&&t===r?WN:t+c*1e3}function d7(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=f7(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:WN}var YN={};function il(e){return YN[e]}function XN(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");YN[e.locale]=e}const p7=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Vy={steps:p7,labels:"long"};function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}function iT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iT(Object(n),!0).forEach(function(r){h7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h7(e,t,n){return(t=m7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m7(e){var t=g7(e,"string");return wc(t)=="symbol"?t:t+""}function g7(e,t){if(wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Ky=sT(sT({},Vy),{},{steps:Vy.steps.filter(function(e){return e.formatAs!=="second"})}),QN=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:bs,unit:"minute"},{threshold:2.5*bs,granularity:5,factor:bs,unit:"minute"},{threshold:22.5*bs,factor:.5*Zp,unit:"half-hour"},{threshold:42.5*bs,threshold_for_minute:52.5*bs,factor:Zp,unit:"hour"},{threshold:20.5/24*Wo,factor:Wo,unit:"day"},{threshold:5.5*Wo,factor:qy,unit:"week"},{threshold:3.5*qy,factor:Hy,unit:"month"},{threshold:10.5*Hy,factor:GN,unit:"year"}],oT={gradation:QN,flavour:"long",units:["now","minute","hour","day","week","month","year"]},b7={gradation:QN,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function JN(e){return e instanceof Date?e:new Date(e)}var Zy=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Li={},y7={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonth||(Li[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Li[n].dayMonth.format(JN(t))}},v7={minTime:function(t,n){var r=n.future;if(r){var s=new Date(new Date(t).getFullYear(),0).getTime()-1;return(t-s)/1e3}else{var a=new Date(new Date(t).getFullYear()+1,0).getTime();return(a-t)/1e3}},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonthYear||(Li[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Li[n].dayMonthYear.format(JN(t))}};WH()?Zy.push(y7,v7):Zy.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const na={steps:Zy,labels:["mini","short-time","narrow","short"]};function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function aT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aT(Object(n),!0).forEach(function(r){x7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x7(e,t,n){return(t=k7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k7(e){var t=S7(e,"string");return Ec(t)=="symbol"?t:t+""}function S7(e,t){if(Ec(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ec(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const w7=lT(lT({},na),{},{steps:[{formatAs:"now"}].concat(na.steps)});function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function uT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function cT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(n),!0).forEach(function(r){E7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E7(e,t,n){return(t=T7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T7(e){var t=_7(e,"string");return Tc(t)=="symbol"?t:t+""}function _7(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Wy=cT(cT({},na),{},{steps:na.steps.filter(function(e){return e.formatAs!=="second"})});function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function fT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function dT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(n),!0).forEach(function(r){R7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R7(e,t,n){return(t=C7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C7(e){var t=A7(e,"string");return _c(t)=="symbol"?t:t+""}function A7(e,t){if(_c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const N7=dT(dT({},Wy),{},{steps:[{formatAs:"now"}].concat(Wy.steps)});function Rc(e){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function pT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Xd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(n),!0).forEach(function(r){O7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O7(e,t,n){return(t=M7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M7(e){var t=I7(e,"string");return Rc(t)=="symbol"?t:t+""}function I7(e,t){if(Rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const D7=Xd(Xd({},na),{},{steps:na.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Xd(Xd({},e),{},{minTime:bs}):e})}),Cc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ac(e)}function hT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function mT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hT(Object(n),!0).forEach(function(r){z7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z7(e,t,n){return(t=L7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L7(e){var t=j7(e,"string");return Ac(t)=="symbol"?t:t+""}function j7(e,t){if(Ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const P7=mT(mT({},Cc),{},{steps:[{formatAs:"now"}].concat(Cc.steps)});function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function gT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function bT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(n),!0).forEach(function(r){$7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $7(e,t,n){return(t=B7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B7(e){var t=F7(e,"string");return Nc(t)=="symbol"?t:t+""}function F7(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Yy=bT(bT({},Cc),{},{steps:Cc.steps.filter(function(e){return e.formatAs!=="second"})});function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function yT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function vT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yT(Object(n),!0).forEach(function(r){U7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U7(e,t,n){return(t=q7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q7(e){var t=H7(e,"string");return Oc(t)=="symbol"?t:t+""}function H7(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const G7=vT(vT({},Yy),{},{steps:[{formatAs:"now"}].concat(Yy.steps)});function V7(e){switch(e){case"default":case"round":return Vy;case"round-minute":return Ky;case"approximate":return oT;case"time":case"approximate-time":return b7;case"mini":return Cc;case"mini-now":return P7;case"mini-minute":return Yy;case"mini-minute-now":return G7;case"twitter":return na;case"twitter-now":return w7;case"twitter-minute":return Wy;case"twitter-minute-now":return N7;case"twitter-first-minute":return D7;default:return oT}}function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(e)}function K7(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=eO(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z7(e,t){return X7(e)||Y7(e,t)||eO(e,t)||W7()}function W7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eO(e,t){if(e){if(typeof e=="string")return xT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xT(e,t):void 0}}function xT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Y7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,p=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){p=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw s}}return c}}function X7(e){if(Array.isArray(e))return e}function Q7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tG(r.key),r)}}function eG(e,t,n){return t&&J7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tG(e){var t=nG(e,"string");return ra(t)=="symbol"?t:t+""}function nG(e,t){if(ra(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zr=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;Q7(this,e),typeof t=="string"&&(t=[t]),this.locale=ZH(t.concat(e.getDefaultLocale()),il),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Es,this.IntlPluralRules=Es.PluralRules),this.relativeTimeFormatCache=new eT,this.pluralRulesCache=new eT}return eG(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!aG(r)?(s=r,r=void 0):s={}),r||(r=Ky),typeof r=="string"&&(r=V7(r));var l=rG(n),c=this.getLabels(r.flavour||r.labels),d=c.labels,p=c.labelsType,h=s.round||r.round,m,g=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=g);var y=function(N){var I=N.now,$=(I-l)/1e3,H=s.future||$<0,L=oG(d,il(a.locale).now,il(a.locale).long,H);if(r.custom){var Z=r.custom({now:I,date:new Date(l),time:l,elapsed:$,locale:a.locale});if(Z!==void 0)return{getText:function(){return Z},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var K=sG(r.units,d,L),q=r7(r.gradation||r.steps||Ky.steps,$,{now:I,units:K,round:h,future:H}),z=Z7(q,3),j=z[0],F=z[1],U=z[2],P=function(){return a.formatDateForStep(l,F,$,{labels:d,labelsType:p,nowLabel:L,now:I,future:H,round:h})||""},W=function(){var B=c7(l,F,{nextStep:U,prevStep:j,now:I,future:H,round:h});if(typeof B=="number")return s.getTimeToNextUpdateUncapped?B:nO(B)};return{getText:P,getTextRefreshDelay:W}},k=y({now:m}),S=k.getText,T=k.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),T()];if(s.refresh){var E=6e4,R,_=function A(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;R=lG(function(){var I=y({now:m+(Date.now()-g)}),$=I.getText,H=I.getTextRefreshDelay;s.refresh($()),A(H())},N)};_(T());var C=function(){clearTimeout(R)};return[S(),C]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,d=a.labelsType,p=a.nowLabel,h=a.now,m=a.future,g=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(E,R){return l.formatValue(R,E,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return p;var k=Math.abs(s)/VN(r);r.granularity&&(k=kc(g)(k/r.granularity)*r.granularity);var S=-1*Math.sign(s)*kc(g)(k);switch(S===0&&(m?S=0:S=-0),d){case"long":case"short":case"narrow":return this.getFormatter(d).format(S,y);default:return this.formatValue(S,y,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",d=n[c]||n;if(typeof d=="string")return d;var p=this.getPluralRules().select(Math.abs(s));return d[p]||d.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=il(this.locale),s=K7(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),tO="en";zr.getDefaultLocale=function(){return tO};zr.setDefaultLocale=function(e){Xy=!0,tO=e};zr.addDefaultLocale=function(e){Xy&&zr.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(zr.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),Xy=!0,zr.addLocale(e),zr.setDefaultLocale(e.locale)};var Xy=!1;zr.addLocale=function(e){XN(e),Es.addLocale(e)};zr.locale=zr.addLocale;zr.addLabels=function(e,t,n){var r=il(e);r||(XN({locale:e}),r=il(e)),r[t]=n};function rG(e){if(e.constructor===Date||iG(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(ra(e),", ").concat(e))}function iG(e){return ra(e)==="object"&&typeof e.getTime=="function"}function sG(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(s){return s==="now"||r.indexOf(s)>=0})),r}function oG(e,t,n,r){var s=e.now||t&&t.now;if(s)return typeof s=="string"?s:r?s.future:s.past;if(n&&n.second&&n.second.current)return n.second.current}function aG(e){return typeof e=="string"||YH(e)}function lG(e,t){return setTimeout(e,nO(t))}function nO(e){return Math.min(e,uG)}var uG=2147483647;const rO={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}};zr.addLocale(rO);zr.addDefaultLocale(rO);const cG=new zr("en-US");function fr(e,t){let n=typeof e=="string"?e:JSON.stringify(e);return n===void 0&&(n=""),n.length>t?`${n.slice(0,t-1)}…`:n}function ji(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function fG(e,t){const n=String(e??"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=t-1,s=Math.max(1,Math.floor(r*.35)),a=Math.max(1,r-s);return`${n.slice(0,s)}…${n.slice(n.length-a)}`}function dl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Qr(e){return e==null||!Number.isFinite(e)?"—":mH(e)}function Cx(e){const t=Math.ceil(e/1e3);if(e<1e3)return"1s";if(t<60)return`${t}s`;if(t>=3600){const s=Math.floor(t/3600),a=Math.floor(t%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const dG=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function kT(e){return e==null||!Number.isFinite(e)?"—":dG.format(e)}function iO(e,t=Date.now()){const n=dl(e);return n===null?null:cG.format(Math.min(n,t),"mini",{now:t})}function El(e,t=8e3){if(e==null)return"";let n;try{n=typeof e=="string"?e:JSON.stringify(e,null,2)}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}const pG=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function Wp(e){return e==null||!Number.isFinite(e)?"0":pG.format(e)}function Qy(e){const t=String(e||"").trim();if(!t)return[];if(t.charAt(0)==="[")try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}const n=[];for(const r of t.split(/\n/)){const s=r.trim();if(s)try{n.push(JSON.parse(s))}catch{}}return n}function hG(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="github.com"&&n.length>=4&&n[2]==="pull"||t.hostname==="review.cursor.com"&&n[0]==="pr"?!0:(t.hostname==="origin.cursor.com"||t.hostname.endsWith(".origin-staging.com")||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function sO(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}const ST=e=>{let t;const n=new Set,r=(p,h)=>{const m=typeof p=="function"?p(t):p;if(!Object.is(m,t)){const g=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,g))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>d,subscribe:p=>(n.add(p),()=>n.delete(p))},d=t=e(r,s,c);return c},mG=(e=>e?ST(e):ST),gG=e=>e;function bG(e,t=gG){const n=Gu.useSyncExternalStore(e.subscribe,Gu.useCallback(()=>t(e.getState()),[e,t]),Gu.useCallback(()=>t(e.getInitialState()),[e,t]));return Gu.useDebugValue(n),n}const yG=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,vG=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function xG(e=window.location.pathname,t=window.location.hostname){const n=vG.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=yG.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function kG(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function oO(e=window.location,t=window.history){const n=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(n==="")return"";const s=new URLSearchParams(n).get("access")?.trim()??"";return s===""?"":(t.replaceState(null,"",`${e.pathname}${e.search}`),s)}function SG(e,t=window){const n=()=>{const r=oO(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class wG{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}abs(){return this.request("/v1/abs")}agents(){return this.request("/v1/agents")}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}reviewStart(t){return this.postJson("/v1/channels/review",{prUrl:t})}reviewPoll(t){return this.request(`/v1/channels/review/${encodeURIComponent(t)}`)}asrReviewersProgress(t){return this.request(`/v1/channels/asr-progress/${encodeURIComponent(t)}`)}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[d,p]of Object.entries(r.query))p!==""&&l.set(d,p);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}eventsDownloadUrl(t){return this.url(`/v1/session/${encodeURIComponent(t)}/events`)}}const EG=["chat","trace","raw","logs","evals","abs"],mp="cursor-playground",aO=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function TG(e){return typeof e=="string"&&EG.includes(e)}function _G(e,t){if(!aO.includes(t)||typeof e!="object"||e===null)return null;const n=e;return n.source!==mp?null:n.type==="hello"?{source:mp,type:"hello"}:n.type==="set-view"&&TG(n.view)?{source:mp,type:"set-view",view:n.view}:null}function RG(e){const t=n=>{const r=_G(n.data,n.origin);r!==null&&e(r)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}function CG(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return aO.includes(n)?n:null}function wT(e,t=CG()){if(t===null)return;const n={source:mp,type:"state",view:e};window.parent.postMessage(n,t)}const AG=new Set(["github","slack"]);function NG(e){return/^\s*\//.test(e)}function Ax(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&AG.has(n.kind)))for(const r of n.routes??[]){const s=zG(n.id,r.path);if(s===null)continue;const a={name:s,channelId:n.id,method:r.method.toUpperCase(),url:r.url,path:r.path};r.description!==void 0&&(a.description=r.description),r.bodySchema!==void 0&&(a.bodySchema=r.bodySchema),r.querySchema!==void 0&&(a.querySchema=r.querySchema),t.push(a)}return t.sort((n,r)=>{const s=n.name.localeCompare(r.name);return s!==0?s:Yp(n.method)-Yp(r.method)}),t}function lO(e){const t=new Set,n=[];for(const r of e)t.has(r.name)||(t.add(r.name),n.push(r.name));return n}function OG(e,t){const n=e.trim().toLowerCase();if(!n.startsWith("/"))return[];const r=new Set,s=[];for(const a of t)a.name.toLowerCase().startsWith(n)&&(r.has(a.name)||(r.add(a.name),s.push(a)));return s}function MG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(p=>p.method).join("|"),l=s.find(p=>p.description)?.description??"",c=Nx(s[0]),d=uO(c);t.push(d?`- \`${r}\` (${a}) — ${l}${l?" ":""}${d}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field.","Example: `/drive https://github.com/org/repo/pull/1 mode=suggest`"),t.join(`
33
+ `)}function IG(e,t){const n=e.trim(),r=/^(\/[^\s]+)(?:\s+([\s\S]*))?$/.exec(n);if(r===null)return{ok:!1,error:"Expected `/command` optionally followed by args."};const s=r[1],a=(r[2]??"").trim(),l=t.filter(m=>m.name===s);if(l.length===0){const m=lO(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(g=>`\`${g}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=DG(l,a),d=Nx(c),p=PG(a,d);if(!p.ok)return{ok:!1,error:p.error,commandName:s};const h=LG(d,p.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${uO(d)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:FG(p.value)}:{ok:!0,command:c,body:p.value,query:c.querySchema!==void 0?UG(p.value,c.querySchema):void 0}}function DG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>Yp(a.method)-Yp(l.method)),r=cO(t);if(r!==null){let a=null,l=-1;for(const c of n){const d=Nx(c),p=jG(d,r);p>l&&(l=p,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function zG(e,t){const n=e.trim();if(n==="")return null;const r=t===""||t==="/"?"":t.startsWith("/")?t.replace(/\/+$/,""):`/${t.replace(/\/+$/,"")}`;return r.includes(":")?null:`/${n}${r}`}function Yp(e){switch(e.toUpperCase()){case"GET":return 0;case"POST":return 1;case"PUT":return 2;case"PATCH":return 3;case"DELETE":return 4;default:return 9}}function Nx(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function uO(e){if(e===void 0)return"";const t=Uh(e);if(t===void 0)return"";const n=qh(e),r=[];for(const s of n)t[s]?.type==="string"?r.push(`<${s}>`):r.push(`${s}=…`);for(const s of Object.keys(t))n.has(s)||r.push(`[${s}=…]`);return r.length>0?`Usage: ${r.join(" ")}`:""}function Uh(e){if(e===void 0||e.type!=="object")return;const t=e.properties;if(!(typeof t!="object"||t===null||Array.isArray(t)))return t}function qh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function LG(e,t){const n=qh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function jG(e,t){const n=Uh(e);if(n===void 0)return 0;let r=0;for(const s of Object.keys(t))s in n?r+=2:r-=1;for(const s of qh(e))s in t&&(r+=3);return r}function cO(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n}catch{return null}return null}function PG(e,t){if(e==="")return{ok:!0,value:{}};const n=cO(e);if(n!==null)return{ok:!0,value:n};if(e.startsWith("{"))return{ok:!1,error:"Args look like JSON but failed to parse."};const r=Uh(t),s={},a=[];for(const l of $G(e)){const c=l.indexOf("=");if(c>0){const d=l.slice(0,c),p=l.slice(c+1);s[d]=BG(p,r?.[d])}else a.push(l)}if(a.length>0){const l=[...qh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(p=>{const h=r?.[p];return h===void 0||h.type==="string"||h.type===void 0}),d=c.find(p=>s[p]===void 0)??c[0];if(d===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[d]=a[0]:s[d]=a.join(" ")}return{ok:!0,value:s}}function $G(e){const t=[];let n="",r=null;for(let s=0;s<e.length;s++){const a=e[s];if(r!==null){a===r?r=null:n+=a;continue}if(a==='"'||a==="'"){r=a;continue}if(/\s/.test(a)){n!==""&&(t.push(n),n="");continue}n+=a}return n!==""&&t.push(n),t}function BG(e,t){const n=t?.type;if(n==="number"||n==="integer"){const r=Number(e);return Number.isFinite(r)?r:e}if(n==="boolean"){if(e==="true")return!0;if(e==="false")return!1}if(n==="array"||n==="object")try{return JSON.parse(e)}catch{return e}return e}function FG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function UG(e,t){const n=Uh(t);if(n===void 0)return;const r={};for(const s of Object.keys(n)){const a=e[s];a!=null&&(r[s]=typeof a=="string"?a:String(a))}return Object.keys(r).length>0?r:void 0}const qG=new Set(["action.result","actions.requested","action.approval_requested","action.approval_resolved"]),HG=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","subagent.called","subagent.completed"]),GG=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","action.approval_requested","action.approval_resolved","action.result","subagent.called","subagent.completed","turn.completed","turn.failed","agent.bound","session.failed"]);function fO(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function VG(){const e=xG()!==null,t=e?oO():"";return{meta:{name:"agent",dev:!1,basePath:fO()},info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"chat",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&kG(),transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,sidebarOpen:!1,bridged:!1,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalNavReturn:!1}}const Vo=mG(()=>VG());class KG{constructor(){this.api=new wG(fO(),()=>this.state.authToken,()=>this.state.aliasToken),this.items=[],this.itemIndex=new Map,this.toolIds=new Set,this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds=new Map,this.nestedReasoningIds=new Map,this.idSeq=0,this.streamAbort=null,this.lastIndex=-1,this.toastTimer=null,this.evalPollTimer=null,this.evalRestoreGeneration=0,this.evalPollGeneration=0,this.evalRestoreInFlight=null,this.booted=!1,this.aliasStreamInterrupted=!1,this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.flushingQueue=!1,this.queueHeld=!1,this.subscribe=Vo.subscribe,this.getState=()=>Vo.getState()}get state(){return Vo.getState()}set(t){Vo.setState(t)}commitTranscript(){this.set({transcript:this.items.slice()})}toast(t){this.set({toast:t}),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>this.set({toast:null}),4e3)}setAuthToken(t){this.set({authToken:t})}async signInWithAliasToken(t){const n=t.trim();if(n==="")return{ok:!1,error:"Enter the deployment's alias token."};this.set({aliasToken:n});const r=await this.api.health();return r.ok?(this.aliasStreamInterrupted=!1,this.booted=!1,await this.boot(),{ok:!0}):(this.set({aliasToken:""}),r.status===404?{ok:!1,error:"That token was not accepted. Check it and try again."}:{ok:!1,error:`Could not reach the agent (HTTP ${r.status}).`})}acceptAliasTokenHandoff(t){if(this.set({aliasToken:t}),!this.booted){this.boot();return}if(!this.aliasStreamInterrupted)return;this.aliasStreamInterrupted=!1;const n=this.state.current;n!==null&&this.streamAbort===null&&this.startStream(n.sessionId,this.lastIndex+1)}noteAliasAuthLoss(t){return!this.state.aliasHosted||t!==401&&t!==404||this.state.aliasToken.trim()===""?!1:(this.aliasStreamInterrupted=this.streamAbort!==null,this.stopStream(),this.set({aliasToken:""}),!0)}setDrawerOpen(t){this.set({drawerOpen:t})}setSidebarOpen(t){this.set({sidebarOpen:t})}nextId(t){return this.idSeq+=1,`${t}-${this.idSeq}`}push(t){this.itemIndex.set(t.id,this.items.length),this.items.push(t)}update(t,n){const r=this.itemIndex.get(t);r!==void 0&&(this.items[r]={...this.items[r],...n})}resetTranscript(){this.items=[],this.itemIndex.clear(),this.toolIds.clear(),this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds.clear(),this.nestedReasoningIds.clear(),this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.queueHeld=!1}subagentToolCallId(t){return`sub:${t}`}ensureSubagentTool(t,n){const r=this.subagentToolCallId(t),s=this.itemIndex.has(this.toolItemId(r));return this.upsertTool(r,s?"":"subagent:task",null,n)}getToolItem(t){const n=this.itemIndex.get(t);if(n===void 0)return null;const r=this.items[n];return r?.kind==="tool"?r:null}updateSubagentChildren(t,n,r=null){const s=this.ensureSubagentTool(t,r),a=this.getToolItem(s);if(a===null)return;const l=n([...a.children??[]]);this.update(s,{children:l})}upsertNestedTool(t,n,r,s,a){this.updateSubagentChildren(t,l=>{const c=l.findIndex(d=>d.kind==="tool"&&d.callId===n);if(c>=0){const d=l[c];if(d?.kind!=="tool")return l;const p=l.slice();return p[c]={...d,name:r||d.name,args:s??d.args},p}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const d=c.findIndex(g=>g.kind==="tool"&&g.callId===n),p=s==null?"(no output)":fr(s,4e3);if(d<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:p,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[d];if(h?.kind!=="tool")return c;const m=c.slice();return m[d]={...h,name:r||h.name,status:a?"error":"done",output:p,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(d=>d.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null,this.push({kind:"user",id:this.nextId("user"),text:String(t??"")})}pushDivider(t,n=!1,r){this.push({kind:"divider",id:this.nextId("div"),text:t,fail:n,url:r})}ensureAssistant(){if(this.assistantId)return this.assistantId;const t=this.nextId("asst");return this.push({kind:"assistant",id:t,text:"",streaming:!0}),this.assistantId=t,t}ensureReasoning(){if(this.reasoningId)return this.reasoningId;const t=this.nextId("think");return this.push({kind:"reasoning",id:t,text:"",open:!0}),this.reasoningId=t,t}toolItemId(t){return`tool:${t}`}upsertTool(t,n,r,s){const a=this.toolItemId(t);if(this.itemIndex.has(a)){const l={};if(n&&(l.name=n),r!=null&&(l.args=r),s!==null){const c=this.getToolItem(a);c!==null&&c.startedAt===null&&(l.startedAt=s)}return Object.keys(l).length>0&&this.update(a,l),a}return this.push({kind:"tool",id:a,callId:t,name:n,args:r??null,status:"running",output:null,startedAt:s??Date.now(),endedAt:null}),this.toolIds.add(a),a}markAwaiting(t,n,r){const s=this.upsertTool(t,n,r,Date.now());this.update(s,{status:"awaiting",output:"Parked for human approval. Approve or deny to continue the turn."})}clearAwaiting(t,n){const r=this.toolItemId(t);this.itemIndex.has(r)&&this.update(r,{status:"running",output:n==="deny"?"Denied — tool will not execute.":"Approved — executing…"})}finishTool(t,n,r,s,a){const l=this.upsertTool(t,n,null,a),c=r==null?"(no output)":fr(r,4e3);this.update(l,{status:s?"error":"done",output:c,outputRaw:r,endedAt:a??Date.now()}),this.activeTurnId===null&&!this.hasOpenTools()&&this.setRunning(!1)}hasOpenTools(){for(const t of this.toolIds){const n=this.itemIndex.get(t);if(n===void 0)continue;const r=this.items[n];if(r.kind==="tool"&&(r.status==="running"||r.status==="awaiting"))return!0}return!1}finalizeOpenTools(t,n){const r=t??Date.now();for(const s of this.toolIds){const a=this.itemIndex.get(s);if(a===void 0)continue;const l=this.items[a];l.kind==="tool"&&(l.status==="done"||l.status==="error"||l.status!=="awaiting"&&this.update(s,{status:"orphan",endedAt:r,output:n}))}}beginDiscardStaleTurnBody(){this.discardTurnBody=!0,this.activeTurnId=null}applyChat(t){if(this.discardTurnBody){if(t.type==="turn.started")this.discardTurnBody=!1;else if(t.type!=="message.received"&&t.type!=="agent.bound")return}else if(this.activeTurnId!==null&&t.turnId!==void 0&&t.turnId!==this.activeTurnId&&!HG.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=dl(t.at)||Date.now();switch(t.type){case"message.received":this.pushUser(n.text);break;case"agent.bound":this.pushDivider(n.url?`cloud agent ${n.sdkAgentId}`:`agent ${n.sdkAgentId}`,!1,typeof n.url=="string"?n.url:void 0);break;case"turn.started":this.activeTurnId=t.turnId??null,this.activeTurnStartedAt=dl(t.at),this.setRunning(!0);break;case"reasoning.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedReasoning(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureReasoning(),{text:String(n.text??"")});break;case"reasoning.completed":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.nestedReasoningIds.get(n.parentCallId);s&&(this.updateNestedChild(n.parentCallId,s,{open:!1}),this.nestedReasoningIds.delete(n.parentCallId))}else this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null);break;case"message.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureAssistant(),{text:String(n.text??"")});break;case"message.completed":{if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??""),streaming:!1}),this.nestedAssistantIds.delete(n.parentCallId)}else{const s=this.ensureAssistant();this.update(s,{text:String(n.text??""),streaming:!1}),this.assistantId=null}break}case"actions.requested":this.setRunning(!0);for(const s of n.calls||[]){const a=typeof s.parentCallId=="string"&&s.parentCallId!==""?s.parentCallId:typeof n.parentCallId=="string"&&n.parentCallId!==""?n.parentCallId:void 0;a!==void 0?this.upsertNestedTool(a,s.callId,s.toolName,s.args,r):s.toolName==="task"||this.upsertTool(s.callId,s.toolName,s.args,r)}break;case"action.approval_requested":this.markAwaiting(n.callId,n.toolName,n.args);break;case"action.approval_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.result":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.finishNestedTool(n.parentCallId,n.callId,n.toolName,n.output,!!n.isError,r):n.toolName==="task"||this.finishTool(n.callId,n.toolName,n.output,!!n.isError,r);break;case"subagent.called":this.setRunning(!0),this.upsertTool(this.subagentToolCallId(n.callId),`subagent:${n.name||"task"}`,n.description,r);break;case"subagent.completed":this.nestedAssistantIds.delete(n.callId),this.nestedReasoningIds.delete(n.callId),this.finishTool(this.subagentToolCallId(n.callId),"","completed",!1,r);break;case"turn.completed":{this.activeTurnId=null,this.finalizeOpenTools(r,"(no result — turn completed before the tool reported back)");const s=this.activeTurnStartedAt;this.activeTurnStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&dl(t.at)!==null?Math.max(0,r-s):null,inTokens:typeof n.usage?.inputTokens=="number"?n.usage.inputTokens:void 0,outTokens:typeof n.usage?.outputTokens=="number"?n.usage.outputTokens:void 0}),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.finalizeOpenTools(r,`(no result — turn failed: ${n.message||"unknown"})`),this.pushDivider(`turn failed: ${n.message}`,!0),this.setRunning(this.hasOpenTools());break;case"session.waiting":this.setRunning(this.hasOpenTools()),this.refreshSessions();break;case"session.completed":this.finalizeOpenTools(r,"(no result — session completed)"),this.pushDivider("task session completed"),this.setRunning(!1),this.refreshSessions();break;case"session.failed":this.finalizeOpenTools(r,`(no result — session failed: ${n.message||"unknown"})`),this.pushDivider(`session failed: ${n.message}`,!0),this.setRunning(!1),this.refreshSessions();break}}handleEvent(t){this.state.traceEvents.push(t),this.applyChat(t),this.commitTranscript(),this.set({traceEvents:this.state.traceEvents.slice()})}setRunning(t){this.set({running:t,turnStartedAt:t?this.activeTurnStartedAt:null}),t||queueMicrotask(()=>this.maybeFlushQueue())}setView(t){const n=t==="trace"||t==="raw"||t==="logs"||t==="evals"||t==="abs"?t:"chat";this.set({view:n,...n==="evals"?{evalNavReturn:!1}:{}});try{const r=new URL(window.location.href);n==="chat"?r.searchParams.delete("view"):r.searchParams.set("view",n),history.replaceState(null,"",r.toString())}catch{}n==="evals"&&this.restoreEvalRun()}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}async refreshSessions(){let t;try{t=await this.api.sessions()}catch{return}if(!t.ok||!t.body){this.noteAliasAuthLoss(t.status);return}const n=t.body.sessions||[],r={sessions:n};if(this.state.current){const s=n.find(a=>a.sessionId===this.state.current?.sessionId);s?.continuationToken&&(r.current={...this.state.current,continuationToken:s.continuationToken})}this.set(r)}isCurrent(t){return this.state.current!==null&&this.state.current.sessionId===t}stopStream(){this.streamAbort&&(this.streamAbort.abort(),this.streamAbort=null)}startStream(t,n){this.stopStream();const r=new AbortController;this.streamAbort=r,this.api.streamFetch(t,n,r.signal).then(async s=>{if(!s.ok||!s.body){this.toast(`Stream failed (${s.status})`);return}const a=s.body.getReader(),l=new TextDecoder;let c="";for(;;){const d=await a.read();if(d.done){this.scheduleReconnect(t,r);return}c+=l.decode(d.value,{stream:!0});const p=c.split(`
34
+ `);c=p.pop()||"";for(const h of p){if(r.signal.aborted)return;if(!h||!h.trim())continue;let m=null;try{m=JSON.parse(h)}catch{continue}m!==null&&(m.index!==void 0&&(this.lastIndex=m.index),this.handleEvent(m),qG.has(m.type)&&await new Promise(g=>requestAnimationFrame(()=>g(null))))}}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}scheduleReconnect(t,n){n.signal.aborted||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}selectSession(t){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[],sidebarOpen:!1}),this.syncSessionUrl(t.sessionId),this.refreshSessions(),t.running?this.startStream(t.sessionId,0):this.loadEventsSnapshot(t.sessionId).then(()=>{this.isCurrent(t.sessionId)&&this.startStream(t.sessionId,this.lastIndex+1)})}syncSessionUrl(t){try{const n=new URL(window.location.href);t?n.searchParams.set("sessionId",t):n.searchParams.delete("sessionId"),history.replaceState(null,"",n.toString())}catch{}}async loadEventsSnapshot(t){this.stopStream();try{const n=await this.api.eventsText(t);if(!n.ok){this.toast(`Could not load trace (${n.status}) — falling back to stream`),this.startStream(t,0);return}const r=await n.text();this.ingestEventsCompact(Qy(r))}catch(n){this.toast(`Trace load failed: ${ZG(n)}`),this.startStream(t,0)}}ingestEventsCompact(t){this.resetTranscript();for(const n of t)typeof n.index=="number"&&n.index>this.lastIndex&&(this.lastIndex=n.index),GG.has(n.type)&&this.applyChat(n);this.setRunning(this.hasOpenTools()),this.set({traceEvents:t.slice(),transcript:this.items.slice()})}deselectSession(){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.set({current:null,localTrace:!1,running:!1,turnStartedAt:null,queued:[],composerDraft:null,transcript:[],traceEvents:[],barTitle:"No session",barId:"",externalUrl:null,sidebarOpen:!1}),this.syncSessionUrl(null),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=Qy(t);if(r.length===0){this.toast("No session events found in that file."),this.deselectSession();return}const s=r[0].sessionId||"local-trace";this.set({current:null,localTrace:!0,running:!1,turnStartedAt:null,queued:[],composerDraft:null,barTitle:"Trace",barId:`${n||s} · ${r.length} events`,externalUrl:null}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return Ax(this.state.info?.channels)}hasReviewChannel(){return(this.state.info?.channels||[]).some(t=>t.id==="review")}shouldUseReview(t){return this.state.current===null&&this.hasReviewChannel()&&hG(t)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace)return!1;const s=this.state.current;if(NG(r))return this.invokeSlashCommand(r);if(this.shouldUseReview(r))return this.invokeSlashCommand(`/review ${r}`);if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null){this.setRunning(!0);const a=await this.api.createSession(r);return!a.ok||!a.body?(this.setRunning(!1),this.toast(`Create failed: ${fr(a.body,160)}`),!1):(this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:a.body.sessionId,channelId:"http",mode:"chat",continuationToken:a.body.continuationToken},barTitle:"Session",barId:a.body.sessionId,externalUrl:null,transcript:[],traceEvents:[]}),this.syncSessionUrl(a.body.sessionId),this.startStream(a.body.sessionId,0),this.refreshSessions(),!0)}return this.setRunning(!0),this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0)}async postFollowUp(t,n,r){const s=await this.api.followUp(t.sessionId,n,t.continuationToken);if(s.ok&&s.body)return this.set({current:{...t,continuationToken:s.body.continuationToken}}),!0;if(s.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const a=this.state.current??t;return this.postFollowUp(a,n,!1)}return this.setRunning(!1),this.toast(`Send failed: ${fr(s.body,160)}`),!1}queueMessage(t){this.set({queued:[...this.state.queued,{id:this.nextId("queued"),text:t}]})}removeQueued(t){this.set({queued:this.state.queued.filter(n=>n.id!==t)})}clearQueue(){this.set({queued:[]})}editQueued(t){const n=this.state.queued.find(r=>r.id===t);n!==void 0&&(this.removeQueued(t),this.set({composerDraft:n.text}))}consumeComposerDraft(){this.set({composerDraft:null})}async sendQueuedNow(t){const n=this.state.queued.find(s=>s.id===t);if(n===void 0)return;this.removeQueued(t),this.queueHeld=!1,await this.sendMessage(n.text,{force:!0})||this.requeueFront(n)}requeueFront(t){this.set({queued:[t,...this.state.queued]}),this.queueHeld=!0}maybeFlushQueue(){if(this.flushingQueue||this.queueHeld)return;const{running:t,queued:n,localTrace:r,current:s}=this.state;if(t||r||s===null||n.length===0)return;const[a,...l]=n;a!==void 0&&(this.flushingQueue=!0,this.set({queued:l}),this.setRunning(!0),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0).then(c=>{c||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1}))}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.setRunning(!1),this.assistantId&&(this.update(this.assistantId,{streaming:!1}),this.assistantId=null),this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null),this.finalizeOpenTools(Date.now(),"(no result — turn interrupted)"),this.pushDivider("turn interrupted"),this.commitTranscript();const n=await this.api.stopSession(t);if(!n.ok){this.toast(`Stop failed: ${fr(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r)return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${fr(s.body,160)}`)}async dispatchSchedule(t){const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${fr(n.body,120)}`);return}await this.refreshSessions();const r=n.body.sessionIds?.[0],s=this.state.sessions.find(a=>a.sessionId===r);s&&this.selectSession(s)}async refreshEvalCases(){const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${fr(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async restoreEvalRun(){return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=this.state.evalRun;if(n!==null){n.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(n.runId);return}const r=YG(this.state.meta.basePath);if(r!==null){const c=await this.api.evalsRunStatus(r);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(c.ok&&c.body){this.applyRestoredEvalRun(c.body);return}}const s=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration||this.state.evalRun!==null||!s.ok||!s.body)return;const a=s.body.activeRunId,l=(a!==void 0?s.body.runs.find(c=>c.runId===a):void 0)??s.body.runs[0];l!==void 0&&this.applyRestoredEvalRun(l)}applyRestoredEvalRun(t){this.set({evalRun:t}),qb(this.state.meta.basePath,t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}async startEvalRun(t){if(this.state.evalRun?.status==="running"){this.toast("An eval run is already in progress");return}this.evalRestoreGeneration+=1;const n=await this.api.evalsStartRun(t===void 0||t.length===0?{}:{filterIds:t});if(!n.ok||!n.body){this.toast(`Eval start failed: ${fr(n.body,160)}`);return}this.set({evalRun:n.body}),qb(this.state.meta.basePath,n.body.runId),this.setView("evals"),this.startEvalRunPoll(n.body.runId)}stopEvalRunPoll(){this.evalPollTimer!==null&&(clearInterval(this.evalPollTimer),this.evalPollTimer=null)}startEvalRunPoll(t){this.stopEvalRunPoll();const n=++this.evalPollGeneration;let r=!1,s=!1;const a=async()=>{if(!(n!==this.evalPollGeneration||r)){r=!0;try{const l=await this.api.evalsRunStatus(t);if(n!==this.evalPollGeneration||!l.ok||!l.body)return;if(this.set({evalRun:l.body}),qb(this.state.meta.basePath,l.body.runId),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:d,total:p}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${d} failed, ${p} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async openEvalCaseSession(t){this.set({evalNavReturn:!0}),await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!0}),this.setView("chat")}async openEvalCaseTrace(t){this.set({evalNavReturn:!0}),await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!0}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,d=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:d,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){const n=t.trim(),r=this.slashCommands();if(/^\/help(?:\s|$)/i.test(n)){this.resetTranscript(),this.pushUser(n);const l=this.ensureAssistant();return this.update(l,{text:MG(r),streaming:!1}),this.assistantId=null,this.set({localTrace:!1,current:null,barTitle:"Help",barId:"",externalUrl:null,running:!1,turnStartedAt:null}),this.syncSessionUrl(null),this.commitTranscript(),!0}const s=IG(n,r);if(!s.ok)return this.toast(s.error),!1;this.setRunning(!0),this.resetTranscript(),this.pushUser(n);const a=this.ensureAssistant();this.update(a,{text:`Running \`${s.command.name}\` (${s.command.method} ${s.command.url})…`}),this.set({localTrace:!1,current:null,barTitle:s.command.name,barId:s.command.method,externalUrl:null,transcript:this.items.slice()}),this.syncSessionUrl(null);try{const l=await this.api.channelRequest(s.command.method,s.command.url,{body:s.body,query:s.query});return l.ok?await this.openSessionFromChannelResponse(s.command.channelId,l.body)?(this.assistantId=null,!0):(this.setRunning(!1),this.update(a,{text:"```json\n"+WG(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${fr(l.body,400)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0)}catch(l){return this.setRunning(!1),this.update(a,{text:`Command failed: ${l instanceof Error?l.message:String(l)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0}}async boot(){if(this.booted||this.state.aliasHosted&&this.state.aliasToken.trim()==="")return;this.booted=!0;const t=await this.api.meta();t.ok&&t.body&&this.set({meta:{name:t.body.name??"agent",dev:!!t.body.dev,basePath:this.api.basePath,indexPath:t.body.indexPath}}),this.api.health().then(s=>{this.set({health:s.ok?"ok":"bad"})}),this.api.info().then(s=>{s.ok&&s.body?this.set({info:s.body}):s.status===401&&(this.noteAliasAuthLoss(s.status)||this.toast("Unauthorized: set a bearer token (top right) that matches the channel auth."))});let n=null,r=null;try{const s=new URL(window.location.href);n=s.searchParams.get("sessionId"),r=s.searchParams.get("view")}catch{}if(r?this.setView(r):this.state.bridged||this.setView("chat"),await this.refreshSessions(),this.refreshEvalCases(),this.restoreEvalRun(),n){const s=this.state.sessions.find(a=>a.sessionId===n);s?this.selectSession(s):this.toast(`Session not found: ${n}`)}setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return sO(this.state.info?.model)}}function ZG(e){return e instanceof Error?e.message:String(e)}function WG(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function dO(e){return`agent-serve:evalRunId:${e||"/"}`}function YG(e){try{const t=sessionStorage.getItem(dO(e));return t!==null&&t!==""?t:null}catch{return null}}function qb(e,t){try{sessionStorage.setItem(dO(e),t)}catch{}}const ft=new KG;ft.getState().aliasHosted&&SG(e=>ft.acceptAliasTokenHandoff(e));if(ft.getState().embedded){RG(t=>{t.type==="hello"?(Vo.setState({bridged:!0}),wT(ft.getState().view)):ft.setView(t.view)});let e=null;Vo.subscribe(t=>{!t.bridged||t.view===e||(e=t.view,wT(t.view))})}function pt(e){return bG(Vo,e)}function XG(e){const t=[{key:"turns",value:String(e.turns)},{key:"fail",value:String(e.turnFailures)},{key:"tools",value:String(e.toolCalls)},{key:"tool err",value:String(e.toolErrors)},{key:"tokens",value:String(e.inputTokens+e.outputTokens)},{key:"wall",value:Qr(e.wallTimeMs)}];for(const[n,r]of Object.entries(e.custom).sort(([s],[a])=>s.localeCompare(a)))t.push({key:n,value:String(r)});return t}function pO(e){return e.turns>0||e.turnFailures>0||e.toolCalls>0||e.toolErrors>0||e.inputTokens>0||e.outputTokens>0||e.wallTimeMs>0||Object.keys(e.custom).length>0}function hO({metrics:e}){return v.jsx("div",{className:"ab-metrics",children:XG(e).map(t=>v.jsxs("span",{className:"ab-metric",children:[v.jsx("span",{className:"ab-metric-k",children:t.key}),v.jsx("span",{className:"ab-metric-v",children:t.value})]},t.key))})}function QG({arm:e}){const t=e.variantLabel??e.variant,n=e.sessions>0||pO(e.metrics);return v.jsxs("div",{className:"ab-arm",children:[v.jsxs("div",{className:"ab-arm-head",children:[v.jsx("span",{className:"ab-kind",children:"Arm"}),v.jsx("span",{className:"ab-arm-name",children:t}),v.jsxs("span",{className:"ab-arm-n",children:[e.sessions," session",e.sessions===1?"":"s"]})]}),e.description!==void 0?v.jsx("div",{className:"ab-arm-desc",children:e.description}):null,n?v.jsx(hO,{metrics:e.metrics}):null]})}function JG({row:e,active:t}){return v.jsxs("button",{type:"button",className:`ab-session${t?" active":""}`,onClick:()=>{ft.selectSession({sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,turnCount:e.turnCount,...e.title===void 0?{}:{title:e.title},...e.updatedAt===void 0?{}:{updatedAt:e.updatedAt}}),ft.setView("chat")},children:[v.jsxs("div",{className:"ab-session-head",children:[v.jsx("span",{className:"ab-session-id",children:e.title||e.sessionId}),v.jsxs("span",{className:"ab-session-meta",children:[e.channelId,e.updatedAt!==void 0?` · ${iO(e.updatedAt)??e.updatedAt}`:""]})]}),v.jsx("div",{className:"ab-session-arms",children:e.assignments.map(n=>{const r=n.variant===null,s=r?"Skipped":n.variantLabel??n.variant;return v.jsxs("div",{className:"ab-assignment",children:[v.jsxs("div",{className:"ab-assignment-row",children:[v.jsx("span",{className:"ab-assignment-exp",children:n.experiment}),v.jsx("span",{className:"ab-assignment-arrow","aria-hidden":!0,children:"→"}),v.jsx(sa,{variant:r?"neutral":"accent",size:"sm",pill:!0,children:s})]}),n.metrics!==void 0&&pO(n.metrics)?v.jsx(hO,{metrics:n.metrics}):null]},`${e.sessionId}:${n.experiment}`)})})]})}function eV(){const e=pt(y=>y.current),[t,n]=x.useState(null),[r,s]=x.useState(null),[a,l]=x.useState(!0),c=x.useRef(!1),d=x.useCallback(async()=>{if(!c.current){c.current=!0,l(!0),s(null);try{const y=await ft.api.abs();if(!y.ok||y.body===null){s(`Failed to load A/Bs (${y.status})`),n(null);return}n(y.body)}catch(y){s(y instanceof Error?y.message:String(y)),n(null)}finally{l(!1),c.current=!1}}},[]);if(x.useEffect(()=>{d();const y=setInterval(()=>{d()},4e3);return()=>clearInterval(y)},[d]),a&&t===null)return v.jsx("div",{className:"pg-abs",children:v.jsxs("div",{className:"ab-empty",children:[v.jsx("span",{className:"spin"})," Loading A/B metrics…"]})});if(r!==null&&t===null)return v.jsxs("div",{className:"pg-abs",children:[v.jsx("div",{className:"ab-empty ab-error",children:r}),v.jsx(Gn,{variant:"secondary",size:"sm",onClick:()=>{d()},children:"Retry"})]});const p=t?.experiments??[],h=t?.sessions??[];if(p.length===0&&h.length===0)return v.jsx("div",{className:"pg-abs",children:v.jsxs("div",{className:"ab-empty",children:["No A/B experiments loaded.",v.jsxs("div",{className:"ab-hint",children:["Author ",v.jsx("code",{children:"agent/ab.ts"})," with ",v.jsx("code",{children:"defineAB"}),", then run sessions — enrollment lands as durable ",v.jsx("code",{children:"ab.assigned"})," ","events at session create. Optional"," ",v.jsx("code",{children:"agent/ab.config.ts"})," controls fold retention and sample / snapshot persistence."]})]})});const g=t?.config?.maxPlaygroundSessions??200;return v.jsxs("div",{className:"pg-abs",children:[v.jsxs("div",{className:"ab-toolbar",children:[v.jsx("span",{className:"ab-toolbar-title",children:"A/B metrics"}),v.jsxs("span",{className:"ab-toolbar-meta",children:["last ",g," sessions"]}),r!==null?v.jsx("span",{className:"ab-error",children:r}):null,v.jsx("span",{className:"grow"}),v.jsx(Gn,{variant:"secondary",size:"sm",onClick:()=>{d()},children:"Refresh"})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Experiments"}),p.length===0?v.jsx("div",{className:"ab-empty",children:"No declared experiments."}):v.jsx("div",{className:"ab-exp-list",children:p.map(y=>v.jsxs("div",{className:"ab-exp-card",children:[v.jsxs("div",{className:"ab-exp-card-head",children:[v.jsx("span",{className:"ab-kind",children:"Experiment"}),v.jsx("span",{className:"ab-exp-name",children:y.name}),y.skipped>0?v.jsxs(sa,{variant:"neutral",size:"sm",pill:!0,children:[y.skipped," skipped"]}):null]}),v.jsx("div",{className:"ab-arm-list",children:y.arms.map(k=>v.jsx(QG,{arm:k},k.variant))})]},y.name))})]}),v.jsxs("section",{className:"ab-section",children:[v.jsx("h3",{children:"Sessions"}),h.length===0?v.jsx("div",{className:"ab-empty",children:"No enrolled sessions yet. Start a chat to assign arms."}):v.jsx("div",{className:"ab-session-list",children:h.map(y=>v.jsx(JG,{row:y,active:e?.sessionId===y.sessionId},y.sessionId))})]})]})}function tV(){const[e,t]=x.useState(""),[n,r]=x.useState(null),[s,a]=x.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const d=await ft.signInWithAliasToken(e);a(!1),d.ok||r(d.error)}return v.jsx("div",{className:"pg-alias-signin",children:v.jsxs("div",{className:"pg-alias-signin-box",children:[v.jsx("h1",{children:"agent-serve playground"}),v.jsx("p",{children:"This deployment requires its alias token."}),n!==null?v.jsx("div",{className:"pg-alias-signin-error",children:n}):null,v.jsxs("form",{onSubmit:c=>{l(c)},children:[v.jsx(Bh,{type:"password",size:"base","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),v.jsx(Gn,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),v.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",v.jsx("code",{children:"agentkit rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function nV(){return v.jsx("div",{className:"pg-alias-signin",children:v.jsxs("div",{className:"pg-alias-signin-box",children:[v.jsx("h1",{children:"Playground disconnected"}),v.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}function rV(e){const{localTrace:t,current:n,running:r,slashNames:s,hasReview:a}=e;if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(n===null){const d=s.length>0?` Slash commands: ${s.slice(0,4).join(", ")}${s.length>4?", …":""}, /help.`:"";return a?{disabled:!1,hint:`Paste a PR URL for /review, type a channel command, or send a message for a new http session.${d}`}:{disabled:!1,hint:`Sending creates a new http session.${d}`}}if(n.mode==="task"||n.channelId!=="http")return n.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:n.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${n.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${n.channelId}” channel take follow-ups through that channel; watch only here.`};if(!n.continuationToken)return{disabled:!0,hint:"This session has no continuation token; watch only."};const c=s.length>0?` Channel commands (${s.slice(0,3).join(", ")}${s.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:r?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${c}`}}function iV(){const e=pt(t=>t.queued);return e.length===0?null:v.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>v.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[v.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>ft.editQueued(t.id),children:t.text}),v.jsxs("span",{className:"pg-queue-actions",children:[v.jsx(po,{icon:"arrow-up",size:"sm",variant:"default","aria-label":"Send now (interrupts the running turn)",onClick:()=>{ft.sendQueuedNow(t.id)}}),v.jsx(po,{icon:"x",size:"sm",variant:"default","aria-label":"Remove queued message",onClick:()=>ft.removeQueued(t.id)})]})]},t.id))})}function sV(){const[e,t]=x.useState(""),[n,r]=x.useState(0),s=pt(A=>A.localTrace),a=pt(A=>A.current),l=pt(A=>A.running),c=pt(A=>A.composerDraft),d=pt(A=>A.info),p=(d?.channels||[]).some(A=>A.id==="review");x.useEffect(()=>{c!==null&&(t(A=>A.trim()?`${A} ${c}`:c),ft.consumeComposerDraft())},[c]);const h=x.useMemo(()=>Ax(d?.channels),[d]),m=x.useMemo(()=>lO(h),[h]),g=x.useMemo(()=>{if(s)return null;const A=e.replace(/^\s+/,"");return!A.startsWith("/")||/\s/.test(A)?null:A},[e,s]),y=x.useMemo(()=>g===null?[]:OG(g,h),[g,h]),k=g!==null&&y.length>0,{disabled:S,hint:T}=rV({localTrace:s,current:a,running:l,slashNames:m,hasReview:p}),E=l&&a!==null&&!s,R=async(A=e,N=!1)=>{if(!A.trim())return;await ft.sendMessage(A,{force:N})&&(t(""),r(0))},_=A=>{t(`${A} `),r(0)},C=A=>{if(k){if(A.key==="ArrowDown"){A.preventDefault(),r(N=>(N+1)%y.length);return}if(A.key==="ArrowUp"){A.preventDefault(),r(N=>(N-1+y.length)%y.length);return}if(A.key==="Tab"||A.key==="Enter"&&!A.shiftKey){const N=y[n]??y[0];if(N!==void 0&&g!==N.name){A.preventDefault(),_(N.name);return}}if(A.key==="Escape"){A.preventDefault(),t(""),r(0);return}}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),R(e,A.metaKey||A.ctrlKey))};return v.jsxs("div",{className:"pg-composer",children:[k?v.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[y.map((A,N)=>v.jsx("li",{children:v.jsxs("button",{type:"button",role:"option","aria-selected":N===n,className:N===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:I=>{I.preventDefault(),_(A.name)},onMouseEnter:()=>r(N),children:[v.jsx("code",{className:"pg-slash-name",children:A.name}),v.jsx("span",{className:"pg-slash-method",children:A.method}),A.description?v.jsx("span",{className:"pg-slash-desc",children:A.description}):null]})},`${A.name}:${A.method}`)),v.jsxs("li",{className:"pg-slash-footer",children:[v.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,v.jsxs("div",{className:"inner",children:[v.jsx(iV,{}),v.jsxs("div",{className:S&&!E?"pg-prompt disabled":"pg-prompt",children:[v.jsx("textarea",{className:"pg-prompt-input",rows:1,placeholder:m.length>0?`Message the agent, or ${m[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":k?"list":void 0,"aria-expanded":k,value:e,onChange:A=>{t(A.target.value),r(0)},onKeyDown:C,disabled:S}),v.jsxs("div",{className:"pg-prompt-toolbar",children:[v.jsx("span",{className:"pg-prompt-hint",title:T,children:T}),E&&!e.trim()?v.jsx(po,{icon:"square",iconVariant:"filled",variant:"secondary",shape:"circle",size:"lg","aria-label":"Stop the running turn",onClick:()=>{ft.stopTurn()}}):v.jsx(po,{icon:"arrow-up",variant:"primary",color:"monochrome",shape:"circle",size:"lg","aria-label":l?"Queue message (⌘Enter sends now)":"Send message",disabled:S||!e.trim(),onClick:()=>{R()}})]})]})]})]})}const oV="agent-serve.playground.try.";function mO(e,t){return`${oV}${e}:${t}`}function ET(e,t){try{const n=localStorage.getItem(mO(e,t));if(n===null)return null;const r=JSON.parse(n);if(typeof r!="object"||r===null||Array.isArray(r))return null;const s=r,a={};return typeof s.body=="string"&&(a.body=s.body),typeof s.query=="string"&&(a.query=s.query),a}catch{return null}}function aV(e,t,n){try{localStorage.setItem(mO(e,t),JSON.stringify(n))}catch{}}function TT(e){if(e===void 0)return"{}";const t=e.properties;if(e.type!=="object"||t===void 0)return"{}";const n={};for(const[r,s]of Object.entries(t)){const a=s.type;a==="string"?n[r]="":a==="number"||a==="integer"?n[r]=0:a==="boolean"?n[r]=!1:a==="array"?n[r]=[]:a==="object"?n[r]={}:n[r]=null}return JSON.stringify(n,null,2)}function _T({label:e,schema:t}){if(t===void 0)return v.jsxs("div",{className:"pg-try-schema-missing",children:["No ",e," schema on this route — body is free-form JSON."]});const n=t.properties,r=new Set(Array.isArray(t.required)?t.required.filter(s=>typeof s=="string"):[]);return n===void 0||Object.keys(n).length===0?v.jsxs("details",{className:"pg-try-schema",children:[v.jsxs("summary",{children:[e," schema"]}),v.jsx("pre",{children:JSON.stringify(t,null,2)})]}):v.jsxs("details",{className:"pg-try-schema",open:!0,children:[v.jsxs("summary",{children:[e," schema"]}),v.jsx("ul",{children:Object.entries(n).map(([s,a])=>{const l=typeof a.type=="string"?a.type:"any",c=typeof a.description=="string"?a.description:null;return v.jsxs("li",{children:[v.jsx("code",{children:s}),r.has(s)?v.jsx("span",{className:"req",children:" required"}):v.jsx("span",{className:"opt",children:" optional"}),v.jsxs("span",{className:"type",children:[" · ",l]}),c?v.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function gO(e,t){const n=e.trim();if(n==="")return{ok:!0,value:{}};try{const r=JSON.parse(n);return typeof r!="object"||r===null||Array.isArray(r)?{ok:!1,error:`${t} must be a JSON object`}:{ok:!0,value:r}}catch(r){return{ok:!1,error:`${t}: ${r instanceof Error?r.message:String(r)}`}}}function Qd(e){return`'${e.replace(/'/g,"'\\''")}'`}function lV(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",Qd(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",Qd("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",Qd(r))}return t.push(Qd(e.absoluteUrl)),t.join(" ")}function uV(e,t,n){let r=ft.api.url(e);if(n){const s=gO(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,d]of Object.entries(s.value)){if(d==null)continue;const p=typeof d=="string"?d:String(d);p!==""&&a.set(c,p)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function cV({channelId:e,route:t,onClose:n}){const r=t.method.toUpperCase(),s=r!=="GET"&&r!=="HEAD",a=t.querySchema!==void 0||r==="GET"||r==="HEAD",l=pt(I=>I.authToken),[c,d]=x.useState(()=>{const I=ET(r,t.url);return I?.query!==void 0&&I.query.trim()!==""?I.query:TT(t.querySchema)}),[p,h]=x.useState(()=>{const I=ET(r,t.url);return I?.body!==void 0&&I.body.trim()!==""?I.body:TT(t.bodySchema)}),[m,g]=x.useState(!1),[y,k]=x.useState(!1),[S,T]=x.useState(null),[E,R]=x.useState(null);x.useEffect(()=>{const I=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n]);const _=I=>{const $={};s&&($.body=I.body??p),a&&($.query=I.query??c),aV(r,t.url,$)},C=()=>{_({body:p,query:c}),n()},A=async()=>{if(T(null),k(!1),s&&p.trim()!=="")try{JSON.parse(p)}catch(H){T(`Body: ${H instanceof Error?H.message:String(H)}`);return}const I=uV(t.url,c,a);if(!I.ok){T(I.error);return}const $=lV({method:r,absoluteUrl:I.url,token:l,hasBody:s,bodyText:p});try{await navigator.clipboard.writeText($),k(!0),ft.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch(H){T(`Copy failed: ${H instanceof Error?H.message:String(H)}`)}},N=async()=>{T(null),R(null);let I;if(a){const H=gO(c,"Query");if(!H.ok){T(H.error);return}I={};for(const[L,Z]of Object.entries(H.value))Z!=null&&(I[L]=typeof Z=="string"?Z:String(Z))}let $;if(s){const H=p.trim();if(H==="")$={};else try{$=JSON.parse(H)}catch(L){T(`Body: ${L instanceof Error?L.message:String(L)}`);return}}_({body:p,query:c}),g(!0);try{const H=await ft.api.channelRequest(r,t.url,{body:s?$:void 0,query:I});if(H.ok&&H.body&&await ft.openSessionFromChannelResponse(e,H.body)){n();return}R({status:H.status,body:H.body})}catch(H){T(H instanceof Error?H.message:String(H))}finally{g(!1)}};return v.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:C,children:v.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:I=>I.stopPropagation(),children:[v.jsxs("div",{className:"pg-try-head",children:[v.jsxs("div",{children:[v.jsxs("div",{className:"pg-try-title",children:[v.jsx("span",{className:"pg-try-method",children:r})," ",v.jsx("code",{children:t.url})]}),v.jsxs("div",{className:"pg-try-sub",children:["channel ",v.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),v.jsx("button",{type:"button",className:"link-btn",onClick:C,children:"Close"})]}),v.jsxs("div",{className:"pg-try-body",children:[a?v.jsxs(v.Fragment,{children:[v.jsx(_T,{label:"Query",schema:t.querySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Query (JSON object → search params)"}),v.jsx("textarea",{value:c,onChange:I=>d(I.target.value),spellCheck:!1,rows:6})]})]}):null,s?v.jsxs(v.Fragment,{children:[v.jsx(_T,{label:"Body",schema:t.bodySchema}),v.jsxs("label",{className:"pg-try-field",children:[v.jsx("span",{children:"Body (JSON)"}),v.jsx("textarea",{value:p,onChange:I=>h(I.target.value),spellCheck:!1,rows:10})]})]}):null,S?v.jsx("div",{className:"pg-try-error",children:S}):null,E?v.jsxs("div",{className:"pg-try-result",children:[v.jsxs("div",{className:"pg-try-status",children:["Status ",v.jsx("code",{children:E.status})]}),v.jsx("pre",{children:JSON.stringify(E.body,null,2)})]}):null]}),v.jsxs("div",{className:"pg-try-foot",children:[v.jsx(Gn,{variant:"secondary",size:"sm",onClick:()=>{A()},children:y?"Copied":"Copy curl"}),v.jsx("div",{className:"pg-try-foot-spacer"}),v.jsx(Gn,{variant:"secondary",size:"sm",onClick:C,children:"Cancel"}),v.jsx(Gn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{N()},children:m?"Sending…":"Send"})]})]})})}const bO="agent-serve.playground.drawerWidth",Hb=340,Jy=280,ev=720;function gp(e){return Math.min(ev,Math.max(Jy,e))}function fV(){try{const e=localStorage.getItem(bO);if(e===null)return Hb;const t=Number.parseInt(e,10);return Number.isFinite(t)?gp(t):Hb}catch{return Hb}}function Fo({title:e,children:t}){return v.jsxs(v.Fragment,{children:[v.jsx("h4",{children:e}),t]})}function Wa({name:e,detail:t}){return v.jsxs("div",{className:"item",children:[v.jsx("div",{className:"n",children:e}),t?v.jsx("div",{className:"d",children:t}):null]})}function dV(){const e=pt(_=>_.drawerOpen),t=pt(_=>_.info),[n,r]=x.useState(null),[s,a]=x.useState(fV),[l,c]=x.useState(!1),d=x.useRef(s);d.current=s,x.useEffect(()=>{try{localStorage.setItem(bO,String(s))}catch{}},[s]);const p=x.useCallback(_=>{_.preventDefault();const C=_.currentTarget,A=_.clientX,N=d.current;C.setPointerCapture(_.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const I=H=>{a(gp(N+(H.clientX-A)))},$=H=>{C.releasePointerCapture(H.pointerId),C.removeEventListener("pointermove",I),C.removeEventListener("pointerup",$),C.removeEventListener("pointercancel",$),c(!1),document.body.classList.remove("pg-resizing-drawer")};C.addEventListener("pointermove",I),C.addEventListener("pointerup",$),C.addEventListener("pointercancel",$)},[]),h=t?.tools??[],m=t?.skills??[],g=t?.subagents??[],y=t?.connections??[],k=t?.channels??[],S=t?.hooks??[],T=t?.abs??[],E=x.useMemo(()=>{const _=new Map;for(const C of Ax(k))_.set(`${C.method}:${C.url}`,C.name);return _},[k]),R=t!==null&&h.length===0&&m.length===0&&g.length===0&&y.length===0&&k.length===0&&S.length===0&&T.length===0;return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[v.jsx("div",{className:l?"pg-drawer-resizer dragging":"pg-drawer-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize agent surface","aria-valuenow":s,"aria-valuemin":Jy,"aria-valuemax":ev,tabIndex:0,onPointerDown:p,onKeyDown:_=>{_.key==="ArrowLeft"?(_.preventDefault(),a(C=>gp(C-16))):_.key==="ArrowRight"?(_.preventDefault(),a(C=>gp(C+16))):_.key==="Home"?(_.preventDefault(),a(Jy)):_.key==="End"&&(_.preventDefault(),a(ev))}}),v.jsxs("div",{className:"head",children:[v.jsx("span",{children:"Agent surface"}),v.jsx("button",{type:"button",className:"link-btn",onClick:()=>ft.setDrawerOpen(!1),children:"Close"})]}),v.jsxs("div",{className:"body",children:[t===null?v.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,R?v.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?v.jsx(Fo,{title:"Tools",children:h.map(_=>v.jsx(Wa,{name:_.name,detail:_.description},_.name))}):null,m.length?v.jsx(Fo,{title:"Skills",children:m.map(_=>v.jsx(Wa,{name:_.name,detail:_.description},_.name))}):null,g.length?v.jsx(Fo,{title:"Subagents",children:g.map(_=>v.jsx(Wa,{name:_.name,detail:_.description},_.name))}):null,y.length?v.jsx(Fo,{title:"MCP Connections",children:y.map(_=>v.jsx(Wa,{name:_.name,detail:_.transport},_.name))}):null,k.length?v.jsx(Fo,{title:"Channels",children:k.map(_=>v.jsxs("div",{className:"item",children:[v.jsx("div",{className:"n",children:_.id}),(_.routes??[]).length===0?v.jsx("div",{className:"d",children:"(events only)"}):v.jsx("div",{className:"channel-routes",children:(_.routes??[]).map(C=>{const A=_.id!=="http",N=`${C.method} ${C.url}`,I=E.get(`${C.method.toUpperCase()}:${C.url}`);return A?v.jsxs("div",{className:"channel-route",children:[v.jsx("code",{children:N}),I?v.jsx("code",{className:"channel-slash",title:"Composer slash command",children:I}):null,v.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:_.id,route:C}),children:"Try"})]},N):v.jsx("div",{className:"channel-route",children:v.jsx("code",{children:N})},N)})})]},_.id))}):null,S.length?v.jsx(Fo,{title:"Hooks",children:S.map(_=>v.jsx(Wa,{name:_},_))}):null,T.length?v.jsx(Fo,{title:"A/Bs",children:T.map(_=>v.jsx(Wa,{name:_},_))}):null]})]}),n?v.jsx(cV,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}function Ii(e){const t=e.at??null,n=e.ms??null;let r=e.startAt??null;return r===null&&t!==null&&n!==null&&n>0&&(r=t-n),r===null&&(r=t),{...e,startAt:r,at:t,ms:n}}function yO(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="",c=null,d=1,p=0,h=0;function m(k){return n&&n.endedAt===null||(n={turnId:k?.turnId||`turn_${t.length+1}`,startedAt:k?.at?dl(k.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function g(k){m({turnId:k.turnId,at:null}).rows.push(k),k.ms&&k.ms>d&&(d=k.ms)}function y(k){if(a===null)return;const S=m(),T=k!==null&&a!==null?Math.max(0,k-a):null,E=l.trim()||void 0;S.rows.push(Ii({kind:"think",label:E?ji(E,80):"thinking",body:E,ms:T,at:k,startAt:a})),T&&T>d&&(d=T),a=null,l=""}for(const k of e){const S=k.data||{},T=dl(k.at);switch(k.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=k.turnId||n.turnId,n.startedAt=T,n.provisional=!1):(n={turnId:k.turnId||`turn_${t.length+1}`,startedAt:T,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",c=null;break;case"message.received":g(Ii({kind:"user",label:ji(S.text,140),body:typeof S.text=="string"?S.text:void 0,at:T,startAt:T,ms:0,turnId:k.turnId}));break;case"reasoning.appended":if(typeof S.parentCallId=="string"&&S.parentCallId!=="")break;a===null&&(a=T),typeof S.text=="string"&&(l=S.text);break;case"reasoning.completed":if(typeof S.parentCallId=="string"&&S.parentCallId!=="")break;y(T);break;case"message.appended":if(typeof S.parentCallId=="string"&&S.parentCallId!=="")break;c===null&&(c=T);break;case"message.completed":{if(typeof S.parentCallId=="string"&&S.parentCallId!==""){const _=S.parentCallId;g(Ii({kind:"agent",label:ji(S.text,160)||"(empty reply)",body:typeof S.text=="string"?S.text:void 0,at:T,startAt:T,ms:0,turnId:k.turnId,depth:1,parentCallId:_}));break}const E=c??T,R=E!==null&&T!==null?Math.max(0,T-E):null;g(Ii({kind:"agent",label:ji(S.text,160)||"(empty reply)",body:typeof S.text=="string"?S.text:void 0,at:T,startAt:E,ms:R,turnId:k.turnId})),R&&R>d&&(d=R),c=null;break}case"actions.requested":for(const E of S.calls||[]){const R=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:typeof S.parentCallId=="string"&&S.parentCallId!==""?S.parentCallId:void 0;if(R===void 0&&E.toolName==="task")continue;const _=R===void 0?E.callId:`${R}:${E.callId}`;r[_]={name:E.toolName,args:E.args,start:T,turnId:k.turnId,parentCallId:R}}break;case"action.result":{const E=S.callId;if(E==null)break;const R=typeof S.parentCallId=="string"&&S.parentCallId!==""?S.parentCallId:void 0;if(R===void 0&&S.toolName==="task"){delete r[E];break}const _=R===void 0?E:`${R}:${E}`,C=r[_];delete r[_];const A=C&&C.start!==null&&T!==null?T-C.start:null;p+=1,S.isError&&(h+=1);{const N=S.toolName||C?.name||"tool",I=C?.args;g(Ii({kind:"tool",label:N+(I?` ${ji(fr(I,60),60)}`:""),toolName:N,callId:typeof E=="string"?E:String(E),toolArgs:I,toolOutput:S.output,body:typeof S.output=="string"?S.output:S.output!=null?fr(S.output,4e3):void 0,ms:A,error:!!S.isError,at:T,startAt:C?.start??null,turnId:k.turnId,depth:R===void 0?0:1,parentCallId:R}))}A&&A>d&&(d=A);break}case"subagent.called":{const E=`task:${S.name||"subagent"}`,R=typeof S.callId=="string"?S.callId:String(S.callId);r[`sub:${R}`]={name:E,args:S.description,start:T,turnId:k.turnId};const _=m(k);_.rows.push(Ii({kind:"tool",label:E,toolName:E,callId:R,toolArgs:S.description,ms:null,at:T,startAt:T,turnId:k.turnId,depth:0})),s.set(R,{turn:_,index:_.rows.length-1});break}case"subagent.completed":{const E=typeof S.callId=="string"?S.callId:String(S.callId),R=`sub:${E}`,_=r[R];delete r[R];const C=_&&_.start!==null&&T!==null?T-_.start:null;p+=1;const A=s.get(E);s.delete(E);const N=A!==void 0?A.turn.rows[A.index]:void 0;N!==void 0&&N.kind==="tool"?(N.ms=C,N.at=T,C&&C>d&&(d=C)):g(Ii({kind:"tool",label:_?.name||"subagent",toolName:_?.name||"subagent",callId:E,toolArgs:_?.args,ms:C,at:T,startAt:_?.start??null,turnId:k.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(k.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const E=m(k);if((k.type==="turn.completed"||k.type==="turn.failed")&&(E.endedAt=T,E.usage=S.usage||null,E.failed=k.type==="turn.failed",E.error=S.message,E.startedAt!==null&&E.endedAt!==null)){const R=E.endedAt-E.startedAt;R>d&&(d=R),E.wallMs=R}if(y(T),c!==null&&T!==null){const R=Math.max(0,T-c);E.rows.push(Ii({kind:"agent",label:"(streaming…)",ms:R,at:T,startAt:c})),c=null}for(const R of Object.keys(r)){const _=r[R],C=_.start!==null&&T!==null?T-_.start:null;E.rows.push(Ii({kind:"tool",label:`${_.name||"tool"} (no result)`,ms:C,error:!0,at:T,startAt:_.start,turnId:_.turnId})),C&&C>d&&(d=C)}r={},(k.type==="turn.completed"||k.type==="turn.failed")&&(n=null);break}}}for(const k of Object.keys(r)){const S=r[k];g(Ii({kind:"tool",label:`${S.name||"tool"} (running…)`,ms:null,at:S.start,startAt:S.start,turnId:S.turnId}))}return{turns:t,maxWallMs:d,totalTools:p,failedTools:h,eventCount:e.length}}function pV(e,t=6){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(2,t-1),r=10**Math.floor(Math.log10(Math.max(n,1))),s=[1,2,2.5,5,10].map(c=>c*r),a=s.find(c=>n/c<=1.5)??s[s.length-1],l=[0];for(let c=a;c<e-a*.25&&(l.push(c),!(l.length>=t-1));c+=a);return l[l.length-1]!==e&&l.push(e),l}function vO(e,t=200){const[n,r]=x.useState(e);return x.useEffect(()=>{if(e){r(!0);return}if(!n)return;const s=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(s)},[e,n,t]),e||n}const hV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},mV={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function gV({row:e}){const[t,n]=x.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=vO(s);return v.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[v.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(l=>!l),"aria-expanded":t,children:[v.jsx("span",{className:"eval-step-kind",title:mV[e.kind],children:v.jsx(vn,{name:hV[e.kind],size:"sm",color:e.error?"red":"secondary"})}),v.jsx("span",{className:"eval-step-label",title:e.label,children:e.kind==="tool"&&e.toolName!==void 0?e.toolName:e.label}),e.ms!=null&&e.ms>0?v.jsx("span",{className:"eval-step-ms",children:Qr(e.ms)}):null,r?v.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:v.jsx(vn,{name:"chevron-right",size:10})}):null]}),a?v.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:v.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"args"}),v.jsx("pre",{children:El(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),v.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:El(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?v.jsx("div",{className:"eval-step-block",children:v.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?v.jsx("div",{className:"eval-step-block",children:v.jsx("pre",{children:e.body})}):null]})}):null]})}function bV({sessionId:e,live:t}){const[n,r]=x.useState([]),[s,a]=x.useState(null),[l,c]=x.useState(!0),[d,p]=x.useState(!1),h=x.useRef(null);x.useEffect(()=>{let g=!1;const y=new AbortController;return c(!0),a(null),r([]),p(!1),(async()=>{let k=-1;try{const S=await ft.api.eventsText(e);if(g)return;if(S.ok){const T=await S.text();if(g)return;const E=Qy(T);for(const R of E)typeof R.index=="number"&&R.index>k&&(k=R.index);r(E)}}catch(S){g||a(S instanceof Error?S.message:String(S))}finally{g||c(!1)}if(!(!t||g)){p(!0);try{const S=await ft.api.streamFetch(e,k+1,y.signal);if(!S.ok||!S.body){g||(a(`Stream failed (${S.status})`),p(!1));return}const T=S.body.getReader(),E=new TextDecoder;let R="";for(;;){const{done:_,value:C}=await T.read();if(_||g)break;R+=E.decode(C,{stream:!0});const A=R.split(`
35
+ `);R=A.pop()??"";const N=[];for(const I of A){const $=I.trim();if($)try{const H=JSON.parse($);N.push(H),typeof H.index=="number"&&H.index>k&&(k=H.index)}catch{}}N.length>0&&!g&&r(I=>[...I,...N])}}catch(S){!g&&!(S instanceof DOMException&&S.name==="AbortError")&&a(S instanceof Error?S.message:String(S))}finally{g||p(!1)}}})(),()=>{g=!0,y.abort()}},[e,t]),x.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=x.useMemo(()=>yO(n),[n]);return l&&n.length===0?v.jsxs("div",{className:"eval-trace",children:[v.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?v.jsx("div",{className:"eval-error",children:s}):m.turns.length===0?v.jsx("div",{className:"eval-trace",children:v.jsx("div",{className:"eval-trace-empty",children:t?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):v.jsxs("div",{className:"eval-trace",children:[v.jsxs("div",{className:"eval-trace-meta",children:[m.eventCount," events · ",m.totalTools," tool",m.totalTools===1?"":"s",m.failedTools>0?` · ${m.failedTools} failed`:"",t||d?v.jsxs(v.Fragment,{children:[" · ",v.jsxs("span",{className:"eval-live",children:[v.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?v.jsx("div",{className:"eval-error",children:s}):null,m.turns.map((g,y)=>v.jsxs("div",{className:"eval-turn",children:[v.jsxs("div",{className:"eval-turn-head",children:["Turn ",y+1,g.failed?" · failed":"",g.wallMs!=null&&g.wallMs>0?` · ${Qr(g.wallMs)}`:""]}),g.rows.map((k,S)=>v.jsx(gV,{row:k},`${g.turnId}-${S}-${k.kind}`))]},g.turnId)),v.jsx("div",{ref:h})]})}function yV({c:e}){const t=e.inputs??[],n=e.toolCalls??[];return t.length>0||e.finalText!==void 0||n.length>0||e.tools!==void 0&&e.tools.length>0?v.jsxs("div",{className:"eval-io",children:[v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?v.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>v.jsxs("div",{className:"eval-step-block",children:[v.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),v.jsx("pre",{children:s})]},`in-${a}`))]}),v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?v.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>v.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[v.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[v.jsx("span",{className:"eval-step-kind",title:"Tool call",children:v.jsx(vn,{name:"wrench",size:"sm",color:s.isError?"red":"secondary"})}),v.jsx("span",{className:"eval-step-label",children:s.toolName})]}),v.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"args"}),v.jsx("pre",{children:El(s.args)})]}):null,s.output!==void 0?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),v.jsx("pre",{children:typeof s.output=="string"?s.output:El(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),v.jsxs("div",{className:"eval-io-section",children:[v.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?v.jsxs("div",{className:"eval-step-block",children:[v.jsx("div",{className:"eval-step-block-label",children:"final reply"}),v.jsx("pre",{children:e.finalText})]}):v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):v.jsx("div",{className:"eval-io",children:v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function vV({c:e,batchRunning:t}){const[n,r]=x.useState(!1),[s,a]=x.useState(!1),l=n||s,c=vO(l),d=x.useRef({io:!1,expanded:!1});l&&(d.current={io:s,expanded:n});const p=l?s:d.current.io,h=l?n:d.current.expanded,m=e.status==="pending"?"Queued":e.status==="running"?"Running":e.ok===!0?"Pass":"Fail",g=e.status==="done"?e.ok===!0?"success":"danger":e.status==="running"?"accent":"neutral",y=e.sessionId!==void 0||e.status==="done"||e.status==="running",k=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0;return v.jsxs("div",{className:`eval-case${n||s?" expanded":""}`,children:[v.jsxs("div",{className:"eval-case-head",children:[v.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!y,"aria-expanded":n,title:y?n?"Collapse":"Expand live trace":void 0,onClick:()=>r(S=>!S),children:[v.jsx("span",{className:n?"eval-chevron open":"eval-chevron",children:v.jsx(vn,{name:"chevron-right",size:10})}),v.jsx(sa,{variant:g,size:"sm",children:m}),v.jsx("span",{className:"eval-id",children:e.id})]}),e.durationMs!==void 0?v.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,k?v.jsx(Gn,{variant:s?"secondary":"ghost",size:"sm",onClick:()=>a(S=>!S),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?v.jsxs(v.Fragment,{children:[v.jsx(Gn,{variant:"ghost",size:"sm",onClick:()=>{ft.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),v.jsx(Gn,{variant:"ghost",size:"sm",onClick:()=>{ft.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]}),e.description!==void 0?v.jsx("div",{className:"eval-desc",children:e.description}):null,e.error!==void 0?v.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.assertions!==void 0&&e.assertions.length>0?v.jsx("ul",{className:"eval-assertions",children:e.assertions.map(S=>v.jsxs("li",{className:S.passed?"":"fail",children:[S.passed?"✓":"✗"," ",S.name,S.detail!==void 0?` (${S.detail})`:""]},`${S.name}-${S.passed}-${S.detail??""}`))}):null,c?v.jsxs("div",{className:l?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!l,inert:l?void 0:!0,children:[p?v.jsx(yV,{c:e}):null,h&&e.sessionId!==void 0?v.jsx(bV,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,h&&e.sessionId===void 0?v.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"spin"})," Waiting for session…"]}):v.jsxs(v.Fragment,{children:["No session for this case",e.finalText!==void 0?v.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function xV(){const e=pt(d=>d.evalRun),t=pt(d=>d.evalCases),n=pt(d=>d.evalConfig),r=e?.status==="running";if(e===null)return v.jsx("div",{className:"pg-evals",children:v.jsxs("div",{className:"eval-empty",children:[v.jsx("p",{children:"No eval run yet."}),v.jsxs("p",{className:"eval-hint",children:[t.length>0?`${t.length} case${t.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",n?.maxConcurrency!==void 0?` Concurrency: ${n.maxConcurrency}.`:""]}),t.length>0?v.jsx("p",{className:"eval-hint",children:n?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${n.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${n?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,t.length>0?v.jsx(Gn,{variant:"secondary",size:"sm",disabled:r,onClick:()=>{ft.startEvalRun()},children:"Run all"}):null]})});const{summary:s,status:a}=e,l=a==="failed"?"danger":r?"accent":"success",c=a==="failed"?"Failed":r?"Running":"Completed";return v.jsxs("div",{className:"pg-evals",children:[v.jsxs("div",{className:"eval-summary",children:[v.jsx(sa,{variant:l,size:"sm",children:c}),v.jsxs("span",{children:[s.done,"/",s.total," done · ",s.passed," passed ·"," ",s.failed," failed"]}),r?v.jsx("span",{className:"spin"}):null,e.error!==void 0?v.jsx("span",{className:"eval-error",children:e.error}):null]}),v.jsx("div",{className:"eval-case-list",children:e.cases.map(d=>v.jsx(vV,{c:d,batchRunning:r},d.id))})]})}function Ya(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,d,p;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((k,S)=>r[S]!==k)))return s;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...m),n.key&&((p=n.debug)!=null&&p.call(n))){const k=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,T=S/16,E=(R,_)=>{for(R=String(R);R.length<_;)R=" "+R;return R};console.info(`%c⏱ ${E(S,5)} /${E(k,5)} ms`,`
36
+ font-size: .6rem;
37
+ font-weight: bold;
38
+ color: hsl(${Math.max(0,Math.min(120-120*T,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(s),a=!1,s}return l.updateDeps=c=>{r=c},l}function RT(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const kV=(e,t)=>Math.abs(e-t)<1.01,SV=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},CT=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},wV=e=>e,EV=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},TV=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(s(CT(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const p=d.borderBoxSize[0];if(p){s({width:p.inlineSize,height:p.blockSize});return}}s(CT(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},AT={passive:!0},NT=typeof window>"u"?!0:"onscrollend"in window,_V=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&NT?()=>{}:SV(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:g}=e.options;s=m?n.scrollLeft*(g&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),d=l(!1);n.addEventListener("scroll",c,AT);const p=e.options.useScrollendEvent&&NT;return p&&n.addEventListener("scrollend",d,AT),()=>{n.removeEventListener("scroll",c),p&&n.removeEventListener("scrollend",d)}},RV=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},CV=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const l=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class AV{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,d=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wV,rangeExtractor:EV,onChange:()=>{},measureElement:RV,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Ya(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const d=a.get(c.lane);if(d==null||c.end>d.end?a.set(c.lane,c):c.end<d.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Ya(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Ya(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const g of this.laneAssignments.keys())g>=n&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const p=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,p),m=new Array(c).fill(void 0);for(let g=0;g<p;g++){const y=h[g];y&&(m[y.lane]=g)}for(let g=p;g<n;g++){const y=a(g),k=this.laneAssignments.get(g);let S,T;if(k!==void 0&&this.options.lanes>1){S=k;const C=m[S],A=C!==void 0?h[C]:void 0;T=A?A.end+this.options.gap:r+s}else{const C=this.options.lanes===1?h[g-1]:this.getFurthestMeasurement(h,g);T=C?C.end+this.options.gap:r+s,S=C?C.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,S)}const E=d.get(y),R=typeof E=="number"?E:this.options.estimateSize(g),_=T+R;h[g]={index:g,start:T,size:R,end:_,key:y,lane:S},m[S]=g}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ya(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?NV({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ya(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-a),c=Math.min(this.options.count-1,s+a);return n>=l&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((l,c)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(c))});return}const r=this.indexFromElement(n),s=this.options.getItemKey(r),a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var s;const a=this.measurementsCache[n];if(!a)return;const l=this.itemSizeCache.get(a.key)??a.size,c=r-l;c!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,c,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.getVirtualItems=Ya(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=r[c];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return RT(r[xO(0,r.length-1,s=>RT(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,d=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:d,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,a=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&kV(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const xO=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function NV({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=xO(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<s&&d.some(h=>h<n+t);){const h=e[c];d[h.lane]=h.end,c++}const p=Array(r).fill(n+t);for(;l>=0&&p.some(h=>h>=n);){const h=e[l];p[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const OT=typeof document<"u"?x.useLayoutEffect:x.useEffect;function OV({useFlushSync:e=!0,...t}){const n=x.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Ri.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=x.useState(()=>new AV(r));return s.setOptions(r),OT(()=>s._didMount(),[]),OT(()=>s._willUpdate()),s}function kO(e){return OV({observeElementRect:TV,observeElementOffset:_V,scrollToFn:CV,...e})}function MV(){const[e,t]=x.useState([]),[n,r]=x.useState(null),s=x.useRef(-1),a=x.useRef(null),l=e.length,c=kO({count:l,getScrollElement:()=>a.current,estimateSize:()=>18,overscan:24});return x.useEffect(()=>{let d=!1;const p=async()=>{const m=await ft.api.logs(s.current);if(d)return;if(!m.ok||m.body===null){r(`logs failed (${m.status})`);return}r(null);const g=m.body.entries??[];g.length>0&&(s.current=m.body.nextAfter,t(y=>{const k=y.concat(g);return k.length>2e3?k.slice(k.length-2e3):k}))};p();const h=window.setInterval(()=>{p()},1e3);return()=>{d=!0,window.clearInterval(h)}},[]),x.useEffect(()=>{l>0&&c.scrollToIndex(l-1,{align:"end"})},[l,c]),n!==null&&l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(vc,{className:"pg-empty",message:n})}):l===0?v.jsx("div",{className:"pg-raw",children:v.jsx(vc,{className:"pg-empty",message:"Waiting for agent logs… webhook captures and session activity appear here."})}):v.jsxs("div",{className:"pg-raw",children:[v.jsx("div",{className:"head",children:"Agent logs"}),v.jsx("div",{className:"raw-lines",ref:a,children:v.jsx("div",{style:{height:c.getTotalSize(),position:"relative",width:"100%"},children:c.getVirtualItems().map(d=>{const p=e[d.index];if(p===void 0)return null;const h=p.at.slice(11,19);return v.jsxs("div",{"data-index":d.index,ref:c.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${d.start}px)`},children:[v.jsxs("span",{className:"elog-time",children:[h," "]}),v.jsx("span",{children:p.line})]},d.key)})})})]})}const SO=48;function IV(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function DV(e,t=SO){return IV(e)<=t}function Gb(e){e.scrollTop=e.scrollHeight}function wO(e){const{contentKey:t,latchKey:n,thresholdPx:r=SO}=e,s=x.useRef(null),a=x.useRef(!0);return x.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=DV(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),x.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&Gb(l)},[n]),x.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&Gb(l)},[t]),x.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&Gb(l)};c();const d=new Set,p=new ResizeObserver(c),h=y=>{d.has(y)||(d.add(y),p.observe(y))},m=y=>{h(y);for(const k of y.children)m(k)};m(l);const g=new MutationObserver(y=>{for(const k of y)k.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return g.observe(l,{childList:!0,subtree:!0}),()=>{p.disconnect(),g.disconnect()}},[t,n]),{scrollRef:s}}function zV(){const e=pt(a=>a.traceEvents),t=pt(a=>a.current),n=e.length,{scrollRef:r}=wO({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=kO({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?v.jsx("div",{className:"pg-raw",children:v.jsx(vc,{className:"pg-empty",message:"Select a session or Open trace to see the raw event stream."})}):v.jsxs("div",{className:"pg-raw",children:[v.jsx("div",{className:"head",children:"Raw NDJSON stream"}),v.jsx("div",{className:"raw-lines",ref:r,children:v.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return v.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[v.jsx("span",{children:`[${l.index??a.index}] `}),v.jsx("span",{className:"etype",children:l.type}),v.jsx("span",{children:` ${fr(l.data,240)}`})]},a.key)})})})]})}const EO="agent-serve.playground.sidebarWidth",Vb=280,tv=200,nv=560,LV={github:"logo-github",slack:"logo-slack"};function bp(e){return Math.min(nv,Math.max(tv,e))}function jV(){try{const e=localStorage.getItem(EO);if(e===null)return Vb;const t=Number.parseInt(e,10);return Number.isFinite(t)?bp(t):Vb}catch{return Vb}}function PV({channelId:e,mode:t,running:n}){if(n)return v.jsx("span",{className:"spin"});const r=LV[e]??(t==="task"?"clock":null);return r===null?null:v.jsx("span",{className:"session-mark",title:e,children:v.jsx(vn,{name:r,size:"sm",color:"secondary"})})}function $V({summary:e}){const n=pt(c=>c.current)?.sessionId===e.sessionId,r=`${e.turnCount} turn${e.turnCount===1?"":"s"}`,s=iO(e.updatedAt),a=(()=>{if(!e.updatedAt)return null;const c=new Date(e.updatedAt);return Number.isNaN(c.getTime())?`Last turn ${e.updatedAt}`:`Last turn ${c.toLocaleString()}`})(),l=[e.sessionId,`${e.channelId} · ${r}`,a].filter(Boolean).join(`
39
+ `);return v.jsxs("button",{type:"button",className:n?"session-item active":"session-item",onClick:()=>ft.selectSession(e),title:l,children:[v.jsx(PV,{channelId:e.channelId,mode:e.mode,running:e.running===!0}),v.jsx("span",{className:e.title?"name":"name name-id",children:e.title||e.sessionId}),e.externalUrl?v.jsx("a",{className:"ext-link",href:e.externalUrl,target:"_blank",rel:"noopener noreferrer",title:"Open in Slack",onClick:c=>c.stopPropagation(),children:v.jsx(vn,{name:"link-external",size:"xs",color:"tertiary"})}):null,s!==null?v.jsx("span",{className:"session-when",children:s}):null]})}function BV(e){try{return localStorage.getItem(`agent-serve.playground.section.${e}`)==="1"}catch{return!1}}function TO({id:e,label:t,actions:n,children:r}){const[s,a]=x.useState(()=>BV(e)),l=()=>{a(c=>{const d=!c;try{localStorage.setItem(`agent-serve.playground.section.${e}`,d?"1":"0")}catch{}return d})};return v.jsxs("div",{className:"side-section",children:[v.jsxs("div",{className:s?"side-head":"side-head collapsed",children:[v.jsxs("button",{type:"button",className:"side-head-toggle","aria-expanded":s,onClick:l,children:[v.jsx("span",{className:"side-head-label",children:t}),v.jsx("span",{className:"side-head-chevron",children:v.jsx(vn,{name:"chevron-right",size:10})})]}),n!==void 0?v.jsx("span",{className:"actions",children:n}):null]}),v.jsx("div",{className:s?"side-section-body":"side-section-body collapsed","aria-hidden":!s,inert:s?void 0:!0,children:r})]})}function Jd({icon:e,label:t,onClick:n,title:r}){return v.jsxs("button",{type:"button",className:"side-nav-item",onClick:n,title:r,children:[v.jsx(vn,{name:e,size:"base",color:"secondary"}),v.jsx("span",{className:"label",children:t})]})}function FV(){const e=pt(r=>r.info),t=pt(r=>r.meta.dev),n=e?.schedules||[];return n.length===0?null:v.jsx(TO,{id:"schedules",label:"Schedules",children:v.jsx("div",{className:"schedule-list",children:n.map(r=>v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"schedule-name",children:r.name}),v.jsx("div",{className:"cron",children:r.cron})]}),v.jsx(Gn,{variant:"ghost",size:"sm",disabled:!t,title:t?void 0:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{ft.dispatchSchedule(r.name)},children:"Dispatch"})]},r.name))})})}function UV(){const e=pt(r=>r.evalCases),t=pt(r=>r.evalRun),n=t?.status==="running";return e.length===0&&t===null?null:v.jsx(TO,{id:"evals",label:"Evals",actions:v.jsxs(v.Fragment,{children:[v.jsx(Gn,{variant:"ghost",size:"sm",disabled:n||e.length===0,title:n?"Eval run in progress":void 0,onClick:()=>{ft.startEvalRun()},children:"Run all"}),t!==null?v.jsx(Gn,{variant:"ghost",size:"sm",onClick:()=>ft.setView("evals"),children:"Results"}):null]}),children:e.length===0?v.jsx("div",{className:"eval-side-empty",children:"No evals/ cases found"}):v.jsx("div",{className:"schedule-list",children:e.map(r=>v.jsxs("div",{className:"schedule-item",children:[v.jsxs("div",{children:[v.jsx("div",{className:"eval-side-id",children:r.id}),r.tags!==void 0&&r.tags.length>0?v.jsx("div",{className:"cron",children:r.tags.join(", ")}):null]}),v.jsx(Gn,{variant:"ghost",size:"sm",disabled:n,onClick:()=>{ft.startEvalRun([r.id])},children:"Run"})]},r.id))})})}function MT(){const e=pt(R=>R.meta.name),t=pt(R=>R.meta.dev),n=pt(R=>R.meta.indexPath),r=pt(R=>R.health),s=pt(R=>R.info),a=pt(R=>R.sessions),l=x.useRef(null),[c,d]=x.useState(jV),[p,h]=x.useState(!1),[m,g]=x.useState(""),y=x.useRef(c);y.current=c;const k=x.useMemo(()=>{const R=m.trim().toLowerCase();return R===""?a:a.filter(_=>_.sessionId.toLowerCase().includes(R))},[a,m]),S=x.useCallback(R=>{R?.preventDefault();const _=m.trim();if(_==="")return;const C=a.find(A=>A.sessionId===_);if(C!==void 0){ft.selectSession(C);return}if(k.length===1){ft.selectSession(k[0]);return}k.length===0&&ft.openSessionById(_)},[m,a,k]);x.useEffect(()=>{try{localStorage.setItem(EO,String(c))}catch{}},[c]);const T=x.useCallback(R=>{R.preventDefault();const _=R.currentTarget,C=R.clientX,A=y.current;_.setPointerCapture(R.pointerId),h(!0),document.body.classList.add("pg-resizing-sidebar");const N=$=>{d(bp(A+($.clientX-C)))},I=$=>{_.releasePointerCapture($.pointerId),_.removeEventListener("pointermove",N),_.removeEventListener("pointerup",I),_.removeEventListener("pointercancel",I),h(!1),document.body.classList.remove("pg-resizing-sidebar")};_.addEventListener("pointermove",N),_.addEventListener("pointerup",I),_.addEventListener("pointercancel",I)},[]),E=R=>{if(!R)return;const _=new FileReader;_.onload=()=>{ft.loadLocalTrace(String(_.result||""),R.name)},_.readAsText(R)};return v.jsxs("div",{className:"pg-sidebar",style:{width:c},children:[v.jsx("div",{className:p?"pg-sidebar-resizer dragging":"pg-sidebar-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":c,"aria-valuemin":tv,"aria-valuemax":nv,tabIndex:0,onPointerDown:T,onKeyDown:R=>{R.key==="ArrowLeft"?(R.preventDefault(),d(_=>bp(_-16))):R.key==="ArrowRight"?(R.preventDefault(),d(_=>bp(_+16))):R.key==="Home"?(R.preventDefault(),d(tv)):R.key==="End"&&(R.preventDefault(),d(nv))}}),v.jsxs("div",{className:"side-nav",children:[v.jsx(Jd,{icon:"pencil-square",label:"New Chat",onClick:()=>ft.deselectSession()}),v.jsx(Jd,{icon:"folder-open",label:"Open Trace",title:"Open a saved events.ndjson trace",onClick:()=>l.current?.click()}),v.jsx(Jd,{icon:"squares",label:"Agent Surface",title:"Tools, skills, connections, and channels",onClick:()=>ft.setDrawerOpen(!0)}),n?v.jsx(Jd,{icon:"grid",label:"All Agents",title:"Back to the agents index",onClick:()=>{window.location.href=n}}):null]}),v.jsxs("div",{className:"side-section",children:[v.jsx("div",{className:"side-head",children:v.jsx("span",{className:"side-head-label",children:"Sessions"})}),v.jsx("form",{className:"session-search",onSubmit:S,children:v.jsx(Bh,{type:"search",size:"base","aria-label":"Search by session ID",placeholder:"Search sessions",startIcon:"magnifying-glass",value:m,onChange:R=>g(R.target.value),title:"Filter the list, or press Enter to open a session by ID"})})]}),v.jsx("input",{ref:l,type:"file",accept:".ndjson,application/x-ndjson,application/json,.json",style:{display:"none"},onChange:R=>{E(R.target.files?.[0]),R.target.value=""}}),v.jsxs("div",{className:"session-list",children:[k.map(R=>v.jsx($V,{summary:R},R.sessionId)),m.trim()!==""&&k.length===0?v.jsx("div",{className:"session-search-empty",children:"No matching sessions. Press Enter to open by ID."}):null]}),v.jsx(FV,{}),v.jsx(UV,{}),v.jsxs("div",{className:"side-footer",children:[v.jsxs("span",{className:"side-avatar","aria-hidden":"true",children:[(e||"a").slice(0,1).toUpperCase(),v.jsx("span",{className:`dot ${r}`})]}),v.jsxs("span",{className:"side-footer-main",children:[v.jsx("span",{className:"side-footer-name",children:e}),v.jsx("span",{className:"side-footer-sub",children:sO(s?.model)})]}),t?v.jsx(sa,{variant:"warn",size:"sm",children:"dev"}):null]})]})}function qV(){const e=pt(t=>t.toast);return e?v.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const IT=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"logs",label:"Logs"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"}],_O="(max-width: 640px)";function HV(e){const t=window.matchMedia(_O);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function GV(){return x.useSyncExternalStore(HV,()=>window.matchMedia(_O).matches)}function VV(){const e=pt(E=>E.barTitle),t=pt(E=>E.barId),n=pt(E=>E.externalUrl),r=pt(E=>E.current),s=pt(E=>E.view),a=pt(E=>E.authToken),l=pt(E=>E.aliasHosted),c=pt(E=>E.embedded),d=pt(E=>E.bridged),p=pt(E=>E.sidebarOpen),h=pt(E=>E.evalNavReturn),m=pt(E=>E.evalRun),g=GV(),y=r?.sessionId??null,k=h&&s!=="evals"&&m!==null,S=async()=>{if(y)try{const E=await ft.api.eventsText(y);if(!E.ok){ft.toast(`Download failed (${E.status})`);return}const R=await E.blob(),_=URL.createObjectURL(R),C=document.createElement("a");C.href=_,C.download=`${y}.events.ndjson`,document.body.appendChild(C),C.click(),C.remove(),URL.revokeObjectURL(_)}catch(E){ft.toast(`Download failed: ${E instanceof Error?E.message:String(E)}`)}},T=g?v.jsx(aH,{size:"base","aria-label":"Visualization mode",value:s,onValueChange:E=>ft.setView(E??"chat"),options:IT}):v.jsx(P1,{size:"sm",variant:"compact",value:s,onValueChange:E=>ft.setView(E),"aria-label":"Visualization mode",children:IT.map(E=>v.jsx(P1.Item,{value:E.value,children:E.label},E.value))});return v.jsxs("div",{className:"pg-topbar",children:[c?v.jsx(po,{icon:"layout-sidebar-left",size:"sm","aria-label":p?"Hide sessions":"Show sessions",onClick:()=>ft.setSidebarOpen(!p)}):null,k?v.jsx(Gn,{variant:"secondary",size:"sm",onClick:()=>ft.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,v.jsx("span",{className:"session-title",children:e}),t?v.jsx("span",{className:"session-id",children:t}):null,c?null:v.jsxs(v.Fragment,{children:[n?v.jsx("a",{className:"tlink",href:n,target:"_blank",rel:"noopener noreferrer",title:"Open the source conversation",children:"Open in Slack"}):null,y?v.jsx(Gn,{variant:"ghost",size:"sm",onClick:()=>{S()},title:"Download this session's event log",children:"Download"}):null]}),v.jsx("span",{className:"grow"}),d?null:T,c&&(y!==null||n!==null)?v.jsxs(Pu,{children:[v.jsx(Pu.Trigger,{children:v.jsx(po,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),v.jsxs(Pu.Content,{"aria-label":"Session actions",size:"sm",children:[n!==null?v.jsx(Pu.Item,{onSelect:()=>window.open(n,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,y!==null?v.jsx(Pu.Item,{onSelect:()=>{S()},children:"Download event log"}):null]})]}):null,l?null:v.jsx("div",{className:"pg-token",children:v.jsx(Bh,{type:"password",size:"base","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:E=>ft.setAuthToken(E.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const KV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench"},RO={user:"User message",agent:"Assistant message",think:"Thinking",tool:"Tool call"};function ZV(e){if(e.error)return"danger";switch(e.kind){case"user":return"accent";case"agent":return"success";default:return"neutral"}}function WV(e){if(e.startedAt!=null)return e.startedAt;let t=Number.POSITIVE_INFINITY;for(const n of e.rows){const r=n.startAt??n.at;r!=null&&r<t&&(t=r)}return Number.isFinite(t)?t:0}function YV(e,t){if(e.wallMs!=null&&e.wallMs>0)return e.wallMs;if(e.endedAt!=null&&e.endedAt>t)return e.endedAt-t;let n=0;for(const r of e.rows){const a=(r.startAt??r.at??t)+(r.ms!=null&&r.ms>0?r.ms:0);a-t>n&&(n=a-t)}return Math.max(n,1)}function XV(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,d=c===null||c===0,p=s*.012,h=d?p:Math.max(c,p),m=Math.max(0,Math.min(100,l/s*100)),g=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:g,instant:d}}function CO(e){return e===null?"—":e===0?"instant":Qr(e)}function fs({label:e,value:t}){return v.jsxs("div",{children:[v.jsx("dt",{children:e}),v.jsx("dd",{title:t,children:t})]})}function QV({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,d=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",p=n.body?.trim()||"",h=n.toolArgs!=null?El(n.toolArgs):"",m=n.toolOutput!=null?El(n.toolOutput):n.kind==="tool"&&p?p:"";return v.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[v.jsxs("div",{className:"trace-detail-head",children:[v.jsxs(sa,{variant:ZV(n),size:"sm",children:[RO[n.kind],n.error?" · error":""]}),v.jsx("button",{type:"button",className:"link-btn",onClick:t,children:"Close"})]}),n.toolName?v.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.kind!=="tool"&&p?v.jsx("pre",{className:"trace-detail-body",children:p}):null,n.kind!=="tool"&&!p&&n.label?v.jsx("div",{className:"trace-detail-label",children:n.label}):null,v.jsxs("dl",{className:"trace-detail-meta",children:[v.jsx(fs,{label:"Turn",value:r}),n.error?v.jsx(fs,{label:"Status",value:"error"}):null,v.jsx(fs,{label:"Start +",value:Qr(s)}),v.jsx(fs,{label:"End +",value:Qr(c)}),v.jsx(fs,{label:"Duration",value:CO(a)}),v.jsx(fs,{label:"% of turn",value:d}),v.jsx(fs,{label:"Started",value:kT(n.startAt)}),v.jsx(fs,{label:"Ended",value:kT(n.at)}),n.callId?v.jsx(fs,{label:"Call id",value:n.callId}):null]}),h?v.jsxs("div",{className:"trace-detail-section",children:[v.jsx("div",{className:"trace-detail-section-title",children:"Args"}),v.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?v.jsxs("div",{className:"trace-detail-section",children:[v.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),v.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function JV({span:e,selected:t,onSelect:n}){const{row:r}=e,s=`${r.kind}${r.error?" error":""}`,a=CO(e.trueDurMs),l=e.widthPct>=8,c=r.depth??0;return v.jsxs("button",{type:"button",className:`wf-row ${s}${t?" selected":""}${c>0?" nested":""}`,onClick:n,"aria-pressed":t,style:c>0?{paddingLeft:`${8+c*14}px`}:void 0,children:[v.jsx("span",{className:"wf-kind",title:RO[r.kind],children:v.jsx(vn,{name:KV[r.kind],size:"sm",color:r.error?"red":"secondary"})}),v.jsx("span",{className:"wf-name",title:r.label,children:c>0?`↳ ${r.label||"—"}`:r.label||"—"}),v.jsx("span",{className:"wf-track","aria-hidden":"true",children:v.jsx("span",{className:`wf-bar ${s}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:l?v.jsx("span",{className:"wf-bar-label",children:a}):null})}),v.jsx("span",{className:"wf-dur",children:a})]})}function eK({turn:e,index:t,selectedId:n,onSelect:r}){const s=WV(e),a=YV(e,s),l=x.useMemo(()=>e.rows.map((p,h)=>XV(p,h,e.turnId,s,a)),[e,s,a]),c=x.useMemo(()=>pV(a),[a]),d=[];return e.wallMs!==void 0&&d.push(`Worked for ${Cx(e.wallMs)}`),e.usage&&d.push(`in ${Wp(e.usage.inputTokens)} · out ${Wp(e.usage.outputTokens)}`),v.jsxs("div",{className:"trace-turn",children:[v.jsxs("div",{className:"thead",children:[v.jsxs("span",{className:"thead-title",children:["Turn ",t+1,v.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?v.jsx(sa,{variant:"danger",size:"sm",children:"failed"}):null]}),v.jsx("span",{className:"wall",children:d.join(" · ")||"In progress"})]}),v.jsxs("div",{className:"wf",children:[v.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[v.jsx("span",{className:"wf-kind"}),v.jsx("span",{className:"wf-name"}),v.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(p=>v.jsxs("span",{className:"wf-tick",style:{left:`${p/a*100}%`},children:[v.jsx("span",{className:"wf-tick-line"}),v.jsx("span",{className:"wf-tick-label",children:Qr(p)})]},p))}),v.jsx("span",{className:"wf-dur"})]}),l.length===0?v.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(p=>v.jsx(JV,{span:p,selected:n===p.id,onSelect:()=>r(n===p.id?null:p)},p.id))]})]})}function tK(){const e=pt(a=>a.traceEvents),t=x.useMemo(()=>yO(e),[e]),[n,r]=x.useState(null);if(!e.length)return v.jsx("div",{className:"pg-trace",children:v.jsx(vc,{className:"pg-empty",message:"Select a session or Open trace to see the timeline."})});const s=[`${t.eventCount} events`,`${t.turns.length} turn${t.turns.length===1?"":"s"}`,`${t.totalTools} tool call${t.totalTools===1?"":"s"}`,t.failedTools?`${t.failedTools} error${t.failedTools===1?"":"s"}`:null].filter(Boolean).join(" · ");return v.jsx("div",{className:"pg-trace",children:v.jsxs("div",{className:"trace-rows",children:[v.jsx("div",{className:"trace-summary",children:s}),v.jsxs("div",{className:`trace-layout${n?" has-detail":""}`,children:[v.jsx("div",{className:"trace-main",children:t.turns.map((a,l)=>v.jsx(eK,{turn:a,index:l,selectedId:n?.id??null,onSelect:r},`${a.turnId||"turn"}-${l}`))}),n?v.jsx(QV,{span:n,onClose:()=>r(null)}):null]})]})})}function nK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const rK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sK={};function DT(e,t){return(sK.jsx?iK:rK).test(e)}const oK=/[ \t\n\f\r]/g;function aK(e){return typeof e=="object"?e.type==="text"?zT(e.value):!1:zT(e)}function zT(e){return e.replace(oK,"")===""}class ef{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ef.prototype.normal={};ef.prototype.property={};ef.prototype.space=void 0;function AO(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ef(n,r,t)}function rv(e){return e.toLowerCase()}class Pr{constructor(t,n){this.attribute=n,this.property=t}}Pr.prototype.attribute="";Pr.prototype.booleanish=!1;Pr.prototype.boolean=!1;Pr.prototype.commaOrSpaceSeparated=!1;Pr.prototype.commaSeparated=!1;Pr.prototype.defined=!1;Pr.prototype.mustUseProperty=!1;Pr.prototype.number=!1;Pr.prototype.overloadedBoolean=!1;Pr.prototype.property="";Pr.prototype.spaceSeparated=!1;Pr.prototype.space=void 0;let lK=0;const At=fa(),Fn=fa(),iv=fa(),je=fa(),dn=fa(),pl=fa(),Zr=fa();function fa(){return 2**++lK}const sv=Object.freeze(Object.defineProperty({__proto__:null,boolean:At,booleanish:Fn,commaOrSpaceSeparated:Zr,commaSeparated:pl,number:je,overloadedBoolean:iv,spaceSeparated:dn},Symbol.toStringTag,{value:"Module"})),Kb=Object.keys(sv);class Ox extends Pr{constructor(t,n,r,s){let a=-1;if(super(t,n),LT(this,"space",s),typeof r=="number")for(;++a<Kb.length;){const l=Kb[a];LT(this,Kb[a],(r&sv[l])===sv[l])}}}Ox.prototype.defined=!0;function LT(e,t,n){n&&(e[t]=n)}function Il(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Ox(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rv(r)]=r,n[rv(a.attribute)]=r}return new ef(t,n,e.space)}const NO=Il({properties:{ariaActiveDescendant:null,ariaAtomic:Fn,ariaAutoComplete:null,ariaBusy:Fn,ariaChecked:Fn,ariaColCount:je,ariaColIndex:je,ariaColSpan:je,ariaControls:dn,ariaCurrent:null,ariaDescribedBy:dn,ariaDetails:null,ariaDisabled:Fn,ariaDropEffect:dn,ariaErrorMessage:null,ariaExpanded:Fn,ariaFlowTo:dn,ariaGrabbed:Fn,ariaHasPopup:null,ariaHidden:Fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dn,ariaLevel:je,ariaLive:null,ariaModal:Fn,ariaMultiLine:Fn,ariaMultiSelectable:Fn,ariaOrientation:null,ariaOwns:dn,ariaPlaceholder:null,ariaPosInSet:je,ariaPressed:Fn,ariaReadOnly:Fn,ariaRelevant:null,ariaRequired:Fn,ariaRoleDescription:dn,ariaRowCount:je,ariaRowIndex:je,ariaRowSpan:je,ariaSelected:Fn,ariaSetSize:je,ariaSort:null,ariaValueMax:je,ariaValueMin:je,ariaValueNow:je,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function OO(e,t){return t in e?e[t]:t}function MO(e,t){return OO(e,t.toLowerCase())}const uK=Il({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pl,acceptCharset:dn,accessKey:dn,action:null,allow:null,allowFullScreen:At,allowPaymentRequest:At,allowUserMedia:At,alt:null,as:null,async:At,autoCapitalize:null,autoComplete:dn,autoFocus:At,autoPlay:At,blocking:dn,capture:null,charSet:null,checked:At,cite:null,className:dn,cols:je,colSpan:null,content:null,contentEditable:Fn,controls:At,controlsList:dn,coords:je|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:At,defer:At,dir:null,dirName:null,disabled:At,download:iv,draggable:Fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:At,formTarget:null,headers:dn,height:je,hidden:iv,high:je,href:null,hrefLang:null,htmlFor:dn,httpEquiv:dn,id:null,imageSizes:null,imageSrcSet:null,inert:At,inputMode:null,integrity:null,is:null,isMap:At,itemId:null,itemProp:dn,itemRef:dn,itemScope:At,itemType:dn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:At,low:je,manifest:null,max:null,maxLength:je,media:null,method:null,min:null,minLength:je,multiple:At,muted:At,name:null,nonce:null,noModule:At,noValidate:At,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:At,optimum:je,pattern:null,ping:dn,placeholder:null,playsInline:At,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:At,referrerPolicy:null,rel:dn,required:At,reversed:At,rows:je,rowSpan:je,sandbox:dn,scope:null,scoped:At,seamless:At,selected:At,shadowRootClonable:At,shadowRootDelegatesFocus:At,shadowRootMode:null,shape:null,size:je,sizes:null,slot:null,span:je,spellCheck:Fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:je,step:null,style:null,tabIndex:je,target:null,title:null,translate:null,type:null,typeMustMatch:At,useMap:null,value:Fn,width:je,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dn,axis:null,background:null,bgColor:null,border:je,borderColor:null,bottomMargin:je,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:At,declare:At,event:null,face:null,frame:null,frameBorder:null,hSpace:je,leftMargin:je,link:null,longDesc:null,lowSrc:null,marginHeight:je,marginWidth:je,noResize:At,noHref:At,noShade:At,noWrap:At,object:null,profile:null,prompt:null,rev:null,rightMargin:je,rules:null,scheme:null,scrolling:Fn,standby:null,summary:null,text:null,topMargin:je,valueType:null,version:null,vAlign:null,vLink:null,vSpace:je,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:At,disableRemotePlayback:At,prefix:null,property:null,results:je,security:null,unselectable:null},space:"html",transform:MO}),cK=Il({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Zr,accentHeight:je,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:je,amplitude:je,arabicForm:null,ascent:je,attributeName:null,attributeType:null,azimuth:je,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:je,by:null,calcMode:null,capHeight:je,className:dn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:je,diffuseConstant:je,direction:null,display:null,dur:null,divisor:je,dominantBaseline:null,download:At,dx:null,dy:null,edgeMode:null,editable:null,elevation:je,enableBackground:null,end:null,event:null,exponent:je,externalResourcesRequired:null,fill:null,fillOpacity:je,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:pl,g2:pl,glyphName:pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:je,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:je,horizOriginX:je,horizOriginY:je,id:null,ideographic:je,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:je,k:je,k1:je,k2:je,k3:je,k4:je,kernelMatrix:Zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:je,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:je,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:je,overlineThickness:je,paintOrder:null,panose1:null,path:null,pathLength:je,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:je,pointsAtY:je,pointsAtZ:je,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zr,rev:Zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zr,requiredFeatures:Zr,requiredFonts:Zr,requiredFormats:Zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:je,specularExponent:je,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:je,strikethroughThickness:je,string:null,stroke:null,strokeDashArray:Zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:je,strokeOpacity:je,strokeWidth:null,style:null,surfaceScale:je,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zr,tabIndex:je,tableValues:null,target:null,targetX:je,targetY:je,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:je,underlineThickness:je,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:je,values:null,vAlphabetic:je,vMathematical:je,vectorEffect:null,vHanging:je,vIdeographic:je,version:null,vertAdvY:je,vertOriginX:je,vertOriginY:je,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:je,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:OO}),IO=Il({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),DO=Il({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:MO}),zO=Il({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fK={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dK=/[A-Z]/g,jT=/-[a-z]/g,pK=/^data[-\w.:]+$/i;function hK(e,t){const n=rv(t);let r=t,s=Pr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(jT,gK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!jT.test(a)){let l=a.replace(dK,mK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=Ox}return new s(r,t)}function mK(e){return"-"+e.toLowerCase()}function gK(e){return e.charAt(1).toUpperCase()}const bK=AO([NO,uK,IO,DO,zO],"html"),Mx=AO([NO,cK,IO,DO,zO],"svg");function yK(e){return e.join(" ").trim()}var Xa={},Zb,PT;function vK(){if(PT)return Zb;PT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
40
+ `,p="/",h="*",m="",g="comment",y="declaration";Zb=function(S,T){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];T=T||{};var E=1,R=1;function _(q){var z=q.match(t);z&&(E+=z.length);var j=q.lastIndexOf(d);R=~j?q.length-j:R+q.length}function C(){var q={line:E,column:R};return function(z){return z.position=new A(q),$(),z}}function A(q){this.start=q,this.end={line:E,column:R},this.source=T.source}A.prototype.content=S;function N(q){var z=new Error(T.source+":"+E+":"+R+": "+q);if(z.reason=q,z.filename=T.source,z.line=E,z.column=R,z.source=S,!T.silent)throw z}function I(q){var z=q.exec(S);if(z){var j=z[0];return _(j),S=S.slice(j.length),z}}function $(){I(n)}function H(q){var z;for(q=q||[];z=L();)z!==!1&&q.push(z);return q}function L(){var q=C();if(!(p!=S.charAt(0)||h!=S.charAt(1))){for(var z=2;m!=S.charAt(z)&&(h!=S.charAt(z)||p!=S.charAt(z+1));)++z;if(z+=2,m===S.charAt(z-1))return N("End of comment missing");var j=S.slice(2,z-2);return R+=2,_(j),S=S.slice(z),R+=2,q({type:g,comment:j})}}function Z(){var q=C(),z=I(r);if(z){if(L(),!I(s))return N("property missing ':'");var j=I(a),F=q({type:y,property:k(z[0].replace(e,m)),value:j?k(j[0].replace(e,m)):m});return I(l),F}}function K(){var q=[];H(q);for(var z;z=Z();)z!==!1&&(q.push(z),H(q));return q}return $(),K()};function k(S){return S?S.replace(c,m):m}return Zb}var $T;function xK(){if($T)return Xa;$T=1;var e=Xa&&Xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=n;var t=e(vK());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(d){if(d.type==="declaration"){var p=d.property,h=d.value;c?s(p,h,d):h&&(a=a||{},a[p]=h)}}),a}return Xa}var Bu={},BT;function kK(){if(BT)return Bu;BT=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(p){return!p||n.test(p)||e.test(p)},l=function(p,h){return h.toUpperCase()},c=function(p,h){return"".concat(h,"-")},d=function(p,h){return h===void 0&&(h={}),a(p)?p:(p=p.toLowerCase(),h.reactCompat?p=p.replace(s,c):p=p.replace(r,c),p.replace(t,l))};return Bu.camelCase=d,Bu}var Fu,FT;function SK(){if(FT)return Fu;FT=1;var e=Fu&&Fu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(xK()),n=kK();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,Fu=r,Fu}var wK=SK();const EK=rh(wK),LO=jO("end"),Ix=jO("start");function jO(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function TK(e){const t=Ix(e),n=LO(e);if(t&&n)return{start:t,end:n}}function sc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?UT(e.position):"start"in e||"end"in e?UT(e):"line"in e||"column"in e?ov(e):""}function ov(e){return qT(e&&e.line)+":"+qT(e&&e.column)}function UT(e){return ov(e&&e.start)+"-"+ov(e&&e.end)}function qT(e){return e&&typeof e=="number"?e:1}class br extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=sc(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}br.prototype.file="";br.prototype.name="";br.prototype.reason="";br.prototype.message="";br.prototype.stack="";br.prototype.column=void 0;br.prototype.line=void 0;br.prototype.ancestors=void 0;br.prototype.cause=void 0;br.prototype.fatal=void 0;br.prototype.place=void 0;br.prototype.ruleId=void 0;br.prototype.source=void 0;const Dx={}.hasOwnProperty,_K=new Map,RK=/[A-Z]/g,CK=new Set(["table","tbody","thead","tfoot","tr"]),AK=new Set(["td","th"]),PO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function NK(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=PK(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=jK(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mx:bK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$O(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function $O(e,t,n){if(t.type==="element")return OK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return MK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return DK(e,t,n);if(t.type==="mdxjsEsm")return IK(e,t);if(t.type==="root")return zK(e,t,n);if(t.type==="text")return LK(e,t)}function OK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Mx,e.schema=s),e.ancestors.push(t);const a=FO(e,t.tagName,!1),l=$K(e,t);let c=Lx(e,t);return CK.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!aK(d):!0})),BO(e,l,a,t),zx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function MK(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Mc(e,t.position)}function IK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mc(e,t.position)}function DK(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Mx,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:FO(e,t.name,!0),l=BK(e,t),c=Lx(e,t);return BO(e,l,a,t),zx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function zK(e,t,n){const r={};return zx(r,Lx(e,t)),e.create(t,e.Fragment,r,n)}function LK(e,t){return t.value}function BO(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jK(e,t,n){return r;function r(s,a,l,c){const p=Array.isArray(l.children)?n:t;return c?p(a,l,c):p(a,l)}}function PK(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),d=Ix(r);return t(s,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function $K(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Dx.call(t.properties,s)){const a=FK(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&AK.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function BK(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Mc(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Mc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Lx(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:_K;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const p=s.get(d)||0;l=d+"-"+p,s.set(d,p+1)}}const c=$O(e,a,l);c!==void 0&&n.push(c)}return n}function FK(e,t,n){const r=hK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?nK(n):yK(n)),r.property==="style"){let s=typeof n=="object"?n:UK(e,String(n));return e.stylePropertyNameCase==="css"&&(s=qK(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?fK[r.property]||r.property:r.attribute,n]}}function UK(e,t){try{return EK(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new br("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=PO+"#cannot-parse-style-attribute",s}}function FO(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=DT(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=DT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Dx.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mc(e)}function Mc(e,t){const n=new br("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=PO+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qK(e){const t={};let n;for(n in e)Dx.call(e,n)&&(t[HK(n)]=e[n]);return t}function HK(e){let t=e.replace(RK,GK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function GK(e){return"-"+e.toLowerCase()}const Wb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},VK={};function jx(e,t){const n=VK,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return UO(e,r,s)}function UO(e,t,n){if(KK(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return HT(e.children,t,n)}return Array.isArray(e)?HT(e,t,n):""}function HT(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=UO(e[s],t,n);return r.join("")}function KK(e){return!!(e&&typeof e=="object")}const GT=document.createElement("i");function Px(e){const t="&"+e+";";GT.innerHTML=t;const n=GT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xr(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ci(e,t){return e.length>0?(Xr(e,e.length,0,t),e):t}const VT={}.hasOwnProperty;function qO(e){const t={};let n=-1;for(;++n<e.length;)ZK(t,e[n]);return t}function ZK(e,t){let n;for(n in t){const s=(VT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){VT.call(s,l)||(s[l]=[]);const c=a[l];WK(s[l],Array.isArray(c)?c:c?[c]:[])}}}function WK(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xr(e,0,0,r)}function HO(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ei(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=vo(/[A-Za-z]/),mr=vo(/[\dA-Za-z]/),YK=vo(/[#-'*+\--9=?A-Z^-~]/);function Xp(e){return e!==null&&(e<32||e===127)}const av=vo(/\d/),XK=vo(/[\dA-Fa-f]/),QK=vo(/[!-/:-@[-`{-~]/);function ct(e){return e!==null&&e<-2}function un(e){return e!==null&&(e<0||e===32)}function jt(e){return e===-2||e===-1||e===32}const Hh=vo(new RegExp("\\p{P}|\\p{S}","u")),ia=vo(/\s/);function vo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Dl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&mr(e.charCodeAt(n+1))&&mr(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function qt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return jt(d)?(e.enter(n),c(d)):t(d)}function c(d){return jt(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const JK={tokenize:eZ};function eZ(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),qt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ct(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const tZ={tokenize:nZ},KT={tokenize:rZ};function nZ(e){const t=this,n=[];let r=0,s,a,l;return c;function c(_){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,d,p)(_)}return p(_)}function d(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const C=t.events.length;let A=C,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}E(r);let I=C;for(;I<t.events.length;)t.events[I][1].end={...N},I++;return Xr(t.events,A+1,0,t.events.slice(C)),t.events.length=I,p(_)}return c(_)}function p(_){if(r===n.length){if(!s)return g(_);if(s.currentConstruct&&s.currentConstruct.concrete)return k(_);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(KT,h,m)(_)}function h(_){return s&&R(),E(r),g(_)}function m(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(_)}function g(_){return t.containerState={},e.attempt(KT,y,k)(_)}function y(_){return r++,n.push([t.currentConstruct,t.containerState]),g(_)}function k(_){if(_===null){s&&R(),E(0),e.consume(_);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(_)}function S(_){if(_===null){T(e.exit("chunkFlow"),!0),E(0),e.consume(_);return}return ct(_)?(e.consume(_),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(_),S)}function T(_,C){const A=t.sliceStream(_);if(C&&A.push(null),_.previous=a,a&&(a.next=_),a=_,s.defineSkip(_.start),s.write(A),t.parser.lazy[_.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const I=t.events.length;let $=I,H,L;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(H){L=t.events[$][1].end;break}H=!0}for(E(r),N=I;N<t.events.length;)t.events[N][1].end={...L},N++;Xr(t.events,$+1,0,t.events.slice(I)),t.events.length=N}}function E(_){let C=n.length;for(;C-- >_;){const A=n[C];t.containerState=A[1],A[0].exit.call(t,e)}n.length=_}function R(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function rZ(e,t,n){return qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tl(e){if(e===null||un(e)||ia(e))return 1;if(Hh(e))return 2}function Gh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const lv={name:"attention",resolveAll:iZ,tokenize:sZ};function iZ(e,t){let n=-1,r,s,a,l,c,d,p,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},g={...e[n][1].start};ZT(m,-d),ZT(g,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=ci(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=ci(p,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),p=ci(p,Gh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),p=ci(p,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,p=ci(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Xr(e,r-1,n-r+3,p),n=r+p.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sZ(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Tl(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const p=e.exit("attentionSequence"),h=Tl(d),m=!h||h===2&&s||n.includes(d),g=!s||s===2&&h||n.includes(r);return p._open=!!(a===42?m:m&&(s||!g)),p._close=!!(a===42?g:g&&(h||!m)),t(d)}}function ZT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const oZ={name:"autolink",tokenize:aZ};function aZ(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Sr(y)?(e.consume(y),l):y===64?n(y):p(y)}function l(y){return y===43||y===45||y===46||mr(y)?(r=1,c(y)):p(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||mr(y))&&r++<32?(e.consume(y),c):(r=0,p(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Xp(y)?n(y):(e.consume(y),d)}function p(y){return y===64?(e.consume(y),h):YK(y)?(e.consume(y),p):n(y)}function h(y){return mr(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||mr(y))&&r++<63){const k=y===45?g:m;return e.consume(y),k}return n(y)}}const tf={partial:!0,tokenize:lZ};function lZ(e,t,n){return r;function r(a){return jt(a)?qt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||ct(a)?t(a):n(a)}}const GO={continuation:{tokenize:cZ},exit:fZ,name:"blockQuote",tokenize:uZ};function uZ(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return jt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function cZ(e,t,n){const r=this;return s;function s(l){return jt(l)?qt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(GO,t,n)(l)}}function fZ(e){e.exit("blockQuote")}const VO={name:"characterEscape",tokenize:dZ};function dZ(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return QK(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const KO={name:"characterReference",tokenize:pZ};function pZ(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,l=mr,h(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=XK,h):(e.enter("characterReferenceValue"),a=7,l=av,h(m))}function h(m){if(m===59&&s){const g=e.exit("characterReferenceValue");return l===mr&&!Px(r.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&s++<a?(e.consume(m),h):n(m)}}const WT={partial:!0,tokenize:mZ},YT={concrete:!0,name:"codeFenced",tokenize:hZ};function hZ(e,t,n){const r=this,s={partial:!0,tokenize:A};let a=0,l=0,c;return d;function d(N){return p(N)}function p(N){const I=r.events[r.events.length-1];return a=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===c?(l++,e.consume(N),h):l<3?n(N):(e.exit("codeFencedFenceSequence"),jt(N)?qt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||ct(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(WT,S,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||ct(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):jt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qt(e,y,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),g)}function y(N){return N===null||ct(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(N))}function k(N){return N===null||ct(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),k)}function S(N){return e.attempt(s,C,T)(N)}function T(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),E}function E(N){return a>0&&jt(N)?qt(e,R,"linePrefix",a+1)(N):R(N)}function R(N){return N===null||ct(N)?e.check(WT,S,C)(N):(e.enter("codeFlowValue"),_(N))}function _(N){return N===null||ct(N)?(e.exit("codeFlowValue"),R(N)):(e.consume(N),_)}function C(N){return e.exit("codeFenced"),t(N)}function A(N,I,$){let H=0;return L;function L(j){return N.enter("lineEnding"),N.consume(j),N.exit("lineEnding"),Z}function Z(j){return N.enter("codeFencedFence"),jt(j)?qt(N,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):K(j)}function K(j){return j===c?(N.enter("codeFencedFenceSequence"),q(j)):$(j)}function q(j){return j===c?(H++,N.consume(j),q):H>=l?(N.exit("codeFencedFenceSequence"),jt(j)?qt(N,z,"whitespace")(j):z(j)):$(j)}function z(j){return j===null||ct(j)?(N.exit("codeFencedFence"),I(j)):$(j)}}}function mZ(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Yb={name:"codeIndented",tokenize:bZ},gZ={partial:!0,tokenize:yZ};function bZ(e,t,n){const r=this;return s;function s(p){return e.enter("codeIndented"),qt(e,a,"linePrefix",5)(p)}function a(p){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?d(p):ct(p)?e.attempt(gZ,l,d)(p):(e.enter("codeFlowValue"),c(p))}function c(p){return p===null||ct(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),c)}function d(p){return e.exit("codeIndented"),t(p)}}function yZ(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):ct(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):qt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):ct(l)?s(l):n(l)}}const vZ={name:"codeText",previous:kZ,resolve:xZ,tokenize:SZ};function xZ(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function kZ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function SZ(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):ct(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||ct(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),p)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",p(m))}}class wZ{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Uu(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Uu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Uu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Uu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Uu(this.left,n.reverse())}}}function Uu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ZO(e){const t={};let n=-1,r,s,a,l,c,d,p;const h=new wZ(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,EZ(h,n)),n=t[n],p=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return Xr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!p}function EZ(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],p={};let h,m,g=-1,y=n,k=0,S=0;const T=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(S=g+1,T.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):T.pop(),g=T.length;g--;){const E=c.slice(T[g],T[g+1]),R=a.pop();d.push([R,R+E.length-1]),e.splice(R,2,E)}for(d.reverse(),g=-1;++g<d.length;)p[k+d[g][0]]=k+d[g][1],k+=d[g][1]-d[g][0]-1;return p}const TZ={resolve:RZ,tokenize:CZ},_Z={partial:!0,tokenize:AZ};function RZ(e){return ZO(e),e}function CZ(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):ct(c)?e.check(_Z,l,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function AZ(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),qt(e,a,"linePrefix")}function a(l){if(l===null||ct(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function WO(e,t,n,r,s,a,l,c,d){const p=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(E){return E===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(E),e.exit(a),g):E===null||E===32||E===41||Xp(E)?n(E):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(E))}function g(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===62?(e.exit("chunkString"),e.exit(c),g(E)):E===null||E===60||ct(E)?n(E):(e.consume(E),E===92?k:y)}function k(E){return E===60||E===62||E===92?(e.consume(E),y):y(E)}function S(E){return!h&&(E===null||E===41||un(E))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(E)):h<p&&E===40?(e.consume(E),h++,S):E===41?(e.consume(E),h--,S):E===null||E===32||E===40||Xp(E)?n(E):(e.consume(E),E===92?T:S)}function T(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function YO(e,t,n,r,s,a){const l=this;let c=0,d;return p;function p(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):ct(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||ct(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),d||(d=!jt(y)),y===92?g:m)}function g(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function XO(e,t,n,r,s,a){let l;return c;function c(g){return g===34||g===39||g===40?(e.enter(r),e.enter(s),e.consume(g),e.exit(s),l=g===40?41:g,d):n(g)}function d(g){return g===l?(e.enter(s),e.consume(g),e.exit(s),e.exit(r),t):(e.enter(a),p(g))}function p(g){return g===l?(e.exit(a),d(l)):g===null?n(g):ct(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),qt(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===l||g===null||ct(g)?(e.exit("chunkString"),p(g)):(e.consume(g),g===92?m:h)}function m(g){return g===l||g===92?(e.consume(g),h):h(g)}}function oc(e,t){let n;return r;function r(s){return ct(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):jt(s)?qt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const NZ={name:"definition",tokenize:MZ},OZ={partial:!0,tokenize:IZ};function MZ(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return YO.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return un(y)?oc(e,p)(y):p(y)}function p(y){return WO(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(OZ,m,m)(y)}function m(y){return jt(y)?qt(e,g,"whitespace")(y):g(y)}function g(y){return y===null||ct(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function IZ(e,t,n){return r;function r(c){return un(c)?oc(e,s)(c):n(c)}function s(c){return XO(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return jt(c)?qt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ct(c)?t(c):n(c)}}const DZ={name:"hardBreakEscape",tokenize:zZ};function zZ(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return ct(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const LZ={name:"headingAtx",resolve:jZ,tokenize:PZ};function jZ(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xr(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function PZ(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||un(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||ct(h)?(e.exit("atxHeading"),t(h)):jt(h)?qt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),p(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function p(h){return h===null||h===35||un(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),p)}}const $Z=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],XT=["pre","script","style","textarea"],BZ={concrete:!0,name:"htmlFlow",resolveTo:qZ,tokenize:HZ},FZ={partial:!0,tokenize:VZ},UZ={partial:!0,tokenize:GZ};function qZ(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function HZ(e,t,n){const r=this;let s,a,l,c,d;return p;function p(O){return h(O)}function h(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),g):O===47?(e.consume(O),a=!0,S):O===63?(e.consume(O),s=3,r.interrupt?t:D):Sr(O)?(e.consume(O),l=String.fromCharCode(O),T):n(O)}function g(O){return O===45?(e.consume(O),s=2,y):O===91?(e.consume(O),s=5,c=0,k):Sr(O)?(e.consume(O),s=4,r.interrupt?t:D):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:D):n(O)}function k(O){const ie="CDATA[";return O===ie.charCodeAt(c++)?(e.consume(O),c===ie.length?r.interrupt?t:K:k):n(O)}function S(O){return Sr(O)?(e.consume(O),l=String.fromCharCode(O),T):n(O)}function T(O){if(O===null||O===47||O===62||un(O)){const ie=O===47,te=l.toLowerCase();return!ie&&!a&&XT.includes(te)?(s=1,r.interrupt?t(O):K(O)):$Z.includes(l.toLowerCase())?(s=6,ie?(e.consume(O),E):r.interrupt?t(O):K(O)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?R(O):_(O))}return O===45||mr(O)?(e.consume(O),l+=String.fromCharCode(O),T):n(O)}function E(O){return O===62?(e.consume(O),r.interrupt?t:K):n(O)}function R(O){return jt(O)?(e.consume(O),R):L(O)}function _(O){return O===47?(e.consume(O),L):O===58||O===95||Sr(O)?(e.consume(O),C):jt(O)?(e.consume(O),_):L(O)}function C(O){return O===45||O===46||O===58||O===95||mr(O)?(e.consume(O),C):A(O)}function A(O){return O===61?(e.consume(O),N):jt(O)?(e.consume(O),A):_(O)}function N(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,I):jt(O)?(e.consume(O),N):$(O)}function I(O){return O===d?(e.consume(O),d=null,H):O===null||ct(O)?n(O):(e.consume(O),I)}function $(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||un(O)?A(O):(e.consume(O),$)}function H(O){return O===47||O===62||jt(O)?_(O):n(O)}function L(O){return O===62?(e.consume(O),Z):n(O)}function Z(O){return O===null||ct(O)?K(O):jt(O)?(e.consume(O),Z):n(O)}function K(O){return O===45&&s===2?(e.consume(O),F):O===60&&s===1?(e.consume(O),U):O===62&&s===4?(e.consume(O),B):O===63&&s===3?(e.consume(O),D):O===93&&s===5?(e.consume(O),W):ct(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(FZ,G,q)(O)):O===null||ct(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),K)}function q(O){return e.check(UZ,z,G)(O)}function z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),j}function j(O){return O===null||ct(O)?q(O):(e.enter("htmlFlowData"),K(O))}function F(O){return O===45?(e.consume(O),D):K(O)}function U(O){return O===47?(e.consume(O),l="",P):K(O)}function P(O){if(O===62){const ie=l.toLowerCase();return XT.includes(ie)?(e.consume(O),B):K(O)}return Sr(O)&&l.length<8?(e.consume(O),l+=String.fromCharCode(O),P):K(O)}function W(O){return O===93?(e.consume(O),D):K(O)}function D(O){return O===62?(e.consume(O),B):O===45&&s===2?(e.consume(O),D):K(O)}function B(O){return O===null||ct(O)?(e.exit("htmlFlowData"),G(O)):(e.consume(O),B)}function G(O){return e.exit("htmlFlow"),t(O)}}function GZ(e,t,n){const r=this;return s;function s(l){return ct(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function VZ(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(tf,t,n)}}const KZ={name:"htmlText",tokenize:ZZ};function ZZ(e,t,n){const r=this;let s,a,l;return c;function c(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),d}function d(D){return D===33?(e.consume(D),p):D===47?(e.consume(D),A):D===63?(e.consume(D),_):Sr(D)?(e.consume(D),$):n(D)}function p(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,k):Sr(D)?(e.consume(D),R):n(D)}function h(D){return D===45?(e.consume(D),y):n(D)}function m(D){return D===null?n(D):D===45?(e.consume(D),g):ct(D)?(l=m,U(D)):(e.consume(D),m)}function g(D){return D===45?(e.consume(D),y):m(D)}function y(D){return D===62?F(D):D===45?g(D):m(D)}function k(D){const B="CDATA[";return D===B.charCodeAt(a++)?(e.consume(D),a===B.length?S:k):n(D)}function S(D){return D===null?n(D):D===93?(e.consume(D),T):ct(D)?(l=S,U(D)):(e.consume(D),S)}function T(D){return D===93?(e.consume(D),E):S(D)}function E(D){return D===62?F(D):D===93?(e.consume(D),E):S(D)}function R(D){return D===null||D===62?F(D):ct(D)?(l=R,U(D)):(e.consume(D),R)}function _(D){return D===null?n(D):D===63?(e.consume(D),C):ct(D)?(l=_,U(D)):(e.consume(D),_)}function C(D){return D===62?F(D):_(D)}function A(D){return Sr(D)?(e.consume(D),N):n(D)}function N(D){return D===45||mr(D)?(e.consume(D),N):I(D)}function I(D){return ct(D)?(l=I,U(D)):jt(D)?(e.consume(D),I):F(D)}function $(D){return D===45||mr(D)?(e.consume(D),$):D===47||D===62||un(D)?H(D):n(D)}function H(D){return D===47?(e.consume(D),F):D===58||D===95||Sr(D)?(e.consume(D),L):ct(D)?(l=H,U(D)):jt(D)?(e.consume(D),H):F(D)}function L(D){return D===45||D===46||D===58||D===95||mr(D)?(e.consume(D),L):Z(D)}function Z(D){return D===61?(e.consume(D),K):ct(D)?(l=Z,U(D)):jt(D)?(e.consume(D),Z):H(D)}function K(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),s=D,q):ct(D)?(l=K,U(D)):jt(D)?(e.consume(D),K):(e.consume(D),z)}function q(D){return D===s?(e.consume(D),s=void 0,j):D===null?n(D):ct(D)?(l=q,U(D)):(e.consume(D),q)}function z(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||un(D)?H(D):(e.consume(D),z)}function j(D){return D===47||D===62||un(D)?H(D):n(D)}function F(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function U(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),P}function P(D){return jt(D)?qt(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):W(D)}function W(D){return e.enter("htmlTextData"),l(D)}}const $x={name:"labelEnd",resolveAll:QZ,resolveTo:JZ,tokenize:eW},WZ={tokenize:tW},YZ={tokenize:nW},XZ={tokenize:rW};function QZ(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Xr(e,0,e.length,n),e}function JZ(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",p,t]],c=ci(c,e.slice(a+1,a+r+3)),c=ci(c,[["enter",h,t]]),c=ci(c,Gh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=ci(c,[["exit",h,t],e[l-2],e[l-1],["exit",p,t]]),c=ci(c,e.slice(l+1)),c=ci(c,[["exit",d,t]]),Xr(e,a,e.length,c),e}function eW(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(g){return a?a._inactive?m(g):(l=r.parser.defined.includes(Ei(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(WZ,h,l?h:m)(g):g===91?e.attempt(YZ,h,l?p:m)(g):l?h(g):m(g)}function p(g){return e.attempt(XZ,h,m)(g)}function h(g){return t(g)}function m(g){return a._balanced=!0,n(g)}}function tW(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return un(m)?oc(e,a)(m):a(m)}function a(m){return m===41?h(m):WO(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return un(m)?oc(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?XO(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function p(m){return un(m)?oc(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function nW(e,t,n){const r=this;return s;function s(c){return YO.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function rW(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const iW={name:"labelStartImage",resolveAll:$x.resolveAll,tokenize:sW};function sW(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const oW={name:"labelStartLink",resolveAll:$x.resolveAll,tokenize:aW};function aW(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Xb={name:"lineEnding",tokenize:lW};function lW(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),qt(e,t,"linePrefix")}}const yp={name:"thematicBreak",tokenize:uW};function uW(e,t,n){let r=0,s;return a;function a(p){return e.enter("thematicBreak"),l(p)}function l(p){return s=p,c(p)}function c(p){return p===s?(e.enter("thematicBreakSequence"),d(p)):r>=3&&(p===null||ct(p))?(e.exit("thematicBreak"),t(p)):n(p)}function d(p){return p===s?(e.consume(p),r++,d):(e.exit("thematicBreakSequence"),jt(p)?qt(e,c,"whitespace")(p):c(p))}}const Ir={continuation:{tokenize:pW},exit:mW,name:"list",tokenize:dW},cW={partial:!0,tokenize:gW},fW={partial:!0,tokenize:hW};function dW(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(y){const k=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:av(y)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(yp,n,p)(y):p(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return av(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):n(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(tf,r.interrupt?n:h,e.attempt(cW,g,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,g(y)}function m(y){return jt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function pW(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!jt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fW,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,qt(e,e.attempt(Ir,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function hW(e,t,n){const r=this;return qt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function mW(e){e.exit(this.containerState.type)}function gW(e,t,n){const r=this;return qt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!jt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const QT={name:"setextUnderline",resolveTo:bW,tokenize:yW};function bW(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function yW(e,t,n){const r=this;let s;return a;function a(p){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===s?(e.consume(p),c):(e.exit("setextHeadingLineSequence"),jt(p)?qt(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||ct(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const vW={tokenize:xW};function xW(e){const t=this,n=e.attempt(tf,r,e.attempt(this.parser.constructs.flowInitial,s,qt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(TZ,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const kW={resolveAll:JO()},SW=QO("string"),wW=QO("text");function QO(e){return{resolveAll:JO(e==="text"?EW:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return p(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return p(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function p(h){if(h===null)return!0;const m=s[h];let g=-1;if(m)for(;++g<m.length;){const y=m[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function JO(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function EW(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,c=0,d;for(;a--;){const p=s[a];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(p===-2)d=!0,c++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const p={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const TW={42:Ir,43:Ir,45:Ir,48:Ir,49:Ir,50:Ir,51:Ir,52:Ir,53:Ir,54:Ir,55:Ir,56:Ir,57:Ir,62:GO},_W={91:NZ},RW={[-2]:Yb,[-1]:Yb,32:Yb},CW={35:LZ,42:yp,45:[QT,yp],60:BZ,61:QT,95:yp,96:YT,126:YT},AW={38:KO,92:VO},NW={[-5]:Xb,[-4]:Xb,[-3]:Xb,33:iW,38:KO,42:lv,60:[oZ,KZ],91:oW,92:[DZ,VO],93:$x,95:lv,96:vZ},OW={null:[lv,kW]},MW={null:[42,95]},IW={null:[]},DW=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MW,contentInitial:_W,disable:IW,document:TW,flow:CW,flowInitial:RW,insideSpan:OW,string:AW,text:NW},Symbol.toStringTag,{value:"Module"}));function zW(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let l=[],c=[];const d={attempt:I(A),check:I(N),consume:R,enter:_,exit:C,interrupt:I(N,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:m};let h=t.tokenize.call(p,d);return t.resolveAll&&a.push(t),p;function m(Z){return l=ci(l,Z),T(),l[l.length-1]!==null?[]:($(t,0),p.events=Gh(a,p.events,p),p.events)}function g(Z,K){return jW(y(Z),K)}function y(Z){return LW(l,Z)}function k(){const{_bufferIndex:Z,_index:K,line:q,column:z,offset:j}=r;return{_bufferIndex:Z,_index:K,line:q,column:z,offset:j}}function S(Z){s[Z.line]=Z.column,L()}function T(){let Z;for(;r._index<l.length;){const K=l[r._index];if(typeof K=="string")for(Z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Z&&r._bufferIndex<K.length;)E(K.charCodeAt(r._bufferIndex));else E(K)}}function E(Z){h=h(Z)}function R(Z){ct(Z)?(r.line++,r.column=1,r.offset+=Z===-3?2:1,L()):Z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=Z}function _(Z,K){const q=K||{};return q.type=Z,q.start=k(),p.events.push(["enter",q,p]),c.push(q),q}function C(Z){const K=c.pop();return K.end=k(),p.events.push(["exit",K,p]),K}function A(Z,K){$(Z,K.from)}function N(Z,K){K.restore()}function I(Z,K){return q;function q(z,j,F){let U,P,W,D;return Array.isArray(z)?G(z):"tokenize"in z?G([z]):B(z);function B(ne){return le;function le(pe){const ye=pe!==null&&ne[pe],Se=pe!==null&&ne.null,ze=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return G(ze)(pe)}}function G(ne){return U=ne,P=0,ne.length===0?F:O(ne[P])}function O(ne){return le;function le(pe){return D=H(),W=ne,ne.partial||(p.currentConstruct=ne),ne.name&&p.parser.constructs.disable.null.includes(ne.name)?te():ne.tokenize.call(K?Object.assign(Object.create(p),K):p,d,ie,te)(pe)}}function ie(ne){return Z(W,D),j}function te(ne){return D.restore(),++P<U.length?O(U[P]):F}}}function $(Z,K){Z.resolveAll&&!a.includes(Z)&&a.push(Z),Z.resolve&&Xr(p.events,K,p.events.length-K,Z.resolve(p.events.slice(K),p)),Z.resolveTo&&(p.events=Z.resolveTo(p.events,p))}function H(){const Z=k(),K=p.previous,q=p.currentConstruct,z=p.events.length,j=Array.from(c);return{from:z,restore:F};function F(){r=Z,p.previous=K,p.currentConstruct=q,p.events.length=z,c=j,L()}}function L(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function LW(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function jW(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
41
+ `;break}case-3:{l=`\r
42
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}function PW(e){const r={constructs:qO([DW,...(e||{}).extensions||[]]),content:s(JK),defined:[],document:s(tZ),flow:s(vW),lazy:{},string:s(SW),text:s(wW)};return r;function s(a){return l;function l(c){return zW(r,a,c)}}}function $W(e){for(;!ZO(e););return e}const JT=/[\0\t\n\r]/g;function BW(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const d=[];let p,h,m,g,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(JT.lastIndex=m,p=JT.exec(a),g=p&&p.index!==void 0?p.index:a.length,y=a.charCodeAt(g),!p){t=a.slice(m);break}if(y===10&&m===g&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<g&&(d.push(a.slice(m,g)),e+=g-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const FW=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UW(e){return e.replace(FW,qW)}function qW(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return HO(n.slice(a?2:1),a?16:10)}return Px(n)||e}const eM={}.hasOwnProperty;function HW(e,t,n){return typeof t!="string"&&(n=t,t=void 0),GW(n)($W(PW(n).document().write(BW()(e,t,!0))))}function GW(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ce),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(Oe),blockQuote:a(Se),characterEscape:H,characterReference:H,codeFenced:a(ze),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(ze,l),codeText:a(he,l),codeTextData:H,data:H,codeFlowValue:H,definition:a(Te),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Re),hardBreakEscape:a(ve),hardBreakTrailing:a(ve),htmlFlow:a(xe,l),htmlFlowData:H,htmlText:a(xe,l),htmlTextData:H,image:a(Me),label:l,link:a(Ce),listItem:a(ge),listItemValue:g,listOrdered:a(Pe,m),listUnordered:a(Pe),paragraph:a(ce),reference:O,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Oe),strong:a(oe),thematicBreak:a(_e)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:ye,autolinkProtocol:pe,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ne,characterReference:le,codeFenced:d(T),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:L,codeIndented:d(E),codeText:d(j),codeTextData:L,data:L,definition:d(),definitionDestinationString:C,definitionLabelString:R,definitionTitleString:_,emphasis:d(),hardBreakEscape:d(K),hardBreakTrailing:d(K),htmlFlow:d(q),htmlFlowData:L,htmlText:d(z),htmlTextData:L,image:d(U),label:W,labelText:P,lineEnding:Z,link:d(F),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ie,resourceDestinationString:D,resourceTitleString:B,resource:G,setextHeading:d($),setextHeadingLineSequence:I,setextHeadingText:N,strong:d(),thematicBreak:d()}};tM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let fe={type:"root",children:[]};const Ie={stack:[fe],tokenStack:[],config:t,enter:c,exit:p,buffer:l,resume:h,data:n},Ue=[];let Ze=-1;for(;++Ze<J.length;)if(J[Ze][1].type==="listOrdered"||J[Ze][1].type==="listUnordered")if(J[Ze][0]==="enter")Ue.push(Ze);else{const Ye=Ue.pop();Ze=s(J,Ye,Ze)}for(Ze=-1;++Ze<J.length;){const Ye=t[J[Ze][0]];eM.call(Ye,J[Ze][1].type)&&Ye[J[Ze][1].type].call(Object.assign({sliceSerialize:J[Ze][2].sliceSerialize},Ie),J[Ze][1])}if(Ie.tokenStack.length>0){const Ye=Ie.tokenStack[Ie.tokenStack.length-1];(Ye[1]||e_).call(Ie,void 0,Ye[0])}for(fe.position={start:to(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:to(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)fe=t.transforms[Ze](fe)||fe;return fe}function s(J,fe,Ie){let Ue=fe-1,Ze=-1,Ye=!1,ot,it,nt,vt;for(;++Ue<=Ie;){const st=J[Ue];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?Ze++:Ze--,vt=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(ot&&!vt&&!Ze&&!nt&&(nt=Ue),vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vt=void 0}if(!Ze&&st[0]==="enter"&&st[1].type==="listItemPrefix"||Ze===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(ot){let xt=Ue;for(it=void 0;xt--;){const We=J[xt];if(We[1].type==="lineEnding"||We[1].type==="lineEndingBlank"){if(We[0]==="exit")continue;it&&(J[it][1].type="lineEndingBlank",Ye=!0),We[1].type="lineEnding",it=xt}else if(!(We[1].type==="linePrefix"||We[1].type==="blockQuotePrefix"||We[1].type==="blockQuotePrefixWhitespace"||We[1].type==="blockQuoteMarker"||We[1].type==="listItemIndent"))break}nt&&(!it||nt<it)&&(ot._spread=!0),ot.end=Object.assign({},it?J[it][1].start:st[1].end),J.splice(it||Ue,0,["exit",ot,st[2]]),Ue++,Ie++}if(st[1].type==="listItemPrefix"){const xt={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};ot=xt,J.splice(Ue,0,["enter",xt,st[2]]),Ue++,Ie++,nt=void 0,vt=!0}}}return J[fe][1]._spread=Ye,Ie}function a(J,fe){return Ie;function Ie(Ue){c.call(this,J(Ue),Ue),fe&&fe.call(this,Ue)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(J,fe,Ie){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([fe,Ie||void 0]),J.position={start:to(fe.start),end:void 0}}function d(J){return fe;function fe(Ie){J&&J.call(this,Ie),p.call(this,Ie)}}function p(J,fe){const Ie=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==J.type&&(fe?fe.call(this,J,Ue[0]):(Ue[1]||e_).call(this,J,Ue[0]));else throw new Error("Cannot close `"+J.type+"` ("+sc({start:J.start,end:J.end})+"): it’s not open");Ie.position.end=to(J.end)}function h(){return jx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(J){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=J}function k(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.value=J.replace(/(\r?\n|\r)$/g,"")}function R(J){const fe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=fe,Ie.identifier=Ei(this.sliceSerialize(J)).toLowerCase()}function _(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.title=J}function C(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.url=J}function A(J){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ie=this.sliceSerialize(J).length;fe.depth=Ie}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function I(J){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function H(J){const Ie=this.stack[this.stack.length-1].children;let Ue=Ie[Ie.length-1];(!Ue||Ue.type!=="text")&&(Ue=re(),Ue.position={start:to(J.start),end:void 0},Ie.push(Ue)),this.stack.push(Ue)}function L(J){const fe=this.stack.pop();fe.value+=this.sliceSerialize(J),fe.position.end=to(J.end)}function Z(J){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=fe.children[fe.children.length-1];Ie.position.end=to(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(H.call(this,J),L.call(this,J))}function K(){this.data.atHardBreak=!0}function q(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.value=J}function z(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.value=J}function j(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.value=J}function F(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=fe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function U(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=fe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function P(J){const fe=this.sliceSerialize(J),Ie=this.stack[this.stack.length-2];Ie.label=UW(fe),Ie.identifier=Ei(fe).toLowerCase()}function W(){const J=this.stack[this.stack.length-1],fe=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const Ue=J.children;Ie.children=Ue}else Ie.alt=fe}function D(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.url=J}function B(){const J=this.resume(),fe=this.stack[this.stack.length-1];fe.title=J}function G(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ie(J){const fe=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=fe,Ie.identifier=Ei(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function te(J){this.data.characterReferenceType=J.type}function ne(J){const fe=this.sliceSerialize(J),Ie=this.data.characterReferenceType;let Ue;Ie?(Ue=HO(fe,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=Px(fe);const Ze=this.stack[this.stack.length-1];Ze.value+=Ue}function le(J){const fe=this.stack.pop();fe.position.end=to(J.end)}function pe(J){L.call(this,J);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(J)}function ye(J){L.call(this,J);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(J)}function Se(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function he(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function ve(){return{type:"break"}}function xe(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function Ce(){return{type:"link",title:null,url:"",children:[]}}function Pe(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function ge(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function ce(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function to(e){return{line:e.line,column:e.column,offset:e.offset}}function tM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tM(e,r):VW(e,r)}}function VW(e,t){let n;for(n in t)if(eM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function e_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+sc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+sc({start:t.start,end:t.end})+") is still open")}function KW(e){const t=this;t.parser=n;function n(r){return HW(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZW(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function WW(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
43
+ `}]}function YW(e,t){const n=t.value?t.value+`
44
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function XW(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QW(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JW(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Dl(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,p),e.applyData(t,p)}function eY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function nM(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function nY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nM(e,t);const s={src:Dl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function rY(e,t){const n={src:Dl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function sY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nM(e,t);const s={href:Dl(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function oY(e,t){const n={href:Dl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aY(e,t,n){const r=e.all(t),s=n?lY(n):rM(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const h=r[c];(s||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
45
+ `}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
46
+ `});const p={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,p),e.applyData(t,p)}function lY(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rM(n[r])}return t}function rM(e){const t=e.spread;return t??e.children.length>1}function uY(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function cY(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fY(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dY(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pY(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Ix(t.children[1]),d=LO(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function hY(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const p=[];for(;++d<c;){const m=t.children[d],g={},y=l?l[d]:void 0;y&&(g.align=y);let k={type:"element",tagName:a,properties:g,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),p.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,h),e.applyData(t,h)}function mY(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const t_=9,n_=32;function gY(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(r_(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(r_(t.slice(s),s>0,!1)),a.join("")}function r_(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===t_||a===n_;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===t_||a===n_;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function bY(e,t){const n={type:"text",value:gY(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yY(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const vY={blockquote:ZW,break:WW,code:YW,delete:XW,emphasis:QW,footnoteReference:JW,heading:eY,html:tY,imageReference:nY,image:rY,inlineCode:iY,linkReference:sY,link:oY,listItem:aY,list:uY,paragraph:cY,root:fY,strong:dY,table:pY,tableCell:mY,tableRow:hY,text:bY,thematicBreak:yY,toml:ep,yaml:ep,definition:ep,footnoteDefinition:ep};function ep(){}const iM=-1,Vh=0,ac=1,Qp=2,Bx=3,Fx=4,Ux=5,qx=6,sM=7,oM=8,i_=typeof self=="object"?self:globalThis,xY=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case Vh:case iM:return n(l,s);case ac:{const c=n([],s);for(const d of l)c.push(r(d));return c}case Qp:{const c=n({},s);for(const[d,p]of l)c[r(d)]=r(p);return c}case Bx:return n(new Date(l),s);case Fx:{const{source:c,flags:d}=l;return n(new RegExp(c,d),s)}case Ux:{const c=n(new Map,s);for(const[d,p]of l)c.set(r(d),r(p));return c}case qx:{const c=n(new Set,s);for(const d of l)c.add(r(d));return c}case sM:{const{name:c,message:d}=l;return n(new i_[c](d),s)}case oM:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new i_[a](l),s)};return r},s_=e=>xY(new Map,e)(0),Qa="",{toString:kY}={},{keys:SY}=Object,qu=e=>{const t=typeof e;if(t!=="object"||!e)return[Vh,t];const n=kY.call(e).slice(8,-1);switch(n){case"Array":return[ac,Qa];case"Object":return[Qp,Qa];case"Date":return[Bx,Qa];case"RegExp":return[Fx,Qa];case"Map":return[Ux,Qa];case"Set":return[qx,Qa];case"DataView":return[ac,n]}return n.includes("Array")?[ac,n]:n.includes("Error")?[sM,n]:[Qp,n]},tp=([e,t])=>e===Vh&&(t==="function"||t==="symbol"),wY=(e,t,n,r)=>{const s=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=qu(l);switch(c){case Vh:{let h=l;switch(d){case"bigint":c=oM,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([iM],l)}return s([c,h],l)}case ac:{if(d){let g=l;return d==="DataView"?g=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(g=new Uint8Array(l)),s([d,[...g]],l)}const h=[],m=s([c,h],l);for(const g of l)h.push(a(g));return m}case Qp:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const g of SY(l))(e||!tp(qu(l[g])))&&h.push([a(g),a(l[g])]);return m}case Bx:return s([c,l.toISOString()],l);case Fx:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case Ux:{const h=[],m=s([c,h],l);for(const[g,y]of l)(e||!(tp(qu(g))||tp(qu(y))))&&h.push([a(g),a(y)]);return m}case qx:{const h=[],m=s([c,h],l);for(const g of l)(e||!tp(qu(g)))&&h.push(a(g));return m}}const{message:p}=l;return s([c,{name:d,message:p}],l)};return a},o_=(e,{json:t,lossy:n}={})=>{const r=[];return wY(!(t||n),!!t,new Map,r)(e),r},Jp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?s_(o_(e,t)):structuredClone(e):(e,t)=>s_(o_(e,t));function EY(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function TY(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _Y(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||EY,r=e.options.footnoteBackLabel||TY,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const h=e.all(p),m=String(p.identifier).toUpperCase(),g=Dl(m.toLowerCase());let y=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){k.length>0&&k.push({type:"text",value:" "});let R=typeof n=="string"?n:n(d,y);typeof R=="string"&&(R={type:"text",value:R}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const T=h[h.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const R=T.children[T.children.length-1];R&&R.type==="text"?R.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else h.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(p,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Jp(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
47
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
48
+ `}]}}const nf=(function(e){if(e==null)return NY;if(typeof e=="function")return Kh(e);if(typeof e=="object")return Array.isArray(e)?RY(e):CY(e);if(typeof e=="string")return AY(e);throw new Error("Expected function, string, or object as test")});function RY(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nf(e[n]);return Kh(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function CY(e){const t=e;return Kh(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function AY(e){return Kh(t);function t(n){return n&&n.type===e}}function Kh(e){return t;function t(n,r,s){return!!(OY(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function NY(){return!0}function OY(e){return e!==null&&typeof e=="object"&&"type"in e}const aM=[],MY=!0,uv=!1,IY="skip";function lM(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=nf(s),l=r?-1:1;c(e,void 0,[])();function c(d,p,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=aM,k,S,T;if((!t||a(d,p,h[h.length-1]||void 0))&&(y=DY(n(d,h)),y[0]===uv))return y;if("children"in d&&d.children){const E=d;if(E.children&&y[0]!==IY)for(S=(r?E.children.length:-1)+l,T=h.concat(E);S>-1&&S<E.children.length;){const R=E.children[S];if(k=c(R,S,T)(),k[0]===uv)return k;S=typeof k[1]=="number"?k[1]:S+l}}return y}}}function DY(e){return Array.isArray(e)?e:typeof e=="number"?[MY,e]:e==null?aM:[e]}function Zh(e,t,n,r){let s,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),lM(e,a,c,s);function c(d,p){const h=p[p.length-1],m=h?h.children.indexOf(d):void 0;return l(d,m,h)}}const cv={}.hasOwnProperty,zY={};function LY(e,t){const n=t||zY,r=new Map,s=new Map,a=new Map,l={...vY,...n.handlers},c={all:p,applyData:PY,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:jY,wrap:BY};return Zh(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,g=String(h.identifier).toUpperCase();m.has(g)||m.set(g,h)}}),c;function d(h,m){const g=h.type,y=c.handlers[g];if(cv.call(c.handlers,g)&&y)return y(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(g)){if("children"in h){const{children:S,...T}=h,E=Jp(T);return E.children=c.all(h),E}return Jp(h)}return(c.options.unknownHandler||$Y)(c,h,m)}function p(h){const m=[];if("children"in h){const g=h.children;let y=-1;for(;++y<g.length;){const k=c.one(g[y],h);if(k){if(y&&g[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=a_(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=a_(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function jY(e,t){e.position&&(t.position=TK(e))}function PY(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Jp(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function $Y(e,t){const n=t.data||{},r="value"in t&&!(cv.call(n,"hProperties")||cv.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BY(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
49
+ `});++r<e.length;)r&&n.push({type:"text",value:`
50
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
51
+ `}),n}function a_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function l_(e,t){const n=LY(e,t),r=n.one(e,void 0),s=_Y(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
52
+ `},s),a}function FY(e,t){return e&&"run"in e?async function(n,r){const s=l_(n,{file:r,...t});await e.run(s,r)}:function(n,r){return l_(n,{file:r,...e||t})}}function u_(e){if(e)throw e}var Qb,c_;function UY(){if(c_)return Qb;c_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var h=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!h&&!m)return!1;var g;for(g in p);return typeof g>"u"||e.call(p,g)},l=function(p,h){n&&h.name==="__proto__"?n(p,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):p[h.name]=h.newValue},c=function(p,h){if(h==="__proto__")if(e.call(p,h)){if(r)return r(p,h).value}else return;return p[h]};return Qb=function d(){var p,h,m,g,y,k,S=arguments[0],T=1,E=arguments.length,R=!1;for(typeof S=="boolean"&&(R=S,S=arguments[1]||{},T=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});T<E;++T)if(p=arguments[T],p!=null)for(h in p)m=c(S,h),g=c(p,h),S!==g&&(R&&g&&(a(g)||(y=s(g)))?(y?(y=!1,k=m&&s(m)?m:[]):k=m&&a(m)?m:{},l(S,{name:h,newValue:d(R,k,g)})):typeof g<"u"&&l(S,{name:h,newValue:g}));return S},Qb}var qY=UY();const Jb=rh(qY);function fv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function HY(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(d,...p){const h=e[++a];let m=-1;if(d){l(d);return}for(;++m<s.length;)(p[m]===null||p[m]===void 0)&&(p[m]=s[m]);s=p,h?GY(h,c)(...p):l(null,...p)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function GY(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(s);try{d=e.apply(this,l)}catch(p){const h=p;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const zi={basename:VY,dirname:KY,extname:ZY,join:WY,sep:"/"};function VY(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rf(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function KY(e){if(rf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function ZY(e){rf(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function WY(...e){let t=-1,n;for(;++t<e.length;)rf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":YY(n)}function YY(e){rf(e);const t=e.codePointAt(0)===47;let n=XY(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function XY(e,t){let n="",r=0,s=-1,a=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function rf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QY={cwd:JY};function JY(){return"/"}function dv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eX(e){if(typeof e=="string")e=new URL(e);else if(!dv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tX(e)}function tX(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const ey=["history","path","basename","stem","extname","dirname"];class uM{constructor(t){let n;t?dv(t)?n={path:t}:typeof t=="string"||nX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QY.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ey.length;){const a=ey[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)ey.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?zi.basename(this.path):void 0}set basename(t){ny(t,"basename"),ty(t,"basename"),this.path=zi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zi.dirname(this.path):void 0}set dirname(t){f_(this.basename,"dirname"),this.path=zi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zi.extname(this.path):void 0}set extname(t){if(ty(t,"extname"),f_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=zi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){dv(t)&&(t=eX(t)),ny(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zi.basename(this.path,this.extname):void 0}set stem(t){ny(t,"stem"),ty(t,"stem"),this.path=zi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new br(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ty(e,t){if(e&&e.includes(zi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zi.sep+"`")}function ny(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function f_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rX=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),iX={}.hasOwnProperty;class Hx extends rX{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=HY()}copy(){const t=new Hx;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jb(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sy("data",this.frozen),this.namespace[t]=n,this):iX.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sy("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=np(t),r=this.parser||this.Parser;return ry("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ry("process",this.parser||this.Parser),iy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=np(t),d=r.parse(c);r.run(d,c,function(h,m,g){if(h||!m||!g)return p(h);const y=m,k=r.stringify(y,g);aX(k)?g.value=k:g.result=k,p(h,g)});function p(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),ry("processSync",this.parser||this.Parser),iy("processSync",this.compiler||this.Compiler),this.process(t,s),p_("processSync","process",n),r;function s(a,l){n=!0,u_(a),r=l}}run(t,n,r){d_(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const d=np(n);s.run(t,d,p);function p(h,m,g){const y=m||t;h?c(h):l?l(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),p_("runSync","run",r),s;function a(l,c){u_(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=np(n),s=this.compiler||this.Compiler;return iy("stringify",s),d_(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(sy("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[h,...m]=p;d(h,m)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(p.plugins),p.settings&&(s.settings=Jb(!0,s.settings,p.settings))}function c(p){let h=-1;if(p!=null)if(Array.isArray(p))for(;++h<p.length;){const m=p[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,h){let m=-1,g=-1;for(;++m<r.length;)if(r[m][0]===p){g=m;break}if(g===-1)r.push([p,...h]);else if(h.length>0){let[y,...k]=h;const S=r[g][1];fv(S)&&fv(y)&&(y=Jb(!0,S,y)),r[g]=[p,y,...k]}}}}const sX=new Hx().freeze();function ry(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function iy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function d_(e){if(!fv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function p_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function np(e){return oX(e)?e:new uM(e)}function oX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aX(e){return typeof e=="string"||lX(e)}function lX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",h_=[],m_={allowDangerousHtml:!0},cX=/^(https?|ircs?|mailto|xmpp)$/i,fX=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dX(e){const t=pX(e),n=hX(e);return mX(t.runSync(t.parse(n),n),e)}function pX(e){const t=e.rehypePlugins||h_,n=e.remarkPlugins||h_,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...m_}:m_;return sX().use(KW).use(n).use(FY,r).use(t)}function hX(e){const t=e.children||"",n=new uM;return typeof t=="string"&&(n.value=t),n}function mX(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||gX;for(const h of fX)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+uX+h.id,void 0);return Zh(e,p),NK(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function p(h,m,g){if(h.type==="raw"&&g&&typeof m=="number")return l?g.children.splice(m,1):g.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in Wb)if(Object.hasOwn(Wb,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],S=Wb[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=d(String(k||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,g)),y&&g&&typeof m=="number")return c&&h.children?g.children.splice(m,1,...h.children):g.children.splice(m,1),m}}}function gX(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||cX.test(e.slice(0,t))?e:""}const g_=(function(e,t,n){const r=nf(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),da=(function(e){if(e==null)return vX;if(typeof e=="string")return yX(e);if(typeof e=="object")return bX(e);if(typeof e=="function")return Gx(e);throw new Error("Expected function, string, or array as `test`")});function bX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=da(e[n]);return Gx(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function yX(e){return Gx(t);function t(n){return n.tagName===e}}function Gx(e){return t;function t(n,r,s){return!!(xX(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function vX(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function xX(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const b_=/\n/g,y_=/[\t ]+/g,pv=da("br"),v_=da(CX),kX=da("p"),x_=da("tr"),SX=da(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",RX,AX]),cM=da(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function wX(e,t){const n=t||{},r="children"in e?e.children:[],s=cM(e),a=pM(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...dM(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...fM(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?pv(r[c+1]):s}));const d=[];let p;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?p!==void 0&&h>p&&(p=h):h&&(p!==void 0&&p>-1&&d.push(`
53
+ `.repeat(p)||" "),p=-1,d.push(h))}return d.join("")}function fM(e,t,n){return e.type==="element"?EX(e,t,n):e.type==="text"?n.whitespace==="normal"?dM(e,n):TX(e):[]}function EX(e,t,n){const r=pM(e,n),s=e.children||[];let a=-1,l=[];if(SX(e))return l;let c,d;for(pv(e)||x_(e)&&g_(t,e,x_)?d=`
54
+ `:kX(e)?(c=2,d=2):cM(e)&&(c=1,d=1);++a<s.length;)l=l.concat(fM(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?pv(s[a+1]):d}));return v_(e)&&g_(t,e,v_)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function dM(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){b_.lastIndex=a;const d=b_.exec(n),p=d&&"index"in d?d.index:n.length;r.push(_X(n.slice(a,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,p===n.length?t.breakAfter:!0)),a=p+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function TX(e){return[String(e.value)]}function _X(e,t,n){const r=[];let s=0,a;for(;s<e.length;){y_.lastIndex=s;const l=y_.exec(e);a=l?l.index:e.length,!s&&!a&&l&&!t&&r.push(""),s!==a&&r.push(e.slice(s,a)),s=l?a+l[0].length:a}return s!==a&&!n&&r.push(""),r.join(" ")}function pM(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function RX(e){return!!(e.properties||{}).hidden}function CX(e){return e.tagName==="td"||e.tagName==="th"}function AX(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function NX(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},A={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[A,m,c,n,e.C_BLOCK_COMMENT_MODE,h,p],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,$,A,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function OX(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=NX(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function MX(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const d={match:/\\"/},p={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},g=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${g.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],T=["true","false"],E={match:/(\/[a-z._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:T,built_in:[...R,..._,"set","shopt",...C,...A]},contains:[y,e.SHEBANG(),k,m,a,l,E,c,d,p,h,n]}}function IX(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",T={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},E=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,p],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:E.concat([{begin:/\(/,end:/\)/,keywords:T,contains:E.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,h,c,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:T,disableAutodetect:!0,illegal:"</",contains:[].concat(R,_,E,[m,{begin:e.IDENT_RE+"::",keywords:T},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:p,keywords:T}}}function DX(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],E=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},A={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[A,m,c,n,e.C_BLOCK_COMMENT_MODE,h,p],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:N.concat([{begin:/\(/,end:/\)/,keywords:C,contains:N.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,$,A,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:C,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function zX(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},p={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),g={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(g,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]},T=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});g.contains=[S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],y.contains=[T,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const E={variants:[p,S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},R={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",C={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},E,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,R,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,R,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,R],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[E,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const LX=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),jX=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],PX=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],$X=[...jX,...PX],BX=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),FX=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),UX=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),qX=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function HX(e){const t=e.regex,n=LX(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+FX.join("|")+")"},{begin:":(:)?("+UX.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+qX.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:BX.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+$X.join("|")+")\\b"}]}}function GX(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function VX(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}function KX(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function ZX(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(d,p,h),g=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:g,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var el="[0-9](_*[0-9])*",rp=`\\.(${el})`,ip="[0-9a-fA-F](_*[0-9a-fA-F])*",k_={className:"number",variants:[{begin:`(\\b(${el})((${rp})|\\.)?|(${rp}))[eE][+-]?(${el})[fFdD]?\\b`},{begin:`\\b(${el})((${rp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${rp})[fFdD]?\\b`},{begin:`\\b(${el})[fFdD]\\b`},{begin:`\\b0[xX]((${ip})\\.?|(${ip})?\\.(${ip}))[pP][+-]?(${el})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ip})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function hM(e,t,n){return n===-1?"":e.replace(t,r=>hM(e,t,n-1))}function WX(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+hM("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},p={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,k_,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k_,p]}}const S_="[A-Za-z$_][0-9A-Za-z$_]*",YX=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],XX=["true","false","null","undefined","NaN","Infinity"],mM=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],gM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],bM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],QX=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],JX=[].concat(bM,mM,gM);function eQ(e){const t=e.regex,n=(P,{after:W})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,W)!==-1},r=S_,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{const D=P[0].length+P.index,B=P.input[D];if(B==="<"||B===","){W.ignoreMatch();return}B===">"&&(n(P,{after:D})||W.ignoreMatch());let G;const O=P.input.substring(D);if(G=O.match(/^\s*=/)){W.ignoreMatch();return}if((G=O.match(/^\s+extends\s+/))&&G.index===0){W.ignoreMatch();return}}},c={$pattern:S_,keyword:YX,literal:XX,built_in:JX,"variable.language":QX},d="[0-9](_?[0-9])*",p=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${p})|\\.)?|(${p}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},R={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,T,{match:/\$\d+/},m];g.contains=_.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(_)});const C=[].concat(R,g.contains),A=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A},I={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...mM,...gM]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(P){return t.concat("(?!",P.join("|"),")")}const q={match:t.concat(/\b/,K([...bM,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},j={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,T,R,{match:/\$\d+/},m,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,Z,I,j,{match:/\$[(.]/}]}}function tQ(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var tl="[0-9](_*[0-9])*",sp=`\\.(${tl})`,op="[0-9a-fA-F](_*[0-9a-fA-F])*",nQ={className:"number",variants:[{begin:`(\\b(${tl})((${sp})|\\.)?|(${sp}))[eE][+-]?(${tl})[fFdD]?\\b`},{begin:`\\b(${tl})((${sp})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${sp})[fFdD]?\\b`},{begin:`\\b(${tl})[fFdD]\\b`},{begin:`\\b0[xX]((${op})\\.?|(${op})?\\.(${op}))[pP][+-]?(${tl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${op})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function rQ(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},p=nQ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},g=m;return g.variants[1].contains=[m],m.variants[1].contains=[g],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,d,l,e.C_NUMBER_MODE]},h]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
55
+ `},p]}}const iQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),sQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],oQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],aQ=[...sQ,...oQ],lQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),yM=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),vM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),uQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),cQ=yM.concat(vM).sort().reverse();function fQ(e){const t=iQ(e),n=cQ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],d=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},p=function(_,C,A){return{className:_,begin:C,relevance:A}},h={$pattern:/[a-z-]+/,keyword:r,attribute:lQ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,p("variable","@@?"+s,10),p("variable","@\\{"+s+"\\}"),p("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const g=c.concat({begin:/\{/,end:/\}/,contains:l}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},k={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+uQ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:h,returnEnd:!0,contains:c,relevance:0}},T={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:g}},E={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,p("keyword","all\\b"),p("variable","@\\{"+s+"\\}"),{begin:"\\b("+aQ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,p("selector-tag",a,0),p("selector-id","#"+a),p("selector-class","\\."+a,0),p("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+yM.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+vM.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:g},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[E]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,T,R,k,E,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function dQ(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function pQ(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,s,a,l]}}function hQ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},p={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(p,{contains:[]}),g=e.inherit(h,{contains:[]});p.contains.push(g),h.contains.push(m);let y=[n,d];return[p,h,m,g].forEach(E=>{E.contains=E.contains.concat(y)}),y=y.concat(p,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,p,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function mQ(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function gQ(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},p={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},h=[e.BACKSLASH_ESCAPE,a,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(S,T,E="\\1")=>{const R=E==="\\1"?E:t.concat(E,T);return t.concat(t.concat("(?:",S,")"),T,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,E,r)},y=(S,T,E)=>t.concat(t.concat("(?:",S,")"),T,/(?:\\.|[^\\\/])*?/,E,r),k=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},p,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:g("s|tr|y",t.either(...m,{capture:!0}))},{begin:g("s|tr|y","\\(","\\)")},{begin:g("s|tr|y","\\[","\\]")},{begin:g("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}function bQ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(z,j)=>{j.data._beginMatch=z[1]||z[2]},"on:end":(z,j)=>{j.data._beginMatch!==z[1]&&j.ignoreMatch()}},g=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
56
+ ]`,k={scope:"string",variants:[h,p,m,g]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},T=["false","null","true"],E=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],R=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:E,literal:(z=>{const j=[];return z.forEach(F=>{j.push(F),F.toLowerCase()===F?j.push(F.toUpperCase()):j.push(F.toLowerCase())}),j})(T),built_in:R},A=z=>z.map(j=>j.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",A(R).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},I=t.concat(r,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},H={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[H,l,$,e.C_BLOCK_COMMENT_MODE,k,S,N]},Z={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",A(E).join("\\b|"),"|",A(R).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(Z);const K=[H,$,e.C_BLOCK_COMMENT_MODE,k,S,N],q={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:T,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:T,keyword:["new","array"]},contains:["self",...K]},...K,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[q,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},c,{scope:"variable.language",match:/\$this\b/},l,Z,$,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:C,contains:["self",q,l,$,e.C_BLOCK_COMMENT_MODE,k,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,S]}}function yQ(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function vQ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function xQ(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,h,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,h,p]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,p]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},g="[0-9](_?[0-9])*",y=`(\\b(${g}))?\\.(${g})|\\b(${g})\\.`,k=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${g})|(${y}))[eE][+-]?(${g})[jJ]?(?=${k})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${g})[jJ](?=${k})`}]},T={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",d,S,m,e.HASH_COMMENT_MODE]}]};return p.contains=[m,S,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,T,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,E,m]}]}}function kQ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function SQ(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function wQ(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},p=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,h]})]}]},g="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${g})(\\.(${y}))?([eE][+-]?(${y})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},N=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,p),relevance:0}].concat(d,p);h.contains=N,S.contains=N;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:N}}];return p.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(p).concat(N)}}function EQ(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],p=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:h,keyword:c,literal:d,built_in:p},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:p,type:h}},{className:"punctuation",begin:"->"},a]}}const TQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),_Q=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],RQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],CQ=[..._Q,...RQ],AQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),NQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),OQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),MQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function IQ(e){const t=TQ(e),n=OQ,r=NQ,s="@[a-z-]+",a="and or not only",c={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+CQ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+MQ.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,c,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:AQ.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function DQ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function zQ(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],p=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],g=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],y=h,k=[...p,...d].filter(A=>!h.includes(A)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},T={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function R(A){return t.concat(/\b/,t.either(...A.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:R(g),relevance:0};function C(A,{exceptions:N,when:I}={}){const $=I;return N=N||[],A.map(H=>H.match(/\|\d+$/)||N.includes(H)?H:$(H)?`${H}|0`:H)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(k,{when:A=>A.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:R(l)},_,E,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,T]}}function xM(e){return e?typeof e=="string"?e:e.source:null}function Hu(e){return sn("(?=",e,")")}function sn(...e){return e.map(n=>xM(n)).join("")}function LQ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function kr(...e){return"("+(LQ(e).capture?"":"?:")+e.map(r=>xM(r)).join("|")+")"}const Vx=e=>sn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),jQ=["Protocol","Type"].map(Vx),w_=["init","self"].map(Vx),PQ=["Any","Self"],oy=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],E_=["false","nil","true"],$Q=["assignment","associativity","higherThan","left","lowerThan","none","right"],BQ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],T_=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],kM=kr(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),SM=kr(kM,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ay=sn(kM,SM,"*"),wM=kr(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),eh=kr(wM,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Di=sn(wM,eh,"*"),ap=sn(/[A-Z]/,eh,"*"),FQ=["attached","autoclosure",sn(/convention\(/,kr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",sn(/objc\(/,Di,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],UQ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function qQ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,kr(...jQ,...w_)],className:{2:"keyword"}},a={match:sn(/\./,kr(...oy)),relevance:0},l=oy.filter(ve=>typeof ve=="string").concat(["_|0"]),c=oy.filter(ve=>typeof ve!="string").concat(PQ).map(Vx),d={variants:[{className:"keyword",match:kr(...c,...w_)}]},p={$pattern:kr(/\b\w+/,/#\w+/),keyword:l.concat(BQ),literal:E_},h=[s,a,d],m={match:sn(/\./,kr(...T_)),relevance:0},g={className:"built_in",match:sn(/\b/,kr(...T_),/(?=\()/)},y=[m,g],k={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:ay},{match:`\\.(\\.|${SM})+`}]},T=[k,S],E="([0-9]_*)+",R="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${E})(\\.(${E}))?([eE][+-]?(${E}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${E}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(ve="")=>({className:"subst",variants:[{match:sn(/\\/,ve,/[0\\tnr"']/)},{match:sn(/\\/,ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),A=(ve="")=>({className:"subst",match:sn(/\\/,ve,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(ve="")=>({className:"subst",label:"interpol",begin:sn(/\\/,ve,/\(/),end:/\)/}),I=(ve="")=>({begin:sn(ve,/"""/),end:sn(/"""/,ve),contains:[C(ve),A(ve),N(ve)]}),$=(ve="")=>({begin:sn(ve,/"/),end:sn(/"/,ve),contains:[C(ve),N(ve)]}),H={className:"string",variants:[I(),I("#"),I("##"),I("###"),$(),$("#"),$("##"),$("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Z={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},K=ve=>{const xe=sn(ve,/\//),Me=sn(/\//,ve);return{begin:xe,end:Me,contains:[...L,{scope:"comment",begin:`#(?!.*${Me})`,end:/$/}]}},q={scope:"regexp",variants:[K("###"),K("##"),K("#"),Z]},z={match:sn(/`/,Di,/`/)},j={className:"variable",match:/\$\d+/},F={className:"variable",match:`\\$${eh}+`},U=[z,j,F],P={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:UQ,contains:[...T,_,H]}]}},W={scope:"keyword",match:sn(/@/,kr(...FQ),Hu(kr(/\(/,/\s+/)))},D={scope:"meta",match:sn(/@/,Di)},B=[P,W,D],G={match:Hu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:sn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,eh,"+")},{className:"type",match:ap,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sn(/\s+&\s+/,Hu(ap)),relevance:0}]},O={begin:/</,end:/>/,keywords:p,contains:[...r,...h,...B,k,G]};G.contains.push(O);const ie={match:sn(Di,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",ie,...r,q,...h,...y,...T,_,H,...U,...B,G]},ne={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,G]},le={begin:kr(Hu(sn(Di,/\s*:/)),Hu(sn(Di,/\s+/,Di,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Di}]},pe={begin:/\(/,end:/\)/,keywords:p,contains:[le,...r,...h,...T,_,H,...B,G,te],endsParent:!0,illegal:/["']/},ye={match:[/(func|macro)/,/\s+/,kr(z.match,Di,ay)],className:{1:"keyword",3:"title.function"},contains:[ne,pe,t],illegal:[/\[/,/%/]},Se={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ne,pe,t],illegal:/\[|%/},ze={match:[/operator/,/\s+/,ay],className:{1:"keyword",3:"title"}},he={begin:[/precedencegroup/,/\s+/,ap],className:{1:"keyword",3:"title"},contains:[G],keywords:[...$Q,...E_],end:/}/},Te={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Re={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Di,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:p,contains:[ne,...h,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:ap},...h],relevance:0}]};for(const ve of H.variants){const xe=ve.contains.find(Ce=>Ce.label==="interpol");xe.keywords=p;const Me=[...h,...y,...T,_,H,...U];xe.contains=[...Me,{begin:/\(/,end:/\)/,contains:["self",...Me]}]}return{name:"Swift",keywords:p,contains:[...r,ye,Se,Te,Re,Oe,ze,he,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},q,...h,...y,...T,_,H,...U,...B,G,te]}}const th="[A-Za-z$_][0-9A-Za-z$_]*",EM=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],TM=["true","false","null","undefined","NaN","Infinity"],_M=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],RM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],CM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],AM=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],NM=[].concat(CM,_M,RM);function HQ(e){const t=e.regex,n=(P,{after:W})=>{const D="</"+P[0].slice(1);return P.input.indexOf(D,W)!==-1},r=th,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,W)=>{const D=P[0].length+P.index,B=P.input[D];if(B==="<"||B===","){W.ignoreMatch();return}B===">"&&(n(P,{after:D})||W.ignoreMatch());let G;const O=P.input.substring(D);if(G=O.match(/^\s*=/)){W.ignoreMatch();return}if((G=O.match(/^\s+extends\s+/))&&G.index===0){W.ignoreMatch();return}}},c={$pattern:th,keyword:EM,literal:TM,built_in:NM,"variable.language":AM},d="[0-9](_?[0-9])*",p=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${p})|\\.)?|(${p}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},R={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,T,{match:/\$\d+/},m];g.contains=_.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(_)});const C=[].concat(R,g.contains),A=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(C)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A},I={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[..._M,...RM]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(P){return t.concat("(?!",P.join("|"),")")}const q={match:t.concat(/\b/,K([...CM,"super","import"].map(P=>`${P}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},j={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},F="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(F)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:A,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,T,R,{match:/\$\d+/},m,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},U,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:F,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:A}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,Z,I,j,{match:/\$[(.]/}]}}function GQ(e){const t=e.regex,n=HQ(e),r=th,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:th,keyword:EM.concat(d),literal:TM,built_in:NM.concat(s),"variable.language":AM},h={className:"meta",begin:"@"+r},m=(S,T,E)=>{const R=S.contains.findIndex(_=>_.label===T);if(R===-1)throw new Error("can not find mode to replace");S.contains.splice(R,1,E)};Object.assign(n.keywords,p),n.exports.PARAMS_CONTAINS.push(h);const g=n.contains.find(S=>S.scope==="attr"),y=Object.assign({},g,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,g,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const k=n.contains.find(S=>S.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function VQ(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},p={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,d,p,h,m,g,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[g]}]}}function KQ(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,d,p,c]}}function ZQ(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,d,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:p}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function WQ(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},c=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),g={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},T=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},g,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,S,a,l],E=[...T];return E.pop(),E.push(c),y.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:T}}const YQ={arduino:OX,bash:MX,c:IX,cpp:DX,csharp:zX,css:HX,diff:GX,go:VX,graphql:KX,ini:ZX,java:WX,javascript:eQ,json:tQ,kotlin:rQ,less:fQ,lua:dQ,makefile:pQ,markdown:hQ,objectivec:mQ,perl:gQ,php:bQ,"php-template":yQ,plaintext:vQ,python:xQ,"python-repl":kQ,r:SQ,ruby:wQ,rust:EQ,scss:IQ,shell:DQ,sql:zQ,swift:qQ,typescript:GQ,vbnet:VQ,wasm:KQ,xml:ZQ,yaml:WQ};var ly,__;function XQ(){if(__)return ly;__=1;function e(Y){return Y instanceof Map?Y.clear=Y.delete=Y.set=function(){throw new Error("map is read-only")}:Y instanceof Set&&(Y.add=Y.clear=Y.delete=function(){throw new Error("set is read-only")}),Object.freeze(Y),Object.getOwnPropertyNames(Y).forEach(X=>{const we=Y[X],Ge=typeof we;(Ge==="object"||Ge==="function")&&!Object.isFrozen(we)&&e(we)}),Y}class t{constructor(X){X.data===void 0&&(X.data={}),this.data=X.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Y){return Y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(Y,...X){const we=Object.create(null);for(const Ge in Y)we[Ge]=Y[Ge];return X.forEach(function(Ge){for(const lt in Ge)we[lt]=Ge[lt]}),we}const s="</span>",a=Y=>!!Y.scope,l=(Y,{prefix:X})=>{if(Y.startsWith("language:"))return Y.replace("language:","language-");if(Y.includes(".")){const we=Y.split(".");return[`${X}${we.shift()}`,...we.map((Ge,lt)=>`${Ge}${"_".repeat(lt+1)}`)].join(" ")}return`${X}${Y}`};class c{constructor(X,we){this.buffer="",this.classPrefix=we.classPrefix,X.walk(this)}addText(X){this.buffer+=n(X)}openNode(X){if(!a(X))return;const we=l(X.scope,{prefix:this.classPrefix});this.span(we)}closeNode(X){a(X)&&(this.buffer+=s)}value(){return this.buffer}span(X){this.buffer+=`<span class="${X}">`}}const d=(Y={})=>{const X={children:[]};return Object.assign(X,Y),X};class p{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(X){this.top.children.push(X)}openNode(X){const we=d({scope:X});this.add(we),this.stack.push(we)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(X){return this.constructor._walk(X,this.rootNode)}static _walk(X,we){return typeof we=="string"?X.addText(we):we.children&&(X.openNode(we),we.children.forEach(Ge=>this._walk(X,Ge)),X.closeNode(we)),X}static _collapse(X){typeof X!="string"&&X.children&&(X.children.every(we=>typeof we=="string")?X.children=[X.children.join("")]:X.children.forEach(we=>{p._collapse(we)}))}}class h extends p{constructor(X){super(),this.options=X}addText(X){X!==""&&this.add(X)}startScope(X){this.openNode(X)}endScope(){this.closeNode()}__addSublanguage(X,we){const Ge=X.root;we&&(Ge.scope=`language:${we}`),this.add(Ge)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(Y){return Y?typeof Y=="string"?Y:Y.source:null}function g(Y){return S("(?=",Y,")")}function y(Y){return S("(?:",Y,")*")}function k(Y){return S("(?:",Y,")?")}function S(...Y){return Y.map(we=>m(we)).join("")}function T(Y){const X=Y[Y.length-1];return typeof X=="object"&&X.constructor===Object?(Y.splice(Y.length-1,1),X):{}}function E(...Y){return"("+(T(Y).capture?"":"?:")+Y.map(Ge=>m(Ge)).join("|")+")"}function R(Y){return new RegExp(Y.toString()+"|").exec("").length-1}function _(Y,X){const we=Y&&Y.exec(X);return we&&we.index===0}const C=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function A(Y,{joinWith:X}){let we=0;return Y.map(Ge=>{we+=1;const lt=we;let St=m(Ge),$e="";for(;St.length>0;){const Le=C.exec(St);if(!Le){$e+=St;break}$e+=St.substring(0,Le.index),St=St.substring(Le.index+Le[0].length),Le[0][0]==="\\"&&Le[1]?$e+="\\"+String(Number(Le[1])+lt):($e+=Le[0],Le[0]==="("&&we++)}return $e}).map(Ge=>`(${Ge})`).join(X)}const N=/\b\B/,I="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",H="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Z="\\b(0b[01]+)",K="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",q=(Y={})=>{const X=/^#![ ]*\//;return Y.binary&&(Y.begin=S(X,/.*\b/,Y.binary,/\b.*/)),r({scope:"meta",begin:X,end:/$/,relevance:0,"on:begin":(we,Ge)=>{we.index!==0&&Ge.ignoreMatch()}},Y)},z={begin:"\\\\[\\s\\S]",relevance:0},j={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[z]},F={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[z]},U={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},P=function(Y,X,we={}){const Ge=r({scope:"comment",begin:Y,end:X,contains:[]},we);Ge.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const lt=E("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ge.contains.push({begin:S(/[ ]+/,"(",lt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ge},W=P("//","$"),D=P("/\\*","\\*/"),B=P("#","$"),G={scope:"number",begin:H,relevance:0},O={scope:"number",begin:L,relevance:0},ie={scope:"number",begin:Z,relevance:0},te={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[z,{begin:/\[/,end:/\]/,relevance:0,contains:[z]}]},ne={scope:"title",begin:I,relevance:0},le={scope:"title",begin:$,relevance:0},pe={begin:"\\.\\s*"+$,relevance:0};var Se=Object.freeze({__proto__:null,APOS_STRING_MODE:j,BACKSLASH_ESCAPE:z,BINARY_NUMBER_MODE:ie,BINARY_NUMBER_RE:Z,COMMENT:P,C_BLOCK_COMMENT_MODE:D,C_LINE_COMMENT_MODE:W,C_NUMBER_MODE:O,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(Y){return Object.assign(Y,{"on:begin":(X,we)=>{we.data._beginMatch=X[1]},"on:end":(X,we)=>{we.data._beginMatch!==X[1]&&we.ignoreMatch()}})},HASH_COMMENT_MODE:B,IDENT_RE:I,MATCH_NOTHING_RE:N,METHOD_GUARD:pe,NUMBER_MODE:G,NUMBER_RE:H,PHRASAL_WORDS_MODE:U,QUOTE_STRING_MODE:F,REGEXP_MODE:te,RE_STARTERS_RE:K,SHEBANG:q,TITLE_MODE:ne,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:le});function ze(Y,X){Y.input[Y.index-1]==="."&&X.ignoreMatch()}function he(Y,X){Y.className!==void 0&&(Y.scope=Y.className,delete Y.className)}function Te(Y,X){X&&Y.beginKeywords&&(Y.begin="\\b("+Y.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Y.__beforeBegin=ze,Y.keywords=Y.keywords||Y.beginKeywords,delete Y.beginKeywords,Y.relevance===void 0&&(Y.relevance=0))}function Re(Y,X){Array.isArray(Y.illegal)&&(Y.illegal=E(...Y.illegal))}function Oe(Y,X){if(Y.match){if(Y.begin||Y.end)throw new Error("begin & end are not supported with match");Y.begin=Y.match,delete Y.match}}function ve(Y,X){Y.relevance===void 0&&(Y.relevance=1)}const xe=(Y,X)=>{if(!Y.beforeMatch)return;if(Y.starts)throw new Error("beforeMatch cannot be used with starts");const we=Object.assign({},Y);Object.keys(Y).forEach(Ge=>{delete Y[Ge]}),Y.keywords=we.keywords,Y.begin=S(we.beforeMatch,g(we.begin)),Y.starts={relevance:0,contains:[Object.assign(we,{endsParent:!0})]},Y.relevance=0,delete we.beforeMatch},Me=["of","and","for","in","not","or","if","then","parent","list","value"],Ce="keyword";function Pe(Y,X,we=Ce){const Ge=Object.create(null);return typeof Y=="string"?lt(we,Y.split(" ")):Array.isArray(Y)?lt(we,Y):Object.keys(Y).forEach(function(St){Object.assign(Ge,Pe(Y[St],X,St))}),Ge;function lt(St,$e){X&&($e=$e.map(Le=>Le.toLowerCase())),$e.forEach(function(Le){const qe=Le.split("|");Ge[qe[0]]=[St,ge(qe[0],qe[1])]})}}function ge(Y,X){return X?Number(X):ce(Y)?0:1}function ce(Y){return Me.includes(Y.toLowerCase())}const oe={},re=Y=>{console.error(Y)},_e=(Y,...X)=>{console.log(`WARN: ${Y}`,...X)},J=(Y,X)=>{oe[`${Y}/${X}`]||(console.log(`Deprecated as of ${Y}. ${X}`),oe[`${Y}/${X}`]=!0)},fe=new Error;function Ie(Y,X,{key:we}){let Ge=0;const lt=Y[we],St={},$e={};for(let Le=1;Le<=X.length;Le++)$e[Le+Ge]=lt[Le],St[Le+Ge]=!0,Ge+=R(X[Le-1]);Y[we]=$e,Y[we]._emit=St,Y[we]._multi=!0}function Ue(Y){if(Array.isArray(Y.begin)){if(Y.skip||Y.excludeBegin||Y.returnBegin)throw re("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof Y.beginScope!="object"||Y.beginScope===null)throw re("beginScope must be object"),fe;Ie(Y,Y.begin,{key:"beginScope"}),Y.begin=A(Y.begin,{joinWith:""})}}function Ze(Y){if(Array.isArray(Y.end)){if(Y.skip||Y.excludeEnd||Y.returnEnd)throw re("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof Y.endScope!="object"||Y.endScope===null)throw re("endScope must be object"),fe;Ie(Y,Y.end,{key:"endScope"}),Y.end=A(Y.end,{joinWith:""})}}function Ye(Y){Y.scope&&typeof Y.scope=="object"&&Y.scope!==null&&(Y.beginScope=Y.scope,delete Y.scope)}function ot(Y){Ye(Y),typeof Y.beginScope=="string"&&(Y.beginScope={_wrap:Y.beginScope}),typeof Y.endScope=="string"&&(Y.endScope={_wrap:Y.endScope}),Ue(Y),Ze(Y)}function it(Y){function X($e,Le){return new RegExp(m($e),"m"+(Y.case_insensitive?"i":"")+(Y.unicodeRegex?"u":"")+(Le?"g":""))}class we{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Le,qe){qe.position=this.position++,this.matchIndexes[this.matchAt]=qe,this.regexes.push([qe,Le]),this.matchAt+=R(Le)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Le=this.regexes.map(qe=>qe[1]);this.matcherRe=X(A(Le,{joinWith:"|"}),!0),this.lastIndex=0}exec(Le){this.matcherRe.lastIndex=this.lastIndex;const qe=this.matcherRe.exec(Le);if(!qe)return null;const Wt=qe.findIndex((Dt,Kn)=>Kn>0&&Dt!==void 0),tt=this.matchIndexes[Wt];return qe.splice(0,Wt),Object.assign(qe,tt)}}class Ge{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Le){if(this.multiRegexes[Le])return this.multiRegexes[Le];const qe=new we;return this.rules.slice(Le).forEach(([Wt,tt])=>qe.addRule(Wt,tt)),qe.compile(),this.multiRegexes[Le]=qe,qe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Le,qe){this.rules.push([Le,qe]),qe.type==="begin"&&this.count++}exec(Le){const qe=this.getMatcher(this.regexIndex);qe.lastIndex=this.lastIndex;let Wt=qe.exec(Le);if(this.resumingScanAtSamePosition()&&!(Wt&&Wt.index===this.lastIndex)){const tt=this.getMatcher(0);tt.lastIndex=this.lastIndex+1,Wt=tt.exec(Le)}return Wt&&(this.regexIndex+=Wt.position+1,this.regexIndex===this.count&&this.considerAll()),Wt}}function lt($e){const Le=new Ge;return $e.contains.forEach(qe=>Le.addRule(qe.begin,{rule:qe,type:"begin"})),$e.terminatorEnd&&Le.addRule($e.terminatorEnd,{type:"end"}),$e.illegal&&Le.addRule($e.illegal,{type:"illegal"}),Le}function St($e,Le){const qe=$e;if($e.isCompiled)return qe;[he,Oe,ot,xe].forEach(tt=>tt($e,Le)),Y.compilerExtensions.forEach(tt=>tt($e,Le)),$e.__beforeBegin=null,[Te,Re,ve].forEach(tt=>tt($e,Le)),$e.isCompiled=!0;let Wt=null;return typeof $e.keywords=="object"&&$e.keywords.$pattern&&($e.keywords=Object.assign({},$e.keywords),Wt=$e.keywords.$pattern,delete $e.keywords.$pattern),Wt=Wt||/\w+/,$e.keywords&&($e.keywords=Pe($e.keywords,Y.case_insensitive)),qe.keywordPatternRe=X(Wt,!0),Le&&($e.begin||($e.begin=/\B|\b/),qe.beginRe=X(qe.begin),!$e.end&&!$e.endsWithParent&&($e.end=/\B|\b/),$e.end&&(qe.endRe=X(qe.end)),qe.terminatorEnd=m(qe.end)||"",$e.endsWithParent&&Le.terminatorEnd&&(qe.terminatorEnd+=($e.end?"|":"")+Le.terminatorEnd)),$e.illegal&&(qe.illegalRe=X($e.illegal)),$e.contains||($e.contains=[]),$e.contains=[].concat(...$e.contains.map(function(tt){return vt(tt==="self"?$e:tt)})),$e.contains.forEach(function(tt){St(tt,qe)}),$e.starts&&St($e.starts,Le),qe.matcher=lt(qe),qe}if(Y.compilerExtensions||(Y.compilerExtensions=[]),Y.contains&&Y.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Y.classNameAliases=r(Y.classNameAliases||{}),St(Y)}function nt(Y){return Y?Y.endsWithParent||nt(Y.starts):!1}function vt(Y){return Y.variants&&!Y.cachedVariants&&(Y.cachedVariants=Y.variants.map(function(X){return r(Y,{variants:null},X)})),Y.cachedVariants?Y.cachedVariants:nt(Y)?r(Y,{starts:Y.starts?r(Y.starts):null}):Object.isFrozen(Y)?r(Y):Y}var st="11.11.1";class xt extends Error{constructor(X,we){super(X),this.name="HTMLInjectionError",this.html=we}}const We=n,Ot=r,Be=Symbol("nomatch"),Ke=7,ht=function(Y){const X=Object.create(null),we=Object.create(null),Ge=[];let lt=!0;const St="Could not find the language '{}', did you forget to load/include a language module?",$e={disableAutodetect:!0,name:"Plain text",contains:[]};let Le={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function qe(De){return Le.noHighlightRe.test(De)}function Wt(De){let at=De.className+" ";at+=De.parentNode?De.parentNode.className:"";const Mt=Le.languageDetectRe.exec(at);if(Mt){const Yt=yr(Mt[1]);return Yt||(_e(St.replace("{}",Mt[1])),_e("Falling back to no-highlight mode for this block.",De)),Yt?Mt[1]:"no-highlight"}return at.split(/\s+/).find(Yt=>qe(Yt)||yr(Yt))}function tt(De,at,Mt){let Yt="",On="";typeof at=="object"?(Yt=De,Mt=at.ignoreIllegals,On=at.language):(J("10.7.0","highlight(lang, code, ...args) has been deprecated."),J("10.7.0",`Please use highlight(code, options) instead.
57
+ https://github.com/highlightjs/highlight.js/issues/2277`),On=De,Yt=at),Mt===void 0&&(Mt=!0);const ar={code:Yt,language:On};So("before:highlight",ar);const $r=ar.result?ar.result:Dt(ar.language,ar.code,Mt);return $r.code=ar.code,So("after:highlight",$r),$r}function Dt(De,at,Mt,Yt){const On=Object.create(null);function ar(Fe,Je){return Fe.keywords[Je]}function $r(){if(!mt.keywords){Ln.addText(Xt);return}let Fe=0;mt.keywordPatternRe.lastIndex=0;let Je=mt.keywordPatternRe.exec(Xt),Tt="";for(;Je;){Tt+=Xt.substring(Fe,Je.index);const Pt=er.case_insensitive?Je[0].toLowerCase():Je[0],Sn=ar(mt,Pt);if(Sn){const[Jr,Ul]=Sn;if(Ln.addText(Tt),Tt="",On[Pt]=(On[Pt]||0)+1,On[Pt]<=Ke&&(Ns+=Ul),Jr.startsWith("_"))Tt+=Je[0];else{const ff=er.classNameAliases[Jr]||Jr;Br(Je[0],ff)}}else Tt+=Je[0];Fe=mt.keywordPatternRe.lastIndex,Je=mt.keywordPatternRe.exec(Xt)}Tt+=Xt.substring(Fe),Ln.addText(Tt)}function Tr(){if(Xt==="")return;let Fe=null;if(typeof mt.subLanguage=="string"){if(!X[mt.subLanguage]){Ln.addText(Xt);return}Fe=Dt(mt.subLanguage,Xt,!0,cf[mt.subLanguage]),cf[mt.subLanguage]=Fe._top}else Fe=Qn(Xt,mt.subLanguage.length?mt.subLanguage:null);mt.relevance>0&&(Ns+=Fe.relevance),Ln.__addSublanguage(Fe._emitter,Fe.language)}function cn(){mt.subLanguage!=null?Tr():$r(),Xt=""}function Br(Fe,Je){Fe!==""&&(Ln.startScope(Je),Ln.addText(Fe),Ln.endScope())}function lf(Fe,Je){let Tt=1;const Pt=Je.length-1;for(;Tt<=Pt;){if(!Fe._emit[Tt]){Tt++;continue}const Sn=er.classNameAliases[Fe[Tt]]||Fe[Tt],Jr=Je[Tt];Sn?Br(Jr,Sn):(Xt=Jr,$r(),Xt=""),Tt++}}function ha(Fe,Je){return Fe.scope&&typeof Fe.scope=="string"&&Ln.openNode(er.classNameAliases[Fe.scope]||Fe.scope),Fe.beginScope&&(Fe.beginScope._wrap?(Br(Xt,er.classNameAliases[Fe.beginScope._wrap]||Fe.beginScope._wrap),Xt=""):Fe.beginScope._multi&&(lf(Fe.beginScope,Je),Xt="")),mt=Object.create(Fe,{parent:{value:mt}}),mt}function $l(Fe,Je,Tt){let Pt=_(Fe.endRe,Tt);if(Pt){if(Fe["on:end"]){const Sn=new t(Fe);Fe["on:end"](Je,Sn),Sn.isMatchIgnored&&(Pt=!1)}if(Pt){for(;Fe.endsParent&&Fe.parent;)Fe=Fe.parent;return Fe}}if(Fe.endsWithParent)return $l(Fe.parent,Je,Tt)}function ma(Fe){return mt.matcher.regexIndex===0?(Xt+=Fe[0],1):(Os=!0,0)}function Yh(Fe){const Je=Fe[0],Tt=Fe.rule,Pt=new t(Tt),Sn=[Tt.__beforeBegin,Tt["on:begin"]];for(const Jr of Sn)if(Jr&&(Jr(Fe,Pt),Pt.isMatchIgnored))return ma(Je);return Tt.skip?Xt+=Je:(Tt.excludeBegin&&(Xt+=Je),cn(),!Tt.returnBegin&&!Tt.excludeBegin&&(Xt=Je)),ha(Tt,Fe),Tt.returnBegin?0:Je.length}function _r(Fe){const Je=Fe[0],Tt=at.substring(Fe.index),Pt=$l(mt,Fe,Tt);if(!Pt)return Be;const Sn=mt;mt.endScope&&mt.endScope._wrap?(cn(),Br(Je,mt.endScope._wrap)):mt.endScope&&mt.endScope._multi?(cn(),lf(mt.endScope,Fe)):Sn.skip?Xt+=Je:(Sn.returnEnd||Sn.excludeEnd||(Xt+=Je),cn(),Sn.excludeEnd&&(Xt=Je));do mt.scope&&Ln.closeNode(),!mt.skip&&!mt.subLanguage&&(Ns+=mt.relevance),mt=mt.parent;while(mt!==Pt.parent);return Pt.starts&&ha(Pt.starts,Fe),Sn.returnEnd?0:Je.length}function Bl(){const Fe=[];for(let Je=mt;Je!==er;Je=Je.parent)Je.scope&&Fe.unshift(Je.scope);Fe.forEach(Je=>Ln.openNode(Je))}let wo={};function ga(Fe,Je){const Tt=Je&&Je[0];if(Xt+=Fe,Tt==null)return cn(),0;if(wo.type==="begin"&&Je.type==="end"&&wo.index===Je.index&&Tt===""){if(Xt+=at.slice(Je.index,Je.index+1),!lt){const Pt=new Error(`0 width match regex (${De})`);throw Pt.languageName=De,Pt.badRule=wo.rule,Pt}return 1}if(wo=Je,Je.type==="begin")return Yh(Je);if(Je.type==="illegal"&&!Mt){const Pt=new Error('Illegal lexeme "'+Tt+'" for mode "'+(mt.scope||"<unnamed>")+'"');throw Pt.mode=mt,Pt}else if(Je.type==="end"){const Pt=_r(Je);if(Pt!==Be)return Pt}if(Je.type==="illegal"&&Tt==="")return Xt+=`
58
+ `,1;if(Fl>1e5&&Fl>Je.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Xt+=Tt,Tt.length}const er=yr(De);if(!er)throw re(St.replace("{}",De)),new Error('Unknown language: "'+De+'"');const uf=it(er);let ba="",mt=Yt||uf;const cf={},Ln=new Le.__emitter(Le);Bl();let Xt="",Ns=0,Zi=0,Fl=0,Os=!1;try{if(er.__emitTokens)er.__emitTokens(at,Ln);else{for(mt.matcher.considerAll();;){Fl++,Os?Os=!1:mt.matcher.considerAll(),mt.matcher.lastIndex=Zi;const Fe=mt.matcher.exec(at);if(!Fe)break;const Je=at.substring(Zi,Fe.index),Tt=ga(Je,Fe);Zi=Fe.index+Tt}ga(at.substring(Zi))}return Ln.finalize(),ba=Ln.toHTML(),{language:De,value:ba,relevance:Ns,illegal:!1,_emitter:Ln,_top:mt}}catch(Fe){if(Fe.message&&Fe.message.includes("Illegal"))return{language:De,value:We(at),illegal:!0,relevance:0,_illegalBy:{message:Fe.message,index:Zi,context:at.slice(Zi-100,Zi+100),mode:Fe.mode,resultSoFar:ba},_emitter:Ln};if(lt)return{language:De,value:We(at),illegal:!1,relevance:0,errorRaised:Fe,_emitter:Ln,_top:mt};throw Fe}}function Kn(De){const at={value:We(De),illegal:!1,relevance:0,_top:$e,_emitter:new Le.__emitter(Le)};return at._emitter.addText(De),at}function Qn(De,at){at=at||Le.languages||Object.keys(X);const Mt=Kn(De),Yt=at.filter(yr).filter(Cs).map(cn=>Dt(cn,De,!1));Yt.unshift(Mt);const On=Yt.sort((cn,Br)=>{if(cn.relevance!==Br.relevance)return Br.relevance-cn.relevance;if(cn.language&&Br.language){if(yr(cn.language).supersetOf===Br.language)return 1;if(yr(Br.language).supersetOf===cn.language)return-1}return 0}),[ar,$r]=On,Tr=ar;return Tr.secondBest=$r,Tr}function _n(De,at,Mt){const Yt=at&&we[at]||Mt;De.classList.add("hljs"),De.classList.add(`language-${Yt}`)}function an(De){let at=null;const Mt=Wt(De);if(qe(Mt))return;if(So("before:highlightElement",{el:De,language:Mt}),De.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",De);return}if(De.children.length>0&&(Le.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(De)),Le.throwUnescapedHTML))throw new xt("One of your code blocks includes unescaped HTML.",De.innerHTML);at=De;const Yt=at.textContent,On=Mt?tt(Yt,{language:Mt,ignoreIllegals:!0}):Qn(Yt);De.innerHTML=On.value,De.dataset.highlighted="yes",_n(De,Mt,On.language),De.result={language:On.language,re:On.relevance,relevance:On.relevance},On.secondBest&&(De.secondBest={language:On.secondBest.language,relevance:On.secondBest.relevance}),So("after:highlightElement",{el:De,result:On,text:Yt})}function Jn(De){Le=Ot(Le,De)}const Gi=()=>{pa(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function jl(){pa(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let sf=!1;function pa(){function De(){pa()}if(document.readyState==="loading"){sf||window.addEventListener("DOMContentLoaded",De,!1),sf=!0;return}document.querySelectorAll(Le.cssSelector).forEach(an)}function of(De,at){let Mt=null;try{Mt=at(Y)}catch(Yt){if(re("Language definition for '{}' could not be registered.".replace("{}",De)),lt)re(Yt);else throw Yt;Mt=$e}Mt.name||(Mt.name=De),X[De]=Mt,Mt.rawDefinition=at.bind(null,Y),Mt.aliases&&Vi(Mt.aliases,{languageName:De})}function ko(De){delete X[De];for(const at of Object.keys(we))we[at]===De&&delete we[at]}function Pl(){return Object.keys(X)}function yr(De){return De=(De||"").toLowerCase(),X[De]||X[we[De]]}function Vi(De,{languageName:at}){typeof De=="string"&&(De=[De]),De.forEach(Mt=>{we[Mt.toLowerCase()]=at})}function Cs(De){const at=yr(De);return at&&!at.disableAutodetect}function As(De){De["before:highlightBlock"]&&!De["before:highlightElement"]&&(De["before:highlightElement"]=at=>{De["before:highlightBlock"](Object.assign({block:at.el},at))}),De["after:highlightBlock"]&&!De["after:highlightElement"]&&(De["after:highlightElement"]=at=>{De["after:highlightBlock"](Object.assign({block:at.el},at))})}function zn(De){As(De),Ge.push(De)}function af(De){const at=Ge.indexOf(De);at!==-1&&Ge.splice(at,1)}function So(De,at){const Mt=De;Ge.forEach(function(Yt){Yt[Mt]&&Yt[Mt](at)})}function Ki(De){return J("10.7.0","highlightBlock will be removed entirely in v12.0"),J("10.7.0","Please use highlightElement now."),an(De)}Object.assign(Y,{highlight:tt,highlightAuto:Qn,highlightAll:pa,highlightElement:an,highlightBlock:Ki,configure:Jn,initHighlighting:Gi,initHighlightingOnLoad:jl,registerLanguage:of,unregisterLanguage:ko,listLanguages:Pl,getLanguage:yr,registerAliases:Vi,autoDetection:Cs,inherit:Ot,addPlugin:zn,removePlugin:af}),Y.debugMode=function(){lt=!1},Y.safeMode=function(){lt=!0},Y.versionString=st,Y.regex={concat:S,lookahead:g,either:E,optional:k,anyNumberOfTimes:y};for(const De in Se)typeof Se[De]=="object"&&e(Se[De]);return Object.assign(Y,Se),Y},Xe=ht({});return Xe.newInstance=()=>ht({}),ly=Xe,Xe.HighlightJS=Xe,Xe.default=Xe,ly}var QQ=XQ();const JQ=rh(QQ),R_={},eJ="hljs-";function tJ(e){const t=JQ.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(d,p,h){const m=h||R_,g=typeof m.prefix=="string"?m.prefix:eJ;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:nJ,classPrefix:g});const y=t.highlight(p,{ignoreIllegals:!0,language:d});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const k=y._emitter.root,S=k.data;return S.language=y.language,S.relevance=y.relevance,k}function r(d,p){const m=(p||R_).subset||s();let g=-1,y=0,k;for(;++g<m.length;){const S=m[g];if(!t.getLanguage(S))continue;const T=n(S,d,p);T.data&&T.data.relevance!==void 0&&T.data.relevance>y&&(y=T.data.relevance,k=T)}return k||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(d,p){if(typeof d=="string")t.registerLanguage(d,p);else{let h;for(h in d)Object.hasOwn(d,h)&&t.registerLanguage(h,d[h])}}function l(d,p){if(typeof d=="string")t.registerAliases(typeof p=="string"?p:[...p],{languageName:d});else{let h;for(h in d)if(Object.hasOwn(d,h)){const m=d[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(d){return!!t.getLanguage(d)}}class nJ{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],s=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):r.children.push(...s)}openNode(t){const n=this,r=t.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const rJ={};function iJ(e){const t=e||rJ,n=t.aliases,r=t.detect||!1,s=t.languages||YQ,a=t.plainText,l=t.prefix,c=t.subset;let d="hljs";const p=tJ(s);if(n&&p.registerAlias(n),l){const h=l.indexOf("-");d=h===-1?l:l.slice(0,h)}return function(h,m){Zh(h,"element",function(g,y,k){if(g.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const S=sJ(g);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(g.properties.className)||(g.properties.className=[]),g.properties.className.includes(d)||g.properties.className.unshift(d);const T=wX(g,{whitespace:"pre"});let E;try{E=S?p.highlight(S,T,{prefix:l}):p.highlightAuto(T,{prefix:l,subset:c})}catch(R){const _=R;if(S&&/Unknown language/.test(_.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[k,g],cause:_,place:g.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw _}!S&&E.data&&E.data.language&&g.properties.className.push("language-"+E.data.language),E.children.length>0&&(g.children=E.children)})}}function sJ(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!r&&s.slice(0,5)==="lang-"&&(r=s.slice(5)),!r&&s.slice(0,9)==="language-"&&(r=s.slice(9))}return r}function C_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function oJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function aJ(e,t,n){const s=nf((n||{}).ignore||[]),a=lJ(t);let l=-1;for(;++l<a.length;)lM(e,"text",c);function c(p,h){let m=-1,g;for(;++m<h.length;){const y=h[m],k=g?g.children:void 0;if(s(y,k?k.indexOf(y):void 0,g))return;g=y}if(g)return d(p,h)}function d(p,h){const m=h[h.length-1],g=a[l][0],y=a[l][1];let k=0;const T=m.children.indexOf(p);let E=!1,R=[];g.lastIndex=0;let _=g.exec(p.value);for(;_;){const C=_.index,A={index:_.index,input:_.input,stack:[...h,p]};let N=y(..._,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?g.lastIndex=C+1:(k!==C&&R.push({type:"text",value:p.value.slice(k,C)}),Array.isArray(N)?R.push(...N):N&&R.push(N),k=C+_[0].length,E=!0),!g.global)break;_=g.exec(p.value)}return E?(k<p.value.length&&R.push({type:"text",value:p.value.slice(k)}),m.children.splice(T,1,...R)):R=[p],T+R.length}}function lJ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([uJ(s[0]),cJ(s[1])])}return t}function uJ(e){return typeof e=="string"?new RegExp(oJ(e),"g"):e}function cJ(e){return typeof e=="function"?e:function(){return e}}const uy="phrasing",cy=["autolink","link","image","label"];function fJ(){return{transforms:[yJ],enter:{literalAutolink:pJ,literalAutolinkEmail:fy,literalAutolinkHttp:fy,literalAutolinkWww:fy},exit:{literalAutolink:bJ,literalAutolinkEmail:gJ,literalAutolinkHttp:hJ,literalAutolinkWww:mJ}}}function dJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:cy},{character:":",before:"[ps]",after:"\\/",inConstruct:uy,notInConstruct:cy}]}}function pJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fy(e){this.config.enter.autolinkProtocol.call(this,e)}function hJ(e){this.config.exit.autolinkProtocol.call(this,e)}function mJ(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function gJ(e){this.config.exit.autolinkEmail.call(this,e)}function bJ(e){this.exit(e)}function yJ(e){aJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vJ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),xJ]],{ignore:["link","linkReference"]})}function vJ(e,t,n,r,s){let a="";if(!OM(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!kJ(n)))return!1;const l=SJ(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function xJ(e,t,n,r){return!OM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kJ(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function SJ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=C_(e,"(");let a=C_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function OM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ia(n)||Hh(n))&&(!t||n!==47)}MM.peek=OJ;function wJ(){this.buffer()}function EJ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function TJ(){this.buffer()}function _J(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function RJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CJ(e){this.exit(e)}function AJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(e)).toLowerCase(),n.label=t}function NJ(e){this.exit(e)}function OJ(){return"["}function MM(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=s.move("]"),a}function MJ(){return{enter:{gfmFootnoteCallString:wJ,gfmFootnoteCall:EJ,gfmFootnoteDefinitionLabelString:TJ,gfmFootnoteDefinition:_J},exit:{gfmFootnoteCallString:RJ,gfmFootnoteCall:CJ,gfmFootnoteDefinitionLabelString:AJ,gfmFootnoteDefinition:NJ}}}function IJ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:MM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let d=c.move("[^");const p=a.enter("footnoteDefinition"),h=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
59
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?IM:DJ))),p(),d}}function DJ(e,t,n){return t===0?e:IM(e,t,n)}function IM(e,t,n){return(n?"":" ")+e}const zJ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];DM.peek=BJ;function LJ(){return{canContainEols:["delete"],enter:{strikethrough:PJ},exit:{strikethrough:$J}}}function jJ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zJ}],handlers:{delete:DM}}}function PJ(e){this.enter({type:"delete",children:[]},e)}function $J(e){this.exit(e)}function DM(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function BJ(){return"~"}function FJ(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||qJ,s=[],a=[],l=[],c=[];let d=0,p=-1;for(;++p<e.length;){const k=[],S=[];let T=-1;for(e[p].length>d&&(d=e[p].length);++T<e[p].length;){const E=UJ(e[p][T]);if(t.alignDelimiters!==!1){const R=r(E);S[T]=R,(c[T]===void 0||R>c[T])&&(c[T]=R)}k.push(E)}a[p]=k,l[p]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<d;)s[h]=A_(n[h]);else{const k=A_(n);for(;++h<d;)s[h]=k}h=-1;const m=[],g=[];for(;++h<d;){const k=s[h];let S="",T="";k===99?(S=":",T=":"):k===108?S=":":k===114&&(T=":");let E=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-T.length);const R=S+"-".repeat(E)+T;t.alignDelimiters!==!1&&(E=S.length+E+T.length,E>c[h]&&(c[h]=E),g[h]=E),m[h]=R}a.splice(1,0,m),l.splice(1,0,g),p=-1;const y=[];for(;++p<a.length;){const k=a[p],S=l[p];h=-1;const T=[];for(;++h<d;){const E=k[h]||"";let R="",_="";if(t.alignDelimiters!==!1){const C=c[h]-(S[h]||0),A=s[h];A===114?R=" ".repeat(C):A===99?C%2?(R=" ".repeat(C/2+.5),_=" ".repeat(C/2-.5)):(R=" ".repeat(C/2),_=R):_=" ".repeat(C)}t.delimiterStart!==!1&&!h&&T.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||h)&&T.push(" "),t.alignDelimiters!==!1&&T.push(R),T.push(E),t.alignDelimiters!==!1&&T.push(_),t.padding!==!1&&T.push(" "),(t.delimiterEnd!==!1||h!==d-1)&&T.push("|")}y.push(t.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return y.join(`
60
+ `)}function UJ(e){return e==null?"":String(e)}function qJ(e){return e.length}function A_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function HJ(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),GJ);return s(),l}function GJ(e,t,n){return">"+(n?"":" ")+e}function VJ(e,t){return N_(e,t.inConstruct,!0)&&!N_(e,t.notInConstruct,!1)}function N_(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function O_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
61
+ `&&VJ(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
62
+ `}function KJ(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>l&&(l=a):a=1,s=r+t.length,r=n.indexOf(t,s);return l}function ZJ(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function WJ(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function YJ(e,t,n,r){const s=WJ(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(ZJ(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(a,XJ);return m(),g}const c=n.createTracker(r),d=s.repeat(Math.max(KJ(a,s)+1,3)),p=n.enter("codeFenced");let h=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
63
+ `,encode:["`"],...c.current()})),m()}return h+=c.move(`
64
+ `),a&&(h+=c.move(a+`
65
+ `)),h+=c.move(d),p(),h}function XJ(e,t,n){return(n?"":" ")+e}function Kx(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function QJ(e,t,n,r){const s=Kx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let p=d.move("[");return p+=d.move(n.safe(n.associationId(e),{before:p,after:"]",...d.current()})),p+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(e.url,{before:p,after:e.title?" ":`
66
+ `,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),p+=d.move(" "+s),p+=d.move(n.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),c()),l(),p}function JJ(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ic(e){return"&#x"+e.toString(16).toUpperCase()+";"}function nh(e,t,n){const r=Tl(e),s=Tl(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}zM.peek=eee;function zM(e,t,n,r){const s=JJ(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const p=d.charCodeAt(0),h=nh(r.before.charCodeAt(r.before.length-1),p,s);h.inside&&(d=Ic(p)+d.slice(1));const m=d.charCodeAt(d.length-1),g=nh(r.after.charCodeAt(0),m,s);g.inside&&(d=d.slice(0,-1)+Ic(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+d+y}function eee(e,t,n){return n.options.emphasis||"*"}function tee(e,t){let n=!1;return Zh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,uv}),!!((!e.depth||e.depth<3)&&jx(e)&&(t.options.setext||n))}function nee(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(tee(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),g=n.containerPhrasing(e,{...a.current(),before:`
67
+ `,after:`
68
+ `});return m(),h(),g+`
69
+ `+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
70
+ `))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
71
+ `,...a.current()});return/^[\t ]/.test(p)&&(p=Ic(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),d(),c(),p}LM.peek=ree;function LM(e){return e.value||""}function ree(){return"<"}jM.peek=iee;function jM(e,t,n,r){const s=Kx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let p=d.move("![");return p+=d.move(n.safe(e.alt,{before:p,after:"]",...d.current()})),p+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=d.move("<"),p+=d.move(n.safe(e.url,{before:p,after:">",...d.current()})),p+=d.move(">")):(c=n.enter("destinationRaw"),p+=d.move(n.safe(e.url,{before:p,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),p+=d.move(" "+s),p+=d.move(n.safe(e.title,{before:p,after:s,...d.current()})),p+=d.move(s),c()),p+=d.move(")"),l(),p}function iee(){return"!"}PM.peek=see;function PM(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const p=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!p||p!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function see(){return"!"}$M.peek=oee;function $M(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let p=d.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(d.index+1)}}return s+r+s}function oee(){return"`"}function BM(e,t){const n=jx(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}FM.peek=aee;function FM(e,t,n,r){const s=Kx(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(BM(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),d=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(d=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),p+=l.move(" "+s),p+=l.move(n.safe(e.title,{before:p,after:s,...l.current()})),p+=l.move(s),d()),p+=l.move(")"),c(),p}function aee(e,t,n){return BM(e,n)?"<":"["}UM.peek=lee;function UM(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const p=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(p+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!p||p!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function lee(){return"["}function Zx(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function uee(e){const t=Zx(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function cee(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function qM(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function fee(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?cee(n):Zx(n);const c=e.ordered?l==="."?")":".":uee(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),qM(n)===l&&h){let m=-1;for(;++m<e.children.length;){const g=e.children[m];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const p=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),p}function dee(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pee(e,t,n,r){const s=dee(n);let a=n.bulletCurrent||Zx(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const d=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,c.current()),h);return d(),p;function h(m,g,y){return g?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function hee(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const mee=nf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gee(e,t,n,r){return(e.children.some(function(l){return mee(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function bee(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}HM.peek=yee;function HM(e,t,n,r){const s=bee(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const p=d.charCodeAt(0),h=nh(r.before.charCodeAt(r.before.length-1),p,s);h.inside&&(d=Ic(p)+d.slice(1));const m=d.charCodeAt(d.length-1),g=nh(r.after.charCodeAt(0),m,s);g.inside&&(d=d.slice(0,-1)+Ic(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},c+d+y}function yee(e,t,n){return n.options.strong||"*"}function vee(e,t,n,r){return n.safe(e.value,r)}function xee(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kee(e,t,n){const r=(qM(n)+(n.options.ruleSpaces?" ":"")).repeat(xee(n));return n.options.ruleSpaces?r.slice(0,-1):r}const GM={blockquote:HJ,break:O_,code:YJ,definition:QJ,emphasis:zM,hardBreak:O_,heading:nee,html:LM,image:jM,imageReference:PM,inlineCode:$M,link:FM,linkReference:UM,list:fee,listItem:pee,paragraph:hee,root:gee,strong:HM,text:vee,thematicBreak:kee};function See(){return{enter:{table:wee,tableData:M_,tableHeader:M_,tableRow:Tee},exit:{codeText:_ee,table:Eee,tableData:dy,tableHeader:dy,tableRow:dy}}}function wee(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Eee(e){this.exit(e),this.data.inTable=void 0}function Tee(e){this.enter({type:"tableRow",children:[]},e)}function dy(e){this.exit(e)}function M_(e){this.enter({type:"tableCell",children:[]},e)}function _ee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ree));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ree(e,t){return t==="|"?t:e}function Cee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
72
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:d,tableRow:c}};function l(y,k,S,T){return p(h(y,S,T),y.align)}function c(y,k,S,T){const E=m(y,S,T),R=p([E]);return R.slice(0,R.indexOf(`
73
+ `))}function d(y,k,S,T){const E=S.enter("tableCell"),R=S.enter("phrasing"),_=S.containerPhrasing(y,{...T,before:a,after:a});return R(),E(),_}function p(y,k){return FJ(y,{align:k,alignDelimiters:r,padding:n,stringLength:s})}function h(y,k,S){const T=y.children;let E=-1;const R=[],_=k.enter("table");for(;++E<T.length;)R[E]=m(T[E],k,S);return _(),R}function m(y,k,S){const T=y.children;let E=-1;const R=[],_=k.enter("tableRow");for(;++E<T.length;)R[E]=d(T[E],y,k,S);return _(),R}function g(y,k,S){let T=GM.inlineCode(y,k,S);return S.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function Aee(){return{exit:{taskListCheckValueChecked:I_,taskListCheckValueUnchecked:I_,paragraph:Oee}}}function Nee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mee}}}function I_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Oee(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,l;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Mee(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let d=GM.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),d;function p(h){return h+l}}function Iee(){return[fJ(),MJ(),LJ(),See(),Aee()]}function Dee(e){return{extensions:[dJ(),IJ(e),jJ(),Cee(e),Nee()]}}const zee={tokenize:Fee,partial:!0},VM={tokenize:Uee,partial:!0},KM={tokenize:qee,partial:!0},ZM={tokenize:Hee,partial:!0},Lee={tokenize:Gee,partial:!0},WM={name:"wwwAutolink",tokenize:$ee,previous:XM},YM={name:"protocolAutolink",tokenize:Bee,previous:QM},Rs={name:"emailAutolink",tokenize:Pee,previous:JM},Hi={};function jee(){return{text:Hi}}let Uo=48;for(;Uo<123;)Hi[Uo]=Rs,Uo++,Uo===58?Uo=65:Uo===91&&(Uo=97);Hi[43]=Rs;Hi[45]=Rs;Hi[46]=Rs;Hi[95]=Rs;Hi[72]=[Rs,YM];Hi[104]=[Rs,YM];Hi[87]=[Rs,WM];Hi[119]=[Rs,WM];function Pee(e,t,n){const r=this;let s,a;return l;function l(m){return!hv(m)||!JM.call(r,r.previous)||Wx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return hv(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(Lee,h,p)(m):m===45||m===95||mr(m)?(a=!0,e.consume(m),d):h(m)}function p(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&Sr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function $ee(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!XM.call(r,r.previous)||Wx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zee,e.attempt(VM,e.attempt(KM,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Bee(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&QM.call(r,r.previous)&&!Wx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Sr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const g=s.toLowerCase();if(g==="http"||g==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?p:(a=!0,d)):n(m)}function p(m){return m===null||Xp(m)||un(m)||ia(m)||Hh(m)?n(m):e.attempt(VM,e.attempt(KM,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Fee(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function Uee(e,t,n){let r,s,a;return l;function l(p){return p===46||p===95?e.check(ZM,d,c)(p):p===null||un(p)||ia(p)||p!==45&&Hh(p)?d(p):(a=!0,e.consume(p),l)}function c(p){return p===95?r=!0:(s=r,r=void 0),e.consume(p),l}function d(p){return s||r||!a?n(p):t(p)}}function qee(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(ZM,t,a)(l):l===null||un(l)||ia(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function Hee(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||un(c)||ia(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||un(c)||ia(c)?t(c):r(c)}function a(c){return Sr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Sr(c)?(e.consume(c),l):n(c)}}function Gee(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return mr(a)?n(a):t(a)}}function XM(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||un(e)}function QM(e){return!Sr(e)}function JM(e){return!(e===47||hv(e))}function hv(e){return e===43||e===45||e===46||e===95||mr(e)}function Wx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Vee={tokenize:ete,partial:!0};function Kee(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Xee,continuation:{tokenize:Qee},exit:Jee}},text:{91:{name:"gfmFootnoteCall",tokenize:Yee},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zee,resolveTo:Wee}}}}function Zee(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const p=Ei(r.sliceSerialize({start:l.end,end:r.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Wee(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function Yee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(a>999||m===93&&!l||m===null||m===91||un(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return s.includes(Ei(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return un(m)||(l=!0),a++,e.consume(m),m===92?h:p}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,p):p(m)}}function Xee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(l>999||k===93&&!c||k===null||k===91||un(k))return n(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Ei(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return un(k)||(c=!0),l++,e.consume(k),k===92?m:h}function m(k){return k===91||k===92||k===93?(e.consume(k),l++,h):h(k)}function g(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(a)||s.push(a),qt(e,y,"gfmFootnoteDefinitionWhitespace")):n(k)}function y(k){return t(k)}}function Qee(e,t,n){return e.check(tf,t,e.attempt(Vee,t,n))}function Jee(e){e.exit("gfmFootnoteDefinition")}function ete(e,t,n){const r=this;return qt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function tte(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let p=d;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[d][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[d][1].start)},g=[["enter",h,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Xr(g,g.length,0,Gh(y,l.slice(p+1,d),c)),Xr(g,g.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",h,c]]),Xr(l,p-1,d-p+3,g),d=p+g.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const p=this.previous,h=this.events;let m=0;return g;function g(k){return p===126&&h[h.length-1][1].type!=="characterEscape"?d(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const S=Tl(p);if(k===126)return m>1?d(k):(l.consume(k),m++,y);if(m<2&&!n)return d(k);const T=l.exit("strikethroughSequenceTemporary"),E=Tl(k);return T._open=!E||E===2&&!!S,T._close=!S||S===2&&!!E,c(k)}}}class nte{constructor(){this.map=[]}add(t,n,r){rte(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function rte(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function ite(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function ste(){return{flow:{null:{name:"table",tokenize:ote,resolveAll:ate}}}}function ote(e,t,n){const r=this;let s=0,a=0,l;return c;function c(L){let Z=r.events.length-1;for(;Z>-1;){const z=r.events[Z][1].type;if(z==="lineEnding"||z==="linePrefix")Z--;else break}const K=Z>-1?r.events[Z][1].type:null,q=K==="tableHead"||K==="tableRow"?N:d;return q===N&&r.parser.lazy[r.now().line]?n(L):q(L)}function d(L){return e.enter("tableHead"),e.enter("tableRow"),p(L)}function p(L){return L===124||(l=!0,a+=1),h(L)}function h(L){return L===null?n(L):ct(L)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),y):n(L):jt(L)?qt(e,h,"whitespace")(L):(a+=1,l&&(l=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(L)))}function m(L){return L===null||L===124||un(L)?(e.exit("data"),h(L)):(e.consume(L),L===92?g:m)}function g(L){return L===92||L===124?(e.consume(L),m):m(L)}function y(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),l=!1,jt(L)?qt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):k(L))}function k(L){return L===45||L===58?T(L):L===124?(l=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),S):A(L)}function S(L){return jt(L)?qt(e,T,"whitespace")(L):T(L)}function T(L){return L===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),E):L===45?(a+=1,E(L)):L===null||ct(L)?C(L):A(L)}function E(L){return L===45?(e.enter("tableDelimiterFiller"),R(L)):A(L)}function R(L){return L===45?(e.consume(L),R):L===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(L))}function _(L){return jt(L)?qt(e,C,"whitespace")(L):C(L)}function C(L){return L===124?k(L):L===null||ct(L)?!l||s!==a?A(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):A(L)}function A(L){return n(L)}function N(L){return e.enter("tableRow"),I(L)}function I(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),I):L===null||ct(L)?(e.exit("tableRow"),t(L)):jt(L)?qt(e,I,"whitespace")(L):(e.enter("data"),$(L))}function $(L){return L===null||L===124||un(L)?(e.exit("data"),I(L)):(e.consume(L),L===92?H:$)}function H(L){return L===92||L===124?(e.consume(L),$):$(L)}}function ate(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,p,h,m;const g=new nte;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(D_(g,t,d,p,h),h=void 0,d=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},g.add(n,0,[["enter",p,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},g.add(n,0,[["enter",h,t]])),s=k.type==="tableDelimiterRow"?2:h?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=lp(g,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=lp(g,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],m=lp(g,t,a,s,n,m)):l[1]!==0&&(m=lp(g,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&D_(g,t,d,p,h),g.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=ite(t.events,n))}return e}function lp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},nl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=nl(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const p=nl(t.events,n[2]),h=nl(t.events,n[3]),m={type:c,start:Object.assign({},p),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,S=n[3]-n[2]-1;e.add(k,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},nl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function D_(e,t,n,r,s){const a=[],l=nl(t.events,n);s&&(s.end=Object.assign({},l),a.push(["exit",s,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function nl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lte={name:"tasklistCheck",tokenize:cte};function ute(){return{text:{91:lte}}}function cte(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return un(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return ct(d)?t(d):jt(d)?e.check({tokenize:fte},t,n)(d):n(d)}}function fte(e,t,n){return qt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function dte(e){return qO([jee(),Kee(),tte(e),ste(),ute()])}const pte={};function hte(e){const t=this,n=e||pte,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(dte(n)),a.push(Iee()),l.push(Dee(n))}function mte(e){return v.jsx("div",{className:"md-table-wrap",children:v.jsx("table",{...e})})}function eI(e){return v.jsx("span",{className:"md-cell",children:e})}function gte({children:e,...t}){return v.jsx("th",{...t,children:eI(e)})}function bte({children:e,...t}){return v.jsx("td",{...t,children:eI(e)})}function mv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(mv).join(""):x.isValidElement(e)?mv(e.props.children):""}function yte({children:e,...t}){const[n,r]=x.useState(!1),s=x.useRef(void 0),a=x.useCallback(()=>{navigator.clipboard.writeText(mv(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return v.jsxs("div",{className:"md-pre-wrap",children:[v.jsx("pre",{...t,children:e}),v.jsx("span",{className:"md-copy",children:v.jsx(po,{icon:n?"check":"copy",size:"sm",variant:"default","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const vte={table:mte,th:gte,td:bte,pre:yte},_l=x.memo(function({text:t,className:n}){return v.jsx("div",{className:n?`md ${n}`:"md",children:v.jsx(dX,{remarkPlugins:[hte],rehypePlugins:[[iJ,{detect:!1}]],components:vte,children:t??""})})});function xte(e){switch(e){case"done":return{name:"check-circle",color:"secondary"};case"error":return{name:"x-circle",color:"red"};case"awaiting":return{name:"clock",color:"yellow"};case"orphan":return{name:"slash-circle",color:"tertiary"};default:return{name:"spinner",color:"blue",modifier:"spin"}}}function zl(e){const[t,n]=x.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";x.useEffect(()=>{if(!r||e.endedAt!=null)return;const a=setInterval(()=>n(Date.now()),250);return()=>clearInterval(a)},[r,e.endedAt]);const s=e.endedAt??(r?t:e.startedAt??t);return e.startedAt!=null?Math.max(0,s-e.startedAt):null}function xo({status:e}){const t=xte(e);return v.jsx(vn,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Ll({callId:e}){return v.jsxs("div",{className:"approval-bar",children:[v.jsx("span",{children:"Awaiting human approval"}),v.jsx(Gn,{variant:"secondary",color:"green",size:"sm",onClick:()=>{ft.submitApproval(e,"approve")},children:"Approve"}),v.jsx(Gn,{variant:"secondary",color:"red",size:"sm",onClick:()=>{ft.submitApproval(e,"deny")},children:"Deny"})]})}function Wh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Yo(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const kte="run_reviewers";function Ste(e){const t=Wh(e),n=Yo(t,"runId");return n===""?null:n}function wte(e,t){const[n,r]=x.useState(null),s=e!=null&&(t==="running"||t==="awaiting");return x.useEffect(()=>{if(e==null){r(null);return}let a=!1,l;const c=async()=>{const d=await ft.api.asrReviewersProgress(e);a||(d.ok&&d.body&&Array.isArray(d.body.jobs)&&r(d.body),!a&&s&&(l=setTimeout(()=>{c()},500)))};return c(),()=>{a=!0,l!==void 0&&clearTimeout(l)}},[e,s]),x.useEffect(()=>{if(e==null||s)return;let a=!1;return ft.api.asrReviewersProgress(e).then(l=>{a||l.ok&&l.body&&Array.isArray(l.body.jobs)&&r(l.body)}),()=>{a=!0}},[e,s]),n}function z_(e){switch(e){case"done":return{name:"check-circle",color:"green"};case"failed":return{name:"x-circle",color:"red"};case"running":return{name:"spinner",color:"blue",modifier:"spin"};default:return{name:"clock",color:"tertiary"}}}function Ete({job:e}){const t=e.filesOrAreasReviewed??[],n=e.whyNoMoreCandidates?.trim()??"",r=e.candidateSummaries??[];return t.length===0&&n===""&&r.length===0&&!e.error?null:v.jsxs("div",{className:"asr-job-detail",children:[e.error?v.jsx("div",{className:"asr-job-error",children:e.error}):null,t.length>0?v.jsxs("div",{className:"asr-job-files",children:[v.jsx("span",{className:"asr-job-detail-label",children:"reviewed"}),v.jsx("pre",{children:t.join(`
74
+ `)})]}):null,n!==""?v.jsxs("div",{className:"asr-job-reasoning",children:[v.jsx("span",{className:"asr-job-detail-label",children:"reasoning"}),v.jsx("pre",{children:n})]}):null,r.length>0?v.jsx("ul",{className:"asr-job-candidates",children:r.map(s=>v.jsxs("li",{children:[v.jsx("span",{className:"asr-cand-sev",children:s.severity??"candidate"}),s.location?v.jsx("span",{className:"asr-cand-loc",children:s.location}):null,s.description?v.jsx("span",{className:"asr-cand-desc",children:s.description}):null]},s.candidateId))}):null]})}function Tte({job:e}){const t=e.reason?.trim()??"";return!e.error&&t===""&&!e.description&&!e.location&&!e.candidateMatch?null:v.jsxs("div",{className:"asr-job-detail",children:[e.error?v.jsx("div",{className:"asr-job-error",children:e.error}):null,e.location||e.description?v.jsxs("div",{className:"asr-job-files",children:[v.jsx("span",{className:"asr-job-detail-label",children:"candidate"}),v.jsx("pre",{children:[e.severity,e.location,e.description].filter(Boolean).join(`
75
+ `)})]}):null,e.candidateMatch?v.jsxs("div",{className:"asr-job-files",children:[v.jsx("span",{className:"asr-job-detail-label",children:"match"}),v.jsx("pre",{children:e.candidateMatch})]}):null,t!==""?v.jsxs("div",{className:"asr-job-reasoning",children:[v.jsx("span",{className:"asr-job-detail-label",children:"reasoning"}),v.jsx("pre",{children:t})]}):null]})}const _te=x.memo(function({item:t}){const[n,r]=x.useState(()=>t.status==="running"||t.status==="awaiting"),s=zl(t),a=Ste(t.args),l=wte(a,t.status),c=l?.jobs??[],d=l?.triage?.jobs??[],p=c.filter(k=>k.status==="running").length,h=c.filter(k=>k.status==="done"||k.status==="failed").length,m=c.length>0&&c.every(k=>k.status==="done"||k.status==="failed"),g=c.reduce((k,S)=>k+(typeof S.candidates=="number"?S.candidates:0),0),y=[];return a&&y.push(ji(a,36)),c.length>0&&y.push(t.status==="running"?`${p} running · ${h}/${c.length}`:`${h}/${c.length} jobs`),d.length>0&&l?.triage&&y.push(`triage ${l.triage.completed}/${l.triage.enqueued||d.length}`),y.push(Qr(s)),x.useEffect(()=>{(t.status==="running"||t.status==="awaiting")&&r(!0)},[t.status]),v.jsxs("div",{className:`pg-tool pg-run-reviewers ${t.status}`,children:[v.jsxs(mi,{action:t.name,details:y.join(" · "),leadingIcon:v.jsx(xo,{status:t.status}),open:n,onOpenChange:k=>r(k),tabularNums:!0,children:[c.length>0?v.jsx("ul",{className:"asr-jobs",children:c.map(k=>{const S=z_(k.status),T=[];return typeof k.candidates=="number"&&T.push(`${k.candidates} candidate(s)`),v.jsxs("li",{className:`asr-job ${k.status}`,children:[v.jsxs("div",{className:"asr-job-row",children:[v.jsx(vn,{name:S.name,color:S.color,...S.modifier?{modifier:S.modifier}:{}}),v.jsx("span",{className:"asr-job-label",children:k.label}),T.length>0?v.jsx("span",{className:"asr-job-meta",children:T.join(" · ")}):null]}),v.jsx(Ete,{job:k})]},k.label)})}):v.jsx("div",{className:"out",children:t.status==="running"||t.status==="awaiting"?"starting reviewers…":t.output??"no reviewer jobs"}),d.length>0||l?.triage&&(l.triage.enqueued>0||l.triage.completed>0)?v.jsxs("div",{className:"asr-triage-section",children:[v.jsxs("div",{className:"asr-triage",children:["triage"," ",l?.triage?`${l.triage.completed}/${l.triage.enqueued||d.length}`:`${d.length}`,l?.triage&&(l.triage.confirmed>0||l.triage.rejected>0)?` · ${l.triage.confirmed} confirmed · ${l.triage.rejected} rejected`:""]}),d.length>0?v.jsx("ul",{className:"asr-jobs asr-triage-jobs",children:d.map(k=>{const S=z_(k.status),T=[];return k.triageStatus?T.push(k.triageStatus):k.status==="running"?T.push("running"):k.status==="failed"&&T.push("failed"),k.moduleId&&T.push(k.moduleId),v.jsxs("li",{className:`asr-job asr-triage-job ${k.status}${k.triageStatus?` triage-${k.triageStatus}`:""}`,children:[v.jsxs("div",{className:"asr-job-row",children:[v.jsx(vn,{name:S.name,color:S.color,...S.modifier?{modifier:S.modifier}:{}}),v.jsx("span",{className:"asr-job-label",children:k.candidateId}),T.length>0?v.jsx("span",{className:"asr-job-meta",children:T.join(" · ")}):null]}),v.jsx(Tte,{job:k})]},k.candidateId)})}):null]}):m&&g===0?v.jsx("div",{className:"asr-triage",children:"triage idle · no candidates"}):null]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})}),Rte=Object.freeze(Object.defineProperty({__proto__:null,default:_te,toolName:kte},Symbol.toStringTag,{value:"Module"})),Cte=Object.assign({"../../../../examples/security-reviewer/agent/playground/tools/run_reviewers.tsx":Rte}),tI=new Map;for(const[e,t]of Object.entries(Cte)){if(t?.default==null)continue;const n=typeof t.toolName=="string"&&t.toolName.trim()!==""?t.toolName.trim():void 0,r=e.split("/").pop()?.replace(/\.(tsx|ts)$/,""),s=n??r;s&&tI.set(s,t.default)}function Ate(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function L_(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if("stdout"in t||"stderr"in t||"exitCode"in t)return t}return null}function Nte(e){const t=L_(e.outputRaw);if(t)return t;if(e.output)try{return L_(JSON.parse(e.output))}catch{}return null}function j_(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const Ote=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=zl(t),a=Ate(t.args),l=Nte(t),c=j_(l?.stdout??""),d=j_(l?.stderr??""),p=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&p?"error":t.status,m=[a?ji(a,80):"shell"];return p&&m.push(`exit ${l?.exitCode}`),m.push(Qr(s)),v.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[v.jsxs(mi,{action:"shell",details:m.join(" · "),leadingIcon:v.jsx(xo,{status:h}),open:n,onOpenChange:g=>r(g),tabularNums:!0,children:[a?v.jsx("pre",{className:"shell-cmd",children:a}):null,c?v.jsx("pre",{className:"shell-std",children:c}):null,d?v.jsx("pre",{className:"shell-std shell-err",children:d}):null,!c&&!d?v.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})}),Mte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=zl(t),a=Yo(Wh(t.args),"path"),l=Ite(t),c=[a?fG(a,80):"read",Qr(s)];return v.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[v.jsxs(mi,{action:"read",details:c.join(" · "),leadingIcon:v.jsx(xo,{status:t.status}),open:n,onOpenChange:d=>r(d),tabularNums:!0,children:[a?v.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?v.jsx("pre",{className:"tool-body",children:l}):v.jsx("div",{className:"tool-empty",children:"(empty file)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})});function Ite(e){const t=P_(e.outputRaw);if(t!=null)return t;if(e.output)try{return P_(JSON.parse(e.output))}catch{}return null}function P_(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e.content;if(typeof t=="string")return t}if(typeof e=="string")try{const t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t)){const n=t.content;if(typeof n=="string")return n}}catch{return e}return null}const Dte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=zl(t),a=Wh(t.args),l=Yo(a,"glob_pattern","globPattern"),c=Yo(a,"target_directory","targetDirectory"),d=zte(t),p=[l?ji(l,80):"glob",Qr(s)];return v.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[v.jsxs(mi,{action:"glob",details:p.join(" · "),leadingIcon:v.jsx(xo,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?v.jsx("pre",{className:"tool-primary",children:l}):null,c?v.jsx("pre",{className:"tool-meta",children:c}):null,d!=null?d.length>0?v.jsx("pre",{className:"tool-body",children:d.join(`
76
+ `)}):v.jsx("div",{className:"tool-empty",children:"(no matches)"}):v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})});function zte(e){const t=$_(e.outputRaw);if(t!=null)return t;if(e.output)try{return $_(JSON.parse(e.output))}catch{}return null}function $_(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.files;return Array.isArray(n)?n.filter(r=>typeof r=="string"):null}const Lte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=zl(t),a=Wh(t.args),l=Yo(a,"pattern"),c=Yo(a,"path"),d=Yo(a,"glob"),p=[l?ji(l,80):"grep",Qr(s)],h=[c,d?`glob ${d}`:""].filter(Boolean).join(`
77
+ `);return v.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[v.jsxs(mi,{action:"grep",details:p.join(" · "),leadingIcon:v.jsx(xo,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?v.jsx("pre",{className:"tool-primary",children:l}):null,h?v.jsx("pre",{className:"tool-meta",children:h}):null,v.jsx("div",{className:"out",children:t.output??"running…"})]}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})}),jte=x.memo(function({text:t,open:n}){const[r,s]=x.useState(!1);return n?v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(mi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-subagent-reasoning",children:v.jsx(mi,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})})}),Pte=x.memo(function({child:t}){if(t.kind==="assistant")return v.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:v.jsx(_l,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return v.jsx(jte,{text:t.text,open:t.open});const n=t.args==null?"":fr(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return v.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[v.jsxs("div",{className:"pg-subagent-tool-head",children:[v.jsx(xo,{status:t.status}),v.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?v.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,v.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?v.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function $te(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r!==void 0&&r.kind==="tool")return r.status==="running"?`Running ${r.name}`:r.status==="error"?`Failed ${r.name}`:`Ran ${r.name}`}return e.status==="running"?"Generating":e.status==="error"?"Error":"Completed"}const Bte=x.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=x.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":fr(t.args,100),d=t.status==="running",p=c?ji(c,120):l;return v.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[v.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[v.jsx("span",{className:"pg-subagent-status",children:v.jsx(xo,{status:t.status})}),v.jsxs("span",{className:"pg-subagent-titles",children:[v.jsx("span",{className:d?"pg-subagent-title shimmer":"pg-subagent-title",children:p}),v.jsxs("span",{className:"pg-subagent-subtitle",children:[$te(t,n)," · ",l]})]}),v.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:v.jsx(vn,{name:"chevron-right",size:10})})]}),v.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:v.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>v.jsx(Pte,{child:h},h.id)):v.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})}),Fte=x.memo(function({item:t}){const[n,r]=x.useState(!1),s=zl(t),a=t.args==null?"":fr(t.args,120),l=Qr(s);return v.jsxs("div",{className:`pg-tool ${t.status}`,children:[v.jsx(mi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:v.jsx(xo,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:v.jsx("div",{className:"out",children:t.output??"running…"})}),t.status==="awaiting"?v.jsx(Ll,{callId:t.callId}):null]})}),Ute={shell:e=>v.jsx(Ote,{item:e}),read:e=>v.jsx(Mte,{item:e}),glob:e=>v.jsx(Dte,{item:e}),grep:e=>v.jsx(Lte,{item:e})};function qte(e){return e.name.startsWith("subagent:")}const Hte=x.memo(function({item:t}){if(qte(t))return v.jsx(Bte,{item:t});const n=tI.get(t.name);if(n)return v.jsx(n,{item:t});const r=Ute[t.name];return r?r(t):v.jsx(Fte,{item:t})}),Gte=x.memo(function({text:t}){return v.jsx("div",{className:"msg user",children:v.jsx("div",{className:"bubble",children:t})})}),Vte=x.memo(function({text:t,streaming:n}){return v.jsx("div",{className:"msg assistant",children:v.jsx(_l,{text:t,className:n?"bubble streaming":"bubble"})})}),Kte=x.memo(function({text:t,open:n}){const[r,s]=x.useState(!1);return n?v.jsx("div",{className:"pg-reasoning",children:v.jsx(mi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})}):v.jsx("div",{className:"pg-reasoning",children:v.jsx(mi,{action:"Thought",defaultOpen:!1,tone:"muted",children:v.jsx(_l,{text:t,className:"body"})})})}),Zte=x.memo(function({text:t,fail:n,url:r}){return v.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?v.jsxs(v.Fragment,{children:[" · ",v.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:r})]}):null]})});function lc(e){switch(e.kind){case"user":return v.jsx(Gte,{text:e.text},e.id);case"assistant":return v.jsx(Vte,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return v.jsx(Kte,{text:e.text,open:e.open},e.id);case"tool":return v.jsx(Hte,{item:e},e.id);case"divider":return v.jsx(Zte,{text:e.text,fail:e.fail,url:e.url},e.id);case"turn-end":return null;default:return null}}function B_(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function Wte({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=x.useState(void 0),c=a??s,d=r.inTokens!==void 0||r.outTokens!==void 0?`${Wp(r.inTokens)} in · ${Wp(r.outTokens)} out tokens`:void 0;return v.jsxs(v.Fragment,{children:[e.length>0?v.jsx("div",{className:"pg-turn-group",title:d,children:v.jsx(mi,{action:"Worked",details:r.ms!==null?`for ${Cx(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:v.jsx("div",{className:"pg-turn-group-content",children:e.map(lc)})})}):null,t.map(lc),n?lc(n):null]})}function Yte({startMs:e}){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),v.jsx("div",{className:"pg-turn-group",children:v.jsx(mi,{action:"Working",details:`for ${Cx(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function Xte(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(lc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(lc(l));break;case"turn-end":{const c=s[s.length-1],d=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,p=d===null?s:s.slice(0,-1),h=p.filter(g=>!B_(g)),m=p.filter(B_);r.push(v.jsx(Wte,{steps:h,cards:m,final:d,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(v.jsx(Yte,{startMs:t},"working")),a(),r}function Qte(){const e=pt(h=>h.transcript),t=pt(h=>h.current),n=pt(h=>h.localTrace),r=pt(h=>h.running),s=pt(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=x.useMemo(()=>e.map(h=>{switch(h.kind){case"user":case"assistant":case"reasoning":return`${h.id}:${h.text.length}`;case"tool":return`${h.id}:${h.status}:${h.output?.length??0}`;case"divider":return`${h.id}:${h.text}`;case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",d=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:p}=wO({contentKey:l,latchKey:d});return v.jsx("div",{ref:p,className:a?"pg-transcript is-empty":"pg-transcript",children:a?v.jsx(vc,{className:"pg-empty",message:"Start a session to talk to your agent — type below, pick a session, or Open trace, then use the Trace tab for a timeline with tool timings."}):Xte(e,r?s:null)})}function Jte(){const e=pt(l=>l.view),t=pt(l=>l.drawerOpen),n=pt(l=>l.aliasHosted),r=pt(l=>l.aliasToken),s=pt(l=>l.embedded),a=pt(l=>l.sidebarOpen);return x.useEffect(()=>{ft.boot()},[]),n&&r.trim()===""?s?v.jsx(nV,{}):v.jsx(tV,{}):v.jsxs("div",{className:"pg-app",children:[s?null:v.jsx(MT,{}),s&&a?v.jsxs(v.Fragment,{children:[v.jsx("button",{type:"button","aria-label":"Close sessions sidebar",className:"pg-drawer-backdrop",onClick:()=>ft.setSidebarOpen(!1)}),v.jsx("div",{className:"pg-sidebar-overlay",children:v.jsx(MT,{})})]}):null,v.jsxs("div",{className:"pg-main",children:[v.jsx(VV,{}),v.jsxs("div",{className:"pg-columns",children:[e==="chat"?v.jsxs("div",{className:"pg-transcript-wrap",children:[v.jsx(Qte,{}),v.jsx(sV,{})]}):null,e==="trace"?v.jsx(tK,{}):null,e==="raw"?v.jsx(zV,{}):null,e==="logs"?v.jsx(MV,{}):null,e==="evals"?v.jsx(xV,{}):null,e==="abs"?v.jsx(eV,{}):null]})]}),t?v.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>ft.setDrawerOpen(!1)}):null,v.jsx(dV,{}),v.jsx(qV,{})]})}const ene={name:"dark",appearance:"dark",highContrast:!1,sidebar:"#181818",chrome:"#141414",editor:"#181818",base:"#F0F0F0",accent:"#599CE7",actionLabel:"#191c22",brand:"#F54E00",focus:"#F0F0F0",success:"#3FA266",warn:"#F1B467",danger:"#E34671",added:"#70B489",modified:"#F1B467",removed:"#FC6B83",untracked:"#88C0D0",terminalAnsiBlack:"#242424",terminalAnsiRed:"#FC6B83",terminalAnsiYellow:"#D2943E",terminalAnsiGreen:"#3FA266",terminalAnsiCyan:"#88C0D0",terminalAnsiBlue:"#81A1C1",terminalAnsiMagenta:"#B48EAD",terminalAnsiWhite:"#F0F0F0",terminalAnsiBrightBlack:"#F0F0F099",terminalAnsiBrightRed:"#FC6B83",terminalAnsiBrightYellow:"#F1B467",terminalAnsiBrightGreen:"#70B489",terminalAnsiBrightCyan:"#88C0D0",terminalAnsiBrightBlue:"#87A6C4",terminalAnsiBrightMagenta:"#B48EAD",terminalAnsiBrightWhite:"#F0F0F0",red:"#FC6B83",orange:"#D08770",yellow:"#F1B467",green:"#3FA266",cyan:"#81A1C1",blue:"#7BAFE9",magenta:"#B48EAD",purple:"#9386F2",diffAddedLineBackground:"#3FA26633",diffAddedTextBackground:"#3FA26622",diffRemovedLineBackground:"#B8004933",diffRemovedTextBackground:"#B8004922"},tne={name:"light",appearance:"light",highContrast:!1,sidebar:"#F3F3F3",chrome:"#F8F8F8",editor:"#FCFCFC",base:"#141414",accent:"#2778C1",actionLabel:"#FCFCFC",brand:"#F54E00",focus:"#2778C1",success:"#007041",warn:"#A46700",danger:"#BE1744",added:"#007041",modified:"#A46700",removed:"#BE1744",untracked:"#176C74",terminalAnsiBlack:"#141414",terminalAnsiRed:"#BE1744",terminalAnsiYellow:"#8B5700",terminalAnsiGreen:"#007041",terminalAnsiCyan:"#176C74",terminalAnsiBlue:"#0064B0",terminalAnsiMagenta:"#92156A",terminalAnsiWhite:"#FCFCFC",terminalAnsiBrightBlack:"#141414BD",terminalAnsiBrightRed:"#CE405B",terminalAnsiBrightYellow:"#A46700",terminalAnsiBrightGreen:"#00854C",terminalAnsiBrightCyan:"#3B7E84",terminalAnsiBrightBlue:"#2778C1",terminalAnsiBrightMagenta:"#B54E90",terminalAnsiBrightWhite:"#FFFFFF",red:"#BE1744",orange:"#CD4500",yellow:"#A46700",green:"#007041",cyan:"#176C74",blue:"#2778C1",magenta:"#92156A",purple:"#7565CC",diffAddedLineBackground:"#00AF6624",diffAddedTextBackground:"#00B06838",diffRemovedLineBackground:"#FF617B38",diffRemovedTextBackground:"#FF617B57"},nne=Qv({name:fA(),appearance:dA(["light","dark"]),highContrast:T4()}),Yx=["sidebar","chrome","editor","base","accent","actionLabel","brand","focus","success","warn","danger","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","orange","yellow","green","cyan","blue","magenta","purple","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"],rne=Object.fromEntries(Yx.map(e=>[e,fA()]));nne.extend(rne);function ine(e){const t={};for(const n of Yx){const r=e[n],s=Hc(n);t[s]=r}return t}function sne(e,t){return Object.keys(e).sort((n,r)=>n.localeCompare(r)).map(n=>`${t}--cursor-${n}: ${e[n]};`)}function one(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(Yx);const ane={foreground:{op:"ref",ref:"base"},textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:74},textTertiary:{op:"mixTransparent",ref:"base",percent:60},textQuaternary:{op:"mixTransparent",ref:"base",percent:36},textInvert:{op:"ref",ref:"editor"},textActive:{op:"ref",ref:"textPrimary"},textFocused:{op:"ref",ref:"textPrimary"},textGitAddedPrimary:{op:"ref",ref:"added"},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:78},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:64},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:40},textGitModifiedPrimary:{op:"ref",ref:"modified"},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:78},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:64},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:40},textGitRemovedPrimary:{op:"ref",ref:"removed"},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:78},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:64},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:40},textGitUntrackedPrimary:{op:"ref",ref:"untracked"},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:78},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:64},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:40},textRedPrimary:{op:"ref",ref:"red"},textRedSecondary:{op:"mixTransparent",ref:"red",percent:78},textYellowPrimary:{op:"ref",ref:"yellow"},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:78},textGreenPrimary:{op:"ref",ref:"green"},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:78},textMagentaPrimary:{op:"ref",ref:"magenta"},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:78},textPurplePrimary:{op:"ref",ref:"purple"},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:78},textCyanPrimary:{op:"ref",ref:"cyan"},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:78},textBluePrimary:{op:"ref",ref:"blue"},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:78},textOrangePrimary:{op:"ref",ref:"orange"},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:78},textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:66},iconTertiary:{op:"mixTransparent",ref:"base",percent:52},iconQuaternary:{op:"mixTransparent",ref:"base",percent:28},iconGitAddedPrimary:{op:"ref",ref:"added"},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:70},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:56},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:32},iconGitModifiedPrimary:{op:"ref",ref:"modified"},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:70},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:56},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:32},iconGitRemovedPrimary:{op:"ref",ref:"removed"},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:70},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:56},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:32},iconGitUntrackedPrimary:{op:"ref",ref:"untracked"},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:70},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:56},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:32},iconAccentPrimary:{op:"ref",ref:"accent"},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:70},iconRedPrimary:{op:"ref",ref:"red"},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:70},iconYellowPrimary:{op:"ref",ref:"yellow"},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:70},iconGreenPrimary:{op:"ref",ref:"green"},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:70},iconMagentaPrimary:{op:"ref",ref:"magenta"},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:70},iconCyanPrimary:{op:"ref",ref:"cyan"},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:70},iconBluePrimary:{op:"ref",ref:"blue"},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:70},iconOrangePrimary:{op:"ref",ref:"orange"},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:70},iconPurplePrimary:{op:"ref",ref:"purple"},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:70},bgPrimary:{op:"mixTransparent",ref:"base",percent:20},bgSecondary:{op:"mixTransparent",ref:"base",percent:14},bgTertiary:{op:"mixTransparent",ref:"base",percent:8},bgQuaternary:{op:"mixTransparent",ref:"base",percent:6},bgQuinary:{op:"mixTransparent",ref:"base",percent:4},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgEditor:{op:"ref",ref:"editor"},bgSidebar:{op:"ref",ref:"sidebar"},bgDiffInserted:{op:"ref",ref:"diffAddedLineBackground"},bgDiffRemoved:{op:"ref",ref:"diffRemovedLineBackground"},bgGitAddedPrimary:{op:"ref",ref:"added"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:24},bgGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:12},bgGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:8},bgGitModifiedPrimary:{op:"ref",ref:"modified"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:24},bgGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:12},bgGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:8},bgGitRemovedPrimary:{op:"ref",ref:"removed"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:24},bgGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:12},bgGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:8},bgGitUntrackedPrimary:{op:"ref",ref:"untracked"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:24},bgGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:12},bgGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:8},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgRedPrimary:{op:"ref",ref:"red"},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:12},bgYellowPrimary:{op:"ref",ref:"yellow"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:12},bgGreenPrimary:{op:"ref",ref:"green"},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:12},bgMagentaPrimary:{op:"ref",ref:"magenta"},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:12},bgCyanPrimary:{op:"ref",ref:"cyan"},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:12},bgBluePrimary:{op:"ref",ref:"blue"},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:12},bgOrangePrimary:{op:"ref",ref:"orange"},bgOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:12},bgPurplePrimary:{op:"ref",ref:"purple"},bgPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:12},bgPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:8},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},bgAccentSecondary:{op:"mixTransparent",ref:"accent",percent:24},bgAccentTertiary:{op:"mixTransparent",ref:"accent",percent:12},bgAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:8},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeTertiary:{op:"mixTransparent",ref:"base",percent:8},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:8,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:4},strokeFocused:{op:"ref",ref:"focus",fadePercent:15},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:0},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:56},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:56},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:56},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:56},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:32},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:56},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:32},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:56},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:32},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:56},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:32},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:56},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:32},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:56},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:32},strokeOrangePrimary:{op:"mixTransparent",ref:"orange",percent:56},strokeOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:32},shadowPrimary:{op:"mixBlack",blackPercent:20},shadowSecondary:{op:"mixTransparent",ref:"shadowPrimary",percent:60},shadowTertiary:{op:"mixTransparent",ref:"shadowPrimary",percent:30},shadowWorkbench:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,primaryMixPercent:40}]},boxShadowSm:{op:"shadow",candidates:[{x:0,y:2,blur:8,spread:0,shadowToken:"shadowSecondary"}]},boxShadowBase:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowPrimary"}]},boxShadowSoft:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowTertiary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"rgba(255, 255, 255, 0.05)"},{x:0,y:0,blur:3,spread:0,shadowToken:"shadowSecondary"},{x:0,y:16,blur:24,spread:0,shadowToken:"shadowTertiary"}]},boxShadowXl:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"rgba(255, 255, 255, 0.05)"},{x:0,y:0,blur:6,spread:8,shadowToken:"shadowSecondary"},{x:0,y:24,blur:16,spread:6,shadowToken:"shadowTertiary"}]},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},titlebarActiveForeground:{op:"ref",ref:"textSecondary"},titlebarInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterForeground:{op:"ref",ref:"textSecondary"},commandCenterBackground:{op:"ref",ref:"bgTertiary"},commandCenterBorder:{op:"ref",ref:"strokeSecondary"},commandCenterActiveForeground:{op:"ref",ref:"textSecondary"},commandCenterActiveBorder:{op:"ref",ref:"strokePrimary"},commandCenterActiveBackground:{op:"ref",ref:"bgSecondary"},commandCenterInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterInactiveBorder:{op:"ref",ref:"strokeSecondary"},terminalBackground:{op:"ref",ref:"chrome"},terminalForeground:{op:"ref",ref:"textPrimary"},terminalSelectionBackground:{op:"mixTransparent",ref:"base",percent:12},scrollbarThumbBackground:{op:"mixTransparentOverlay",ref:"base",percent:14},scrollbarThumbHoverBackground:{op:"mixTransparentOverlay",ref:"base",percent:22},scrollbarThumbActiveBackground:{op:"mixTransparentOverlay",ref:"base",percent:26},scrollbarShadow:{op:"ref",ref:"shadowPrimary"},progressBarBackground:{op:"ref",ref:"accent"},toolbarHoverBackground:{op:"ref",ref:"bgTertiary"},inputBorder:{op:"ref",ref:"strokeSecondary"},inputPlaceholderForeground:{op:"ref",ref:"textQuaternary"},editorForeground:{op:"ref",ref:"textPrimary"},editorLineHighlightBackground:{op:"mixTransparent",ref:"base",percent:8},editorLineNumberForeground:{op:"ref",ref:"textTertiary"},editorLineNumberActiveForeground:{op:"ref",ref:"textPrimary"},editorCursorForeground:{op:"ref",ref:"textPrimary"},editorSelectionBackground:{op:"mixTransparent",ref:"accent",percent:42},editorInactiveSelectionBackground:{op:"mixTransparent",ref:"accent",percent:30},editorSelectionHighlightBackground:{op:"mixTransparentAlpha",key:"accent",percent:32,alpha:128/255},editorWidgetBackground:{op:"ref",ref:"bgElevated"},editorWidgetBorder:{op:"ref",ref:"strokeSecondary"},editorWidgetForeground:{op:"ref",ref:"textPrimary"},editorGutterBackground:{op:"ref",ref:"editor"},editorWhitespaceForeground:{op:"mixTransparent",ref:"base",percent:22},editorBracketMatchBackground:{op:"mixTransparent",ref:"success",percent:22},editorBracketMatchBorder:{op:"mixTransparent",ref:"base",percent:52},editorIndentGuideBackground:{op:"mixTransparent",ref:"base",percent:22},editorIndentGuideActiveBackground:{op:"mixTransparent",ref:"base",percent:40},editorFindMatchBackground:{op:"mixTransparent",ref:"warn",percent:72},editorFindMatchHighlightBackground:{op:"mixTransparentOverlay",ref:"warn",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},F_={textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:84},textTertiary:{op:"mixTransparent",ref:"base",percent:72},textQuaternary:{op:"mixTransparent",ref:"base",percent:60},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:88},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:76},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:64},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:88},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:76},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:64},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:88},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:76},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:64},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:88},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:76},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:64},textRedSecondary:{op:"mixTransparent",ref:"red",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:80},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:76},iconTertiary:{op:"mixTransparent",ref:"base",percent:64},iconQuaternary:{op:"mixTransparent",ref:"base",percent:52},bgPrimary:{op:"mixTransparent",ref:"base",percent:36},bgSecondary:{op:"mixTransparent",ref:"base",percent:24},bgTertiary:{op:"mixTransparent",ref:"base",percent:14},bgQuaternary:{op:"mixTransparent",ref:"base",percent:8},bgQuinary:{op:"mixTransparent",ref:"base",percent:5},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:24},strokePrimary:{op:"mixTransparent",ref:"base",percent:48},strokeSecondary:{op:"mixTransparent",ref:"base",percent:36},strokeTertiary:{op:"mixTransparent",ref:"base",percent:28},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:28,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:20},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:80},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:80},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:80},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36}},lne={light:{shadowPrimary:{op:"mixBlack",blackPercent:6}},dark:{},lightHighContrast:{...F_},darkHighContrast:{...F_}};function ms(e){return`var(--cursor-${Hc(e)})`}function une(e){const t=e.inset?"inset ":"",n=`${e.x}px ${e.y}px ${e.blur}px ${e.spread}px`;return"literalColor"in e?`${t}${n} ${e.literalColor}`:"shadowToken"in e?`${t}${n} ${ms(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${ms("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function cne(e){return e.map(une).join(", ")}function fne(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${ms(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${ms(e.k1)} ${e.p1}%, ${ms(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, #000000 ${e.blackPercent}%, ${ms("chrome")})`;case"mixBlack":return`color-mix(in srgb, #000000 ${e.blackPercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${ms(e.ref)} ${e.fadePercent}%, transparent)`:ms(e.ref);case"shadow":return cne(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${ms(e.key)} ${e.percent}%, transparent)`;default:return e}}function dne(e){const t=lne[e];return Object.entries(ane).map(([n,r])=>({name:Hc(n),expr:t[n]??r}))}function pne(e){const t=dne(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${fne(s)};`);return n}function hne(e){const t=ine(e),n=sne(t," "),r=one(e),s=pne(r).join(`
78
+ `);return`:root {
79
+ ${n.join(`
80
+ `)}
81
+ }
82
+ :root {
83
+ ${s}
84
+ }`}const gv={fontFamily:zb.fontFamily,scrollbar:zb.scrollbar,syntax:zb.syntax},mne=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function gne(e,t){const n=Hc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function ds(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${gne(e,s)}: ${l};`)}}function bne(e={}){const t=e.selector??":root",n=e.theme??gv,r=[`${t} {`];for(const{key:s,cssMid:a}of mne)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Hc(l)}: ${c};`);return ds("duration",Ly,r,"ms"),ds("easing",yA,r),ds("spacing",pF,r,"px"),ds("radius",hF,r,"px"),ds("height",mF,r,"px"),ds("font-size",gF,r,"px"),ds("line-height",bF,r,"px"),ds("letter-spacing",yF,r,"px"),ds("elevation",dF,r),r.push("}"),r.join(`
85
+ `)}function yne(e){const t=hne(e.core),n=bne(e.nonColor??{});return`${t}
86
+ ${n}`}function vne(e){if(!e)return"default";const t=e.toLowerCase().replace(/_/g,"-");return t==="ja"||t.startsWith("ja-")?"ja":t==="ko"||t.startsWith("ko-")?"ko":t==="zh-tw"||t==="zh-hk"||t==="zh-mo"||t.includes("hant")?"zh-Hant":t==="zh"||t.startsWith("zh-")?"zh-Hans":"default"}function xne(e,t){switch(e){case"mac":switch(t){case"zh-Hans":return'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif';case"zh-Hant":return'-apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif';case"ja":return'-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif';case"ko":return'-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif';default:return"-apple-system, BlinkMacSystemFont, sans-serif"}case"windows":switch(t){case"zh-Hans":return'"Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif';case"zh-Hant":return'"Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif';case"ja":return'"Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif';case"ko":return'"Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif';default:return'"Segoe WPC", "Segoe UI", sans-serif'}case"linux":switch(t){case"zh-Hans":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif';case"zh-Hant":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif';case"ja":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif';case"ko":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif';default:return'system-ui, "Ubuntu", "Droid Sans", sans-serif'}default:return e}}function kne(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Sne(e){return xne(e.platform,vne(e.locale))}function wne(e){switch(e){case"mac":return'"SF Mono", Monaco, Menlo, Courier, monospace';case"windows":return'Consolas, "Courier New", monospace';case"linux":return'"Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace';default:return e}}const U_="agent-serve-cursor-theme";function Ene(e=window.location.search){return new URLSearchParams(e).get("theme")==="light"?"light":"dark"}function Tne(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=kne(navigator.userAgent,navigator.platform),r=yne({core:e==="light"?tne:ene,nonColor:{theme:{...gv,fontFamily:{...gv.fontFamily,sans:Sne({platform:n,locale:navigator.language}),mono:wne(n)}}}});let s=document.getElementById(U_);s==null&&(s=document.createElement("style"),s.id=U_,document.head.appendChild(s)),s.textContent=r}Tne(Ene());const nI=document.getElementById("root");if(nI===null)throw new Error("Playground bootstrap failed: #root element is missing.");hz.createRoot(nI).render(v.jsx(x.StrictMode,{children:v.jsx(Ts,{menuSize:"md",children:v.jsx(Jte,{})})}));