diffhub 0.1.2 → 0.1.3

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 (86) hide show
  1. package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  2. package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
  3. package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  14. package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +11 -11
  15. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  16. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  17. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  18. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  19. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  20. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/.next/standalone/apps/web/.next/server/app/api/comments/route.js +1 -1
  22. package/.next/standalone/apps/web/.next/server/app/api/comments/route.js.nft.json +1 -1
  23. package/.next/standalone/apps/web/.next/server/app/api/diff/route.js +3 -2
  24. package/.next/standalone/apps/web/.next/server/app/api/diff/route.js.nft.json +1 -1
  25. package/.next/standalone/apps/web/.next/server/app/api/discard/route.js +1 -1
  26. package/.next/standalone/apps/web/.next/server/app/api/discard/route.js.nft.json +1 -1
  27. package/.next/standalone/apps/web/.next/server/app/api/file/route.js +1 -1
  28. package/.next/standalone/apps/web/.next/server/app/api/file/route.js.nft.json +1 -1
  29. package/.next/standalone/apps/web/.next/server/app/api/files/route.js +1 -1
  30. package/.next/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
  31. package/.next/standalone/apps/web/.next/server/app/api/open/route.js +1 -1
  32. package/.next/standalone/apps/web/.next/server/app/api/open/route.js.nft.json +1 -1
  33. package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js +1 -1
  34. package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  35. package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
  36. package/.next/standalone/apps/web/.next/server/app/index.rsc +12 -12
  37. package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  38. package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +12 -12
  39. package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
  40. package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +6 -6
  41. package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  42. package/.next/standalone/apps/web/.next/server/app/page/react-loadable-manifest.json +1 -2
  43. package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
  44. package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/apps/web/.next/server/chunks/[externals]_shiki_wasm_0~fgmgp._.js +3 -0
  46. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__01.zj5h._.js +3 -0
  47. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0tbrp5x._.js +13 -0
  48. package/.next/standalone/apps/web/.next/server/chunks/_0r24f4c._.js +69 -0
  49. package/.next/standalone/apps/web/.next/server/chunks/node_modules_@pierre_theme_dist_pierre-dark_mjs_0ojo3_n._.js +3 -0
  50. package/.next/standalone/apps/web/.next/server/chunks/node_modules_@pierre_theme_dist_pierre-light_mjs_0pw9wwg._.js +3 -0
  51. package/.next/standalone/apps/web/.next/server/chunks/ssr/0fuv_@swc_helpers_cjs__interop_require_default_cjs_0ghzfn9._.js +3 -0
  52. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0bit3~x._.js +3 -0
  53. package/.next/standalone/apps/web/.next/server/chunks/ssr/{_0qo42r0._.js → _0m1v4-9._.js} +2 -2
  54. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0oc3qg_._.js +3 -3
  55. package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
  56. package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
  57. package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  58. package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
  59. package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  60. package/.next/standalone/apps/web/.next/static/chunks/01f1ms~jsc5vh.js +138 -0
  61. package/.next/standalone/apps/web/.next/static/chunks/0c7yx0ttmhb4s.js +63 -0
  62. package/.next/standalone/apps/web/.next/static/chunks/0ogqv_xj2r0c6.js +1 -0
  63. package/.next/standalone/apps/web/.next/static/chunks/0qp8t.3t~v6um.js +1 -0
  64. package/.next/standalone/apps/web/.next/static/chunks/130i667qy-j80.css +3 -0
  65. package/.next/standalone/apps/web/.next/static/chunks/15uwrard~z-l5.js +16 -0
  66. package/.next/standalone/apps/web/package.json +1 -1
  67. package/bin/diffhub.mjs +25 -1
  68. package/package.json +1 -1
  69. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0gf_xk6._.js +0 -13
  70. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0t.tl18._.js +0 -3
  71. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0jit913._.js +0 -3
  72. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0v19a7g._.js +0 -3
  73. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0f40lcw._.js +0 -3
  74. package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_0v8w2j~._.js +0 -70
  75. package/.next/standalone/apps/web/.next/static/chunks/00zp83w4g1v1r.js +0 -16
  76. package/.next/standalone/apps/web/.next/static/chunks/042ip11u2i2z6.js +0 -138
  77. package/.next/standalone/apps/web/.next/static/chunks/07ndp5x2cvqo..css +0 -3
  78. package/.next/standalone/apps/web/.next/static/chunks/085s9eg867ha-.js +0 -1
  79. package/.next/standalone/apps/web/.next/static/chunks/0_vmme_k_ff_u.js +0 -67
  80. package/.next/standalone/apps/web/.next/static/chunks/0ap~_hc7r17_6.js +0 -1
  81. package/.next/standalone/apps/web/.next/static/chunks/0nt5-rwas5thn.js +0 -67
  82. package/.next/standalone/apps/web/.next/static/chunks/0p~3-4_.v0cft.js +0 -1
  83. package/.next/standalone/apps/web/.next/static/chunks/0wx-2dr44ql-g.js +0 -1
  84. /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → C1Ggd_ITpnb7yBHrIOODV}/_buildManifest.js +0 -0
  85. /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → C1Ggd_ITpnb7yBHrIOODV}/_clientMiddlewareManifest.js +0 -0
  86. /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → C1Ggd_ITpnb7yBHrIOODV}/_ssgManifest.js +0 -0
