diffhub 0.1.4 → 0.1.6

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 (123) hide show
  1. package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/web/.next/app-path-routes-manifest.json +2 -1
  3. package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
  4. package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/apps/web/.next/routes-manifest.json +9 -3
  6. package/.next/standalone/apps/web/.next/server/app/_global-error/page.js +2 -2
  7. package/.next/standalone/apps/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/apps/web/.next/server/app/_not-found/page.js +2 -2
  16. package/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  19. package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +11 -11
  20. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  21. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  22. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  23. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  24. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  25. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  26. package/.next/standalone/apps/web/.next/server/app/api/comments/route.js +3 -2
  27. package/.next/standalone/apps/web/.next/server/app/api/comments/route.js.nft.json +1 -1
  28. package/.next/standalone/apps/web/.next/server/app/api/diff/route.js +3 -4
  29. package/.next/standalone/apps/web/.next/server/app/api/diff/route.js.nft.json +1 -1
  30. package/.next/standalone/apps/web/.next/server/app/api/discard/route.js +3 -3
  31. package/.next/standalone/apps/web/.next/server/app/api/discard/route.js.nft.json +1 -1
  32. package/.next/standalone/apps/web/.next/server/app/api/file/route.js +3 -3
  33. package/.next/standalone/apps/web/.next/server/app/api/file/route.js.nft.json +1 -1
  34. package/.next/standalone/apps/web/.next/server/app/api/files/route.js +3 -3
  35. package/.next/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
  36. package/.next/standalone/apps/web/.next/server/app/api/health/route/app-paths-manifest.json +3 -0
  37. package/.next/standalone/apps/web/.next/server/app/api/health/route.js +6 -0
  38. package/.next/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -0
  39. package/.next/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +3 -0
  40. package/.next/standalone/apps/web/.next/server/app/api/watch/route/app-paths-manifest.json +3 -0
  41. package/.next/standalone/apps/web/.next/server/app/api/watch/route/build-manifest.json +9 -0
  42. package/.next/standalone/apps/web/.next/server/app/api/watch/route/server-reference-manifest.json +4 -0
  43. package/.next/standalone/apps/web/.next/server/app/api/watch/route.js +6 -0
  44. package/.next/standalone/apps/web/.next/server/app/api/watch/route.js.map +5 -0
  45. package/.next/standalone/apps/web/.next/server/app/api/{open → watch}/route.js.nft.json +1 -1
  46. package/.next/standalone/apps/web/.next/server/app/api/watch/route_client-reference-manifest.js +3 -0
  47. package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js +2 -1
  48. package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  49. package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
  50. package/.next/standalone/apps/web/.next/server/app/index.rsc +12 -12
  51. package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  52. package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +12 -12
  53. package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
  54. package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +6 -6
  55. package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  56. package/.next/standalone/apps/web/.next/server/app/page.js +2 -2
  57. package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
  58. package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/apps/web/.next/server/app-paths-manifest.json +2 -1
  60. package/.next/standalone/apps/web/.next/server/chunks/0fuv_next_0e28~xv._.js +13 -0
  61. package/.next/standalone/apps/web/.next/server/chunks/[externals]__11vad82._.js +3 -0
  62. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0.w.o06._.js +4 -0
  63. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__01xaw-k._.js +4 -0
  64. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__09jw.a~._.js +4 -0
  65. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0f~jrb-._.js +3 -0
  66. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0gx-yyt._.js +4 -0
  67. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0h91.i1._.js +3 -0
  68. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0pdu84y._.js +3 -0
  69. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0rv27~3._.js +4 -0
  70. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__110z8gu._.js +20 -0
  71. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__11uz7s9._.js +3 -0
  72. package/.next/standalone/apps/web/.next/server/chunks/{_0r24f4c._.js → _0jcmjdn._.js} +31 -4
  73. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_comments_route_actions_0cubv9d.js +1 -1
  74. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_diff_route_actions_03v97p2.js +1 -1
  75. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_discard_route_actions_0atmzwp.js +1 -1
  76. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_file_route_actions_00.gqla.js +1 -1
  77. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_files_route_actions_0ywjjl0.js +1 -1
  78. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_health_route_actions_08i7v0h.js +3 -0
  79. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_watch_route_actions_0k9olin.js +3 -0
  80. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_favicon_ico_route_actions_0h5n1et.js +1 -1
  81. package/.next/standalone/apps/web/.next/server/chunks/ssr/{0fuv_next_dist_0msbqso._.js → [root-of-the-server]__0djkqf8._.js} +3 -3
  82. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0giwc4b._.js +1 -1
  83. package/.next/standalone/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0licei1._.js → [root-of-the-server]__0t1vjyl._.js} +2 -2
  84. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0oc3qg_._.js +31 -3
  85. package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app__global-error_page_actions_0.u5cfa.js +1 -1
  86. package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app__not-found_page_actions_0appun9.js +1 -1
  87. package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_page_actions_0rm5_5w.js +1 -1
  88. package/.next/standalone/apps/web/.next/server/functions-config-manifest.json +13 -1
  89. package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
  90. package/.next/standalone/apps/web/.next/server/middleware.js +5 -0
  91. package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
  92. package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  93. package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
  94. package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  95. package/.next/standalone/apps/web/.next/static/chunks/0_87y4ku2u.g6.js +44 -0
  96. package/.next/standalone/apps/web/.next/static/chunks/0lo6jalz5wqe-.css +3 -0
  97. package/.next/standalone/apps/web/.next/static/chunks/{080bf48.keyld.js → 0tp4_-fc0.o0m.js} +1 -1
  98. package/.next/standalone/apps/web/.next/static/chunks/{0qp8t.3t~v6um.js → 129j.vkoufmaw.js} +1 -1
  99. package/.next/standalone/apps/web/.next/static/f0Q3TSdyAWb6O9i9BUoq8/_clientMiddlewareManifest.js +6 -0
  100. package/.next/standalone/apps/web/package.json +10 -4
  101. package/.next/standalone/apps/web/server.js +7 -1
  102. package/bin/diffhub.mjs +924 -75
  103. package/package.json +10 -4
  104. package/.next/standalone/apps/web/.next/server/app/api/open/route/app-paths-manifest.json +0 -3
  105. package/.next/standalone/apps/web/.next/server/app/api/open/route.js +0 -6
  106. package/.next/standalone/apps/web/.next/server/app/api/open/route_client-reference-manifest.js +0 -3
  107. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__01.zj5h._.js +0 -3
  108. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__05ejtyr._.js +0 -3
  109. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0e2dp4h._.js +0 -3
  110. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0egk6ui._.js +0 -3
  111. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0i6i-~n._.js +0 -3
  112. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0l9skgg._.js +0 -3
  113. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0sv4hr9._.js +0 -3
  114. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0tbrp5x._.js +0 -13
  115. package/.next/standalone/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_open_route_actions_0pjyc8r.js +0 -3
  116. package/.next/standalone/apps/web/.next/static/AIw7gAubH_UEr9lUympAt/_clientMiddlewareManifest.js +0 -1
  117. package/.next/standalone/apps/web/.next/static/chunks/0b4pujbysgmxg.js +0 -16
  118. package/.next/standalone/apps/web/.next/static/chunks/130i667qy-j80.css +0 -3
  119. /package/.next/standalone/apps/web/.next/server/app/api/{open → health}/route/build-manifest.json +0 -0
  120. /package/.next/standalone/apps/web/.next/server/app/api/{open → health}/route/server-reference-manifest.json +0 -0
  121. /package/.next/standalone/apps/web/.next/server/app/api/{open → health}/route.js.map +0 -0
  122. /package/.next/standalone/apps/web/.next/static/{AIw7gAubH_UEr9lUympAt → f0Q3TSdyAWb6O9i9BUoq8}/_buildManifest.js +0 -0
  123. /package/.next/standalone/apps/web/.next/static/{AIw7gAubH_UEr9lUympAt → f0Q3TSdyAWb6O9i9BUoq8}/_ssgManifest.js +0 -0