@@ -1,16 +0,0 @@
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 u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="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,c=r[1];return s(function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})},[e,n,t]),l(function(){return u(o)&&c({inst:o}),e(function(){u(o)&&c({inst:o})})},[e]),a(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},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,u=r.useMemo,c=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=u(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,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,o]))[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),c(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 u=(0,s.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${u}`;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 u}});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},u=function(e){let t={...a,...e},n=(0,o.lazy)(()=>t.loader().then(s)),u=t.loading;function c(e){let s=u?(0,r.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,c=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)(c,{...a?{fallback:s}:{},children:d})}return c.displayName="LoadableComponent",c}},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,u,c,d,f,p,m,h,g=e.i(81099),v=e.i(13171),b=e.i(14499);function x(e,t){let n=b.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,...o},i)=>b.createElement(t,{ref:i,width:n,height:n,strokeWidth:r,color:e,...o}));return n.displayName=e,n}let y=x("CopySimpleIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("rect",{width:11,height:11,x:9,y:9,stroke:"currentColor",strokeWidth:2,rx:2}),b.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=x("CheckIcon",(0,b.forwardRef)((e,t)=>b.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},b.createElement("path",{d:"M20 6 9 17l-5-5"})))),k=x("ChevronDownIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9.5 6 6 6-6"})))),E=x("SunIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),S=x("MoonIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),C=x("SplitIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),R=x("ArrowRightIcon",(0,b.forwardRef)((e,t)=>b.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},b.createElement("path",{d:"M5 12h14M12 5l7 7-7 7"}))));var j=e.i(63178);function M(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}let T={};function O(e,t,n,r,o){let i={...L(e,T)};return t&&(i=P(i,t)),n&&(i=P(i,n)),r&&(i=P(i,r)),o&&(i=P(i,o)),i}function P(e,t){return N(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]=M(e.style,r);break;case"className":e[n]=I(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){A(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 N(e){return"function"==typeof e}function L(e,t){return N(e)?e(t):e??T}function A(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function I(e,t){return t?e?t+" "+e:t:e}e.i(24062);let z=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.`},D={};function _(e,t){let n=b.useRef(D);return n.current===D&&(n.current=e(t)),n}function $(e,t,n,r){var o,i,l,s,a;let u=_(V).current;return o=u,i=e,l=t,s=n,a=r,(o.refs[0]!==i||o.refs[1]!==l||o.refs[2]!==s||o.refs[3]!==a)&&B(u,[e,t,n,r]),u.callback}function V(){return{callback:null,cleanup:null,refs:[]}}function B(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 W=parseInt(b.version,10);function H(e){if(!b.isValidElement(e))return null;let t=e.props;return(W>=19?t?.ref:e.ref)??null}function F(){}let U=Object.freeze([]),q=Object.freeze({});function K(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=q,ref:u,props:c,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):q,g=f?M(h,Array.isArray(c)?function(e){if(0===e.length)return T;if(1===e.length)return L(e[0],T);let t={...L(e[0],T)};for(let n=1;n<e.length;n+=1)t=P(t,e[n]);return t}(c):c)??q:q;if("u">typeof document)if(f)if(Array.isArray(u)){let e;n=[g.ref,H(s),...u],r=e=_(V).current,o=n,(r.refs.length!==o.length||r.refs.some((e,t)=>e!==o[t]))&&B(e,n),g.ref=e.callback}else g.ref=$(g.ref,H(s),u);else $(null,null);return f?(void 0!==p&&(g.className=I(g.className,p)),void 0!==m&&(g.style=M(g.style,m)),g):q}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){if("function"==typeof t)return t(n,r);let e=O(n,t.props);e.ref=n.ref;let o=t;return o?.$$typeof===G&&(o=b.Children.toArray(t)[0]),b.cloneElement(o,e)}if(e&&"string"==typeof e){var o,i;return o=e,i=n,"button"===o?(0,b.createElement)("button",{type:"button",...i,key:i.key}):"img"===o?(0,b.createElement)("img",{alt:"",...i,key:i.key}):b.createElement(o,i)}throw Error(z(8))}(e,r,o,n.state??q)}let G=Symbol.for("react.lazy");function X(e){return K(e.defaultTagName??"div",e,e)}function Y(){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 Z=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,J=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return Y(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=Z(t)||Z(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 Y(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)},Q=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ee=[],et=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],o=n.nextPart.get(r);if(o){let n=et(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}},en=(e,t)=>{let n=Q();for(let r in e)er(e[r],n,r,t);return n},er=(e,t,n,r)=>{let o=e.length;for(let i=0;i<o;i++)eo(e[i],t,n,r)},eo=(e,t,n,r)=>{"string"==typeof e?ei(e,t,n):"function"==typeof e?el(e,t,n,r):es(e,t,n,r)},ei=(e,t,n)=>{(""===e?t:ea(t,e)).classGroupId=n},el=(e,t,n,r)=>{eu(e)?er(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e}))},es=(e,t,n,r)=>{let o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){let[i,l]=o[e];er(l,ea(t,i),n,r)}},ea=(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=Q(),n.nextPart.set(t,o)),n=o}return n},eu=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ec=[],ed=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ef=/\s+/,ep=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=ep(e[r]))&&(n&&(n+=" "),n+=t);return n},em=[],eh=e=>{let t=t=>t[e]||em;return t.isThemeGetter=!0,t},eg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eb=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ey=/\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$/,ew=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ek=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eS=e=>eb.test(e),eC=e=>!!e&&!Number.isNaN(Number(e)),eR=e=>!!e&&Number.isInteger(Number(e)),ej=e=>e.endsWith("%")&&eC(e.slice(0,-1)),eM=e=>ex.test(e),eT=()=>!0,eO=e=>ey.test(e)&&!ew.test(e),eP=()=>!1,eN=e=>ek.test(e),eL=e=>eE.test(e),eA=e=>!ez(e)&&!eF(e),eI=e=>eJ(e,e2,eP),ez=e=>eg.test(e),eD=e=>eJ(e,e5,eO),e_=e=>eJ(e,e3,eC),e$=e=>eJ(e,e7,eT),eV=e=>eJ(e,e4,eP),eB=e=>eJ(e,e0,eP),eW=e=>eJ(e,e1,eL),eH=e=>eJ(e,e6,eN),eF=e=>ev.test(e),eU=e=>eQ(e,e5),eq=e=>eQ(e,e4),eK=e=>eQ(e,e0),eG=e=>eQ(e,e2),eX=e=>eQ(e,e1),eY=e=>eQ(e,e6,!0),eZ=e=>eQ(e,e7,!0),eJ=(e,t,n)=>{let r=eg.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},eQ=(e,t,n=!1)=>{let r=ev.exec(e);return!!r&&(r[1]?t(r[1]):n)},e0=e=>"position"===e||"percentage"===e,e1=e=>"image"===e||"url"===e,e2=e=>"length"===e||"size"===e||"bg-size"===e,e5=e=>"length"===e,e3=e=>"number"===e,e4=e=>"family-name"===e,e7=e=>"number"===e||"weight"===e,e6=e=>"shadow"===e,e8=((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(ef),a="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:u,modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(u){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===c.length?"":1===c.length?c[0]:i(c).join(":"),v=d?g+"!":g,b=v+h;if(l.indexOf(b)>-1)continue;l.push(b);let x=o(h,m);for(let e=0;e<x.length;++e){let t=x[e];l.push(v+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i};return i=s=>{var a;let u;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,u=!1;return s.endsWith("!")?(a=s.slice(0,-1),u=!0):s.startsWith("!")&&(a=s.slice(1),u=!0),ed(n,u,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)):ed(ec,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r})(a),sortModifiers:(u=new Map,a.orderSensitiveModifiers.forEach((e,t)=>{u.set(e,1e6+t)}),e=>{let t=[],n=[];for(let r=0;r<e.length;r++){let o=e[r],i="["===o[0],l=u.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 en(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 et(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||ee}return n[e]||ee}}})(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=ep(t))&&(o&&(o+=" "),o+=n);return o})(...e))})(()=>{let e=eh("color"),t=eh("font"),n=eh("text"),r=eh("font-weight"),o=eh("tracking"),i=eh("leading"),l=eh("breakpoint"),s=eh("container"),a=eh("spacing"),u=eh("radius"),c=eh("shadow"),d=eh("inset-shadow"),f=eh("text-shadow"),p=eh("drop-shadow"),m=eh("blur"),h=eh("perspective"),g=eh("aspect"),v=eh("ease"),b=eh("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,ez],k=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[eF,ez,a],C=()=>[eS,"full","auto",...S()],R=()=>[eR,"none","subgrid",eF,ez],j=()=>["auto",{span:["full",eR,eF,ez]},eR,eF,ez],M=()=>[eR,"auto",eF,ez],T=()=>["auto","min","max","fr",eF,ez],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...S()],L=()=>[eS,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],A=()=>[eS,"screen","full","dvw","lvw","svw","min","max","fit",...S()],I=()=>[eS,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],z=()=>[e,eF,ez],D=()=>[...y(),eK,eB,{position:[eF,ez]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",eG,eI,{size:[eF,ez]}],V=()=>[ej,eU,eD],B=()=>["","none","full",u,eF,ez],W=()=>["",eC,eU,eD],H=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[eC,ej,eK,eB],q=()=>["","none",m,eF,ez],K=()=>["none",eC,eF,ez],G=()=>["none",eC,eF,ez],X=()=>[eC,eF,ez],Y=()=>[eS,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[eM],breakpoint:[eM],color:[eT],container:[eM],"drop-shadow":[eM],ease:["in","out","in-out"],font:[eA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[eM],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[eM],shadow:[eM],spacing:["px",eC],text:[eM],"text-shadow":[eM],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",eS,ez,eF,g]}],container:["container"],columns:[{columns:[eC,ez,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:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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:[eR,"auto",eF,ez]}],basis:[{basis:[eS,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[eC,eS,"auto","initial","none",ez]}],grow:[{grow:["",eC,eF,ez]}],shrink:[{shrink:["",eC,eF,ez]}],order:[{order:[eR,"first","last","none",eF,ez]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"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:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"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,eU,eD]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,eZ,e$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ej,ez]}],"font-family":[{font:[eq,eV,t]}],"font-features":[{"font-features":[ez]}],"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,ez]}],"line-clamp":[{"line-clamp":[eC,"none",eF,e_]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",eF,ez]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",eF,ez]}],"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:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[eC,"from-font","auto",eF,eD]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[eC,"auto",eF,ez]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",eF,ez]}],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,ez]}],"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"]},eR,eF,ez],radial:["",eF,ez],conic:[eR,eF,ez]},eX,eW]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"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:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[eC,eF,ez]}],"outline-w":[{outline:["",eC,eU,eD]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",c,eY,eH]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",d,eY,eH]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[eC,eD]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",f,eY,eH]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[eC,eF,ez]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[eC]}],"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,ez]}],"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":[eC]}],"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,ez]}],filter:[{filter:["","none",eF,ez]}],blur:[{blur:q()}],brightness:[{brightness:[eC,eF,ez]}],contrast:[{contrast:[eC,eF,ez]}],"drop-shadow":[{"drop-shadow":["","none",p,eY,eH]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",eC,eF,ez]}],"hue-rotate":[{"hue-rotate":[eC,eF,ez]}],invert:[{invert:["",eC,eF,ez]}],saturate:[{saturate:[eC,eF,ez]}],sepia:[{sepia:["",eC,eF,ez]}],"backdrop-filter":[{"backdrop-filter":["","none",eF,ez]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[eC,eF,ez]}],"backdrop-contrast":[{"backdrop-contrast":[eC,eF,ez]}],"backdrop-grayscale":[{"backdrop-grayscale":["",eC,eF,ez]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[eC,eF,ez]}],"backdrop-invert":[{"backdrop-invert":["",eC,eF,ez]}],"backdrop-opacity":[{"backdrop-opacity":[eC,eF,ez]}],"backdrop-saturate":[{"backdrop-saturate":[eC,eF,ez]}],"backdrop-sepia":[{"backdrop-sepia":["",eC,eF,ez]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",eF,ez]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[eC,"initial",eF,ez]}],ease:[{ease:["linear","initial",v,eF,ez]}],delay:[{delay:[eC,eF,ez]}],animate:[{animate:["none",b,eF,ez]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,eF,ez]}],"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:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[eF,ez,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"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,ez]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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,ez]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[eC,eU,eD,e_]}],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"]}}),e9=J("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"}}}),te=e=>{let t,n,r,o,i,l,s,a,u,c=(0,v.c)(16);if(c[0]!==e){let{className:a,variant:u,size:d,asChild:f,children:p,...m}=e;n=p,s=void 0===u?"default":u,r=void 0===d?"default":d,t=void 0!==f&&f,l=X,o="button",i=O({className:((...e)=>e8(Y(e)))(e9({className:a,size:r,variant:s}))},t?m:{...m,children:n}),c[0]=e,c[1]=t,c[2]=n,c[3]=r,c[4]=o,c[5]=i,c[6]=l,c[7]=s}else t=c[1],n=c[2],r=c[3],o=c[4],i=c[5],l=c[6],s=c[7];let d=t?n:void 0;return c[8]!==r||c[9]!==s?(a={size:r,slot:"button",variant:s},c[8]=r,c[9]=s,c[10]=a):a=c[10],c[11]!==o||c[12]!==i||c[13]!==d||c[14]!==a?(u={defaultTagName:o,props:i,render:d,state:a},c[11]=o,c[12]=i,c[13]=d,c[14]=a,c[15]=u):u=c[15],l(u)},tt=[{label:"All changes",value:"all"},{label:"Uncommitted changes",value:"uncommitted"}],tn=e=>{let t,n,r,o,i,l,s,a,u,c,d,f,p,m,h,x,M,T,O,P,N,L,A,I,z,D,_,$,V,B,W=(0,v.c)(81),{branch:H,baseBranch:F,insertions:U,deletions:q,fileCount:K,refreshing:G,lastUpdated:X,comments:Z,diffMode:J,onDiffModeChange:Q,ignoreWhitespace:ee,onIgnoreWhitespaceChange:et,layout:en,onLayoutChange:er}=e,[eo,ei]=(0,b.useState)(!1),[el,es]=(0,b.useState)(!1),ea=(0,b.useRef)(null),{resolvedTheme:eu,setTheme:ec}=(0,j.useTheme)(),ed=(0,b.useRef)(null);W[0]!==Z?(t=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")}`})(Z);await navigator.clipboard.writeText(e),ed.current&&clearTimeout(ed.current),ei(!0),ed.current=setTimeout(()=>ei(!1),2e3)}catch{}},W[0]=Z,W[1]=t):t=W[1];let ef=t;W[2]!==el?(n=()=>{if(!el)return;let e=e=>{ea.current&&!ea.current.contains(e.target)&&es(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},r=[el],W[2]=el,W[3]=n,W[4]=r):(n=W[3],r=W[4]),(0,b.useEffect)(n,r),W[5]!==H?(o=(0,g.jsx)("span",{className:"rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs font-medium text-foreground",children:H}),W[5]=H,W[6]=o):o=W[6],W[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,g.jsx)(R,{size:12,className:"text-muted-foreground/50 shrink-0"}),W[7]=i):i=W[7],W[8]!==F?(l=(0,g.jsx)("span",{className:"rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground",children:F}),W[8]=F,W[9]=l):l=W[9],W[10]!==o||W[11]!==l?(s=(0,g.jsxs)("div",{className:"flex items-center gap-1.5",children:[o,i,l]}),W[10]=o,W[11]=l,W[12]=s):s=W[12];let ep=1===K?"file":"files";W[13]!==K||W[14]!==ep?(a=(0,g.jsxs)("span",{className:"text-xs font-mono text-muted-foreground",children:[K," ",ep]}),W[13]=K,W[14]=ep,W[15]=a):a=W[15],W[16]!==U?(u=U>0&&(0,g.jsxs)("span",{className:"text-xs font-mono text-diff-green",children:["+",U]}),W[16]=U,W[17]=u):u=W[17],W[18]!==q?(c=q>0&&(0,g.jsxs)("span",{className:"text-xs font-mono text-destructive",children:["−",q]}),W[18]=q,W[19]=c):c=W[19],W[20]!==u||W[21]!==c||W[22]!==a?(d=(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[a,u,c]}),W[20]=u,W[21]=c,W[22]=a,W[23]=d):d=W[23],W[24]===Symbol.for("react.memo_cache_sentinel")?(f=(0,g.jsx)("div",{className:"flex-1"}),W[24]=f):f=W[24],W[25]!==X||W[26]!==G?(p=X&&(0,g.jsx)("span",{className:((...e)=>e8(Y(e)))("size-1.5 rounded-full bg-diff-green mx-1.5",G&&"animate-pulse")}),W[25]=X,W[26]=G,W[27]=p):p=W[27],W[28]===Symbol.for("react.memo_cache_sentinel")?(m=()=>es(tr),W[28]=m):m=W[28];let em="uncommitted"===J?"Uncommitted":"All changes",eh=el&&"rotate-180";W[29]!==eh?(h=((...e)=>e8(Y(e)))("transition-transform duration-150",eh),W[29]=eh,W[30]=h):h=W[30],W[31]!==h?(x=(0,g.jsx)(k,{size:10,className:h}),W[31]=h,W[32]=x):x=W[32],W[33]!==em||W[34]!==x?(M=(0,g.jsxs)(te,{variant:"ghost",size:"xs",onClick:m,className:"text-muted-foreground hover:text-foreground hover:bg-secondary gap-1",children:[em,x]}),W[33]=em,W[34]=x,W[35]=M):M=W[35],W[36]!==J||W[37]!==el||W[38]!==Q?(T=el&&(0,g.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:tt.map(e=>{let{value:t,label:n}=e;return(0,g.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:()=>{Q(t),es(!1)},children:[(0,g.jsx)("span",{className:((...e)=>e8(Y(e)))("text-foreground",J===t&&"font-medium"),children:n}),J===t&&(0,g.jsx)(w,{size:14,className:"text-diff-green shrink-0"})]},t)})}),W[36]=J,W[37]=el,W[38]=Q,W[39]=T):T=W[39],W[40]!==M||W[41]!==T?(O=(0,g.jsxs)("div",{className:"relative",ref:ea,children:[M,T]}),W[40]=M,W[41]=T,W[42]=O):O=W[42];let eg=ee?"secondary":"ghost";W[43]!==ee||W[44]!==et?(P=()=>et(!ee),W[43]=ee,W[44]=et,W[45]=P):P=W[45];let ev=ee?"Show whitespace changes":"Ignore whitespace changes";W[46]!==eg||W[47]!==P||W[48]!==ev?(N=(0,g.jsx)(te,{variant:eg,size:"xs",onClick:P,className:"text-muted-foreground hover:text-foreground",title:ev,children:"Ignore whitespace"}),W[46]=eg,W[47]=P,W[48]=ev,W[49]=N):N=W[49],W[50]!==Z.length||W[51]!==eo||W[52]!==ef?(L=Z.length>0&&(0,g.jsxs)(te,{variant:"ghost",size:"xs",onClick:ef,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"Copy all comments as AI prompt",children:[eo?(0,g.jsx)(w,{"data-icon":"inline-start"}):(0,g.jsx)(y,{"data-icon":"inline-start"}),eo?"Copied!":`Copy ${Z.length} comment${1===Z.length?"":"s"}`]}),W[50]=Z.length,W[51]=eo,W[52]=ef,W[53]=L):L=W[53],W[54]!==en||W[55]!==er?(A=()=>er("split"===en?"stacked":"split"),W[54]=en,W[55]=er,W[56]=A):A=W[56];let eb="split"===en?"Switch to unified view (S)":"Switch to split view (S)";W[57]===Symbol.for("react.memo_cache_sentinel")?(I=(0,g.jsx)(C,{size:14}),W[57]=I):I=W[57],W[58]!==A||W[59]!==eb?(z=(0,g.jsx)(te,{variant:"ghost",size:"icon-xs",onClick:A,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:eb,children:I}),W[58]=A,W[59]=eb,W[60]=z):z=W[60],W[61]!==eu||W[62]!==ec?(D=()=>ec("dark"===eu?"light":"dark"),W[61]=eu,W[62]=ec,W[63]=D):D=W[63];let ex="dark"===eu?"Switch to light mode":"Switch to dark mode";return W[64]!==eu?(_="dark"===eu?(0,g.jsx)(E,{size:14}):(0,g.jsx)(S,{size:14}),W[64]=eu,W[65]=_):_=W[65],W[66]!==D||W[67]!==ex||W[68]!==_?($=(0,g.jsx)(te,{variant:"ghost",size:"icon-xs",onClick:D,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:ex,children:_}),W[66]=D,W[67]=ex,W[68]=_,W[69]=$):$=W[69],W[70]!==p||W[71]!==O||W[72]!==N||W[73]!==L||W[74]!==z||W[75]!==$?(V=(0,g.jsxs)("div",{className:"flex items-center gap-0.5",children:[p,O,N,L,z,$]}),W[70]=p,W[71]=O,W[72]=N,W[73]=L,W[74]=z,W[75]=$,W[76]=V):V=W[76],W[77]!==d||W[78]!==V||W[79]!==s?(B=(0,g.jsxs)("header",{className:"flex items-center gap-2 border-b border-border bg-card px-4 py-2.5 text-sm",children:[s,d,f,V]}),W[77]=d,W[78]=V,W[79]=s,W[80]=B):B=W[80],B};function tr(e){return!e}let to=x("BubbleDotsIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"}),b.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"})))),ti=x("Folder1Icon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),tl=x("FolderOpenIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4.4408 19h13.5888a2 2 0 0 0 1.909-1.4035l1.6557-5.2982c.2012-.644-.2799-1.2983-.9545-1.2983H20M4.4408 19a1.441 1.441 0 0 0 1.3751-1.011l1.7455-5.5856A2 2 0 0 1 9.4704 11H20M4.4408 19C3.645 19 3 18.3549 3 17.5592V7c0-1.6569 1.3431-3 3-3h2.3945a3 3 0 0 1 2.4961 1.3359l.5157.7735A2 2 0 0 0 13.0704 7H18c1.1046 0 2 .8954 2 2v2"})))),ts=x("MagnifyingGlassIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),ta=e=>{let t,n,r,o,i=(0,v.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,g.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,g.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},tu=e=>{let t,n,r,o,i=(0,v.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,g.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,g.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},tc=e=>{let t,n,r,o,i=(0,v.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,g.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,g.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},td=x("CodeLinesIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h10m5 0h3M3 12h5m5 0h8M3 19h7m5 0h6"})))),tf=x("CodeBracketsIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 20 4-16m4 4 1.9775 1.7578c1.3425 1.1934 1.3425 3.2911 0 4.4845L18 16M6 16l-1.9775-1.7577c-1.3425-1.1934-1.3425-3.2911 0-4.4845L6 8"})))),tp=x("ArrowUndoDownIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6.4998 19-2.9394-2.9393c-.5857-.5858-.5857-1.5356 0-2.1214L6.4998 11m-2.5 4h12.5c2.4853 0 4.5-2.0147 4.5-4.5s-2.0147-4.5-4.5-4.5h-4.5"})))),tm=[{icon:tl,key:"finder",label:"Finder"},{icon:td,key:"zed",label:"Zed"},{icon:td,key:"vscode",label:"VS Code"},{icon:td,key:"xcode",label:"Xcode"},{icon:tf,key:"ghostty",label:"Ghostty"},{icon:tf,key:"terminal",label:"Terminal"}],th=({x:e,y:t,filePath:n,repoPath:r,onClose:o,onDiscard:i})=>{let l=(0,b.useRef)(null),[s,a]=(0,b.useState)(!1),[u,c]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&o()},t=e=>{"Escape"===e.key&&o()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[o]);let d=async e=>{let t=`${r}/${n}`;try{await fetch("/api/open",{body:JSON.stringify({app:e,path:t}),headers:{"Content-Type":"application/json"},method:"POST"})}catch{}o()},f=async()=>{if(i&&!u){c(!0);try{await i(),o()}finally{c(!1)}}},p=async()=>{let e=`${r}/${n}`;try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>{a(!1),o()},1200)}catch{o()}},m={left:Math.min(e,window.innerWidth-200),position:"fixed",top:Math.min(t,window.innerHeight-300),zIndex:1e3};return(0,g.jsxs)("div",{ref:l,style:m,className:"diffhub-menu-animate min-w-[160px] rounded-lg border border-border bg-popover shadow-xl dark:shadow-none py-1 text-sm",children:[(0,g.jsx)("div",{className:"px-3 py-1.5 text-xs text-muted-foreground border-b border-border mb-1 font-mono truncate max-w-[200px]",children:n.split("/").pop()}),tm.map(({key:e,label:t,icon:n})=>(0,g.jsxs)("button",{type:"button",onClick:()=>d(e),className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-foreground hover:bg-secondary transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",children:[(0,g.jsx)(n,{size:14,className:"text-muted-foreground"}),t]},e)),(0,g.jsxs)("div",{className:"border-t border-border mt-1 pt-1",children:[(0,g.jsxs)("button",{type:"button",onClick:p,className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-foreground hover:bg-secondary transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",children:[s?(0,g.jsx)(w,{size:14,className:"text-diff-green"}):(0,g.jsx)(y,{size:14,className:"text-muted-foreground"}),s?"Copied!":"Copy path"]}),i&&(0,g.jsxs)("button",{type:"button",onClick:f,disabled:u,className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-destructive hover:bg-destructive/10 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,g.jsx)(tp,{size:14,className:u?"animate-spin":""}),"Discard changes"]})]})]})};x("SidebarSimpleLeftSquareIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7c0-1.6569 1.3431-3 3-3h10c1.6569 0 3 1.3431 3 3v10c0 1.6569-1.3431 3-3 3H7c-1.6569 0-3-1.3431-3-3zM9 5v14"})))),e.s([],19485),e.i(19485);let tg=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tv=tg&&tg!==b.useLayoutEffect?tg:e=>e();function tb(e){let t=_(tx).current;return t.next=e,tv(t.effect),t.trampoline}function tx(){let e={next:void 0,callback:ty,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ty(){}let tw=((o={}).disabled="data-disabled",o.valid="data-valid",o.invalid="data-invalid",o.touched="data-touched",o.dirty="data-dirty",o.filled="data-filled",o.focused="data-focused",o),tk={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tE={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},tS={disabled:!1,...tE},tC={valid:e=>null===e?null:e?{[tw.valid]:""}:{[tw.invalid]:""}},tR=b.createContext({invalid:void 0,name:void 0,validityData:{state:tk,errors:[],error:"",value:"",initialValue:null},setValidityData:F,disabled:void 0,touched:tE.touched,setTouched:F,dirty:tE.dirty,setDirty:F,filled:tE.filled,setFilled:F,focused:tE.focused,setFocused:F,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:tS,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=q)=>e,getInputValidationProps:(e=q)=>e,inputRef:{current:null},commit:async()=>{}}});function tj(e=!0){let t=b.useContext(tR);if(t.setValidityData===F&&!e)throw Error(z(28));return t}let tM=b.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0}),tT=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:F,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function tO(){return b.useContext(tT)}let tP={...b},tN=0,tL=tP.useId;function tA(e,t){if(void 0!==tL){let n=tL();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){let[n,r]=b.useState(e),o=e||n;return b.useEffect(()=>{null==n&&(tN+=1,r(`${t}-${tN}`))},[n,t]),o}(e,t)}function tI(e){return tA(e,"base-ui")}let tz=b.createContext({controlId:void 0,registerControlId:F,labelId:void 0,setLabelId:F,messageIds:[],setMessageIds:F,getDescriptionProps:e=>e});function tD(){return b.useContext(tz)}let t_=function(e){let t=tI(),n=void 0===e.controlId?t:e.controlId,[r,o]=b.useState(n),[i,l]=b.useState(e.labelId),[s,a]=b.useState([]),u=_(()=>new Map),{messageIds:c}=tD(),d=tb((e,t)=>{let n=u.current;void 0===t?n.delete(e):(n.set(e,t),o(e=>{let t;if(0!==n.size){for(let r of n.values()){if(void 0!==e&&r===e)return e;void 0===t&&(t=r)}return t}}))}),f=b.useCallback(e=>O({"aria-describedby":c.concat(s).join(" ")||void 0},e),[c,s]),p=b.useMemo(()=>({controlId:r,registerControlId:d,labelId:i,setLabelId:l,messageIds:s,setMessageIds:a,getDescriptionProps:f}),[r,d,i,l,s,a,f]);return(0,g.jsx)(tz.Provider,{value:p,children:e.children})},t$=[];function tV(e){b.useEffect(e,t$)}class tB{static create(){return new tB}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 tW(){let e=_(tB.create).current;return tV(e.disposeEffect),e}function tH(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}let tF=Object.keys(tk),tU=b.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:o}=tO(),{render:i,className:l,validate:s,validationDebounceTime:a=0,validationMode:u=r,name:c,disabled:d=!1,invalid:f,dirty:p,touched:m,actionsRef:h,...v}=e,{disabled:x}=function(e=!1){let t=b.useContext(tM);if(!t&&!e)throw Error(z(86));return t}(),y=tb(s||(()=>null)),w=x||d,[k,E]=b.useState(!1),[S,C]=b.useState(!1),[R,j]=b.useState(!1),[M,T]=b.useState(!1),P=p??S,N=m??k,L=b.useRef(!1),A=tb(e=>{void 0===p&&(e&&(L.current=!0),C(e))}),I=tb(e=>{void 0===m&&E(e)}),D=tb(()=>"onChange"===u||"onSubmit"===u&&o.current),_=!!c&&Object.hasOwn(n,c)&&void 0!==n[c],$=!0===f||_,[V,B]=b.useState({state:tk,error:"",errors:[],value:null,initialValue:null}),W=!$&&V.state.valid,H=b.useMemo(()=>({disabled:w,touched:N,dirty:P,valid:W,filled:R,focused:M}),[w,N,P,W,R,M]),F=function(e){let{formRef:t,clearErrors:n}=tO(),{setValidityData:r,validate:o,validityData:i,validationDebounceTime:l,invalid:s,markedDirtyRef:a,state:u,name:c,shouldValidateOnChange:d}=e,{controlId:f,getDescriptionProps:p}=tD(),m=tW(),h=b.useRef(null),g=tb(async(e,n=!1)=>{let l,c=h.current;if(!c)return;if(n){if(!1!==u.valid)return;let n=c.validity;if(!n.valueMissing){let n={value:e,state:{...tk,valid:!0},error:"",errors:[],initialValue:i.initialValue};if(c.setCustomValidity(""),f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...tH(n,!1)})}r(n);return}let o=tF.reduce((e,t)=>(e[t]=n[t],e),{});if(!o.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of tF)"valid"!==n&&("valueMissing"===n&&(t=e[n]),e[n]&&(t=!1));return t}(o))return}m.clear();let p=null,g=[],v=function(e){let t=tF.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of tF)if("valid"!==e){if("valueMissing"===e&&t[e])n=!0;else if(t[e])return t}return n&&!a.current&&(t.valid=!0,t.valueMissing=!1),t}(c),b=d();if(c.validationMessage&&!b)l=c.validationMessage,g=[c.validationMessage];else{let n=o(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(p="object"==typeof n&&null!==n&&"then"in n?await n:n)?(v.valid=!1,v.customError=!0,Array.isArray(p)?(g=p,c.setCustomValidity(p.join("\n"))):p&&(g=[p],c.setCustomValidity(p))):b&&(c.setCustomValidity(""),v.customError=!1,c.validationMessage?(l=c.validationMessage,g=[c.validationMessage]):c.validity.valid&&!v.valid&&(v.valid=!0))}let x={value:e,state:v,error:l??(Array.isArray(p)?p[0]:p??""),errors:g,initialValue:i.initialValue};if(f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...tH(x,s)})}r(x)}),v=b.useCallback((e={})=>O(p,!1===u.valid?{"aria-invalid":!0}:q,e),[p,u.valid]),x=b.useCallback((e={})=>O({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(c),!d())return void g(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?g(t.value):(m.clear(),l?m.start(l,()=>{g(t.value)}):g(t.value))}},v(e)),[v,n,c,m,g,l,d]);return b.useMemo(()=>({getValidationProps:v,getInputValidationProps:x,inputRef:h,commit:g}),[v,x,g])}({setValidityData:B,validate:y,validityData:V,validationDebounceTime:a,invalid:$,markedDirtyRef:L,state:H,name:c,shouldValidateOnChange:D}),U=b.useCallback(()=>{L.current=!0,F.commit(V.value)},[F,V]);b.useImperativeHandle(h,()=>({validate:U}),[U]);let G=b.useMemo(()=>({invalid:$,name:c,validityData:V,setValidityData:B,disabled:w,touched:N,setTouched:I,dirty:P,setDirty:A,filled:R,setFilled:j,focused:M,setFocused:T,validate:y,validationMode:u,validationDebounceTime:a,shouldValidateOnChange:D,state:H,markedDirtyRef:L,validation:F}),[$,c,V,w,N,I,P,A,R,j,M,T,y,u,a,D,H,F]),X=K("div",e,{ref:t,state:H,props:v,stateAttributesMapping:tC});return(0,g.jsx)(tR.Provider,{value:G,children:X})}),tq=b.forwardRef(function(e,t){return(0,g.jsx)(t_,{children:(0,g.jsx)(tU,{...e,ref:t})})});function tK(){return"u">typeof window}function tG(e){return tZ(e)?(e.nodeName||"").toLowerCase():"#document"}function tX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tY(e){var t;return null==(t=(tZ(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function tZ(e){return!!tK()&&(e instanceof Node||e instanceof tX(e).Node)}function tJ(e){return!!tK()&&(e instanceof Element||e instanceof tX(e).Element)}function tQ(e){return!!tK()&&(e instanceof HTMLElement||e instanceof tX(e).HTMLElement)}function t0(e){return!(!tK()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof tX(e).ShadowRoot)}function t1(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=t9(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function t2(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let t5=/transform|translate|scale|rotate|perspective|filter/,t3=/paint|layout|strict|content/,t4=e=>!!e&&"none"!==e;function t7(e){let t=tJ(e)?t9(e):e;return t4(t.transform)||t4(t.translate)||t4(t.scale)||t4(t.rotate)||t4(t.perspective)||!t6()&&(t4(t.backdropFilter)||t4(t.filter))||t5.test(t.willChange||"")||t3.test(t.contain||"")}function t6(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function t8(e){return/^(html|body|#document)$/.test(tG(e))}function t9(e){return tX(e).getComputedStyle(e)}function ne(e){return tJ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if("html"===tG(e))return e;let t=e.assignedSlot||e.parentNode||t0(e)&&e.host||tY(e);return t0(t)?t.host:t}function nn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=nt(t);return t8(n)?t.ownerDocument?t.ownerDocument.body:t.body:tQ(n)&&t1(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=tX(o);if(!i)return t.concat(o,nn(o,[],n));{let e=nr(l);return t.concat(l,l.visualViewport||[],t1(o)?o:[],e&&n?nn(e):[])}}function nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function no(e){return e?.ownerDocument||document}let ni="u">typeof navigator,nl=function(){if(!ni)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),ns=function(){if(!ni)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),na=function(){if(!ni)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),nu="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),nc="MacIntel"===nl.platform&&nl.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(nl.platform);ni&&/firefox/i.test(na);let nd=ni&&/apple/i.test(navigator.vendor);ni&&/Edg/i.test(na);let nf=ni&&/android/i.test(ns)||/android/i.test(na),np=ni&&ns.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,nm=na.includes("jsdom/"),nh="data-base-ui-focusable",ng="active",nv="selected",nb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function nx(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ny(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&t0(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nw(e,t){if(!tJ(e))return!1;if(t.hasElement(e))return!e.hasAttribute("data-trigger-disabled");for(let[,n]of t.entries())if(ny(n,e))return!n.hasAttribute("data-trigger-disabled");return!1}function nk(e){return"composedPath"in e?e.composedPath()[0]:e.target}function nE(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function nS(e){return tQ(e)&&e.matches(nb)}function nC(e){return!!e&&"combobox"===e.getAttribute("role")&&nS(e)}function nR(e){return e?e.hasAttribute(nh)?e:e.querySelector(`[${nh}]`)||e:null}let nj="u">typeof document?b.useLayoutEffect:()=>{},nM=b.forwardRef(function(e,t){let{render:n,className:r,id:o,nativeLabel:i=!0,...l}=e,s=tj(!1),{labelId:a}=tD(),u=b.useRef(null),c=function(e={}){let t,{id:n,fallbackControlId:r,native:o=!1,setLabelId:i,focusControl:l}=e,{controlId:s,setLabelId:a}=tD(),u=tb(e=>{a(e),i?.(e)}),c=(nj(()=>(u(t),()=>{u(void 0)}),[t=tI(n),u]),t),d=s??r;function f(e){let t=nk(e.nativeEvent);t?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),o||function(e){if(l)return l(e,d);if(!d)return;let t=no(e.currentTarget).getElementById(d);tQ(t)&&t.focus({focusVisible:!0})}(e))}return o?{id:c,htmlFor:d??void 0,onMouseDown:f}:{id:c,onClick:f,onPointerDown(e){e.preventDefault()}}}({id:a??o,native:i});return K("label",e,{ref:[t,u],state:s.state,props:[c,l],stateAttributesMapping:tC})});var nT=e.i(72280);let nO=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 nO.request(e)}static cancel(e){return nO.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=nO.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(nO.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}function nN(){let e=_(nP.create).current;return tV(e.disposeEffect),e}function nL(e){return null==e?e:"current"in e?e.current:e}let nA=((i={}).startingStyle="data-starting-style",i.endingStyle="data-ending-style",i),nI={[nA.startingStyle]:""},nz={[nA.endingStyle]:""},nD={transitionStatus:e=>"starting"===e?nI:"ending"===e?nz:null};function n_(e,t=!1,n=!0){let r=nN();return tb((o,i=null)=>{function l(){nT.flushSync(o)}r.cancel();let s=nL(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=nA.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 n$(e){let{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=tb(o),l=n_(r,n,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return l(i,e.signal),()=>{e.abort()}},[t,n,i,l])}function nV(e,t=!1,n=!1){let[r,o]=b.useState(e&&t?"idle":void 0),[i,l]=b.useState(e);return e&&!i&&(l(!0),o("starting")),e||!i||"ending"===r||n||o("ending"),e||i||"ending"!==r||o(void 0),nj(()=>{if(!e&&i&&"ending"!==r&&n){let e=nP.request(()=>{o("ending")});return()=>{nP.cancel(e)}}},[e,i,r,n]),nj(()=>{if(!e||t)return;let n=nP.request(()=>{o(void 0)});return()=>{nP.cancel(n)}},[t,e]),nj(()=>{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]),b.useMemo(()=>({mounted:i,setMounted:l,transitionStatus:r}),[i,r])}let nB={...tC,...nD},nW=b.forwardRef(function(e,t){let{render:n,id:r,className:o,match:i,...l}=e,s=tI(r),{validityData:a,state:u,name:c}=tj(!1),{setMessageIds:d}=tD(),{errors:f}=tO(),p=c?f[c]:null,m=!1,{mounted:h,transitionStatus:v,setMounted:x}=nV(m=!!p||!0===i||(i?!!a.state[i]:!1===a.state.valid));nj(()=>{if(m&&s)return d(e=>e.concat(s)),()=>{d(e=>e.filter(e=>e!==s))}},[m,s,d]);let y=b.useRef(null),[w,k]=b.useState(null),[E,S]=b.useState(null),C=p||(a.errors.length>1?(0,g.jsx)("ul",{children:a.errors.map(e=>(0,g.jsx)("li",{children:e},e))}):a.error),R=a.error;null!=p?R=Array.isArray(p)?JSON.stringify(p):p:a.errors.length>1&&(R=JSON.stringify(a.errors)),m&&R!==E&&(S(R),k(C)),n$({open:m,ref:y,onComplete(){m||x(!1)}});let j=K("div",e,{ref:[t,y],state:{...u,transitionStatus:v},props:[{id:s,children:m?C:w},l],stateAttributesMapping:nB,enabled:h});return h?j:null}),nH=b.forwardRef(function(e,t){let{render:n,id:r,className:o,...i}=e,l=tI(r),s=tj(!1),{setMessageIds:a}=tD();return nj(()=>{if(l)return a(e=>e.concat(l)),()=>{a(e=>e.filter(e=>e!==l))}},[l,a]),K("p",e,{ref:t,state:s.state,props:[{id:l},i],stateAttributesMapping:tC})});function nF({controlled:e,default:t,name:n,state:r="value"}){let{current:o}=b.useRef(void 0!==e),[i,l]=b.useState(t),s=b.useCallback(e=>{o||l(e)},[]);return[o?e:i,s]}function nU(e,t,n,r){let o=!1,i=!1,l=r??q;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 nq=e.i(16162),nq=nq;let nK=b.forwardRef(function(e,t){let{render:n,className:r,id:o,name:i,value:l,disabled:s=!1,onValueChange:a,defaultValue:u,autoFocus:c=!1,...d}=e,{state:f,name:p,disabled:m,setTouched:h,setDirty:g,validityData:v,setFocused:x,setFilled:y,validationMode:w,validation:k}=tj(),E=m||s,S=p??i,C={...f,disabled:E},{labelId:R}=tD(),j=function(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=tD(),l=tI(t),s=n?o:void 0,a=_(()=>Symbol("labelable-control")),u=b.useRef(!1),c=b.useRef(null!=t),d=tb(()=>{u.current&&i!==F&&(u.current=!1,i(a.current,void 0))});return nj(()=>{let e;if(i!==F){if(n){let n=r?.current;e=tJ(n)&&null!=n.closest("label")?t??null:s??l}else if(null!=t)c.current=!0,e=t;else{if(!c.current)return void d();e=l}if(void 0===e)return void d();u.current=!0,i(a.current,e)}},[t,r,s,i,n,l,a,d]),b.useEffect(()=>d,[d]),o??l}({id:o});nj(()=>{let e=null!=l;k.inputRef.current?.value||e&&""!==l?y(!0):e&&""===l&&y(!1)},[k.inputRef,y,l]);let M=b.useRef(null);nj(()=>{c&&M.current===nx(no(M.current))&&x(!0)},[c,x]);let[T]=nF({controlled:l,default:u,name:"FieldControl",state:"value"}),O=void 0!==l,P=O?T:void 0;return!function(e){let{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:l}=e,{formRef:s}=tO(),{invalid:a,markedDirtyRef:u,validityData:c,setValidityData:d}=tj(),f=tb(e.getValue);nj(()=>{if(!t)return;let e=n;void 0===e&&(e=f()),null===c.initialValue&&null!==e&&d(t=>({...t,initialValue:e}))},[t,d,n,c.initialValue,f]),nj(()=>{t&&r&&s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:tH(c,a),validate(e=!0){let t=n;void 0===t&&(t=f()),u.current=!0,e?nT.flushSync(()=>l(t)):l(t)}})},[l,i,t,s,f,r,a,u,o,c,n]),nj(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}({id:j,name:S,commit:k.commit,value:P,getValue:()=>k.inputRef.current?.value,controlRef:k.inputRef}),K("input",e,{ref:[t,M],state:C,props:[{id:j,disabled:E,name:S,ref:k.inputRef,"aria-labelledby":R,autoFocus:c,...O?{value:P}:{defaultValue:u},onChange(e){let t=e.currentTarget.value;a?.(t,nU(nq.none,e.nativeEvent)),g(t!==v.initialValue),y(""!==t)},onFocus(){x(!0)},onBlur(e){h(!0),x(!1),"onBlur"===w&&k.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(h(!0),k.commit(e.currentTarget.value))}},k.getInputValidationProps(),d],stateAttributesMapping:tC})}),nG=b.createContext({disabled:!1}),nX=b.createContext(void 0),nY=b.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,...i}=e,{state:l,disabled:s}=tj(!1),a=s||o,u=function(e=!0){let t=b.useContext(nX);if(void 0===t&&!e)throw Error(z(3));return t}(),c=u?.parent.id,d=u?.allValues!==void 0,f=b.useMemo(()=>({disabled:a}),[a]),p=K("div",e,{ref:t,state:l,props:i,stateAttributesMapping:tC});return(0,g.jsx)(t_,{controlId:d?c:void 0,children:(0,g.jsx)(nG.Provider,{value:f,children:p})})});e.s(["Control",0,nK,"Description",0,nH,"Error",0,nW,"Item",0,nY,"Label",0,nM,"Root",0,tq,"Validity",0,function(e){let{children:t}=e,{validityData:n,invalid:r}=tj(!1),o=b.useMemo(()=>tH(n,r),[n,r]),{transitionStatus:i}=nV(!1===o.state.valid),l=b.useMemo(()=>({...o,validity:o.state,transitionStatus:i}),[o,i]);return(0,g.jsx)(b.Fragment,{children:t(l)})}],71975),e.i(71975),e.s([],75704),e.i(75704);let nZ=b.createContext(void 0);function nJ(e){let t=b.useContext(nZ);if(!1===e&&void 0===t)throw Error(z(27));return t}let nQ=((l={}).open="data-open",l.closed="data-closed",l[l.startingStyle=nA.startingStyle]="startingStyle",l[l.endingStyle=nA.endingStyle]="endingStyle",l.anchorHidden="data-anchor-hidden",l.side="data-side",l.align="data-align",l),n0=((s={}).popupOpen="data-popup-open",s.pressed="data-pressed",s),n1={[n0.popupOpen]:""};n0.popupOpen,n0.pressed;let n2={[nQ.open]:""},n5={[nQ.closed]:""},n3={[nQ.anchorHidden]:""},n4={open:e=>e?n1:null},n7={open:e=>e?n2:n5,anchorHidden:e=>e?n3:null},n6={...n7,...nD},n8=b.forwardRef(function(e,t){let{render:n,className:r,forceRender:o=!1,...i}=e,{store:l}=nJ(),s=l.useState("open"),a=l.useState("nested"),u=l.useState("mounted");return K("div",e,{state:{open:s,transitionStatus:l.useState("transitionStatus")},ref:[l.context.backdropRef,t],stateAttributesMapping:n6,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!a})}),n9=b.createContext(void 0);function re(e=!1){let t=b.useContext(n9);if(void 0===t&&!e)throw Error(z(16));return t}function rt(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:i}=e,l=b.useRef(null),s=re(!0),a=i??void 0!==s,{props:u}=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:b.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}),c=b.useCallback(()=>{let e=l.current;rn(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,a]);return nj(c,[c]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:l,onPointerDown:s,...c}=e;return O({type:o?"button":void 0,onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){var r;if(t||(A(e),l?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,s=e.currentTarget,u=rn(s),c=!o&&(r=s,!!(r?.tagName==="A"&&r?.href)),d=i&&(o?u:!c),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(),c||o&&u?(s.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler());return}d&&(!o&&(p||f)&&e.preventDefault(),!o&&f&&n?.(e))},onKeyUp(e){t||((A(e),i?.(e),e.target===e.currentTarget&&o&&a&&rn(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"},u,c)},[t,u,a,o]),buttonRef:tb(e=>{l.current=e,c()})}}function rn(e){return tQ(e)&&"BUTTON"===e.tagName}var nq=nq;let rr=b.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...l}=e,{store:s}=nJ(),a=s.useState("open"),{getButtonProps:u,buttonRef:c}=rt({disabled:o,native:i});return K("button",e,{state:{disabled:o},ref:[t,c],props:[{onClick:function(e){a&&s.setOpen(!1,nU(nq.closePress,e.nativeEvent))}},l,u]})}),ro=b.forwardRef(function(e,t){let{render:n,className:r,id:o,...i}=e,{store:l}=nJ(),s=tI(o);return l.useSyncedValueWithCleanup("descriptionElementId",s),K("p",e,{ref:t,props:[{id:s},i]})});var ri='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] *)',rl="u"<typeof Element,rs=rl?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ra=!rl&&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},ru=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]"):ru(e.parentNode))},rc=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},rd=function(e,t,n){if(ru(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ri));return t&&rs.call(e,ri)&&r.unshift(e),r=r.filter(n)},rf=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!ru(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),s=rf(l.length?l:i.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:i,candidates:s})}else{rs.call(i,ri)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var a=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!ru(a,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(a&&u){var c=rf(!0===a?i.children:a.children,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else o.unshift.apply(o,i.children)}}return r},rp=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},rm=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rc(e))&&!rp(e)?0:e.tabIndex},rh=function(e,t){var n=rm(e);return n<0&&t&&!rp(e)?0:n},rg=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},rv=function(e){return"INPUT"===e.tagName},rb=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},rx=function(e){if(!e.name)return!0;var t,n=e.form||ra(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=rb(t,e.form);return!o||o===e},ry=function(e){return rv(e)&&"radio"===e.type&&!rx(e)},rw=function(e){var t,n,r,o,i,l,s,a=e&&ra(e),u=null==(t=a)?void 0:t.host,c=!1;if(a&&a!==e)for(c=!!(null!=(n=u)&&null!=(r=n.ownerDocument)&&r.contains(u)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!c&&u;)c=!!(null!=(l=u=null==(i=a=ra(u))?void 0:i.host)&&null!=(s=l.ownerDocument)&&s.contains(u));return c},rk=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},rE=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=rs.call(e,"details>summary:first-of-type")?e.parentElement:e;if(rs.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return rk(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,s=ra(e);if(l&&!l.shadowRoot&&!0===r(l))return rk(e);e=e.assignedSlot?e.assignedSlot:l||s===e.ownerDocument?l:s.host}e=i}if(rw(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},rS=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!!rs.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},rC=function(e,t){return!(t.disabled||rv(t)&&"hidden"===t.type||rE(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||rS(t))},rR=function(e,t){return!(ry(t)||0>rm(t))&&!!rC(e,t)},rj=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},rM=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=rh(i,o),s=o?rM(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(rg).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},rT=function(e,t){return rM((t=t||{}).getShadowRoot?rf([e],t.includeContainer,{filter:rR.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:rj}):rd(e,t.includeContainer,rR.bind(null,t)))},rO=function(e,t){return(t=t||{}).getShadowRoot?rf([e],t.includeContainer,{filter:rC.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):rd(e,t.includeContainer,rC.bind(null,t))},rP=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==rs.call(e,ri)&&rR(t,e)};function rN(e){let t=_(rL,e).current;return t.next=e,nj(t.effect),t}function rL(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let 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=b.forwardRef(function(e,t){let[n,r]=b.useState();return nj(()=>{nd&&r("button")},[]),(0,g.jsx)("span",{...e,ref:t,style:rI,"aria-hidden":!n||void 0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});function rD(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function r_(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}function r$(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...r$(e,t.id,n)])}function rV(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 rB=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rW(e,t){let n=rT(e,rB()),r=n.length;if(0===r)return;let o=nx(no(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function rH(e){return rW(no(e).body,1)||e}function rF(e){return rW(no(e).body,-1)||e}function rU(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ny(n,r)}function rq(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 nq=nq;function rK(e){return`data-base-ui-${e}`}let rG=0;function rX(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(rG);let i=()=>e?.focus({preventScroll:n});o?i():rG=requestAnimationFrame(i)}let rY={inert:new WeakMap,"aria-hidden":new WeakMap},rZ="data-base-ui-inert",rJ={inert:new WeakSet,"aria-hidden":new WeakSet},rQ=new WeakMap,r0=0,r1=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?t0(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),r2=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},r5=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==tG(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function r3(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:i=[]}=t,l=no(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,u=r1(t,e),c=new Set(o?r1(t,i):[]),d=o?r5(t,r2(u),new Set(u)).filter(e=>!c.has(e)):[],f=[],p=[];if(l){let e=rY[l],n=rJ[l];a=n,s=e;let r=r1(t,Array.from(t.querySelectorAll("[aria-live]"))),o=u.concat(r);r5(t,r2(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=(rQ.get(e)||0)+1;rQ.set(e,t),p.push(e),1===t&&e.setAttribute(rZ,"")}),r0+=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=(rQ.get(e)||0)-1;rQ.set(e,t),t||e.removeAttribute(rZ)}),(r0-=1)||(rY.inert=new WeakMap,rY["aria-hidden"]=new WeakMap,rJ.inert=new WeakSet,rJ["aria-hidden"]=new WeakSet,rQ=new WeakMap)}}(e,l,n,r,{mark:o,markerIgnoreElements:i})}var nq=nq;let r4={style:{transition:"none"}},r7="data-base-ui-click-trigger",r6={fallbackAxisSide:"end"},r8={clipPath:"inset(50%)",position:"fixed",top:0,left:0},r9=b.createContext(null),oe=rK("portal");function ot(e={}){let{ref:t,container:n,componentProps:r=q,elementProps:o}=e,i=tA(),l=b.useContext(r9),s=l?.portalNode,[a,u]=b.useState(null),[c,d]=b.useState(null),f=tb(e=>{null!==e&&d(e)}),p=b.useRef(null);nj(()=>{if(null===n){p.current&&(p.current=null,d(null),u(null));return}if(null==i)return;let e=(n&&(tZ(n)?n:n.current))??s??document.body;if(null==e){p.current&&(p.current=null,d(null),u(null));return}p.current!==e&&(p.current=e,d(null),u(e))},[n,s,i]);let m=K("div",r,{ref:[t,f],props:[{id:i,[oe]:""},o]});return{portalNode:c,portalSubtree:a&&m?nT.createPortal(m,a):null}}let on=b.forwardRef(function(e,t){let{children:n,container:r,className:o,render:i,renderGuards:l,...s}=e,{portalNode:a,portalSubtree:u}=ot({container:r,ref:t,componentProps:e,elementProps:s}),c=b.useRef(null),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),[m,h]=b.useState(null),v=m?.modal,x=m?.open,y="boolean"==typeof l?l:!!m&&!m.modal&&m.open&&!!a;b.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&&rU(e)&&("focusin"===e.type?rq:function(e){rT(e,rB()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(a)}},[a,v]),b.useEffect(()=>{a&&!x&&rq(a)},[x,a]);let w=b.useMemo(()=>({beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:a,setFocusManagerState:h}),[a]);return(0,g.jsxs)(b.Fragment,{children:[u,(0,g.jsxs)(r9.Provider,{value:w,children:[y&&a&&(0,g.jsx)(rz,{"data-type":"outside",ref:c,onFocus:e=>{if(rU(e,a))f.current?.focus();else{let e=rF(m?m.domReference:null);e?.focus()}}}),y&&a&&(0,g.jsx)("span",{"aria-owns":a.id,style:r8}),a&&nT.createPortal(n,a),y&&a&&(0,g.jsx)(rz,{"data-type":"outside",ref:d,onFocus:e=>{if(rU(e,a))p.current?.focus();else{let t=rH(m?m.domReference:null);t?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,nU(nq.focusOut,e.nativeEvent))}}})]})]})}),or=b.createContext(null),oo=b.createContext(null),oi=()=>b.useContext(or)?.id||null,ol=e=>{let t=b.useContext(oo);return e??t},os=[];function oa(){os=os.filter(e=>e.deref()?.isConnected)}function ou(){return oa(),os[os.length-1]?.deref()}function oc(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;let n=rB(),r=rO(e,n).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return rP(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 od(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:u="",nextFocusableElement:c,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h="rootStore"in t?t.rootStore:t,v=h.useState("open"),x=h.useState("domReferenceElement"),y=h.useState("floatingElement"),{events:w,dataRef:k}=h.context,E=tb(()=>k.current.floatingContext?.nodeId),S=!1===o,C=nC(x)&&S,R=b.useRef(["content"]),j=rN(o),M=rN(i),T=rN(u),O=ol(p),P=b.useContext(r9),N=b.useRef(!1),L=b.useRef(!1),A=b.useRef(!1),I=b.useRef(-1),z=b.useRef(""),D=b.useRef(""),_=b.useRef(null),V=b.useRef(null),B=$(_,f,P?.beforeInsideRef),W=$(V,P?.afterInsideRef),H=tW(),F=tW(),U=nN(),q=null!=P,K=nR(y),G=tb((e=K)=>e?rT(e,rB()):[]),X=tb(()=>m?.().filter(e=>null!=e)??[]),Y=tb(e=>{let t=G(e);return R.current.map(()=>t).filter(Boolean).flat()});b.useEffect(()=>{if(r||!s)return;function e(e){"Tab"===e.key&&ny(K,nx(no(K)))&&0===G().length&&!C&&(e.preventDefault(),e.stopPropagation())}let t=no(K);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,x,K,s,R,C,G,Y]),b.useEffect(()=>{if(r||!v)return;let e=no(K);function t(){A.current=!1}function n(e){let t=nk(e),n=X();A.current=!(ny(y,t)||ny(x,t)||ny(P?.portalNode,t)||n.some(e=>e===t||ny(e,t))),D.current=e.pointerType||"keyboard",t?.closest(`[${r7}]`)&&(L.current=!0)}function o(){D.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,X]),b.useEffect(()=>{if(r||!a)return;let e=no(K);function t(){L.current=!0,F.start(0,()=>{L.current=!1})}function n(e){let t=nk(e),n=G().indexOf(t);-1!==n&&(I.current=n)}function o(t){let n=t.relatedTarget,r=t.currentTarget,o=nk(t);queueMicrotask(()=>{var i;let a=E(),u=h.context.triggerElements,f=X(),p=n?.hasAttribute(rK("focus-guard"))&&[_.current,V.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,nL(d),nL(c)].includes(n),m=!(ny(x,n)||ny(y,n)||ny(n,y)||ny(P?.portalNode,n)||f.some(e=>e===n||ny(e,n))||null!=n&&u.hasElement(n)||u.hasMatchingElement(e=>ny(e,n))||p||O&&(r$(O.nodesRef.current,a).find(e=>ny(e.context?.elements.floating,n)||ny(e.context?.elements.domReference,n))||rV(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,nR(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===x&&K&&oc(K,R),l&&r!==x&&!((i=o)&&i.isConnected&&("function"==typeof i.checkVisibility?i.checkVisibility():"none"!==t9(i).display))&&nx(e)===e.body){if(tQ(K)&&(K.focus(),"popup"===l))return void U.request(()=>{K.focus()});let e=I.current,t=G(),n=t[e]||t[t.length-1]||K;tQ(n)&&n.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(C||!s)&&n&&m&&!L.current&&(C||n!==ou())&&(N.current=!0,h.setOpen(!1,nU(nq.focusOut,t)))})}function i(){A.current||(k.current.insideReactTree=!0,H.start(0,()=>{k.current.insideReactTree=!1}))}let u=tQ(x)?x:null,f=[];if(y||u)return u&&(u.addEventListener("focusout",o),u.addEventListener("pointerdown",t),f.push(()=>{u.removeEventListener("focusout",o),u.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,h,a,l,G,C,E,R,k,H,F,U,c,d,X]),b.useEffect(()=>{if(r||!y||!v)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${rK("portal")}]`)||[]),t=O?rV(O.nodesRef.current,E()):[],n=t.find(e=>nC(e.context?.elements.domReference||null))?.context?.elements.domReference,o=r3([y,...e,_.current,V.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...X(),n,nL(d),nL(c),C?x:null].filter(e=>null!=e),{ariaHidden:s||C,mark:!1}),i=r3([y,...e].filter(e=>null!=e));return()=>{i(),o()}},[v,r,x,y,s,R,P,C,O,E,c,d,X]),nj(()=>{if(!v||r||!tQ(K))return;let e=nx(no(K));queueMicrotask(()=>{let t,n=Y(K),r=j.current,o="function"==typeof r?r(T.current||""):r;void 0===o||!1===o||(t=(t=!0===o||null===o?n[0]||K:nL(o))||n[0]||K,ny(K,e)||rX(t,{preventScroll:t===K}))})},[r,v,K,S,Y,j,T]),nj(()=>{var e;if(r||!K)return;let t=no(K);function n(e){var t,n,r,o;let i;if(e.open||(t=e.nativeEvent,n=D.current,i=tX(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===nq.triggerHover&&"mouseleave"===e.nativeEvent.type&&(N.current=!0),e.reason===nq.outsidePress)if(e.nested)N.current=!1;else if((""===(r=e.nativeEvent).pointerType&&r.isTrusted?0:nf&&r.pointerType?"click"!==r.type||1!==r.buttons:0!==r.detail||r.pointerType)&&(o=e.nativeEvent,nm?1:(nf||0!==o.width||0!==o.height)&&(!nf||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?N.current=!1:N.current=!0}else N.current=!1}return e=nx(t),oa(),e&&"body"!==tG(e)&&(os.push(new WeakRef(e)),os.length>20&&(os=os.slice(-20))),w.on("openchange",n),()=>{w.off("openchange",n);let e=nx(t),r=X(),o=ny(y,e)||r.some(t=>t===e||ny(t,e))||O&&r$(O.nodesRef.current,E(),!1).some(t=>ny(t.context?.elements.floating,e)),i=function(){let e=M.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||ou();return e&&e.isConnected?e:null}let n=x||ou();return nL(t)||n||null}();queueMicrotask(()=>{let n=function(e){if(!e)return null;let t=rB();return rP(e,t)?e:rT(e,t)[0]||e}(i),r="boolean"!=typeof M.current;M.current&&!N.current&&tQ(n)&&(r||n===e||e===t.body||o)&&n.focus({preventScroll:!0}),N.current=!1})}},[r,y,K,M,k,w,O,x,E,X]),nj(()=>{if(!nu||v||!y)return;let e=nx(no(y));tQ(e)&&nS(e)&&ny(y,e)&&e.blur()},[v,y]),nj(()=>{if(!r&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:a,open:v,onOpenChange:h.setOpen,domReference:x}),()=>{P.setFocusManagerState(null)}},[r,P,s,v,h,a,x]),nj(()=>{if(!r&&K)return oc(K,R),()=>{queueMicrotask(oa)}},[r,K,R]);let Z=!r&&(!s||!C)&&(q||s);return(0,g.jsxs)(b.Fragment,{children:[Z&&(0,g.jsx)(rz,{"data-type":"inside",ref:B,onFocus:e=>{if(s){let e=Y();rX(e[e.length-1])}else if(P?.portalNode)if(N.current=!1,rU(e,P.portalNode)){let e=rH(x);e?.focus()}else nL(d??P.beforeOutsideRef)?.focus()}}),n,Z&&(0,g.jsx)(rz,{"data-type":"inside",ref:W,onFocus:e=>{if(s)rX(Y()[0]);else if(P?.portalNode)if(a&&(N.current=!0),rU(e,P.portalNode)){let e=rF(x);e?.focus()}else nL(c??P.afterOutsideRef)?.focus()}})]})}let of=((a={}).nestedDialogs="--nested-dialogs",a),op=((u={})[u.open=nQ.open]="open",u[u.closed=nQ.closed]="closed",u[u.startingStyle=nQ.startingStyle]="startingStyle",u[u.endingStyle=nQ.endingStyle]="endingStyle",u.nested="data-nested",u.nestedDialogOpen="data-nested-dialog-open",u),om=b.createContext(void 0);function oh(){let e=b.useContext(om);if(void 0===e)throw Error(z(26));return e}let og="ArrowUp",ov="ArrowDown",ob="ArrowLeft",ox="ArrowRight";[...new Set([...new Set([ob,ox]),...new Set([og,ov])])];let oy=new Set([og,ov,ob,ox,"Home","End"]),ow={...n7,...nD,nestedDialogOpen:e=>e?{[op.nestedDialogOpen]:""}:null},ok=b.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:o,render:i,...l}=e,{store:s}=nJ(),a=s.useState("descriptionElementId"),u=s.useState("disablePointerDismissal"),c=s.useState("floatingRootContext"),d=s.useState("popupProps"),f=s.useState("modal"),p=s.useState("mounted"),m=s.useState("nested"),h=s.useState("nestedOpenDialogCount"),v=s.useState("open"),b=s.useState("openMethod"),x=s.useState("titleElementId"),y=s.useState("transitionStatus"),w=s.useState("role");oh(),n$({open:v,ref:s.context.popupRef,onComplete(){v&&s.context.onOpenChangeComplete?.(!0)}});let k=void 0===o?function(e){return"touch"!==e||s.context.popupRef.current}:o,E=K("div",e,{state:{open:v,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":x??void 0,"aria-describedby":a??void 0,role:w,tabIndex:-1,hidden:!p,onKeyDown(e){oy.has(e.key)&&e.stopPropagation()},style:{[of.nestedDialogs]:h}},l],ref:[t,s.context.popupRef,s.useStateSetter("popupElement")],stateAttributesMapping:ow});return(0,g.jsx)(od,{context:c,openInteractionType:b,disabled:!p,closeOnFocusOut:!u,initialFocus:k,returnFocus:r,modal:!1!==f,restoreFocus:"popup",children:E})});function oE(e){return W>=19?e:e?"true":void 0}let oS=b.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,g.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})}),oC=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:o}=nJ(),i=o.useState("mounted"),l=o.useState("modal"),s=o.useState("open");return i||n?(0,g.jsx)(om.Provider,{value:n,children:(0,g.jsxs)(on,{ref:t,...r,children:[i&&!0===l&&(0,g.jsx)(oS,{ref:o.context.internalBackdropRef,inert:oE(!s)}),e.children]})}):null});function oR(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}let oj={},oM={},oT="";class oO{lockCount=0;restore=null;timeoutLock=tB.create();timeoutUnlock=tB.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=no(e).documentElement,s=tX(l).getComputedStyle(l).overflowY;if("hidden"===s||"clip"===s){this.restore=F;return}let a=nc||!function(e){if("u"<typeof document)return!1;let t=no(e);return tX(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=a?(n=(t=no(e)).documentElement,r=t.body,i={overflowY:(o=t1(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=no(e),n=t.documentElement,r=t.body,o=tX(n),i=0,l=0,s=!1,a=nP.create();if(nu&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){let t=o.getComputedStyle(n),a=o.getComputedStyle(r),u=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,l=n.scrollLeft,oj={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},oT=n.style.scrollBehavior,oM={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 c=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),v=parseFloat(a.marginLeft)+parseFloat(a.marginRight),b=t1(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=no(e),n=t.documentElement,r=t.body,o=t1(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=u,b.style.overflowY="hidden",b.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:u,overflowY:"hidden",overflowX:"hidden"}),(c||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:v||m?`calc(100vw - ${v+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 c(){Object.assign(n.style,oj),Object.assign(r.style,oM),s||(n.scrollTop=i,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=oT)}function d(){c(),a.request(u)}return u(),o.addEventListener("resize",d),()=>{a.cancel(),c(),"function"==typeof o.removeEventListener&&o.removeEventListener("resize",d)}}(e)}}let oP=new oO;var nq=nq;let oN={intentional:"onClick",sloppy:"onPointerDown"};function oL(){return!1}function oA(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:u="sloppy",referencePress:c=oL,referencePressEvent:d="sloppy",bubbles:f,externalTree:p}=t,m=ol(p),h=tb("function"==typeof a?a:()=>!1),g="function"==typeof a?h:a,v=!1!==g,x=tb(()=>u),y=b.useRef(!1),w=b.useRef(!1),k=b.useRef(!1),{escapeKey:E,outsidePress:S}={escapeKey:"boolean"==typeof f?f:f?.escapeKey??!1,outsidePress:"boolean"==typeof f?f:f?.outsidePress??!0},C=b.useRef(null),R=tW(),j=tW(),M=tb(()=>{j.clear(),i.current.insideReactTree=!1}),T=b.useRef(!1),O=b.useRef(""),P=tb(c),N=tb(e=>{if(!r||!l||!s||"Escape"!==e.key||T.current)return;let t=i.current.floatingContext?.nodeId,o=m?r$(m.nodesRef.current,t):[];if(!E&&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,u=nU(nq.escapeKey,a);n.setOpen(!1,u),E||u.isPropagationAllowed||e.stopPropagation()}),L=tb(()=>{i.current.insideReactTree=!0,j.start(0,M)});b.useEffect(()=>{if(!r||!l)return;i.current.__escapeKeyBubbles=E,i.current.__outsidePressBubbles=S;let e=new tB,t=new tB;function a(){e.clear(),T.current=!0}function u(){e.start(5*!!t6(),()=>{T.current=!1})}function c(){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&&r$(m.nodesRef.current,t).some(t=>nE(e,t.context?.elements.floating));return nE(e,n.select("floatingElement"))||nE(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 M();let o=nk(e),l=`[${rK("inert")}]`,s=Array.from(no(n.select("floatingElement")).querySelectorAll(l)),a=tJ(o)?o.getRootNode():null;t0(a)&&(s=s.concat(Array.from(a.querySelectorAll(l))));let u=n.context.triggerElements;if(o&&(u.hasElement(o)||u.hasMatchingElement(e=>ny(e,o))))return;let c=tJ(o)?o:null;for(;c&&!t8(c);){let e=nt(c);if(t8(e)||!tJ(e))break;c=e}if(s.length&&tJ(o)&&!o.matches("html,body")&&!ny(o,n.select("floatingElement"))&&s.every(e=>!ny(c,e)))return;if(tQ(o)&&!("touches"in e)){let t=t8(o),n=t9(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,u="rtl"===n.direction,c=a&&(u?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(c||d)return}if(p(e))return;if("intentional"===f()&&k.current){t.clear(),k.current=!1;return}if("function"==typeof g&&!g(e))return;let d=i.current.floatingContext?.nodeId,h=m?r$(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,nU(nq.outsidePress,e)),M()}function b(e){O.current="touch";let t=nk(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!n.select("open")||!l||nE(e,n.select("floatingElement"))||nE(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},R.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,r)})}function j(e){if(R.clear(),"pointerdown"===e.type&&(O.current=e.pointerType),"mousedown"===e.type&&C.current&&!C.current.dismissOnMouseDown)return;let t=nk(e);t?.addEventListener(e.type,function r(){if("pointerdown"===e.type)"sloppy"!==f()||"touch"===e.pointerType||!n.select("open")||!l||nE(e,n.select("floatingElement"))||nE(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&&c();return}p(e)||(n?c():("function"!=typeof g||g(e))&&(t.clear(),k.current=!0,M()))}}function L(e){let t=nk(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!C.current||nE(e,n.select("floatingElement"))||nE(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),R.clear(),C.current=null)}(e),t?.removeEventListener(e.type,r)})}function A(e){let t=nk(e);t?.addEventListener(e.type,function r(){"sloppy"!==f()||!C.current||nE(e,n.select("floatingElement"))||nE(e,n.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&h(e),R.clear(),C.current=null),t?.removeEventListener(e.type,r)})}let I=no(o);return s&&(I.addEventListener("keydown",N),I.addEventListener("compositionstart",a),I.addEventListener("compositionend",u)),v&&(I.addEventListener("click",j,!0),I.addEventListener("pointerdown",j,!0),I.addEventListener("pointerup",P,!0),I.addEventListener("pointercancel",P,!0),I.addEventListener("mousedown",j,!0),I.addEventListener("mouseup",P,!0),I.addEventListener("touchstart",b,!0),I.addEventListener("touchmove",L,!0),I.addEventListener("touchend",A,!0)),()=>{s&&(I.removeEventListener("keydown",N),I.removeEventListener("compositionstart",a),I.removeEventListener("compositionend",u)),v&&(I.removeEventListener("click",j,!0),I.removeEventListener("pointerdown",j,!0),I.removeEventListener("pointerup",P,!0),I.removeEventListener("pointercancel",P,!0),I.removeEventListener("mousedown",j,!0),I.removeEventListener("mouseup",P,!0),I.removeEventListener("touchstart",b,!0),I.removeEventListener("touchmove",L,!0),I.removeEventListener("touchend",A,!0)),e.clear(),t.clear(),d(),k.current=!1}},[i,o,s,v,g,r,l,E,S,N,M,x,m,n,R]),b.useEffect(M,[g,M]);let A=b.useMemo(()=>({onKeyDown:N,[oN[d]]:e=>{P()&&n.setOpen(!1,nU(nq.triggerPress,e.nativeEvent))},..."intentional"!==d&&{onClick(e){P()&&n.setOpen(!1,nU(nq.triggerPress,e.nativeEvent))}}}),[N,n,d,P]),I=tb(e=>{if(!r||!l||0!==e.button)return;let t=nk(e.nativeEvent);ny(n.select("floatingElement"),t)&&(y.current||(y.current=!0,w.current=!1))}),z=tb(e=>{!r||!l||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(w.current=!0)}),D=b.useMemo(()=>({onKeyDown:N,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),I(e)},onPointerDownCapture(e){L(),I(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[N,L,I,z]);return b.useMemo(()=>l?{reference:A,floating:D,trigger:A}:{},[l,A,D])}function oI(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=b.useCallback(t=>oz(t,e,"reference"),t),l=b.useCallback(t=>oz(t,e,"floating"),n),s=b.useCallback(t=>oz(t,e,"item"),r),a=b.useCallback(t=>oz(t,e,"trigger"),o);return b.useMemo(()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:s,getTriggerProps:a}),[i,l,s,a])}function oz(e,t,n){let r=new Map,o="item"===n,i={};for(let t in"floating"===n&&(i.tabIndex=-1,i[nh]=""),e)o&&e&&(t===ng||t===nv)||(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)&&oD(i,s,o,r)}return oD(i,e,o,r),i}function oD(e,t,n,r){for(let o in t){let i=t[o];n&&(o===ng||o===nv)||(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 o_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var o$=Symbol("NOT_FOUND"),oV=e=>Array.isArray(e)?e:[e],oB=0,oW=class{revision=oB;_value;_lastValue;_isEqual=oH;constructor(e,t=oH){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++oB)}};function oH(e,t){return e===t}function oF(e){return e instanceof oW||console.warn("Not a valid cell! ",e),e.value}var oU=(e,t)=>!1;function oq(){return function(e=oH){return new oW(null,e)}(oU)}var oK=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=oq()),oF(t)};Symbol();var oG=0,oX=Object.getPrototypeOf({}),oY=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,oZ);tag=oq();tags={};children={};collectionTag=null;id=oG++},oZ={get:(e,t)=>(function(){let{value:n}=e,r=Reflect.get(n,t);if("symbol"==typeof t||t in oX)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 oJ(o):new oY(o)),n.tag&&oF(n.tag),n.proxy}{let n=e.tags[t];return void 0===n&&((n=e.tags[t]=oq()).value=r),oF(n),r}})(),ownKeys:e=>(oK(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},oJ=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],oQ);tag=oq();tags={};children={};collectionTag=null;id=oG++},oQ={get:([e],t)=>("length"===t&&oK(e),oZ.get(e,t)),ownKeys:([e])=>oZ.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>oZ.getOwnPropertyDescriptor(e,t),has:([e],t)=>oZ.has(e,t)},o0=(e,t)=>e===t,o1="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function o2(){return{s:0,v:void 0,o:null,p:null}}function o5(e,t={}){let n,r=o2(),{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=o2(),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=o2(),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 o1(t):t}return a.s=1,a.v=t,t}return l.clearCache=()=>{r=o2(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function o3(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:u=[],argsMemoize:c=o5,argsMemoizeOptions:d=[],devModeChecks:f={}}={...n,...l},p=oV(u),m=oV(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(c(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:c})};return Object.assign(r,{withTypes:()=>r}),r}var o4=o3(o5),o7=Object.assign((e,t=o4)=>{!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:()=>o7});o3({memoize:function(e,t){let n,{equalityCheck:r=o0,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:o$,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 o$}return{get:r,put:function(t,o){r(t)===o$&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,l);function u(){let t=a.get(arguments);if(t===o$){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 u.clearCache=()=>{a.clear(),u.resetResultsCount()},u.resultsCount=()=>s,u.resetResultsCount=()=>{s=0},u},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});let o6=(e,t,n,r,o,i,...l)=>{let s;if(l.length>0)throw Error(z(1));if(e&&t&&n&&r&&o&&i)s=(l,s,a,u)=>i(e(l,s,a,u),t(l,s,a,u),n(l,s,a,u),r(l,s,a,u),o(l,s,a,u),s,a,u);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 o8=e.i(2239),o9=e.i(30224);let ie=[];function it(e){let t=(t,r)=>{let o,i=_(ir).current;try{for(let e of(n=i,ie))e.before(i);for(let n of(o=e(t,r),ie))n.after(i);i.didInitialize=!0}finally{n=void 0}return o};return t.displayName=e.displayName||e.name,t}function ir(){return{didInitialize:!1}}let io=W>=19?function(e,t,r,o,i){let l,s=n;if(!s){let n;return n=b.useCallback(()=>t(e.getSnapshot(),r,o,i),[e,t,r,o,i]),(0,o8.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,o9.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};ie.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,o8.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class ii{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 io(this,e,t,n,r)}}class il extends ii{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e),nj(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;nj(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;nj(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=void 0!==t;nj(()=>{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 b.useDebugValue(e),io(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=tb(t??F);this.context[e]=n}useStateSetter(e){let t=b.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 is={open:o6(e=>e.open),domReferenceElement:o6(e=>e.domReferenceElement),referenceElement:o6(e=>e.positionReference??e.referenceElement),floatingElement:o6(e=>e.floatingElement),floatingId:o6(e=>e.floatingId)};class ia extends il{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},is)}setOpen=(e,t)=>{if((!e||!this.state.open||r_(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 iu(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=tA(),l=null!=oi(),s=t.useState("open"),a=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),c=t.context.triggerElements,d=_(()=>new ia({open:s,referenceElement:a,floatingElement:u,triggerElements:c,onOpenChange:o,floatingId:i,nested:l,noEmit:n})).current;return nj(()=>{let e={open:s,floatingId:i,referenceElement:a,floatingElement:u};tJ(a)&&(e.domReferenceElement=a),d.state.positionReference===d.state.referenceElement&&(e.positionReference=a),d.update(e)},[s,i,a,u,d]),d.context.onOpenChange=o,d.context.nested=l,d.context.noEmit=n,d}var nq=nq;function ic(e,t,n,r){let o,i,l=n.useState("isMountedByTrigger",e),s=(o=b.useRef(null),i=b.useRef(null),b.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=tb(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 nj(()=>{l&&n.update({activeTriggerElement:t.current,...r})},[l,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:l}}function id(e){let t=e.useState("open");nj(()=>{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 ip(e,t,n){let{mounted:r,setMounted:o,transitionStatus:i}=nV(e);t.useSyncedValues({mounted:r,transitionStatus:i});let l=tb(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return n$({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:i}}class im{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 ih(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new ia({open:!1,floatingElement:null,referenceElement:null,triggerElements:new im,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:q,inactiveTriggerProps:q,popupProps:q}}let ig=o6(e=>e.triggerIdProp??e.activeTriggerId),iv={open:o6(e=>e.openProp??e.open),mounted:o6(e=>e.mounted),transitionStatus:o6(e=>e.transitionStatus),floatingRootContext:o6(e=>e.floatingRootContext),preventUnmountingOnClose:o6(e=>e.preventUnmountingOnClose),payload:o6(e=>e.payload),activeTriggerId:ig,activeTriggerElement:o6(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:o6((e,t)=>void 0!==t&&ig(e)===t),isOpenedByTrigger:o6((e,t)=>void 0!==t&&ig(e)===t&&e.open),isMountedByTrigger:o6((e,t)=>void 0!==t&&ig(e)===t&&e.mounted),triggerProps:o6((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:o6(e=>e.popupProps),popupElement:o6(e=>e.popupElement),positionerElement:o6(e=>e.positionerElement)},ib={...iv,modal:o6(e=>e.modal),nested:o6(e=>e.nested),nestedOpenDialogCount:o6(e=>e.nestedOpenDialogCount),disablePointerDismissal:o6(e=>e.disablePointerDismissal),openMethod:o6(e=>e.openMethod),descriptionElementId:o6(e=>e.descriptionElementId),titleElementId:o6(e=>e.titleElementId),viewportElement:o6(e=>e.viewportElement),role:o6(e=>e.role)};class ix extends il{constructor(e){super(function(e={}){return{...ih(),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:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new im,onOpenChange:void 0,onOpenChangeComplete:void 0},ib)}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 iy=((c={})[c.open=nQ.open]="open",c[c.closed=nQ.closed]="closed",c[c.startingStyle=nQ.startingStyle]="startingStyle",c[c.endingStyle=nQ.endingStyle]="endingStyle",c.nested="data-nested",c.nestedDialogOpen="data-nested-dialog-open",c),iw={...n7,...nD,nested:e=>e?{[iy.nested]:""}:null,nestedDialogOpen:e=>e?{[iy.nestedDialogOpen]:""}:null},ik=b.forwardRef(function(e,t){let{className:n,render:r,children:o,...i}=e,l=oh(),{store:s}=nJ(),a=s.useState("open"),u=s.useState("nested"),c=s.useState("transitionStatus"),d=s.useState("nestedOpenDialogCount"),f=s.useState("mounted");return K("div",e,{enabled:l||f,state:{open:a,nested:u,transitionStatus:c,nestedDialogOpen:d>0},ref:[t,s.useStateSetter("viewportElement")],stateAttributesMapping:iw,props:[{role:"presentation",hidden:!f,style:{pointerEvents:a?void 0:"none"},children:o},i]})}),iE=b.forwardRef(function(e,t){let{render:n,className:r,id:o,...i}=e,{store:l}=nJ(),s=tI(o);return l.useSyncedValueWithCleanup("titleElementId",s),K("h2",e,{ref:t,props:[{id:s},i]})});var nq=nq;let iS=b.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,nativeButton:i=!0,id:l,payload:s,handle:a,...u}=e,c=nJ(!0),d=a?.store??c?.store;if(!d)throw Error(z(79));let f=tI(l),p=d.useState("floatingRootContext"),m=d.useState("isOpenedByTrigger",f),h=b.useRef(null),{registerTrigger:g,isMountedByThisTrigger:v}=ic(f,h,d,{payload:s}),{getButtonProps:x,buttonRef:y}=rt({disabled:o,native:i}),w=oI([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:u=0,reason:c=nq.triggerPress}=t,d=b.useRef(void 0),f=nN(),p=tW(),m=b.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||rD(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,v=n.select("domReferenceElement")!==e.currentTarget,b=m&&v||!(m&&l&&(!h||!a||"click"===g||"mousedown"===g));if(nS(o.target)){let e=nU(c,o,o.target);b&&"touch"===t&&u>0?p.start(u,()=>{n.setOpen(!0,e)}):n.setOpen(b,e);return}let x=e.currentTarget;f.request(()=>{let e=nU(c,o,x);b&&"touch"===t&&u>0?p.start(u,()=>{n.setOpen(!0,e)}):n.setOpen(b,e)})},onClick(e){if("mousedown-only"===i)return;let t=d.current;if("mousedown"===i&&t){d.current=void 0;return}if(rD(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||r_(f))),g=nU(c,e.nativeEvent,e.currentTarget);h&&"touch"===t&&u>0?p.start(u,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,i,s,n,a,l,f,p,u,c]);return b.useMemo(()=>o?{reference:m}:q,[o,m])}(p,{enabled:null!=p})]),k=d.useState("triggerProps",v);return K("button",e,{state:{disabled:o,open:m},ref:[y,t,g,h],props:[w.getReferenceProps(),k,{[r7]:"",id:f},u,x],stateAttributesMapping:n4})});var nq=nq;class iC{constructor(e){this.store=e??new ix}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,nU(nq.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,nU(nq.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,nU(nq.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Backdrop",0,n8,"Close",0,rr,"Description",0,ro,"Handle",0,iC,"Popup",0,ok,"Portal",0,oC,"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:u,triggerId:c,defaultTriggerId:d=null}=e,f=nJ(!0),p=!!f,m=_(()=>u?.store??new ix({open:r,openProp:n,activeTriggerId:d,triggerIdProp:c,modal:s,disablePointerDismissal:l,nested:p})).current;oR(()=>{void 0===n&&!1===m.state.open&&!0===r&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp("openProp",n),m.useControlledProp("triggerIdProp",c),m.useSyncedValues({disablePointerDismissal:l,nested:p,modal:s}),m.useContextCallback("onOpenChange",o),m.useContextCallback("onOpenChangeComplete",i);let h=m.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:u}=function(e){let t,n,r,o,[i,l]=b.useState(null),s=tb((t,n)=>{e||l(n||(nc?"touch":""))});t=b.useRef(e),nj(()=>{t.current!==e&&n(t.current)},[e,n=tb(t=>{t&&!e&&l(null)})]),nj(()=>{t.current=e},[e]);let{onClick:a,onPointerDown:u}=(r=b.useRef(""),o=b.useCallback(e=>{e.defaultPrevented||(r.current=e.pointerType,s(e,e.pointerType))},[s]),{onClick:b.useCallback(e=>{0===e.detail?s(e,"keyboard"):(s(e,"pointerType"in e?e.pointerType:r.current),r.current="")},[s]),onPointerDown:o});return b.useMemo(()=>({openMethod:i,triggerProps:{onClick:a,onPointerDown:u}}),[i,a,u])}(o);id(t);let{forceUnmount:c}=ip(o,t),d=tb(e=>{let n=nU(e);return n.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},n}),f=b.useCallback(()=>{t.setOpen(!1,d(nq.imperativeAction))},[t,d]);b.useImperativeHandle(r,()=>({unmount:c,close:f}),[c,f]);let p=iu({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=b.useState(0),g=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=tA(),u=i?.id||a,c=b.useMemo(()=>nR(l)?.id||o,[l,o]),d=o_.get(s)??s,f=null!=oi(),p=b.useMemo(()=>"tooltip"===d||"label"===s?q:{"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=b.useMemo(()=>"tooltip"===d||"label"===s?{[`aria-${"label"===s?"labelledby":"describedby"}`]:r?c:void 0}:{...p,"aria-expanded":r?"true":"false","aria-controls":r?c:void 0,..."menu"===d&&{id:u}},[d,c,r,u,s,p]),h=b.useMemo(()=>{let e={id:c,...d&&{role:d}};return"tooltip"===d||"label"===s?e:{...e,..."menu"===d&&{"aria-labelledby":u}}},[d,c,u,s]),g=b.useCallback(({active:e,selected:t})=>{let n={role:"option",...e&&{id:`${c}-fui-option`}};switch(s){case"select":case"combobox":return{...n,"aria-selected":t}}return{}},[c,s]);return b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}(p),x=oA(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=nk(e);return!!g&&!i&&(!l||!t.context.internalBackdropRef.current&&!t.context.backdropRef.current||t.context.internalBackdropRef.current===n||t.context.backdropRef.current===n||ny(n,s)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:g});!function(e=!0,t=null){nj(()=>{if(e)return oP.acquire(t)},[e,t])}(o&&!0===l,s);let{getReferenceProps:y,getFloatingProps:w,getTriggerProps:k}=oI([v,x]);t.useContextCallback("onNestedDialogOpen",e=>{h(e+1)}),t.useContextCallback("onNestedDialogClose",()=>{h(0)}),b.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,m]);let E=b.useMemo(()=>y(u),[y,u]),S=b.useMemo(()=>k(u),[k,u]),C=b.useMemo(()=>w(),[w]);t.useSyncedValues({openMethod:a,activeTriggerProps:E,inactiveTriggerProps:S,popupProps:C,floatingRootContext:p,nestedOpenDialogCount:m})}({store:m,actionsRef:a,parentContext:f?.store.context,onOpenChange:o,triggerIdProp:c});let v=b.useMemo(()=>({store:m}),[m]);return(0,g.jsx)(nZ.Provider,{value:v,children:"function"==typeof t?t({payload:h}):t})},"Title",0,iE,"Trigger",0,iS,"Viewport",0,ik,"createHandle",0,function(){return new iC}],87913);var iR=e.i(87913),iR=iR;let ij=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),iM=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 iT={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 iO=(0,b.createContext)({}),iP=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...s},a)=>{let{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:p=""}=(0,b.useContext)(iO)??{},m=r??d?24*Number(n??c)/Number(t??u):n??c;return(0,b.createElement)("svg",{ref:a,...iT,width:t??u??iT.width,height:t??u??iT.height,stroke:e??f,strokeWidth:m,className:ij("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,b.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),iN=(d=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(r=(0,b.forwardRef)(({className:e,...t},n)=>(0,b.createElement)(iP,{ref:n,iconNode:d,className:ij(`lucide-${iM("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=iM("x"),r),iL=e=>{let t,n,r=(0,v.c)(4);return r[0]!==e?({...t}=e,r[0]=e,r[1]=t):t=r[1],r[2]!==t?(n=(0,g.jsx)(iR.Root,{"data-slot":"sheet",...t}),r[2]=t,r[3]=n):n=r[3],n},iA=e=>{let t,n,r=(0,v.c)(4);return r[0]!==e?({...t}=e,r[0]=e,r[1]=t):t=r[1],r[2]!==t?(n=(0,g.jsx)(iR.Portal,{"data-slot":"sheet-portal",...t}),r[2]=t,r[3]=n):n=r[3],n},iI=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)(iR.Backdrop,{"data-slot":"sheet-overlay",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},iz=e=>{let t,n,r,o,i,l,s,a,u,c=(0,v.c)(17);c[0]!==e?({className:n,children:t,side:o,showCloseButton:i,...r}=e,c[0]=e,c[1]=t,c[2]=n,c[3]=r,c[4]=o,c[5]=i):(t=c[1],n=c[2],r=c[3],o=c[4],i=c[5]);let d=void 0===o?"right":o,f=void 0===i||i;return c[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,g.jsx)(iI,{}),c[6]=l):l=c[6],c[7]!==n?(s=((...e)=>e8(Y(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),c[7]=n,c[8]=s):s=c[8],c[9]!==f?(a=f&&(0,g.jsxs)(iR.Close,{"data-slot":"sheet-close",render:(0,g.jsx)(te,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,g.jsx)(iN,{}),(0,g.jsx)("span",{className:"sr-only",children:"Close"})]}),c[9]=f,c[10]=a):a=c[10],c[11]!==t||c[12]!==r||c[13]!==d||c[14]!==s||c[15]!==a?(u=(0,g.jsxs)(iA,{children:[l,(0,g.jsxs)(iR.Popup,{"data-slot":"sheet-content","data-side":d,className:s,...r,children:[t,a]})]}),c[11]=t,c[12]=r,c[13]=d,c[14]=s,c[15]=a,c[16]=u):u=c[16],u},iD=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("div",{"data-slot":"sheet-header",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},i_=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)(iR.Title,{"data-slot":"sheet-title",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},i$=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(e)))("text-sm text-muted-foreground",t),i[3]=t,i[4]=r):r=i[4],i[5]!==n||i[6]!==r?(o=(0,g.jsx)(iR.Description,{"data-slot":"sheet-description",className:r,...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o};e.s([],13136),e.i(13136);let iV=b.createContext(void 0);function iB(e){let t=b.useContext(iV);if(void 0===t&&!e)throw Error(z(72));return t}function iW(e){return null!=e&&null!=e.clientX}var nq=nq;let iH={...iv,disabled:o6(e=>e.disabled),instantType:o6(e=>e.instantType),isInstantPhase:o6(e=>e.isInstantPhase),trackCursorAxis:o6(e=>e.trackCursorAxis),disableHoverablePopup:o6(e=>e.disableHoverablePopup),lastOpenChangeReason:o6(e=>e.openChangeReason),closeOnClick:o6(e=>e.closeOnClick),closeDelay:o6(e=>e.closeDelay),hasViewport:o6(e=>e.hasViewport)};class iF extends il{constructor(e){super({...ih(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new im},iH)}setOpen=(e,t)=>{let n=t.reason,r=n===nq.triggerHover,o=e&&n===nq.triggerFocus,i=!e&&(n===nq.triggerPress||n===nq.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===nq.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?nT.flushSync(l):l()};static useStore(e,t){let n=_(()=>new iF(t)).current,r=e??n,o=iu({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=o,r}}var nq=nq;let iU=it(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:o=!1,trackCursorAxis:i="none",actionsRef:l,onOpenChange:s,onOpenChangeComplete:a,handle:u,triggerId:c,defaultTriggerId:d=null,children:f}=e,p=iF.useStore(u?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:c});oR(()=>{void 0===r&&!1===p.state.open&&!0===n&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",c),p.useContextCallback("onOpenChange",s),p.useContextCallback("onOpenChangeComplete",a);let m=p.useState("open"),h=!t&&m,v=p.useState("activeTriggerId"),x=p.useState("payload");p.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:o}),nj(()=>{m&&t&&p.setOpen(!1,nU(nq.disabled))},[m,t,p]),p.useSyncedValue("disabled",t),id(p);let{forceUnmount:y,transitionStatus:w}=ip(h,p),k=p.useState("isInstantPhase"),E=p.useState("instantType"),S=p.useState("lastOpenChangeReason"),C=b.useRef(null);nj(()=>{"ending"===w&&S===nq.none||"ending"!==w&&k?("delay"!==E&&(C.current=E),p.set("instantType","delay")):null!==C.current&&(p.set("instantType",C.current),C.current=null)},[w,k,S,E,p]),nj(()=>{h&&null==v&&p.set("payload",void 0)},[p,v,h]);let R=b.useCallback(()=>{var e;let t;p.setOpen(!1,(e=p,(t=nU(nq.imperativeAction)).preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},t))},[p]);b.useImperativeHandle(l,()=>({unmount:y,close:R}),[y,R]);let j=p.useState("floatingRootContext"),{getReferenceProps:M,getFloatingProps:T,getTriggerProps:O}=oI([oA(j,{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,u=b.useRef(!1),c=b.useRef(null),[d,f]=b.useState(),[p,m]=b.useState([]),h=tb((e,t,r)=>{if(!u.current&&(!l.current.openEvent||iW(l.current.openEvent))){var o,s;let u,c,f;n.set("positionReference",(o=r??i,s={x:e,y:t,axis:a,dataRef:l,pointerType:d},u=null,c=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==u&&s.x&&t&&(u=e.x-s.x),null==c&&s.y&&n&&(c=e.y-s.y),a-=u||0,d-=c||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}}}))}}),g=tb(e=>{r?c.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),v=rD(d)?o:r,x=b.useCallback(()=>{if(!v||!s)return;let e=tX(o);function t(n){ny(o,nk(n))?(e.removeEventListener("mousemove",t),c.current=null):h(n.clientX,n.clientY)}if(!l.current.openEvent||iW(l.current.openEvent)){e.addEventListener("mousemove",t);let n=()=>{e.removeEventListener("mousemove",t),c.current=null};return c.current=n,n}n.set("positionReference",i)},[v,s,o,l,i,n,h]);b.useEffect(()=>x(),[x,p]),b.useEffect(()=>{s&&!o&&(u.current=!1)},[s,o]),b.useEffect(()=>{!s&&r&&(u.current=!0)},[s,r]);let y=b.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return b.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}(j,{enabled:!t&&"none"!==i,axis:"none"===i?void 0:i})]),P=b.useMemo(()=>M(),[M]),N=b.useMemo(()=>O(),[O]),L=b.useMemo(()=>T(),[T]);return p.useSyncedValues({activeTriggerProps:P,inactiveTriggerProps:N,popupProps:L}),(0,g.jsx)(iV.Provider,{value:p,children:"function"==typeof f?f({payload:x}):f})}),iq=b.createContext(void 0),iK=.1*.1;function iG(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function iX(e,t,n,r,o,i,l,s,a,u){let c=!1;return iG(e,t,n,r,o,i)&&(c=!c),iG(e,t,o,i,l,s)&&(c=!c),iG(e,t,l,s,a,u)&&(c=!c),iG(e,t,a,u,n,r)&&(c=!c),c}function iY(e,t,n,r,o,i){let l=Math.min(n,o),s=Math.max(n,o),a=Math.min(r,i),u=Math.max(r,i);return e>=l&&e<=s&&t>=a&&t<=u}function iZ(e,t,n){let r=null==n||rD(n)?"function"==typeof e?e():e:0;return"number"==typeof r?r:r?.[t]}function iJ(e){return"function"==typeof e?e():e}function iQ(e,t){return t||"click"===e||"mousedown"===e}var nq=nq;let i0=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new tB,currentIdRef:{current:null},currentContextRef:{current:null}});function i1(e){let{children:t,delay:n,timeoutMs:r=0}=e,o=b.useRef(n),i=b.useRef(n),l=b.useRef(null),s=b.useRef(null),a=tW();return(0,g.jsx)(i0.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:i,currentIdRef:l,timeoutMs:r,currentContextRef:s,timeout:a}),[r,a]),children:t})}var nq=nq;let i2=np&&nd;var nq=nq;let i5=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${nb}`;class i3{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 tB,this.restTimeout=new tB,this.handleCloseOptions=void 0}static create(){return new i3}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function i4(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 i7(e){let t=_(i3.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),tV(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}let i6={current:null},i8=((f={})[f.popupOpen=n0.popupOpen]="popupOpen",f.triggerDisabled="data-trigger-disabled",f),i9=(p=function(e,t){let{className:n,render:r,handle:o,payload:i,disabled:l,delay:s,closeOnClick:a=!0,closeDelay:u,id:c,...d}=e,f=iB(!0),p=o?.store??f;if(!p)throw Error(z(82));let m=tI(c),h=p.useState("isTriggerActive",m),g=p.useState("isOpenedByTrigger",m),v=p.useState("floatingRootContext"),x=b.useRef(null),y=s??600,w=u??0,{registerTrigger:k,isMountedByThisTrigger:E}=ic(m,x,p,{payload:i,closeOnClick:a,closeDelay:w}),S=b.useContext(iq),{delayRef:C,isInstantPhase:R,hasProvider:j}=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:u,hasProvider:c,timeout:d}=b.useContext(i0),[f,p]=b.useState(!1);return nj(()=>{function e(){p(!1),u.current?.setIsInstantPhase(!1),i.current=null,u.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,u,d,n]),nj(()=>{if(!o)return;let e=u.current,t=i.current;d.clear(),u.current={onOpenChange:n.setOpen,setIsInstantPhase:p},i.current=r,l.current={open:0,close:iZ(a.current,"close")},null!==t&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,nU(nq.none))):(p(!1),e?.setIsInstantPhase(!1))},[o,r,n,i,l,s,a,u,d]),nj(()=>()=>{u.current=null},[u]),b.useMemo(()=>({hasProvider:c,delayRef:l,isInstantPhase:f}),[c,l,f])}(v,{open:g});p.useSyncedValue("isInstantPhase",R);let M=p.useState("disabled"),T=l??M,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:u=0,move:c=!0,triggerElementRef:d=i6,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=ol(f),g=i7(n),v=rN(s),x=rN(l),y=rN(u),w=rN(i);p&&(g.handleCloseOptions=v.current?.__options);let k=tb(()=>iQ(r.current.openEvent?.type,g.interactedInside)),E=tb(e=>nw(e,n.context.triggerElements)),S=tb((e,t,r)=>{let o=n.context.triggerElements;return o.hasElement(t)?!e||!ny(e,t):!!tJ(r)&&o.hasMatchingElement(e=>ny(e,r))&&(!e||!ny(e,r))}),C=b.useCallback((e,t=!0)=>{let r=iZ(x.current,"close",g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,nU(nq.triggerHover,e)),h?.events.emit("floating.closed",e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,nU(nq.triggerHover,e)),h?.events.emit("floating.closed",e))},[x,n,g,h]),R=tb(()=>{g.handler&&(no(n.select("domReferenceElement")).removeEventListener("mousemove",g.handler),g.handler=void 0)});b.useEffect(()=>R,[R]);let j=tb(()=>{i4(g)});return b.useEffect(()=>{if(i)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(R(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}},[i,o,g,R]),b.useEffect(()=>{if(!i)return;let e=d.current??(p?n.select("domReferenceElement"):null);if(tJ(e))return c&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",o),()=>{c&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",o)};function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,a&&!rD(g.pointerType)||iJ(y.current)>0&&!iZ(x.current,"open"))return;let t=iZ(x.current,"open",g.pointerType),r=e.currentTarget??null,o=n.select("domReferenceElement"),i=null!=r&&S(o,r,e.target),l=n.select("open"),s=!l||i;i&&l?n.setOpen(!0,nU(nq.triggerHover,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,nU(nq.triggerHover,e,r))}):s&&n.setOpen(!0,nU(nq.triggerHover,e,r))}function o(e){if(k())return void j();R();let t=no(n.select("domReferenceElement"));g.restTimeout.clear(),g.restTimeoutPending=!1;let o=r.current.floatingContext??m?.();if(!E(e.relatedTarget)){if(v.current&&o){n.select("open")||g.openChangeTimeout.clear();let r=d.current;g.handler=v.current({...o,tree:h,x:e.clientX,y:e.clientY,onClose(){j(),R(),w.current&&!k()&&r===n.select("domReferenceElement")&&C(e,!0)}}),t.addEventListener("mousemove",g.handler),g.handler(e);return}"touch"===g.pointerType&&ny(n.select("floatingElement"),e.relatedTarget)||C(e)}}},[R,j,r,x,C,n,i,v,g,p,S,k,E,a,c,y,d,h,w,m]),b.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=S(o,r,e.target);if(a&&!rD(g.pointerType))return;let s=iJ(y.current);function u(){if(g.restTimeoutPending=!1,k())return;let e=n.select("open");g.blockMouseMove||e&&!l||n.setOpen(!0,nU(nq.triggerHover,t,r))}(!i||l)&&0!==s&&(!l&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(g.restTimeout.clear(),"touch"===g.pointerType?nT.flushSync(()=>{u()}):l&&i?u():(g.restTimeoutPending=!0,g.restTimeout.start(s,u))))}};function e(e){g.pointerType=e.pointerType}},[i,g,k,S,a,n,y])}(v,{enabled:!T,mouseOnly:!0,move:!1,handleClose:p.useState("disableHoverablePopup")||"both"===O?null:function(e={}){let{blockPointerEvents:t=!1}=e,n=new tB,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:l,tree:s})=>{let a=r?.split("-")[0],u=!1,c=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,v=nk(r),b="mouseleave"===r.type,x=ny(m,v),y=ny(p,v);if(x&&(u=!0,!b))return;if(y&&(u=!1,!b)){u=!0;return}if(b&&tJ(r.relatedTarget)&&ny(m,r.relatedTarget))return;function w(){return!!(s&&r$(s.nodesRef.current,l).length>0)}function k(){w()||(n.clear(),i())}if(w())return;let E=p.getBoundingClientRect(),S=m.getBoundingClientRect(),C=e>S.right-S.width/2,R=t>S.bottom-S.height/2,j=S.width>E.width,M=S.height>E.height,T=(j?E:S).left,O=(j?E:S).right,P=(M?E:S).top,N=(M?E:S).bottom;if("top"===a&&t>=E.bottom-1||"bottom"===a&&t<=E.top+1||"left"===a&&e>=E.right-1||"right"===a&&e<=E.left+1)return void k();let L=!1;switch(a){case"top":L=iY(h,g,T,E.top+1,O,S.bottom-1);break;case"bottom":L=iY(h,g,T,S.top+1,O,E.bottom-1);break;case"left":L=iY(h,g,S.right-1,N,E.left+1,P);break;case"right":L=iY(h,g,E.right-1,N,S.left+1,P)}if(L)return;if(u&&(!(h>=E.x)||!(h<=E.x+E.width)||!(g>=E.y)||!(g<=E.y+E.height))||!b&&function(e,t){let n=performance.now(),r=n-f;if(null===c||null===d||0===r)return c=e,d=t,f=n,!1;let o=e-c,i=t-d;return c=e,d=t,f=n,o*o+i*i<r*r*iK}(h,g))return void k();let A=!1;switch(a){case"top":{let n=j?.25:2,r=t+.5+1,o=C||j?S.bottom-.5:S.top,i=C?j?S.bottom-.5:S.top:S.bottom-.5;A=iX(h,g,j||C?e+n:e-n,r,j?e-n:C?e+n:e-n,r,S.left,o,S.right,i);break}case"bottom":{let n=j?.25:2,r=t-.5,o=C||j?S.top+.5:S.bottom,i=C?j?S.top+.5:S.bottom:S.top+.5;A=iX(h,g,j||C?e+n:e-n,r,j?e-n:C?e+n:e-n,r,S.left,o,S.right,i);break}case"left":{let n=M?.25:2,r=e+.5+1,o=R||M?S.right-.5:S.left,i=R?M?S.right-.5:S.left:S.right-.5;A=iX(h,g,o,S.top,i,S.bottom,r,M||R?t+n:t-n,r,M?t-n:R?t+n:t-n);break}case"right":{let n=M?.25:2,r=e-.5,o=R||M?S.left+.5:S.right,i=R?M?S.left+.5:S.right:S.left+.5;A=iX(h,g,r,M||R?t+n:t-n,r,M?t-n:R?t+n:t-n,o,S.top,i,S.bottom)}}A?u||n.start(40,k):k()}};return r.__options={blockPointerEvents:t},r}(),restMs(){let e=S?.delay,t="object"==typeof C.current?C.current.open:void 0,n=y;return j&&(n=0!==t?s??e??y:0),n},delay(){let e="object"==typeof C.current?C.current.close:void 0,t=w;return null==u&&j&&(t=e),{close:t}},triggerElementRef:x,isActiveTrigger:h});return K("button",e,{state:{open:g},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=b.useRef(!1),a=b.useRef(null),u=tW(),c=b.useRef(!0);b.useEffect(()=>{let e=n.select("domReferenceElement");if(!i)return;let t=tX(e);function r(){let e=n.select("domReferenceElement");!n.select("open")&&tQ(e)&&e===nx(no(e))&&(s.current=!0)}function o(){c.current=!0}function l(){c.current=!1}return t.addEventListener("blur",r),i2&&(t.addEventListener("keydown",o,!0),t.addEventListener("pointerdown",l,!0)),()=>{t.removeEventListener("blur",r),i2&&(t.removeEventListener("keydown",o,!0),t.removeEventListener("pointerdown",l,!0))}},[n,i]),b.useEffect(()=>{if(i)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){if(e.reason===nq.triggerPress||e.reason===nq.escapeKey){let e=n.select("domReferenceElement");tJ(e)&&(a.current=e,s.current=!0)}}},[r,i,n]);let d=b.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=nk(e.nativeEvent);if(tJ(r)){if(i2&&!e.relatedTarget){if(!c.current&&!nS(r))return}else if(!function(e){if(!e||nm)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(r))return}let o=nw(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,nU(nq.triggerFocus,i,d)):u.start(f,()=>{s.current||n.setOpen(!0,nU(nq.triggerFocus,i,d))})},onBlur(e){s.current=!1,a.current=null;let t=e.relatedTarget,r=e.nativeEvent,i=tJ(t)&&t.hasAttribute(rK("focus-guard"))&&"outside"===t.getAttribute("data-type");u.start(0,()=>{let e=n.select("domReferenceElement"),l=nx(e?e.ownerDocument:document);!t&&l===e||ny(o.current.floatingContext?.refs.floating.current,l)||ny(e,l)||i||nw(t??l,n.context.triggerElements)||n.setOpen(!1,nU(nq.triggerFocus,r))})}}),[o,n,u,l]);return b.useMemo(()=>i?{reference:d,trigger:d}:{},[i,d])}(v,{enabled:!T}).reference,p.useState("triggerProps",E),{onPointerDown(){p.set("closeOnClick",a)},id:m,[i8.triggerDisabled]:T?"":void 0},d],stateAttributesMapping:n4})},b.forwardRef(it(p))),le=b.createContext(void 0),lt=b.forwardRef(function(e,t){let{children:n,container:r,className:o,render:i,...l}=e,{portalNode:s,portalSubtree:a}=ot({container:r,ref:t,componentProps:e,elementProps:l});return a||s?(0,g.jsxs)(b.Fragment,{children:[a,s&&nT.createPortal(n,s)]}):null}),ln=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return iB().useState("mounted")||n?(0,g.jsx)(le.Provider,{value:n,children:(0,g.jsx)(lt,{ref:t,...r})}):null}),lr=b.createContext(void 0);function lo(){let e=b.useContext(lr);if(void 0===e)throw Error(z(71));return e}let li=["top","right","bottom","left"],ll=Math.min,ls=Math.max,la=Math.round,lu=Math.floor,lc=e=>({x:e,y:e}),ld={left:"right",right:"left",bottom:"top",top:"bottom"};function lf(e,t){return"function"==typeof e?e(t):e}function lp(e){return e.split("-")[0]}function lm(e){return e.split("-")[1]}function lh(e){return"x"===e?"y":"x"}function lg(e){return"y"===e?"height":"width"}function lv(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function lb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let lx=["left","right"],ly=["right","left"],lw=["top","bottom"],lk=["bottom","top"];function lE(e){let t=lp(e);return ld[t]+e.slice(t.length)}function lS(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function lC(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 lR(e,t,n){let r,{reference:o,floating:i}=e,l=lv(t),s=lh(lv(t)),a=lg(s),u=lp(t),c="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(u){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(lm(t)){case"start":r[s]-=p*(n&&c?-1:1);break;case"end":r[s]+=p*(n&&c?-1:1)}return r}async function lj(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=lf(t,e),m=lS(p),h=s[f?"floating"===d?"reference":"floating":d],g=lC(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:u,rootBoundary:c,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=lC(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:a}):v);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 lM=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:lj},a=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=lR(u,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:v}=h,{x:b,y:x,data:y,reset:w}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,d=null!=x?x:d,m[g]={...m[g],...y},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(u=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:c,y:d}=lR(u,f,a)),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:m}};function lT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lO(e){return li.some(t=>e[t]>=0)}let lP=new Set(["left","top"]);async function lN(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=lp(n),s=lm(n),a="y"===lv(n),u=lP.has(l)?-1:1,c=i&&a?-1:1,d=lf(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*c,y:f*u}:{x:f*u,y:p*c}}function lL(e){let t=t9(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=tQ(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=la(n)!==i||la(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function lA(e){return tJ(e)?e:e.contextElement}function lI(e){let t=lA(e);if(!tQ(t))return lc(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=lL(t),l=(i?la(n.width):n.width)/r,s=(i?la(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let lz=lc(0);function lD(e){let t=tX(e);return t6()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lz}function l_(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=lA(e),s=lc(1);t&&(r?tJ(r)&&(s=lI(r)):s=lI(e));let a=(void 0===(o=n)&&(o=!1),r&&(!o||r===tX(l))&&o)?lD(l):lc(0),u=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(l){let e=tX(l),t=r&&tJ(r)?tX(r):r,n=e,o=nr(n);for(;o&&r&&t!==n;){let e=lI(o),t=o.getBoundingClientRect(),r=t9(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=i,c+=l,o=nr(n=tX(o))}}return lC({width:d,height:f,x:u,y:c})}function l$(e,t){let n=ne(e).scrollLeft;return t?t.left+n:l_(tY(e)).left+n}function lV(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-l$(e,n),y:n.top+t.scrollTop}}function lB(e,t,n){var r;let o;if("viewport"===t)o=function(e,t){let n=tX(e),r=tY(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;let e=t6();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}let u=l$(r);if(u<=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 u<=25&&(i+=u);return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t){let t,n,i,l,s,a,u;r=tY(e),t=tY(r),n=ne(r),i=r.ownerDocument.body,l=ls(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=ls(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+l$(r),u=-n.scrollTop,"rtl"===t9(i).direction&&(a+=ls(t.clientWidth,i.clientWidth)-l),o={width:l,height:s,x:a,y:u}}else if(tJ(t)){let e,r,i,l,s,a;r=(e=l_(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=tQ(t)?lI(t):lc(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=lD(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return lC(o)}function lW(e){return"static"===t9(e).position}function lH(e,t){if(!tQ(e)||"fixed"===t9(e).position)return null;if(t)return t(e);let n=e.offsetParent;return tY(e)===n&&(n=n.ownerDocument.body),n}function lF(e,t){var n;let r=tX(e);if(t2(e))return r;if(!tQ(e)){let t=nt(e);for(;t&&!t8(t);){if(tJ(t)&&!lW(t))return t;t=nt(t)}return r}let o=lH(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(tG(n)))&&lW(o);)o=lH(o,t);return o&&t8(o)&&lW(o)&&!t7(o)?r:o||function(e){let t=nt(e);for(;tQ(t)&&!t8(t);){if(t7(t))return t;if(t2(t))break;t=nt(t)}return null}(e)||r}let lU=async function(e){let t=this.getOffsetParent||lF,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=tQ(t),o=tY(t),i="fixed"===n,l=l_(e,!0,i,t),s={scrollLeft:0,scrollTop:0},a=lc(0);if(r||!r&&!i)if(("body"!==tG(t)||t1(o))&&(s=ne(t)),r){let e=l_(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=l$(o));i&&!r&&o&&(a.x=l$(o));let u=!o||r||i?lc(0):lV(o,s);return{x:l.left+s.scrollLeft-a.x-u.x,y:l.top+s.scrollTop-a.y-u.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}}},lq={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=tY(r),s=!!t&&t2(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},u=lc(1),c=lc(0),d=tQ(r);if((d||!d&&!i)&&(("body"!==tG(r)||t1(l))&&(a=ne(r)),d)){let e=l_(r);u=lI(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!l||d||i?lc(0):lV(l,a);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}},getDocumentElement:tY,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?t2(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=nn(e,[],!1).filter(e=>tJ(e)&&"body"!==tG(e)),o=null,i="fixed"===t9(e).position,l=i?nt(e):e;for(;tJ(l)&&!t8(l);){let t=t9(l),n=t7(l);n||"fixed"!==t.position||(o=null),(i?n||o:!(!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||t1(l)&&!n&&function e(t,n){let r=nt(t);return!(r===n||!tJ(r)||t8(r))&&("fixed"===t9(r).position||e(r,n))}(e,l)))?o=t:r=r.filter(e=>e!==l),l=nt(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=lB(t,i[0],o),s=l.top,a=l.right,u=l.bottom,c=l.left;for(let e=1;e<i.length;e++){let n=lB(t,i[e],o);s=ls(n.top,s),a=ll(n.right,a),u=ll(n.bottom,u),c=ls(n.left,c)}return{width:a-c,height:u-s,x:c,y:s}},getOffsetParent:lF,getElementRects:lU,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=lL(e);return{width:t,height:n}},getScale:lI,isElement:tJ,isRTL:function(e){return"rtl"===t9(e).direction}};function lK(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lG(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:u=!1}=r,c=lA(e),d=i||l?[...c?nn(c):[],...t?nn(t):[]]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let f=c&&a?function(e,t){let n,r=null,o=tY(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 u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let m={rootMargin:-lu(d)+"px "+-lu(o.clientWidth-(c+f))+"px "+-lu(o.clientHeight-(d+p))+"px "+-lu(c)+"px",threshold:ls(0,ll(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||lK(u,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}(c,n):null,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!u&&m.observe(c),t&&m.observe(t));let h=u?l_(e):null;return u&&function t(){let r=l_(e);h&&!lK(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,u&&cancelAnimationFrame(o)}}var lX="u">typeof document?b.useLayoutEffect:function(){};function lY(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(!lY(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)&&!lY(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function lZ(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lJ(e,t){let n=lZ(e);return Math.round(t*n)/n}function lQ(e){let t=b.useRef(e);return lX(()=>{t.current=e}),t}let l0=b.createContext(void 0);function l1(){let e=b.useContext(l0);return e?.direction??"ltr"}let l2={name:"hide",async fn(e){var t,n,r;let o,{width:i,height:l,x:s,y:a}=e.rects.reference,u=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}=lf(r,e);switch(o){case"referenceHidden":{let r=lT(await n.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:lO(r)}}}case"escaped":{let r=lT(await n.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:lO(r)}}}default:return{}}}}).name,fn:o.fn,options:[t,n]}).fn(e);return{data:{referenceHidden:u.data?.referenceHidden||0===i&&0===l&&0===s&&0===a}}}},l5={sideX:"left",sideY:"top"},l3={name:"adaptiveOrigin",async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:l,placement:s}=e,a=tX(o),u=a.getComputedStyle(o);if("0s"===u.transitionDuration||""===u.transitionDuration)return{x:t,y:n,data:l5};let c=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(c===a){let e=no(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await i.isElement?.(c)&&(d=await i.getDimensions(c));let f=lp(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":l5.sideX,sideY:"top"===f?"bottom":l5.sideY}}}};function l4(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 l7(e,t,n){let{rects:r,placement:o}=e;return{side:l4(t,lp(o),n),align:lm(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function l6(e){return null!=e&&"current"in e}function l8(e){return"starting"===e?r4:q}let l9=b.forwardRef(function(e,t){let{render:n,className:r,anchor:o,positionMethod:i="absolute",side:l="top",align:s="center",sideOffset:a=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=r6,...v}=e,x=iB(),y=function(){let e=b.useContext(le);if(void 0===e)throw Error(z(70));return e}(),w=x.useState("open"),k=x.useState("mounted"),E=x.useState("trackCursorAxis"),S=x.useState("disableHoverablePopup"),C=x.useState("floatingRootContext"),R=x.useState("instantType"),j=x.useState("transitionStatus"),M=function(e){var t,n,r,o,i,l,s,a,u,c,d,f,p,m;let h,g,v,x,{anchor:y,positionMethod:w="absolute",side:k="bottom",sideOffset:E=0,align:S="center",alignOffset:C=0,collisionBoundary:R,collisionPadding:j=5,sticky:M=!1,arrowPadding:T=5,disableAnchorTracking:O=!1,keepMounted:P=!1,floatingRootContext:N,mounted:L,collisionAvoidance:A,shiftCrossAxis:I=!1,nodeId:z,adaptiveOrigin:D,lazyFlip:$=!1,externalTree:V}=e,[B,W]=b.useState(null);L||null===B||W(null);let H=A.side||"flip",F=A.align||"flip",U=A.fallbackAxisSide||"end",q="function"==typeof y?y:void 0,K=tb(q),G=q?K:y,X=rN(y),Y="rtl"===l1(),Z=B||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Y?"left":"right","inline-start":Y?"right":"left"})[k],J="center"===S?Z:`${Z}-${S}`,Q=j,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"===R?"clippingAncestors":R,padding:Q},ei=b.useRef(null),el=rN(E),es=rN(C),ea=[(t=e=>{let t=l7(e,k,Y),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 E?E:0,"function"!=typeof C?C:0,Y,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 lN(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]})],eu="none"===F&&"shift"!==H,ec=!eu&&(M||I||"shift"===H),ed="none"===H?null:{name:(g={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"===H,crossAxis:"flip"===F&&"alignment",fallbackAxisSideDirection:U},async fn(e){var t,n,r,o,i,s,a,u;let c,d,f,{placement:p,middlewareData:m,rects:h,initialPlacement:g,platform:v,elements:b}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,...C}=lf(l,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let R=lp(p),j=lv(g),M=lp(g)===g,T=await (null==v.isRTL?void 0:v.isRTL(b.floating)),O=w||(M||!S?[lE(g)]:(c=lE(g),[lb(g),c,lb(c)])),P="none"!==E;!w&&P&&O.push(...(d=lm(g),f=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?ly:lx;return t?lx:ly;case"left":case"right":return t?lw:lk;default:return[]}}(lp(g),"start"===E,T),d&&(f=f.map(e=>e+"-"+d),S&&(f=f.concat(f.map(lb)))),f));let N=[g,...O],L=await v.detectOverflow(e,C),A=[],I=(null==(n=m.flip)?void 0:n.overflows)||[];if(x&&A.push(L[R]),y){let e,t,n,r,o=(s=p,a=h,void 0===(u=T)&&(u=!1),e=lm(s),n=lg(t=lh(lv(s))),r="x"===t?e===(u?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[n]>a.floating[n]&&(r=lE(r)),[r,lE(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=N[e];if(t&&("alignment"!==y||j===lv(t)||I.every(e=>lv(e.placement)!==j||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=lv(e.placement);return t===j||"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:g.fn,options:[o,i]},ef=eu?null:(s=e=>{var t,n,r;let o=no(e.elements.floating).documentElement;return{...eo,rootBoundary:I?{x:0,y:0,width:o.clientWidth,height:o.clientHeight}:void 0,mainAxis:"none"!==F,crossAxis:ec,limiter:M||I?void 0:{fn:(void 0===(r=t=e=>{if(!ei.current)return{};let{width:t,height:n}=ei.current.getBoundingClientRect(),r=lv(lp(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:u=!0}=lf(r,e),c={x:t,y:n},d=lv(o),f=lh(d),p=c[f],m=c[d],h=lf(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(u){var v,b;let e="y"===f?"width":"height",t=lP.has(lp(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=l.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=l.offset)?void 0:b[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,M,I,Q,F],void 0===(u=s)&&(u={}),{name:(v={name:"shift",options:u,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}=lf(u,e),c={x:t,y:n},d=await o.detectOverflow(e,a),f=lv(lp(r)),p=lh(f),m=c[p],h=c[f];if(i){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=m+d[e],r=m-d[t];m=ls(n,ll(m,r))}if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=h+d[e],r=h-d[t];h=ls(n,ll(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"===H||"shift"===F||"center"===S?ea.push(ef,ed):ea.push(ed,ef),ea.push({name:(x={name:"size",options:f=c={...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:u}=r.reference,c=(Math.round((l+a)*i)-Math.round(l*i))/i,d=(Math.round((s+u)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${c}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:u=()=>{},...c}=lf(f,e),d=await s.detectOverflow(e,c),p=lp(i),m=lm(i),h="y"===lv(i),{width:g,height:v}=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 b=v-d.top-d.bottom,x=g-d.left-d.right,y=ll(v-d[r],b),w=ll(g-d[o],x),k=!e.middlewareData.shift,E=y,S=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(S=x),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(E=b),k&&!m){let e=ls(d.left,0),t=ls(d.right,0),n=ls(d.top,0),r=ls(d.bottom,0);h?S=g-2*(0!==e||0!==t?e+t:ls(d.left,d.right)):E=v-2*(0!==n||0!==r?n+r:ls(d.top,d.bottom))}await u({...e,availableWidth:S,availableHeight:E});let C=await s.getDimensions(a.floating);return g!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}).name,fn:x.fn,options:[c,d]},(p=()=>({element:ei.current||document.createElement("div"),padding:T,offsetParent:"floating"}),m=[T],{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:u=0,offsetParent:c="real"}=lf(p,e)||{};if(null==a)return{};let d=lS(u),f={x:t,y:n},m=lh(lv(r)),h=lg(m),g=await i.getDimensions(a),v="y"===m,b=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[m]-f[m]-o.floating[h],y=f[m]-o.reference[m],w="real"===c?await i.getOffsetParent?.(a):l.floating,k=l.floating[b]||o.floating[h];k&&await i.isElement?.(w)||(k=l.floating[b]||o.floating[h]);let E=k/2-g[h]/2-1,S=Math.min(d[v?"top":"left"],E),C=Math.min(d[v?"bottom":"right"],E),R=k-g[h]-C,j=k/2-g[h]/2+(x/2-y/2),M=ls(S,ll(j,R)),T=!s.arrow&&null!=lm(r)&&j!==M&&o.reference[h]/2-(j<S?S:C)-g[h]/2<0,O=T?j<S?j-S:j-R:0;return{[m]:f[m]+O,data:{[m]:M,centerOffset:j-M-O,...T&&{alignmentOffset:O}},reset:T}},options:[p,m]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:i}=e,l=lp(r),s=lv(l),a=ei.current,u=n.arrow?.x||0,c=n.arrow?.y||0,d=a?.clientWidth||0,f=a?.clientHeight||0,p=u+d/2,m=c+f/2,h=Math.abs(n.shift?.y||0),g=o.reference.height/2,v="function"==typeof E?E(l7(e,k,Y)):E,b=h>v,x={top:`${p}px calc(100% + ${v}px)`,bottom:`${p}px ${-v}px`,left:`calc(100% + ${v}px) ${m}px`,right:`${-v}px ${m}px`}[l],y=`${p}px ${o.reference.y+g-i}px`;return t.floating.style.setProperty("--transform-origin",ec&&"y"===s&&b?y:x),{}}},l2,D),nj(()=>{!L&&N&&N.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[L,N]);let ep=b.useMemo(()=>({elementResize:!O&&"u">typeof ResizeObserver,layoutShift:!O&&"u">typeof IntersectionObserver}),[O]),{refs:em,elements:eh,x:eg,y:ev,middlewareData:eb,update:ex,placement:ey,context:ew,isPositioned:ek,floatingStyles:eE}=function(e={}){let{nodeId:t,externalTree:n}=e,r=function(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,o=tA(),i=null!=oi(),l=_(()=>new ia({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new im,floatingId:o,nested:i,noEmit:!1})).current;return nj(()=>{let e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=tJ(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]=b.useState(null),a=b.useRef(null),u=ol(n);nj(()=>{i.domReference&&(a.current=i.domReference)},[i.domReference]);let c=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:u}=e,[c,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);lY(f,r)||p(r);let[m,h]=b.useState(null),[g,v]=b.useState(null),x=b.useCallback(e=>{e!==E.current&&(E.current=e,h(e))},[]),y=b.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),w=i||m,k=l||g,E=b.useRef(null),S=b.useRef(null),C=b.useRef(c),R=null!=a,j=lQ(a),M=lQ(o),T=lQ(u),O=b.useCallback(()=>{var e,r;let o,i,l;if(!E.current||!S.current)return;let s={placement:t,strategy:n,middleware:f};M.current&&(s.platform=M.current),(e=E.current,r=S.current,o=new Map,l={...(i={platform:lq,...s}).platform,_c:o},lM(e,r,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==T.current};P.current&&!lY(C.current,t)&&(C.current=t,nT.flushSync(()=>{d(t)}))})},[f,t,n,M,T]);lX(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let P=b.useRef(!1);lX(()=>(P.current=!0,()=>{P.current=!1}),[]),lX(()=>{if(w&&(E.current=w),k&&(S.current=k),w&&k){if(j.current)return j.current(w,k,O);O()}},[w,k,O,j,R]);let N=b.useMemo(()=>({reference:E,floating:S,setReference:x,setFloating:y}),[x,y]),L=b.useMemo(()=>({reference:w,floating:k}),[w,k]),A=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=lJ(L.floating,c.x),r=lJ(L.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...lZ(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,L.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:O,refs:N,elements:L,floatingStyles:A}),[c,O,N,L,A])}({...e,elements:{...i,...l&&{reference:l}}}),d=b.useCallback(e=>{let t=tJ(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),c.refs.setReference(t)},[c.refs]),[f,p]=b.useState(null),[m,h]=b.useState(null);o.useSyncedValue("referenceElement",f),o.useSyncedValue("domReferenceElement",tJ(f)?f:null),o.useSyncedValue("floatingElement",m);let g=b.useCallback(e=>{(tJ(e)||null===e)&&(a.current=e,p(e)),(tJ(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!tJ(e))&&c.refs.setReference(e)},[c.refs,p]),v=b.useCallback(e=>{h(e),c.refs.setFloating(e)},[c.refs]),x=b.useMemo(()=>({...c.refs,setReference:g,setFloating:v,setPositionReference:d,domReference:a}),[c.refs,g,v,d]),y=b.useMemo(()=>({...c.elements,domReference:i.domReference}),[c.elements,i.domReference]),w=o.useState("open"),k=o.useState("floatingId"),E=b.useMemo(()=>({...c,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:k,refs:x,elements:y,nodeId:t,rootStore:o}),[c,x,y,t,o,w,k]);return nj(()=>{o.context.dataRef.current.floatingContext=E;let e=u?.nodesRef.current.find(e=>e.id===t);e&&(e.context=E)}),b.useMemo(()=>({...c,context:E,refs:x,elements:y,rootStore:o}),[c,x,y,E,o])}({rootContext:N,placement:J,middleware:ea,strategy:w,whileElementsMounted:P?void 0:(...e)=>lG(...e,ep),nodeId:z,externalTree:V}),{sideX:eS,sideY:eC}=eb.adaptiveOrigin||l5,eR=ek?w:"fixed",ej=b.useMemo(()=>{let e=D?{position:eR,[eS]:eg,[eC]:ev}:{position:eR,...eE};return ek||(e.opacity=0),e},[D,eR,eS,eg,eC,ev,eE,ek]),eM=b.useRef(null);nj(()=>{if(!L)return;let e=X.current,t="function"==typeof e?e():e,n=(l6(t)?t.current:t)||null;n!==eM.current&&(em.setPositionReference(n),eM.current=n)},[L,em,G,X]),b.useEffect(()=>{if(!L)return;let e=X.current;"function"!=typeof e&&l6(e)&&e.current!==eM.current&&(em.setPositionReference(e.current),eM.current=e.current)},[L,em,G,X]),b.useEffect(()=>{if(P&&L&&eh.domReference&&eh.floating)return lG(eh.domReference,eh.floating,ex,ep)},[P,L,eh,ex,ep]);let eT=lp(ey),eO=l4(k,eT,Y),eP=lm(ey)||"center",eN=!!eb.hide?.referenceHidden;nj(()=>{$&&L&&ek&&W(eT)},[$,L,ek,eT]);let eL=b.useMemo(()=>({position:"absolute",top:eb.arrow?.y,left:eb.arrow?.x}),[eb.arrow]),eA=eb.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:ej,arrowStyles:eL,arrowRef:ei,arrowUncentered:eA,side:eO,align:eP,physicalSide:eT,anchorHidden:eN,refs:em,context:ew,isPositioned:ek,update:ex}),[ej,eL,ei,eA,eO,eP,eT,eN,em,ew,ek,ex])}({anchor:o,positionMethod:i,floatingRootContext:C,mounted:k,side:l,sideOffset:a,align:s,alignOffset:u,collisionBoundary:c,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:x.useState("hasViewport")?l3:void 0}),T=b.useMemo(()=>{let e={};return(!w||"both"===E||S)&&(e.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...M.positionerStyles,...e}}},[w,E,S,k,M.positionerStyles]),O=b.useMemo(()=>({open:w,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:"none"!==E?"tracking-cursor":R}),[w,M.side,M.align,M.anchorHidden,E,R]),P=b.useMemo(()=>({...O,arrowRef:M.arrowRef,arrowStyles:M.arrowStyles,arrowUncentered:M.arrowUncentered}),[O,M.arrowRef,M.arrowStyles,M.arrowUncentered]),N=K("div",e,{state:O,props:[T,l8(j),v],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:n7});return(0,g.jsx)(lr.Provider,{value:P,children:N})});var nq=nq;let se={...n7,...nD},st=b.forwardRef(function(e,t){let{className:n,render:r,...o}=e,i=iB(),{side:l,align:s}=lo(),a=i.useState("open"),u=i.useState("instantType"),c=i.useState("transitionStatus"),d=i.useState("popupProps"),f=i.useState("floatingRootContext");return n$({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,u=i7(n),c=ol(),d=oi(),f=tb(()=>iQ(l.current.openEvent?.type,u.interactedInside)),p=tb(()=>{let e=l.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=tb(e=>nw(e,n.context.triggerElements)),h=b.useCallback(e=>{let t=iZ(a,"close",u.pointerType),r=()=>{n.setOpen(!1,nU(nq.triggerHover,e)),c?.events.emit("floating.closed",e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[a,n,u,c]),g=tb(()=>{i4(u)}),v=tb(e=>{let t=nk(e);if(!(t&&t.closest(i5))){u.interactedInside=!1;return}u.interactedInside=t?.closest("[aria-haspopup]")!=null});nj(()=>{r||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,g())},[r,u,g]),b.useEffect(()=>g,[g]),nj(()=>{if(s&&r&&u.handleCloseOptions?.blockPointerEvents&&p()&&tJ(i)&&o){let e=no(o),t=c?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;t&&(t.style.pointerEvents="");let n=u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??t??i.closest("[data-rootownerid]")??e.body;return!function(e,t){let{scopeElement:n,referenceElement:r,floatingElement:o}=t;i4(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"}(u,{scopeElement:n,referenceElement:i,floatingElement:o}),()=>{g()}}},[s,r,i,o,u,p,c,d,g]);let x=tW();b.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)),c?.events.off("floating.closed",r)};function e(){u.openChangeTimeout.clear(),x.clear(),c?.events.off("floating.closed",r),g()}function t(e){if(c&&d&&r$(c.nodesRef.current,d).length>0)return void c.events.on("floating.closed",r);if(!m(e.relatedTarget)){if(u.handler)return void u.handler(e);g(),f()||h(e)}}function r(e){c&&d&&!(r$(c.nodesRef.current,d).length>0)&&x.start(0,()=>{c.events.off("floating.closed",r),n.setOpen(!1,nU(nq.triggerHover,e)),c.events.emit("floating.closed",e)})}},[s,o,n,l,f,m,h,g,v,u,c,d,x])}(f,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")}),K("div",e,{state:{open:a,side:l,align:s,instant:u,transitionStatus:c},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[d,l8(c),o],stateAttributesMapping:se})}),sn=b.forwardRef(function(e,t){let{className:n,render:r,...o}=e,i=iB().useState("instantType"),{open:l,arrowRef:s,side:a,align:u,arrowUncentered:c,arrowStyles:d}=lo();return K("div",e,{state:{open:l,side:a,align:u,uncentered:c,instant:i},ref:[t,s],props:[{style:d,"aria-hidden":!0},o],stateAttributesMapping:n7})}),sr=((m={}).popupWidth="--popup-width",m.popupHeight="--popup-height",m);function so(e){let t=t9(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=tQ(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r;return(la(n)!==i||la(r)!==l)&&(n=i,r=l),{width:n,height:r}}let si=()=>!0;function sl(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function ss(e,t){let n=[];for(let[r,o]of Object.entries(t))n.push(sl(e,r,o));return n.length?()=>{n.forEach(e=>e())}:F}function sa(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 su(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 sc={activationDirection:e=>e?{"data-activation-direction":e}:null},sd=b.forwardRef(function(e,t){let{render:n,className:r,children:o,...i}=e,l=iB(),s=lo(),a=l.useState("instantType"),{children:u,state:c}=function(e){let t,{store:n,side:r,cssVars:o,children:i}=e,l=l1(),s=n.useState("activeTriggerElement"),a=n.useState("activeTriggerId"),u=n.useState("open"),c=n.useState("payload"),d=n.useState("mounted"),f=n.useState("popupElement"),p=n.useState("positionerElement"),m=function(e){let[t,n]=b.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}(u?s:null),h=function(e,t){let[n,r]=b.useState(0),o=b.useRef(e),i=b.useRef(t),l=b.useRef(!1);return nj(()=>{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,c),v=b.useRef(null),[x,y]=b.useState(null),[w,k]=b.useState(null),E=b.useRef(null),S=b.useRef(null),C=n_(E,!0,!1),R=nN(),[j,M]=b.useState(null),[T,O]=b.useState(!1);nj(()=>(n.set("hasViewport",!0),()=>{n.set("hasViewport",!1)}),[n]);let P=tb(()=>{E.current?.style.setProperty("animation","none"),E.current?.style.setProperty("transition","none"),S.current?.style.setProperty("display","none")}),N=tb(e=>{E.current?.style.removeProperty("animation"),E.current?.style.removeProperty("transition"),S.current?.style.removeProperty("display"),e&&M(e)}),L=b.useRef(null);nj(()=>{var e,t;let n,r,o,i;s&&m&&s!==m&&L.current!==s&&v.current&&(y(v.current),O(!0),k((e=m,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})),R.request(()=>{nT.flushSync(()=>{O(!1)}),C(()=>{y(null),M(null),v.current=null})}),L.current=s)},[s,m,x,C,R]),nj(()=>{let e=E.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,g.jsxs)(b.Fragment,{children:[(0,g.jsx)("div",{"data-previous":!0,inert:oE(!0),ref:S,style:{...j?{[o.popupWidth]:`${j.width}px`,[o.popupHeight]:`${j.height}px`}:null,position:"absolute"},"data-ending-style":T?void 0:""},"previous"),(0,g.jsx)("div",{"data-current":!0,ref:E,"data-starting-style":T?"":void 0,children:i},h)]}):(0,g.jsx)("div",{"data-current":!0,ref:E,children:i},h),nj(()=>{let e=S.current;e&&x&&e.replaceChildren(...Array.from(x.childNodes))},[x]),!function(e){let{popupElement:t,positionerElement:n,content:r,mounted:o,enabled:i=si,onMeasureLayout:l,onMeasureLayoutComplete:s,side:a,direction:u}=e,c=n_(t,!0,!1),d=nN(),f=b.useRef(null),p=b.useRef(null),m=b.useRef(!0),h=b.useRef(F),g=tb(l),v=tb(s),x=b.useMemo(()=>{let e="top"===a,t="left"===a;return"rtl"===u?(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"}:q},[a,u]);nj(()=>{if(!o||!i()||"function"!=typeof ResizeObserver){h.current=F,m.current=!0,f.current=null,p.current=null;return}if(!t||!n)return;h.current=ss(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),sa(t,"auto");let r=sl(t,"position","static"),l=sl(t,"transform","none"),s=sl(t,"scale","1"),a=ss(n,{"--available-width":"max-content","--available-height":"max-content"});function u(){r(),l(),a(),s()}if(g?.(),m.current||null===f.current){su(n,"max-content");let r=so(t);return f.current=r,su(n,r),u(),v?.(null,r),m.current=!1,()=>{e.disconnect(),h.current(),h.current=F}}sa(t,"auto"),su(n,"max-content");let b=f.current??p.current,y=so(t);if(f.current=y,!b)return su(n,y),u(),v?.(null,y),()=>{e.disconnect(),d.cancel(),h.current(),h.current=F};sa(t,b),u(),v?.(b,y),su(n,y);let w=new AbortController;return d.request(()=>{sa(t,y),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},w.signal)}),()=>{e.disconnect(),w.abort(),d.cancel(),h.current(),h.current=F}},[r,t,n,c,d,i,o,g,v,x])}({popupElement:f,positionerElement:p,mounted:d,content:c,onMeasureLayout:P,onMeasureLayoutComplete:N,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:sr,children:o});return K("div",e,{state:{activationDirection:c.activationDirection,transitioning:c.transitioning,instant:a},ref:t,props:[i,{children:u}],stateAttributesMapping:sc})});var nq=nq;class sf{constructor(){this.store=new iF}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error(z(81,e));this.store.setOpen(!0,nU(nq.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,nU(nq.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,sn,"Handle",0,sf,"Popup",0,st,"Portal",0,ln,"Positioner",0,l9,"Provider",0,function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,o=b.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),i=b.useMemo(()=>({open:t,close:n}),[t,n]);return(0,g.jsx)(iq.Provider,{value:o,children:(0,g.jsx)(i1,{delay:i,timeoutMs:r,children:e.children})})},"Root",0,iU,"Trigger",0,i9,"Viewport",0,sd,"createHandle",0,function(){return new sf}],27486);var sp=e.i(27486),sp=sp;let sm=e=>{let t,n,r,o=(0,v.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,g.jsx)(sp.Provider,{"data-slot":"tooltip-provider",delay:i,...t}),o[3]=i,o[4]=t,o[5]=r):r=o[5],r},sh=(0,b.createContext)(null),sg=e=>{let t,n,r,o,i,l,s,a,u,c,d,f,p,m,h,x,y=(0,v.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,v.c)(2),[r,o]=(0,b.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,b.useEffect)(e,t),!!r})(),[E,S]=(0,b.useState)(!1),[C,R]=(0,b.useState)(w),j=r??C;y[8]!==j||y[9]!==i?(a=e=>{let t="function"==typeof e?e(j):e;i?i(t):R(t),cookieStore.set({expires:Date.now()+6048e5,name:"sidebar_state",path:"/",value:String(t)})},y[8]=j,y[9]=i,y[10]=a):a=y[10];let M=a;y[11]!==k||y[12]!==M?(u=()=>k?S(sw):M(sk),y[11]=k,y[12]=M,y[13]=u):u=y[13];let T=u;y[14]!==T?(c=()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),T())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[T],y[14]=T,y[15]=c,y[16]=d):(c=y[15],d=y[16]),(0,b.useEffect)(c,d);let O=j?"expanded":"collapsed";y[17]!==k||y[18]!==j||y[19]!==E||y[20]!==M||y[21]!==O||y[22]!==T?(f={isMobile:k,open:j,openMobile:E,setOpen:M,setOpenMobile:S,state:O,toggleSidebar:T},y[17]=k,y[18]=j,y[19]=E,y[20]=M,y[21]=O,y[22]=T,y[23]=f):f=y[23];let P=f;y[24]!==n?(p=((...e)=>e8(Y(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?(m={"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},y[26]=l,y[27]=m):m=y[27];let N=m;return y[28]!==t||y[29]!==o||y[30]!==p||y[31]!==N?(h=(0,g.jsx)(sm,{delay:0,children:(0,g.jsx)("div",{className:p,"data-slot":"sidebar-wrapper",style:N,...o,children:t})}),y[28]=t,y[29]=o,y[30]=p,y[31]=N,y[32]=h):h=y[32],y[33]!==P||y[34]!==h?(x=(0,g.jsx)(sh.Provider,{value:P,children:h}),y[33]=P,y[34]=h,y[35]=x):x=y[35],x},sv=e=>{let t,n,r,o,i,l,s,a,u,c,d,f,p=(0,v.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 m=void 0===o?"left":o,h=void 0===i?"sidebar":i,x=void 0===l?"offcanvas":l,{isMobile:y,state:w,openMobile:k,setOpenMobile:E}=(()=>{let e=(0,b.useContext)(sh);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)=>e8(Y(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,g.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,g.jsxs)(iD,{className:"sr-only",children:[(0,g.jsx)(i_,{children:"Sidebar"}),(0,g.jsx)(i$,{children:"Displays the mobile sidebar."})]}),p[14]=n):n=p[14],p[15]!==t?(o=(0,g.jsx)("div",{className:"flex h-full w-full flex-col",children:t}),p[15]=t,p[16]=o):o=p[16],p[17]!==m||p[18]!==o?(i=(0,g.jsxs)(iz,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:m,style:e,children:[n,o]}),p[17]=m,p[18]=o,p[19]=i):i=p[19],p[20]!==k||p[21]!==r||p[22]!==E||p[23]!==i?(l=(0,g.jsx)(iL,{onOpenChange:E,open:k,...r,children:i}),p[20]=k,p[21]=r,p[22]=E,p[23]=i,p[24]=l):l=p[24],l}let S="collapsed"===w?x:"",C="floating"===h||"inset"===h?"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)=>e8(Y(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,g.jsx)("div",{className:s,"data-slot":"sidebar-gap"}),p[27]=s,p[28]=a):a=p[28];let R="left"===m?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",j="floating"===h||"inset"===h?"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]!==R||p[31]!==j?(u=((...e)=>e8(Y(e)))("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",R,j,n),p[29]=n,p[30]=R,p[31]=j,p[32]=u):u=p[32],p[33]!==t?(c=(0,g.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]=c):c=p[34],p[35]!==r||p[36]!==u||p[37]!==c?(d=(0,g.jsx)("div",{className:u,"data-slot":"sidebar-container",...r,children:c}),p[35]=r,p[36]=u,p[37]=c,p[38]=d):d=p[38],p[39]!==m||p[40]!==w||p[41]!==d||p[42]!==S||p[43]!==a||p[44]!==h?(f=(0,g.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":S,"data-side":m,"data-slot":"sidebar","data-state":w,"data-variant":h,children:[a,d]}),p[39]=m,p[40]=w,p[41]=d,p[42]=S,p[43]=a,p[44]=h,p[45]=f):f=p[45],f},sb=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("main",{className:r,"data-slot":"sidebar-inset",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sx=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.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},sy=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.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 sw(e){return!e}function sk(e){return!e}J("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active]:bg-sidebar-accent data-[active]:font-medium data-[active]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!",sm:"h-7 text-xs"},variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"}}});let sE=e=>e.map(e=>{if("file"===e.type)return e;let t=sE(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}}),sS=(0,b.memo)(function(e){let t,n,r,o,i,l,s,a,u=(0,v.c)(26),{node:c,depth:d,isSelected:f,isViewed:p,commentCount:m,onSelect:h,onContextMenu:b}=e,x=16*d+8,{insertions:y,deletions:w}=c.fileStat,k=ta;y>0&&0===w?k=tu:w>0&&0===y&&(k=tc);let E="shrink-0 text-sidebar-foreground/40";y>0&&0===w?E="shrink-0 text-diff-green":w>0&&0===y&&(E="shrink-0 text-destructive");let S=f?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",C=p&&"opacity-50";return u[0]!==S||u[1]!==C?(t=((...e)=>e8(Y(e)))("flex w-full cursor-pointer items-center gap-1.5 py-1 text-left transition-colors",S,C),u[0]=S,u[1]=C,u[2]=t):t=u[2],u[3]!==x?(n={containIntrinsicBlockSize:"26px",contentVisibility:"auto",paddingLeft:x,paddingRight:8},u[3]=x,u[4]=n):n=u[4],u[5]!==c.path||u[6]!==h?(r=()=>h(c.path),u[5]=c.path,u[6]=h,u[7]=r):r=u[7],u[8]!==c.path||u[9]!==b?(o=e=>{e.preventDefault(),b(e.clientX,e.clientY,c.path)},u[8]=c.path,u[9]=b,u[10]=o):o=u[10],u[11]!==k||u[12]!==E?(i=(0,g.jsx)(k,{size:14,className:E}),u[11]=k,u[12]=E,u[13]=i):i=u[13],u[14]!==c.name?(l=(0,g.jsx)("span",{className:"flex-1 truncate text-[12px] leading-tight",children:c.name}),u[14]=c.name,u[15]=l):l=u[15],u[16]!==m?(s=m>0&&(0,g.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-sidebar-foreground/50",children:[(0,g.jsx)(to,{size:10}),m]}),u[16]=m,u[17]=s):s=u[17],u[18]!==t||u[19]!==n||u[20]!==r||u[21]!==o||u[22]!==i||u[23]!==l||u[24]!==s?(a=(0,g.jsxs)("button",{type:"button",className:t,style:n,onClick:r,onContextMenu:o,children:[i,l,s]}),u[18]=t,u[19]=n,u[20]=r,u[21]=o,u[22]=i,u[23]=l,u[24]=s,u[25]=a):a=u[25],a}),sC=(0,b.memo)(function(e){let t,n,r,o,i,l,s,a,u,c,d,f,p=(0,v.c)(38),{node:m,depth:h,isCollapsed:x,onToggle:y,children:w}=e,k=16*h+8;if(p[0]!==k||p[1]!==x||p[2]!==m.name||p[3]!==m.path||p[4]!==y){let e=m.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]!==m.path||p[16]!==y?(s=()=>y(m.path),p[15]=m.path,p[16]=y,p[17]=s):s=p[17],p[18]!==x?(a=x?(0,g.jsx)(ti,{size:12,className:"shrink-0 text-sidebar-foreground/50"}):(0,g.jsx)(tl,{size:12,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)=>(0,g.jsxs)(b.Fragment,{children:[t,n<e.length-1&&(0,g.jsx)("span",{className:"text-sidebar-foreground/30",children:"/"})]},n)),p[0]=k,p[1]=x,p[2]=m.name,p[3]=m.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?(u=(0,g.jsx)("span",{className:t,children:n}),p[20]=t,p[21]=n,p[22]=u):u=p[22],p[23]!==r||p[24]!==o||p[25]!==i||p[26]!==l||p[27]!==s||p[28]!==a||p[29]!==u?(c=(0,g.jsxs)("button",{type:r,"aria-expanded":o,className:i,style:l,onClick:s,children:[a,u]}),p[23]=r,p[24]=o,p[25]=i,p[26]=l,p[27]=s,p[28]=a,p[29]=u,p[30]=c):c=p[30],p[31]!==w||p[32]!==k||p[33]!==x?(d=!x&&(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsx)("div",{className:"pointer-events-none absolute inset-y-0 border-l border-sidebar-border/60",style:{left:k+6}}),w]}),p[31]=w,p[32]=k,p[33]=x,p[34]=d):d=p[34],p[35]!==c||p[36]!==d?(f=(0,g.jsxs)(g.Fragment,{children:[c,d]}),p[35]=c,p[36]=d,p[37]=f):f=p[37],f}),sR=e=>{let t,n,r,o,i,l,s,a,u,c,d,f,p,m,h,x,y,w,k,E,S,C,R=(0,v.c)(66),{files:j,selectedFile:M,onSelectFile:T,comments:O,repoPath:P,filterQuery:N,onFilterChange:L,viewedFiles:A}=e,[I,z]=(0,b.useState)(null);R[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Set,R[0]=t):t=R[0];let[D,_]=(0,b.useState)(t),[$,V]=(0,b.useState)(256),B=(0,b.useRef)(null);R[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{let e=e=>{B.current&&V(Math.max(8,B.current.startWidth+e.clientX-B.current.startX))},t=()=>{B.current&&(B.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=[],R[1]=n,R[2]=r):(n=R[1],r=R[2]),(0,b.useEffect)(n,r),R[3]!==$?(o=e=>{e.preventDefault(),B.current={startWidth:$,startX:e.clientX},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},R[3]=$,R[4]=o):o=R[4];let W=o;R[5]!==j||R[6]!==N?(i=N?j.filter(e=>e.file.toLowerCase().includes(N.toLowerCase())):j,R[5]=j,R[6]=N,R[7]=i):i=R[7];let H=i;R[8]!==H?(l=H.length>500?H.slice(0,500):H,R[8]=H,R[9]=l):l=R[9];let F=l;R[10]!==F?(s=sE((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})(F)),R[10]=F,R[11]=s):s=R[11];let U=s;if(R[12]!==O){for(let e of(a=new Map,O))a.set(e.file,(a.get(e.file)??0)+1);R[12]=O,R[13]=a}else a=R[13];let q=a;R[14]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{_(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},R[14]=u):u=R[14];let K=u;R[15]===Symbol.for("react.memo_cache_sentinel")?(c=(e,t,n)=>{z({file:n,x:e,y:t})},R[15]=c):c=R[15];let G=c;if(R[16]!==D||R[17]!==q||R[18]!==N||R[19]!==H.length||R[20]!==L||R[21]!==T||R[22]!==M||R[23]!==$||R[24]!==U||R[25]!==A){let e,t,n,r,o,i=(e,t)=>e.map(e=>"folder"===e.type?(0,g.jsx)(sC,{node:e,depth:t,isCollapsed:D.has(e.path),onToggle:K,children:i(e.children,t+1)},e.path):(0,g.jsx)(sS,{node:e,depth:t,isSelected:M===e.path,isViewed:A.has(e.path),commentCount:q.get(e.path)??0,onSelect:T,onContextMenu:G},e.path));f=sv,h="none",x="relative overflow-hidden border-r border-sidebar-border";let l=`${$}px`;R[34]!==l?(e={"--sidebar-width":l},R[34]=l,R[35]=e):e=R[35],y=e,R[36]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(ts,{size:12,className:"pointer-events-none absolute left-2.5 text-sidebar-foreground/40"}),R[36]=t):t=R[36],R[37]!==L?(n=e=>L(e.target.value),R[37]=L,R[38]=n):n=R[38],R[39]!==N||R[40]!==n?(r=(0,g.jsx)("input",{type:"text",value:N,onChange:n,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"}),R[39]=N,R[40]=n,R[41]=r):r=R[41],R[42]!==N||R[43]!==L?(o=N&&(0,g.jsx)("button",{type:"button",onClick:()=>L(""),"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:"×"}),R[42]=N,R[43]=L,R[44]=o):o=R[44],R[45]!==r||R[46]!==o?(w=(0,g.jsx)(sx,{className:"border-b border-sidebar-border h-[53px] flex-row items-center py-0 px-2",children:(0,g.jsxs)("div",{className:"relative flex w-full items-center",children:[t,r,o]})}),R[45]=r,R[46]=o,R[47]=w):w=R[47],d=sy,p="gap-0 py-1",m=0===H.length?(0,g.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[(0,g.jsx)("p",{className:"text-xs text-sidebar-foreground/50",children:"No changes"}),N&&(0,g.jsxs)("p",{className:"text-[10px] text-sidebar-foreground/30",children:["No files match “",N,"”"]})]}):(0,g.jsxs)(g.Fragment,{children:[i(U,0),H.length>500&&(0,g.jsxs)("p",{className:"px-3 py-2 text-[10px] text-sidebar-foreground/40",children:["Showing ",500," of ",H.length," files"]})]}),R[16]=D,R[17]=q,R[18]=N,R[19]=H.length,R[20]=L,R[21]=T,R[22]=M,R[23]=$,R[24]=U,R[25]=A,R[26]=d,R[27]=f,R[28]=p,R[29]=m,R[30]=h,R[31]=x,R[32]=y,R[33]=w}else d=R[26],f=R[27],p=R[28],m=R[29],h=R[30],x=R[31],y=R[32],w=R[33];return R[48]!==d||R[49]!==p||R[50]!==m?(k=(0,g.jsx)(d,{className:p,children:m}),R[48]=d,R[49]=p,R[50]=m,R[51]=k):k=R[51],R[52]!==I||R[53]!==P?(E=I&&(0,g.jsx)(th,{x:I.x,y:I.y,filePath:I.file,repoPath:P,onClose:()=>z(null)}),R[52]=I,R[53]=P,R[54]=E):E=R[54],R[55]!==W?(S=(0,g.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:W}),R[55]=W,R[56]=S):S=R[56],R[57]!==f||R[58]!==h||R[59]!==x||R[60]!==y||R[61]!==w||R[62]!==k||R[63]!==E||R[64]!==S?(C=(0,g.jsxs)(f,{collapsible:h,className:x,style:y,children:[w,k,E,S]}),R[57]=f,R[58]=h,R[59]=x,R[60]=y,R[61]=w,R[62]=k,R[63]=E,R[64]=S,R[65]=C):C=R[65],C};var sj=e.i(85869);let sM=x("DotGrid1x3HorizontalIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13c.5523 0 1-.4477 1-1s-.4477-1-1-1-1 .4477-1 1 .4477 1 1 1M20 13c.5523 0 1-.4477 1-1s-.4477-1-1-1-1 .4477-1 1 .4477 1 1 1M4 13c.5523 0 1-.4477 1-1s-.4477-1-1-1-1 .4477-1 1 .4477 1 1 1"})))),sT=x("EyeOpenIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.0001 12c0 1.6569-1.3431 3-3 3s-3-1.3431-3-3 1.3431-3 3-3 3 1.3431 3 3"}),b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21.2246 10.6522c-4.8152-7.5363-13.6338-7.5362-18.449.0001a2.508 2.508 0 0 0 0 2.6955c4.8152 7.5363 13.6338 7.5362 18.449-.0001a2.508 2.508 0 0 0 0-2.6955"})))),sO=x("EyeSlashIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{fill:"currentColor",d:"M10.6069 4.095c-.5472.0748-.9301.579-.8553 1.1263.0749.5471.5791.93 1.1263.8552zm10.6194 6.56-.8428.5383zM19.518 14.02c-.3443.4319-.2732 1.061.1586 1.4053.4319.3442 1.0611.2732 1.4053-.1587zm1.7085-.6754.8428.5382zM3.707 2.2929c-.3905-.3905-1.0237-.3905-1.4142 0s-.3905 1.0237 0 1.4142zM20.2928 21.707c.3905.3905 1.0237.3905 1.4142 0s.3905-1.0237 0-1.4142zM2.7734 10.6553l.8428.5382zm4.4159-3.1742c.4627-.3016.5933-.9211.2917-1.3838-.3015-.4627-.921-.5933-1.3838-.2918zM2.774 13.3457l.8427-.5383zm15.1285 4.8487c.4627-.3016.5933-.9211.2917-1.3838-.3015-.4627-.9211-.5933-1.3838-.2918zM10.8779 6.0765c3.3628-.46 6.9749 1.1542 9.5056 5.1168l1.6856-1.0765c-2.8778-4.506-7.2009-6.6047-11.4622-6.0218zm10.204 9.1901c.345-.4328.6747-.8942.9874-1.3838l-1.6856-1.0765c-.2763.4326-.5655.837-.8657 1.2137zm-.6984-4.0733a1.498 1.498 0 0 1 .0002 1.613l1.6856 1.0765a3.498 3.498 0 0 0-.0002-3.766zM11.9999 14c-1.1046 0-2-.8954-2-2h-2c0 2.2091 1.7909 4 4 4zM2.2928 3.7071l6.8787 6.8787 1.4142-1.4142L3.707 2.2929zM9.9999 12c0-.5526.2228-1.0512.5858-1.4142L9.1715 9.1716C8.4487 9.8943 7.9999 10.8957 7.9999 12zm-.8284-1.4142 4.2426 4.2426 1.4142-1.4142-4.2426-4.2426zm4.2426 4.2426 6.8787 6.8787 1.4142-1.4142-6.8787-6.8787zm0-1.4142A1.99 1.99 0 0 1 11.9999 14v2c1.1043 0 2.1057-.4488 2.8284-1.1716zM2.2928 3.7072l18 17.9999 1.4142-1.4142-18-18zm1.3234 7.4863c1.041-1.63 2.2662-2.8607 3.573-3.7124l-1.092-1.6756c-1.5678 1.0219-2.988 2.466-4.1666 4.3115zm-1.685 2.6905c1.9687 3.0821 4.6123 5.0432 7.4735 5.7838 2.8658.7418 5.8728.2374 8.4979-1.4734l-1.0921-1.6756c-2.1739 1.4169-4.6053 1.808-6.9046 1.2128-2.3038-.5963-4.552-2.2046-6.289-4.9242zm-.0006-3.767a3.5 3.5 0 0 0 .0007 3.767l1.6855-1.0766a1.499 1.499 0 0 1-.0006-1.6139z"})))),sP=b.createContext(void 0),sN=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),sL=((h={})[h.None=0]="None",h[h.GuessFromOrder=1]="GuessFromOrder",h);function sA(e){let{render:t,className:n,state:r=q,props:o=U,refs:i=U,metadata:l,stateAttributesMapping:s,tag:a="div",...u}=e,{compositeProps:c,compositeRef:d}=function(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=re(),{ref:o,index:i}=function(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:l,unregister:s,subscribeMapChange:a,elementsRef:u,labelsRef:c,nextIndexRef:d}=b.useContext(sN),f=b.useRef(-1),[p,m]=b.useState(i??(o===sL.GuessFromOrder?()=>{if(-1===f.current){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,-1!==p&&null!==e&&(u.current[p]=e,c)){let n=void 0!==t;c.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,u,c,t,r]);return nj(()=>{if(null!=i)return;let e=h.current;if(e)return l(e,n),()=>{s(e)}},[i,l,s,n]),nj(()=>{if(null==i)return a(e=>{let t=h.current?e.get(h.current)?.index:null;null!=t&&m(t)})},[i,a,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}(e),l=n===i,s=b.useRef(null),a=$(o,s);return{compositeProps:b.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(i)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;l||n||e.focus()}}),[l,r,i,t]),compositeRef:a,index:i}}({metadata:l});return K(a,e,{state:r,ref:[...i,d],props:[c,...o,u],stateAttributesMapping:s})}var nq=nq;let sI=b.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:o=!1,form:i,onPressedChange:l,pressed:s,render:a,type:u,value:c,nativeButton:d=!0,...f}=e,p=tI(c||void 0),m=function(e=!0){let t=b.useContext(sP);if(void 0===t&&!e)throw Error(z(7));return t}(),h=m?.value??[],v=m?void 0:r,x=(o||m?.disabled)??!1,[y,w]=nF({controlled:m?void 0!==p&&h.indexOf(p)>-1:s,default:v,name:"Toggle",state:"pressed"}),k=tb((e,t)=>{p&&m?.setGroupValue?.(p,e,t),l?.(e,t)}),{getButtonProps:E,buttonRef:S}=rt({disabled:x,native:d}),C={disabled:x,pressed:y},R=[S,t],j=[{"aria-pressed":y,onClick(e){let t=!y,n=nU(nq.none,e.nativeEvent);k(t,n),n.isCanceled||w(t)}},f,E],M=K("button",e,{enabled:!m,state:C,ref:R,props:j});return m?(0,g.jsx)(sA,{tag:"button",render:a,className:n,state:C,refs:R,props:j}):M}),sz=J("inline-flex shrink-0 select-none items-center justify-center rounded-lg border border-transparent outline-none transition-[color,background-color,border-color,box-shadow,opacity] 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:opacity-45 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{size:"icon-xs",variant:"ghost"},variants:{size:{"icon-sm":"size-9 rounded-[min(var(--radius-md),12px)]","icon-xs":"size-8 rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3"},variant:{ghost:"hover:bg-muted hover:text-foreground data-[pressed]:bg-muted data-[pressed]:text-foreground"}}}),sD=e=>{let t,n,r,o,i,l,s=(0,v.c)(12);return s[0]!==e?({className:t,variant:o,size:r,...n}=e,s[0]=e,s[1]=t,s[2]=n,s[3]=r,s[4]=o):(t=s[1],n=s[2],r=s[3],o=s[4]),s[5]!==t||s[6]!==r||s[7]!==o?(i=((...e)=>e8(Y(e)))(sz({className:t,size:r,variant:o})),s[5]=t,s[6]=r,s[7]=o,s[8]=i):i=s[8],s[9]!==n||s[10]!==i?(l=(0,g.jsx)(sI,{className:i,...n}),s[9]=n,s[10]=i,s[11]=l):l=s[11],l},s_=e=>{let t,n,r,o,i,l,s,a,u,c,d,f,p,m,h,x,y,w,k=(0,v.c)(48),{file:E,insertions:S,deletions:C,commentCount:R,repoPath:j,viewed:M,onToggleViewed:T,onDiscard:O}=e,[P,N]=(0,b.useState)(null),L=(0,b.useRef)(null);k[0]!==E?(n=-1===(t=E.lastIndexOf("/"))?"":E.slice(0,t),k[0]=E,k[1]=t,k[2]=n):(t=k[1],n=k[2]);let A=n;k[3]!==E||k[4]!==t?(r=-1===t?E:E.slice(t+1),k[3]=E,k[4]=t,k[5]=r):r=k[5];let I=r;k[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=L.current?.getBoundingClientRect();e&&N({x:e.left,y:e.bottom+4})},k[6]=o):o=k[6];let z=o;k[7]!==A?(i=A&&(0,g.jsxs)("span",{className:"text-muted-foreground truncate shrink",children:[A,"/"]}),k[7]=A,k[8]=i):i=k[8],k[9]!==I?(l=(0,g.jsx)("span",{className:"text-foreground font-medium shrink-0",children:I}),k[9]=I,k[10]=l):l=k[10],k[11]!==i||k[12]!==l?(s=(0,g.jsxs)("div",{className:"flex items-baseline gap-0 min-w-0",children:[i,l]}),k[11]=i,k[12]=l,k[13]=s):s=k[13],k[14]!==S?(a=S>0&&(0,g.jsxs)("span",{className:"font-mono text-[12px] text-diff-green",children:["+",S]}),k[14]=S,k[15]=a):a=k[15],k[16]!==C?(u=C>0&&(0,g.jsxs)("span",{className:"font-mono text-[12px] text-destructive",children:["−",C]}),k[16]=C,k[17]=u):u=k[17],k[18]!==a||k[19]!==u?(c=(0,g.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[a,u]}),k[18]=a,k[19]=u,k[20]=c):c=k[20],k[21]!==s||k[22]!==c?(d=(0,g.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1 text-[13px]",children:[s,c]}),k[21]=s,k[22]=c,k[23]=d):d=k[23],k[24]!==R?(f=R>0&&(0,g.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,g.jsx)(to,{size:10}),R]}),k[24]=R,k[25]=f):f=k[25],k[26]===Symbol.for("react.memo_cache_sentinel")?(p=(0,g.jsx)(te,{ref:L,variant:"ghost",size:"icon-xs",onClick:z,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"Open in…",children:(0,g.jsx)(sM,{})}),k[26]=p):p=k[26];let D=M?"text-ring hover:text-ring/80":"text-muted-foreground hover:text-foreground";k[27]!==D?(m=((...e)=>e8(Y(e)))(D),k[27]=D,k[28]=m):m=k[28];let _=M?"Mark as not viewed":"Mark as viewed",$=M?"Mark as not viewed":"Mark as viewed";return k[29]!==M?(h=M?(0,g.jsx)(sT,{}):(0,g.jsx)(sO,{}),k[29]=M,k[30]=h):h=k[30],k[31]!==T||k[32]!==m||k[33]!==_||k[34]!==$||k[35]!==h||k[36]!==M?(x=(0,g.jsx)(sD,{pressed:M,onPressedChange:T,className:m,title:_,"aria-label":$,children:h}),k[31]=T,k[32]=m,k[33]=_,k[34]=$,k[35]=h,k[36]=M,k[37]=x):x=k[37],k[38]!==P||k[39]!==E||k[40]!==O||k[41]!==j?(y=P&&(0,g.jsx)(th,{x:P.x,y:P.y,filePath:E,repoPath:j,onClose:()=>N(null),onDiscard:O}),k[38]=P,k[39]=E,k[40]=O,k[41]=j,k[42]=y):y=k[42],k[43]!==d||k[44]!==f||k[45]!==x||k[46]!==y?(w=(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 h-9 border-b border-border bg-card sticky top-0 z-10",children:[d,f,p,x,y]}),k[43]=d,k[44]=f,k[45]=x,k[46]=y,k[47]=w):w=k[47],w},s$=x("BranchIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("circle",{cx:6.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),b.createElement("circle",{cx:6.5,cy:18,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),b.createElement("circle",{cx:17.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),b.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"})))),sV=x("TrashCan2Icon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),sB=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("div",{className:r,"data-slot":"empty",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sW=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("div",{className:r,"data-slot":"empty-header",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sH=J("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"}}}),sF=e=>{let t,n,r,o,i,l=(0,v.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)=>e8(Y(e)))(sH({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,g.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},sU=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("div",{className:r,"data-slot":"empty-title",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sq=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("div",{className:r,"data-slot":"empty-description",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sK=e=>{let t,n,r,o,i=(0,v.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)=>e8(Y(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,g.jsx)("div",{className:r,"data-slot":"empty-content",...n}),i[5]=n,i[6]=r,i[7]=o):o=i[7],o},sG=e=>{let t,n,r,o,i,l=(0,v.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)=>e8(Y(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,g.jsx)("kbd",{className:o,...r,children:t}),l[6]=t,l[7]=r,l[8]=o,l[9]=i):i=l[9],i},sX={"[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"}},sY=()=>{let e,t,n,r,o,i,l,s,a,u,c,d=(0,v.c)(11);return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[t,(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[r,(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-destructive/5",children:[i,(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[s,(0,g.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")?(u=(0,g.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),d[9]=u):u=d[9],d[10]===Symbol.for("react.memo_cache_sentinel")?(c=(0,g.jsxs)("div",{className:"animate-pulse",children:[e,(0,g.jsxs)("div",{children:[n,o,l,a,(0,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[u,(0,g.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"91%"}})]})]})]}),d[10]=c):c=d[10],c},sZ=(0,sj.default)(()=>e.A(15910).then(e=>({default:e.PatchDiff})),{loadableGenerated:{modules:[1980]},loading:()=>(0,g.jsx)(sY,{}),ssr:!1}),sJ=(0,sj.default)(()=>e.A(15910).then(e=>({default:e.FileDiff})),{loadableGenerated:{modules:[1980]},loading:()=>(0,g.jsx)(sY,{}),ssr:!1}),sQ=e=>{let t,n,r,o,i,l,s,a,u,c=(0,v.c)(24),{onSubmit:d,onCancel:f}=e,[p,m]=(0,b.useState)("");c[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>m(e.target.value),c[0]=t):t=c[0],c[1]!==p||c[2]!==f||c[3]!==d?(n=e=>{("Enter"===e.key&&e.metaKey||"Return"===e.key)&&p.trim()&&d(p.trim(),""),"Escape"===e.key&&f()},c[1]=p,c[2]=f,c[3]=d,c[4]=n):n=c[4],c[5]!==p||c[6]!==n?(r=(0,g.jsx)("textarea",{autoFocus:!0,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 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"}),c[5]=p,c[6]=n,c[7]=r):r=c[7],c[8]!==f?(o=(0,g.jsx)(te,{variant:"ghost",size:"sm",onClick:f,children:"Cancel"}),c[8]=f,c[9]=o):o=c[9],c[10]!==p?(i=p.trim(),c[10]=p,c[11]=i):i=c[11];let h=!i;return c[12]!==p||c[13]!==d?(l=()=>p.trim()&&d(p.trim(),""),c[12]=p,c[13]=d,c[14]=l):l=c[14],c[15]!==h||c[16]!==l?(s=(0,g.jsx)(te,{size:"sm",disabled:h,onClick:l,children:"Comment ↵"}),c[15]=h,c[16]=l,c[17]=s):s=c[17],c[18]!==o||c[19]!==s?(a=(0,g.jsxs)("div",{className:"mt-2 flex justify-end gap-2",children:[o,s]}),c[18]=o,c[19]=s,c[20]=a):a=c[20],c[21]!==r||c[22]!==a?(u=(0,g.jsxs)("div",{className:"my-1 mx-4 rounded-md border border-border bg-background p-3 shadow-lg dark:shadow-none",children:[r,a]}),c[21]=r,c[22]=a,c[23]=u):u=c[23],u},s0=e=>{let t,n,r,o,i,l,s,a,u,c,d,f,p,m,h,x=(0,v.c)(39),{comment:k,onDelete:E}=e,[S,C]=(0,b.useState)(!1);x[0]!==k.body||x[1]!==k.tag?(t=()=>{let e=k.tag?`${k.tag} ${k.body}`:k.body;navigator.clipboard.writeText(e).catch(s5),C(!0),setTimeout(()=>C(!1),1500)},x[0]=k.body,x[1]=k.tag,x[2]=t):t=x[2];let R=t,j=k.tag?sX[k.tag]?.border??"border-l-ring/40":"border-l-ring/40";x[3]!==j?(n=((...e)=>e8(Y(e)))("group my-1 mx-4 rounded-md border border-border bg-card shadow-sm dark:shadow-none overflow-hidden border-l-2",j),x[3]=j,x[4]=n):n=x[4],x[5]!==k.tag?(r=k.tag&&(0,g.jsx)("span",{className:((...e)=>e8(Y(e)))("shrink-0 mt-0.5 text-[11px]",sX[k.tag]?.text??"text-muted-foreground"),children:k.tag}),x[5]=k.tag,x[6]=r):r=x[6],x[7]!==k.body?(o=(0,g.jsx)("p",{className:"flex-1 text-sm text-foreground leading-relaxed",children:k.body}),x[7]=k.body,x[8]=o):o=x[8];let M=S?"Copied!":"Copy comment",T=S?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary";return x[9]!==T?(i=((...e)=>e8(Y(e)))("rounded p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",T),x[9]=T,x[10]=i):i=x[10],x[11]!==S?(l=S?(0,g.jsx)(w,{size:12}):(0,g.jsx)(y,{size:12}),x[11]=S,x[12]=l):l=x[12],x[13]!==R||x[14]!==M||x[15]!==i||x[16]!==l?(s=(0,g.jsx)("button",{type:"button",onClick:R,title:M,className:i,children:l}),x[13]=R,x[14]=M,x[15]=i,x[16]=l,x[17]=s):s=x[17],x[18]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)(sV,{size:12}),x[18]=a):a=x[18],x[19]!==E?(u=(0,g.jsx)("button",{type:"button",onClick:E,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}),x[19]=E,x[20]=u):u=x[20],x[21]!==u||x[22]!==s?(c=(0,g.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[s,u]}),x[21]=u,x[22]=s,x[23]=c):c=x[23],x[24]!==c||x[25]!==r||x[26]!==o?(d=(0,g.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5",children:[r,o,c]}),x[24]=c,x[25]=r,x[26]=o,x[27]=d):d=x[27],x[28]!==k.lineNumber?(f=(0,g.jsxs)("span",{children:["L",k.lineNumber]}),x[28]=k.lineNumber,x[29]=f):f=x[29],x[30]!==k.createdAt?(p=k.createdAt&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{children:"·"}),(0,g.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)})]}),x[30]=k.createdAt,x[31]=p):p=x[31],x[32]!==f||x[33]!==p?(m=(0,g.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]}),x[32]=f,x[33]=p,x[34]=m):m=x[34],x[35]!==d||x[36]!==m||x[37]!==n?(h=(0,g.jsxs)("div",{className:n,children:[d,m]}),x[35]=d,x[36]=m,x[37]=n,x[38]=h):h=x[38],h},s1=({file:t,filePatch:n,layout:r,comments:o,fileStat:i,viewed:l,onToggleViewed:s,repoPath:a,mergeBase:u,onAddComment:c,onDeleteComment:d,onDiscard:f})=>{let{resolvedTheme:p}=(0,j.useTheme)(),[m,h]=(0,b.useState)(null),[v,x]=(0,b.useState)(null);(0,b.useEffect)(()=>{if(i?.binary)return;x(null);let n=!1,r="HEAD"===u?"WORKING_TREE":"HEAD";return(async()=>{try{let[o,i]=await Promise.all([fetch(`/api/file?path=${encodeURIComponent(t)}&ref=${encodeURIComponent(u)}`),fetch(`/api/file?path=${encodeURIComponent(t)}&ref=${encodeURIComponent(r)}`)]);if(n)return;let[l,s]=await Promise.all([o.json(),i.json()]),a=l.content,c=s.content;if(n)return;let{parseDiffFromFile:d}=await e.A(53973),f=d({contents:a,name:t},{contents:c,name:t},{context:3});n||x(f)}catch{}})(),()=>{n=!0}},[t,u,i?.binary]);let y=(0,b.useMemo)(()=>o.filter(e=>e.file===t),[o,t]),w=(0,b.useMemo)(()=>{let e=y.map(e=>({lineNumber:e.lineNumber,metadata:{comment:e,type:"comment"},side:e.side??"right"}));return m&&e.push({lineNumber:m.lineNumber,metadata:{file:t,type:"input"},side:m.side}),e},[y,m,t]),k=(0,b.useCallback)(e=>{let n=e.metadata;return n?"input"===n.type?(0,g.jsx)(sQ,{onSubmit:async(n,r)=>{await c(t,e.lineNumber,e.side,n,r),h(null)},onCancel:()=>h(null)}):"comment"===n.type?(0,g.jsx)(s0,{comment:n.comment,onDelete:()=>d(n.comment.id)}):null:null},[t,c,d]),E=(0,b.useCallback)(e=>(0,g.jsx)("button",{type:"button",className:"diffhub-gutter-btn",title:"Add comment for AI",onClick:()=>{let t=e();t&&h({lineNumber:t.lineNumber,side:t.side})},children:"+"}),[]);return(0,g.jsxs)("div",{"data-filename":t,className:"border-b border-border font-sans",children:[(0,g.jsx)(s_,{file:t,insertions:i?.insertions??0,deletions:i?.deletions??0,commentCount:y.length,repoPath:a,viewed:l,onToggleViewed:s,onDiscard:f?()=>f(t):void 0}),(0,g.jsx)("div",{className:((...e)=>e8(Y(e)))("transition-opacity duration-200",l&&"opacity-60"),children:v?(0,g.jsx)(sJ,{fileDiff:v,style:{"--diffs-addition-color-override":"var(--diff-green)"},options:{collapsedContextThreshold:3,diffStyle:"split"===r?"split":"unified",disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"char",lineHoverHighlight:"line",maxLineDiffLength:500,overflow:"scroll",theme:{dark:"github-dark",light:"github-light"},themeType:"light"===p?"light":"dark",unsafeCSS:"[data-diff-span] { border-radius: 0; }"},lineAnnotations:w,renderAnnotation:k,renderGutterUtility:E}):(0,g.jsx)(sZ,{patch:n,style:{"--diffs-addition-color-override":"var(--diff-green)"},options:{diffStyle:"split"===r?"split":"unified",disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"char",lineHoverHighlight:"line",maxLineDiffLength:500,overflow:"scroll",theme:{dark:"github-dark",light:"github-light"},themeType:"light"===p?"light":"dark",unsafeCSS:"[data-diff-span] { border-radius: 0; }"},lineAnnotations:w,renderAnnotation:k,renderGutterUtility:E})})]})},s2=e=>{let t,n,r,o,i,l,s=(0,v.c)(29),{patch:a,mergeBase:u,layout:c,comments:d,onAddComment:f,onDeleteComment:p,selectedFileId:m,fileStats:h,viewedFiles:b,onToggleViewed:x,repoPath:y,onDiscard:w}=e;if(s[0]!==h){for(let e of(t=new Map,h))t.set(e.file,e);s[0]=h,s[1]=t}else t=s[1];let k=t;if(s[2]!==a||s[3]!==m){let e;n=m??(e=a.match(/^diff --git a\/(.+?) b\//m),e?.[1]??null),s[2]=a,s[3]=m,s[4]=n}else n=s[4];let E=n;if(!a||!E){let e,t;return s[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsxs)(sW,{children:[(0,g.jsx)(sF,{variant:"icon",children:(0,g.jsx)(s$,{})}),(0,g.jsx)(sU,{children:"No changes"}),(0,g.jsx)(sq,{children:"The working tree is clean relative to the base branch"})]}),s[5]=e):e=s[5],s[6]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsxs)(sB,{className:"h-full",children:[e,(0,g.jsx)(sK,{children:(0,g.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,g.jsx)(sG,{children:"r"})," to refresh"]})})]}),s[6]=t):t=s[6],t}return s[7]!==E||s[8]!==k?(r=k.get(E),s[7]=E,s[8]=k,s[9]=r):r=s[9],s[10]!==E||s[11]!==b?(o=b.has(E),s[10]=E,s[11]=b,s[12]=o):o=s[12],s[13]!==E||s[14]!==x?(i=()=>x(E),s[13]=E,s[14]=x,s[15]=i):i=s[15],s[16]!==d||s[17]!==E||s[18]!==c||s[19]!==u||s[20]!==f||s[21]!==p||s[22]!==w||s[23]!==a||s[24]!==y||s[25]!==r||s[26]!==o||s[27]!==i?(l=(0,g.jsx)("div",{className:"h-full overflow-auto",id:"diff-container",children:(0,g.jsx)(s1,{file:E,filePatch:a,layout:c,comments:d,fileStat:r,viewed:o,onToggleViewed:i,repoPath:y,mergeBase:u,onAddComment:f,onDeleteComment:p,onDiscard:w})}),s[16]=d,s[17]=E,s[18]=c,s[19]=u,s[20]=f,s[21]=p,s[22]=w,s[23]=a,s[24]=y,s[25]=r,s[26]=o,s[27]=i,s[28]=l):l=s[28],l};function s5(){}let s3=e=>{let t,n=(0,v.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,g.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,g.jsx)("div",{className:i,children:r})}),n[0]=i,n[1]=r,n[2]=t):t=n[2],t},s4=e=>{let t,n=(0,v.c)(16),{filesData:r,deferredFileDiff:o,fileDiffPending:i,layout:l,comments:s,onAddComment:a,onDeleteComment:u,selectedFile:c,viewedFiles:d,onToggleViewed:f,repoPath:p,onDiscard:m}=e;if(null===r){let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s3,{text:"Loading diff…",pulse:!0}),n[0]=e):e=n[0],e}if(0===r.files.length){let e;return n[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s3,{text:"No changes"}),n[1]=e):e=n[1],e}if(!o||i){let e;return n[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s3,{text:"Loading diff…",pulse:!0}),n[2]=e):e=n[2],e}return n[3]!==s||n[4]!==o.mergeBase||n[5]!==o.patch||n[6]!==r.files||n[7]!==l||n[8]!==a||n[9]!==u||n[10]!==m||n[11]!==f||n[12]!==p||n[13]!==c||n[14]!==d?(t=(0,g.jsx)(s2,{patch:o.patch,mergeBase:o.mergeBase,layout:l,comments:s,onAddComment:a,onDeleteComment:u,selectedFileId:c,fileStats:r.files,viewedFiles:d,onToggleViewed:f,repoPath:p,onDiscard:m}),n[3]=s,n[4]=o.mergeBase,n[5]=o.patch,n[6]=r.files,n[7]=l,n[8]=a,n[9]=u,n[10]=m,n[11]=f,n[12]=p,n[13]=c,n[14]=d,n[15]=t):t=n[15],t};e.s(["DiffApp",0,({repoPath:e})=>{let[t,n]=(0,b.useState)(null),[r,o]=(0,b.useState)([]),[i,l]=(0,b.useState)(null),s=(0,b.useRef)(null),[a,u]=(0,b.useState)(null),c=(0,b.useRef)(new Map),[d,f]=(0,b.useState)("split"),[p,m]=(0,b.useState)(""),[h,v]=(0,b.useState)(!1),[x,y]=(0,b.useState)(null),[w,k]=(0,b.useState)(null),[E,S]=(0,b.useState)("all"),C=(0,b.useRef)("all"),[R,j]=(0,b.useState)(!1),M=(0,b.useRef)(!1),T=(0,b.useRef)(null),O=(0,b.useRef)(!1),P=(0,b.useRef)(0),[N,L]=(0,b.useTransition)(),[A,I]=(0,b.useState)(()=>{try{let t=localStorage.getItem(`diffhub-viewed:${e}`);return t?new Set(JSON.parse(t)):new Set}catch{return new Set}}),z=(0,b.useCallback)(t=>{I(n=>{let r=new Set(n);r.has(t)?r.delete(t):r.add(t);try{localStorage.setItem(`diffhub-viewed:${e}`,JSON.stringify([...r]))}catch{}return r})},[e]),D=(0,b.useDeferredValue)(a),_=(0,b.useCallback)(e=>{let t=new URLSearchParams;e&&t.set("file",e),"uncommitted"===C.current&&t.set("mode","uncommitted"),M.current&&t.set("ws","ignore");let n=t.toString();return n?`?${n}`:""},[]),$=(0,b.useCallback)(async e=>{var t;let n;P.current+=1;let r=P.current,o=(t=c.current,(n=t.get(e))?(t.delete(e),t.set(e,n),n):null);if(o){if(s.current!==e||r!==P.current)return;L(()=>u(o));return}try{let t=await fetch(`/api/diff${_(e)}`);if(!t.ok)return;let n=await t.json();if(s.current!==e||r!==P.current)return;L(()=>{((e,t,n)=>{if(e.has(t)&&e.delete(t),e.set(t,n),e.size<=50)return;let r=e.keys().next().value;r&&e.delete(r)})(c.current,e,n),u(n)})}catch{}},[_,L]),V=(0,b.useCallback)(e=>{s.current=e,(0,b.startTransition)(()=>l(e)),$(e)},[$]),B=(0,b.useCallback)(e=>{if(0===e.files.length){s.current=null,P.current+=1,(0,b.startTransition)(()=>{l(null),u(null)}),T.current=e.fingerprint;return}if(!s.current){let t=e.files[0].file;s.current=t,(0,b.startTransition)(()=>l(t)),$(t)}let t=s.current;if(t&&!e.files.some(e=>e.file===t)){let t=e.files[0]?.file??null;s.current=t,P.current+=1,(0,b.startTransition)(()=>{l(t),u(null)}),t&&$(t)}if(e.fingerprint===T.current)return;T.current=e.fingerprint,P.current+=1,c.current.clear();let n=s.current;n&&$(n)},[$]),W=(0,b.useCallback)(()=>{P.current+=1,c.current.clear(),T.current=null},[]),H=(0,b.useCallback)(async(e=!1)=>{if(!O.current){O.current=!0,e||v(!0),k(null);try{let[e,t]=await Promise.all([fetch(`/api/files${_()}`),fetch("/api/comments")]);if(!e.ok){let t=await e.json().catch(()=>({error:"Network error"}));k(t.error??"Failed to load files");return}let[r,i]=await Promise.all([e.json(),t.json()]);(0,b.startTransition)(()=>{n(r),o(i)}),y(new Date),B(r)}catch(e){k(e instanceof Error?e.message:String(e))}finally{e||v(!1),O.current=!1}}},[_,B]);(0,b.useEffect)(()=>{H()},[H]),(0,b.useEffect)(()=>{let e=setInterval(()=>H(!0),5e3);return()=>clearInterval(e)},[H]),(0,b.useEffect)(()=>{let e=e=>{if(!(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement)&&("s"!==e.key||e.metaKey||e.ctrlKey||f(e=>"split"===e?"stacked":"split"),"/"!==e.key||e.metaKey||e.ctrlKey||(e.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"v"!==e.key||e.metaKey||e.ctrlKey||!i||z(i),"r"!==e.key||e.metaKey||e.ctrlKey||H(),"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&&V(o.file)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,i,z,H,V]);let F=(0,b.useCallback)(e=>{C.current=e,S(e),W(),H(!1)},[W,H]),U=(0,b.useCallback)(e=>{M.current=e,j(e),W(),H(!1)},[W,H]),q=(0,b.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])}},[]),K=(0,b.useCallback)(async e=>{await fetch(`/api/comments?id=${e}`,{method:"DELETE"}),o(t=>t.filter(t=>t.id!==e))},[]),G=(0,b.useCallback)(async e=>{(await fetch("/api/discard",{body:JSON.stringify({file:e}),headers:{"Content-Type":"application/json"},method:"POST"})).ok&&(c.current.delete(e),await H(!1))},[H]);return w?(0,g.jsx)(sg,{className:"h-svh",children:(0,g.jsxs)(sb,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,g.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,g.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,g.jsx)("p",{className:"text-xs opacity-80",children:w})]}),(0,g.jsx)(te,{variant:"outline",onClick:()=>H(),children:"Retry"})]})}):(0,g.jsxs)(sg,{className:"h-svh",children:[(0,g.jsx)(sR,{files:t?.files??[],selectedFile:i,onSelectFile:V,comments:r,repoPath:e,filterQuery:p,onFilterChange:m,viewedFiles:A}),(0,g.jsxs)(sb,{className:"flex flex-col h-svh overflow-hidden",children:[(0,g.jsx)(tn,{branch:t?.branch??"…",baseBranch:t?.baseBranch??"main",insertions:t?.insertions??0,deletions:t?.deletions??0,fileCount:t?.files.length??0,refreshing:h,lastUpdated:x,comments:r,diffMode:E,onDiffModeChange:F,ignoreWhitespace:R,onIgnoreWhitespaceChange:U,layout:d,onLayoutChange:f}),(0,g.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,g.jsx)(s4,{filesData:t,deferredFileDiff:D,fileDiffPending:N,layout:d,comments:r,onAddComment:q,onDeleteComment:K,selectedFile:i,viewedFiles:A,onToggleViewed:z,repoPath:e,onDiscard:"uncommitted"===E?G:void 0})})]})]})}],33357)}]);