@@ -0,0 +1,44 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,n)=>{"use strict";var r=e.r(14499),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,l=r.useEffect,s=r.useLayoutEffect,a=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s(function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})},[e,n,t]),l(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),a(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,n)=>{"use strict";var r=e.r(14499),o=e.r(2239),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=o.useSyncExternalStore,s=r.useRef,a=r.useEffect,c=r.useMemo,u=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=l(e,(d=c(function(){function e(e){if(!a){if(a=!0,l=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(l,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(l=e,t):(l=e,s=n)}var l,s,a=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]))[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},30224,(e,t,n)=>{"use strict";t.exports=e.r(52822)},95936,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let r=e.r(90482);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},53254,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},80883,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return a}});let r=e.r(81099),o=e.r(72280),i=e.r(11268),l=e.r(53254),s=e.r(5051);function a({moduleIds:e}){if("u">typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,s.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},19525,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let r=e.r(81099),o=e.r(14499),i=e.r(95936),l=e.r(80883);function s(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},c=function(e){let t={...a,...e},n=(0,o.lazy)(()=>t.loader().then(s)),c=t.loading;function u(e){let s=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,u=a?o.Suspense:o.Fragment,d=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(u,{...a?{fallback:s}:{},children:d})}return u.displayName="LoadableComponent",u}},85869,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o}});let r=e.r(73355)._(e.r(19525));function o(e,t){let n={};"function"==typeof e&&(n.loader=e);let o={...n,...t};return(0,r.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},33357,e=>{"use strict";let t,n,r;var o,i,l,s,a,c,u,d,f,p,m=e.i(81099),h=e.i(13171),g=e.i(14499);function b(e,t){let n=g.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,...o},i)=>g.createElement(t,{ref:i,width:n,height:n,strokeWidth:r,color:e,...o}));return n.displayName=e,n}let v=b("CheckIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-check",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{d:"M20 6 9 17l-5-5"})))),x=b("ChevronDownIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9.5 6 6 6-6"})))),y=b("CopySimpleIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("rect",{width:11,height:11,x:9,y:9,stroke:"currentColor",strokeWidth:2,rx:2}),g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15H4c-1.1046 0-2-.8954-2-2V4c0-1.1046.8954-2 2-2h9c1.1046 0 2 .8954 2 2v1"})))),w=b("SunIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3V2m0 20v-1m6.3598-15.36.71-.71M4.9302 19.07l.71-.71M21 12h1M2 12h1m15.3598 6.36.71.71M4.9302 4.93l.71.71m9.8953 2.8245c1.9527 1.9526 1.9527 5.1184 0 7.071-1.9526 1.9527-5.1184 1.9527-7.071 0-1.9526-1.9526-1.9526-5.1184 0-7.071s5.1184-1.9526 7.071 0"})))),k=b("MoonIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.9638 12.7674c-1.1277.7773-2.4945 1.2324-3.9677 1.2324-3.866 0-7-3.1341-7-7 0-1.4731.455-2.84 1.2322-3.9676C6.6191 3.4228 3 7.2877 3 11.998c0 4.9695 4.0286 8.9981 8.9981 8.9981 4.7103 0 8.5753-3.6193 8.9657-8.2286"})))),S=b("SplitIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v18M8 5H6C4.3431 5 3 6.3431 3 8v8c0 1.6569 1.3431 3 3 3h2m8 0h2c1.6569 0 3-1.3431 3-3V8c0-1.6569-1.3431-3-3-3h-2"})))),E=b("ArrowRightIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-arrow-right",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{d:"M5 12h14M12 5l7 7-7 7"}))));var C=e.i(63178);function j(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}let R={};function T(e,t,n,r,o){let i={...P(e,R)};return t&&(i=N(i,t)),n&&(i=N(i,n)),r&&(i=N(i,r)),o&&(i=N(i,o)),i}function N(e,t){return O(t)?t(e):function(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case"style":e[n]=j(e.style,r);break;case"className":e[n]=L(e.className,r);break;default:!function(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return 111===n&&110===r&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}(n,r)?e[n]=r:e[n]=function(e,t){return t?e?n=>{var r;if(null!=(r=n)&&"object"==typeof r&&"nativeEvent"in r){M(n);let r=t(n);return n.baseUIHandlerPrevented||e?.(n),r}let o=t(n);return e?.(n),o}:t:e}(e[n],r)}}return e}(e,t)}function O(e){return"function"==typeof e}function P(e,t){return O(e)?e(t):e??R}function M(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function L(e,t){return t?e?t+" "+e:t:e}e.i(24062);let A=function(e,...t){let n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`},I={};function z(e,t){let n=g.useRef(I);return n.current===I&&(n.current=e(t)),n}function D(e,t,n,r){var o,i,l,s,a;let c=z($).current;return o=c,i=e,l=t,s=n,a=r,(o.refs[0]!==i||o.refs[1]!==l||o.refs[2]!==s||o.refs[3]!==a)&&_(c,[e,t,n,r]),c.callback}function $(){return{callback:null,cleanup:null,refs:[]}}function _(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let o=t[e];if(null!=o)switch(typeof o){case"function":{let t=o(n);"function"==typeof t&&(r[e]=t);break}case"object":o.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(null!=n)switch(typeof n){case"function":{let t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}let B=parseInt(g.version,10);function F(e){if(!g.isValidElement(e))return null;let t=e.props;return(B>=19?t?.ref:e.ref)??null}function H(){}Object.freeze([]);let W=Object.freeze({});function V(e,t,n={}){let r=t.render,o=function(e,t={}){var n,r,o;let{className:i,style:l,render:s}=e,{state:a=W,ref:c,props:u,stateAttributesMapping:d,enabled:f=!0}=t,p=f?"function"==typeof i?i(a):i:void 0,m=f?"function"==typeof l?l(a):l:void 0,h=f?function(e,t){let n={};for(let r in e){let o=e[r];if(t?.hasOwnProperty(r)){let e=t[r](o);null!=e&&Object.assign(n,e);continue}!0===o?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}(a,d):W,g=f?j(h,Array.isArray(u)?function(e){if(0===e.length)return R;if(1===e.length)return P(e[0],R);let t={...P(e[0],R)};for(let n=1;n<e.length;n+=1)t=N(t,e[n]);return t}(u):u)??W:W;if("u">typeof document)if(f)if(Array.isArray(c)){let e;n=[g.ref,F(s),...c],r=e=z($).current,o=n,(r.refs.length!==o.length||r.refs.some((e,t)=>e!==o[t]))&&_(e,n),g.ref=e.callback}else g.ref=D(g.ref,F(s),c);else D(null,null);return f?(void 0!==p&&(g.className=L(g.className,p)),void 0!==m&&(g.style=j(g.style,m)),g):W}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){if("function"==typeof t)return t(n,r);let e=T(n,t.props);e.ref=n.ref;let o=t;return o?.$$typeof===U&&(o=g.Children.toArray(t)[0]),g.cloneElement(o,e)}if(e&&"string"==typeof e){var o,i;return o=e,i=n,"button"===o?(0,g.createElement)("button",{type:"button",...i,key:i.key}):"img"===o?(0,g.createElement)("img",{alt:"",...i,key:i.key}):g.createElement(o,i)}throw Error(A(8))}(e,r,o,n.state??W)}let U=Symbol.for("react.lazy");function q(e){return V(e.defaultTagName??"div",e,e)}function K(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=t);return r}let X=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Y=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return K(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(e=>{let t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;let l=X(t)||X(r);return o[e][l]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return K(e,l,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):({...i,...s})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)},G=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Z=[],J=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],o=n.nextPart.get(r);if(o){let n=J(e,t+1,o);if(n)return n}let i=n.validators;if(null===i)return;let l=0===t?e.join("-"):e.slice(t).join("-"),s=i.length;for(let e=0;e<s;e++){let t=i[e];if(t.validator(l))return t.classGroupId}},Q=(e,t)=>{let n=G();for(let r in e)ee(e[r],n,r,t);return n},ee=(e,t,n,r)=>{let o=e.length;for(let i=0;i<o;i++)et(e[i],t,n,r)},et=(e,t,n,r)=>{"string"==typeof e?en(e,t,n):"function"==typeof e?er(e,t,n,r):eo(e,t,n,r)},en=(e,t,n)=>{(""===e?t:ei(t,e)).classGroupId=n},er=(e,t,n,r)=>{el(e)?ee(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e}))},eo=(e,t,n,r)=>{let o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){let[i,l]=o[e];ee(l,ei(t,i),n,r)}},ei=(e,t)=>{let n=e,r=t.split("-"),o=r.length;for(let e=0;e<o;e++){let t=r[e],o=n.nextPart.get(t);o||(o=G(),n.nextPart.set(t,o)),n=o}return n},el=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,es=[],ea=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ec=/\s+/,eu=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=eu(e[r]))&&(n&&(n+=" "),n+=t);return n},ed=[],ef=e=>{let t=t=>t[e]||ed;return t.isThemeGetter=!0,t},ep=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,em=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ev=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ey=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ew=e=>eh.test(e),ek=e=>!!e&&!Number.isNaN(Number(e)),eS=e=>!!e&&Number.isInteger(Number(e)),eE=e=>e.endsWith("%")&&ek(e.slice(0,-1)),eC=e=>eg.test(e),ej=()=>!0,eR=e=>eb.test(e)&&!ev.test(e),eT=()=>!1,eN=e=>ex.test(e),eO=e=>ey.test(e),eP=e=>!eL(e)&&!eF(e),eM=e=>eY(e,eQ,eT),eL=e=>ep.test(e),eA=e=>eY(e,e0,eR),eI=e=>eY(e,e1,ek),ez=e=>eY(e,e5,ej),eD=e=>eY(e,e2,eT),e$=e=>eY(e,eZ,eT),e_=e=>eY(e,eJ,eO),eB=e=>eY(e,e3,eN),eF=e=>em.test(e),eH=e=>eG(e,e0),eW=e=>eG(e,e2),eV=e=>eG(e,eZ),eU=e=>eG(e,eQ),eq=e=>eG(e,eJ),eK=e=>eG(e,e3,!0),eX=e=>eG(e,e5,!0),eY=(e,t,n)=>{let r=ep.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},eG=(e,t,n=!1)=>{let r=em.exec(e);return!!r&&(r[1]?t(r[1]):n)},eZ=e=>"position"===e||"percentage"===e,eJ=e=>"image"===e||"url"===e,eQ=e=>"length"===e||"size"===e||"bg-size"===e,e0=e=>"length"===e,e1=e=>"number"===e,e2=e=>"family-name"===e,e5=e=>"number"===e||"weight"===e,e3=e=>"shadow"===e,e4=((e,...t)=>{let n,r,o,i,l=e=>{let t=r(e);if(t)return t;let i=((e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],s=e.trim().split(ec),a="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(c){a=t+(a.length>0?" "+a:a);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m||!(h=r(f))){a=t+(a.length>0?" "+a:a);continue}m=!1}let g=0===u.length?"":1===u.length?u[0]:i(u).join(":"),b=d?g+"!":g,v=b+h;if(l.indexOf(v)>-1)continue;l.push(v);let x=o(h,m);for(let e=0;e<x.length;++e){let t=x[e];l.push(b+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i};return i=s=>{var a;let c;return r=(n={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),o=(o,i)=>{n[o]=i,++t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}})((a=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t,n=[],r=0,o=0,i=0,l=e.length;for(let s=0;s<l;s++){let l=e[s];if(0===r&&0===o){if(":"===l){n.push(e.slice(i,s)),i=s+1;continue}if("/"===l){t=s;continue}}"["===l?r++:"]"===l?r--:"("===l?o++:")"===l&&o--}let s=0===n.length?e:e.slice(i),a=s,c=!1;return s.endsWith("!")?(a=s.slice(0,-1),c=!0):s.startsWith("!")&&(a=s.slice(1),c=!0),ea(n,c,a,t&&t>i?t-i:void 0)};if(t){let e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ea(es,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r})(a),sortModifiers:(c=new Map,a.orderSensitiveModifiers.forEach((e,t)=>{c.set(e,1e6+t)}),e=>{let t=[],n=[];for(let r=0;r<e.length;r++){let o=e[r],i="["===o[0],l=c.has(o);i||l?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(o)):n.push(o)}return n.length>0&&(n.sort(),t.push(...n)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:n}=e;return Q(n,t)})(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var n;let t,r,o;return -1===(n=e).slice(1,-1).indexOf(":")?void 0:(r=(t=n.slice(1,-1)).indexOf(":"),(o=t.slice(0,r))?"arbitrary.."+o:void 0)}let r=e.split("-"),o=+(""===r[0]&&r.length>1);return J(r,o,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],o=n[e];if(t){if(o){let e=Array(o.length+t.length);for(let t=0;t<o.length;t++)e[t]=o[t];for(let n=0;n<t.length;n++)e[o.length+n]=t[n];return e}return t}return o||Z}return n[e]||Z}}})(a)}).cache.get,o=n.cache.set,i=l,l(s)},(...e)=>i(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=eu(t))&&(o&&(o+=" "),o+=n);return o})(...e))})(()=>{let e=ef("color"),t=ef("font"),n=ef("text"),r=ef("font-weight"),o=ef("tracking"),i=ef("leading"),l=ef("breakpoint"),s=ef("container"),a=ef("spacing"),c=ef("radius"),u=ef("shadow"),d=ef("inset-shadow"),f=ef("text-shadow"),p=ef("drop-shadow"),m=ef("blur"),h=ef("perspective"),g=ef("aspect"),b=ef("ease"),v=ef("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...y(),eF,eL],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],E=()=>[eF,eL,a],C=()=>[ew,"full","auto",...E()],j=()=>[eS,"none","subgrid",eF,eL],R=()=>["auto",{span:["full",eS,eF,eL]},eS,eF,eL],T=()=>[eS,"auto",eF,eL],N=()=>["auto","min","max","fr",eF,eL],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...E()],L=()=>[ew,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],A=()=>[ew,"screen","full","dvw","lvw","svw","min","max","fit",...E()],I=()=>[ew,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],z=()=>[e,eF,eL],D=()=>[...y(),eV,e$,{position:[eF,eL]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",eU,eM,{size:[eF,eL]}],B=()=>[eE,eH,eA],F=()=>["","none","full",c,eF,eL],H=()=>["",ek,eH,eA],W=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[ek,eE,eV,e$],q=()=>["","none",m,eF,eL],K=()=>["none",ek,eF,eL],X=()=>["none",ek,eF,eL],Y=()=>[ek,eF,eL],G=()=>[ew,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[eC],breakpoint:[eC],color:[ej],container:[eC],"drop-shadow":[eC],ease:["in","out","in-out"],font:[eP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[eC],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[eC],shadow:[eC],spacing:["px",ek],text:[eC],"text-shadow":[eC],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ew,eL,eF,g]}],container:["container"],columns:[{columns:[ek,eL,eF,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{"inset-s":C(),start:C()}],end:[{"inset-e":C(),end:C()}],"inset-bs":[{"inset-bs":C()}],"inset-be":[{"inset-be":C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[eS,"auto",eF,eL]}],basis:[{basis:[ew,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ek,ew,"auto","initial","none",eL]}],grow:[{grow:["",ek,eF,eL]}],shrink:[{shrink:["",ek,eF,eL]}],order:[{order:[eS,"first","last","none",eF,eL]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...A()]}],"min-inline-size":[{"min-inline":["auto",...A()]}],"max-inline-size":[{"max-inline":["none",...A()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,eH,eA]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,eX,ez]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eE,eL]}],"font-family":[{font:[eW,eD,t]}],"font-features":[{"font-features":[eL]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,eF,eL]}],"line-clamp":[{"line-clamp":[ek,"none",eF,eI]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",eF,eL]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",eF,eL]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[ek,"from-font","auto",eF,eA]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ek,"auto",eF,eL]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",eF,eL]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",eF,eL]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},eS,eF,eL],radial:["",eF,eL],conic:[eS,eF,eL]},eq,e_]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ek,eF,eL]}],"outline-w":[{outline:["",ek,eH,eA]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,eK,eB]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",d,eK,eB]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ek,eA]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",f,eK,eB]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ek,eF,eL]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ek]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[eF,eL]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ek]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",eF,eL]}],filter:[{filter:["","none",eF,eL]}],blur:[{blur:q()}],brightness:[{brightness:[ek,eF,eL]}],contrast:[{contrast:[ek,eF,eL]}],"drop-shadow":[{"drop-shadow":["","none",p,eK,eB]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ek,eF,eL]}],"hue-rotate":[{"hue-rotate":[ek,eF,eL]}],invert:[{invert:["",ek,eF,eL]}],saturate:[{saturate:[ek,eF,eL]}],sepia:[{sepia:["",ek,eF,eL]}],"backdrop-filter":[{"backdrop-filter":["","none",eF,eL]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[ek,eF,eL]}],"backdrop-contrast":[{"backdrop-contrast":[ek,eF,eL]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ek,eF,eL]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ek,eF,eL]}],"backdrop-invert":[{"backdrop-invert":["",ek,eF,eL]}],"backdrop-opacity":[{"backdrop-opacity":[ek,eF,eL]}],"backdrop-saturate":[{"backdrop-saturate":[ek,eF,eL]}],"backdrop-sepia":[{"backdrop-sepia":["",ek,eF,eL]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",eF,eL]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ek,"initial",eF,eL]}],ease:[{ease:["linear","initial",b,eF,eL]}],delay:[{delay:[ek,eF,eL]}],animate:[{animate:["none",v,eF,eL]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,eF,eL]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[eF,eL,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",eF,eL]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",eF,eL]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ek,eH,eA,eI]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),e7=Y("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-lg border border-transparent bg-clip-padding font-sans font-medium text-sm outline-none transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-out focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-45 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-10 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",icon:"size-10","icon-lg":"size-11","icon-sm":"size-9 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),12px)]","icon-xs":"size-8 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3",input:"h-[var(--field-height)] gap-2 rounded-[var(--field-radius)] px-[var(--field-padding-x)] py-[var(--field-padding-y)]","input-sm":"h-[var(--field-height-sm)] gap-2 rounded-[var(--field-radius)] px-[var(--field-padding-x)] py-[var(--field-padding-y)]",lg:"h-11 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3.5 has-data-[icon=inline-start]:pl-3.5",sm:"h-9 gap-1 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-8 gap-1 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),10px)] px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95 aria-pressed:bg-primary/95",destructive:"bg-red-600 text-white hover:bg-red-700 focus-visible:border-red-600 focus-visible:ring-red-500/30 active:bg-red-800 aria-pressed:bg-red-800 dark:bg-red-500 dark:aria-pressed:bg-red-300 dark:active:bg-red-300 dark:hover:bg-red-400",destructiveSecondary:"border-red-200 text-red-700 hover:bg-red-50 active:bg-red-100 aria-pressed:bg-red-100 dark:border-red-800 dark:text-red-300 dark:aria-pressed:bg-red-950 dark:active:bg-red-950 dark:hover:bg-red-950/60",ghost:"hover:bg-muted hover:text-foreground active:bg-muted/80 aria-expanded:bg-muted aria-pressed:bg-muted/80 dark:aria-pressed:bg-muted/60 dark:active:bg-muted/60 dark:hover:bg-muted/50",input:"border-input bg-card font-normal font-sans text-base text-foreground leading-snug shadow-input hover:border-input-hover focus-visible:ring-2 focus-visible:ring-ring/15 focus-visible:ring-offset-1 focus-visible:ring-offset-background active:border-input-hover/80 aria-pressed:border-input-hover aria-invalid:border-destructive-foreground data-[placeholder]:text-placeholder-foreground",link:"text-primary underline-offset-4 hover:underline active:opacity-80 aria-pressed:underline aria-pressed:opacity-80",outline:"border-border bg-background hover:bg-muted hover:text-foreground active:bg-muted/80 aria-expanded:bg-muted aria-pressed:bg-muted/80 dark:border-input dark:bg-input/30 dark:aria-pressed:bg-input/60 dark:active:bg-input/60 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 active:bg-secondary/75 aria-expanded:bg-secondary aria-pressed:bg-secondary/75",success:"bg-green-600 text-white hover:bg-green-700 focus-visible:border-green-600 focus-visible:ring-green-500/30 active:bg-green-800 aria-pressed:bg-green-800 dark:bg-green-500 dark:aria-pressed:bg-green-300 dark:active:bg-green-300 dark:hover:bg-green-400",successSecondary:"border-green-200 text-green-700 hover:bg-green-50 active:bg-green-100 aria-pressed:bg-green-100 dark:border-green-800 dark:text-green-300 dark:aria-pressed:bg-green-950 dark:active:bg-green-950 dark:hover:bg-green-950/60",warning:"bg-yellow-600 text-white hover:bg-yellow-700 focus-visible:border-yellow-600 focus-visible:ring-yellow-500/30 active:bg-yellow-800 aria-pressed:bg-yellow-800 dark:bg-yellow-500 dark:text-yellow-950 dark:aria-pressed:bg-yellow-300 dark:active:bg-yellow-300 dark:hover:bg-yellow-400",warningSecondary:"border-yellow-200 text-yellow-700 hover:bg-yellow-50 active:bg-yellow-100 aria-pressed:bg-yellow-100 dark:border-yellow-800 dark:text-yellow-300 dark:aria-pressed:bg-yellow-950 dark:active:bg-yellow-950 dark:hover:bg-yellow-950/60"}}}),e6=e=>{let t,n,r,o,i,l,s,a,c,u=(0,h.c)(16);if(u[0]!==e){let{className:a,variant:c,size:d,asChild:f,children:p,...m}=e;n=p,s=void 0===c?"default":c,r=void 0===d?"default":d,t=void 0!==f&&f,l=q,o="button",i=T({className:((...e)=>e4(K(e)))(e7({className:a,size:r,variant:s}))},t?m:{...m,children:n}),u[0]=e,u[1]=t,u[2]=n,u[3]=r,u[4]=o,u[5]=i,u[6]=l,u[7]=s}else t=u[1],n=u[2],r=u[3],o=u[4],i=u[5],l=u[6],s=u[7];let d=t?n:void 0;return u[8]!==r||u[9]!==s?(a={size:r,slot:"button",variant:s},u[8]=r,u[9]=s,u[10]=a):a=u[10],u[11]!==o||u[12]!==i||u[13]!==d||u[14]!==a?(c={defaultTagName:o,props:i,render:d,state:a},u[11]=o,u[12]=i,u[13]=d,u[14]=a,u[15]=c):c=u[15],l(c)};e.s([],13136),e.i(13136);let e8=[];function e9(e){let t=(t,r)=>{let o,i=z(te).current;try{for(let e of(n=i,e8))e.before(i);for(let n of(o=e(t,r),e8))n.after(i);i.didInitialize=!0}finally{n=void 0}return o};return t.displayName=e.displayName||e.name,t}function te(){return{didInitialize:!1}}function tt(e){let t=g.useRef(!0);t.current&&(t.current=!1,e())}let tn="u">typeof document?g.useLayoutEffect:()=>{},tr=g.createContext(void 0);function to(e){let t=g.useContext(tr);if(void 0===t&&!e)throw Error(A(72));return t}function ti(){return"u">typeof window}function tl(e){return tc(e)?(e.nodeName||"").toLowerCase():"#document"}function ts(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ta(e){var t;return null==(t=(tc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function tc(e){return!!ti()&&(e instanceof Node||e instanceof ts(e).Node)}function tu(e){return!!ti()&&(e instanceof Element||e instanceof ts(e).Element)}function td(e){return!!ti()&&(e instanceof HTMLElement||e instanceof ts(e).HTMLElement)}function tf(e){return!(!ti()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ts(e).ShadowRoot)}function tp(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=tw(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function tm(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let th=/transform|translate|scale|rotate|perspective|filter/,tg=/paint|layout|strict|content/,tb=e=>!!e&&"none"!==e;function tv(e){let t=tu(e)?tw(e):e;return tb(t.transform)||tb(t.translate)||tb(t.scale)||tb(t.rotate)||tb(t.perspective)||!tx()&&(tb(t.backdropFilter)||tb(t.filter))||th.test(t.willChange||"")||tg.test(t.contain||"")}function tx(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function ty(e){return/^(html|body|#document)$/.test(tl(e))}function tw(e){return ts(e).getComputedStyle(e)}function tk(e){return tu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tS(e){if("html"===tl(e))return e;let t=e.assignedSlot||e.parentNode||tf(e)&&e.host||ta(e);return tf(t)?t.host:t}function tE(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=tS(t);return ty(n)?t.ownerDocument?t.ownerDocument.body:t.body:td(n)&&tp(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=ts(o);if(!i)return t.concat(o,tE(o,[],n));{let e=tC(l);return t.concat(l,l.visualViewport||[],tp(o)?o:[],e&&n?tE(e):[])}}function tC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let tj=g[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tR=tj&&tj!==g.useLayoutEffect?tj:e=>e();function tT(e){let t=z(tN).current;return t.next=e,tR(t.effect),t.trampoline}function tN(){let e={next:void 0,callback:tO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function tO(){}let tP="u">typeof navigator,tM=function(){if(!tP)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),tL=function(){if(!tP)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),tA=function(){if(!tP)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),tI="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),tz="MacIntel"===tM.platform&&tM.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(tM.platform);tP&&/firefox/i.test(tA);let tD=tP&&/apple/i.test(navigator.vendor);tP&&/Edg/i.test(tA);let t$=tP&&/android/i.test(tL)||/android/i.test(tA),t_=tP&&tL.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,tB=tA.includes("jsdom/"),tF="data-base-ui-focusable",tH="active",tW="selected",tV="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tU(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function tq(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&tf(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tK(e,t){if(!tu(e))return!1;if(t.hasElement(e))return!e.hasAttribute("data-trigger-disabled");for(let[,n]of t.entries())if(tq(n,e))return!n.hasAttribute("data-trigger-disabled");return!1}function tX(e){return"composedPath"in e?e.composedPath()[0]:e.target}function tY(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function tG(e){return td(e)&&e.matches(tV)}function tZ(e){return!!e&&"combobox"===e.getAttribute("role")&&tG(e)}function tJ(e){return e?e.hasAttribute(tF)?e:e.querySelector(`[${tF}]`)||e:null}function tQ(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function t0(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}function t1(e){return null!=e&&null!=e.clientX}let t2=[];function t5(e){g.useEffect(e,t2)}class t3{static create(){return new t3}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function t4(){let e=z(t3.create).current;return t5(e.disposeEffect),e}function t7(e){return e?.ownerDocument||document}function t6(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...t6(e,t.id,n)])}function t8(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}let t9=g.createContext(null),ne=g.createContext(null),nt=()=>g.useContext(t9)?.id||null,nn=e=>{let t=g.useContext(ne);return e??t};function nr(e,t,n,r){let o=!1,i=!1,l=r??W;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...l}}e.s(["cancelOpen",0,"cancel-open","chipRemovePress",0,"chip-remove-press","clearPress",0,"clear-press","closePress",0,"close-press","closeWatcher",0,"close-watcher","decrementPress",0,"decrement-press","disabled",0,"disabled","drag",0,"drag","escapeKey",0,"escape-key","focusOut",0,"focus-out","imperativeAction",0,"imperative-action","incrementPress",0,"increment-press","inputBlur",0,"input-blur","inputChange",0,"input-change","inputClear",0,"input-clear","inputPaste",0,"input-paste","inputPress",0,"input-press","itemPress",0,"item-press","keyboard",0,"keyboard","linkPress",0,"link-press","listNavigation",0,"list-navigation","none",0,"none","outsidePress",0,"outside-press","pointer",0,"pointer","scrub",0,"scrub","siblingOpen",0,"sibling-open","swipe",0,"swipe","trackPress",0,"track-press","triggerFocus",0,"trigger-focus","triggerHover",0,"trigger-hover","triggerPress",0,"trigger-press","wheel",0,"wheel","windowResize",0,"window-resize"],16162);var no=e.i(16162),no=no;function ni(e){return`data-base-ui-${e}`}let nl={intentional:"onClick",sloppy:"onPointerDown"};function ns(){return!1}function na(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),{dataRef:i}=n.context,{enabled:l=!0,escapeKey:s=!0,outsidePress:a=!0,outsidePressEvent:c="sloppy",referencePress:u=ns,referencePressEvent:d="sloppy",bubbles:f,externalTree:p}=t,m=nn(p),h=tT("function"==typeof a?a:()=>!1),b="function"==typeof a?h:a,v=!1!==b,x=tT(()=>c),y=g.useRef(!1),w=g.useRef(!1),k=g.useRef(!1),{escapeKey:S,outsidePress:E}={escapeKey:"boolean"==typeof f?f:f?.escapeKey??!1,outsidePress:"boolean"==typeof f?f:f?.outsidePress??!0},C=g.useRef(null),j=t4(),R=t4(),T=tT(()=>{R.clear(),i.current.insideReactTree=!1}),N=g.useRef(!1),O=g.useRef(""),P=tT(u),M=tT(e=>{if(!r||!l||!s||"Escape"!==e.key||N.current)return;let t=i.current.floatingContext?.nodeId,o=m?t6(m.nodesRef.current,t):[];if(!S&&o.length>0){let e=!0;if(o.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let a="nativeEvent"in e?e.nativeEvent:e,c=nr(no.escapeKey,a);n.setOpen(!1,c),S||c.isPropagationAllowed||e.stopPropagation()}),L=tT(()=>{i.current.insideReactTree=!0,R.start(0,T)});g.useEffect(()=>{if(!r||!l)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=E;let e=new t3,t=new t3;function a(){e.clear(),N.current=!0}function c(){e.start(5*!!tx(),()=>{N.current=!1})}function u(){k.current=!0,t.start(0,()=>{k.current=!1})}function d(){y.current=!1,w.current=!1}function f(){let e=O.current,t=x(),n="function"==typeof t?t():t;return"string"==typeof n?n:n["pen"!==e&&e?e:"mouse"]}function p(e){let t=i.current.floatingContext?.nodeId,r=m&&t6(m.nodesRef.current,t).some(t=>tY(e,t.context?.elements.floating));return tY(e,n.select("floatingElement"))||tY(e,n.select("domReferenceElement"))||r}function h(e){let r;if("intentional"===(r=f())&&"click"!==e.type||"sloppy"===r&&"click"===e.type||i.current.insideReactTree)return void T();let o=tX(e),l=`[${ni("inert")}]`,s=Array.from(t7(n.select("floatingElement")).querySelectorAll(l)),a=tu(o)?o.getRootNode():null;tf(a)&&(s=s.concat(Array.from(a.querySelectorAll(l))));let c=n.context.triggerElements;if(o&&(c.hasElement(o)||c.hasMatchingElement(e=>tq(e,o))))return;let u=tu(o)?o:null;for(;u&&!ty(u);){let e=tS(u);if(ty(e)||!tu(e))break;u=e}if(s.length&&tu(o)&&!o.matches("html,body")&&!tq(o,n.select("floatingElement"))&&s.every(e=>!tq(u,e)))return;if(td(o)&&!("touches"in e)){let t=ty(o),n=tw(o),r=/auto|scroll/,i=t||r.test(n.overflowX),l=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,a=l&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,c="rtl"===n.direction,u=a&&(c?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}if(p(e))return;if("intentional"===f()&&k.current){t.clear(),k.current=!1;return}if("function"==typeof b&&!b(e))return;let d=i.current.floatingContext?.nodeId,h=m?t6(m.nodesRef.current,d):[];if(h.length>0){let e=!0;if(h.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,nr(no.outsidePress,e)),T()}function g(e){O.current="touch";let t=tX(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!n.select("open")||!l||tY(e,n.select("floatingElement"))||tY(e,n.select("domReferenceElement")))return;let t=e.touches[0];t&&(C.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},j.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,r)})}function R(e){if(j.clear(),"pointerdown"===e.type&&(O.current=e.pointerType),"mousedown"===e.type&&C.current&&!C.current.dismissOnMouseDown)return;let t=tX(e);t?.addEventListener(e.type,function r(){if("pointerdown"===e.type)"sloppy"!==f()||"touch"===e.pointerType||!n.select("open")||!l||tY(e,n.select("floatingElement"))||tY(e,n.select("domReferenceElement"))||h(e);else h(e);t?.removeEventListener(e.type,r)})}function P(e){if(!y.current)return;let n=w.current;if(d(),"intentional"===f()){if("pointercancel"===e.type){n&&u();return}p(e)||(n?u():("function"!=typeof b||b(e))&&(t.clear(),k.current=!0,T()))}}function L(e){let t=tX(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!C.current||tY(e,n.select("floatingElement"))||tY(e,n.select("domReferenceElement")))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-C.current.startX),o=Math.abs(t.clientY-C.current.startY),i=Math.sqrt(r*r+o*o);i>5&&(C.current.dismissOnTouchEnd=!0),i>10&&(h(e),j.clear(),C.current=null)}(e),t?.removeEventListener(e.type,r)})}function A(e){let t=tX(e);t?.addEventListener(e.type,function r(){"sloppy"!==f()||!C.current||tY(e,n.select("floatingElement"))||tY(e,n.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&h(e),j.clear(),C.current=null),t?.removeEventListener(e.type,r)})}let I=t7(o);return s&&(I.addEventListener("keydown",M),I.addEventListener("compositionstart",a),I.addEventListener("compositionend",c)),v&&(I.addEventListener("click",R,!0),I.addEventListener("pointerdown",R,!0),I.addEventListener("pointerup",P,!0),I.addEventListener("pointercancel",P,!0),I.addEventListener("mousedown",R,!0),I.addEventListener("mouseup",P,!0),I.addEventListener("touchstart",g,!0),I.addEventListener("touchmove",L,!0),I.addEventListener("touchend",A,!0)),()=>{s&&(I.removeEventListener("keydown",M),I.removeEventListener("compositionstart",a),I.removeEventListener("compositionend",c)),v&&(I.removeEventListener("click",R,!0),I.removeEventListener("pointerdown",R,!0),I.removeEventListener("pointerup",P,!0),I.removeEventListener("pointercancel",P,!0),I.removeEventListener("mousedown",R,!0),I.removeEventListener("mouseup",P,!0),I.removeEventListener("touchstart",g,!0),I.removeEventListener("touchmove",L,!0),I.removeEventListener("touchend",A,!0)),e.clear(),t.clear(),d(),k.current=!1}},[i,o,s,v,b,r,l,S,E,M,T,x,m,n,j]),g.useEffect(T,[b,T]);let A=g.useMemo(()=>({onKeyDown:M,[nl[d]]:e=>{P()&&n.setOpen(!1,nr(no.triggerPress,e.nativeEvent))},..."intentional"!==d&&{onClick(e){P()&&n.setOpen(!1,nr(no.triggerPress,e.nativeEvent))}}}),[M,n,d,P]),I=tT(e=>{if(!r||!l||0!==e.button)return;let t=tX(e.nativeEvent);tq(n.select("floatingElement"),t)&&(y.current||(y.current=!0,w.current=!1))}),z=tT(e=>{!r||!l||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(w.current=!0)}),D=g.useMemo(()=>({onKeyDown:M,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),I(e)},onPointerDownCapture(e){L(),I(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[M,L,I,z]);return g.useMemo(()=>l?{reference:A,floating:D,trigger:A}:{},[l,A,D])}function nc(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),o=e.map(e=>e?.trigger),i=g.useCallback(t=>nu(t,e,"reference"),t),l=g.useCallback(t=>nu(t,e,"floating"),n),s=g.useCallback(t=>nu(t,e,"item"),r),a=g.useCallback(t=>nu(t,e,"trigger"),o);return g.useMemo(()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:s,getTriggerProps:a}),[i,l,s,a])}function nu(e,t,n){let r=new Map,o="item"===n,i={};for(let t in"floating"===n&&(i.tabIndex=-1,i[tF]=""),e)o&&e&&(t===tH||t===tW)||(i[t]=e[t]);for(let l=0;l<t.length;l+=1){let s,a=t[l]?.[n];(s="function"==typeof a?e?a(e):null:a)&&nd(i,s,o,r)}return nd(i,e,o,r),i}function nd(e,t,n,r){for(let o in t){let i=t[o];n&&(o===tH||o===tW)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),"function"==typeof i&&(r.get(o)?.push(i),e[o]=(...e)=>r.get(o)?.map(t=>t(...e)).find(e=>void 0!==e))):e[o]=i)}}let nf=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class np{static create(){return new np}static request(e){return nf.request(e)}static cancel(e){return nf.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=nf.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(nf.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}function nm(){let e=z(np.create).current;return t5(e.disposeEffect),e}var nh=e.i(72280);function ng(e){return null==e?e:"current"in e?e.current:e}let nb=((o={}).startingStyle="data-starting-style",o.endingStyle="data-ending-style",o),nv={[nb.startingStyle]:""},nx={[nb.endingStyle]:""},ny={transitionStatus:e=>"starting"===e?nv:"ending"===e?nx:null};function nw(e,t=!1,n=!0){let r=nm();return tT((o,i=null)=>{function l(){nh.flushSync(o)}r.cancel();let s=ng(e);if(null!=s)if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{function a(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||l()}).catch(()=>{let e=s.getAnimations();if(n){if(i?.aborted)return;l()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&a()})}if(t)return void function(){let e=nb.startingStyle;if(!s.hasAttribute(e))return r.request(a);let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),a())});t.observe(s,{attributes:!0,attributeFilter:[e]}),i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}();r.request(a)}})}function nk(e){let{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=tT(o),l=nw(r,n,!1);g.useEffect(()=>{if(!t)return;let e=new AbortController;return l(i,e.signal),()=>{e.abort()}},[t,n,i,l])}function nS(e,t,n,r){let o,i,l=n.useState("isMountedByTrigger",e),s=(o=g.useRef(null),i=g.useRef(null),g.useCallback(t=>{if(void 0!==e){if(null!==o.current){let e=o.current,t=i.current,r=n.context.triggerElements.getById(e);t&&r===t&&n.context.triggerElements.delete(e),o.current=null,i.current=null}null!==t&&(o.current=e,i.current=t,n.context.triggerElements.add(e,t))}},[n,e])),a=tT(t=>{if(s(t),!t||!n.select("open"))return;let o=n.select("activeTriggerId");o===e?n.update({activeTriggerElement:t,...r}):null==o&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return tn(()=>{l&&n.update({activeTriggerElement:t.current,...r})},[l,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:l}}function nE(e){let t=e.useState("open");tn(()=>{if(t&&!e.select("activeTriggerId")&&1===e.context.triggerElements.size){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function nC(e,t,n){let{mounted:r,setMounted:o,transitionStatus:i}=function(e,t=!1,n=!1){let[r,o]=g.useState(e&&t?"idle":void 0),[i,l]=g.useState(e);return e&&!i&&(l(!0),o("starting")),e||!i||"ending"===r||n||o("ending"),e||i||"ending"!==r||o(void 0),tn(()=>{if(!e&&i&&"ending"!==r&&n){let e=np.request(()=>{o("ending")});return()=>{np.cancel(e)}}},[e,i,r,n]),tn(()=>{if(!e||t)return;let n=np.request(()=>{o(void 0)});return()=>{np.cancel(n)}},[t,e]),tn(()=>{if(!e||!t)return;e&&i&&"idle"!==r&&o("starting");let n=np.request(()=>{o("idle")});return()=>{np.cancel(n)}},[t,e,i,o,r]),g.useMemo(()=>({mounted:i,setMounted:l,transitionStatus:r}),[i,r])}(e);t.useSyncedValues({mounted:r,transitionStatus:i});let l=tT(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return nk({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:i}}var nj=Symbol("NOT_FOUND"),nR=e=>Array.isArray(e)?e:[e],nT=0,nN=class{revision=nT;_value;_lastValue;_isEqual=nO;constructor(e,t=nO){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++nT)}};function nO(e,t){return e===t}function nP(e){return e instanceof nN||console.warn("Not a valid cell! ",e),e.value}var nM=(e,t)=>!1;function nL(){return function(e=nO){return new nN(null,e)}(nM)}var nA=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=nL()),nP(t)};Symbol();var nI=0,nz=Object.getPrototypeOf({}),nD=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,n$);tag=nL();tags={};children={};collectionTag=null;id=nI++},n$={get:(e,t)=>(function(){let{value:n}=e,r=Reflect.get(n,t);if("symbol"==typeof t||t in nz)return r;if("object"==typeof r&&null!==r){var o;let n=e.children[t];return void 0===n&&(n=e.children[t]=Array.isArray(o=r)?new n_(o):new nD(o)),n.tag&&nP(n.tag),n.proxy}{let n=e.tags[t];return void 0===n&&((n=e.tags[t]=nL()).value=r),nP(n),r}})(),ownKeys:e=>(nA(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},n_=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],nB);tag=nL();tags={};children={};collectionTag=null;id=nI++},nB={get:([e],t)=>("length"===t&&nA(e),n$.get(e,t)),ownKeys:([e])=>n$.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>n$.getOwnPropertyDescriptor(e,t),has:([e],t)=>n$.has(e,t)},nF=(e,t)=>e===t,nH="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function nW(){return{s:0,v:void 0,o:null,p:null}}function nV(e,t={}){let n,r=nW(),{resultEqualityCheck:o}=t,i=0;function l(){let t,l=r,{length:s}=arguments;for(let e=0;e<s;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=l.o;null===e&&(l.o=e=new WeakMap);let n=e.get(t);void 0===n?(l=nW(),e.set(t,l)):l=n}else{let e=l.p;null===e&&(l.p=e=new Map);let n=e.get(t);void 0===n?(l=nW(),e.set(t,l)):l=n}}let a=l;if(1===l.s)t=l.v;else if(t=e.apply(null,arguments),i++,o){let e=n?.deref?.()??n;null!=e&&o(e,t)&&(t=e,0!==i&&i--),n="object"==typeof t&&null!==t||"function"==typeof t?new nH(t):t}return a.s=1,a.v=t,t}return l.clearCache=()=>{r=nW(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function nU(e,...t){let n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r,o=0,i=0,l={},s=e.pop();"object"==typeof s&&(l=s,s=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let{memoize:a,memoizeOptions:c=[],argsMemoize:u=nV,argsMemoizeOptions:d=[],devModeChecks:f={}}={...n,...l},p=nR(c),m=nR(d),h=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${n}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),g=a(function(){return o++,s.apply(null,arguments)},...p);return Object.assign(u(function(){i++;let e=function(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(h,arguments);return r=g.apply(null,e)},...m),{resultFunc:s,memoizedResultFunc:g,dependencies:h,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>r,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:a,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var nq=nU(nV),nK=Object.assign((e,t=nq)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>nK});nU({memoize:function(e,t){let n,{equalityCheck:r=nF,maxSize:o=1,resultEqualityCheck:i}="object"==typeof t?t:{equalityCheck:t},l=function(e,t){if(null===e||null===t||e.length!==t.length)return!1;let{length:n}=e;for(let o=0;o<n;o++)if(!r(e[o],t[o]))return!1;return!0},s=0,a=o<=1?{get:e=>n&&l(n.key,e)?n.value:nj,put(e,t){n={key:e,value:t}},getEntries:()=>n?[n]:[],clear(){n=void 0}}:function(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return nj}return{get:r,put:function(t,o){r(t)===nj&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,l);function c(){let t=a.get(arguments);if(t===nj){if(t=e.apply(null,arguments),s++,i){let e=a.getEntries().find(e=>i(e.value,t));e&&(t=e.value,0!==s&&s--)}a.put(arguments,t)}return t}return c.clearCache=()=>{a.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});let nX=(e,t,n,r,o,i,...l)=>{let s;if(l.length>0)throw Error(A(1));if(e&&t&&n&&r&&o&&i)s=(l,s,a,c)=>i(e(l,s,a,c),t(l,s,a,c),n(l,s,a,c),r(l,s,a,c),o(l,s,a,c),s,a,c);else if(e&&t&&n&&r&&o)s=(i,l,s,a)=>o(e(i,l,s,a),t(i,l,s,a),n(i,l,s,a),r(i,l,s,a),l,s,a);else if(e&&t&&n&&r)s=(o,i,l,s)=>r(e(o,i,l,s),t(o,i,l,s),n(o,i,l,s),i,l,s);else if(e&&t&&n)s=(r,o,i,l)=>n(e(r,o,i,l),t(r,o,i,l),o,i,l);else if(e&&t)s=(n,r,o,i)=>t(e(n,r,o,i),r,o,i);else if(e)s=e;else throw Error("Missing arguments");return s};var nY=e.i(2239),nG=e.i(30224);let nZ=B>=19?function(e,t,r,o,i){let l,s=n;if(!s){let n;return n=g.useCallback(()=>t(e.getSnapshot(),r,o,i),[e,t,r,o,i]),(0,nY.useSyncExternalStore)(e.subscribe,n,n)}let a=s.syncIndex;return s.syncIndex+=1,s.didInitialize?(l=s.syncHooks[a]).store===e&&l.selector===t&&Object.is(l.a1,r)&&Object.is(l.a2,o)&&Object.is(l.a3,i)||(l.store!==e&&(s.didChangeStore=!0),l.store=e,l.selector=t,l.a1=r,l.a2=o,l.a3=i,l.didChange=!0):(l={store:e,selector:t,a1:r,a2:o,a3:i,value:t(e.getSnapshot(),r,o,i),didChange:!1},s.syncHooks.push(l)),l.value}:function(e,t,n,r,o){return(0,nG.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};e8.push({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){let r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,o))&&(t=!0,r.value=o,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,nY.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class nJ{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return nZ(this,e,t,n,r)}}class nQ extends nJ{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){g.useDebugValue(e),tn(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;tn(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;tn(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){g.useDebugValue(e);let n=void 0!==t;tn(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return g.useDebugValue(e),nZ(this,this.selectors[e],t,n,r)}useContextCallback(e,t){g.useDebugValue(e);let n=tT(t??H);this.context[e]=n}useStateSetter(e){let t=g.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n,r=(n="function"==typeof e?e:this.selectors[e])(this.state);return t(r,r,this),this.subscribe(e=>{let o=n(e);if(!Object.is(r,o)){let e=r;r=o,t(o,e,this)}})}}let n0={...g},n1=0,n2=n0.useId;function n5(e,t){if(void 0!==n2){let n=n2();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){let[n,r]=g.useState(e),o=e||n;return g.useEffect(()=>{null==n&&(n1+=1,r(`${t}-${n1}`))},[n,t]),o}(e,t)}let n3={open:nX(e=>e.open),domReferenceElement:nX(e=>e.domReferenceElement),referenceElement:nX(e=>e.positionReference??e.referenceElement),floatingElement:nX(e=>e.floatingElement),floatingId:nX(e=>e.floatingId)};class n4 extends nQ{constructor(e){const{nested:t,noEmit:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:function(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(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)}}}(),nested:t,noEmit:n,triggerElements:o},n3)}setOpen=(e,t)=>{if((!e||!this.state.open||t0(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)}this.context.onOpenChange?.(e,t)}}function n7(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=n5(),l=null!=nt(),s=t.useState("open"),a=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=z(()=>new n4({open:s,referenceElement:a,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:l,noEmit:n})).current;return tn(()=>{let e={open:s,floatingId:i,referenceElement:a,floatingElement:c};tu(a)&&(e.domReferenceElement=a),d.state.positionReference===d.state.referenceElement&&(e.positionReference=a),d.update(e)},[s,i,a,c,d]),d.context.onOpenChange=o,d.context.nested=l,d.context.noEmit=n,d}var no=no;class n6{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function n8(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new n4({open:!1,floatingElement:null,referenceElement:null,triggerElements:new n6,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:W,inactiveTriggerProps:W,popupProps:W}}let n9=nX(e=>e.triggerIdProp??e.activeTriggerId),re={open:nX(e=>e.openProp??e.open),mounted:nX(e=>e.mounted),transitionStatus:nX(e=>e.transitionStatus),floatingRootContext:nX(e=>e.floatingRootContext),preventUnmountingOnClose:nX(e=>e.preventUnmountingOnClose),payload:nX(e=>e.payload),activeTriggerId:n9,activeTriggerElement:nX(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:nX((e,t)=>void 0!==t&&n9(e)===t),isOpenedByTrigger:nX((e,t)=>void 0!==t&&n9(e)===t&&e.open),isMountedByTrigger:nX((e,t)=>void 0!==t&&n9(e)===t&&e.mounted),triggerProps:nX((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:nX(e=>e.popupProps),popupElement:nX(e=>e.popupElement),positionerElement:nX(e=>e.positionerElement)},rt={...re,disabled:nX(e=>e.disabled),instantType:nX(e=>e.instantType),isInstantPhase:nX(e=>e.isInstantPhase),trackCursorAxis:nX(e=>e.trackCursorAxis),disableHoverablePopup:nX(e=>e.disableHoverablePopup),lastOpenChangeReason:nX(e=>e.openChangeReason),closeOnClick:nX(e=>e.closeOnClick),closeDelay:nX(e=>e.closeDelay),hasViewport:nX(e=>e.hasViewport)};class rn extends nQ{constructor(e){super({...n8(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:g.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new n6},rt)}setOpen=(e,t)=>{let n=t.reason,r=n===no.triggerHover,o=e&&n===no.triggerFocus,i=!e&&(n===no.triggerPress||n===no.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let l=()=>{let r={open:e,openChangeReason:n};o?r.instantType="focus":i?r.instantType="dismiss":n===no.triggerHover&&(r.instantType=void 0);let l=t.trigger?.id??null;(l||e)&&(r.activeTriggerId=l,r.activeTriggerElement=t.trigger??null),this.update(r)};r?nh.flushSync(l):l()};static useStore(e,t){let n=z(()=>new rn(t)).current,r=e??n,o=n7({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=o,r}}var no=no;let rr=e9(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:o=!1,trackCursorAxis:i="none",actionsRef:l,onOpenChange:s,onOpenChangeComplete:a,handle:c,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=rn.useStore(c?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});tt(()=>{void 0===r&&!1===p.state.open&&!0===n&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",u),p.useContextCallback("onOpenChange",s),p.useContextCallback("onOpenChangeComplete",a);let h=p.useState("open"),b=!t&&h,v=p.useState("activeTriggerId"),x=p.useState("payload");p.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:o}),tn(()=>{h&&t&&p.setOpen(!1,nr(no.disabled))},[h,t,p]),p.useSyncedValue("disabled",t),nE(p);let{forceUnmount:y,transitionStatus:w}=nC(b,p),k=p.useState("isInstantPhase"),S=p.useState("instantType"),E=p.useState("lastOpenChangeReason"),C=g.useRef(null);tn(()=>{"ending"===w&&E===no.none||"ending"!==w&&k?("delay"!==S&&(C.current=S),p.set("instantType","delay")):null!==C.current&&(p.set("instantType",C.current),C.current=null)},[w,k,E,S,p]),tn(()=>{b&&null==v&&p.set("payload",void 0)},[p,v,b]);let j=g.useCallback(()=>{var e;let t;p.setOpen(!1,(e=p,(t=nr(no.imperativeAction)).preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},t))},[p]);g.useImperativeHandle(l,()=>({unmount:y,close:j}),[y,j]);let R=p.useState("floatingRootContext"),{getReferenceProps:T,getFloatingProps:N,getTriggerProps:O}=nc([na(R,{enabled:!t,referencePress:()=>p.select("closeOnClick")}),function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:s=!0,axis:a="both"}=t,c=g.useRef(!1),u=g.useRef(null),[d,f]=g.useState(),[p,m]=g.useState([]),h=tT((e,t,r)=>{if(!c.current&&(!l.current.openEvent||t1(l.current.openEvent))){var o,s;let c,u,f;n.set("positionReference",(o=r??i,s={x:e,y:t,axis:a,dataRef:l,pointerType:d},c=null,u=null,f=!1,{contextElement:o||void 0,getBoundingClientRect(){let e=o?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===s.axis||"both"===s.axis,n="y"===s.axis||"both"===s.axis,r=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&"touch"!==s.pointerType,i=e.width,l=e.height,a=e.x,d=e.y;return null==c&&s.x&&t&&(c=e.x-s.x),null==u&&s.y&&n&&(u=e.y-s.y),a-=c||0,d-=u||0,i=0,l=0,!f||r?(i="y"===s.axis?e.width:0,l="x"===s.axis?e.height:0,a=t&&null!=s.x?s.x:a,d=n&&null!=s.y?s.y:d):f&&!r&&(l="x"===s.axis?e.height:l,i="y"===s.axis?e.width:i),f=!0,{width:i,height:l,x:a,y:d,top:d,right:a+i,bottom:d+l,left:a}}}))}}),b=tT(e=>{r?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),v=tQ(d)?o:r,x=g.useCallback(()=>{if(!v||!s)return;let e=ts(o);function t(n){tq(o,tX(n))?(e.removeEventListener("mousemove",t),u.current=null):h(n.clientX,n.clientY)}if(!l.current.openEvent||t1(l.current.openEvent)){e.addEventListener("mousemove",t);let n=()=>{e.removeEventListener("mousemove",t),u.current=null};return u.current=n,n}n.set("positionReference",i)},[v,s,o,l,i,n,h]);g.useEffect(()=>x(),[x,p]),g.useEffect(()=>{s&&!o&&(c.current=!1)},[s,o]),g.useEffect(()=>{!s&&r&&(c.current=!0)},[s,r]);let y=g.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:b,onMouseEnter:b}},[b]);return g.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}(R,{enabled:!t&&"none"!==i,axis:"none"===i?void 0:i})]),P=g.useMemo(()=>T(),[T]),M=g.useMemo(()=>O(),[O]),L=g.useMemo(()=>N(),[N]);return p.useSyncedValues({activeTriggerProps:P,inactiveTriggerProps:M,popupProps:L}),(0,m.jsx)(tr.Provider,{value:p,children:"function"==typeof f?f({payload:x}):f})}),ro=((i={}).open="data-open",i.closed="data-closed",i[i.startingStyle=nb.startingStyle]="startingStyle",i[i.endingStyle=nb.endingStyle]="endingStyle",i.anchorHidden="data-anchor-hidden",i.side="data-side",i.align="data-align",i),ri=((l={}).popupOpen="data-popup-open",l.pressed="data-pressed",l),rl={[ri.popupOpen]:""};ri.popupOpen,ri.pressed;let rs={[ro.open]:""},ra={[ro.closed]:""},rc={[ro.anchorHidden]:""},ru={open:e=>e?rl:null},rd={open:e=>e?rs:ra,anchorHidden:e=>e?rc:null};function rf(e){return n5(e,"base-ui")}let rp=g.createContext(void 0),rm=.1*.1;function rh(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function rg(e,t,n,r,o,i,l,s,a,c){let u=!1;return rh(e,t,n,r,o,i)&&(u=!u),rh(e,t,o,i,l,s)&&(u=!u),rh(e,t,l,s,a,c)&&(u=!u),rh(e,t,a,c,n,r)&&(u=!u),u}function rb(e,t,n,r,o,i){let l=Math.min(n,o),s=Math.max(n,o),a=Math.min(r,i),c=Math.max(r,i);return e>=l&&e<=s&&t>=a&&t<=c}function rv(e,t,n){let r=null==n||tQ(n)?"function"==typeof e?e():e:0;return"number"==typeof r?r:r?.[t]}function rx(e){return"function"==typeof e?e():e}function ry(e,t){return t||"click"===e||"mousedown"===e}var no=no;let rw=g.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new t3,currentIdRef:{current:null},currentContextRef:{current:null}});function rk(e){let{children:t,delay:n,timeoutMs:r=0}=e,o=g.useRef(n),i=g.useRef(n),l=g.useRef(null),s=g.useRef(null),a=t4();return(0,m.jsx)(rw.Provider,{value:g.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:i,currentIdRef:l,timeoutMs:r,currentContextRef:s,timeout:a}),[r,a]),children:t})}var no=no;let rS=t_&&tD;function rE(e){let t=z(rC,e).current;return t.next=e,tn(t.effect),t}function rC(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var no=no;let rj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${tV}`;class rR{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 t3,this.restTimeout=new t3,this.handleCloseOptions=void 0}static create(){return new rR}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function rT(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function rN(e){let t=z(rR.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),t5(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}let rO={current:null},rP=((s={})[s.popupOpen=ri.popupOpen]="popupOpen",s.triggerDisabled="data-trigger-disabled",s),rM=(a=function(e,t){let{className:n,render:r,handle:o,payload:i,disabled:l,delay:s,closeOnClick:a=!0,closeDelay:c,id:u,...d}=e,f=to(!0),p=o?.store??f;if(!p)throw Error(A(82));let m=rf(u),h=p.useState("isTriggerActive",m),b=p.useState("isOpenedByTrigger",m),v=p.useState("floatingRootContext"),x=g.useRef(null),y=s??600,w=c??0,{registerTrigger:k,isMountedByThisTrigger:S}=nS(m,x,p,{payload:i,closeOnClick:a,closeDelay:w}),E=g.useContext(rp),{delayRef:C,isInstantPhase:j,hasProvider:R}=function(e,t={open:!1}){let n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:o}=t,{currentIdRef:i,delayRef:l,timeoutMs:s,initialDelayRef:a,currentContextRef:c,hasProvider:u,timeout:d}=g.useContext(rw),[f,p]=g.useState(!1);return tn(()=>{function e(){p(!1),c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,l.current=a.current}if(i.current&&!o&&i.current===r){if(p(!1),s)return d.start(s,()=>{n.select("open")||i.current&&i.current!==r||e()}),()=>{d.clear()};e()}},[o,r,i,l,s,a,c,d,n]),tn(()=>{if(!o)return;let e=c.current,t=i.current;d.clear(),c.current={onOpenChange:n.setOpen,setIsInstantPhase:p},i.current=r,l.current={open:0,close:rv(a.current,"close")},null!==t&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,nr(no.none))):(p(!1),e?.setIsInstantPhase(!1))},[o,r,n,i,l,s,a,c,d]),tn(()=>()=>{c.current=null},[c]),g.useMemo(()=>({hasProvider:u,delayRef:l,isInstantPhase:f}),[u,l,f])}(v,{open:b});p.useSyncedValue("isInstantPhase",j);let T=p.useState("disabled"),N=l??T,O=p.useState("trackCursorAxis"),P=function(e,t={}){let n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:i=!0,delay:l=0,handleClose:s=null,mouseOnly:a=!1,restMs:c=0,move:u=!0,triggerElementRef:d=rO,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=nn(f),b=rN(n),v=rE(s),x=rE(l),y=rE(c),w=rE(i);p&&(b.handleCloseOptions=v.current?.__options);let k=tT(()=>ry(r.current.openEvent?.type,b.interactedInside)),S=tT(e=>tK(e,n.context.triggerElements)),E=tT((e,t,r)=>{let o=n.context.triggerElements;return o.hasElement(t)?!e||!tq(e,t):!!tu(r)&&o.hasMatchingElement(e=>tq(e,r))&&(!e||!tq(e,r))}),C=g.useCallback((e,t=!0)=>{let r=rv(x.current,"close",b.pointerType);r?b.openChangeTimeout.start(r,()=>{n.setOpen(!1,nr(no.triggerHover,e)),h?.events.emit("floating.closed",e)}):t&&(b.openChangeTimeout.clear(),n.setOpen(!1,nr(no.triggerHover,e)),h?.events.emit("floating.closed",e))},[x,n,b,h]),j=tT(()=>{b.handler&&(t7(n.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0)});g.useEffect(()=>j,[j]);let R=tT(()=>{rT(b)});return g.useEffect(()=>{if(i)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(j(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}},[i,o,b,j]),g.useEffect(()=>{if(!i)return;let e=d.current??(p?n.select("domReferenceElement"):null);if(tu(e))return u&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",o),()=>{u&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",o)};function t(e){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,a&&!tQ(b.pointerType)||rx(y.current)>0&&!rv(x.current,"open"))return;let t=rv(x.current,"open",b.pointerType),r=e.currentTarget??null,o=n.select("domReferenceElement"),i=null!=r&&E(o,r,e.target),l=n.select("open"),s=!l||i;i&&l?n.setOpen(!0,nr(no.triggerHover,e,r)):t?b.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,nr(no.triggerHover,e,r))}):s&&n.setOpen(!0,nr(no.triggerHover,e,r))}function o(e){if(k())return void R();j();let t=t7(n.select("domReferenceElement"));b.restTimeout.clear(),b.restTimeoutPending=!1;let o=r.current.floatingContext??m?.();if(!S(e.relatedTarget)){if(v.current&&o){n.select("open")||b.openChangeTimeout.clear();let r=d.current;b.handler=v.current({...o,tree:h,x:e.clientX,y:e.clientY,onClose(){R(),j(),w.current&&!k()&&r===n.select("domReferenceElement")&&C(e,!0)}}),t.addEventListener("mousemove",b.handler),b.handler(e);return}"touch"===b.pointerType&&tq(n.select("floatingElement"),e.relatedTarget)||C(e)}}},[j,R,r,x,C,n,i,v,b,p,E,k,S,a,u,y,d,h,w,m]),g.useMemo(()=>{if(i)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,o=n.select("domReferenceElement"),i=n.select("open"),l=E(o,r,e.target);if(a&&!tQ(b.pointerType))return;let s=rx(y.current);function c(){if(b.restTimeoutPending=!1,k())return;let e=n.select("open");b.blockMouseMove||e&&!l||n.setOpen(!0,nr(no.triggerHover,t,r))}(!i||l)&&0!==s&&(!l&&b.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(b.restTimeout.clear(),"touch"===b.pointerType?nh.flushSync(()=>{c()}):l&&i?c():(b.restTimeoutPending=!0,b.restTimeout.start(s,c))))}};function e(e){b.pointerType=e.pointerType}},[i,b,k,E,a,n,y])}(v,{enabled:!N,mouseOnly:!0,move:!1,handleClose:p.useState("disableHoverablePopup")||"both"===O?null:function(e={}){let{blockPointerEvents:t=!1}=e,n=new t3,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:l,tree:s})=>{let a=r?.split("-")[0],c=!1,u=null,d=null,f="u">typeof performance?performance.now():0;return function(r){n.clear();let p=o.domReference,m=o.floating;if(!p||!m||null==a||null==e||null==t)return;let{clientX:h,clientY:g}=r,b=tX(r),v="mouseleave"===r.type,x=tq(m,b),y=tq(p,b);if(x&&(c=!0,!v))return;if(y&&(c=!1,!v)){c=!0;return}if(v&&tu(r.relatedTarget)&&tq(m,r.relatedTarget))return;function w(){return!!(s&&t6(s.nodesRef.current,l).length>0)}function k(){w()||(n.clear(),i())}if(w())return;let S=p.getBoundingClientRect(),E=m.getBoundingClientRect(),C=e>E.right-E.width/2,j=t>E.bottom-E.height/2,R=E.width>S.width,T=E.height>S.height,N=(R?S:E).left,O=(R?S:E).right,P=(T?S:E).top,M=(T?S:E).bottom;if("top"===a&&t>=S.bottom-1||"bottom"===a&&t<=S.top+1||"left"===a&&e>=S.right-1||"right"===a&&e<=S.left+1)return void k();let L=!1;switch(a){case"top":L=rb(h,g,N,S.top+1,O,E.bottom-1);break;case"bottom":L=rb(h,g,N,E.top+1,O,S.bottom-1);break;case"left":L=rb(h,g,E.right-1,M,S.left+1,P);break;case"right":L=rb(h,g,S.right-1,M,E.left+1,P)}if(L)return;if(c&&(!(h>=S.x)||!(h<=S.x+S.width)||!(g>=S.y)||!(g<=S.y+S.height))||!v&&function(e,t){let n=performance.now(),r=n-f;if(null===u||null===d||0===r)return u=e,d=t,f=n,!1;let o=e-u,i=t-d;return u=e,d=t,f=n,o*o+i*i<r*r*rm}(h,g))return void k();let A=!1;switch(a){case"top":{let n=R?.25:2,r=t+.5+1,o=C||R?E.bottom-.5:E.top,i=C?R?E.bottom-.5:E.top:E.bottom-.5;A=rg(h,g,R||C?e+n:e-n,r,R?e-n:C?e+n:e-n,r,E.left,o,E.right,i);break}case"bottom":{let n=R?.25:2,r=t-.5,o=C||R?E.top+.5:E.bottom,i=C?R?E.top+.5:E.bottom:E.top+.5;A=rg(h,g,R||C?e+n:e-n,r,R?e-n:C?e+n:e-n,r,E.left,o,E.right,i);break}case"left":{let n=T?.25:2,r=e+.5+1,o=j||T?E.right-.5:E.left,i=j?T?E.right-.5:E.left:E.right-.5;A=rg(h,g,o,E.top,i,E.bottom,r,T||j?t+n:t-n,r,T?t-n:j?t+n:t-n);break}case"right":{let n=T?.25:2,r=e-.5,o=j||T?E.left+.5:E.right,i=j?T?E.left+.5:E.right:E.left+.5;A=rg(h,g,r,T||j?t+n:t-n,r,T?t-n:j?t+n:t-n,o,E.top,i,E.bottom)}}A?c||n.start(40,k):k()}};return r.__options={blockPointerEvents:t},r}(),restMs(){let e=E?.delay,t="object"==typeof C.current?C.current.open:void 0,n=y;return R&&(n=0!==t?s??e??y:0),n},delay(){let e="object"==typeof C.current?C.current.close:void 0,t=w;return null==c&&R&&(t=e),{close:t}},triggerElementRef:x,isActiveTrigger:h});return V("button",e,{state:{open:b},ref:[t,k,x],props:[P,function(e,t={}){let n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:i=!0,delay:l}=t,s=g.useRef(!1),a=g.useRef(null),c=t4(),u=g.useRef(!0);g.useEffect(()=>{let e=n.select("domReferenceElement");if(!i)return;let t=ts(e);function r(){let e=n.select("domReferenceElement");!n.select("open")&&td(e)&&e===tU(t7(e))&&(s.current=!0)}function o(){u.current=!0}function l(){u.current=!1}return t.addEventListener("blur",r),rS&&(t.addEventListener("keydown",o,!0),t.addEventListener("pointerdown",l,!0)),()=>{t.removeEventListener("blur",r),rS&&(t.removeEventListener("keydown",o,!0),t.removeEventListener("pointerdown",l,!0))}},[n,i]),g.useEffect(()=>{if(i)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){if(e.reason===no.triggerPress||e.reason===no.escapeKey){let e=n.select("domReferenceElement");tu(e)&&(a.current=e,s.current=!0)}}},[r,i,n]);let d=g.useMemo(()=>({onMouseLeave(){s.current=!1,a.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(a.current===t)return;s.current=!1,a.current=null}let r=tX(e.nativeEvent);if(tu(r)){if(rS&&!e.relatedTarget){if(!u.current&&!tG(r))return}else if(!function(e){if(!e||tB)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(r))return}let o=tK(e.relatedTarget,n.context.triggerElements),{nativeEvent:i,currentTarget:d}=e,f="function"==typeof l?l():l;n.select("open")&&o||0===f||void 0===f?n.setOpen(!0,nr(no.triggerFocus,i,d)):c.start(f,()=>{s.current||n.setOpen(!0,nr(no.triggerFocus,i,d))})},onBlur(e){s.current=!1,a.current=null;let t=e.relatedTarget,r=e.nativeEvent,i=tu(t)&&t.hasAttribute(ni("focus-guard"))&&"outside"===t.getAttribute("data-type");c.start(0,()=>{let e=n.select("domReferenceElement"),l=tU(e?e.ownerDocument:document);!t&&l===e||tq(o.current.floatingContext?.refs.floating.current,l)||tq(e,l)||i||tK(t??l,n.context.triggerElements)||n.setOpen(!1,nr(no.triggerFocus,r))})}}),[o,n,c,l]);return g.useMemo(()=>i?{reference:d,trigger:d}:{},[i,d])}(v,{enabled:!N}).reference,p.useState("triggerProps",S),{onPointerDown(){p.set("closeOnClick",a)},id:m,[rP.triggerDisabled]:N?"":void 0},d],stateAttributesMapping:ru})},g.forwardRef(e9(a))),rL=g.createContext(void 0),rA={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},rI={...rA,position:"fixed",top:0,left:0};({...rA,position:"absolute"});let rz=g.forwardRef(function(e,t){let[n,r]=g.useState();return tn(()=>{tD&&r("button")},[]),(0,m.jsx)("span",{...e,ref:t,style:rI,"aria-hidden":!n||void 0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var rD='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] *)',r$="u"<typeof Element,r_=r$?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rB=!r$&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},rF=function(e,t){void 0===t&&(t=!0);var n,r=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):rF(e.parentNode))},rH=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},rW=function(e,t,n){if(rF(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(rD));return t&&r_.call(e,rD)&&r.unshift(e),r=r.filter(n)},rV=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!rF(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),s=rV(l.length?l:i.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:i,candidates:s})}else{r_.call(i,rD)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var a=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),c=!rF(a,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(a&&c){var u=rV(!0===a?i.children:a.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:i,candidates:u})}else o.unshift.apply(o,i.children)}}return r},rU=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},rq=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rH(e))&&!rU(e)?0:e.tabIndex},rK=function(e,t){var n=rq(e);return n<0&&t&&!rU(e)?0:n},rX=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},rY=function(e){return"INPUT"===e.tagName},rG=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},rZ=function(e){if(!e.name)return!0;var t,n=e.form||rB(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("u">typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=rG(t,e.form);return!o||o===e},rJ=function(e){return rY(e)&&"radio"===e.type&&!rZ(e)},rQ=function(e){var t,n,r,o,i,l,s,a=e&&rB(e),c=null==(t=a)?void 0:t.host,u=!1;if(a&&a!==e)for(u=!!(null!=(n=c)&&null!=(r=n.ownerDocument)&&r.contains(c)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!u&&c;)u=!!(null!=(l=c=null==(i=a=rB(c))?void 0:i.host)&&null!=(s=l.ownerDocument)&&s.contains(c));return u},r0=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},r1=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=r_.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r_.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return r0(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,s=rB(e);if(l&&!l.shadowRoot&&!0===r(l))return r0(e);e=e.assignedSlot?e.assignedSlot:l||s===e.ownerDocument?l:s.host}e=i}if(rQ(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},r2=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!r_.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},r5=function(e,t){return!(t.disabled||rY(t)&&"hidden"===t.type||r1(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||r2(t))},r3=function(e,t){return!(rJ(t)||0>rq(t))&&!!r5(e,t)},r4=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},r7=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=rK(i,o),s=o?r7(e.candidates):i;0===l?o?t.push.apply(t,s):t.push(i):n.push({documentOrder:r,tabIndex:l,item:e,isScope:o,content:s})}),n.sort(rX).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},r6=function(e,t){return r7((t=t||{}).getShadowRoot?rV([e],t.includeContainer,{filter:r3.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:r4}):rW(e,t.includeContainer,r3.bind(null,t)))},r8=function(e,t){return(t=t||{}).getShadowRoot?rV([e],t.includeContainer,{filter:r5.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):rW(e,t.includeContainer,r5.bind(null,t))},r9=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==r_.call(e,rD)&&r3(t,e)};let oe=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ot(e,t){let n=r6(e,oe()),r=n.length;if(0===r)return;let o=tU(t7(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function on(e){return ot(t7(e).body,1)||e}function or(e){return ot(t7(e).body,-1)||e}function oo(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!tq(n,r)}function oi(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var no=no;let ol={style:{transition:"none"}},os="data-base-ui-click-trigger",oa={fallbackAxisSide:"end"},oc={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ou=g.createContext(null),od=ni("portal");function of(e={}){let{ref:t,container:n,componentProps:r=W,elementProps:o}=e,i=n5(),l=g.useContext(ou),s=l?.portalNode,[a,c]=g.useState(null),[u,d]=g.useState(null),f=tT(e=>{null!==e&&d(e)}),p=g.useRef(null);tn(()=>{if(null===n){p.current&&(p.current=null,d(null),c(null));return}if(null==i)return;let e=(n&&(tc(n)?n:n.current))??s??document.body;if(null==e){p.current&&(p.current=null,d(null),c(null));return}p.current!==e&&(p.current=e,d(null),c(e))},[n,s,i]);let m=V("div",r,{ref:[t,f],props:[{id:i,[od]:""},o]});return{portalNode:u,portalSubtree:a&&m?nh.createPortal(m,a):null}}let op=g.forwardRef(function(e,t){let{children:n,container:r,className:o,render:i,renderGuards:l,...s}=e,{portalNode:a,portalSubtree:c}=of({container:r,ref:t,componentProps:e,elementProps:s}),u=g.useRef(null),d=g.useRef(null),f=g.useRef(null),p=g.useRef(null),[h,b]=g.useState(null),v=h?.modal,x=h?.open,y="boolean"==typeof l?l:!!h&&!h.modal&&h.open&&!!a;g.useEffect(()=>{if(a&&!v)return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){a&&e.relatedTarget&&oo(e)&&("focusin"===e.type?oi:function(e){r6(e,oe()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(a)}},[a,v]),g.useEffect(()=>{a&&!x&&oi(a)},[x,a]);let w=g.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:a,setFocusManagerState:b}),[a]);return(0,m.jsxs)(g.Fragment,{children:[c,(0,m.jsxs)(ou.Provider,{value:w,children:[y&&a&&(0,m.jsx)(rz,{"data-type":"outside",ref:u,onFocus:e=>{if(oo(e,a))f.current?.focus();else{let e=or(h?h.domReference:null);e?.focus()}}}),y&&a&&(0,m.jsx)("span",{"aria-owns":a.id,style:oc}),a&&nh.createPortal(n,a),y&&a&&(0,m.jsx)(rz,{"data-type":"outside",ref:d,onFocus:e=>{if(oo(e,a))p.current?.focus();else{let t=on(h?h.domReference:null);t?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,nr(no.focusOut,e.nativeEvent))}}})]})]})}),om=g.forwardRef(function(e,t){let{children:n,container:r,className:o,render:i,...l}=e,{portalNode:s,portalSubtree:a}=of({container:r,ref:t,componentProps:e,elementProps:l});return a||s?(0,m.jsxs)(g.Fragment,{children:[a,s&&nh.createPortal(n,s)]}):null}),oh=g.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return to().useState("mounted")||n?(0,m.jsx)(rL.Provider,{value:n,children:(0,m.jsx)(om,{ref:t,...r})}):null}),og=g.createContext(void 0);function ob(){let e=g.useContext(og);if(void 0===e)throw Error(A(71));return e}let ov=["top","right","bottom","left"],ox=Math.min,oy=Math.max,ow=Math.round,ok=Math.floor,oS=e=>({x:e,y:e}),oE={left:"right",right:"left",bottom:"top",top:"bottom"};function oC(e,t){return"function"==typeof e?e(t):e}function oj(e){return e.split("-")[0]}function oR(e){return e.split("-")[1]}function oT(e){return"x"===e?"y":"x"}function oN(e){return"y"===e?"height":"width"}function oO(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function oP(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let oM=["left","right"],oL=["right","left"],oA=["top","bottom"],oI=["bottom","top"];function oz(e){let t=oj(e);return oE[t]+e.slice(t.length)}function oD(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function o$(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function o_(e,t,n){let r,{reference:o,floating:i}=e,l=oO(t),s=oT(oO(t)),a=oN(s),c=oj(t),u="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[a]/2-i[a]/2;switch(c){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(oR(t)){case"start":r[s]-=p*(n&&u?-1:1);break;case"end":r[s]+=p*(n&&u?-1:1)}return r}async function oB(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=oC(t,e),m=oD(p),h=s[f?"floating"===d?"reference":"floating":d],g=o$(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),b="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await (null==i.isElement?void 0:i.isElement(v))&&await (null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},y=o$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:a}):b);return{top:(g.top-y.top+m.top)/x.y,bottom:(y.bottom-g.bottom+m.bottom)/x.y,left:(g.left-y.left+m.left)/x.x,right:(y.right-g.right+m.right)/x.x}}let oF=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:oB},a=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=o_(c,r,a),f=r,p=0,m={};for(let n=0;n<i.length;n++){let h=i[n];if(!h)continue;let{name:g,fn:b}=h,{x:v,y:x,data:y,reset:w}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=x?x:d,m[g]={...m[g],...y},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=o_(c,f,a)),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};function oH(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oW(e){return ov.some(t=>e[t]>=0)}let oV=new Set(["left","top"]);async function oU(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=oj(n),s=oR(n),a="y"===oO(n),c=oV.has(l)?-1:1,u=i&&a?-1:1,d=oC(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),a?{x:p*u,y:f*c}:{x:f*c,y:p*u}}function oq(e){let t=tw(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=td(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=ow(n)!==i||ow(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function oK(e){return tu(e)?e:e.contextElement}function oX(e){let t=oK(e);if(!td(t))return oS(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=oq(t),l=(i?ow(n.width):n.width)/r,s=(i?ow(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let oY=oS(0);function oG(e){let t=ts(e);return tx()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oY}function oZ(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=oK(e),s=oS(1);t&&(r?tu(r)&&(s=oX(r)):s=oX(e));let a=(void 0===(o=n)&&(o=!1),r&&(!o||r===ts(l))&&o)?oG(l):oS(0),c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(l){let e=ts(l),t=r&&tu(r)?ts(r):r,n=e,o=tC(n);for(;o&&r&&t!==n;){let e=oX(o),t=o.getBoundingClientRect(),r=tw(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=i,u+=l,o=tC(n=ts(o))}}return o$({width:d,height:f,x:c,y:u})}function oJ(e,t){let n=tk(e).scrollLeft;return t?t.left+n:oZ(ta(e)).left+n}function oQ(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oJ(e,n),y:n.top+t.scrollTop}}function o0(e,t,n){var r;let o;if("viewport"===t)o=function(e,t){let n=ts(e),r=ta(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;let e=tx();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}let c=oJ(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t){let t,n,i,l,s,a,c;r=ta(e),t=ta(r),n=tk(r),i=r.ownerDocument.body,l=oy(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=oy(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+oJ(r),c=-n.scrollTop,"rtl"===tw(i).direction&&(a+=oy(t.clientWidth,i.clientWidth)-l),o={width:l,height:s,x:a,y:c}}else if(tu(t)){let e,r,i,l,s,a;r=(e=oZ(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=td(t)?oX(t):oS(1),s=t.clientWidth*l.x,a=t.clientHeight*l.y,o={width:s,height:a,x:i*l.x,y:r*l.y}}else{let n=oG(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return o$(o)}function o1(e){return"static"===tw(e).position}function o2(e,t){if(!td(e)||"fixed"===tw(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ta(e)===n&&(n=n.ownerDocument.body),n}function o5(e,t){var n;let r=ts(e);if(tm(e))return r;if(!td(e)){let t=tS(e);for(;t&&!ty(t);){if(tu(t)&&!o1(t))return t;t=tS(t)}return r}let o=o2(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(tl(n)))&&o1(o);)o=o2(o,t);return o&&ty(o)&&o1(o)&&!tv(o)?r:o||function(e){let t=tS(e);for(;td(t)&&!ty(t);){if(tv(t))return t;if(tm(t))break;t=tS(t)}return null}(e)||r}let o3=async function(e){let t=this.getOffsetParent||o5,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=td(t),o=ta(t),i="fixed"===n,l=oZ(e,!0,i,t),s={scrollLeft:0,scrollTop:0},a=oS(0);if(r||!r&&!i)if(("body"!==tl(t)||tp(o))&&(s=tk(t)),r){let e=oZ(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=oJ(o));i&&!r&&o&&(a.x=oJ(o));let c=!o||r||i?oS(0):oQ(o,s);return{x:l.left+s.scrollLeft-a.x-c.x,y:l.top+s.scrollTop-a.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},o4={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=ta(r),s=!!t&&tm(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=oS(1),u=oS(0),d=td(r);if((d||!d&&!i)&&(("body"!==tl(r)||tp(l))&&(a=tk(r)),d)){let e=oZ(r);c=oX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=!l||d||i?oS(0):oQ(l,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-a.scrollTop*c.y+u.y+f.y}},getDocumentElement:ta,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?tm(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=tE(e,[],!1).filter(e=>tu(e)&&"body"!==tl(e)),o=null,i="fixed"===tw(e).position,l=i?tS(e):e;for(;tu(l)&&!ty(l);){let t=tw(l),n=tv(l);n||"fixed"!==t.position||(o=null),(i?n||o:!(!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||tp(l)&&!n&&function e(t,n){let r=tS(t);return!(r===n||!tu(r)||ty(r))&&("fixed"===tw(r).position||e(r,n))}(e,l)))?o=t:r=r.filter(e=>e!==l),l=tS(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=o0(t,i[0],o),s=l.top,a=l.right,c=l.bottom,u=l.left;for(let e=1;e<i.length;e++){let n=o0(t,i[e],o);s=oy(n.top,s),a=ox(n.right,a),c=ox(n.bottom,c),u=oy(n.left,u)}return{width:a-u,height:c-s,x:u,y:s}},getOffsetParent:o5,getElementRects:o3,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=oq(e);return{width:t,height:n}},getScale:oX,isElement:tu,isRTL:function(e){return"rtl"===tw(e).direction}};function o7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o6(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=oK(e),d=i||l?[...u?tE(u):[],...t?tE(t):[]]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let f=u&&a?function(e,t){let n,r=null,o=ta(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;let m={rootMargin:-ok(d)+"px "+-ok(o.clientWidth-(u+f))+"px "+-ok(o.clientHeight-(d+p))+"px "+-ok(u)+"px",threshold:oy(0,ox(1,a))||1},h=!0;function g(t){let r=t[0].intersectionRatio;if(r!==a){if(!h)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||o7(c,e.getBoundingClientRect())||l(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(u,n):null,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!c&&m.observe(u),t&&m.observe(t));let h=c?oZ(e):null;return c&&function t(){let r=oZ(e);h&&!o7(h,r)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}}var o8="u">typeof document?g.useLayoutEffect:function(){};function o9(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!o9(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!o9(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ie(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function it(e,t){let n=ie(e);return Math.round(t*n)/n}function ir(e){let t=g.useRef(e);return o8(()=>{t.current=e}),t}let io=g.createContext(void 0);function ii(){let e=g.useContext(io);return e?.direction??"ltr"}let il={name:"hide",async fn(e){var t,n,r;let o,{width:i,height:l,x:s,y:a}=e.rects.reference,c=await (void 0===(r=t)&&(r={}),{name:(o={name:"hide",options:r,async fn(e){let{rects:t,platform:n}=e,{strategy:o="referenceHidden",...i}=oC(r,e);switch(o){case"referenceHidden":{let r=oH(await n.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:oW(r)}}}case"escaped":{let r=oH(await n.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:oW(r)}}}default:return{}}}}).name,fn:o.fn,options:[t,n]}).fn(e);return{data:{referenceHidden:c.data?.referenceHidden||0===i&&0===l&&0===s&&0===a}}}},is={sideX:"left",sideY:"top"},ia={name:"adaptiveOrigin",async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:l,placement:s}=e,a=ts(o),c=a.getComputedStyle(o);if("0s"===c.transitionDuration||""===c.transitionDuration)return{x:t,y:n,data:is};let u=await i.getOffsetParent?.(o),d={width:0,height:0};if("fixed"===l&&a?.visualViewport)d={width:a.visualViewport.width,height:a.visualViewport.height};else if(u===a){let e=t7(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await i.isElement?.(u)&&(d=await i.getDimensions(u));let f=oj(s),p=t,m=n;return"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(m=d.height-(n+r.height)),{x:p,y:m,data:{sideX:"left"===f?"right":is.sideX,sideY:"top"===f?"bottom":is.sideY}}}};function ic(e,t,n){let r="inline-start"===e||"inline-end"===e;return({top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"})[t]}function iu(e,t,n){let{rects:r,placement:o}=e;return{side:ic(t,oj(o),n),align:oR(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function id(e){return null!=e&&"current"in e}function ip(e){return"starting"===e?ol:W}let im=g.forwardRef(function(e,t){let{render:n,className:r,anchor:o,positionMethod:i="absolute",side:l="top",align:s="center",sideOffset:a=0,alignOffset:c=0,collisionBoundary:u="clipping-ancestors",collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:h=!1,collisionAvoidance:b=oa,...v}=e,x=to(),y=function(){let e=g.useContext(rL);if(void 0===e)throw Error(A(70));return e}(),w=x.useState("open"),k=x.useState("mounted"),S=x.useState("trackCursorAxis"),E=x.useState("disableHoverablePopup"),C=x.useState("floatingRootContext"),j=x.useState("instantType"),R=x.useState("transitionStatus"),T=function(e){var t,n,r,o,i,l,s,a,c,u,d,f,p,m;let h,b,v,x,{anchor:y,positionMethod:w="absolute",side:k="bottom",sideOffset:S=0,align:E="center",alignOffset:C=0,collisionBoundary:j,collisionPadding:R=5,sticky:T=!1,arrowPadding:N=5,disableAnchorTracking:O=!1,keepMounted:P=!1,floatingRootContext:M,mounted:L,collisionAvoidance:A,shiftCrossAxis:I=!1,nodeId:D,adaptiveOrigin:$,lazyFlip:_=!1,externalTree:B}=e,[F,H]=g.useState(null);L||null===F||H(null);let W=A.side||"flip",V=A.align||"flip",U=A.fallbackAxisSide||"end",q="function"==typeof y?y:void 0,K=tT(q),X=q?K:y,Y=rE(y),G="rtl"===ii(),Z=F||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":G?"left":"right","inline-start":G?"right":"left"})[k],J="center"===E?Z:`${Z}-${E}`,Q=R,ee=+("bottom"===k),et=+("top"===k),en=+("right"===k),er=+("left"===k);"number"==typeof Q?Q={top:Q+ee,right:Q+er,bottom:Q+et,left:Q+en}:Q&&(Q={top:(Q.top||0)+ee,right:(Q.right||0)+er,bottom:(Q.bottom||0)+et,left:(Q.left||0)+en});let eo={boundary:"clipping-ancestors"===j?"clippingAncestors":j,padding:Q},ei=g.useRef(null),el=rE(S),es=rE(C),ea=[(t=e=>{let t=iu(e,k,G),n="function"==typeof el.current?el.current(t):el.current,r="function"==typeof es.current?es.current(t):es.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},n=["function"!=typeof S?S:0,"function"!=typeof C?C:0,G,k],void 0===(r=t)&&(r=0),{name:(h={name:"offset",options:r,async fn(e){var t,n;let{x:o,y:i,placement:l,middlewareData:s}=e,a=await oU(e,r);return l===(null==(t=s.offset)?void 0:t.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}).name,fn:h.fn,options:[t,n]})],ec="none"===V&&"shift"!==W,eu=!ec&&(T||I||"shift"===W),ed="none"===W?null:{name:(b={name:"flip",options:l=o={...eo,padding:{top:Q.top+1,right:Q.right+1,bottom:Q.bottom+1,left:Q.left+1},mainAxis:!I&&"flip"===W,crossAxis:"flip"===V&&"alignment",fallbackAxisSideDirection:U},async fn(e){var t,n,r,o,i,s,a,c;let u,d,f,{placement:p,middlewareData:m,rects:h,initialPlacement:g,platform:b,elements:v}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...C}=oC(l,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let j=oj(p),R=oO(g),T=oj(g)===g,N=await (null==b.isRTL?void 0:b.isRTL(v.floating)),O=w||(T||!E?[oz(g)]:(u=oz(g),[oP(g),u,oP(u)])),P="none"!==S;!w&&P&&O.push(...(d=oR(g),f=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?oL:oM;return t?oM:oL;case"left":case"right":return t?oA:oI;default:return[]}}(oj(g),"start"===S,N),d&&(f=f.map(e=>e+"-"+d),E&&(f=f.concat(f.map(oP)))),f));let M=[g,...O],L=await b.detectOverflow(e,C),A=[],I=(null==(n=m.flip)?void 0:n.overflows)||[];if(x&&A.push(L[j]),y){let e,t,n,r,o=(s=p,a=h,void 0===(c=N)&&(c=!1),e=oR(s),n=oN(t=oT(oO(s))),r="x"===t?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[n]>a.floating[n]&&(r=oz(r)),[r,oz(r)]);A.push(L[o[0]],L[o[1]])}if(I=[...I,{placement:p,overflows:A}],!A.every(e=>e<=0)){let e=((null==(r=m.flip)?void 0:r.index)||0)+1,t=M[e];if(t&&("alignment"!==y||R===oO(t)||I.every(e=>oO(e.placement)!==R||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(o=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(k){case"bestFit":{let e=null==(i=I.filter(e=>{if(P){let t=oO(e.placement);return t===R||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=g}if(p!==n)return{reset:{placement:n}}}return{}}}).name,fn:b.fn,options:[o,i]},ef=ec?null:(s=e=>{var t,n,r;let o=t7(e.elements.floating).documentElement;return{...eo,rootBoundary:I?{x:0,y:0,width:o.clientWidth,height:o.clientHeight}:void 0,mainAxis:"none"!==V,crossAxis:eu,limiter:T||I?void 0:{fn:(void 0===(r=t=e=>{if(!ei.current)return{};let{width:t,height:n}=ei.current.getBoundingClientRect(),r=oO(oj(e.placement)),o="y"===r?Q.left+Q.right:Q.top+Q.bottom;return{offset:("y"===r?t:n)/2+o/2}})&&(r={}),{options:r,fn(e){let{x:t,y:n,placement:o,rects:i,middlewareData:l}=e,{offset:s=0,mainAxis:a=!0,crossAxis:c=!0}=oC(r,e),u={x:t,y:n},d=oO(o),f=oT(d),p=u[f],m=u[d],h=oC(s,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var b,v;let e="y"===f?"width":"height",t=oV.has(oj(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(b=l.offset)?void 0:b[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(v=l.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}).fn,options:[t,n]}}},a=[eo,T,I,Q,V],void 0===(c=s)&&(c={}),{name:(v={name:"shift",options:c,async fn(e){let{x:t,y:n,placement:r,platform:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=oC(c,e),u={x:t,y:n},d=await o.detectOverflow(e,a),f=oO(oj(r)),p=oT(f),m=u[p],h=u[f];if(i){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=m+d[e],r=m-d[t];m=oy(n,ox(m,r))}if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=h+d[e],r=h-d[t];h=oy(n,ox(h,r))}let g=s.fn({...e,[p]:m,[f]:h});return{...g,data:{x:g.x-t,y:g.y-n,enabled:{[p]:i,[f]:l}}}}}).name,fn:v.fn,options:[s,a]});"shift"===W||"shift"===V||"center"===E?ea.push(ef,ed):ea.push(ed,ef),ea.push({name:(x={name:"size",options:f=u={...eo,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);let i=window.devicePixelRatio||1,{x:l,y:s,width:a,height:c}=r.reference,u=(Math.round((l+a)*i)-Math.round(l*i))/i,d=(Math.round((s+c)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${d}px`)}},async fn(e){var t,n;let r,o,{placement:i,rects:l,platform:s,elements:a}=e,{apply:c=()=>{},...u}=oC(f,e),d=await s.detectOverflow(e,u),p=oj(i),m=oR(i),h="y"===oO(i),{width:g,height:b}=l.floating;"top"===p||"bottom"===p?(r=p,o=m===(await (null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(o=p,r="end"===m?"top":"bottom");let v=b-d.top-d.bottom,x=g-d.left-d.right,y=ox(b-d[r],v),w=ox(g-d[o],x),k=!e.middlewareData.shift,S=y,E=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(E=x),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(S=v),k&&!m){let e=oy(d.left,0),t=oy(d.right,0),n=oy(d.top,0),r=oy(d.bottom,0);h?E=g-2*(0!==e||0!==t?e+t:oy(d.left,d.right)):S=b-2*(0!==n||0!==r?n+r:oy(d.top,d.bottom))}await c({...e,availableWidth:E,availableHeight:S});let C=await s.getDimensions(a.floating);return g!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}).name,fn:x.fn,options:[u,d]},(p=()=>({element:ei.current||document.createElement("div"),padding:N,offsetParent:"floating"}),m=[N],{name:"arrow",options:p,async fn(e){let{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:s}=e,{element:a,padding:c=0,offsetParent:u="real"}=oC(p,e)||{};if(null==a)return{};let d=oD(c),f={x:t,y:n},m=oT(oO(r)),h=oN(m),g=await i.getDimensions(a),b="y"===m,v=b?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[m]-f[m]-o.floating[h],y=f[m]-o.reference[m],w="real"===u?await i.getOffsetParent?.(a):l.floating,k=l.floating[v]||o.floating[h];k&&await i.isElement?.(w)||(k=l.floating[v]||o.floating[h]);let S=k/2-g[h]/2-1,E=Math.min(d[b?"top":"left"],S),C=Math.min(d[b?"bottom":"right"],S),j=k-g[h]-C,R=k/2-g[h]/2+(x/2-y/2),T=oy(E,ox(R,j)),N=!s.arrow&&null!=oR(r)&&R!==T&&o.reference[h]/2-(R<E?E:C)-g[h]/2<0,O=N?R<E?R-E:R-j:0;return{[m]:f[m]+O,data:{[m]:T,centerOffset:R-T-O,...N&&{alignmentOffset:O}},reset:N}},options:[p,m]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:i}=e,l=oj(r),s=oO(l),a=ei.current,c=n.arrow?.x||0,u=n.arrow?.y||0,d=a?.clientWidth||0,f=a?.clientHeight||0,p=c+d/2,m=u+f/2,h=Math.abs(n.shift?.y||0),g=o.reference.height/2,b="function"==typeof S?S(iu(e,k,G)):S,v=h>b,x={top:`${p}px calc(100% + ${b}px)`,bottom:`${p}px ${-b}px`,left:`calc(100% + ${b}px) ${m}px`,right:`${-b}px ${m}px`}[l],y=`${p}px ${o.reference.y+g-i}px`;return t.floating.style.setProperty("--transform-origin",eu&&"y"===s&&v?y:x),{}}},il,$),tn(()=>{!L&&M&&M.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[L,M]);let ep=g.useMemo(()=>({elementResize:!O&&"u">typeof ResizeObserver,layoutShift:!O&&"u">typeof IntersectionObserver}),[O]),{refs:em,elements:eh,x:eg,y:eb,middlewareData:ev,update:ex,placement:ey,context:ew,isPositioned:ek,floatingStyles:eS}=function(e={}){let{nodeId:t,externalTree:n}=e,r=function(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,o=n5(),i=null!=nt(),l=z(()=>new n4({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new n6,floatingId:o,nested:i,noEmit:!1})).current;return tn(()=>{let e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=tu(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),l.update(e)},[t,o,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=i,l.context.noEmit=!1,l}(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[l,s]=g.useState(null),a=g.useRef(null),c=nn(n);tn(()=>{i.domReference&&(a.current=i.domReference)},[i.domReference]);let u=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(r);o9(f,r)||p(r);let[m,h]=g.useState(null),[b,v]=g.useState(null),x=g.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=g.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),w=i||m,k=l||b,S=g.useRef(null),E=g.useRef(null),C=g.useRef(u),j=null!=a,R=ir(a),T=ir(o),N=ir(c),O=g.useCallback(()=>{var e,r;let o,i,l;if(!S.current||!E.current)return;let s={placement:t,strategy:n,middleware:f};T.current&&(s.platform=T.current),(e=S.current,r=E.current,o=new Map,l={...(i={platform:o4,...s}).platform,_c:o},oF(e,r,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==N.current};P.current&&!o9(C.current,t)&&(C.current=t,nh.flushSync(()=>{d(t)}))})},[f,t,n,T,N]);o8(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let P=g.useRef(!1);o8(()=>(P.current=!0,()=>{P.current=!1}),[]),o8(()=>{if(w&&(S.current=w),k&&(E.current=k),w&&k){if(R.current)return R.current(w,k,O);O()}},[w,k,O,R,j]);let M=g.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:y}),[x,y]),L=g.useMemo(()=>({reference:w,floating:k}),[w,k]),A=g.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=it(L.floating,u.x),r=it(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ie(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,L.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:O,refs:M,elements:L,floatingStyles:A}),[u,O,M,L,A])}({...e,elements:{...i,...l&&{reference:l}}}),d=g.useCallback(e=>{let t=tu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=g.useState(null),[m,h]=g.useState(null);o.useSyncedValue("referenceElement",f),o.useSyncedValue("domReferenceElement",tu(f)?f:null),o.useSyncedValue("floatingElement",m);let b=g.useCallback(e=>{(tu(e)||null===e)&&(a.current=e,p(e)),(tu(u.refs.reference.current)||null===u.refs.reference.current||null!==e&&!tu(e))&&u.refs.setReference(e)},[u.refs,p]),v=g.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),x=g.useMemo(()=>({...u.refs,setReference:b,setFloating:v,setPositionReference:d,domReference:a}),[u.refs,b,v,d]),y=g.useMemo(()=>({...u.elements,domReference:i.domReference}),[u.elements,i.domReference]),w=o.useState("open"),k=o.useState("floatingId"),S=g.useMemo(()=>({...u,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:k,refs:x,elements:y,nodeId:t,rootStore:o}),[u,x,y,t,o,w,k]);return tn(()=>{o.context.dataRef.current.floatingContext=S;let e=c?.nodesRef.current.find(e=>e.id===t);e&&(e.context=S)}),g.useMemo(()=>({...u,context:S,refs:x,elements:y,rootStore:o}),[u,x,y,S,o])}({rootContext:M,placement:J,middleware:ea,strategy:w,whileElementsMounted:P?void 0:(...e)=>o6(...e,ep),nodeId:D,externalTree:B}),{sideX:eE,sideY:eC}=ev.adaptiveOrigin||is,ej=ek?w:"fixed",eR=g.useMemo(()=>{let e=$?{position:ej,[eE]:eg,[eC]:eb}:{position:ej,...eS};return ek||(e.opacity=0),e},[$,ej,eE,eg,eC,eb,eS,ek]),eT=g.useRef(null);tn(()=>{if(!L)return;let e=Y.current,t="function"==typeof e?e():e,n=(id(t)?t.current:t)||null;n!==eT.current&&(em.setPositionReference(n),eT.current=n)},[L,em,X,Y]),g.useEffect(()=>{if(!L)return;let e=Y.current;"function"!=typeof e&&id(e)&&e.current!==eT.current&&(em.setPositionReference(e.current),eT.current=e.current)},[L,em,X,Y]),g.useEffect(()=>{if(P&&L&&eh.domReference&&eh.floating)return o6(eh.domReference,eh.floating,ex,ep)},[P,L,eh,ex,ep]);let eN=oj(ey),eO=ic(k,eN,G),eP=oR(ey)||"center",eM=!!ev.hide?.referenceHidden;tn(()=>{_&&L&&ek&&H(eN)},[_,L,ek,eN]);let eL=g.useMemo(()=>({position:"absolute",top:ev.arrow?.y,left:ev.arrow?.x}),[ev.arrow]),eA=ev.arrow?.centerOffset!==0;return g.useMemo(()=>({positionerStyles:eR,arrowStyles:eL,arrowRef:ei,arrowUncentered:eA,side:eO,align:eP,physicalSide:eN,anchorHidden:eM,refs:em,context:ew,isPositioned:ek,update:ex}),[eR,eL,ei,eA,eO,eP,eN,eM,em,ew,ek,ex])}({anchor:o,positionMethod:i,floatingRootContext:C,mounted:k,side:l,sideOffset:a,align:s,alignOffset:c,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:h,keepMounted:y,collisionAvoidance:b,adaptiveOrigin:x.useState("hasViewport")?ia:void 0}),N=g.useMemo(()=>{let e={};return(!w||"both"===S||E)&&(e.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...T.positionerStyles,...e}}},[w,S,E,k,T.positionerStyles]),O=g.useMemo(()=>({open:w,side:T.side,align:T.align,anchorHidden:T.anchorHidden,instant:"none"!==S?"tracking-cursor":j}),[w,T.side,T.align,T.anchorHidden,S,j]),P=g.useMemo(()=>({...O,arrowRef:T.arrowRef,arrowStyles:T.arrowStyles,arrowUncentered:T.arrowUncentered}),[O,T.arrowRef,T.arrowStyles,T.arrowUncentered]),M=V("div",e,{state:O,props:[N,ip(R),v],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:rd});return(0,m.jsx)(og.Provider,{value:P,children:M})});var no=no;let ih={...rd,...ny},ig=g.forwardRef(function(e,t){let{className:n,render:r,...o}=e,i=to(),{side:l,align:s}=ob(),a=i.useState("open"),c=i.useState("instantType"),u=i.useState("transitionStatus"),d=i.useState("popupProps"),f=i.useState("floatingRootContext");return nk({open:a,ref:i.context.popupRef,onComplete(){a&&i.context.onOpenChangeComplete?.(!0)}}),!function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:s=!0,closeDelay:a=0}=t,c=rN(n),u=nn(),d=nt(),f=tT(()=>ry(l.current.openEvent?.type,c.interactedInside)),p=tT(()=>{let e=l.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=tT(e=>tK(e,n.context.triggerElements)),h=g.useCallback(e=>{let t=rv(a,"close",c.pointerType),r=()=>{n.setOpen(!1,nr(no.triggerHover,e)),u?.events.emit("floating.closed",e)};t?c.openChangeTimeout.start(t,r):(c.openChangeTimeout.clear(),r())},[a,n,c,u]),b=tT(()=>{rT(c)}),v=tT(e=>{let t=tX(e);if(!(t&&t.closest(rj))){c.interactedInside=!1;return}c.interactedInside=t?.closest("[aria-haspopup]")!=null});tn(()=>{r||(c.pointerType=void 0,c.restTimeoutPending=!1,c.interactedInside=!1,b())},[r,c,b]),g.useEffect(()=>b,[b]),tn(()=>{if(s&&r&&c.handleCloseOptions?.blockPointerEvents&&p()&&tu(i)&&o){let e=t7(o),t=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;t&&(t.style.pointerEvents="");let n=c.handleCloseOptions?.getScope?.()??c.pointerEventsScopeElement??t??i.closest("[data-rootownerid]")??e.body;return!function(e,t){let{scopeElement:n,referenceElement:r,floatingElement:o}=t;rT(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}(c,{scopeElement:n,referenceElement:i,floatingElement:o}),()=>{b()}}},[s,r,i,o,c,p,u,d,b]);let x=t4();g.useEffect(()=>{if(s)return o&&(o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),o.addEventListener("pointerdown",v,!0)),()=>{o&&(o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),o.removeEventListener("pointerdown",v,!0)),u?.events.off("floating.closed",r)};function e(){c.openChangeTimeout.clear(),x.clear(),u?.events.off("floating.closed",r),b()}function t(e){if(u&&d&&t6(u.nodesRef.current,d).length>0)return void u.events.on("floating.closed",r);if(!m(e.relatedTarget)){if(c.handler)return void c.handler(e);b(),f()||h(e)}}function r(e){u&&d&&!(t6(u.nodesRef.current,d).length>0)&&x.start(0,()=>{u.events.off("floating.closed",r),n.setOpen(!1,nr(no.triggerHover,e)),u.events.emit("floating.closed",e)})}},[s,o,n,l,f,m,h,b,v,c,u,d,x])}(f,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")}),V("div",e,{state:{open:a,side:l,align:s,instant:c,transitionStatus:u},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[d,ip(u),o],stateAttributesMapping:ih})}),ib=g.forwardRef(function(e,t){let{className:n,render:r,...o}=e,i=to().useState("instantType"),{open:l,arrowRef:s,side:a,align:c,arrowUncentered:u,arrowStyles:d}=ob();return V("div",e,{state:{open:l,side:a,align:c,uncentered:u,instant:i},ref:[t,s],props:[{style:d,"aria-hidden":!0},o],stateAttributesMapping:rd})}),iv=((c={}).popupWidth="--popup-width",c.popupHeight="--popup-height",c);function ix(e){return B>=19?e:e?"true":void 0}function iy(e){let t=tw(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=td(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r;return(ow(n)!==i||ow(r)!==l)&&(n=i,r=l),{width:n,height:r}}let iw=()=>!0;function ik(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function iS(e,t){let n=[];for(let[r,o]of Object.entries(t))n.push(ik(e,r,o));return n.length?()=>{n.forEach(e=>e())}:H}function iE(e,t){let n="auto"===t?"auto":`${t.width}px`,r="auto"===t?"auto":`${t.height}px`;e.style.setProperty("--popup-width",n),e.style.setProperty("--popup-height",r)}function iC(e,t){let n="max-content"===t?"max-content":`${t.width}px`,r="max-content"===t?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",n),e.style.setProperty("--positioner-height",r)}let ij={activationDirection:e=>e?{"data-activation-direction":e}:null},iR=g.forwardRef(function(e,t){let{render:n,className:r,children:o,...i}=e,l=to(),s=ob(),a=l.useState("instantType"),{children:c,state:u}=function(e){let t,{store:n,side:r,cssVars:o,children:i}=e,l=ii(),s=n.useState("activeTriggerElement"),a=n.useState("activeTriggerId"),c=n.useState("open"),u=n.useState("payload"),d=n.useState("mounted"),f=n.useState("popupElement"),p=n.useState("positionerElement"),h=function(e){let[t,n]=g.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}(c?s:null),b=function(e,t){let[n,r]=g.useState(0),o=g.useRef(e),i=g.useRef(t),l=g.useRef(!1);return tn(()=>{let n=o.current,s=t!==i.current;e!==n?(r(e=>e+1),l.current=!s):l.current&&s&&(r(e=>e+1),l.current=!1),o.current=e,i.current=t},[e,t]),`${e??"current"}-${n}`}(a,u),v=g.useRef(null),[x,y]=g.useState(null),[w,k]=g.useState(null),S=g.useRef(null),E=g.useRef(null),C=nw(S,!0,!1),j=nm(),[R,T]=g.useState(null),[N,O]=g.useState(!1);tn(()=>(n.set("hasViewport",!0),()=>{n.set("hasViewport",!1)}),[n]);let P=tT(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),E.current?.style.setProperty("display","none")}),M=tT(e=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),E.current?.style.removeProperty("display"),e&&T(e)}),L=g.useRef(null);tn(()=>{var e,t;let n,r,o,i;s&&h&&s!==h&&L.current!==s&&v.current&&(y(v.current),O(!0),k((e=h,t=s,n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o={x:n.left+n.width/2,y:n.top+n.height/2},{horizontal:(i={x:r.left+r.width/2,y:r.top+r.height/2}).x-o.x,vertical:i.y-o.y})),j.request(()=>{nh.flushSync(()=>{O(!1)}),C(()=>{y(null),T(null),v.current=null})}),L.current=s)},[s,h,x,C,j]),tn(()=>{let e=S.current;if(!e)return;let t=document.createElement("div");for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));v.current=t});let A=null!=x;return t=A?(0,m.jsxs)(g.Fragment,{children:[(0,m.jsx)("div",{"data-previous":!0,inert:ix(!0),ref:E,style:{...R?{[o.popupWidth]:`${R.width}px`,[o.popupHeight]:`${R.height}px`}:null,position:"absolute"},"data-ending-style":N?void 0:""},"previous"),(0,m.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":N?"":void 0,children:i},b)]}):(0,m.jsx)("div",{"data-current":!0,ref:S,children:i},b),tn(()=>{let e=E.current;e&&x&&e.replaceChildren(...Array.from(x.childNodes))},[x]),!function(e){let{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=iw,onMeasureLayout:l,onMeasureLayoutComplete:s,side:a,direction:c}=e,u=nw(t,!0,!1),d=nm(),f=g.useRef(null),p=g.useRef(null),m=g.useRef(!0),h=g.useRef(H),b=tT(l),v=tT(s),x=g.useMemo(()=>{let e="top"===a,t="left"===a;return"rtl"===c?(e=e||"inline-end"===a,t=t||"inline-end"===a):(e=e||"inline-start"===a,t=t||"inline-start"===a),e?{position:"absolute",["top"===a?"bottom":"top"]:"0",[t?"right":"left"]:"0"}:W},[a,c]);tn(()=>{if(!o||!i()||"function"!=typeof ResizeObserver){h.current=H,m.current=!0,f.current=null,p.current=null;return}if(!t||!n)return;h.current=iS(t,x);let e=new ResizeObserver(e=>{let t=e[0];t&&(p.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(t),iE(t,"auto");let r=ik(t,"position","static"),l=ik(t,"transform","none"),s=ik(t,"scale","1"),a=iS(n,{"--available-width":"max-content","--available-height":"max-content"});function c(){r(),l(),a(),s()}if(b?.(),m.current||null===f.current){iC(n,"max-content");let r=iy(t);return f.current=r,iC(n,r),c(),v?.(null,r),m.current=!1,()=>{e.disconnect(),h.current(),h.current=H}}iE(t,"auto"),iC(n,"max-content");let g=f.current??p.current,y=iy(t);if(f.current=y,!g)return iC(n,y),c(),v?.(null,y),()=>{e.disconnect(),d.cancel(),h.current(),h.current=H};iE(t,g),c(),v?.(g,y),iC(n,y);let w=new AbortController;return d.request(()=>{iE(t,y),u(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},w.signal)}),()=>{e.disconnect(),w.abort(),d.cancel(),h.current(),h.current=H}},[r,t,n,u,d,i,o,b,v,x])}({popupElement:f,positionerElement:p,mounted:d,content:u,onMeasureLayout:P,onMeasureLayoutComplete:M,side:r,direction:l}),{children:t,state:{activationDirection:function(e){if(e){var t,n;return`${(t=e.horizontal)>5?"right":t<-5?"left":""} ${(n=e.vertical)>5?"down":n<-5?"up":""}`}}(w),transitioning:A}}}({store:l,side:s.side,cssVars:iv,children:o});return V("div",e,{state:{activationDirection:u.activationDirection,transitioning:u.transitioning,instant:a},ref:t,props:[i,{children:c}],stateAttributesMapping:ij})});var no=no;class iT{constructor(){this.store=new rn}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error(A(81,e));this.store.setOpen(!0,nr(no.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,nr(no.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ib,"Handle",0,iT,"Popup",0,ig,"Portal",0,oh,"Positioner",0,im,"Provider",0,function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,o=g.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),i=g.useMemo(()=>({open:t,close:n}),[t,n]);return(0,m.jsx)(rp.Provider,{value:o,children:(0,m.jsx)(rk,{delay:i,timeoutMs:r,children:e.children})})},"Root",0,rr,"Trigger",0,rM,"Viewport",0,iR,"createHandle",0,function(){return new iT}],27486);var iN=e.i(27486),iN=iN;let iO=e=>{let t,n,r,o=(0,h.c)(6);o[0]!==e?({delay:n,...t}=e,o[0]=e,o[1]=t,o[2]=n):(t=o[1],n=o[2]);let i=void 0===n?0:n;return o[3]!==i||o[4]!==t?(r=(0,m.jsx)(iN.Provider,{"data-slot":"tooltip-provider",delay:i,...t}),o[3]=i,o[4]=t,o[5]=r):r=o[5],r},iP=e=>{let t,n,r=(0,h.c)(4);return r[0]!==e?({...t}=e,r[0]=e,r[1]=t):t=r[1],r[2]!==t?(n=(0,m.jsx)(iN.Root,{"data-slot":"tooltip",...t}),r[2]=t,r[3]=n):n=r[3],n},iM=e=>{let t,n,r=(0,h.c)(4);return r[0]!==e?({...t}=e,r[0]=e,r[1]=t):t=r[1],r[2]!==t?(n=(0,m.jsx)(iN.Trigger,{"data-slot":"tooltip-trigger",...t}),r[2]=t,r[3]=n):n=r[3],n},iL=e=>{let t,n,r,o,i,l,s,a,c,u,d,f=(0,h.c)(21);f[0]!==e?({className:n,side:o,sideOffset:i,align:l,alignOffset:s,children:t,...r}=e,f[0]=e,f[1]=t,f[2]=n,f[3]=r,f[4]=o,f[5]=i,f[6]=l,f[7]=s):(t=f[1],n=f[2],r=f[3],o=f[4],i=f[5],l=f[6],s=f[7]);let p=void 0===o?"top":o,g=void 0===i?4:i,b=void 0===l?"center":l,v=void 0===s?0:s;return f[8]!==n?(a=((...e)=>e4(K(e)))("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),f[8]=n,f[9]=a):a=f[9],f[10]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)(iN.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"}),f[10]=c):c=f[10],f[11]!==t||f[12]!==r||f[13]!==a?(u=(0,m.jsxs)(iN.Popup,{"data-slot":"tooltip-content",className:a,...r,children:[t,c]}),f[11]=t,f[12]=r,f[13]=a,f[14]=u):u=f[14],f[15]!==b||f[16]!==v||f[17]!==p||f[18]!==g||f[19]!==u?(d=(0,m.jsx)(iN.Portal,{children:(0,m.jsx)(iN.Positioner,{align:b,alignOffset:v,side:p,sideOffset:g,className:"isolate z-50",children:u})}),f[15]=b,f[16]=v,f[17]=p,f[18]=g,f[19]=u,f[20]=d):d=f[20],d},iA=[{label:"All changes",value:"all"},{label:"Uncommitted changes",value:"uncommitted"}],iI=(e,t=24)=>{if(e.length<=t)return e;let n=Math.floor((t-1)/2);return`${e.slice(0,n)}…${e.slice(-n)}`},iz=e=>{let t,n,r=(0,h.c)(5),{syncNotice:o}=e;if(!o)return null;if(r[0]!==o.tone){var i;t=((...e)=>e4(K(e)))("rounded-full border px-2 py-1 text-[11px] leading-none","destructive"===(i=o.tone)?"border-destructive/30 bg-destructive/10 text-destructive":"warning"===i?"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400":"border-border bg-muted/40 text-muted-foreground"),r[0]=o.tone,r[1]=t}else t=r[1];return r[2]!==o.label||r[3]!==t?(n=(0,m.jsx)("div",{className:t,children:o.label}),r[2]=o.label,r[3]=t,r[4]=n):n=r[4],n},iD=()=>null,i$=e=>{var t;let n,r,o,i,l,s,a,c,u,d,f,p,b,j,R,T,N,O,P,M,L,A,I,z,D,$,_,B,F,H,W=(0,h.c)(120),{branch:V,baseBranch:U,refreshing:q,fileWatchState:X,syncNotice:Y,comments:G,diffMode:Z,onDiffModeChange:J,layout:Q,onLayoutChange:ee}=e,[et,en]=(0,g.useState)(!1),[er,eo]=(0,g.useState)(null),[ei,el]=(0,g.useState)(!1),es=(0,g.useSyncExternalStore)(i_,iB,iF),ea=(0,g.useRef)(null),{resolvedTheme:ec,setTheme:eu}=(0,C.useTheme)(),ed=(0,g.useRef)(null),ef=(0,g.useRef)(null);W[0]===Symbol.for("react.memo_cache_sentinel")?(n=async(e,t)=>{try{await navigator.clipboard.writeText(e),ef.current&&clearTimeout(ef.current),eo(t),ef.current=setTimeout(()=>eo(null),1500)}catch{}},W[0]=n):n=W[0];let ep=n;W[1]!==G?(r=async()=>{try{let e=(e=>{if(0===e.length)return"No comments.";let t=e.map(e=>{let t=e.tag?`${e.tag} `:"",n=e.lineNumber>0?`:${e.lineNumber}`:"";return`- ${t}**${e.file}${n}**: ${e.body}`});return`## Code Review Comments
2
+
3
+ Please address the following:
4
+
5
+ ${t.join("\n")}`})(G);await navigator.clipboard.writeText(e),ed.current&&clearTimeout(ed.current),en(!0),ed.current=setTimeout(()=>en(!1),2e3)}catch{}},W[1]=G,W[2]=r):r=W[2];let em=r;if(W[3]===Symbol.for("react.memo_cache_sentinel")?(o=()=>el(!1),W[3]=o):o=W[3],t=o,(H=(0,h.c)(5))[0]!==ea||H[1]!==t||H[2]!==ei?(B=()=>{if(!ei)return;let e=e=>{ea.current&&!ea.current.contains(e.target)&&t()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},F=[ea,t,ei],H[0]=ea,H[1]=t,H[2]=ei,H[3]=B,H[4]=F):(B=H[3],F=H[4]),(0,g.useEffect)(B,F),W[4]!==U||W[5]!==V||W[6]!==er||W[7]!==X||W[8]!==q){let e,t,n,r,o,f,p,h,g,b,x,y,w,k,S,C,j,R,T,N,O,{className:P,label:M}="connecting"===X?{className:"bg-muted-foreground/50",label:"Connecting"}:"live"===X?{className:"bg-diff-green",label:"Live"}:{className:"bg-amber-500",label:"Polling"};d=M,a="flex h-[52px] items-center gap-2 border-b border-border bg-card px-4 text-sm",W[16]!==V?(e=(0,m.jsx)("button",{type:"button",onClick:()=>ep(V,"branch"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs font-medium text-foreground cursor-pointer hover:bg-secondary"}),W[16]=V,W[17]=e):e=W[17];let L="branch"===er?"opacity-0":"opacity-100";W[18]!==L?(t=((...e)=>e4(K(e)))("transition-opacity duration-150",L),W[18]=L,W[19]=t):t=W[19],W[20]!==V?(n=iI(V),W[20]=V,W[21]=n):n=W[21],W[22]!==t||W[23]!==n?(r=(0,m.jsx)("span",{className:t,children:n}),W[22]=t,W[23]=n,W[24]=r):r=W[24];let A="branch"===er?"opacity-100":"opacity-0";W[25]!==A?(o=((...e)=>e4(K(e)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150",A),W[25]=A,W[26]=o):o=W[26],W[27]===Symbol.for("react.memo_cache_sentinel")?(f=(0,m.jsx)(v,{size:14}),W[27]=f):f=W[27],W[28]!==o?(p=(0,m.jsx)("span",{className:o,children:f}),W[28]=o,W[29]=p):p=W[29],W[30]!==e||W[31]!==r||W[32]!==p?(h=(0,m.jsxs)(iM,{render:e,children:[r,p]}),W[30]=e,W[31]=r,W[32]=p,W[33]=h):h=W[33];let I="branch"===er?"Copied!":"Click to copy";W[34]!==I?(g=(0,m.jsx)(iL,{side:"bottom",children:I}),W[34]=I,W[35]=g):g=W[35],W[36]!==h||W[37]!==g?(b=(0,m.jsxs)(iP,{children:[h,g]}),W[36]=h,W[37]=g,W[38]=b):b=W[38],W[39]===Symbol.for("react.memo_cache_sentinel")?(x=(0,m.jsx)(E,{size:12,className:"text-muted-foreground/50 shrink-0"}),W[39]=x):x=W[39],W[40]!==U?(y=(0,m.jsx)("button",{type:"button",onClick:()=>ep(U,"base"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),W[40]=U,W[41]=y):y=W[41];let z="base"===er?"opacity-0":"opacity-100";W[42]!==z?(w=((...e)=>e4(K(e)))("transition-opacity duration-150",z),W[42]=z,W[43]=w):w=W[43],W[44]!==U?(k=iI(U),W[44]=U,W[45]=k):k=W[45],W[46]!==w||W[47]!==k?(S=(0,m.jsx)("span",{className:w,children:k}),W[46]=w,W[47]=k,W[48]=S):S=W[48];let D="base"===er?"opacity-100":"opacity-0";W[49]!==D?(C=((...e)=>e4(K(e)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150",D),W[49]=D,W[50]=C):C=W[50],W[51]===Symbol.for("react.memo_cache_sentinel")?(j=(0,m.jsx)(v,{size:14}),W[51]=j):j=W[51],W[52]!==C?(R=(0,m.jsx)("span",{className:C,children:j}),W[52]=C,W[53]=R):R=W[53],W[54]!==y||W[55]!==S||W[56]!==R?(T=(0,m.jsxs)(iM,{render:y,children:[S,R]}),W[54]=y,W[55]=S,W[56]=R,W[57]=T):T=W[57];let $="base"===er?"Copied!":"Click to copy";W[58]!==$?(N=(0,m.jsx)(iL,{side:"bottom",children:$}),W[58]=$,W[59]=N):N=W[59],W[60]!==T||W[61]!==N?(O=(0,m.jsxs)(iP,{children:[T,N]}),W[60]=T,W[61]=N,W[62]=O):O=W[62],W[63]!==b||W[64]!==O?(c=(0,m.jsx)(iO,{delay:400,children:(0,m.jsxs)("div",{className:"flex items-center gap-1.5",children:[b,x,O]})}),W[63]=b,W[64]=O,W[65]=c):c=W[65],W[66]===Symbol.for("react.memo_cache_sentinel")?(u=(0,m.jsx)("div",{className:"flex-1"}),W[66]=u):u=W[66],s="flex items-center gap-0.5",l="flex items-center gap-1.5 pr-1.5",i=((...e)=>e4(K(e)))("mx-1 size-1.5 rounded-full",P,q&&"animate-pulse"),W[4]=U,W[5]=V,W[6]=er,W[7]=X,W[8]=q,W[9]=i,W[10]=l,W[11]=s,W[12]=a,W[13]=c,W[14]=u,W[15]=d}else i=W[9],l=W[10],s=W[11],a=W[12],c=W[13],u=W[14],d=W[15];W[67]!==i?(f=(0,m.jsx)("span",{className:i}),W[67]=i,W[68]=f):f=W[68],W[69]!==d?(p=(0,m.jsx)("span",{className:"text-[11px] text-muted-foreground",children:d}),W[69]=d,W[70]=p):p=W[70],W[71]!==f||W[72]!==p||W[73]!==l?(b=(0,m.jsxs)("div",{className:l,children:[f,p]}),W[71]=f,W[72]=p,W[73]=l,W[74]=b):b=W[74],W[75]!==Y?(j=(0,m.jsx)(iz,{syncNotice:Y}),W[75]=Y,W[76]=j):j=W[76],W[77]===Symbol.for("react.memo_cache_sentinel")?(R=()=>el(iH),W[77]=R):R=W[77];let eh="uncommitted"===Z?"Uncommitted":"All changes",eg=ei&&"rotate-180";W[78]!==eg?(T=((...e)=>e4(K(e)))("transition-transform duration-150",eg),W[78]=eg,W[79]=T):T=W[79],W[80]!==T?(N=(0,m.jsx)(x,{size:10,className:T}),W[80]=T,W[81]=N):N=W[81],W[82]!==eh||W[83]!==N?(O=(0,m.jsxs)(e6,{variant:"ghost",size:"xs",onClick:R,className:"text-muted-foreground hover:text-foreground hover:bg-secondary gap-1",children:[eh,N]}),W[82]=eh,W[83]=N,W[84]=O):O=W[84],W[85]!==Z||W[86]!==ei||W[87]!==J?(P=ei&&(0,m.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[200px] rounded-lg border border-border bg-card shadow-lg dark:shadow-none py-1 overflow-hidden",children:iA.map(e=>{let{value:t,label:n}=e;return(0,m.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-sm text-left hover:bg-secondary/50 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",onClick:()=>{J(t),el(!1)},children:[(0,m.jsx)("span",{className:((...e)=>e4(K(e)))("text-foreground",Z===t&&"font-medium"),children:n}),Z===t&&(0,m.jsx)(v,{size:14,className:"text-diff-green shrink-0"})]},t)})}),W[85]=Z,W[86]=ei,W[87]=J,W[88]=P):P=W[88],W[89]!==O||W[90]!==P?(M=(0,m.jsxs)("div",{className:"relative",ref:ea,children:[O,P]}),W[89]=O,W[90]=P,W[91]=M):M=W[91],W[92]!==G.length||W[93]!==et||W[94]!==em?(L=G.length>0&&(0,m.jsxs)(e6,{variant:"ghost",size:"xs",onClick:em,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"Copy all comments as AI prompt",children:[et?(0,m.jsx)(v,{"data-icon":"inline-start"}):(0,m.jsx)(y,{"data-icon":"inline-start"}),et?"Copied!":`Copy ${G.length} comment${1===G.length?"":"s"}`]}),W[92]=G.length,W[93]=et,W[94]=em,W[95]=L):L=W[95],W[96]!==Q||W[97]!==ee?(A=()=>ee("split"===Q?"stacked":"split"),W[96]=Q,W[97]=ee,W[98]=A):A=W[98];let eb="split"===Q?"Switch to unified view (S)":"Switch to split view (S)";return W[99]===Symbol.for("react.memo_cache_sentinel")?(I=(0,m.jsx)(S,{size:14}),W[99]=I):I=W[99],W[100]!==A||W[101]!==eb?(z=(0,m.jsx)(e6,{variant:"ghost",size:"icon-xs",onClick:A,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:eb,children:I}),W[100]=A,W[101]=eb,W[102]=z):z=W[102],W[103]!==es||W[104]!==ec||W[105]!==eu?(D=es&&(0,m.jsx)(e6,{variant:"ghost",size:"icon-xs",onClick:()=>eu("dark"===ec?"light":"dark"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"dark"===ec?"Switch to light mode":"Switch to dark mode",children:"dark"===ec?(0,m.jsx)(w,{size:14}):(0,m.jsx)(k,{size:14})}),W[103]=es,W[104]=ec,W[105]=eu,W[106]=D):D=W[106],W[107]!==b||W[108]!==j||W[109]!==M||W[110]!==L||W[111]!==z||W[112]!==D||W[113]!==s?($=(0,m.jsxs)("div",{className:s,children:[b,j,M,L,z,D]}),W[107]=b,W[108]=j,W[109]=M,W[110]=L,W[111]=z,W[112]=D,W[113]=s,W[114]=$):$=W[114],W[115]!==$||W[116]!==a||W[117]!==c||W[118]!==u?(_=(0,m.jsxs)("header",{className:a,children:[c,u,$]}),W[115]=$,W[116]=a,W[117]=c,W[118]=u,W[119]=_):_=W[119],_};function i_(){return iD}function iB(){return!0}function iF(){return!1}function iH(e){return!e}let iW=b("BubbleDotsIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,d:"M4.002 7c0-1.6568 1.3431-3 3-3h9.9999c1.6569 0 3.0001 1.3431 3.0001 3v8.0358c0 1.6568-1.3432 3-3 3h-1.6263a1 1 0 0 0-.638.2299l-2.74 2.2701-2.7037-2.2664a1 1 0 0 0-.6424-.2336H7.0019c-1.6568 0-3-1.3432-3-3z"}),g.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:.75,d:"M6.875 11.25a.875.875 0 1 0 1.75 0 .875.875 0 0 0-1.75 0Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Z"})))),iV=b("Folder1Icon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v9c0 1.6569 1.3431 3 3 3h12c1.6569 0 3-1.3431 3-3v-6c0-1.6569-1.3431-3-3-3h-4.9296a2 2 0 0 1-1.6641-.8906l-.8126-1.2188A2 2 0 0 0 8.9297 4H6C4.3431 4 3 5.3431 3 7"})))),iU=b("FolderOpenFilledIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 3C3.7909 3 2 4.7909 2 7v10.5592C2 18.9072 3.0928 20 4.4408 20H18.045a3.0002 3.0002 0 0 0 2.8487-2.1052l1.6557-5.2983c.3657-1.1701-.3952-2.3574-1.5494-2.5647V9c0-1.6569-1.3431-3-3-3h-4.9296a1 1 0 0 1-.8321-.4453l-.5157-.7735A4 4 0 0 0 8.3945 3zm13 7V9c0-.5523-.4477-1-1-1h-4.9296a3 3 0 0 1-2.4962-1.3359l-.5157-.7735A2 2 0 0 0 8.3945 5H6c-1.1046 0-2 .8954-2 2v10.5592a.4407.4407 0 0 0 .8615.1315l1.7454-5.5855A3 3 0 0 1 9.4704 10z",clipRule:"evenodd"})))),iq=b("MagnifyingGlassIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m20 20-3.95-3.95M18 11c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7Z"})))),iK=e=>{let t,n,r,o,i=(0,h.c)(7);i[0]!==e?({size:n,...t}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]);let l=void 0===n?16:n;return i[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsx)("path",{d:"M1 1.75C1 .784 1.784 0 2.75 0h7.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073ZM8 3.25a.75.75 0 0 1 .75.75v1.5h1.5a.75.75 0 0 1 0 1.5h-1.5v1.5a.75.75 0 0 1-1.5 0V7h-1.5a.75.75 0 0 1 0-1.5h1.5V4A.75.75 0 0 1 8 3.25Zm-3 8a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"}),i[3]=r):r=i[3],i[4]!==t||i[5]!==l?(o=(0,m.jsx)("svg",{viewBox:"0 0 16 16",width:l,height:l,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:r}),i[4]=t,i[5]=l,i[6]=o):o=i[6],o},iX=e=>{let t,n,r,o,i=(0,h.c)(7);i[0]!==e?({size:n,...t}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]);let l=void 0===n?16:n;return i[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.48 3.758a.75.75 0 0 1 .755.745l.01 1.497h1.497a.75.75 0 0 1 0 1.5H9v1.507a.75.75 0 0 1-1.5 0V9.005l-1.502.01a.75.75 0 0 1-.01-1.5l1.507-.01-.01-1.492a.75.75 0 0 1 .745-.755Z"}),i[3]=r):r=i[3],i[4]!==t||i[5]!==l?(o=(0,m.jsx)("svg",{viewBox:"0 0 16 16",width:l,height:l,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:r}),i[4]=t,i[5]=l,i[6]=o):o=i[6],o},iY=e=>{let t,n,r,o,i=(0,h.c)(7);i[0]!==e?({size:n,...t}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]);let l=void 0===n?16:n;return i[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.5 6h2.242a.75.75 0 0 1 0 1.5h-2.24l-2.254.015a.75.75 0 0 1-.01-1.5Z"}),i[3]=r):r=i[3],i[4]!==t||i[5]!==l?(o=(0,m.jsx)("svg",{viewBox:"0 0 16 16",width:l,height:l,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:r}),i[4]=t,i[5]=l,i[6]=o):o=i[6],o};e.s([],75704),e.i(75704);let iG=g.createContext(void 0);function iZ(e){let t=g.useContext(iG);if(!1===e&&void 0===t)throw Error(A(27));return t}let iJ={...rd,...ny},iQ=g.forwardRef(function(e,t){let{render:n,className:r,forceRender:o=!1,...i}=e,{store:l}=iZ(),s=l.useState("open"),a=l.useState("nested"),c=l.useState("mounted");return V("div",e,{state:{open:s,transitionStatus:l.useState("transitionStatus")},ref:[l.context.backdropRef,t],stateAttributesMapping:iJ,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!a})}),i0=g.createContext(void 0);function i1(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:i}=e,l=g.useRef(null),s=function(e=!1){let t=g.useContext(i0);if(void 0===t&&!e)throw Error(A(16));return t}(!0),a=i??void 0!==s,{props:c}=function(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,l=r&&!1!==t,s=r&&!1===t;return{props:g.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=o,!i&&n&&(e.tabIndex=t?o:-1)),(i&&(t||l)||!i&&n)&&(e["aria-disabled"]=n),i&&(!t||s)&&(e.disabled=n),e},[r,n,t,l,s,i,o])}}({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),u=g.useCallback(()=>{let e=l.current;i2(e)&&a&&t&&void 0===c.disabled&&e.disabled&&(e.disabled=!1)},[t,c.disabled,a]);return tn(u,[u]),{getButtonProps:g.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:l,onPointerDown:s,...u}=e;return T({type:o?"button":void 0,onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){var r;if(t||(M(e),l?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,s=e.currentTarget,c=i2(s),u=!o&&(r=s,!!(r?.tagName==="A"&&r?.href)),d=i&&(o?c:!u),f="Enter"===e.key,p=" "===e.key,m=s.getAttribute("role"),h=m?.startsWith("menuitem")||"option"===m||"gridcell"===m;if(i&&a&&p){if(e.defaultPrevented&&h)return;e.preventDefault(),u||o&&c?(s.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler());return}d&&(!o&&(p||f)&&e.preventDefault(),!o&&f&&n?.(e))},onKeyUp(e){t||((M(e),i?.(e),e.target===e.currentTarget&&o&&a&&i2(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||o||a||" "!==e.key||n?.(e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},o?void 0:{role:"button"},c,u)},[t,c,a,o]),buttonRef:tT(e=>{l.current=e,u()})}}function i2(e){return td(e)&&"BUTTON"===e.tagName}var no=no;let i5=g.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...l}=e,{store:s}=iZ(),a=s.useState("open"),{getButtonProps:c,buttonRef:u}=i1({disabled:o,native:i});return V("button",e,{state:{disabled:o},ref:[t,u],props:[{onClick:function(e){a&&s.setOpen(!1,nr(no.closePress,e.nativeEvent))}},l,c]})}),i3=g.forwardRef(function(e,t){let{render:n,className:r,id:o,...i}=e,{store:l}=iZ(),s=rf(o);return l.useSyncedValueWithCleanup("descriptionElementId",s),V("p",e,{ref:t,props:[{id:s},i]})});var no=no;let i4=0;function i7(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(i4);let i=()=>e?.focus({preventScroll:n});o?i():i4=requestAnimationFrame(i)}let i6={inert:new WeakMap,"aria-hidden":new WeakMap},i8="data-base-ui-inert",i9={inert:new WeakSet,"aria-hidden":new WeakSet},le=new WeakMap,lt=0,ln=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?tf(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),lr=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},lo=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==tl(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function li(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:i=[]}=t,l=t7(e[0]).body;return function(e,t,n,r,{mark:o=!0,markerIgnoreElements:i=[]}){let l=r?"inert":n?"aria-hidden":null,s=null,a=null,c=ln(t,e),u=new Set(o?ln(t,i):[]),d=o?lo(t,lr(c),new Set(c)).filter(e=>!u.has(e)):[],f=[],p=[];if(l){let e=i6[l],n=i9[l];a=n,s=e;let r=ln(t,Array.from(t.querySelectorAll("[aria-live]"))),o=c.concat(r);lo(t,lr(o),new Set(o)).forEach(t=>{let r=t.getAttribute(l),o=null!==r&&"false"!==r,i=(e.get(t)||0)+1;e.set(t,i),f.push(t),1===i&&o&&n.add(t),o||t.setAttribute(l,"inert"===l?"":"true")})}return o&&d.forEach(e=>{let t=(le.get(e)||0)+1;le.set(e,t),p.push(e),1===t&&e.setAttribute(i8,"")}),lt+=1,()=>{s&&f.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!a?.has(e)&&l&&e.removeAttribute(l),a?.delete(e))}),o&&p.forEach(e=>{let t=(le.get(e)||0)-1;le.set(e,t),t||e.removeAttribute(i8)}),(lt-=1)||(i6.inert=new WeakMap,i6["aria-hidden"]=new WeakMap,i9.inert=new WeakSet,i9["aria-hidden"]=new WeakSet,le=new WeakMap)}}(e,l,n,r,{mark:o,markerIgnoreElements:i})}let ll=[];function ls(){ll=ll.filter(e=>e.deref()?.isConnected)}function la(){return ls(),ll[ll.length-1]?.deref()}function lc(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;let n=oe(),r=r8(e,n).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return r9(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||0===r.length?"0"!==o&&e.setAttribute("tabindex","0"):("-1"!==o||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function lu(e){let{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:l=!1,modal:s=!0,closeOnFocusOut:a=!0,openInteractionType:c="",nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:h}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),x=b.useState("domReferenceElement"),y=b.useState("floatingElement"),{events:w,dataRef:k}=b.context,S=tT(()=>k.current.floatingContext?.nodeId),E=!1===o,C=tZ(x)&&E,j=g.useRef(["content"]),R=rE(o),T=rE(i),N=rE(c),O=nn(p),P=g.useContext(ou),M=g.useRef(!1),L=g.useRef(!1),A=g.useRef(!1),I=g.useRef(-1),z=g.useRef(""),$=g.useRef(""),_=g.useRef(null),B=g.useRef(null),F=D(_,f,P?.beforeInsideRef),H=D(B,P?.afterInsideRef),W=t4(),V=t4(),U=nm(),q=null!=P,K=tJ(y),X=tT((e=K)=>e?r6(e,oe()):[]),Y=tT(()=>h?.().filter(e=>null!=e)??[]),G=tT(e=>{let t=X(e);return j.current.map(()=>t).filter(Boolean).flat()});g.useEffect(()=>{if(r||!s)return;function e(e){"Tab"===e.key&&tq(K,tU(t7(K)))&&0===X().length&&!C&&(e.preventDefault(),e.stopPropagation())}let t=t7(K);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,x,K,s,j,C,X,G]),g.useEffect(()=>{if(r||!v)return;let e=t7(K);function t(){A.current=!1}function n(e){let t=tX(e),n=Y();A.current=!(tq(y,t)||tq(x,t)||tq(P?.portalNode,t)||n.some(e=>e===t||tq(e,t))),$.current=e.pointerType||"keyboard",t?.closest(`[${os}]`)&&(L.current=!0)}function o(){$.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",o,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",o,!0)}},[r,y,x,K,v,P,Y]),g.useEffect(()=>{if(r||!a)return;let e=t7(K);function t(){L.current=!0,V.start(0,()=>{L.current=!1})}function n(e){let t=tX(e),n=X().indexOf(t);-1!==n&&(I.current=n)}function o(t){let n=t.relatedTarget,r=t.currentTarget,o=tX(t);queueMicrotask(()=>{var i;let a=S(),c=b.context.triggerElements,f=Y(),p=n?.hasAttribute(ni("focus-guard"))&&[_.current,B.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,ng(d),ng(u)].includes(n),m=!(tq(x,n)||tq(y,n)||tq(n,y)||tq(P?.portalNode,n)||f.some(e=>e===n||tq(e,n))||null!=n&&c.hasElement(n)||c.hasMatchingElement(e=>tq(e,n))||p||O&&(t6(O.nodesRef.current,a).find(e=>tq(e.context?.elements.floating,n)||tq(e.context?.elements.domReference,n))||t8(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,tJ(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===x&&K&&lc(K,j),l&&r!==x&&!((i=o)&&i.isConnected&&("function"==typeof i.checkVisibility?i.checkVisibility():"none"!==tw(i).display))&&tU(e)===e.body){if(td(K)&&(K.focus(),"popup"===l))return void U.request(()=>{K.focus()});let e=I.current,t=X(),n=t[e]||t[t.length-1]||K;td(n)&&n.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(C||!s)&&n&&m&&!L.current&&(C||n!==la())&&(M.current=!0,b.setOpen(!1,nr(no.focusOut,t)))})}function i(){A.current||(k.current.insideReactTree=!0,W.start(0,()=>{k.current.insideReactTree=!1}))}let c=td(x)?x:null,f=[];if(y||c)return c&&(c.addEventListener("focusout",o),c.addEventListener("pointerdown",t),f.push(()=>{c.removeEventListener("focusout",o),c.removeEventListener("pointerdown",t)})),y&&(y.addEventListener("focusin",n),y.addEventListener("focusout",o),P&&(y.addEventListener("focusout",i,!0),f.push(()=>{y.removeEventListener("focusout",i,!0)})),f.push(()=>{y.removeEventListener("focusin",n),y.removeEventListener("focusout",o)})),()=>{f.forEach(e=>{e()})}},[r,x,y,K,s,O,P,b,a,l,X,C,S,j,k,W,V,U,u,d,Y]),g.useEffect(()=>{if(r||!y||!v)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${ni("portal")}]`)||[]),t=O?t8(O.nodesRef.current,S()):[],n=t.find(e=>tZ(e.context?.elements.domReference||null))?.context?.elements.domReference,o=li([y,...e,_.current,B.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...Y(),n,ng(d),ng(u),C?x:null].filter(e=>null!=e),{ariaHidden:s||C,mark:!1}),i=li([y,...e].filter(e=>null!=e));return()=>{i(),o()}},[v,r,x,y,s,j,P,C,O,S,u,d,Y]),tn(()=>{if(!v||r||!td(K))return;let e=tU(t7(K));queueMicrotask(()=>{let t,n=G(K),r=R.current,o="function"==typeof r?r(N.current||""):r;void 0===o||!1===o||(t=(t=!0===o||null===o?n[0]||K:ng(o))||n[0]||K,tq(K,e)||i7(t,{preventScroll:t===K}))})},[r,v,K,E,G,R,N]),tn(()=>{var e;if(r||!K)return;let t=t7(K);function n(e){var t,n,r,o;let i;if(e.open||(t=e.nativeEvent,n=$.current,i=ts(t.target),z.current=t instanceof i.KeyboardEvent?"keyboard":t instanceof i.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof i.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===no.triggerHover&&"mouseleave"===e.nativeEvent.type&&(M.current=!0),e.reason===no.outsidePress)if(e.nested)M.current=!1;else if((""===(r=e.nativeEvent).pointerType&&r.isTrusted?0:t$&&r.pointerType?"click"!==r.type||1!==r.buttons:0!==r.detail||r.pointerType)&&(o=e.nativeEvent,tB?1:(t$||0!==o.width||0!==o.height)&&(!t$||1!==o.width||1!==o.height||0!==o.pressure||0!==o.detail||"mouse"!==o.pointerType)&&(!(o.width<1)||!(o.height<1)||0!==o.pressure||0!==o.detail||"touch"!==o.pointerType))){let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}else M.current=!1}return e=tU(t),ls(),e&&"body"!==tl(e)&&(ll.push(new WeakRef(e)),ll.length>20&&(ll=ll.slice(-20))),w.on("openchange",n),()=>{w.off("openchange",n);let e=tU(t),r=Y(),o=tq(y,e)||r.some(t=>t===e||tq(t,e))||O&&t6(O.nodesRef.current,S(),!1).some(t=>tq(t.context?.elements.floating,e)),i=function(){let e=T.current,t="function"==typeof e?e(z.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){let e=x||la();return e&&e.isConnected?e:null}let n=x||la();return ng(t)||n||null}();queueMicrotask(()=>{let n=function(e){if(!e)return null;let t=oe();return r9(e,t)?e:r6(e,t)[0]||e}(i),r="boolean"!=typeof T.current;T.current&&!M.current&&td(n)&&(r||n===e||e===t.body||o)&&n.focus({preventScroll:!0}),M.current=!1})}},[r,y,K,T,k,w,O,x,S,Y]),tn(()=>{if(!tI||v||!y)return;let e=tU(t7(y));td(e)&&tG(e)&&tq(y,e)&&e.blur()},[v,y]),tn(()=>{if(!r&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:a,open:v,onOpenChange:b.setOpen,domReference:x}),()=>{P.setFocusManagerState(null)}},[r,P,s,v,b,a,x]),tn(()=>{if(!r&&K)return lc(K,j),()=>{queueMicrotask(ls)}},[r,K,j]);let Z=!r&&(!s||!C)&&(q||s);return(0,m.jsxs)(g.Fragment,{children:[Z&&(0,m.jsx)(rz,{"data-type":"inside",ref:F,onFocus:e=>{if(s){let e=G();i7(e[e.length-1])}else if(P?.portalNode)if(M.current=!1,oo(e,P.portalNode)){let e=on(x);e?.focus()}else ng(d??P.beforeOutsideRef)?.focus()}}),n,Z&&(0,m.jsx)(rz,{"data-type":"inside",ref:H,onFocus:e=>{if(s)i7(G()[0]);else if(P?.portalNode)if(a&&(M.current=!0),oo(e,P.portalNode)){let e=or(x);e?.focus()}else ng(u??P.afterOutsideRef)?.focus()}})]})}let ld=((u={}).nestedDialogs="--nested-dialogs",u),lf=((d={})[d.open=ro.open]="open",d[d.closed=ro.closed]="closed",d[d.startingStyle=ro.startingStyle]="startingStyle",d[d.endingStyle=ro.endingStyle]="endingStyle",d.nested="data-nested",d.nestedDialogOpen="data-nested-dialog-open",d),lp=g.createContext(void 0);function lm(){let e=g.useContext(lp);if(void 0===e)throw Error(A(26));return e}let lh="ArrowUp",lg="ArrowDown",lb="ArrowLeft",lv="ArrowRight";[...new Set([...new Set([lb,lv]),...new Set([lh,lg])])];let lx=new Set([lh,lg,lb,lv,"Home","End"]),ly={...rd,...ny,nestedDialogOpen:e=>e?{[lf.nestedDialogOpen]:""}:null},lw=g.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:o,render:i,...l}=e,{store:s}=iZ(),a=s.useState("descriptionElementId"),c=s.useState("disablePointerDismissal"),u=s.useState("floatingRootContext"),d=s.useState("popupProps"),f=s.useState("modal"),p=s.useState("mounted"),h=s.useState("nested"),g=s.useState("nestedOpenDialogCount"),b=s.useState("open"),v=s.useState("openMethod"),x=s.useState("titleElementId"),y=s.useState("transitionStatus"),w=s.useState("role");lm(),nk({open:b,ref:s.context.popupRef,onComplete(){b&&s.context.onOpenChangeComplete?.(!0)}});let k=void 0===o?function(e){return"touch"!==e||s.context.popupRef.current}:o,S=V("div",e,{state:{open:b,nested:h,transitionStatus:y,nestedDialogOpen:g>0},props:[d,{"aria-labelledby":x??void 0,"aria-describedby":a??void 0,role:w,tabIndex:-1,hidden:!p,onKeyDown(e){lx.has(e.key)&&e.stopPropagation()},style:{[ld.nestedDialogs]:g}},l],ref:[t,s.context.popupRef,s.useStateSetter("popupElement")],stateAttributesMapping:ly});return(0,m.jsx)(lu,{context:u,openInteractionType:v,disabled:!p,closeOnFocusOut:!c,initialFocus:k,returnFocus:r,modal:!1!==f,restoreFocus:"popup",children:S})}),lk=g.forwardRef(function(e,t){let n,{cutout:r,...o}=e;if(r){let e=r?.getBoundingClientRect();n=`polygon(
6
+ 0% 0%,
7
+ 100% 0%,
8
+ 100% 100%,
9
+ 0% 100%,
10
+ 0% 0%,
11
+ ${e.left}px ${e.top}px,
12
+ ${e.left}px ${e.bottom}px,
13
+ ${e.right}px ${e.bottom}px,
14
+ ${e.right}px ${e.top}px,
15
+ ${e.left}px ${e.top}px
16
+ )`}return(0,m.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})}),lS=g.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:o}=iZ(),i=o.useState("mounted"),l=o.useState("modal"),s=o.useState("open");return i||n?(0,m.jsx)(lp.Provider,{value:n,children:(0,m.jsxs)(op,{ref:t,...r,children:[i&&!0===l&&(0,m.jsx)(lk,{ref:o.context.internalBackdropRef,inert:ix(!s)}),e.children]})}):null}),lE={},lC={},lj="";class lR{lockCount=0;restore=null;timeoutLock=t3.create();timeoutUnlock=t3.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,n,r,o,i;if(0===this.lockCount||null!==this.restore)return;let l=t7(e).documentElement,s=ts(l).getComputedStyle(l).overflowY;if("hidden"===s||"clip"===s){this.restore=H;return}let a=tz||!function(e){if("u"<typeof document)return!1;let t=t7(e);return ts(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=a?(n=(t=t7(e)).documentElement,r=t.body,i={overflowY:(o=tp(n)?n:r).style.overflowY,overflowX:o.style.overflowX},Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}):function(e){let t=t7(e),n=t.documentElement,r=t.body,o=ts(n),i=0,l=0,s=!1,a=np.create();if(tI&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){let t=o.getComputedStyle(n),a=o.getComputedStyle(r),c=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,l=n.scrollLeft,lE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},lj=n.style.scrollBehavior,lC={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};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===a.overflowY,p="scroll"===t.overflowX||"scroll"===a.overflowX,m=Math.max(0,o.innerWidth-r.clientWidth),h=Math.max(0,o.innerHeight-r.clientHeight),g=parseFloat(a.marginTop)+parseFloat(a.marginBottom),b=parseFloat(a.marginLeft)+parseFloat(a.marginRight),v=tp(n)?n:r;if(s=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=t7(e),n=t.documentElement,r=t.body,o=tp(n)?n:r,i=o.style.overflowY,l=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";let s=o.offsetWidth;o.style.overflowY="hidden";let a=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=l,s===a}(e)){n.style.scrollbarGutter=c,v.style.overflowY="hidden",v.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:c,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:g||h?`calc(100dvh - ${g+h}px)`:"100dvh",width:b||m?`calc(100vw - ${b+m}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,lE),Object.assign(r.style,lC),s||(n.scrollTop=i,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=lj)}function d(){u(),a.request(c)}return c(),o.addEventListener("resize",d),()=>{a.cancel(),u(),"function"==typeof o.removeEventListener&&o.removeEventListener("resize",d)}}(e)}}let lT=new lR,lN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var no=no;let lO={...re,modal:nX(e=>e.modal),nested:nX(e=>e.nested),nestedOpenDialogCount:nX(e=>e.nestedOpenDialogCount),disablePointerDismissal:nX(e=>e.disablePointerDismissal),openMethod:nX(e=>e.openMethod),descriptionElementId:nX(e=>e.descriptionElementId),titleElementId:nX(e=>e.titleElementId),viewportElement:nX(e=>e.viewportElement),role:nX(e=>e.role)};class lP extends nQ{constructor(e){super(function(e={}){return{...n8(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(e),{popupRef:g.createRef(),backdropRef:g.createRef(),internalBackdropRef:g.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new n6,onOpenChange:void 0,onOpenChangeComplete:void 0},lO)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",n);let r={open:e},o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)}}let lM=((f={})[f.open=ro.open]="open",f[f.closed=ro.closed]="closed",f[f.startingStyle=ro.startingStyle]="startingStyle",f[f.endingStyle=ro.endingStyle]="endingStyle",f.nested="data-nested",f.nestedDialogOpen="data-nested-dialog-open",f),lL={...rd,...ny,nested:e=>e?{[lM.nested]:""}:null,nestedDialogOpen:e=>e?{[lM.nestedDialogOpen]:""}:null},lA=g.forwardRef(function(e,t){let{className:n,render:r,children:o,...i}=e,l=lm(),{store:s}=iZ(),a=s.useState("open"),c=s.useState("nested"),u=s.useState("transitionStatus"),d=s.useState("nestedOpenDialogCount"),f=s.useState("mounted");return V("div",e,{enabled:l||f,state:{open:a,nested:c,transitionStatus:u,nestedDialogOpen:d>0},ref:[t,s.useStateSetter("viewportElement")],stateAttributesMapping:lL,props:[{role:"presentation",hidden:!f,style:{pointerEvents:a?void 0:"none"},children:o},i]})}),lI=g.forwardRef(function(e,t){let{render:n,className:r,id:o,...i}=e,{store:l}=iZ(),s=rf(o);return l.useSyncedValueWithCleanup("titleElementId",s),V("h2",e,{ref:t,props:[{id:s},i]})});var no=no;let lz=g.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,nativeButton:i=!0,id:l,payload:s,handle:a,...c}=e,u=iZ(!0),d=a?.store??u?.store;if(!d)throw Error(A(79));let f=rf(l),p=d.useState("floatingRootContext"),m=d.useState("isOpenedByTrigger",f),h=g.useRef(null),{registerTrigger:b,isMountedByThisTrigger:v}=nS(f,h,d,{payload:s}),{getButtonProps:x,buttonRef:y}=i1({disabled:o,native:i}),w=nc([function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:s=!1,stickIfOpen:a=!0,touchOpenDelay:c=0,reason:u=no.triggerPress}=t,d=g.useRef(void 0),f=nm(),p=t4(),m=g.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,o=e.nativeEvent,m=n.select("open");if(0!==e.button||"click"===i||tQ(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,b=n.select("domReferenceElement")!==e.currentTarget,v=m&&b||!(m&&l&&(!h||!a||"click"===g||"mousedown"===g));if(tG(o.target)){let e=nr(u,o,o.target);v&&"touch"===t&&c>0?p.start(c,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let x=e.currentTarget;f.request(()=>{let e=nr(u,o,x);v&&"touch"===t&&c>0?p.start(c,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if("mousedown-only"===i)return;let t=d.current;if("mousedown"===i&&t){d.current=void 0;return}if(tQ(t,!0)&&s)return;let o=n.select("open"),f=r.current.openEvent,m=n.select("domReferenceElement")!==e.currentTarget,h=o&&m||!(o&&l&&(!f||!a||t0(f))),g=nr(u,e.nativeEvent,e.currentTarget);h&&"touch"===t&&c>0?p.start(c,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,i,s,n,a,l,f,p,c,u]);return g.useMemo(()=>o?{reference:m}:W,[o,m])}(p,{enabled:null!=p})]),k=d.useState("triggerProps",v);return V("button",e,{state:{disabled:o,open:m},ref:[y,t,b,h],props:[w.getReferenceProps(),k,{[os]:"",id:f},c,x],stateAttributesMapping:ru})});var no=no;class lD{constructor(e){this.store=e??new lP}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,nr(no.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,nr(no.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,nr(no.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Backdrop",0,iQ,"Close",0,i5,"Description",0,i3,"Handle",0,lD,"Popup",0,lw,"Portal",0,lS,"Root",0,function(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:l=!1,modal:s=!0,actionsRef:a,handle:c,triggerId:u,defaultTriggerId:d=null}=e,f=iZ(!0),p=!!f,h=z(()=>c?.store??new lP({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:l,nested:p})).current;tt(()=>{void 0===n&&!1===h.state.open&&!0===r&&h.update({open:!0,activeTriggerId:d})}),h.useControlledProp("openProp",n),h.useControlledProp("triggerIdProp",u),h.useSyncedValues({disablePointerDismissal:l,nested:p,modal:s}),h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",i);let b=h.useState("payload");!function(e){let{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),l=t.useState("modal"),s=t.useState("popupElement"),{openMethod:a,triggerProps:c}=function(e){let t,n,r,o,[i,l]=g.useState(null),s=tT((t,n)=>{e||l(n||(tz?"touch":""))});t=g.useRef(e),tn(()=>{t.current!==e&&n(t.current)},[e,n=tT(t=>{t&&!e&&l(null)})]),tn(()=>{t.current=e},[e]);let{onClick:a,onPointerDown:c}=(r=g.useRef(""),o=g.useCallback(e=>{e.defaultPrevented||(r.current=e.pointerType,s(e,e.pointerType))},[s]),{onClick:g.useCallback(e=>{0===e.detail?s(e,"keyboard"):(s(e,"pointerType"in e?e.pointerType:r.current),r.current="")},[s]),onPointerDown:o});return g.useMemo(()=>({openMethod:i,triggerProps:{onClick:a,onPointerDown:c}}),[i,a,c])}(o);nE(t);let{forceUnmount:u}=nC(o,t),d=tT(e=>{let n=nr(e);return n.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},n}),f=g.useCallback(()=>{t.setOpen(!1,d(no.imperativeAction))},[t,d]);g.useImperativeHandle(r,()=>({unmount:u,close:f}),[u,f]);let p=n7({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=g.useState(0),b=0===m,v=function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{role:s="dialog"}=t,a=n5(),c=i?.id||a,u=g.useMemo(()=>tJ(l)?.id||o,[l,o]),d=lN.get(s)??s,f=null!=nt(),p=g.useMemo(()=>"tooltip"===d||"label"===s?W:{"aria-haspopup":"alertdialog"===d?"dialog":d,"aria-expanded":"false",..."listbox"===d&&{role:"combobox"},..."menu"===d&&f&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[d,f,s]),m=g.useMemo(()=>"tooltip"===d||"label"===s?{[`aria-${"label"===s?"labelledby":"describedby"}`]:r?u:void 0}:{...p,"aria-expanded":r?"true":"false","aria-controls":r?u:void 0,..."menu"===d&&{id:c}},[d,u,r,c,s,p]),h=g.useMemo(()=>{let e={id:u,...d&&{role:d}};return"tooltip"===d||"label"===s?e:{...e,..."menu"===d&&{"aria-labelledby":c}}},[d,u,c,s]),b=g.useCallback(({active:e,selected:t})=>{let n={role:"option",...e&&{id:`${u}-fui-option`}};switch(s){case"select":case"combobox":return{...n,"aria-selected":t}}return{}},[u,s]);return g.useMemo(()=>({reference:m,floating:h,item:b,trigger:p}),[m,h,p,b])}(p),x=na(p,{outsidePressEvent:()=>t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:"trap-focus"===l?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||"button"in e&&0!==e.button||"touches"in e&&1!==e.touches.length)return!1;let n=tX(e);return!!b&&!i&&(!l||!t.context.internalBackdropRef.current&&!t.context.backdropRef.current||t.context.internalBackdropRef.current===n||t.context.backdropRef.current===n||tq(n,s)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:b});!function(e=!0,t=null){tn(()=>{if(e)return lT.acquire(t)},[e,t])}(o&&!0===l,s);let{getReferenceProps:y,getFloatingProps:w,getTriggerProps:k}=nc([v,x]);t.useContextCallback("onNestedDialogOpen",e=>{h(e+1)}),t.useContextCallback("onNestedDialogClose",()=>{h(0)}),g.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,m]);let S=g.useMemo(()=>y(c),[y,c]),E=g.useMemo(()=>k(c),[k,c]),C=g.useMemo(()=>w(),[w]);t.useSyncedValues({openMethod:a,activeTriggerProps:S,inactiveTriggerProps:E,popupProps:C,floatingRootContext:p,nestedOpenDialogCount:m})}({store:h,actionsRef:a,parentContext:f?.store.context,onOpenChange:o,triggerIdProp:u});let v=g.useMemo(()=>({store:h}),[h]);return(0,m.jsx)(iG.Provider,{value:v,children:"function"==typeof t?t({payload:b}):t})},"Title",0,lI,"Trigger",0,lz,"Viewport",0,lA,"createHandle",0,function(){return new lD}],87913);var l$=e.i(87913),l$=l$;let l_=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),lB=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var lF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let lH=(0,g.createContext)({}),lW=(0,g.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...s},a)=>{let{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:p=""}=(0,g.useContext)(lH)??{},m=r??d?24*Number(n??u)/Number(t??c):n??u;return(0,g.createElement)("svg",{ref:a,...lF,width:t??c??lF.width,height:t??c??lF.height,stroke:e??f,strokeWidth:m,className:l_("lucide",p,o),...!i&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(s)&&{"aria-hidden":"true"},...s},[...l.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),lV=(p=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(r=(0,g.forwardRef)(({className:e,...t},n)=>(0,g.createElement)(lW,{ref:n,iconNode:p,className:l_(`lucide-${lB("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=lB("x"),r),lU=e=>{let t,n,r=(0,h.c)(4);return r[0]!==e?({...t}=e,r[0]=e,r[1]=t):t=r[1],r[2]!==t?(n=(0,m.jsx)(l$.Root,{"data-slot":"sheet",...t}),r[2]=t,r[3]=n):n=r[3],n},lq=e=>{let t,n,r=(0,h.c)(4);return r[0]!==e?({...t}=e,r[0]=e,r[1]=t):t=r[1],r[2]!==t?(n=(0,m.jsx)(l$.Portal,{"data-slot":"sheet-portal",...t}),r[2]=t,r[3]=n):n=r[3],n},lK=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)(l$.Backdrop,{"data-slot":"sheet-overlay",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},lX=e=>{let t,n,r,o,i,l,s,a,c,u=(0,h.c)(17);u[0]!==e?({className:n,children:t,side:o,showCloseButton:i,...r}=e,u[0]=e,u[1]=t,u[2]=n,u[3]=r,u[4]=o,u[5]=i):(t=u[1],n=u[2],r=u[3],o=u[4],i=u[5]);let d=void 0===o?"right":o,f=void 0===i||i;return u[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,m.jsx)(lK,{}),u[6]=l):l=u[6],u[7]!==n?(s=((...e)=>e4(K(e)))("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",n),u[7]=n,u[8]=s):s=u[8],u[9]!==f?(a=f&&(0,m.jsxs)(l$.Close,{"data-slot":"sheet-close",render:(0,m.jsx)(e6,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,m.jsx)(lV,{}),(0,m.jsx)("span",{className:"sr-only",children:"Close"})]}),u[9]=f,u[10]=a):a=u[10],u[11]!==t||u[12]!==r||u[13]!==d||u[14]!==s||u[15]!==a?(c=(0,m.jsxs)(lq,{children:[l,(0,m.jsxs)(l$.Popup,{"data-slot":"sheet-content","data-side":d,className:s,...r,children:[t,a]})]}),u[11]=t,u[12]=r,u[13]=d,u[14]=s,u[15]=a,u[16]=c):c=u[16],c},lY=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex flex-col gap-0.5 p-4",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{"data-slot":"sheet-header",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},lG=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("font-heading text-base font-medium text-foreground",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)(l$.Title,{"data-slot":"sheet-title",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},lZ=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("text-sm text-muted-foreground",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)(l$.Description,{"data-slot":"sheet-description",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},lJ=(0,g.createContext)(null),lQ=e=>{let t,n,r,o,i,l,s,a,c,u,d,f,p,b,v,x,y=(0,h.c)(36);y[0]!==e?({defaultOpen:s,open:r,onOpenChange:i,className:n,style:l,children:t,...o}=e,y[0]=e,y[1]=t,y[2]=n,y[3]=r,y[4]=o,y[5]=i,y[6]=l,y[7]=s):(t=y[1],n=y[2],r=y[3],o=y[4],i=y[5],l=y[6],s=y[7]);let w=void 0===s||s,k=(()=>{let e,t,n=(0,h.c)(2),[r,o]=(0,g.useState)();return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=window.matchMedia("(max-width: 767px)"),t=()=>{o(window.innerWidth<768)};return e.addEventListener("change",t),o(window.innerWidth<768),()=>e.removeEventListener("change",t)},t=[],n[0]=e,n[1]=t):(e=n[0],t=n[1]),(0,g.useEffect)(e,t),!!r})(),[S,E]=(0,g.useState)(!1),[C,j]=(0,g.useState)(w),R=r??C;y[8]!==R||y[9]!==i?(a=e=>{let t="function"==typeof e?e(R):e;i?i(t):j(t),cookieStore.set({expires:Date.now()+6048e5,name:"sidebar_state",path:"/",value:String(t)})},y[8]=R,y[9]=i,y[10]=a):a=y[10];let T=a;y[11]!==k||y[12]!==T?(c=()=>k?E(l4):T(l7),y[11]=k,y[12]=T,y[13]=c):c=y[13];let N=c;y[14]!==N?(u=()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),N())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[N],y[14]=N,y[15]=u,y[16]=d):(u=y[15],d=y[16]),(0,g.useEffect)(u,d);let O=R?"expanded":"collapsed";y[17]!==k||y[18]!==R||y[19]!==S||y[20]!==T||y[21]!==O||y[22]!==N?(f={isMobile:k,open:R,openMobile:S,setOpen:T,setOpenMobile:E,state:O,toggleSidebar:N},y[17]=k,y[18]=R,y[19]=S,y[20]=T,y[21]=O,y[22]=N,y[23]=f):f=y[23];let P=f;y[24]!==n?(p=((...e)=>e4(K(e)))("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),y[24]=n,y[25]=p):p=y[25],y[26]!==l?(b={"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},y[26]=l,y[27]=b):b=y[27];let M=b;return y[28]!==t||y[29]!==o||y[30]!==p||y[31]!==M?(v=(0,m.jsx)(iO,{delay:0,children:(0,m.jsx)("div",{className:p,"data-slot":"sidebar-wrapper",style:M,...o,children:t})}),y[28]=t,y[29]=o,y[30]=p,y[31]=M,y[32]=v):v=y[32],y[33]!==P||y[34]!==v?(x=(0,m.jsx)(lJ.Provider,{value:P,children:v}),y[33]=P,y[34]=v,y[35]=x):x=y[35],x},l0=e=>{let t,n,r,o,i,l,s,a,c,u,d,f,p=(0,h.c)(46);p[0]!==e?({side:o,variant:i,collapsible:l,className:n,children:t,...r}=e,p[0]=e,p[1]=t,p[2]=n,p[3]=r,p[4]=o,p[5]=i,p[6]=l):(t=p[1],n=p[2],r=p[3],o=p[4],i=p[5],l=p[6]);let b=void 0===o?"left":o,v=void 0===i?"sidebar":i,x=void 0===l?"offcanvas":l,{isMobile:y,state:w,openMobile:k,setOpenMobile:S}=(()=>{let e=(0,g.useContext)(lJ);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e})();if("none"===x){let e,o;return p[7]!==n?(e=((...e)=>e4(K(e)))("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),p[7]=n,p[8]=e):e=p[8],p[9]!==t||p[10]!==r||p[11]!==e?(o=(0,m.jsx)("div",{className:e,"data-slot":"sidebar",...r,children:t}),p[9]=t,p[10]=r,p[11]=e,p[12]=o):o=p[12],o}if(y){let e,n,o,i,l;return p[13]===Symbol.for("react.memo_cache_sentinel")?(e={"--sidebar-width":"18rem"},p[13]=e):e=p[13],p[14]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsxs)(lY,{className:"sr-only",children:[(0,m.jsx)(lG,{children:"Sidebar"}),(0,m.jsx)(lZ,{children:"Displays the mobile sidebar."})]}),p[14]=n):n=p[14],p[15]!==t?(o=(0,m.jsx)("div",{className:"flex h-full w-full flex-col",children:t}),p[15]=t,p[16]=o):o=p[16],p[17]!==b||p[18]!==o?(i=(0,m.jsxs)(lX,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:b,style:e,children:[n,o]}),p[17]=b,p[18]=o,p[19]=i):i=p[19],p[20]!==k||p[21]!==r||p[22]!==S||p[23]!==i?(l=(0,m.jsx)(lU,{onOpenChange:S,open:k,...r,children:i}),p[20]=k,p[21]=r,p[22]=S,p[23]=i,p[24]=l):l=p[24],l}let E="collapsed"===w?x:"",C="floating"===v||"inset"===v?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";p[25]!==C?(s=((...e)=>e4(K(e)))("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",C),p[25]=C,p[26]=s):s=p[26],p[27]!==s?(a=(0,m.jsx)("div",{className:s,"data-slot":"sidebar-gap"}),p[27]=s,p[28]=a):a=p[28];let j="left"===b?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",R="floating"===v||"inset"===v?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";return p[29]!==n||p[30]!==j||p[31]!==R?(c=((...e)=>e4(K(e)))("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",j,R,n),p[29]=n,p[30]=j,p[31]=R,p[32]=c):c=p[32],p[33]!==t?(u=(0,m.jsx)("div",{className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:t}),p[33]=t,p[34]=u):u=p[34],p[35]!==r||p[36]!==c||p[37]!==u?(d=(0,m.jsx)("div",{className:c,"data-slot":"sidebar-container",...r,children:u}),p[35]=r,p[36]=c,p[37]=u,p[38]=d):d=p[38],p[39]!==b||p[40]!==w||p[41]!==d||p[42]!==E||p[43]!==a||p[44]!==v?(f=(0,m.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":E,"data-side":b,"data-slot":"sidebar","data-state":w,"data-variant":v,children:[a,d]}),p[39]=b,p[40]=w,p[41]=d,p[42]=E,p[43]=a,p[44]=v,p[45]=f):f=p[45],f},l1=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("main",{className:r,"data-slot":"sidebar-inset",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},l2=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex flex-col gap-2 p-2",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-sidebar":"header","data-slot":"sidebar-header",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},l5=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex flex-col gap-2 p-2",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-sidebar":"footer","data-slot":"sidebar-footer",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},l3=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-sidebar":"content","data-slot":"sidebar-content",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o};function l4(e){return!e}function l7(e){return!e}let l6="diffhub:file-tree:expand-all",l8="diffhub:file-tree:collapse-all",l9=e=>e.map(e=>{if("file"===e.type)return e;let t=l9(e.children);if(1===t.length&&"folder"===t[0].type){let n=t[0];return{...n,name:`${e.name}/${n.name}`}}return{...e,children:t}}),se=(e,t=[])=>{for(let n of e)"folder"===n.type&&(t.push(n.path),se(n.children,t));return t},st=(0,g.memo)(function(e){let t,n,r,o,i,l,s,a=(0,h.c)(24),{node:c,depth:u,isSelected:d,commentCount:f,onNavigate:p}=e,g=16*u+8,{insertions:b,deletions:v}=c.fileStat,x=iK;b>0&&0===v?x=iX:v>0&&0===b&&(x=iY);let y="shrink-0 text-sidebar-foreground/40";b>0&&0===v?y="shrink-0 text-diff-green":v>0&&0===b&&(y="shrink-0 text-destructive");let w=d?"true":void 0,k=d?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground";a[0]!==k?(t=((...e)=>e4(K(e)))("flex w-full cursor-pointer items-center gap-1.5 py-1 text-left transition-colors",k),a[0]=k,a[1]=t):t=a[1];let S=d?"true":void 0;return a[2]!==g?(n={containIntrinsicBlockSize:"26px",contentVisibility:"auto",paddingLeft:g,paddingRight:8},a[2]=g,a[3]=n):n=a[3],a[4]!==c.path||a[5]!==p?(r=()=>p(c.path),a[4]=c.path,a[5]=p,a[6]=r):r=a[6],a[7]!==x||a[8]!==y?(o=(0,m.jsx)(x,{size:16,className:y}),a[7]=x,a[8]=y,a[9]=o):o=a[9],a[10]!==c.name?(i=(0,m.jsx)("span",{className:"flex-1 truncate text-[12px] leading-tight",children:c.name}),a[10]=c.name,a[11]=i):i=a[11],a[12]!==f?(l=f>0&&(0,m.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-sidebar-foreground/50",children:[(0,m.jsx)(iW,{size:10}),f]}),a[12]=f,a[13]=l):l=a[13],a[14]!==c.path||a[15]!==w||a[16]!==t||a[17]!==S||a[18]!==n||a[19]!==r||a[20]!==o||a[21]!==i||a[22]!==l?(s=(0,m.jsxs)("button",{type:"button","aria-current":w,className:t,"data-file-path":c.path,"data-selected":S,style:n,onClick:r,children:[o,i,l]}),a[14]=c.path,a[15]=w,a[16]=t,a[17]=S,a[18]=n,a[19]=r,a[20]=o,a[21]=i,a[22]=l,a[23]=s):s=a[23],s}),sn=(0,g.memo)(function(e){let t,n,r,o,i,l,s,a,c,u,d,f,p=(0,h.c)(38),{node:b,depth:v,isCollapsed:x,onToggle:y,children:w}=e,k=16*v+8;if(p[0]!==k||p[1]!==x||p[2]!==b.name||p[3]!==b.path||p[4]!==y){let e=b.name.split("/");r="button",o=!x,i="flex w-full items-center gap-1.5 py-1 text-left transition-colors hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",p[13]!==k?(l={paddingLeft:k,paddingRight:8},p[13]=k,p[14]=l):l=p[14],p[15]!==b.path||p[16]!==y?(s=()=>y(b.path),p[15]=b.path,p[16]=y,p[17]=s):s=p[17],p[18]!==x?(a=x?(0,m.jsx)(iV,{size:16,className:"shrink-0 text-sidebar-foreground/50"}):(0,m.jsx)(iU,{size:16,className:"shrink-0 text-sidebar-foreground/50"}),p[18]=x,p[19]=a):a=p[19],t="truncate text-[12px] text-sidebar-foreground/70",n=e.map((t,n)=>{let r=e.slice(0,n+1).join("/");return(0,m.jsxs)(g.Fragment,{children:[t,n<e.length-1&&(0,m.jsx)("span",{className:"text-sidebar-foreground/30",children:"/"})]},r)}),p[0]=k,p[1]=x,p[2]=b.name,p[3]=b.path,p[4]=y,p[5]=t,p[6]=n,p[7]=r,p[8]=o,p[9]=i,p[10]=l,p[11]=s,p[12]=a}else t=p[5],n=p[6],r=p[7],o=p[8],i=p[9],l=p[10],s=p[11],a=p[12];return p[20]!==t||p[21]!==n?(c=(0,m.jsx)("span",{className:t,children:n}),p[20]=t,p[21]=n,p[22]=c):c=p[22],p[23]!==r||p[24]!==o||p[25]!==i||p[26]!==l||p[27]!==s||p[28]!==a||p[29]!==c?(u=(0,m.jsxs)("button",{type:r,"aria-expanded":o,className:i,style:l,onClick:s,children:[a,c]}),p[23]=r,p[24]=o,p[25]=i,p[26]=l,p[27]=s,p[28]=a,p[29]=c,p[30]=u):u=p[30],p[31]!==w||p[32]!==k||p[33]!==x?(d=!x&&(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)("div",{className:"pointer-events-none absolute inset-y-0 border-l border-sidebar-border/60",style:{left:k+8}}),w]}),p[31]=w,p[32]=k,p[33]=x,p[34]=d):d=p[34],p[35]!==u||p[36]!==d?(f=(0,m.jsxs)(m.Fragment,{children:[u,d]}),p[35]=u,p[36]=d,p[37]=f):f=p[37],f}),sr=(0,g.memo)(function e({nodes:t,depth:n,selectedFile:r,commentsByFile:o,collapsedFolders:i,onToggleFolder:l,onNavigate:s}){return t.map(t=>"folder"===t.type?(0,m.jsx)(sn,{node:t,depth:n,isCollapsed:i.has(t.path),onToggle:l,children:(0,m.jsx)(e,{nodes:t.children,depth:n+1,selectedFile:r,commentsByFile:o,collapsedFolders:i,onToggleFolder:l,onNavigate:s})},t.path):(0,m.jsx)(st,{node:t,depth:n,isSelected:r===t.path,commentCount:o.get(t.path)??0,onNavigate:s},t.path))}),so=e=>{let t,n,r,o,i,l,s,a,c,u,d,f,p,b,v,x,y,w,k,S,E,C,j,R,T,N,O=(0,h.c)(67),{files:P,selectedFile:M,onSelectFile:L,comments:A,filterQuery:I,onFilterChange:z,isLoading:D,insertions:$,deletions:_}=e;O[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Set,O[0]=t):t=O[0];let[B,F]=(0,g.useState)(t),[H,W]=(0,g.useState)(256),V=(0,g.useRef)(null);O[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{let e=e=>{V.current&&W(Math.max(8,V.current.startWidth+e.clientX-V.current.startX))},t=()=>{V.current&&(V.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},r=[],O[1]=n,O[2]=r):(n=O[1],r=O[2]),(0,g.useEffect)(n,r),O[3]!==H?(o=e=>{e.preventDefault(),V.current={startWidth:H,startX:e.clientX},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},O[3]=H,O[4]=o):o=O[4];let U=o;O[5]!==P||O[6]!==I?(i=I?P.filter(e=>e.file.toLowerCase().includes(I.toLowerCase())):P,O[5]=P,O[6]=I,O[7]=i):i=O[7];let q=i;O[8]!==q?(l=l9((e=>{let t={files:[],folders:{}};for(let n of e){let e=n.file.split("/"),r=t;for(let t=0;t<e.length-1;t+=1){let n=e[t];r.folders[n]||(r.folders[n]={files:[],folders:{}}),r=r.folders[n]}r.files.push(n)}let n=(e,t,r)=>{let o=r?`${r}/${e}`:e,i=[];for(let[e,r]of Object.entries(t.folders).toSorted())i.push(n(e,r,o));for(let e of t.files){let t=e.file.split("/");i.push({fileStat:e,name:t.at(-1)??e.file,path:e.file,type:"file"})}return{children:i,name:e,path:o,type:"folder"}},r=[];for(let[e,o]of Object.entries(t.folders).toSorted())r.push(n(e,o,""));for(let e of t.files)r.push({fileStat:e,name:e.file,path:e.file,type:"file"});return r})(q)),O[8]=q,O[9]=l):l=O[9];let K=l;O[10]!==K?(s=se(K),O[10]=K,O[11]=s):s=O[11];let X=s;if(O[12]!==X?(c=()=>{let e=()=>{F(new Set)},t=()=>{F(new Set(X))};return window.addEventListener(l6,e),window.addEventListener(l8,t),()=>{window.removeEventListener(l6,e),window.removeEventListener(l8,t)}},a=[X],O[12]=X,O[13]=a,O[14]=c):(a=O[13],c=O[14]),(0,g.useEffect)(c,a),O[15]!==A){for(let e of(u=new Map,A))u.set(e.file,(u.get(e.file)??0)+1);O[15]=A,O[16]=u}else u=O[16];let Y=u;O[17]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{F(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},O[17]=d):d=O[17];let G=d;O[18]!==L?(f=e=>{let t=new CustomEvent("diffhub:file:navigate",{cancelable:!0,detail:{file:e,source:"sidebar"}});window.dispatchEvent(t)&&L(e,"auto")},O[18]=L,O[19]=f):f=O[19];let Z=f;if(void 0!==D&&D){let e;O[20]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:(0,m.jsx)("p",{className:"animate-pulse text-xs text-sidebar-foreground/50",children:"Loading…"})}),O[20]=e):e=O[20],p=e}else if(0===q.length){let e,t,n;O[21]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("p",{className:"text-xs text-sidebar-foreground/50",children:"No changes"}),O[21]=e):e=O[21],O[22]!==I?(t=I&&(0,m.jsxs)("p",{className:"text-[10px] text-sidebar-foreground/30",children:["No files match “",I,"”"]}),O[22]=I,O[23]=t):t=O[23],O[24]!==t?(n=(0,m.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e,t]}),O[24]=t,O[25]=n):n=O[25],p=n}else{let e;O[26]!==B||O[27]!==Y||O[28]!==Z||O[29]!==M||O[30]!==K?(e=(0,m.jsx)(sr,{nodes:K,depth:0,selectedFile:M,commentsByFile:Y,collapsedFolders:B,onToggleFolder:G,onNavigate:Z}),O[26]=B,O[27]=Y,O[28]=Z,O[29]=M,O[30]=K,O[31]=e):e=O[31],p=e}let J=`${H}px`;O[32]!==J?(b={"--sidebar-width":J},O[32]=J,O[33]=b):b=O[33];let Q=b;O[34]===Symbol.for("react.memo_cache_sentinel")?(v=(0,m.jsx)(iq,{size:12,className:"pointer-events-none absolute left-2.5 text-sidebar-foreground/40"}),O[34]=v):v=O[34],O[35]!==z?(x=e=>z(e.target.value),O[35]=z,O[36]=x):x=O[36],O[37]!==I||O[38]!==x?(y=(0,m.jsx)("input",{type:"text",value:I,onChange:x,placeholder:"Filter files…","aria-label":"Filter files",className:"w-full rounded-md border border-sidebar-border bg-sidebar-accent py-1.5 pl-7 pr-7 text-xs text-sidebar-foreground placeholder:text-sidebar-foreground/40 transition-colors focus:border-sidebar-ring/50 focus:outline-none"}),O[37]=I,O[38]=x,O[39]=y):y=O[39],O[40]!==I||O[41]!==z?(w=I&&(0,m.jsx)("button",{type:"button",onClick:()=>z(""),"aria-label":"Clear filter",className:"absolute right-2 text-sm leading-none text-sidebar-foreground/40 transition-colors hover:text-sidebar-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",children:"×"}),O[40]=I,O[41]=z,O[42]=w):w=O[42],O[43]!==y||O[44]!==w?(k=(0,m.jsx)(l2,{className:"border-b border-sidebar-border h-[52px] flex-row items-center py-0 px-2",children:(0,m.jsxs)("div",{className:"relative flex w-full items-center",children:[v,y,w]})}),O[43]=y,O[44]=w,O[45]=k):k=O[45],O[46]!==p?(S=(0,m.jsx)(l3,{className:"gap-0 py-1",children:p}),O[46]=p,O[47]=S):S=O[47];let ee=1===P.length?"file":"files";return O[48]!==P.length||O[49]!==ee?(E=(0,m.jsxs)("span",{children:[P.length," ",ee]}),O[48]=P.length,O[49]=ee,O[50]=E):E=O[50],O[51]!==$?(C=$>0&&(0,m.jsxs)("span",{className:"text-diff-green",children:["+",$]}),O[51]=$,O[52]=C):C=O[52],O[53]!==_?(j=_>0&&(0,m.jsxs)("span",{className:"text-destructive",children:["−",_]}),O[53]=_,O[54]=j):j=O[54],O[55]!==E||O[56]!==C||O[57]!==j?(R=(0,m.jsx)(l5,{className:"border-t border-sidebar-border px-3 py-2",children:(0,m.jsxs)("div",{className:"flex items-center gap-2 text-[11px] font-mono text-sidebar-foreground/60",children:[E,C,j]})}),O[55]=E,O[56]=C,O[57]=j,O[58]=R):R=O[58],O[59]!==U?(T=(0,m.jsx)("div",{"aria-hidden":!0,className:"absolute inset-y-0 right-0 z-20 w-[5px] cursor-col-resize after:absolute after:inset-y-0 after:left-1/2 after:-translate-x-1/2 after:w-px after:transition-colors hover:after:bg-sidebar-border",onMouseDown:U}),O[59]=U,O[60]=T):T=O[60],O[61]!==Q||O[62]!==k||O[63]!==S||O[64]!==R||O[65]!==T?(N=(0,m.jsxs)(l0,{collapsible:"none",className:"relative overflow-hidden border-r border-sidebar-border",style:Q,children:[k,S,R,T]}),O[61]=Q,O[62]=k,O[63]=S,O[64]=R,O[65]=T,O[66]=N):N=O[66],N};var si=e.i(85869);let sl={dark:{addition:"oklch(0.696 0.15 145)",deletion:"oklch(0.704 0.191 22.216)"},light:{addition:"oklch(0.696 0.17 145)",deletion:"oklch(0.577 0.245 27.325)"}},ss={dark:{additionBg:"rgba(74, 222, 128, 0.12)",additionBgNumber:"rgba(74, 222, 128, 0.18)",additionEmphasis:"rgba(74, 222, 128, 0.25)",deletionBg:"rgba(248, 113, 113, 0.12)",deletionBgNumber:"rgba(248, 113, 113, 0.18)",deletionEmphasis:"rgba(248, 113, 113, 0.25)"},light:{additionBg:"rgba(34, 197, 94, 0.08)",additionBgNumber:"rgba(34, 197, 94, 0.12)",additionEmphasis:"rgba(34, 197, 94, 0.20)",deletionBg:"rgba(239, 68, 68, 0.08)",deletionBgNumber:"rgba(239, 68, 68, 0.12)",deletionEmphasis:"rgba(239, 68, 68, 0.20)"}},sa=e=>{let t,n,r,o,i,l,s,a,c=(0,h.c)(22),{value:u,label:d,copiedLabel:f,delay:p,className:b}=e,x=void 0===d?"Copy file path":d,w=void 0===f?"Copied!":f,k=void 0===p?400:p,[S,E]=(0,g.useState)(!1);c[0]!==u?(t=async()=>{try{await navigator.clipboard.writeText(u),E(!0),setTimeout(()=>E(!1),1500)}catch{}},c[0]=u,c[1]=t):t=c[1];let C=t,j=S?w:x,R=S?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary";c[2]!==b||c[3]!==R?(n=((...e)=>e4(K(e)))("size-6",R,b),c[2]=b,c[3]=R,c[4]=n):n=c[4],c[5]!==C||c[6]!==j||c[7]!==n?(r=(0,m.jsx)(e6,{variant:"ghost",size:"icon-xs",onClick:C,"aria-label":j,className:n}),c[5]=C,c[6]=j,c[7]=n,c[8]=r):r=c[8],c[9]!==S?(o=S?(0,m.jsx)(v,{size:12}):(0,m.jsx)(y,{size:12}),c[9]=S,c[10]=o):o=c[10],c[11]!==r||c[12]!==o?(i=(0,m.jsx)(iM,{render:r,children:o}),c[11]=r,c[12]=o,c[13]=i):i=c[13];let T=S?w:x;return c[14]!==T?(l=(0,m.jsx)(iL,{side:"bottom",children:T}),c[14]=T,c[15]=l):l=c[15],c[16]!==i||c[17]!==l?(s=(0,m.jsxs)(iP,{children:[i,l]}),c[16]=i,c[17]=l,c[18]=s):s=c[18],c[19]!==k||c[20]!==s?(a=(0,m.jsx)(iO,{delay:k,children:s}),c[19]=k,c[20]=s,c[21]=a):a=c[21],a},sc=e=>{let t,n,r,o,i,l,s,a,c,u,d,f,p,g,b,v,y,w,k,S=(0,h.c)(53),{file:E,insertions:C,deletions:j,commentCount:R,repoPath:T,collapsed:N,active:O,onToggleCollapse:P,headingId:M,panelId:L}=e,A=void 0!==N&&N;S[0]!==E?(n=-1===(t=E.lastIndexOf("/"))?"":E.slice(0,t),S[0]=E,S[1]=t,S[2]=n):(t=S[1],n=S[2]);let I=n;S[3]!==E||S[4]!==t?(r=-1===t?E:E.slice(t+1),S[3]=E,S[4]=t,S[5]=r):r=S[5];let z=r;S[6]!==E||S[7]!==P?(o=()=>{P?P():window.dispatchEvent(new CustomEvent("diffhub:file:toggle-collapse",{detail:{file:E}}))},S[6]=E,S[7]=P,S[8]=o):o=S[8];let D=o,$=void 0!==O&&O?"true":void 0,_=A?"collapsed":"expanded",B=!A,F=A?"Expand file section":"Collapse file section",H=A?"Expand file section":"Collapse file section",W=A&&"-rotate-90";S[9]!==W?(i=((...e)=>e4(K(e)))("transition-transform duration-150",W),S[9]=W,S[10]=i):i=S[10],S[11]!==i?(l=(0,m.jsx)(x,{size:14,className:i}),S[11]=i,S[12]=l):l=S[12],S[13]!==D||S[14]!==L||S[15]!==H||S[16]!==l||S[17]!==B||S[18]!==F?(s=(0,m.jsx)(e6,{variant:"ghost",size:"icon-xs",onClick:D,"aria-expanded":B,"aria-controls":L,"aria-label":F,title:H,className:"text-muted-foreground",children:l}),S[13]=D,S[14]=L,S[15]=H,S[16]=l,S[17]=B,S[18]=F,S[19]=s):s=S[19],S[20]!==I?(a=I&&(0,m.jsxs)("span",{className:"text-muted-foreground truncate shrink",children:[I,"/"]}),S[20]=I,S[21]=a):a=S[21],S[22]!==z?(c=(0,m.jsx)("span",{className:"text-foreground font-medium shrink-0",children:z}),S[22]=z,S[23]=c):c=S[23],S[24]!==a||S[25]!==c?(u=(0,m.jsxs)("span",{className:"flex min-w-0 items-baseline gap-0 font-mono",children:[a,c]}),S[24]=a,S[25]=c,S[26]=u):u=S[26];let V=`${T}/${E}`;return S[27]!==V?(d=(0,m.jsx)(sa,{value:V}),S[27]=V,S[28]=d):d=S[28],S[29]!==u||S[30]!==d?(f=(0,m.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[u,d]}),S[29]=u,S[30]=d,S[31]=f):f=S[31],S[32]!==C?(p=C>0&&(0,m.jsxs)("span",{className:"font-mono text-[12px] text-diff-green",children:["+",C]}),S[32]=C,S[33]=p):p=S[33],S[34]!==j?(g=j>0&&(0,m.jsxs)("span",{className:"font-mono text-[12px] text-destructive",children:["−",j]}),S[34]=j,S[35]=g):g=S[35],S[36]!==p||S[37]!==g?(b=(0,m.jsxs)("span",{className:"flex items-center gap-1 shrink-0",children:[p,g]}),S[36]=p,S[37]=g,S[38]=b):b=S[38],S[39]!==f||S[40]!==b?(v=(0,m.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[f,b]}),S[39]=f,S[40]=b,S[41]=v):v=S[41],S[42]!==M||S[43]!==s||S[44]!==v?(y=(0,m.jsxs)("h3",{id:M,className:"flex min-w-0 flex-1 items-center gap-2 text-[12px] font-normal",children:[s,v]}),S[42]=M,S[43]=s,S[44]=v,S[45]=y):y=S[45],S[46]!==R?(w=R>0&&(0,m.jsxs)("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-diff-purple/10 text-diff-purple text-[10px] shrink-0",children:[(0,m.jsx)(iW,{size:10}),R]}),S[46]=R,S[47]=w):w=S[47],S[48]!==y||S[49]!==w||S[50]!==$||S[51]!==_?(k=(0,m.jsxs)("div",{"data-active":$,"data-state":_,className:"flex items-center gap-2 px-3 h-9 border-b border-border bg-card sticky top-0 z-10",children:[y,w]}),S[48]=y,S[49]=w,S[50]=$,S[51]=_,S[52]=k):k=S[52],k},su=b("BranchIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("circle",{cx:6.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),g.createElement("circle",{cx:6.5,cy:18,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),g.createElement("circle",{cx:17.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6.5 8v8M17.5 8v1c0 1.6569-1.3431 3-3 3h-5c-1.6569 0-3 1.3431-3 3v1"})))),sd=b("TrashCan2Icon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 6v12c0 1.6569 1.3431 3 3 3h6c1.6569 0 3-1.3431 3-3V6M6 6h12M6 6H4m14 0h2M9 6c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-1 5v5m-4-5v5"})))),sf=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-slot":"empty",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sp=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex max-w-sm flex-col items-center gap-2 text-center",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-slot":"empty-header",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sm=Y("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}}}),sh=e=>{let t,n,r,o,i,l=(0,h.c)(11);l[0]!==e?({className:t,variant:r,...n}=e,l[0]=e,l[1]=t,l[2]=n,l[3]=r):(t=l[1],n=l[2],r=l[3]);let s=void 0===r?"default":r;return l[4]!==t||l[5]!==s?(o=((...e)=>e4(K(e)))(sm({className:t,variant:s})),l[4]=t,l[5]=s,l[6]=o):o=l[6],l[7]!==n||l[8]!==o||l[9]!==s?(i=(0,m.jsx)("div",{className:o,"data-slot":"empty-icon","data-variant":s,...n}),l[7]=n,l[8]=o,l[9]=s,l[10]=i):i=l[10],i},sg=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("font-medium text-lg tracking-tight",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-slot":"empty-title",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sb=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-slot":"empty-description",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sv=e=>{let t,n,r,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t?(r=((...e)=>e4(K(e)))("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,m.jsx)("div",{className:r,"data-slot":"empty-content",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sx=e=>{let t,n,r,o,i,l=(0,h.c)(10);return l[0]!==e?({className:n,children:t,...r}=e,l[0]=e,l[1]=t,l[2]=n,l[3]=r):(t=l[1],n=l[2],r=l[3]),l[4]!==n?(o=((...e)=>e4(K(e)))("inline-flex h-5 items-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground",n),l[4]=n,l[5]=o):o=l[5],l[6]!==t||l[7]!==r||l[8]!==o?(i=(0,m.jsx)("kbd",{className:o,...r,children:t}),l[6]=t,l[7]=r,l[8]=o,l[9]=i):i=l[9],i},sy={"[must-fix]":{border:"border-l-destructive",text:"text-destructive"},"[nit]":{border:"border-l-muted-foreground/40",text:"text-muted-foreground"},"[question]":{border:"border-l-diff-purple",text:"text-diff-purple"},"[suggestion]":{border:"border-l-diff-green",text:"text-diff-green"}},sw=()=>{let e,t,n,r,o,i,l,s,a,c,u,d=(0,h.c)(11);return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{className:"h-9 border-b border-border bg-card"}),d[0]=e):e=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[t,(0,m.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"67%"}})]}),d[2]=n):n=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),d[3]=r):r=d[3],d[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[r,(0,m.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"82%"}})]}),d[4]=o):o=d[4],d[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-destructive/20"}),d[5]=i):i=d[5],d[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-destructive/5",children:[i,(0,m.jsx)("div",{className:"h-2 rounded bg-destructive/15",style:{width:"54%"}})]}),d[6]=l):l=d[6],d[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),d[7]=s):s=d[7],d[8]===Symbol.for("react.memo_cache_sentinel")?(a=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[s,(0,m.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"78%"}})]}),d[8]=a):a=d[8],d[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),d[9]=c):c=d[9],d[10]===Symbol.for("react.memo_cache_sentinel")?(u=(0,m.jsxs)("div",{className:"animate-pulse",children:[e,(0,m.jsxs)("div",{children:[n,o,l,a,(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[c,(0,m.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"91%"}})]})]})]}),d[10]=u):u=d[10],u},sk=(0,si.default)(()=>e.A(15910).then(e=>({default:e.PatchDiff})).catch(e=>(console.error("[diffhub] Failed to load PatchDiff",e),{default:()=>(0,m.jsxs)("div",{className:"p-4 text-destructive text-sm",children:["Failed to load diff viewer: ",String(e)]})})),{loadableGenerated:{modules:[1980]},loading:()=>(0,m.jsx)(sw,{}),ssr:!1}),sS=e=>{let t,n,r,o,i,l,s,a,c,u=(0,h.c)(24),{onSubmit:d,onCancel:f}=e,[p,b]=(0,g.useState)("");u[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>b(e.target.value),u[0]=t):t=u[0],u[1]!==p||u[2]!==f||u[3]!==d?(n=e=>{("Enter"===e.key&&e.metaKey||"Return"===e.key)&&p.trim()&&d(p.trim(),""),"Escape"===e.key&&f()},u[1]=p,u[2]=f,u[3]=d,u[4]=n):n=u[4],u[5]!==p||u[6]!==n?(r=(0,m.jsx)("textarea",{ref:sO,value:p,onChange:t,placeholder:"Add a comment for the AI",rows:3,onKeyDown:n,className:"w-full resize-none rounded border-0 bg-transparent px-0 py-0 font-sans text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"}),u[5]=p,u[6]=n,u[7]=r):r=u[7],u[8]!==f?(o=(0,m.jsx)(e6,{variant:"ghost",size:"sm",onClick:f,children:"Cancel"}),u[8]=f,u[9]=o):o=u[9],u[10]!==p?(i=p.trim(),u[10]=p,u[11]=i):i=u[11];let v=!i;return u[12]!==p||u[13]!==d?(l=()=>p.trim()&&d(p.trim(),""),u[12]=p,u[13]=d,u[14]=l):l=u[14],u[15]!==v||u[16]!==l?(s=(0,m.jsx)(e6,{size:"sm",disabled:v,onClick:l,children:"Comment"}),u[15]=v,u[16]=l,u[17]=s):s=u[17],u[18]!==o||u[19]!==s?(a=(0,m.jsxs)("div",{className:"mt-2 flex justify-end gap-2",children:[o,s]}),u[18]=o,u[19]=s,u[20]=a):a=u[20],u[21]!==r||u[22]!==a?(c=(0,m.jsxs)("div",{className:"my-1 mx-4 rounded-md border border-border bg-background p-3 shadow-lg dark:shadow-none",children:[r,a]}),u[21]=r,u[22]=a,u[23]=c):c=u[23],c},sE=e=>{let t,n,r,o,i,l,s,a,c,u,d,f,p,b,x,w=(0,h.c)(39),{comment:k,onDelete:S}=e,[E,C]=(0,g.useState)(!1);w[0]!==k.body||w[1]!==k.tag?(t=()=>{let e=k.tag?`${k.tag} ${k.body}`:k.body;navigator.clipboard.writeText(e).catch(sP),C(!0),setTimeout(()=>C(!1),1500)},w[0]=k.body,w[1]=k.tag,w[2]=t):t=w[2];let j=t,R=k.tag?sy[k.tag]?.border??"border-l-ring/40":"border-l-ring/40";w[3]!==R?(n=((...e)=>e4(K(e)))("group my-1 mx-4 rounded-md border border-border bg-card shadow-sm dark:shadow-none overflow-hidden border-l-2",R),w[3]=R,w[4]=n):n=w[4],w[5]!==k.tag?(r=k.tag&&(0,m.jsx)("span",{className:((...e)=>e4(K(e)))("shrink-0 mt-0.5 text-[11px]",sy[k.tag]?.text??"text-muted-foreground"),children:k.tag}),w[5]=k.tag,w[6]=r):r=w[6],w[7]!==k.body?(o=(0,m.jsx)("p",{className:"flex-1 text-sm text-foreground leading-relaxed",children:k.body}),w[7]=k.body,w[8]=o):o=w[8];let T=E?"Copied!":"Copy comment",N=E?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary";return w[9]!==N?(i=((...e)=>e4(K(e)))("rounded p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",N),w[9]=N,w[10]=i):i=w[10],w[11]!==E?(l=E?(0,m.jsx)(v,{size:12}):(0,m.jsx)(y,{size:12}),w[11]=E,w[12]=l):l=w[12],w[13]!==j||w[14]!==T||w[15]!==i||w[16]!==l?(s=(0,m.jsx)("button",{type:"button",onClick:j,title:T,className:i,children:l}),w[13]=j,w[14]=T,w[15]=i,w[16]=l,w[17]=s):s=w[17],w[18]===Symbol.for("react.memo_cache_sentinel")?(a=(0,m.jsx)(sd,{size:12}),w[18]=a):a=w[18],w[19]!==S?(c=(0,m.jsx)("button",{type:"button",onClick:S,title:"Delete comment","aria-label":"Delete comment",className:"rounded p-1 text-muted-foreground transition-colors hover:text-destructive hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",children:a}),w[19]=S,w[20]=c):c=w[20],w[21]!==c||w[22]!==s?(u=(0,m.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[s,c]}),w[21]=c,w[22]=s,w[23]=u):u=w[23],w[24]!==u||w[25]!==r||w[26]!==o?(d=(0,m.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5",children:[r,o,u]}),w[24]=u,w[25]=r,w[26]=o,w[27]=d):d=w[27],w[28]!==k.lineNumber?(f=(0,m.jsxs)("span",{children:["L",k.lineNumber]}),w[28]=k.lineNumber,w[29]=f):f=w[29],w[30]!==k.createdAt?(p=k.createdAt&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{children:"·"}),(0,m.jsx)("span",{children:(e=>{let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return"just now";let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);if(r<24)return`${r}h ago`;let o=Math.floor(r/24);return`${o}d ago`})(k.createdAt)})]}),w[30]=k.createdAt,w[31]=p):p=w[31],w[32]!==f||w[33]!==p?(b=(0,m.jsxs)("div",{className:"border-t border-border/40 px-3 py-1 flex items-center gap-2 text-[10px] text-muted-foreground/60",children:[f,p]}),w[32]=f,w[33]=p,w[34]=b):b=w[34],w[35]!==d||w[36]!==b||w[37]!==n?(x=(0,m.jsxs)("div",{className:n,children:[d,b]}),w[35]=d,w[36]=b,w[37]=n,w[38]=x):x=w[38],x},sC=e=>`diff-${encodeURIComponent(e)}`,sj=(0,g.memo)(function(e){let t,n,r=(0,h.c)(5),{getHoveredLine:o,onCommentTargetChange:i}=e;r[0]!==o||r[1]!==i?(t=()=>{let e=o();e&&i({lineNumber:e.lineNumber,side:e.side})},r[0]=o,r[1]=i,r[2]=t):t=r[2];let l=t;return r[3]!==l?(n=(0,m.jsx)("button",{type:"button",className:"diffhub-gutter-btn",title:"Add comment for AI",onClick:l,children:"+"}),r[3]=l,r[4]=n):n=r[4],n}),sR=(0,g.memo)(function(e){let t,n,r,o,i,l,s,a=(0,h.c)(46),{file:c,filePatch:u,layout:d,prerenderedHTML:f,comments:p,fileStat:g,collapsed:b,active:v,shouldRenderBody:x,sectionId:y,onToggleCollapse:w,repoPath:k,commentTarget:S,onCommentTargetChange:E,onAddComment:j,onDeleteComment:R}=e,T=void 0!==v&&v,{resolvedTheme:N}=(0,C.useTheme)();if(a[0]!==p||a[1]!==c){let e;a[3]!==c?(e=e=>e.file===c,a[3]=c,a[4]=e):e=a[4],t=p.filter(e),a[0]=p,a[1]=c,a[2]=t}else t=a[2];let O=t,P=`${y}-header`,M=`${y}-panel`;a[5]!==S||a[6]!==c||a[7]!==O?(n=O.map(sM),S&&n.push({lineNumber:S.lineNumber,metadata:{file:c,type:"input"},side:S.side}),a[5]=S,a[6]=c,a[7]=O,a[8]=n):n=a[8];let L=n;a[9]!==c||a[10]!==j||a[11]!==E||a[12]!==R?(r=e=>{let t=e.metadata;return t?"input"===t.type?(0,m.jsx)(sS,{onSubmit:async(t,n)=>{await j(c,e.lineNumber,e.side,t,n),E(null)},onCancel:()=>E(null)}):"comment"===t.type?(0,m.jsx)(sE,{comment:t.comment,onDelete:()=>R(t.comment.id)}):null:null},a[9]=c,a[10]=j,a[11]=E,a[12]=R,a[13]=r):r=a[13];let A=r;a[14]!==E?(o=e=>(0,m.jsx)(sj,{getHoveredLine:e,onCommentTargetChange:E}),a[14]=E,a[15]=o):o=a[15];let I=o,z=b&&null===S,D=null;if(!z)if(x){let e;if(a[16]!==c||a[17]!==u||a[18]!==d||a[19]!==L||a[20]!==f||a[21]!==A||a[22]!==I||a[23]!==N){var $;let t,n;e=u?(0,m.jsx)(sk,{patch:u,prerenderedHTML:f?.["light"===N?"light":"dark"],disableWorkerPool:!0,style:{colorScheme:"light"===N?"light":"dark"},options:{diffStyle:"split"===d?"split":"unified",disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"word",lineHoverHighlight:"line",maxLineDiffLength:500,overflow:"wrap",theme:{dark:"github-dark",light:"github-light"},themeType:"light"===N?"light":"dark",unsafeCSS:(t=sl[$=N??"dark"],n=ss[$],`
17
+ [data-diff-span] { border-radius: 0; }
18
+ :host {
19
+ /* Base colors for additions/deletions */
20
+ --diffs-addition-color-override: ${t.addition};
21
+ --diffs-deletion-color-override: ${t.deletion};
22
+
23
+ /* Line background colors */
24
+ --diffs-bg-addition-override: ${n.additionBg};
25
+ --diffs-bg-deletion-override: ${n.deletionBg};
26
+
27
+ /* Line number background colors */
28
+ --diffs-bg-addition-number-override: ${n.additionBgNumber};
29
+ --diffs-bg-deletion-number-override: ${n.deletionBgNumber};
30
+
31
+ /* Character-level emphasis (inline diff highlights) */
32
+ --diffs-bg-addition-emphasis-override: ${n.additionEmphasis};
33
+ --diffs-bg-deletion-emphasis-override: ${n.deletionEmphasis};
34
+
35
+ /* Hover states */
36
+ --diffs-bg-addition-hover-override: ${n.additionEmphasis};
37
+ --diffs-bg-deletion-hover-override: ${n.deletionEmphasis};
38
+
39
+ /* Line number text colors */
40
+ --diffs-fg-number-addition-override: ${t.addition};
41
+ --diffs-fg-number-deletion-override: ${t.deletion};
42
+ }
43
+ `)},lineAnnotations:L,renderAnnotation:A,renderGutterUtility:I},`${c}:${d}:${N}`):(0,m.jsx)("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No textual patch available for this file."}),a[16]=c,a[17]=u,a[18]=d,a[19]=L,a[20]=f,a[21]=A,a[22]=I,a[23]=N,a[24]=e}else e=a[24];D=e}else{let e;a[25]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{"aria-hidden":!0,className:"border-t border-border/60 bg-background/30",style:{containIntrinsicBlockSize:"240px",contentVisibility:"auto"}}),a[25]=e):e=a[25],D=e}let _=g?.insertions??0,B=g?.deletions??0;return a[26]!==T||a[27]!==b||a[28]!==c||a[29]!==O.length||a[30]!==P||a[31]!==w||a[32]!==M||a[33]!==k||a[34]!==_||a[35]!==B?(i=(0,m.jsx)(sc,{file:c,insertions:_,deletions:B,commentCount:O.length,repoPath:k,collapsed:b,active:T,onToggleCollapse:w,headingId:P,panelId:M}),a[26]=T,a[27]=b,a[28]=c,a[29]=O.length,a[30]=P,a[31]=w,a[32]=M,a[33]=k,a[34]=_,a[35]=B,a[36]=i):i=a[36],a[37]!==P||a[38]!==z||a[39]!==D||a[40]!==M?(l=(0,m.jsx)("div",{id:M,role:"region","aria-labelledby":P,hidden:z,children:D}),a[37]=P,a[38]=z,a[39]=D,a[40]=M,a[41]=l):l=a[41],a[42]!==c||a[43]!==i||a[44]!==l?(s=(0,m.jsxs)("div",{"data-filename":c,className:"font-sans",children:[i,l]}),a[42]=c,a[43]=i,a[44]=l,a[45]=s):s=a[45],s}),sT=(0,g.memo)(function(e){let t,n,r,o,i,l,s,a=(0,h.c)(29),{file:c,filePatch:u,index:d,layout:f,prerenderedHTML:p,comments:b,fileStat:v,collapsed:x,active:y,onToggleCollapse:w,onVisible:k,repoPath:S,onAddComment:E,onDeleteComment:C}=e,j=(0,g.useRef)(null),[R,T]=(0,g.useState)(null),[N,O]=(0,g.useState)(d<4||y||!x);a[0]!==x?(t=()=>{x||O(!0)},n=[x],a[0]=x,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,g.useEffect)(t,n),a[3]!==c||a[4]!==k?(r=()=>{let e=j.current;if(!e||"u"<typeof IntersectionObserver)return;let t=new IntersectionObserver(e=>{let[t]=e;t&&(t.isIntersecting&&O(!0),t.isIntersecting&&t.intersectionRatio>=.35&&k(c))},{root:document.querySelector("#diff-container"),rootMargin:"-72px 0px -55% 0px",threshold:[.15,.35,.6]});return t.observe(e),()=>t.disconnect()},o=[c,k],a[3]=c,a[4]=k,a[5]=r,a[6]=o):(r=a[5],o=a[6]),(0,g.useEffect)(r,o),a[7]!==c?(i=sC(c),a[7]=c,a[8]=i):i=a[8];let P=i,M=N&&(!x||null!==R),L=p?.[f];return a[9]!==y||a[10]!==x||a[11]!==R||a[12]!==b||a[13]!==c||a[14]!==u||a[15]!==v||a[16]!==f||a[17]!==E||a[18]!==C||a[19]!==w||a[20]!==S||a[21]!==P||a[22]!==M||a[23]!==L?(l=(0,m.jsx)(sR,{file:c,filePatch:u,layout:f,prerenderedHTML:L,comments:b,fileStat:v,collapsed:x,active:y,shouldRenderBody:M,sectionId:P,onToggleCollapse:w,repoPath:S,commentTarget:R,onCommentTargetChange:T,onAddComment:E,onDeleteComment:C}),a[9]=y,a[10]=x,a[11]=R,a[12]=b,a[13]=c,a[14]=u,a[15]=v,a[16]=f,a[17]=E,a[18]=C,a[19]=w,a[20]=S,a[21]=P,a[22]=M,a[23]=L,a[24]=l):l=a[24],a[25]!==c||a[26]!==P||a[27]!==l?(s=(0,m.jsx)("section",{ref:j,id:P,"data-file-section":c,className:"scroll-mt-16",children:l}),a[25]=c,a[26]=P,a[27]=l,a[28]=s):s=a[28],s}),sN=e=>{let t,n,r,o,i,l=(0,h.c)(40),{patchesByFile:s,prerenderedHTMLByFile:a,layout:c,comments:u,onAddComment:d,onDeleteComment:f,activeFileId:p,fileStats:g,collapsedFiles:b,onToggleCollapse:v,onActiveFileChange:x,repoPath:y}=e;if(l[0]!==g){for(let e of(t=new Map,g))t.set(e.file,e);l[0]=g,l[1]=t}else t=l[1];let w=t;l[2]!==w||l[3]!==g||l[4]!==s?(n=(e=>{let t={files:[],folders:new Map};for(let n of e){let e=n.split("/"),r=t;for(let t=0;t<e.length-1;t+=1){let n=e[t];r.folders.has(n)||r.folders.set(n,{files:[],folders:new Map});let o=r.folders.get(n);o&&(r=o)}r.files.push(n)}let n=[],r=e=>{for(let[,t]of[...e.folders.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])))r(t);let t=[...e.files].toSorted((e,t)=>{let n=e.split("/").at(-1)??e,r=t.split("/").at(-1)??t;return n.localeCompare(r)});n.push(...t)};return r(t),n})([...g.map(sL),...Object.keys(s).filter(e=>!w.has(e))]),l[2]=w,l[3]=g,l[4]=s,l[5]=n):n=l[5];let k=n;if(l[6]!==v||l[7]!==k){for(let e of(r=new Map,k))r.set(e,()=>v(e));l[6]=v,l[7]=k,l[8]=r}else r=l[8];let S=r;if(0===k.length){let e,t;return l[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsxs)(sp,{children:[(0,m.jsx)(sh,{variant:"icon",children:(0,m.jsx)(su,{})}),(0,m.jsx)(sg,{children:"No changes"}),(0,m.jsx)(sb,{children:"The working tree is clean relative to the base branch"})]}),l[9]=e):e=l[9],l[10]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.jsxs)(sf,{className:"h-full",children:[e,(0,m.jsx)(sv,{children:(0,m.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,m.jsx)(sx,{children:"r"})," to refresh"]})})]}),l[10]=t):t=l[10],t}if(l[11]!==p||l[12]!==b||l[13]!==u||l[14]!==w||l[15]!==c||l[16]!==x||l[17]!==d||l[18]!==f||l[19]!==k||l[20]!==s||l[21]!==a||l[22]!==y||l[23]!==S){let e;l[25]!==p||l[26]!==b||l[27]!==u||l[28]!==w||l[29]!==c||l[30]!==x||l[31]!==d||l[32]!==f||l[33]!==s||l[34]!==a||l[35]!==y||l[36]!==S?(e=(e,t)=>(0,m.jsx)(sT,{file:e,filePatch:s[e]??"",index:t,layout:c,prerenderedHTML:a?.[e],comments:u,fileStat:w.get(e),collapsed:b.has(e),active:p===e,onToggleCollapse:S.get(e),onVisible:x,repoPath:y,onAddComment:d,onDeleteComment:f},e),l[25]=p,l[26]=b,l[27]=u,l[28]=w,l[29]=c,l[30]=x,l[31]=d,l[32]=f,l[33]=s,l[34]=a,l[35]=y,l[36]=S,l[37]=e):e=l[37],o=k.map(e),l[11]=p,l[12]=b,l[13]=u,l[14]=w,l[15]=c,l[16]=x,l[17]=d,l[18]=f,l[19]=k,l[20]=s,l[21]=a,l[22]=y,l[23]=S,l[24]=o}else o=l[24];return l[38]!==o?(i=(0,m.jsx)("div",{className:"h-full min-h-0 overflow-auto",id:"diff-container",children:o}),l[38]=o,l[39]=i):i=l[39],i};function sO(e){e?.focus({preventScroll:!0})}function sP(){}function sM(e){return{lineNumber:e.lineNumber,metadata:{comment:e,type:"comment"},side:e.side??"right"}}function sL(e){return e.file}let sA=[1e3,2e3,5e3],sI=(e,t,n)=>{let[r,o]=(0,g.useState)(t);return(0,g.useEffect)(()=>{try{let t=localStorage.getItem(e);null!==t&&(!n||n.includes(t))&&o(t)}catch{}},[e,n]),[r,(0,g.useCallback)(t=>{o(n=>{let r="function"==typeof t?t(n):t;try{localStorage.setItem(e,r)}catch{}return r})},[e])]},sz=e=>{let t,n=(0,h.c)(3),{text:r,pulse:o}=e,i=`text-muted-foreground text-sm${void 0!==o&&o?" animate-pulse":""}`;return n[0]!==i||n[1]!==r?(t=(0,m.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,m.jsx)("div",{className:i,children:r})}),n[0]=i,n[1]=r,n[2]=t):t=n[2],t},sD=e=>{let t=sC(e);if(window.CSS?.escape)return`#${window.CSS.escape(t)}`;let n=t.replaceAll(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,"\\$&");return`#${n}`},s$=e=>{let t,n,r,o,i=(0,h.c)(10),{notice:l}=e,s="border-border bg-muted/40 text-muted-foreground";"destructive"===l.tone?s="border-destructive/30 bg-destructive/10 text-destructive":"warning"===l.tone&&(s="border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400");let a=`border-b px-4 py-2 text-xs ${s}`;return i[0]!==l.label?(t=(0,m.jsx)("span",{className:"font-medium",children:l.label}),i[0]=l.label,i[1]=t):t=i[1],i[2]!==l.detail?(n=l.detail&&(0,m.jsx)("span",{className:"text-xs opacity-80",children:l.detail}),i[2]=l.detail,i[3]=n):n=i[3],i[4]!==t||i[5]!==n?(r=(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[t,n]}),i[4]=t,i[5]=n,i[6]=r):r=i[6],i[7]!==a||i[8]!==r?(o=(0,m.jsx)("div",{className:a,children:r}),i[7]=a,i[8]=r,i[9]=o):o=i[9],o},s_=e=>{let t,n,r,o=(0,h.c)(23),{filesData:i,deferredDiffData:l,diffError:s,syncNotice:a,layout:c,comments:u,onAddComment:d,onDeleteComment:f,selectedFile:p,collapsedFiles:g,onToggleCollapse:b,onActiveFileChange:v,repoPath:x}=e;if(null===i){let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)(sz,{text:"Loading diff…",pulse:!0}),o[0]=e):e=o[0],e}if(0===i.files.length){let e;return o[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)(sz,{text:"No changes"}),o[1]=e):e=o[1],e}if(!l){let e;if(s){let e;return o[2]!==s?(e=(0,m.jsx)(sz,{text:s}),o[2]=s,o[3]=e):e=o[3],e}return o[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)(sz,{text:"Loading diff…",pulse:!0}),o[4]=e):e=o[4],e}return o[5]!==a?(t=a&&(0,m.jsx)(s$,{notice:a}),o[5]=a,o[6]=t):t=o[6],o[7]!==g||o[8]!==u||o[9]!==l.patchesByFile||o[10]!==l.prerenderedHTMLByFile||o[11]!==i.files||o[12]!==c||o[13]!==v||o[14]!==d||o[15]!==f||o[16]!==b||o[17]!==x||o[18]!==p?(n=(0,m.jsx)("div",{className:"min-h-0 flex-1",children:(0,m.jsx)(sN,{patchesByFile:l.patchesByFile,prerenderedHTMLByFile:l.prerenderedHTMLByFile,layout:c,comments:u,onAddComment:d,onDeleteComment:f,activeFileId:p,fileStats:i.files,collapsedFiles:g,onToggleCollapse:b,onActiveFileChange:v,repoPath:x})}),o[7]=g,o[8]=u,o[9]=l.patchesByFile,o[10]=l.prerenderedHTMLByFile,o[11]=i.files,o[12]=c,o[13]=v,o[14]=d,o[15]=f,o[16]=b,o[17]=x,o[18]=p,o[19]=n):n=o[19],o[20]!==t||o[21]!==n?(r=(0,m.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[t,n]}),o[20]=t,o[21]=n,o[22]=r):r=o[22],r};e.s(["DiffApp",0,({repoPath:e})=>{let[t,n]=(0,g.useState)(null),[r,o]=(0,g.useState)([]),[i,l]=(0,g.useState)(null),s=(0,g.useRef)(null),[a,c]=(0,g.useState)(null),[u,d]=sI("diffhub-layout","stacked",["split","stacked"]),[f,p]=(0,g.useState)(""),[h,b]=(0,g.useState)(!1),[v,x]=(0,g.useState)(null),[y,w]=(0,g.useState)(null),[k,S]=(0,g.useState)(!1),[E,C]=sI("diffhub-diffMode","all",["all","uncommitted"]),j=(0,g.useRef)(E),R=(0,g.useRef)(null),T=(0,g.useRef)(null),N=(0,g.useRef)(null),O=(0,g.useRef)(null),P=(0,g.useRef)(!1),M=(0,g.useRef)(!1),L=(0,g.useRef)(()=>Promise.resolve()),A=(0,g.useRef)(!1),I=(0,g.useRef)(!1),z=(0,g.useRef)(0),[,D]=(0,g.useTransition)(),[$,_]=(0,g.useState)(()=>new Set);(0,g.useEffect)(()=>{j.current=E},[E]),(0,g.useEffect)(()=>{_(new Set(((e,t)=>{try{let n=localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}})(`diffhub-collapsed:${e}`,[])))},[e]);let B=(0,g.useCallback)(t=>{_(n=>{let r=t(n);if(r===n)return n;try{localStorage.setItem(`diffhub-collapsed:${e}`,JSON.stringify([...r]))}catch{}return r})},[e]),F=(0,g.useDeferredValue)(a),H=(0,g.useCallback)(()=>{let e=new URLSearchParams;"uncommitted"===j.current&&e.set("mode","uncommitted");let t=e.toString();return t?`?${t}`:""},[]),W=(0,g.useCallback)(()=>{let e=new URLSearchParams;O.current&&e.set("generation",O.current),"uncommitted"===j.current&&e.set("mode","uncommitted");let t=e.toString();return t?`?${t}`:""},[]),V=(0,g.useCallback)(async e=>{let t=O.current,n=N.current;w(null),console.info("[diffhub] fetchDiff start",{fingerprint:n,generation:t,mode:j.current,requestId:e});try{var r,o;let i,l,s=await fetch(`/api/diff${W()}`);if(!s.ok){let r=(await s.json().catch(()=>({error:"Failed to load diff"}))).error??`Failed to load diff (${s.status})`;console.error("[diffhub] fetchDiff non-ok response",{fingerprint:n,generation:t,mode:j.current,requestId:e,responseStatus:s.status,responseStatusText:s.statusText,serverError:r}),e===z.current&&w(r);return}let a=(r=await s.json(),o=n??"unknown",i=r.patchesByFile??(e=>{let t={},n=/^diff --git a\/(.+?) b\/(.+)$/gm,r=[],o=n.exec(e);for(;o;)r.push({file:o[2],start:o.index}),o=n.exec(e);for(let[n,o]of r.entries()){let i=r[n+1]?.start??e.length,l=e.slice(o.start,i).trimEnd();t[o.file]=l?`${l}
44
+ `:""}return t})(r.patch??""),{baseBranch:r.baseBranch,branch:r.branch,generation:r.generation,mergeBase:r.mergeBase,patchesByFile:i,prerenderedHTMLByFile:r.prerenderedHTMLByFile,reviewKeysByFile:r.reviewKeysByFile??(l=r.generation,Object.fromEntries(Object.entries(i).map(([e,t])=>[e,`${l}:${(e=>{let t=0;for(let n=0;n<e.length;n+=1)t=Math.trunc(Math.imul(31,t)+(e.codePointAt(n)??0));return Math.abs(t).toString(36)})(`${e}:${t}`)}`]))),sourceFingerprint:o});if(e!==z.current||n!==N.current||t!==O.current)return void console.info("[diffhub] fetchDiff response stale",{fingerprint:n,generation:t,latestRequestId:z.current,requestId:e});console.info("[diffhub] fetchDiff success",{fileCount:Object.keys(a.patchesByFile).length,fingerprint:n,generation:a.generation,requestId:e}),D(()=>c(a))}catch(r){console.error("[diffhub] fetchDiff threw",{error:r,fingerprint:n,generation:t,mode:j.current,requestId:e}),e===z.current&&w(r instanceof Error?r.message:String(r))}},[W,D]),U=(0,g.useCallback)(async()=>{if(I.current=!0,!A.current){A.current=!0,S(!0);try{for(;I.current;)I.current=!1,z.current+=1,await V(z.current)}finally{A.current=!1,S(!1)}}},[V]),q=(0,g.useCallback)(e=>{if(N.current=e.fingerprint,O.current=e.generation,0===e.files.length){s.current=null,z.current+=1,(0,g.startTransition)(()=>{l(null),c(null)}),w(null),T.current=e.fingerprint;return}let t=s.current;t&&e.files.some(e=>e.file===t)||(s.current=t=e.files[0]?.file??null,(0,g.startTransition)(()=>l(t)));let n=e.fingerprint!==T.current,r=a?.generation===e.generation;(n||!r||null!==y)&&(T.current=e.fingerprint,n&&(z.current+=1),U())},[a,y,U]),K=(0,g.useCallback)(()=>{z.current+=1,T.current=null,N.current=null,O.current=null,c(null),w(null)},[]),X=(0,g.useCallback)(async(e=!1)=>{if(P.current){M.current=!0;return}P.current=!0,e||b(!0),x(null);try{let[e,t]=await Promise.all([fetch(`/api/files${H()}`),fetch("/api/comments").then(async e=>{if(!e.ok)throw Error(`Failed to load comments (${e.status})`);return await e.json()}).catch(e=>(console.error("[diffhub] comments refresh failed",{error:e}),null))]);if(!e.ok){let t=await e.json().catch(()=>({error:"Network error"}));x(t.error??"Failed to load files");return}let r=await e.json();(0,g.startTransition)(()=>{n(r),null!==t&&o(t)}),q(r)}catch(e){x(e instanceof Error?e.message:String(e))}finally{e||b(!1),P.current=!1,M.current&&(M.current=!1,queueMicrotask(()=>{L.current(!0)}))}},[H,q]);(0,g.useEffect)(()=>{L.current=X},[X]);let Y=(e=>{let[t,n]=(0,g.useState)("connecting"),r=(0,g.useEffectEvent)(e),o=(0,g.useRef)(null);return(0,g.useEffect)(()=>{let e=!1,t=0,i=null,l=new AbortController,s=async()=>{if(!e)try{let i=null===o.current?"":`?revision=${o.current}`,a=await fetch(`/api/watch${i}`,{cache:"no-store",signal:l.signal});if(e)return;if(!a.ok)throw Error(`Watch request failed with status ${a.status}`);let c=await a.json();if(e)return;t=0,n("live");let u=o.current;o.current=c.revision,c.changed&&null!==u&&c.revision!==u&&r(),e||queueMicrotask(()=>{e||s()})}catch(r){if(e||l.signal.aborted)return;if(console.error("[diffhub] file watch failed",{error:r,failureCount:t+=1}),t>10){console.error("[diffhub] file watch: max retries exceeded, stopping"),n("fallback");return}n(t>=sA.length?"fallback":"connecting"),i=setTimeout(()=>{i=null,e||s()},sA[Math.min(t-1,sA.length-1)])}};return n("connecting"),s(),()=>{e=!0,l.abort(),i&&clearTimeout(i)}},[]),t})(()=>{X(!0)}),G=(0,g.useCallback)(()=>{X()},[X]);(0,g.useEffect)(()=>{X()},[X]),(0,g.useEffect)(()=>{let e=setInterval(()=>void X(!0),"live"===Y?3e4:5e3);return()=>clearInterval(e)},[Y,X]);let Z=(0,g.useCallback)((e,t=800)=>{R.current={file:e,until:Date.now()+t},s.current=e,(0,g.startTransition)(()=>l(e))},[]),J=(0,g.useCallback)((e,t="smooth")=>{Z(e),B(t=>{if(t.has(e)){let n=new Set(t);return n.delete(e),n}return t});let n=e=>{e.scrollIntoView({behavior:t,block:"start"});let n=e.querySelector('[role="heading"], h2, h3, button');n?n.focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))},r=document.querySelector(sD(e));if(r)return void n(r);let o=document.querySelector("#diff-container");if(!o)return;let i=new MutationObserver(()=>{let t=document.querySelector(sD(e));t&&(i.disconnect(),n(t))});i.observe(o,{childList:!0,subtree:!0}),setTimeout(()=>i.disconnect(),5e3)},[Z,B]),Q=(0,g.useCallback)(e=>{let t=R.current;if(t){if(Date.now()>t.until)R.current=null;else if(t.file!==e)return}s.current!==e&&(s.current=e,(0,g.startTransition)(()=>l(e)))},[]),ee=(0,g.useCallback)(e=>{Z(e),B(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[Z,B]),et=(0,g.useCallback)(()=>{B(()=>new Set((t?.files??[]).map(e=>e.file)))},[t,B]),en=(0,g.useCallback)(()=>{B(()=>new Set)},[B]);(0,g.useEffect)(()=>{let e=e=>{if(!(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement)){if("s"!==e.key||e.metaKey||e.ctrlKey||d(e=>"split"===e?"stacked":"split"),"/"!==e.key&&"t"!==e.key.toLowerCase()||e.metaKey||e.ctrlKey||(e.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"c"===e.key.toLowerCase()&&!e.metaKey&&!e.ctrlKey&&i){if(e.shiftKey)return void et();ee(i)}if("e"!==e.key.toLowerCase()||!e.shiftKey||e.metaKey||e.ctrlKey||en(),"r"!==e.key||e.metaKey||e.ctrlKey||X(),"j"===e.key||"k"===e.key){let n=t?.files??[];if(0===n.length)return;let r=n.findIndex(e=>e.file===i),o="j"===e.key?n[r+1]:n[r-1];o&&J(o.file)}}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[et,en,t,X,J,i,d,ee]);let er=(0,g.useCallback)(e=>{j.current=e,C(e),K(),X(!1)},[K,X,C]),eo=(0,g.useCallback)(async(e,t,n,r,i)=>{let l=await fetch("/api/comments",{body:JSON.stringify({body:r,file:e,lineNumber:t,side:n,tag:i}),headers:{"Content-Type":"application/json"},method:"POST"});if(l.ok){let e=await l.json();o(t=>[...t,e])}},[]),ei=(0,g.useCallback)(async e=>{await fetch(`/api/comments?id=${e}`,{method:"DELETE"}),o(t=>t.filter(t=>t.id!==e))},[]),el=v&&null!==t?{detail:v,label:"Background refresh failed",tone:"destructive"}:y&&F?{detail:y,label:"Diff refresh failed",tone:"destructive"}:"fallback"===Y?{detail:"Live watch is unavailable, so the app is polling every 5 seconds",label:"Polling fallback",tone:"warning"}:null;return v&&null===t?(0,m.jsx)(lQ,{className:"h-svh",children:(0,m.jsxs)(l1,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,m.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/10 px-6 py-4 text-sm text-destructive max-w-md text-center",children:[(0,m.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,m.jsx)("p",{className:"text-xs opacity-80",children:v})]}),(0,m.jsx)(e6,{variant:"outline",onClick:G,children:"Retry"})]})}):(0,m.jsxs)(lQ,{className:"h-svh",children:[(0,m.jsx)(so,{files:t?.files??[],selectedFile:i,onSelectFile:J,comments:r,filterQuery:f,onFilterChange:p,isLoading:null===t,insertions:t?.insertions??0,deletions:t?.deletions??0}),(0,m.jsxs)(l1,{className:"flex flex-col h-svh overflow-hidden",children:[(0,m.jsx)(i$,{branch:t?.branch??"…",baseBranch:t?.baseBranch??"main",refreshing:h||k,fileWatchState:Y,comments:r,diffMode:E,onDiffModeChange:er,layout:u,onLayoutChange:d,syncNotice:el}),(0,m.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,m.jsx)(s_,{filesData:t,deferredDiffData:F,diffError:y,syncNotice:el,layout:u,comments:r,onAddComment:eo,onDeleteComment:ei,selectedFile:i,collapsedFiles:$,onToggleCollapse:ee,onActiveFileChange:Q,repoPath:e})})]})]})}],33357)}]);