@minimalcorp/tsunagi 0.2.0 → 0.3.1

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 (137) 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 +14 -14
  15. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  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 +9 -9
  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/index.html +1 -1
  22. package/.next/standalone/apps/web/.next/server/app/index.rsc +16 -16
  23. package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  24. package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +16 -16
  25. package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
  26. package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +9 -9
  27. package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  28. package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
  29. package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  31. package/.next/standalone/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/apps/web/.next/server/app/settings.html +1 -1
  33. package/.next/standalone/apps/web/.next/server/app/settings.rsc +17 -16
  34. package/.next/standalone/apps/web/.next/server/app/settings.segments/_full.segment.rsc +17 -16
  35. package/.next/standalone/apps/web/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  36. package/.next/standalone/apps/web/.next/server/app/settings.segments/_index.segment.rsc +9 -9
  37. package/.next/standalone/apps/web/.next/server/app/settings.segments/_tree.segment.rsc +3 -2
  38. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +5 -4
  39. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  40. package/.next/standalone/apps/web/.next/server/app/tasks/[id]/page.js.nft.json +1 -1
  41. package/.next/standalone/apps/web/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__00qk65u._.js +3 -0
  43. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__02o_btn._.js +2 -2
  44. package/.next/standalone/apps/web/.next/server/chunks/ssr/_03vftq7._.js +7 -0
  45. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0835zmv._.js +14 -0
  46. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0g.cd6a._.js +1 -1
  47. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0g79jqo._.js +20 -0
  48. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0kflgfj._.js +20 -0
  49. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0w2dm3r._.js +3 -0
  50. package/.next/standalone/apps/web/.next/server/chunks/ssr/_10gk93.._.js +3 -0
  51. package/.next/standalone/apps/web/.next/server/chunks/ssr/{_053072t._.js → _139_l.u._.js} +2 -2
  52. package/.next/standalone/apps/web/.next/server/chunks/ssr/_13w5ytx._.js +7 -0
  53. package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web_src_app_settings_page_tsx_0i6itlb._.js +2 -2
  54. package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web_src_app_tasks_[id]_page_tsx_0jshsm2._.js +4 -21
  55. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0bfjoue._.js → node_modules_09d2oqj._.js} +1 -1
  56. package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_0a57phw._.js +3 -0
  57. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0a9pqes._.js → node_modules_0ak_3rk._.js} +1 -1
  58. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0mpkxmv._.js → node_modules_0cv326~._.js} +1 -1
  59. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0zstt1y._.js → node_modules_0h.vgyn._.js} +1 -1
  60. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0~2ubpz._.js → node_modules_0npujym._.js} +1 -1
  61. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0_1re~9._.js → node_modules_0q_5qo~._.js} +1 -1
  62. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0e.hm5q._.js → node_modules_0sn0lqb._.js} +1 -1
  63. package/.next/standalone/apps/web/.next/server/chunks/ssr/{node_modules_0-g_j5j._.js → node_modules_11-z65a._.js} +1 -1
  64. package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
  65. package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
  66. package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  67. package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
  68. package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  69. package/.next/standalone/apps/web/.next/static/chunks/0.gcmzq82~36i.js +1 -0
  70. package/.next/standalone/apps/web/.next/static/chunks/06gfh91..uydi.js +5 -0
  71. package/.next/standalone/apps/web/.next/static/chunks/08e.dbdz18nd2.js +18 -0
  72. package/.next/standalone/apps/web/.next/static/chunks/0b90ys7wq-p.4.css +4 -0
  73. package/.next/standalone/apps/web/.next/static/chunks/0crn03y2tj0lu.js +6 -0
  74. package/.next/standalone/apps/web/.next/static/chunks/{0s7g4uwmm49t..js → 0l83q95s~tih4.js} +2 -2
  75. package/.next/standalone/apps/web/.next/static/chunks/0lvl3ec93cab_.js +7 -0
  76. package/.next/standalone/apps/web/.next/static/chunks/0lxvbkhh7amha.js +1 -0
  77. package/.next/standalone/apps/web/.next/static/chunks/0mqupo29wme26.js +7 -0
  78. package/.next/standalone/apps/web/.next/static/chunks/0rn1kcmsfzjmz.js +12 -0
  79. package/.next/standalone/apps/web/.next/static/chunks/0whl1y16cvn5q.js +1 -0
  80. package/.next/standalone/apps/web/.next/static/chunks/0z60ewb40i2ce.js +1 -0
  81. package/.next/standalone/apps/web/.next/static/chunks/0~qk-51yuw4mm.js +18 -0
  82. package/.next/standalone/apps/web/.next/static/chunks/{0v3hfoggxwsov.js → 149sia28cskw9.js} +1 -1
  83. package/.next/standalone/apps/web/.next/static/chunks/17~93fal1fw_d.js +5 -0
  84. package/dist/prisma/migrations/20261007000000_add_claude_profiles/migration.sql +10 -0
  85. package/dist/prisma/schema.prisma +9 -0
  86. package/dist/server/generated/prisma/browser.d.ts +5 -0
  87. package/dist/server/generated/prisma/client.d.ts +5 -0
  88. package/dist/server/generated/prisma/internal/class.d.ts +11 -0
  89. package/dist/server/generated/prisma/internal/class.js +4 -4
  90. package/dist/server/generated/prisma/internal/prismaNamespace.d.ts +83 -1
  91. package/dist/server/generated/prisma/internal/prismaNamespace.js +6 -0
  92. package/dist/server/generated/prisma/internal/prismaNamespaceBrowser.d.ts +7 -0
  93. package/dist/server/generated/prisma/internal/prismaNamespaceBrowser.js +6 -0
  94. package/dist/server/generated/prisma/models/ClaudeProfile.d.ts +939 -0
  95. package/dist/server/generated/prisma/models/ClaudeProfile.js +1 -0
  96. package/dist/server/generated/prisma/models.d.ts +1 -0
  97. package/dist/server/index.js +17 -0
  98. package/dist/server/lib/claude-config-guard.d.ts +7 -5
  99. package/dist/server/lib/claude-config-guard.js +31 -12
  100. package/dist/server/lib/claude-profiles.d.ts +49 -0
  101. package/dist/server/lib/claude-profiles.js +168 -0
  102. package/dist/server/lib/pty-env-sync.d.ts +12 -0
  103. package/dist/server/lib/pty-env-sync.js +139 -0
  104. package/dist/server/lib/pty-launch.d.ts +36 -0
  105. package/dist/server/lib/pty-launch.js +141 -0
  106. package/dist/server/lib/repositories/environment.js +8 -34
  107. package/dist/server/pty-manager.d.ts +23 -1
  108. package/dist/server/pty-manager.js +7 -1
  109. package/dist/server/routes/claude-profiles.d.ts +2 -0
  110. package/dist/server/routes/claude-profiles.js +138 -0
  111. package/dist/server/routes/env.js +25 -1
  112. package/dist/server/routes/onboarding.js +15 -6
  113. package/dist/server/routes/terminal.js +34 -120
  114. package/npm-shrinkwrap.json +2 -2
  115. package/package.json +1 -1
  116. package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__03~.ax1._.js +0 -3
  117. package/.next/standalone/apps/web/.next/server/chunks/ssr/_07i72iz._.js +0 -3
  118. package/.next/standalone/apps/web/.next/server/chunks/ssr/_09eooml._.js +0 -7
  119. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0bru-z.._.js +0 -3
  120. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0i8ojdw._.js +0 -14
  121. package/.next/standalone/apps/web/.next/server/chunks/ssr/_0mtw02l._.js +0 -3
  122. package/.next/standalone/apps/web/.next/server/chunks/ssr/_109pmo2._.js +0 -3
  123. package/.next/standalone/apps/web/.next/server/chunks/ssr/_12aa-fs._.js +0 -7
  124. package/.next/standalone/apps/web/.next/static/chunks/0.qz1zt1c.y.n.js +0 -5
  125. package/.next/standalone/apps/web/.next/static/chunks/01mfp5lo0gy.q.js +0 -23
  126. package/.next/standalone/apps/web/.next/static/chunks/0_by0zpp68~r7.js +0 -1
  127. package/.next/standalone/apps/web/.next/static/chunks/0ajw1mjy3owa4.js +0 -1
  128. package/.next/standalone/apps/web/.next/static/chunks/0fe4v5dh3whem.js +0 -5
  129. package/.next/standalone/apps/web/.next/static/chunks/0gzt~9euv6u2y.js +0 -12
  130. package/.next/standalone/apps/web/.next/static/chunks/0jcorj3-aambm.js +0 -1
  131. package/.next/standalone/apps/web/.next/static/chunks/0wnto9g4i0s3h.css +0 -4
  132. package/.next/standalone/apps/web/.next/static/chunks/0wzu~340lh7o~.js +0 -7
  133. package/.next/standalone/apps/web/.next/static/chunks/0xa_n_zp.qw-b.js +0 -1
  134. package/.next/standalone/apps/web/.next/static/chunks/0~_c.mwboavrv.js +0 -7
  135. /package/.next/standalone/apps/web/.next/static/{OXWK1FxsZh6lcEQawkL6h → Qv73X7lHL0PkQ5DtK6UEF}/_buildManifest.js +0 -0
  136. /package/.next/standalone/apps/web/.next/static/{OXWK1FxsZh6lcEQawkL6h → Qv73X7lHL0PkQ5DtK6UEF}/_clientMiddlewareManifest.js +0 -0
  137. /package/.next/standalone/apps/web/.next/static/{OXWK1FxsZh6lcEQawkL6h → Qv73X7lHL0PkQ5DtK6UEF}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},82458,e=>{"use strict";let t=(0,e.i(75254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},627,e=>{"use strict";var t=e.i(18050),r=e.i(71645);let n=(0,r.createContext)(void 0);function o(){return localStorage.getItem("theme")||"system"}e.s(["ThemeProvider",0,function({children:e}){let[i,u]=(0,r.useState)(o),[a,c]=(0,r.useState)("light");return(0,r.useEffect)(()=>{let e=window.matchMedia("(prefers-color-scheme: dark)"),t=document.documentElement,r=()=>{let r="system"===i?e.matches?"dark":"light":i;c(r),t.classList.toggle("dark","dark"===r)};r();let n=()=>{"system"===i&&r()};return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[i]),(0,t.jsx)(n.Provider,{value:{theme:i,setTheme:e=>{u(e),localStorage.setItem("theme",e),"system"===e?c(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):c(e)},effectiveTheme:a},children:e})},"useTheme",0,function(){let e=(0,r.useContext)(n);if(void 0===e)throw Error("useTheme must be used within a ThemeProvider");return e}])},88784,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e){return function t(){for(var r=this,n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}function i(e){return({}).toString.call(e).includes("Object")}function u(e){return"function"==typeof e}var a,c,l=o(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),s=function(e,t){return i(t)||l("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&l("changeField"),t},d=function(e){u(e)||l("selectorType")},f=function(e){u(e)||i(e)||l("handlerType"),i(e)&&Object.values(e).some(function(e){return!u(e)})&&l("handlersType")},h=function(e){e||l("initialIsRequired"),i(e)||l("initialType"),Object.keys(e).length||l("initialContent")};function p(e,t){return u(t)?t(e.current):t}function g(e,t){return e.current=n(n({},e.current),t),t}function m(e,t,r){return u(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var v={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},y=(a=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.length>=a.length?a.apply(this,n):function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(t,[].concat(n,o))}})(v),b=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},w={type:"cancelation",msg:"operation is manually canceled"};function j(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(w):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var M=function(e){if(Array.isArray(e))return e}(c=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(e),f(t);var r={current:e},n=o(m)(r,t),i=o(g)(r),u=o(s)(e),a=o(p)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return d(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,i,u,a)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,u=[],a=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(a=(r=o.call(t)).done)&&(u.push(r.value),2!==u.length);a=!0);}catch(e){c=!0,n=e}finally{try{if(!a&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return u}}(c)||function(e){if(e){if("string"==typeof e)return t(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,2):void 0}}(c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),E=M[0],O=M[1];function x(e){return document.body.appendChild(e)}function k(e){var t,r,n=E(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return o.onload=function(){return e()},o.onerror=n.reject,o}function C(){var e=E(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;T(r),e.resolve(r)},function(t){e.reject(t)})}function T(e){E().monaco||O({monaco:e})}var S=new Promise(function(e,t){return O({resolve:e,reject:t})}),P=function(){var e=E(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(O({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),j(S);if(window.monaco&&window.monaco.editor)return T(window.monaco),e.resolve(window.monaco),j(S);b(x,k)(C)}return j(S)},R=e.i(71645),L={display:"flex",position:"relative",textAlign:"initial"},N={width:"100%"},V={display:"none"},z={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},A=function({children:e}){return R.default.createElement("div",{style:z},e)},I=(0,R.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:u}){return R.default.createElement("section",{style:{...L,width:e,height:t},...u},!r&&R.default.createElement(A,null,n),R.default.createElement("div",{ref:o,style:{...N,...!r&&V},className:i}))}),D=function(e){(0,R.useEffect)(e,[])},q=function(e,t,r=!0){let n=(0,R.useRef)(!0);(0,R.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function B(){}function F(e,t,r,n){var o,i,u,a,c,l;return o=e,i=n,o.editor.getModel(U(o,i))||(u=e,a=t,c=r,l=n,u.editor.createModel(a,c,l?U(u,l):void 0))}function U(e,t){return e.Uri.parse(t)}(0,R.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:u,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:c=!1,theme:l="light",loading:s="Loading...",options:d={},height:f="100%",width:h="100%",className:p,wrapperProps:g={},beforeMount:m=B,onMount:v=B}){let[y,b]=(0,R.useState)(!1),[w,j]=(0,R.useState)(!0),M=(0,R.useRef)(null),E=(0,R.useRef)(null),O=(0,R.useRef)(null),x=(0,R.useRef)(v),k=(0,R.useRef)(m),C=(0,R.useRef)(!1);D(()=>{let e=P();return e.then(e=>(E.current=e)&&j(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return M.current?(t=M.current?.getModel(),void(a||t?.original?.dispose(),c||t?.modified?.dispose(),M.current?.dispose())):e.cancel()}}),q(()=>{if(M.current&&E.current){let t=M.current.getOriginalEditor(),o=F(E.current,e||"",n||r||"text",i||"");o!==t.getModel()&&t.setModel(o)}},[i],y),q(()=>{if(M.current&&E.current){let e=M.current.getModifiedEditor(),n=F(E.current,t||"",o||r||"text",u||"");n!==e.getModel()&&e.setModel(n)}},[u],y),q(()=>{let e=M.current.getModifiedEditor();e.getOption(E.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),q(()=>{M.current?.getModel()?.original.setValue(e||"")},[e],y),q(()=>{let{original:e,modified:t}=M.current.getModel();E.current.editor.setModelLanguage(e,n||r||"text"),E.current.editor.setModelLanguage(t,o||r||"text")},[r,n,o],y),q(()=>{E.current?.editor.setTheme(l)},[l],y),q(()=>{M.current?.updateOptions(d)},[d],y);let T=(0,R.useCallback)(()=>{if(!E.current)return;k.current(E.current);let a=F(E.current,e||"",n||r||"text",i||""),c=F(E.current,t||"",o||r||"text",u||"");M.current?.setModel({original:a,modified:c})},[r,t,o,e,n,i,u]),S=(0,R.useCallback)(()=>{!C.current&&O.current&&(M.current=E.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...d}),T(),E.current?.editor.setTheme(l),b(!0),C.current=!0)},[d,l,T]);return(0,R.useEffect)(()=>{y&&x.current(M.current,E.current)},[y]),(0,R.useEffect)(()=>{w||y||S()},[w,y,S]),R.default.createElement(I,{width:h,height:f,isEditorReady:y,loading:s,_ref:O,className:p,wrapperProps:g})});var K=function(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current},_=new Map,$=(0,R.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:u="light",line:a,loading:c="Loading...",options:l={},overrideServices:s={},saveViewState:d=!0,keepCurrentModel:f=!1,width:h="100%",height:p="100%",className:g,wrapperProps:m={},beforeMount:v=B,onMount:y=B,onChange:b,onValidate:w=B}){let[j,M]=(0,R.useState)(!1),[E,O]=(0,R.useState)(!0),x=(0,R.useRef)(null),k=(0,R.useRef)(null),C=(0,R.useRef)(null),T=(0,R.useRef)(y),S=(0,R.useRef)(v),L=(0,R.useRef)(),N=(0,R.useRef)(n),V=K(i),z=(0,R.useRef)(!1),A=(0,R.useRef)(!1);D(()=>{let e=P();return e.then(e=>(x.current=e)&&O(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>k.current?void(L.current?.dispose(),f?d&&_.set(i,k.current.saveViewState()):k.current.getModel()?.dispose(),k.current.dispose()):e.cancel()}),q(()=>{let u=F(x.current,e||n||"",t||o||"",i||r||"");u!==k.current?.getModel()&&(d&&_.set(V,k.current?.saveViewState()),k.current?.setModel(u),d&&k.current?.restoreViewState(_.get(i)))},[i],j),q(()=>{k.current?.updateOptions(l)},[l],j),q(()=>{k.current&&void 0!==n&&(k.current.getOption(x.current.editor.EditorOption.readOnly)?k.current.setValue(n):n!==k.current.getValue()&&(A.current=!0,k.current.executeEdits("",[{range:k.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),k.current.pushUndoStop(),A.current=!1))},[n],j),q(()=>{let e=k.current?.getModel();e&&o&&x.current?.editor.setModelLanguage(e,o)},[o],j),q(()=>{void 0!==a&&k.current?.revealLine(a)},[a],j),q(()=>{x.current?.editor.setTheme(u)},[u],j);let U=(0,R.useCallback)(()=>{if(!(!C.current||!x.current)&&!z.current){S.current(x.current);let c=i||r,f=F(x.current,n||e||"",t||o||"",c||"");k.current=x.current?.editor.create(C.current,{model:f,automaticLayout:!0,...l},s),d&&k.current.restoreViewState(_.get(c)),x.current.editor.setTheme(u),void 0!==a&&k.current.revealLine(a),M(!0),z.current=!0}},[e,t,r,n,o,i,l,s,d,u,a]);return(0,R.useEffect)(()=>{j&&T.current(k.current,x.current)},[j]),(0,R.useEffect)(()=>{E||j||U()},[E,j,U]),N.current=n,(0,R.useEffect)(()=>{j&&b&&(L.current?.dispose(),L.current=k.current?.onDidChangeModelContent(e=>{A.current||b(k.current.getValue(),e)}))},[j,b]),(0,R.useEffect)(()=>{if(j){let e=x.current.editor.onDidChangeMarkers(e=>{let t=k.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=x.current.editor.getModelMarkers({resource:t});w?.(e)}});return()=>{e?.dispose()}}return()=>{}},[j,w]),R.default.createElement(I,{width:h,height:p,isEditorReady:j,loading:c,_ref:C,className:g,wrapperProps:m})});e.s(["Editor",0,$],88784)},12382,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(88784),o=e.i(627),i=e.i(68995),u=e.i(85902);let a="u">typeof navigator&&/Mac/.test(navigator.platform);function c(e){let t=e.getModel();if(!t)return;let r=t.getLineCount(),n=t.getLineMaxColumn(r);e.setPosition({lineNumber:r,column:n})}e.s(["MonacoEditorModal",0,function({open:e,onOpenChange:l,onSubmit:s,initialValue:d="",title:f="Editor",submitLabel:h="Submit",language:p="plaintext"}){let g=(0,r.useRef)(null),m=(0,r.useRef)(()=>{}),v=(0,r.useRef)(()=>{}),y=(0,r.useRef)(e),[b,w]=(0,r.useState)(!1),{effectiveTheme:j}=(0,o.useTheme)();function M(){s(g.current?.getValue()??"")}function E(){g.current?.setValue(""),l({open:!1})}return(0,r.useLayoutEffect)(()=>{m.current=M,v.current=E,y.current=e}),(0,r.useEffect)(()=>{if(!e||!g.current)return;g.current.setValue(d??""),c(g.current),g.current.layout();let t=setTimeout(()=>{y.current&&(g.current?.layout(),g.current?.focus())},50);return()=>clearTimeout(t)},[e,d]),(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e.open||(g.current?.setValue(""),l(e))},title:f,maxWidth:"4xl",showCloseButton:!0,trapFocus:!1,restoreFocus:!1,dismissOnEsc:!b,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"border border-border rounded overflow-hidden",style:{height:"clamp(200px, 50vh, 600px)"},children:(0,t.jsx)(n.Editor,{height:"100%",defaultLanguage:p,defaultValue:"",onMount:(e,t)=>{g.current=e,e.setValue(d??""),c(e),e.onDidLayoutChange(()=>{y.current&&!e.hasTextFocus()&&e.focus()}),e.onDidFocusEditorText(()=>w(!0)),e.onDidBlurEditorText(()=>w(!1)),e.layout(),e.focus(),e.onKeyDown(e=>{e.keyCode===t.KeyCode.Enter&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.stopPropagation(),m.current())})},options:{minimap:{enabled:!1},lineNumbers:"on",wordWrap:"on",fontSize:13,scrollBeyondLastLine:!1},theme:"dark"===j?"vs-dark":"vs-light"})}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[a?"Cmd+Enter":"Ctrl+Enter"," で",h]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(u.Button,{variant:"outline",size:"lg",onClick:E,children:"Cancel"}),(0,t.jsx)(u.Button,{size:"lg",onClick:M,children:h})]})]})})}])},57787,e=>{"use strict";e.s(["ConnectionStatus",0,function(){return null}])},29024,e=>{"use strict";var t=e.i(18050),r=e.i(627),n=e.i(85699),o=e.i(23287),o=o,i=e.i(75254);let u=(0,i.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var a=e.i(82458),a=a;let c=(0,i.default)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var l=e.i(17521),l=l;let s=({...e})=>{let{effectiveTheme:i}=(0,r.useTheme)();return(0,t.jsx)(n.Toaster,{theme:i,className:"toaster group",icons:{success:(0,t.jsx)(o.default,{className:"size-4"}),info:(0,t.jsx)(u,{className:"size-4"}),warning:(0,t.jsx)(a.default,{className:"size-4"}),error:(0,t.jsx)(c,{className:"size-4"}),loading:(0,t.jsx)(l.default,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})};e.s(["ToastProvider",0,function(){return(0,t.jsx)(s,{position:"bottom-right",richColors:!0,closeButton:!0})}],29024)},67570,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(12382),o=e.i(70935);e.s(["EditorSessionProvider",0,function(){let[e,i]=(0,r.useState)(null);(0,r.useEffect)(()=>{function e(e){let{sessionId:t,content:r}=e.detail;i({sessionId:t,content:r})}return window.addEventListener("editor-session-open-request",e),()=>{window.removeEventListener("editor-session-open-request",e)}},[]);let u=(0,r.useRef)(null);async function a(t){e&&(await fetch((0,o.apiUrl)(`/api/editor/session/${e.sessionId}/complete`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})}),i(null))}async function c(){e&&(await fetch((0,o.apiUrl)(`/api/editor/session/${e.sessionId}/complete`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e.content})}),i(null))}return(0,r.useEffect)(()=>{let t=u.current;null===t&&null!==e&&window.dispatchEvent(new CustomEvent("editor-session-open")),null!==t&&null===e&&window.dispatchEvent(new CustomEvent("editor-session-done")),u.current=e},[e]),(0,t.jsx)(n.MonacoEditorModal,{open:null!==e,onOpenChange:e=>{e.open||c()},onSubmit:a,initialValue:e?.content??"",title:"Edit Prompt",submitLabel:"Submit"})}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18566,(e,t,a)=>{t.exports=e.r(76562)},31278,e=>{"use strict";var t=e.i(17521);e.s(["Loader2",()=>t.default])},95468,e=>{"use strict";var t=e.i(23287);e.s(["CheckCircle2",()=>t.default])},7347,e=>{"use strict";var t=e.i(19805),a=e.i(27601),r=e.i(25913),i=e.i(52088);let l=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",render:c,...d}){var n;return n={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(l({variant:r}),e)},d),render:c,state:{slot:"badge",variant:r}},(0,a.useRenderElement)(n.defaultTagName??"div",n,n)}],7347)},55716,e=>{"use strict";let t=(0,e.i(75254).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",0,t],55716)},7233,5352,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7233);let a=[{bg:"bg-blue-100 dark:bg-blue-900/30",text:"text-blue-700 dark:text-blue-300"},{bg:"bg-emerald-100 dark:bg-emerald-900/30",text:"text-emerald-700 dark:text-emerald-300"},{bg:"bg-violet-100 dark:bg-violet-900/30",text:"text-violet-700 dark:text-violet-300"},{bg:"bg-amber-100 dark:bg-amber-900/30",text:"text-amber-700 dark:text-amber-300"},{bg:"bg-rose-100 dark:bg-rose-900/30",text:"text-rose-700 dark:text-rose-300"},{bg:"bg-cyan-100 dark:bg-cyan-900/30",text:"text-cyan-700 dark:text-cyan-300"},{bg:"bg-orange-100 dark:bg-orange-900/30",text:"text-orange-700 dark:text-orange-300"},{bg:"bg-teal-100 dark:bg-teal-900/30",text:"text-teal-700 dark:text-teal-300"},{bg:"bg-indigo-100 dark:bg-indigo-900/30",text:"text-indigo-700 dark:text-indigo-300"},{bg:"bg-pink-100 dark:bg-pink-900/30",text:"text-pink-700 dark:text-pink-300"},{bg:"bg-lime-100 dark:bg-lime-900/30",text:"text-lime-700 dark:text-lime-300"},{bg:"bg-fuchsia-100 dark:bg-fuchsia-900/30",text:"text-fuchsia-700 dark:text-fuchsia-300"}];e.s(["getRepoColor",0,function(e,t){let r=function(e){let t=5381;for(let a=0;a<e.length;a++)t=33*t^e.charCodeAt(a);return t>>>0}(`${e}/${t}`)%a.length;return a[r]}],5352)},16715,e=>{"use strict";let t=(0,e.i(75254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},471,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],471)},46349,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},88699,87951,e=>{"use strict";var t=e.i(75254);let a=(0,t.default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,a],88699);let r=(0,t.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",0,r],87951)},19728,e=>{"use strict";e.s(["VOICE_INPUT_ENABLED_STORAGE_KEY",0,"tsunagi:voice-input-enabled","WHISPER_PROMPT_STORAGE_KEY",0,"tsunagi:whisper-prompt"])},66992,e=>{"use strict";let t=(0,e.i(75254).default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);e.s(["Cpu",0,t],66992)},31343,e=>{"use strict";let t=(0,e.i(75254).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],31343)},93355,e=>{"use strict";var t=e.i(18050),a=e.i(66992);function r(e){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,t.jsx)("path",{d:"M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z"})})}function i(e){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,t.jsx)("path",{d:"M14.025 0c3.492 0 5.237 0 6.571.68a6.24 6.24 0 0 1 2.725 2.724C24 4.738 24 6.484 24 9.975v4.05c0 3.492 0 5.237-.68 6.571a6.24 6.24 0 0 1-2.724 2.725c-1.334.679-3.08.679-6.571.679h-4.05c-3.492 0-5.237 0-6.571-.68A6.24 6.24 0 0 1 .68 20.597C0 19.262 0 17.516 0 14.025v-4.05c0-3.492 0-5.237.68-6.571A6.23 6.23 0 0 1 3.404.68C4.738 0 6.484 0 9.975 0zM7.688 16.313a1.313 1.313 0 0 0 0 2.625h11.625a1.313 1.313 0 0 0 0-2.625zm-3-3.75a1.313 1.313 0 0 0 0 2.624h11.625a1.313 1.313 0 0 0 0-2.624zm3-3.75a1.313 1.313 0 0 0 0 2.624h11.625a1.313 1.313 0 0 0 0-2.624zm-3-3.75a1.313 1.313 0 0 0 0 2.625h11.625a1.313 1.313 0 0 0 0-2.625z"})})}let l={ollama:r,lmstudio:i};function c({provider:e,...a}){let r=l[e];return(0,t.jsx)(r,{...a})}e.s(["ClaudeIcon",0,function(e){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,t.jsx)("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})})},"LmStudioIcon",0,i,"LocalLlmIcon",0,c,"LocalLlmTabIcon",0,function({provider:e,className:r}){return e?(0,t.jsx)(c,{provider:e,className:r}):(0,t.jsx)(a.Cpu,{className:r})},"OllamaIcon",0,r])},38078,e=>{"use strict";var t=e.i(71645),a=e.i(70935);function r(e){let[r,i]=(0,t.useState)(null),l=(0,t.useCallback)(async()=>{try{let t=await fetch((0,a.apiUrl)(`/api/settings/${e}`));if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();i(r.data)}catch(t){console.error(`Failed to fetch ${e} settings:`,t),i(null)}},[e]);return(0,t.useEffect)(()=>{l()},[l]),{settings:r,setSettings:i,reload:l}}e.s(["useLmStudioSettings",0,function(){return r("lmstudio")},"useLocalLlmSettings",0,function(){return r("local-llm")},"useOllamaSettings",0,function(){return r("ollama")}])},64691,e=>{"use strict";let t={ollama:"Ollama",lmstudio:"LM Studio"};e.s(["LOCAL_LLM_PROVIDER_LABEL",0,t,"localLlmTabLabel",0,function(e){return e?t[e]:"ローカルLLM"}])}]);
@@ -1,5 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43531,78745,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t],78745),e.s(["Check",0,t],43531)},86536,e=>{"use strict";let t=(0,e.i(75254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],86536)},27612,e=>{"use strict";let t=(0,e.i(75254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],27612)},10012,24564,94349,e=>{"use strict";var t,n=e.i(18050);e.i(47167);var r=e.i(71645);e.s([],19485),e.i(19485);var i=e.i(76477),o=e.i(67805),a=e.i(17514);let l=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),s={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},u={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},c={disabled:!1,...u},d={valid:e=>null===e?null:e?{[l.valid]:""}:{[l.invalid]:""}},f=r.createContext({invalid:void 0,name:void 0,validityData:{state:s,errors:[],error:"",value:"",initialValue:null},setValidityData:a.NOOP,disabled:void 0,touched:u.touched,setTouched:a.NOOP,dirty:u.dirty,setDirty:a.NOOP,filled:u.filled,setFilled:a.NOOP,focused:u.focused,setFocused:a.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:c,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=a.EMPTY_OBJECT)=>e,getInputValidationProps:(e=a.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});function p(e=!0){let t=r.useContext(f);if(t.setValidityData===a.NOOP&&!e)throw Error((0,o.default)(28));return t}let m=r.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0}),g=r.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:a.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function v(){return r.useContext(g)}var h=e.i(30628),y=e.i(19805),b=e.i(89879);let x=r.createContext({controlId:void 0,registerControlId:a.NOOP,labelId:void 0,setLabelId:a.NOOP,messageIds:[],setMessageIds:a.NOOP,getDescriptionProps:e=>e});function E(){return r.useContext(x)}let w=function(e){let t=(0,b.useBaseUiId)(),o=void 0===e.controlId?t:e.controlId,[a,l]=r.useState(o),[s,u]=r.useState(e.labelId),[c,d]=r.useState([]),f=(0,h.useRefWithInit)(()=>new Map),{messageIds:p}=E(),m=(0,i.useStableCallback)((e,t)=>{let n=f.current;void 0===t?n.delete(e):(n.set(e,t),l(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}}))}),g=r.useCallback(e=>(0,y.mergeProps)({"aria-describedby":p.concat(c).join(" ")||void 0},e),[p,c]),v=r.useMemo(()=>({controlId:a,registerControlId:m,labelId:s,setLabelId:u,messageIds:c,setMessageIds:d,getDescriptionProps:g}),[a,m,s,u,c,d,g]);return(0,n.jsx)(x.Provider,{value:v,children:e.children})};var S=e.i(27601),C=e.i(66745);function R(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}let O=Object.keys(s),k=r.forwardRef(function(e,t){let{errors:l,validationMode:u,submitAttemptedRef:c}=v(),{render:p,className:g,validate:h,validationDebounceTime:b=0,validationMode:x=u,name:w,disabled:k=!1,invalid:T,dirty:N,touched:A,actionsRef:P,...M}=e,{disabled:I}=function(e=!1){let t=r.useContext(m);if(!t&&!e)throw Error((0,o.default)(86));return t}(),j=(0,i.useStableCallback)(h||(()=>null)),L=I||k,[D,F]=r.useState(!1),[V,$]=r.useState(!1),[_,B]=r.useState(!1),[W,H]=r.useState(!1),z=N??V,U=A??D,K=r.useRef(!1),Y=(0,i.useStableCallback)(e=>{void 0===N&&(e&&(K.current=!0),$(e))}),q=(0,i.useStableCallback)(e=>{void 0===A&&F(e)}),X=(0,i.useStableCallback)(()=>"onChange"===x||"onSubmit"===x&&c.current),G=!!w&&Object.hasOwn(l,w)&&void 0!==l[w],J=!0===T||G,[Z,Q]=r.useState({state:s,error:"",errors:[],value:null,initialValue:null}),ee=!J&&Z.state.valid,et=r.useMemo(()=>({disabled:L,touched:U,dirty:z,valid:ee,filled:_,focused:W}),[L,U,z,ee,_,W]),en=function(e){let{formRef:t,clearErrors:n}=v(),{setValidityData:o,validate:l,validityData:u,validationDebounceTime:c,invalid:d,markedDirtyRef:f,state:p,name:m,shouldValidateOnChange:g}=e,{controlId:h,getDescriptionProps:b}=E(),x=(0,C.useTimeout)(),w=r.useRef(null),S=(0,i.useStableCallback)(async(e,n=!1)=>{let r,i=w.current;if(!i)return;if(n){if(!1!==p.valid)return;let n=i.validity;if(!n.valueMissing){let n={value:e,state:{...s,valid:!0},error:"",errors:[],initialValue:u.initialValue};if(i.setCustomValidity(""),h){let e=t.current.fields.get(h);e&&t.current.fields.set(h,{...e,...R(n,!1)})}o(n);return}let r=O.reduce((e,t)=>(e[t]=n[t],e),{});if(!r.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of O)"valid"!==n&&("valueMissing"===n&&(t=e[n]),e[n]&&(t=!1));return t}(r))return}x.clear();let a=null,c=[],m=function(e){let t=O.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of O)if("valid"!==e){if("valueMissing"===e&&t[e])n=!0;else if(t[e])return t}return n&&!f.current&&(t.valid=!0,t.valueMissing=!1),t}(i),v=g();if(i.validationMessage&&!v)r=i.validationMessage,c=[i.validationMessage];else{let n=l(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(a="object"==typeof n&&null!==n&&"then"in n?await n:n)?(m.valid=!1,m.customError=!0,Array.isArray(a)?(c=a,i.setCustomValidity(a.join("\n"))):a&&(c=[a],i.setCustomValidity(a))):v&&(i.setCustomValidity(""),m.customError=!1,i.validationMessage?(r=i.validationMessage,c=[i.validationMessage]):i.validity.valid&&!m.valid&&(m.valid=!0))}let y={value:e,state:m,error:r??(Array.isArray(a)?a[0]:a??""),errors:c,initialValue:u.initialValue};if(h){let e=t.current.fields.get(h);e&&t.current.fields.set(h,{...e,...R(y,d)})}o(y)}),k=r.useCallback((e={})=>(0,y.mergeProps)(b,!1===p.valid?{"aria-invalid":!0}:a.EMPTY_OBJECT,e),[b,p.valid]),T=r.useCallback((e={})=>(0,y.mergeProps)({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(m),!g())return void S(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?S(t.value):(x.clear(),c?x.start(c,()=>{S(t.value)}):S(t.value))}},k(e)),[k,n,m,x,S,c,g]);return r.useMemo(()=>({getValidationProps:k,getInputValidationProps:T,inputRef:w,commit:S}),[k,T,S])}({setValidityData:Q,validate:j,validityData:Z,validationDebounceTime:b,invalid:J,markedDirtyRef:K,state:et,name:w,shouldValidateOnChange:X}),er=r.useCallback(()=>{K.current=!0,en.commit(Z.value)},[en,Z]);r.useImperativeHandle(P,()=>({validate:er}),[er]);let ei=r.useMemo(()=>({invalid:J,name:w,validityData:Z,setValidityData:Q,disabled:L,touched:U,setTouched:q,dirty:z,setDirty:Y,filled:_,setFilled:B,focused:W,setFocused:H,validate:j,validationMode:x,validationDebounceTime:b,shouldValidateOnChange:X,state:et,markedDirtyRef:K,validation:en}),[J,w,Z,L,U,q,z,Y,_,B,W,H,j,x,b,X,et,en]),eo=(0,S.useRenderElement)("div",e,{ref:t,state:et,props:M,stateAttributesMapping:d});return(0,n.jsx)(f.Provider,{value:ei,children:eo})}),T=r.forwardRef(function(e,t){return(0,n.jsx)(w,{children:(0,n.jsx)(k,{...e,ref:t})})});var N=e.i(29315),A=e.i(90219),P=e.i(47857),M=e.i(977);function I(e,t){let n=(0,b.useBaseUiId)(e);return(0,M.useIsoLayoutEffect)(()=>(t(n),()=>{t(void 0)}),[n,t]),n}e.s(["useRegisteredLabelId",0,I],24564);let j=r.forwardRef(function(e,t){let{render:n,className:o,id:a,nativeLabel:l=!0,...s}=e,u=p(!1),{labelId:c}=E(),f=r.useRef(null),m=function(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:o,focusControl:a}=e,{controlId:l,setLabelId:s}=E(),u=I(t,(0,i.useStableCallback)(e=>{s(e),o?.(e)})),c=l??n;function d(e){let t=(0,P.getTarget)(e.nativeEvent);t?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),r||function(e){if(a)return a(e,c);if(!c)return;let t=(0,A.ownerDocument)(e.currentTarget).getElementById(c);(0,N.isHTMLElement)(t)&&t.focus({focusVisible:!0})}(e))}return r?{id:u,htmlFor:c??void 0,onMouseDown:d}:{id:u,onClick:d,onPointerDown(e){e.preventDefault()}}}({id:c??a,native:l});return(0,S.useRenderElement)("label",e,{ref:[t,f],state:u.state,props:[m,s],stateAttributesMapping:d})});var L=e.i(89269),D=e.i(84759),F=e.i(88841);let V={...d,...D.transitionStatusMapping},$=r.forwardRef(function(e,t){let{render:i,id:o,className:a,match:l,...s}=e,u=(0,b.useBaseUiId)(o),{validityData:c,state:d,name:f}=p(!1),{setMessageIds:m}=E(),{errors:g}=v(),h=f?g[f]:null,y=!1;y=!!h||!0===l||(l?!!c.state[l]:!1===c.state.valid);let{mounted:x,transitionStatus:w,setMounted:C}=(0,F.useTransitionStatus)(y);(0,M.useIsoLayoutEffect)(()=>{if(y&&u)return m(e=>e.concat(u)),()=>{m(e=>e.filter(e=>e!==u))}},[y,u,m]);let R=r.useRef(null),[O,k]=r.useState(null),[T,N]=r.useState(null),A=h||(c.errors.length>1?(0,n.jsx)("ul",{children:c.errors.map(e=>(0,n.jsx)("li",{children:e},e))}):c.error),P=c.error;null!=h?P=Array.isArray(h)?JSON.stringify(h):h:c.errors.length>1&&(P=JSON.stringify(c.errors)),y&&P!==T&&(N(P),k(A)),(0,L.useOpenChangeComplete)({open:y,ref:R,onComplete(){y||C(!1)}});let I={...d,transitionStatus:w},j=(0,S.useRenderElement)("div",e,{ref:[t,R],state:I,props:[{id:u,children:y?A:O},s],stateAttributesMapping:V,enabled:x});return x?j:null}),_=r.forwardRef(function(e,t){let{render:n,id:r,className:i,...o}=e,a=(0,b.useBaseUiId)(r),l=p(!1),{setMessageIds:s}=E();return(0,M.useIsoLayoutEffect)(()=>{if(a)return s(e=>e.concat(a)),()=>{s(e=>e.filter(e=>e!==a))}},[a,s]),(0,S.useRenderElement)("p",e,{ref:t,state:l.state,props:[{id:a},o],stateAttributesMapping:d})});function B({controlled:e,default:t,name:n,state:i="value"}){let{current:o}=r.useRef(void 0!==e),[a,l]=r.useState(t),s=r.useCallback(e=>{o||l(e)},[]);return[o?e:a,s]}e.s(["useControlled",0,B],94349);var W=e.i(74080),H=e.i(5963),z=e.i(3404);let U=r.forwardRef(function(e,t){let{render:n,className:o,id:l,name:s,value:u,disabled:c=!1,onValueChange:f,defaultValue:m,autoFocus:g=!1,...y}=e,{state:x,name:w,disabled:C,setTouched:O,setDirty:k,validityData:T,setFocused:I,setFilled:j,validationMode:L,validation:D}=p(),F=C||c,V=w??s,$={...x,disabled:F},{labelId:_}=E(),U=function(e={}){let{id:t,implicit:n=!1,controlRef:o}=e,{controlId:l,registerControlId:s}=E(),u=(0,b.useBaseUiId)(t),c=n?l:void 0,d=(0,h.useRefWithInit)(()=>Symbol("labelable-control")),f=r.useRef(!1),p=r.useRef(null!=t),m=(0,i.useStableCallback)(()=>{f.current&&s!==a.NOOP&&(f.current=!1,s(d.current,void 0))});return(0,M.useIsoLayoutEffect)(()=>{let e;if(s!==a.NOOP){if(n){let n=o?.current;e=(0,N.isElement)(n)&&null!=n.closest("label")?t??null:c??u}else if(null!=t)p.current=!0,e=t;else{if(!p.current)return void m();e=u}if(void 0===e)return void m();f.current=!0,s(d.current,e)}},[t,o,c,s,n,u,d,m]),r.useEffect(()=>m,[m]),l??u}({id:l});(0,M.useIsoLayoutEffect)(()=>{let e=null!=u;D.inputRef.current?.value||e&&""!==u?j(!0):e&&""===u&&j(!1)},[D.inputRef,j,u]);let K=r.useRef(null);(0,M.useIsoLayoutEffect)(()=>{g&&K.current===(0,P.activeElement)((0,A.ownerDocument)(K.current))&&I(!0)},[g,I]);let[Y]=B({controlled:u,default:m,name:"FieldControl",state:"value"}),q=void 0!==u,X=q?Y:void 0;return!function(e){let{enabled:t=!0,value:n,id:r,name:o,controlRef:a,commit:l}=e,{formRef:s}=v(),{invalid:u,markedDirtyRef:c,validityData:d,setValidityData:f}=p(),m=(0,i.useStableCallback)(e.getValue);(0,M.useIsoLayoutEffect)(()=>{if(!t)return;let e=n;void 0===e&&(e=m()),null===d.initialValue&&null!==e&&f(t=>({...t,initialValue:e}))},[t,f,n,d.initialValue,m]),(0,M.useIsoLayoutEffect)(()=>{t&&r&&s.current.fields.set(r,{getValue:m,name:o,controlRef:a,validityData:R(d,u),validate(e=!0){let t=n;void 0===t&&(t=m()),c.current=!0,e?W.flushSync(()=>l(t)):l(t)}})},[l,a,t,s,m,r,u,c,o,d,n]),(0,M.useIsoLayoutEffect)(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}({id:U,name:V,commit:D.commit,value:X,getValue:()=>D.inputRef.current?.value,controlRef:D.inputRef}),(0,S.useRenderElement)("input",e,{ref:[t,K],state:$,props:[{id:U,disabled:F,name:V,ref:D.inputRef,"aria-labelledby":_,autoFocus:g,...q?{value:X}:{defaultValue:m},onChange(e){let t=e.currentTarget.value;f?.(t,(0,H.createChangeEventDetails)(z.REASONS.none,e.nativeEvent)),k(t!==T.initialValue),j(""!==t)},onFocus(){I(!0)},onBlur(e){O(!0),I(!1),"onBlur"===L&&D.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(O(!0),D.commit(e.currentTarget.value))}},D.getInputValidationProps(),y],stateAttributesMapping:d})}),K=r.createContext({disabled:!1}),Y=r.createContext(void 0),q=r.forwardRef(function(e,t){let{render:i,className:a,disabled:l=!1,...s}=e,{state:u,disabled:c}=p(!1),f=c||l,m=function(e=!0){let t=r.useContext(Y);if(void 0===t&&!e)throw Error((0,o.default)(3));return t}(),g=m?.parent.id,v=m?.allValues!==void 0,h=r.useMemo(()=>({disabled:f}),[f]),y=(0,S.useRenderElement)("div",e,{ref:t,state:u,props:s,stateAttributesMapping:d});return(0,n.jsx)(w,{controlId:v?g:void 0,children:(0,n.jsx)(K.Provider,{value:h,children:y})})});e.s(["Control",0,U,"Description",0,_,"Error",0,$,"Item",0,q,"Label",0,j,"Root",0,T,"Validity",0,function(e){let{children:t}=e,{validityData:i,invalid:o}=p(!1),a=r.useMemo(()=>R(i,o),[i,o]),l=!1===a.state.valid,{transitionStatus:s}=(0,F.useTransitionStatus)(l),u=r.useMemo(()=>({...a,validity:a.state,transitionStatus:s}),[a,s]);return(0,n.jsx)(r.Fragment,{children:t(u)})}],71975);var X=e.i(71975),X=X;let G=r.forwardRef(function(e,t){return(0,n.jsx)(X.Control,{ref:t,...e})});var J=e.i(52088);e.s(["Input",0,function({className:e,type:t,...r}){return(0,n.jsx)(G,{type:t,"data-slot":"input",className:(0,J.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-input/20 px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r})}],10012)},37870,e=>{"use strict";var t=e.i(18050),n=e.i(31278);e.s(["LoadingSpinner",0,function({size:e="md",message:r}){return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)(n.Loader2,{className:`${{sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12"}[e]} text-primary animate-spin`}),r&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:r})]})}])},63209,e=>{"use strict";let t=(0,e.i(75254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},77814,e=>{"use strict";var t,n=e.i(18050);e.s([],33847),e.i(33847),e.i(47167);var r=e.i(71645),i=e.i(231),o=e.i(62372);let a=new Map;function l(e,t,n){return null==e?"":(function(e,t){let n=JSON.stringify({locale:e,options:t}),r=a.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return a.set(n,i),i})(t,n).format(e)}var s=e.i(27601),u=e.i(67805);let c=r.createContext(void 0);function d(){let e=r.useContext(c);if(void 0===e)throw Error((0,u.default)(51));return e}let f=((t={}).complete="data-complete",t.indeterminate="data-indeterminate",t.progressing="data-progressing",t),p={status:e=>"progressing"===e?{[f.progressing]:""}:"complete"===e?{[f.complete]:""}:"indeterminate"===e?{[f.indeterminate]:""}:null};function m(e,t){return null==t?"indeterminate progress":e||`${t}%`}let g=r.forwardRef(function(e,t){var a;let{format:u,getAriaValueText:d=m,locale:f,max:g=100,min:v=0,value:h,render:y,className:b,children:x,...E}=e,[w,S]=r.useState(),C=(0,i.useValueAsRef)(u),R="indeterminate";Number.isFinite(h)&&(R=h===g?"complete":"progressing");let O=(a=C.current,null==h?"":a?l(h,f,a):l(h/100,f,{style:"percent"})),k=r.useMemo(()=>({status:R}),[R]),T={"aria-labelledby":w,"aria-valuemax":g,"aria-valuemin":v,"aria-valuenow":h??void 0,"aria-valuetext":d(O,h),role:"progressbar",children:(0,n.jsxs)(r.Fragment,{children:[x,(0,n.jsx)("span",{role:"presentation",style:o.visuallyHidden,children:"x"})]})},N=r.useMemo(()=>({formattedValue:O,max:g,min:v,setLabelId:S,state:k,status:R,value:h}),[O,g,v,S,k,R,h]),A=(0,s.useRenderElement)("div",e,{state:k,ref:t,props:[T,E],stateAttributesMapping:p});return(0,n.jsx)(c.Provider,{value:N,children:A})}),v=r.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{state:o}=d();return(0,s.useRenderElement)("div",e,{state:o,ref:t,props:i,stateAttributesMapping:p})}),h=r.forwardRef(function(e,t){let{render:n,className:i,...o}=e,{max:a,min:l,value:u,state:c}=d(),f=Number.isFinite(u)&&null!==u?(u-l)*100/(a-l):null,m=r.useCallback(()=>null==f?{}:{insetInlineStart:0,height:"inherit",width:`${f}%`},[f]);return(0,s.useRenderElement)("div",e,{state:c,ref:t,props:[{style:m()},o],stateAttributesMapping:p})}),y=r.forwardRef(function(e,t){let{className:n,render:r,children:i,...o}=e,{value:a,formattedValue:l,state:u}=d(),c=null==a?"indeterminate":l,f=null==a?null:l;return(0,s.useRenderElement)("span",e,{state:u,ref:t,props:[{"aria-hidden":!0,children:"function"==typeof i?i(c,a):f},o],stateAttributesMapping:p})});var b=e.i(24564);let x=r.forwardRef(function(e,t){let{render:n,className:r,id:i,...o}=e,{setLabelId:a,state:l}=d(),u=(0,b.useRegisteredLabelId)(i,a);return(0,s.useRenderElement)("span",e,{state:l,ref:t,props:[{id:u,role:"presentation"},o],stateAttributesMapping:p})});e.s(["Indicator",0,h,"Label",0,x,"Root",0,g,"Track",0,v,"Value",0,y],45929);var E=e.i(45929),E=E,w=e.i(52088);function S({className:e,...t}){return(0,n.jsx)(E.Track,{className:(0,w.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted",e),"data-slot":"progress-track",...t})}function C({className:e,...t}){return(0,n.jsx)(E.Indicator,{"data-slot":"progress-indicator",className:(0,w.cn)("h-full bg-primary",e),style:{transition:"width 500ms ease-in-out"},...t})}e.s(["Progress",0,function({className:e,children:t,value:r,...i}){return(0,n.jsxs)(E.Root,{value:r,"data-slot":"progress",className:(0,w.cn)("flex flex-wrap gap-3",e),...i,children:[t,(0,n.jsx)(S,{children:(0,n.jsx)(C,{})})]})}],77814)},41247,e=>{"use strict";var t=e.i(18050),n=e.i(52088);e.s(["Textarea",0,function({className:e,...r}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,n.cn)("flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r})}])},57024,e=>{"use strict";var t=e.i(85699);function n(e){let{type:n,title:r,description:i,duration:o}=e,a=e.id??crypto.randomUUID(),l={id:a,description:i,duration:o};switch(n){case"loading":t.toast.loading(r,l);break;case"success":t.toast.success(r,l);break;case"error":t.toast.error(r,l);break;case"warning":t.toast.warning(r,l);break;case"info":t.toast.info(r,l);break;default:(0,t.toast)(r,l)}return a}e.s(["toaster",0,{create:e=>n(e),update:(e,t)=>{n({...t,id:e})},dismiss:e=>{t.toast.dismiss(e)}}])},44523,e=>{"use strict";let t=(0,e.i(75254).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],44523)},37837,37287,97254,79144,67569,56590,18847,61896,60752,12666,e=>{"use strict";var t,n=e.i(18050);e.s([],93742),e.i(93742);var r=e.i(71645),i=e.i(66196),o=e.i(58509),a=e.i(33605),l=e.i(89633),s=e.i(26665),u=e.i(51665),c=e.i(6157);e.i(47167);var d=e.i(67805);let f=r.createContext(void 0);function p(e){let t=r.useContext(f);if(void 0===t&&!e)throw Error((0,d.default)(47));return t}var m=e.i(74080),g=e.i(98263),v=e.i(83921),h=e.i(66745),y=e.i(30628),b=e.i(94365),x=e.i(3404),E=e.i(628),w=e.i(69375),S=e.i(7335);let C={...E.popupStoreSelectors,disabled:(0,v.createSelector)(e=>e.disabled),instantType:(0,v.createSelector)(e=>e.instantType),openMethod:(0,v.createSelector)(e=>e.openMethod),openChangeReason:(0,v.createSelector)(e=>e.openChangeReason),modal:(0,v.createSelector)(e=>e.modal),stickIfOpen:(0,v.createSelector)(e=>e.stickIfOpen),titleElementId:(0,v.createSelector)(e=>e.titleElementId),descriptionElementId:(0,v.createSelector)(e=>e.descriptionElementId),openOnHover:(0,v.createSelector)(e=>e.openOnHover),closeDelay:(0,v.createSelector)(e=>e.closeDelay),hasViewport:(0,v.createSelector)(e=>e.hasViewport)};class R extends g.ReactStore{constructor(e){const t={...(0,E.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new h.Timeout,triggerElements:new w.PopupTriggerMap},C)}setOpen=(e,t)=>{let n=t.reason===x.REASONS.triggerHover,r=t.reason===x.REASONS.triggerPress&&0===t.event.detail,i=!e&&(t.reason===x.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},a=this.state.floatingRootContext.context.events;a?.emit("openchange",o);let l=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(S.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),m.flushSync(l)):l(),r||i?this.set("instantType",r?"click":"dismiss"):t.reason===x.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,y.useRefWithInit)(()=>new R(t)).current,r=e??n;return(0,b.useOnMount)(n.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var O=e.i(5963),k=e.i(58642),T=e.i(50091);function N({props:e}){let{children:t,open:d,defaultOpen:p=!1,onOpenChange:m,onOpenChangeComplete:g,modal:v=!1,handle:h,triggerId:y,defaultTriggerId:b=null}=e,E=R.useStore(h?.store,{modal:v,open:p,openProp:d,activeTriggerId:b,triggerIdProp:y});(0,o.useOnFirstRender)(()=>{void 0===d&&!1===E.state.open&&!0===p&&E.update({open:!0,activeTriggerId:b})}),E.useControlledProp("openProp",d),E.useControlledProp("triggerIdProp",y);let w=E.useState("open"),S=E.useState("positionerElement"),C=E.useState("payload"),A=E.useState("openChangeReason");E.useContextCallback("onOpenChange",m),E.useContextCallback("onOpenChangeComplete",g);let{openMethod:P,triggerProps:M}=(0,T.useOpenInteractionType)(w);(0,k.useImplicitActiveTrigger)(E);let{forceUnmount:I}=(0,k.useOpenStateTransitions)(w,E,()=>{E.update({stickIfOpen:!0,openChangeReason:null})});(0,i.useScrollLock)(w&&!0===v&&A!==x.REASONS.triggerHover&&"touch"!==P,S),r.useEffect(()=>{w||E.context.stickIfOpenTimeout.clear()},[E,w]);let j=r.useCallback(e=>{let t=(0,O.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},t},[E]),L=r.useCallback(()=>{E.setOpen(!1,j(x.REASONS.imperativeAction))},[E,j]);r.useImperativeHandle(e.actionsRef,()=>({unmount:I,close:L}),[I,L]);let D=(0,c.useSyncedFloatingRootContext)({popupStore:E,onOpenChange:E.setOpen}),F=(0,a.useDismiss)(D,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),V=(0,s.useRole)(D),{getReferenceProps:$,getFloatingProps:_,getTriggerProps:B}=(0,l.useInteractions)([F,V]),W=r.useMemo(()=>$(M),[$,M]),H=r.useMemo(()=>B(M),[B,M]),z=r.useMemo(()=>_(),[_]);E.useSyncedValues({modal:v,openMethod:P,activeTriggerProps:W,inactiveTriggerProps:H,popupProps:z,floatingRootContext:D,nested:null!=(0,u.useFloatingParentNodeId)()});let U=r.useMemo(()=>({store:E}),[E]);return(0,n.jsx)(f.Provider,{value:U,children:"function"==typeof t?t({payload:C}):t})}var A=e.i(76477),P=e.i(91730),M=e.i(83590),I=e.i(27601),j=e.i(29315),L=e.i(47857),D=e.i(87612);let F=.1*.1;function V(e,t,n,r,i,o){return r>=t!=o>=t&&e<=(i-n)*(t-r)/(o-r)+n}function $(e,t,n,r,i,o,a,l,s,u){let c=!1;return V(e,t,n,r,i,o)&&(c=!c),V(e,t,i,o,a,l)&&(c=!c),V(e,t,a,l,s,u)&&(c=!c),V(e,t,s,u,n,r)&&(c=!c),c}function _(e,t,n,r,i,o){let a=Math.min(n,i),l=Math.max(n,i),s=Math.min(r,o),u=Math.max(r,o);return e>=a&&e<=l&&t>=s&&t<=u}function B(e={}){let{blockPointerEvents:t=!1}=e,n=new h.Timeout,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:a,tree:l})=>{let s=r?.split("-")[0],u=!1,c=null,d=null,f="u">typeof performance?performance.now():0;return function(r){n.clear();let p=i.domReference,m=i.floating;if(!p||!m||null==s||null==e||null==t)return;let{clientX:g,clientY:v}=r,h=(0,L.getTarget)(r),y="mouseleave"===r.type,b=(0,L.contains)(m,h),x=(0,L.contains)(p,h);if(b&&(u=!0,!y))return;if(x&&(u=!1,!y)){u=!0;return}if(y&&(0,j.isElement)(r.relatedTarget)&&(0,L.contains)(m,r.relatedTarget))return;function E(){return!!(l&&(0,D.getNodeChildren)(l.nodesRef.current,a).length>0)}function w(){E()||(n.clear(),o())}if(E())return;let S=p.getBoundingClientRect(),C=m.getBoundingClientRect(),R=e>C.right-C.width/2,O=t>C.bottom-C.height/2,k=C.width>S.width,T=C.height>S.height,N=(k?S:C).left,A=(k?S:C).right,P=(T?S:C).top,M=(T?S:C).bottom;if("top"===s&&t>=S.bottom-1||"bottom"===s&&t<=S.top+1||"left"===s&&e>=S.right-1||"right"===s&&e<=S.left+1)return void w();let I=!1;switch(s){case"top":I=_(g,v,N,S.top+1,A,C.bottom-1);break;case"bottom":I=_(g,v,N,C.top+1,A,S.bottom-1);break;case"left":I=_(g,v,C.right-1,M,S.left+1,P);break;case"right":I=_(g,v,S.right-1,M,C.left+1,P)}if(I)return;if(u&&(!(g>=S.x)||!(g<=S.x+S.width)||!(v>=S.y)||!(v<=S.y+S.height))||!y&&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 i=e-c,o=t-d;return c=e,d=t,f=n,i*i+o*o<r*r*F}(g,v))return void w();let V=!1;switch(s){case"top":{let n=k?.25:2,r=t+.5+1,i=R||k?C.bottom-.5:C.top,o=R?k?C.bottom-.5:C.top:C.bottom-.5;V=$(g,v,k||R?e+n:e-n,r,k?e-n:R?e+n:e-n,r,C.left,i,C.right,o);break}case"bottom":{let n=k?.25:2,r=t-.5,i=R||k?C.top+.5:C.bottom,o=R?k?C.top+.5:C.bottom:C.top+.5;V=$(g,v,k||R?e+n:e-n,r,k?e-n:R?e+n:e-n,r,C.left,i,C.right,o);break}case"left":{let n=T?.25:2,r=e+.5+1,i=O||T?C.right-.5:C.left,o=O?T?C.right-.5:C.left:C.right-.5;V=$(g,v,i,C.top,o,C.bottom,r,T||O?t+n:t-n,r,T?t-n:O?t+n:t-n);break}case"right":{let n=T?.25:2,r=e-.5,i=O||T?C.left+.5:C.right,o=O?T?C.left+.5:C.right:C.left+.5;V=$(g,v,r,T||O?t+n:t-n,r,T?t-n:O?t+n:t-n,i,C.top,o,C.bottom)}}V?u||n.start(40,w):w()}};return r.__options={blockPointerEvents:t},r}e.s(["safePolygon",0,B],37287);var W=e.i(4012),H=e.i(231),z=e.i(90219),U=e.i(82033),K=e.i(494);let Y=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${K.TYPEABLE_SELECTOR}`;class q{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 h.Timeout,this.restTimeout=new h.Timeout,this.handleCloseOptions=void 0}static create(){return new q}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function X(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 G(e){let t=(0,y.useRefWithInit)(q.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),(0,b.useOnMount)(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function J(e,t,n){let r=null==n||(0,U.isMouseLikePointerType)(n)?"function"==typeof e?e():e:0;return"number"==typeof r?r:r?.[t]}function Z(e){return"function"==typeof e?e():e}function Q(e,t){return t||"click"===e||"mousedown"===e}let ee={current:null};function et(e,t={}){let n="rootStore"in e?e.rootStore:e,{dataRef:i,events:o}=n.context,{enabled:a=!0,delay:l=0,handleClose:s=null,mouseOnly:c=!1,restMs:d=0,move:f=!0,triggerElementRef:p=ee,externalTree:g,isActiveTrigger:v=!0,getHandleCloseContext:h}=t,y=(0,u.useFloatingTree)(g),b=G(n),E=(0,H.useValueAsRef)(s),w=(0,H.useValueAsRef)(l),S=(0,H.useValueAsRef)(d),C=(0,H.useValueAsRef)(a);v&&(b.handleCloseOptions=E.current?.__options);let R=(0,A.useStableCallback)(()=>Q(i.current.openEvent?.type,b.interactedInside)),k=(0,A.useStableCallback)(e=>(0,L.isTargetInsideEnabledTrigger)(e,n.context.triggerElements)),T=(0,A.useStableCallback)((e,t,r)=>{let i=n.context.triggerElements;return i.hasElement(t)?!e||!(0,L.contains)(e,t):!!(0,j.isElement)(r)&&i.hasMatchingElement(e=>(0,L.contains)(e,r))&&(!e||!(0,L.contains)(e,r))}),N=r.useCallback((e,t=!0)=>{let r=J(w.current,"close",b.pointerType);r?b.openChangeTimeout.start(r,()=>{n.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e)),y?.events.emit("floating.closed",e)}):t&&(b.openChangeTimeout.clear(),n.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e)),y?.events.emit("floating.closed",e))},[w,n,b,y]),P=(0,A.useStableCallback)(()=>{b.handler&&((0,z.ownerDocument)(n.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0)});r.useEffect(()=>P,[P]);let M=(0,A.useStableCallback)(()=>{X(b)});return r.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(P(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}},[a,o,b,P]),r.useEffect(()=>{if(!a)return;let e=p.current??(v?n.select("domReferenceElement"):null);if((0,j.isElement)(e))return f&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",r),()=>{f&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",r)};function t(e){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,c&&!(0,U.isMouseLikePointerType)(b.pointerType)||Z(S.current)>0&&!J(w.current,"open"))return;let t=J(w.current,"open",b.pointerType),r=e.currentTarget??null,i=n.select("domReferenceElement"),o=null!=r&&T(i,r,e.target),a=n.select("open"),l=!a||o;o&&a?n.setOpen(!0,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e,r)):t?b.openChangeTimeout.start(t,()=>{l&&n.setOpen(!0,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e,r))}):l&&n.setOpen(!0,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e,r))}function r(e){if(R())return void M();P();let t=n.select("domReferenceElement"),r=(0,z.ownerDocument)(t);b.restTimeout.clear(),b.restTimeoutPending=!1;let o=i.current.floatingContext??h?.();if(!k(e.relatedTarget)){if(E.current&&o){n.select("open")||b.openChangeTimeout.clear();let t=p.current;b.handler=E.current({...o,tree:y,x:e.clientX,y:e.clientY,onClose(){M(),P(),C.current&&!R()&&t===n.select("domReferenceElement")&&N(e,!0)}}),r.addEventListener("mousemove",b.handler),b.handler(e);return}"touch"===b.pointerType&&(0,L.contains)(n.select("floatingElement"),e.relatedTarget)||N(e)}}},[P,M,i,w,N,n,a,E,b,v,T,R,k,c,f,S,p,y,C,h]),r.useMemo(()=>{if(a)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select("domReferenceElement"),o=n.select("open"),a=T(i,r,e.target);if(c&&!(0,U.isMouseLikePointerType)(b.pointerType))return;let l=Z(S.current);function s(){if(b.restTimeoutPending=!1,R())return;let e=n.select("open");b.blockMouseMove||e&&!a||n.setOpen(!0,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,t,r))}(!o||a)&&0!==l&&(!a&&b.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(b.restTimeout.clear(),"touch"===b.pointerType?m.flushSync(()=>{s()}):a&&o?s():(b.restTimeoutPending=!0,b.restTimeout.start(l,s))))}};function e(e){b.pointerType=e.pointerType}},[a,b,R,T,c,n,S])}e.s(["useHoverReferenceInteraction",0,et],97254);var en=e.i(89879),er=e.i(72408),ei=e.i(59266);let eo=r.forwardRef(function(e,t){let{render:i,className:o,disabled:a=!1,nativeButton:s=!0,handle:u,payload:c,openOnHover:f=!1,delay:g=300,closeDelay:v=0,id:h,...y}=e,b=p(!0),E=u?.store??b?.store;if(!E)throw Error((0,d.default)(74));let w=(0,en.useBaseUiId)(h),C=E.useState("isTriggerActive",w),R=E.useState("floatingRootContext"),T=E.useState("isOpenedByTrigger",w),N=r.useRef(null),{registerTrigger:j,isMountedByThisTrigger:D}=(0,k.useTriggerDataForwarding)(w,N,E,{payload:c,disabled:a,openOnHover:f,closeDelay:v}),F=E.useState("openChangeReason"),V=E.useState("stickIfOpen"),$=E.useState("openMethod"),_=et(R,{enabled:null!=R&&f&&("touch"!==$||F!==x.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:B(),restMs:g,delay:{close:v},triggerElementRef:N,isActiveTrigger:C}),H=(0,W.useClick)(R,{enabled:null!=R,stickIfOpen:V}),z=(0,l.useInteractions)([H]),U=E.useState("triggerProps",D),{getButtonProps:K,buttonRef:Y}=(0,P.useButton)({disabled:a,native:s}),q=r.useMemo(()=>({open:e=>e&&F===x.REASONS.triggerPress?M.pressableTriggerOpenStateMapping.open(e):M.triggerOpenStateMapping.open(e)}),[F]),X=(0,I.useRenderElement)("button",e,{state:{disabled:a,open:T},ref:[Y,t,j,N],props:[z.getReferenceProps(),_,U,{[S.CLICK_TRIGGER_IDENTIFIER]:"",id:w},y,K],stateAttributesMapping:q}),G=r.useRef(null),J=(0,A.useStableCallback)(e=>{m.flushSync(()=>{E.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,ei.getTabbableBeforeElement)(G.current);t?.focus()}),Z=(0,A.useStableCallback)(e=>{let t=E.select("positionerElement");if(t&&(0,ei.isOutsideEvent)(e,t))E.context.beforeContentFocusGuardRef.current?.focus();else{m.flushSync(()=>{E.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,ei.getTabbableAfterElement)(E.context.triggerFocusTargetRef.current||N.current);for(;null!==n&&(0,L.contains)(t,n);){let e=n;if((n=(0,ei.getNextTabbable)(n))===e)break}n?.focus()}});return C?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(er.FocusGuard,{ref:G,onFocus:J}),(0,n.jsx)(r.Fragment,{children:X},w),(0,n.jsx)(er.FocusGuard,{ref:E.context.triggerFocusTargetRef,onFocus:Z})]}):(0,n.jsx)(r.Fragment,{children:X},w)});var ea=e.i(37692);let el=r.createContext(void 0),es=r.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:o}=p();return o.useState("mounted")||r?(0,n.jsx)(el.Provider,{value:r,children:(0,n.jsx)(ea.FloatingPortal,{ref:t,...i})}):null});var eu=e.i(58130),ec=e.i(977);let ed=r.createContext(void 0);function ef(){let e=r.useContext(ed);if(!e)throw Error((0,d.default)(46));return e}var ep=e.i(43084);function em(e,t,n){let r,{reference:i,floating:o}=e,a=(0,ep.getSideAxis)(t),l=(0,ep.getAlignmentAxis)(t),s=(0,ep.getAxisLength)(l),u=(0,ep.getSide)(t),c="y"===a,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,p=i[s]/2-o[s]/2;switch(u){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch((0,ep.getAlignment)(t)){case"start":r[l]-=p*(n&&c?-1:1);break;case"end":r[l]+=p*(n&&c?-1:1)}return r}async function eg(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:a,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=(0,ep.evaluate)(t,e),m=(0,ep.getPaddingObject)(p),g=l[f?"floating"===d?"reference":"floating":d],v=(0,ep.rectToClientRect)(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),h="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await (null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await (null==o.isElement?void 0:o.isElement(y))&&await (null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},x=(0,ep.rectToClientRect)(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:y,strategy:s}):h);return{top:(v.top-x.top+m.top)/b.y,bottom:(x.bottom-v.bottom+m.bottom)/b.y,left:(v.left-x.left+m.left)/b.x,right:(x.right-v.right+m.right)/b.x}}let ev=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:eg},s=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=em(u,r,s),f=r,p=0,m={};for(let n=0;n<o.length;n++){let g=o[n];if(!g)continue;let{name:v,fn:h}=g,{x:y,y:b,data:x,reset:E}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});c=null!=y?y:c,d=null!=b?b:d,m[v]={...m[v],...x},E&&p<50&&(p++,"object"==typeof E&&(E.placement&&(f=E.placement),E.rects&&(u=!0===E.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:c,y:d}=em(u,f,s)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:m}};function eh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ey(e){return ep.sides.some(t=>e[t]>=0)}let eb=new Set(["left","top"]);async function ex(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=(0,ep.getSide)(n),l=(0,ep.getAlignment)(n),s="y"===(0,ep.getSideAxis)(n),u=eb.has(a)?-1:1,c=o&&s?-1:1,d=(0,ep.evaluate)(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 l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}function eE(e){let t=(0,j.getComputedStyle)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=(0,j.isHTMLElement)(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=(0,ep.round)(n)!==o||(0,ep.round)(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function ew(e){return(0,j.isElement)(e)?e:e.contextElement}function eS(e){let t=ew(e);if(!(0,j.isHTMLElement)(t))return(0,ep.createCoords)(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=eE(t),a=(o?(0,ep.round)(n.width):n.width)/r,l=(o?(0,ep.round)(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let eC=(0,ep.createCoords)(0);function eR(e){let t=(0,j.getWindow)(e);return(0,j.isWebKit)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eC}function eO(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),a=ew(e),l=(0,ep.createCoords)(1);t&&(r?(0,j.isElement)(r)&&(l=eS(r)):l=eS(e));let s=(void 0===(i=n)&&(i=!1),r&&(!i||r===(0,j.getWindow)(a))&&i)?eR(a):(0,ep.createCoords)(0),u=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,d=o.width/l.x,f=o.height/l.y;if(a){let e=(0,j.getWindow)(a),t=r&&(0,j.isElement)(r)?(0,j.getWindow)(r):r,n=e,i=(0,j.getFrameElement)(n);for(;i&&r&&t!==n;){let e=eS(i),t=i.getBoundingClientRect(),r=(0,j.getComputedStyle)(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=o,c+=a,n=(0,j.getWindow)(i),i=(0,j.getFrameElement)(n)}}return(0,ep.rectToClientRect)({width:d,height:f,x:u,y:c})}function ek(e,t){let n=(0,j.getNodeScroll)(e).scrollLeft;return t?t.left+n:eO((0,j.getDocumentElement)(e)).left+n}function eT(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ek(e,n),y:n.top+t.scrollTop}}function eN(e,t,n){var r;let i;if("viewport"===t)i=function(e,t){let n=(0,j.getWindow)(e),r=(0,j.getDocumentElement)(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;let e=(0,j.isWebKit)();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}let u=ek(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else u<=25&&(o+=u);return{width:o,height:a,x:l,y:s}}(e,n);else if("document"===t){let t,n,o,a,l,s,u;r=(0,j.getDocumentElement)(e),t=(0,j.getDocumentElement)(r),n=(0,j.getNodeScroll)(r),o=r.ownerDocument.body,a=(0,ep.max)(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=(0,ep.max)(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+ek(r),u=-n.scrollTop,"rtl"===(0,j.getComputedStyle)(o).direction&&(s+=(0,ep.max)(t.clientWidth,o.clientWidth)-a),i={width:a,height:l,x:s,y:u}}else if((0,j.isElement)(t)){let e,r,o,a,l,s;r=(e=eO(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,a=(0,j.isHTMLElement)(t)?eS(t):(0,ep.createCoords)(1),l=t.clientWidth*a.x,s=t.clientHeight*a.y,i={width:l,height:s,x:o*a.x,y:r*a.y}}else{let n=eR(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return(0,ep.rectToClientRect)(i)}function eA(e){return"static"===(0,j.getComputedStyle)(e).position}function eP(e,t){if(!(0,j.isHTMLElement)(e)||"fixed"===(0,j.getComputedStyle)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,j.getDocumentElement)(e)===n&&(n=n.ownerDocument.body),n}function eM(e,t){let n=(0,j.getWindow)(e);if((0,j.isTopLayer)(e))return n;if(!(0,j.isHTMLElement)(e)){let t=(0,j.getParentNode)(e);for(;t&&!(0,j.isLastTraversableNode)(t);){if((0,j.isElement)(t)&&!eA(t))return t;t=(0,j.getParentNode)(t)}return n}let r=eP(e,t);for(;r&&(0,j.isTableElement)(r)&&eA(r);)r=eP(r,t);return r&&(0,j.isLastTraversableNode)(r)&&eA(r)&&!(0,j.isContainingBlock)(r)?n:r||(0,j.getContainingBlock)(e)||n}let eI=async function(e){let t=this.getOffsetParent||eM,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=(0,j.isHTMLElement)(t),i=(0,j.getDocumentElement)(t),o="fixed"===n,a=eO(e,!0,o,t),l={scrollLeft:0,scrollTop:0},s=(0,ep.createCoords)(0);if(r||!r&&!o)if(("body"!==(0,j.getNodeName)(t)||(0,j.isOverflowElement)(i))&&(l=(0,j.getNodeScroll)(t)),r){let e=eO(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=ek(i));o&&!r&&i&&(s.x=ek(i));let u=!i||r||o?(0,ep.createCoords)(0):eT(i,l);return{x:a.left+l.scrollLeft-s.x-u.x,y:a.top+l.scrollTop-s.y-u.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ej={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,a=(0,j.getDocumentElement)(r),l=!!t&&(0,j.isTopLayer)(t.floating);if(r===a||l&&o)return n;let s={scrollLeft:0,scrollTop:0},u=(0,ep.createCoords)(1),c=(0,ep.createCoords)(0),d=(0,j.isHTMLElement)(r);if((d||!d&&!o)&&(("body"!==(0,j.getNodeName)(r)||(0,j.isOverflowElement)(a))&&(s=(0,j.getNodeScroll)(r)),d)){let e=eO(r);u=eS(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!a||d||o?(0,ep.createCoords)(0):eT(a,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-s.scrollTop*u.y+c.y+f.y}},getDocumentElement:j.getDocumentElement,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?(0,j.isTopLayer)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,j.getOverflowAncestors)(e,[],!1).filter(e=>(0,j.isElement)(e)&&"body"!==(0,j.getNodeName)(e)),i=null,o="fixed"===(0,j.getComputedStyle)(e).position,a=o?(0,j.getParentNode)(e):e;for(;(0,j.isElement)(a)&&!(0,j.isLastTraversableNode)(a);){let t=(0,j.getComputedStyle)(a),n=(0,j.isContainingBlock)(a);n||"fixed"!==t.position||(i=null),(o?n||i:!(!n&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||(0,j.isOverflowElement)(a)&&!n&&function e(t,n){let r=(0,j.getParentNode)(t);return!(r===n||!(0,j.isElement)(r)||(0,j.isLastTraversableNode)(r))&&("fixed"===(0,j.getComputedStyle)(r).position||e(r,n))}(e,a)))?i=t:r=r.filter(e=>e!==a),a=(0,j.getParentNode)(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=eN(t,o[0],i),l=a.top,s=a.right,u=a.bottom,c=a.left;for(let e=1;e<o.length;e++){let n=eN(t,o[e],i);l=(0,ep.max)(n.top,l),s=(0,ep.min)(n.right,s),u=(0,ep.min)(n.bottom,u),c=(0,ep.max)(n.left,c)}return{width:s-c,height:u-l,x:c,y:l}},getOffsetParent:eM,getElementRects:eI,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eE(e);return{width:t,height:n}},getScale:eS,isElement:j.isElement,isRTL:function(e){return"rtl"===(0,j.getComputedStyle)(e).direction}};function eL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eD(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,c=ew(e),d=o||a?[...c?(0,j.getOverflowAncestors)(c):[],...t?(0,j.getOverflowAncestors)(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let f=c&&s?function(e,t){let n,r=null,i=(0,j.getDocumentElement)(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(l||t(),!f||!p)return;let m={rootMargin:-(0,ep.floor)(d)+"px "+-(0,ep.floor)(i.clientWidth-(c+f))+"px "+-(0,ep.floor)(i.clientHeight-(d+p))+"px "+-(0,ep.floor)(c)+"px",threshold:(0,ep.max)(0,(0,ep.min)(1,s))||1},g=!0;function v(t){let r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||eL(u,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),o}(c,n):null,p=-1,m=null;l&&(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 g=u?eO(e):null;return u&&function t(){let r=eO(e);g&&!eL(g,r)&&n(),g=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,u&&cancelAnimationFrame(i)}}var eF="u">typeof document?r.useLayoutEffect:function(){};function eV(e,t){let n,r,i;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(!eV(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!eV(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function e$(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e_(e,t){let n=e$(e);return Math.round(t*n)/n}function eB(e){let t=r.useRef(e);return eF(()=>{t.current=e}),t}var eW=e.i(83799),eH=e.i(24019);let ez=r.createContext(void 0);function eU(){let e=r.useContext(ez);return e?.direction??"ltr"}e.s(["useDirection",0,eU],79144);let eK={name:"hide",async fn(e){var t,n,r;let i,{width:o,height:a,x:l,y:s}=e.rects.reference,u=await (void 0===(r=t)&&(r={}),{name:(i={name:"hide",options:r,async fn(e){let{rects:t,platform:n}=e,{strategy:i="referenceHidden",...o}=(0,ep.evaluate)(r,e);switch(i){case"referenceHidden":{let r=eh(await n.detectOverflow(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:ey(r)}}}case"escaped":{let r=eh(await n.detectOverflow(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:ey(r)}}}default:return{}}}}).name,fn:i.fn,options:[t,n]}).fn(e);return{data:{referenceHidden:u.data?.referenceHidden||0===o&&0===a&&0===l&&0===s}}}};var eY=e.i(33848);let eq={sideX:"left",sideY:"top"},eX={name:"adaptiveOrigin",async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:l}=e,s=(0,eY.ownerWindow)(i),u=s.getComputedStyle(i);if("0s"===u.transitionDuration||""===u.transitionDuration)return{x:t,y:n,data:eq};let c=await o.getOffsetParent?.(i),d={width:0,height:0};if("fixed"===a&&s?.visualViewport)d={width:s.visualViewport.width,height:s.visualViewport.height};else if(c===s){let e=(0,z.ownerDocument)(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await o.isElement?.(c)&&(d=await o.getDimensions(c));let f=(0,ep.getSide)(l),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":eq.sideX,sideY:"top"===f?"bottom":eq.sideY}}}};function eG(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 eJ(e,t,n){let{rects:r,placement:i}=e;return{side:eG(t,(0,ep.getSide)(i),n),align:(0,ep.getAlignment)(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function eZ(e){var t,n,i,o,a,l,s,c,d,f,p,g,v,h;let b,x,E,S,{anchor:C,positionMethod:R="absolute",side:O="bottom",sideOffset:k=0,align:T="center",alignOffset:N=0,collisionBoundary:P,collisionPadding:M=5,sticky:I=!1,arrowPadding:L=5,disableAnchorTracking:D=!1,keepMounted:F=!1,floatingRootContext:V,mounted:$,collisionAvoidance:_,shiftCrossAxis:B=!1,nodeId:W,adaptiveOrigin:U,lazyFlip:K=!1,externalTree:Y}=e,[q,X]=r.useState(null);$||null===q||X(null);let G=_.side||"flip",J=_.align||"flip",Z=_.fallbackAxisSide||"end",Q="function"==typeof C?C:void 0,ee=(0,A.useStableCallback)(Q),et=Q?ee:C,en=(0,H.useValueAsRef)(C),er="rtl"===eU(),ei=q||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":er?"left":"right","inline-start":er?"right":"left"})[O],eo="center"===T?ei:`${ei}-${T}`,ea=M,el=+("bottom"===O),es=+("top"===O),eu=+("right"===O),ed=+("left"===O);"number"==typeof ea?ea={top:ea+el,right:ea+ed,bottom:ea+es,left:ea+eu}:ea&&(ea={top:(ea.top||0)+el,right:(ea.right||0)+ed,bottom:(ea.bottom||0)+es,left:(ea.left||0)+eu});let ef={boundary:"clipping-ancestors"===P?"clippingAncestors":P,padding:ea},em=r.useRef(null),eg=(0,H.useValueAsRef)(k),eh=(0,H.useValueAsRef)(N),ey=[(t=e=>{let t=eJ(e,O,er),n="function"==typeof eg.current?eg.current(t):eg.current,r="function"==typeof eh.current?eh.current(t):eh.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},n=["function"!=typeof k?k:0,"function"!=typeof N?N:0,er,O],void 0===(i=t)&&(i=0),{name:(b={name:"offset",options:i,async fn(e){var t,n;let{x:r,y:o,placement:a,middlewareData:l}=e,s=await ex(e,i);return a===(null==(t=l.offset)?void 0:t.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:r+s.x,y:o+s.y,data:{...s,placement:a}}}}).name,fn:b.fn,options:[t,n]})],eE="none"===J&&"shift"!==G,ew=!eE&&(I||B||"shift"===G),eS="none"===G?null:{name:(x={name:"flip",options:l=o={...ef,padding:{top:ea.top+1,right:ea.right+1,bottom:ea.bottom+1,left:ea.left+1},mainAxis:!B&&"flip"===G,crossAxis:"flip"===J&&"alignment",fallbackAxisSideDirection:Z},async fn(e){var t,n,r,i,o;let{placement:a,middlewareData:s,rects:u,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...b}=(0,ep.evaluate)(l,e);if(null!=(t=s.arrow)&&t.alignmentOffset)return{};let x=(0,ep.getSide)(a),E=(0,ep.getSideAxis)(c),w=(0,ep.getSide)(c)===c,S=await (null==d.isRTL?void 0:d.isRTL(f.floating)),C=g||(w||!y?[(0,ep.getOppositePlacement)(c)]:(0,ep.getExpandedPlacements)(c)),R="none"!==h;!g&&R&&C.push(...(0,ep.getOppositeAxisPlacements)(c,y,h,S));let O=[c,...C],k=await d.detectOverflow(e,b),T=[],N=(null==(n=s.flip)?void 0:n.overflows)||[];if(p&&T.push(k[x]),m){let e=(0,ep.getAlignmentSides)(a,u,S);T.push(k[e[0]],k[e[1]])}if(N=[...N,{placement:a,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=s.flip)?void 0:r.index)||0)+1,t=O[e];if(t&&("alignment"!==m||E===(0,ep.getSideAxis)(t)||N.every(e=>(0,ep.getSideAxis)(e.placement)!==E||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(i=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(v){case"bestFit":{let e=null==(o=N.filter(e=>{if(R){let t=(0,ep.getSideAxis)(e.placement);return t===E||"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:o[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}).name,fn:x.fn,options:[o,a]},eC=eE?null:(s=e=>{var t,n,r;let i=(0,z.ownerDocument)(e.elements.floating).documentElement;return{...ef,rootBoundary:B?{x:0,y:0,width:i.clientWidth,height:i.clientHeight}:void 0,mainAxis:"none"!==J,crossAxis:ew,limiter:I||B?void 0:{fn:(void 0===(r=t=e=>{if(!em.current)return{};let{width:t,height:n}=em.current.getBoundingClientRect(),r=(0,ep.getSideAxis)((0,ep.getSide)(e.placement)),i="y"===r?ea.left+ea.right:ea.top+ea.bottom;return{offset:("y"===r?t:n)/2+i/2}})&&(r={}),{options:r,fn(e){let{x:t,y:n,placement:i,rects:o,middlewareData:a}=e,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=(0,ep.evaluate)(r,e),c={x:t,y:n},d=(0,ep.getSideAxis)(i),f=(0,ep.getOppositeAxis)(d),p=c[f],m=c[d],g=(0,ep.evaluate)(l,e),v="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){let e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+v.mainAxis,n=o.reference[f]+o.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var h,y;let e="y"===f?"width":"height",t=eb.has((0,ep.getSide)(i)),n=o.reference[d]-o.floating[e]+(t&&(null==(h=a.offset)?void 0:h[d])||0)+(t?0:v.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}).fn,options:[t,n]}}},c=[ef,I,B,ea,J],void 0===(d=s)&&(d={}),{name:(E={name:"shift",options:d,async fn(e){let{x:t,y:n,placement:r,platform:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=(0,ep.evaluate)(d,e),u={x:t,y:n},c=await i.detectOverflow(e,s),f=(0,ep.getSideAxis)((0,ep.getSide)(r)),p=(0,ep.getOppositeAxis)(f),m=u[p],g=u[f];if(o){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=m+c[e],r=m-c[t];m=(0,ep.clamp)(n,m,r)}if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=g+c[e],r=g-c[t];g=(0,ep.clamp)(n,g,r)}let v=l.fn({...e,[p]:m,[f]:g});return{...v,data:{x:v.x-t,y:v.y-n,enabled:{[p]:o,[f]:a}}}}}).name,fn:E.fn,options:[s,c]});"shift"===G||"shift"===J||"center"===T?ey.push(eC,eS):ey.push(eS,eC),ey.push({name:(S={name:"size",options:g=f={...ef,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty("--available-width",`${t}px`),i.setProperty("--available-height",`${n}px`);let o=window.devicePixelRatio||1,{x:a,y:l,width:s,height:u}=r.reference,c=(Math.round((a+s)*o)-Math.round(a*o))/o,d=(Math.round((l+u)*o)-Math.round(l*o))/o;i.setProperty("--anchor-width",`${c}px`),i.setProperty("--anchor-height",`${d}px`)}},async fn(e){var t,n;let r,i,{placement:o,rects:a,platform:l,elements:s}=e,{apply:u=()=>{},...c}=(0,ep.evaluate)(g,e),d=await l.detectOverflow(e,c),f=(0,ep.getSide)(o),p=(0,ep.getAlignment)(o),m="y"===(0,ep.getSideAxis)(o),{width:v,height:h}=a.floating;"top"===f||"bottom"===f?(r=f,i=p===(await (null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(i=f,r="end"===p?"top":"bottom");let y=h-d.top-d.bottom,b=v-d.left-d.right,x=(0,ep.min)(h-d[r],y),E=(0,ep.min)(v-d[i],b),w=!e.middlewareData.shift,S=x,C=E;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(C=b),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(S=y),w&&!p){let e=(0,ep.max)(d.left,0),t=(0,ep.max)(d.right,0),n=(0,ep.max)(d.top,0),r=(0,ep.max)(d.bottom,0);m?C=v-2*(0!==e||0!==t?e+t:(0,ep.max)(d.left,d.right)):S=h-2*(0!==n||0!==r?n+r:(0,ep.max)(d.top,d.bottom))}await u({...e,availableWidth:C,availableHeight:S});let R=await l.getDimensions(s.floating);return v!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}).name,fn:S.fn,options:[f,p]},(v=()=>({element:em.current||document.createElement("div"),padding:L,offsetParent:"floating"}),h=[L],{name:"arrow",options:v,async fn(e){let{x:t,y:n,placement:r,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:s,padding:u=0,offsetParent:c="real"}=(0,ep.evaluate)(v,e)||{};if(null==s)return{};let d=(0,ep.getPaddingObject)(u),f={x:t,y:n},p=(0,ep.getAlignmentAxis)(r),m=(0,ep.getAxisLength)(p),g=await o.getDimensions(s),h="y"===p,y=h?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-f[p]-i.floating[m],x=f[p]-i.reference[p],E="real"===c?await o.getOffsetParent?.(s):a.floating,w=a.floating[y]||i.floating[m];w&&await o.isElement?.(E)||(w=a.floating[y]||i.floating[m]);let S=w/2-g[m]/2-1,C=Math.min(d[h?"top":"left"],S),R=Math.min(d[h?"bottom":"right"],S),O=w-g[m]-R,k=w/2-g[m]/2+(b/2-x/2),T=(0,ep.clamp)(C,k,O),N=!l.arrow&&null!=(0,ep.getAlignment)(r)&&k!==T&&i.reference[m]/2-(k<C?C:R)-g[m]/2<0,A=N?k<C?k-C:k-O:0;return{[p]:f[p]+A,data:{[p]:T,centerOffset:k-T-A,...N&&{alignmentOffset:A}},reset:N}},options:[v,h]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:i,y:o}=e,a=(0,ep.getSide)(r),l=(0,ep.getSideAxis)(a),s=em.current,u=n.arrow?.x||0,c=n.arrow?.y||0,d=s?.clientWidth||0,f=s?.clientHeight||0,p=u+d/2,m=c+f/2,g=Math.abs(n.shift?.y||0),v=i.reference.height/2,h="function"==typeof k?k(eJ(e,O,er)):k,y=g>h,b={top:`${p}px calc(100% + ${h}px)`,bottom:`${p}px ${-h}px`,left:`calc(100% + ${h}px) ${m}px`,right:`${-h}px ${m}px`}[a],x=`${p}px ${i.reference.y+v-o}px`;return t.floating.style.setProperty("--transform-origin",ew&&"y"===l&&y?x:b),{}}},eK,U),(0,ec.useIsoLayoutEffect)(()=>{!$&&V&&V.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[$,V]);let eR=r.useMemo(()=>({elementResize:!D&&"u">typeof ResizeObserver,layoutShift:!D&&"u">typeof IntersectionObserver}),[D]),{refs:eO,elements:ek,x:eT,y:eN,middlewareData:eA,update:eP,placement:eM,context:eI,isPositioned:eL,floatingStyles:ez}=function(e={}){let{nodeId:t,externalTree:n}=e,i=function(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=(0,eW.useId)(),o=null!=(0,u.useFloatingParentNodeId)(),a=(0,y.useRefWithInit)(()=>new eH.FloatingRootStore({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new w.PopupTriggerMap,floatingId:i,nested:o,noEmit:!1})).current;return(0,ec.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:i};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=(0,j.isElement)(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}(e),o=e.rootContext||i,a={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[l,s]=r.useState(null),c=r.useRef(null),d=(0,u.useFloatingTree)(n);(0,ec.useIsoLayoutEffect)(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let f=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=r.useState(i);eV(p,i)||g(i);let[v,h]=r.useState(null),[y,b]=r.useState(null),x=r.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),E=r.useCallback(e=>{e!==R.current&&(R.current=e,b(e))},[]),w=a||v,S=l||y,C=r.useRef(null),R=r.useRef(null),O=r.useRef(d),k=null!=u,T=eB(u),N=eB(o),A=eB(c),P=r.useCallback(()=>{var e,r;let i,o,a;if(!C.current||!R.current)return;let l={placement:t,strategy:n,middleware:p};N.current&&(l.platform=N.current),(e=C.current,r=R.current,i=new Map,a={...(o={platform:ej,...l}).platform,_c:i},ev(e,r,{...o,platform:a})).then(e=>{let t={...e,isPositioned:!1!==A.current};M.current&&!eV(O.current,t)&&(O.current=t,m.flushSync(()=>{f(t)}))})},[p,t,n,N,A]);eF(()=>{!1===c&&O.current.isPositioned&&(O.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);let M=r.useRef(!1);eF(()=>(M.current=!0,()=>{M.current=!1}),[]),eF(()=>{if(w&&(C.current=w),S&&(R.current=S),w&&S){if(T.current)return T.current(w,S,P);P()}},[w,S,P,T,k]);let I=r.useMemo(()=>({reference:C,floating:R,setReference:x,setFloating:E}),[x,E]),j=r.useMemo(()=>({reference:w,floating:S}),[w,S]),L=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=e_(j.floating,d.x),r=e_(j.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...e$(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,j.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:P,refs:I,elements:j,floatingStyles:L}),[d,P,I,j,L])}({...e,elements:{...a,...l&&{reference:l}}}),p=r.useCallback(e=>{let t=(0,j.isElement)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),f.refs.setReference(t)},[f.refs]),[g,v]=r.useState(null),[h,b]=r.useState(null);o.useSyncedValue("referenceElement",g),o.useSyncedValue("domReferenceElement",(0,j.isElement)(g)?g:null),o.useSyncedValue("floatingElement",h);let x=r.useCallback(e=>{((0,j.isElement)(e)||null===e)&&(c.current=e,v(e)),((0,j.isElement)(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!(0,j.isElement)(e))&&f.refs.setReference(e)},[f.refs,v]),E=r.useCallback(e=>{b(e),f.refs.setFloating(e)},[f.refs]),S=r.useMemo(()=>({...f.refs,setReference:x,setFloating:E,setPositionReference:p,domReference:c}),[f.refs,x,E,p]),C=r.useMemo(()=>({...f.elements,domReference:a.domReference}),[f.elements,a.domReference]),R=o.useState("open"),O=o.useState("floatingId"),k=r.useMemo(()=>({...f,dataRef:o.context.dataRef,open:R,onOpenChange:o.setOpen,events:o.context.events,floatingId:O,refs:S,elements:C,nodeId:t,rootStore:o}),[f,S,C,t,o,R,O]);return(0,ec.useIsoLayoutEffect)(()=>{o.context.dataRef.current.floatingContext=k;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=k)}),r.useMemo(()=>({...f,context:k,refs:S,elements:C,rootStore:o}),[f,S,C,k,o])}({rootContext:V,placement:eo,middleware:ey,strategy:R,whileElementsMounted:F?void 0:(...e)=>eD(...e,eR),nodeId:W,externalTree:Y}),{sideX:eY,sideY:eX}=eA.adaptiveOrigin||eq,eZ=eL?R:"fixed",e0=r.useMemo(()=>{let e=U?{position:eZ,[eY]:eT,[eX]:eN}:{position:eZ,...ez};return eL||(e.opacity=0),e},[U,eZ,eY,eT,eX,eN,ez,eL]),e1=r.useRef(null);(0,ec.useIsoLayoutEffect)(()=>{if(!$)return;let e=en.current,t="function"==typeof e?e():e,n=(eQ(t)?t.current:t)||null;n!==e1.current&&(eO.setPositionReference(n),e1.current=n)},[$,eO,et,en]),r.useEffect(()=>{if(!$)return;let e=en.current;"function"!=typeof e&&eQ(e)&&e.current!==e1.current&&(eO.setPositionReference(e.current),e1.current=e.current)},[$,eO,et,en]),r.useEffect(()=>{if(F&&$&&ek.domReference&&ek.floating)return eD(ek.domReference,ek.floating,eP,eR)},[F,$,ek,eP,eR]);let e2=(0,ep.getSide)(eM),e5=eG(O,e2,er),e7=(0,ep.getAlignment)(eM)||"center",e4=!!eA.hide?.referenceHidden;(0,ec.useIsoLayoutEffect)(()=>{K&&$&&eL&&X(e2)},[K,$,eL,e2]);let e3=r.useMemo(()=>({position:"absolute",top:eA.arrow?.y,left:eA.arrow?.x}),[eA.arrow]),e8=eA.arrow?.centerOffset!==0;return r.useMemo(()=>({positionerStyles:e0,arrowStyles:e3,arrowRef:em,arrowUncentered:e8,side:e5,align:e7,physicalSide:e2,anchorHidden:e4,refs:eO,context:eI,isPositioned:eL,update:eP}),[e0,e3,em,e8,e5,e7,e2,e4,eO,eI,eL,eP])}function eQ(e){return null!=e&&"current"in e}e.s(["DEFAULT_SIDES",0,eq,"adaptiveOrigin",0,eX],67569),e.s(["useAnchorPositioning",0,eZ],56590);var e0=e.i(36893),e1=e.i(77817),e2=e.i(17514);function e5(e){return"starting"===e?S.DISABLED_TRANSITIONS_STYLE:e2.EMPTY_OBJECT}e.s(["getDisabledMountTransitionStyles",0,e5],18847);let e7=r.forwardRef(function(e,t){let{render:i,className:o,anchor:a,positionMethod:l="absolute",side:s="bottom",align:c="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:h=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:E=S.POPUP_COLLISION_AVOIDANCE,...w}=e,{store:C}=p(),R=function(){let e=r.useContext(el);if(void 0===e)throw Error((0,d.default)(45));return e}(),O=(0,u.useFloatingNodeId)(),k=C.useState("floatingRootContext"),T=C.useState("mounted"),N=C.useState("open"),A=C.useState("openChangeReason"),P=C.useState("activeTriggerElement"),j=C.useState("modal"),L=C.useState("positionerElement"),D=C.useState("instantType"),F=C.useState("transitionStatus"),V=C.useState("hasViewport"),$=r.useRef(null),_=(0,e1.useAnimationsFinished)(L,!1,!1),B=eZ({anchor:a,floatingRootContext:k,positionMethod:l,mounted:T,side:s,sideOffset:f,align:c,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:v,sticky:y,disableAnchorTracking:b,keepMounted:R,nodeId:O,collisionAvoidance:E,adaptiveOrigin:V?eX:void 0}),W=r.useMemo(()=>{let e={};return N||(e.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...B.positionerStyles,...e}}},[N,T,B.positionerStyles]),H=r.useMemo(()=>({props:W,...B}),[W,B]),z=k.useState("domReferenceElement");(0,ec.useIsoLayoutEffect)(()=>{let e=$.current;if(z&&($.current=z),e&&z&&z!==e){C.set("instantType",void 0);let e=new AbortController;return _(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[z,_,C]);let U={open:N,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:D},K=r.useCallback(e=>{C.set("positionerElement",e)},[C]),Y=(0,I.useRenderElement)("div",e,{state:U,props:[H.props,e5(F),w],ref:[t,K],stateAttributesMapping:M.popupStateMapping});return(0,n.jsxs)(ed.Provider,{value:H,children:[T&&!0===j&&A!==x.REASONS.triggerHover&&(0,n.jsx)(e0.InternalBackdrop,{ref:C.context.internalBackdropRef,inert:(0,eu.inertValue)(!N),cutout:P}),(0,n.jsx)(u.FloatingNode,{id:O,children:Y})]})});var e4=e.i(88306);function e3(e,t={}){let n="rootStore"in e?e.rootStore:e,i=n.useState("open"),o=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:s=!0,closeDelay:c=0}=t,d=G(n),f=(0,u.useFloatingTree)(),p=(0,u.useFloatingParentNodeId)(),m=(0,A.useStableCallback)(()=>Q(l.current.openEvent?.type,d.interactedInside)),g=(0,A.useStableCallback)(()=>{let e=l.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),v=(0,A.useStableCallback)(e=>(0,L.isTargetInsideEnabledTrigger)(e,n.context.triggerElements)),y=r.useCallback(e=>{let t=J(c,"close",d.pointerType),r=()=>{n.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e)),f?.events.emit("floating.closed",e)};t?d.openChangeTimeout.start(t,r):(d.openChangeTimeout.clear(),r())},[c,n,d,f]),b=(0,A.useStableCallback)(()=>{X(d)}),E=(0,A.useStableCallback)(e=>{let t=(0,L.getTarget)(e);if(!(t&&t.closest(Y))){d.interactedInside=!1;return}d.interactedInside=t?.closest("[aria-haspopup]")!=null});(0,ec.useIsoLayoutEffect)(()=>{i||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,b())},[i,d,b]),r.useEffect(()=>b,[b]),(0,ec.useIsoLayoutEffect)(()=>{if(s&&i&&d.handleCloseOptions?.blockPointerEvents&&g()&&(0,j.isElement)(a)&&o){let e=(0,z.ownerDocument)(o),t=f?.nodesRef.current.find(e=>e.id===p)?.context?.elements.floating;t&&(t.style.pointerEvents="");let n=d.handleCloseOptions?.getScope?.()??d.pointerEventsScopeElement??t??a.closest("[data-rootownerid]")??e.body;return!function(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;X(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}(d,{scopeElement:n,referenceElement:a,floatingElement:o}),()=>{b()}}},[s,i,a,o,d,g,f,p,b]);let w=(0,h.useTimeout)();r.useEffect(()=>{if(s)return o&&(o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),o.addEventListener("pointerdown",E,!0)),()=>{o&&(o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),o.removeEventListener("pointerdown",E,!0)),f?.events.off("floating.closed",r)};function e(){d.openChangeTimeout.clear(),w.clear(),f?.events.off("floating.closed",r),b()}function t(e){if(f&&p&&(0,D.getNodeChildren)(f.nodesRef.current,p).length>0)return void f.events.on("floating.closed",r);if(!v(e.relatedTarget)){if(d.handler)return void d.handler(e);b(),m()||y(e)}}function r(e){f&&p&&!((0,D.getNodeChildren)(f.nodesRef.current,p).length>0)&&w.start(0,()=>{f.events.off("floating.closed",r),n.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.triggerHover,e)),f.events.emit("floating.closed",e)})}},[s,o,n,l,m,v,y,b,E,d,f,p,w])}e.s(["useHoverFloatingInteraction",0,e3],61896);var e8=e.i(84759),e6=e.i(89269),e9=e.i(92238);let te=r.createContext(void 0);function tt(e){let t=r.useContext(te);if(void 0===t&&!e)throw Error((0,d.default)(69));return t}e.s(["useToolbarRootContext",0,tt],60752);let tn=r.createContext(void 0);function tr(e){let{value:t,children:r}=e;return(0,n.jsx)(tn.Provider,{value:t,children:r})}let ti={...M.popupStateMapping,...e8.transitionStatusMapping},to=r.forwardRef(function(e,t){let{className:i,render:o,initialFocus:a,finalFocus:l,...s}=e,{store:u}=p(),c=ef(),d=null!=tt(!0),{context:f,hasClosePart:m}=function(){let[e,t]=r.useState(0),n=(0,A.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),g=u.useState("open"),v=u.useState("openMethod"),h=u.useState("instantType"),y=u.useState("transitionStatus"),b=u.useState("popupProps"),E=u.useState("titleElementId"),w=u.useState("descriptionElementId"),S=u.useState("modal"),C=u.useState("mounted"),R=u.useState("openChangeReason"),O=u.useState("activeTriggerElement"),k=u.useState("floatingRootContext");(0,e6.useOpenChangeComplete)({open:g,ref:u.context.popupRef,onComplete(){g&&u.context.onOpenChangeComplete?.(!0)}});let T=u.useState("disabled");e3(k,{enabled:u.useState("openOnHover")&&!T,closeDelay:u.useState("closeDelay")});let N=void 0===a?function(e){return"touch"!==e||u.context.popupRef.current}:a,P={open:g,side:c.side,align:c.align,instant:h,transitionStatus:y},M=r.useCallback(e=>{u.set("popupElement",e)},[u]),L=(0,I.useRenderElement)("div",e,{state:P,ref:[t,u.context.popupRef,M],props:[b,{"aria-labelledby":E,"aria-describedby":w,onKeyDown(e){d&&e9.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},e5(y),s],stateAttributesMapping:ti});return(0,n.jsx)(e4.FloatingFocusManager,{context:k,openInteractionType:v,modal:!1!==S&&m,disabled:!C||R===x.REASONS.triggerHover,initialFocus:N,returnFocus:l,restoreFocus:"popup",previousFocusableElement:(0,j.isHTMLElement)(O)?O:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(tr,{value:f,children:L})})}),ta=r.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:o}=p(),a=o.useState("open"),{arrowRef:l,side:s,align:u,arrowUncentered:c,arrowStyles:d}=ef();return(0,I.useRenderElement)("div",e,{state:{open:a,side:s,align:u,uncentered:c},ref:[t,l],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:M.popupStateMapping})}),tl={...M.popupStateMapping,...e8.transitionStatusMapping},ts=r.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:o}=p(),a=o.useState("open"),l=o.useState("mounted"),s=o.useState("transitionStatus"),u=o.useState("openChangeReason");return(0,I.useRenderElement)("div",e,{state:{open:a,transitionStatus:s},ref:[o.context.backdropRef,t],props:[{role:"presentation",hidden:!l,style:{pointerEvents:u===x.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:tl})}),tu=r.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:o}=p(),a=(0,en.useBaseUiId)(i.id);return(0,ec.useIsoLayoutEffect)(()=>(o.set("titleElementId",a),()=>{o.set("titleElementId",void 0)}),[o,a]),(0,I.useRenderElement)("h2",e,{ref:t,props:[{id:a},i]})}),tc=r.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:o}=p(),a=(0,en.useBaseUiId)(i.id);return(0,ec.useIsoLayoutEffect)(()=>(o.set("descriptionElementId",a),()=>{o.set("descriptionElementId",void 0)}),[o,a]),(0,I.useRenderElement)("p",e,{ref:t,props:[{id:a},i]})}),td=r.forwardRef(function(e,t){let n,{render:i,className:o,disabled:a=!1,nativeButton:l=!0,...s}=e,{buttonRef:u,getButtonProps:c}=(0,P.useButton)({disabled:a,focusableWhenDisabled:!1,native:l}),{store:d}=p();return n=r.useContext(tn),(0,ec.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,I.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){d.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.closePress,e.nativeEvent,e.currentTarget))}},s,c]})}),tf=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var tp=e.i(47135);function tm(e){let t=(0,j.getComputedStyle)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=(0,j.isHTMLElement)(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return((0,ep.round)(n)!==o||(0,ep.round)(r)!==a)&&(n=o,r=a),{width:n,height:r}}let tg=()=>!0;function tv(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function th(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(tv(e,r,i));return n.length?()=>{n.forEach(e=>e())}:e2.NOOP}function ty(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 tb(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)}function tx(e){let t,{store:i,side:o,cssVars:a,children:l}=e,s=eU(),u=i.useState("activeTriggerElement"),c=i.useState("activeTriggerId"),d=i.useState("open"),f=i.useState("payload"),p=i.useState("mounted"),g=i.useState("popupElement"),v=i.useState("positionerElement"),h=function(e){let[t,n]=r.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}(d?u:null),y=function(e,t){let[n,i]=r.useState(0),o=r.useRef(e),a=r.useRef(t),l=r.useRef(!1);return(0,ec.useIsoLayoutEffect)(()=>{let n=o.current,r=t!==a.current;e!==n?(i(e=>e+1),l.current=!r):l.current&&r&&(i(e=>e+1),l.current=!1),o.current=e,a.current=t},[e,t]),`${e??"current"}-${n}`}(c,f),b=r.useRef(null),[x,E]=r.useState(null),[w,S]=r.useState(null),C=r.useRef(null),R=r.useRef(null),O=(0,e1.useAnimationsFinished)(C,!0,!1),k=(0,tp.useAnimationFrame)(),[T,N]=r.useState(null),[P,M]=r.useState(!1);(0,ec.useIsoLayoutEffect)(()=>(i.set("hasViewport",!0),()=>{i.set("hasViewport",!1)}),[i]);let I=(0,A.useStableCallback)(()=>{C.current?.style.setProperty("animation","none"),C.current?.style.setProperty("transition","none"),R.current?.style.setProperty("display","none")}),j=(0,A.useStableCallback)(e=>{C.current?.style.removeProperty("animation"),C.current?.style.removeProperty("transition"),R.current?.style.removeProperty("display"),e&&N(e)}),L=r.useRef(null);(0,ec.useIsoLayoutEffect)(()=>{var e,t;let n,r,i,o;u&&h&&u!==h&&L.current!==u&&b.current&&(E(b.current),M(!0),S((e=h,t=u,n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},{horizontal:(o={x:r.left+r.width/2,y:r.top+r.height/2}).x-i.x,vertical:o.y-i.y})),k.request(()=>{m.flushSync(()=>{M(!1)}),O(()=>{E(null),N(null),b.current=null})}),L.current=u)},[u,h,x,O,k]),(0,ec.useIsoLayoutEffect)(()=>{let e=C.current;if(!e)return;let t=document.createElement("div");for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));b.current=t});let D=null!=x;return t=D?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("div",{"data-previous":!0,inert:(0,eu.inertValue)(!0),ref:R,style:{...T?{[a.popupWidth]:`${T.width}px`,[a.popupHeight]:`${T.height}px`}:null,position:"absolute"},"data-ending-style":P?void 0:""},"previous"),(0,n.jsx)("div",{"data-current":!0,ref:C,"data-starting-style":P?"":void 0,children:l},y)]}):(0,n.jsx)("div",{"data-current":!0,ref:C,children:l},y),(0,ec.useIsoLayoutEffect)(()=>{let e=R.current;e&&x&&e.replaceChildren(...Array.from(x.childNodes))},[x]),!function(e){let{popupElement:t,positionerElement:n,content:i,mounted:o,enabled:a=tg,onMeasureLayout:l,onMeasureLayoutComplete:s,side:u,direction:c}=e,d=(0,e1.useAnimationsFinished)(t,!0,!1),f=(0,tp.useAnimationFrame)(),p=r.useRef(null),m=r.useRef(null),g=r.useRef(!0),v=r.useRef(e2.NOOP),h=(0,A.useStableCallback)(l),y=(0,A.useStableCallback)(s),b=r.useMemo(()=>{let e="top"===u,t="left"===u;return"rtl"===c?(e=e||"inline-end"===u,t=t||"inline-end"===u):(e=e||"inline-start"===u,t=t||"inline-start"===u),e?{position:"absolute",["top"===u?"bottom":"top"]:"0",[t?"right":"left"]:"0"}:e2.EMPTY_OBJECT},[u,c]);(0,ec.useIsoLayoutEffect)(()=>{if(!o||!a()||"function"!=typeof ResizeObserver){v.current=e2.NOOP,g.current=!0,p.current=null,m.current=null;return}if(!t||!n)return;v.current=th(t,b);let e=new ResizeObserver(e=>{let t=e[0];t&&(m.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(t),ty(t,"auto");let r=tv(t,"position","static"),i=tv(t,"transform","none"),l=tv(t,"scale","1"),s=th(n,{"--available-width":"max-content","--available-height":"max-content"});function u(){r(),i(),s(),l()}if(h?.(),g.current||null===p.current){tb(n,"max-content");let r=tm(t);return p.current=r,tb(n,r),u(),y?.(null,r),g.current=!1,()=>{e.disconnect(),v.current(),v.current=e2.NOOP}}ty(t,"auto"),tb(n,"max-content");let c=p.current??m.current,x=tm(t);if(p.current=x,!c)return tb(n,x),u(),y?.(null,x),()=>{e.disconnect(),f.cancel(),v.current(),v.current=e2.NOOP};ty(t,c),u(),y?.(c,x),tb(n,x);let E=new AbortController;return f.request(()=>{ty(t,x),d(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},E.signal)}),()=>{e.disconnect(),E.abort(),f.cancel(),v.current(),v.current=e2.NOOP}},[i,t,n,d,f,a,o,h,y,b])}({popupElement:g,positionerElement:v,mounted:p,content:f,onMeasureLayout:I,onMeasureLayoutComplete:j,side:o,direction:s}),{children:t,state:{activationDirection:function(e){if(e)return`${function(e,t,n,r){return e>t?n:e<-t?r:""}(e.horizontal,5,"right","left")} ${function(e,t,n,r){return e>t?n:e<-t?r:""}(e.vertical,5,"down","up")}`}(w),transitioning:D}}}e.s(["usePopupViewport",0,tx],12666);let tE={activationDirection:e=>e?{"data-activation-direction":e}:null},tw=r.forwardRef(function(e,t){let{render:n,className:r,children:i,...o}=e,{store:a}=p(),{side:l}=ef(),s=a.useState("instantType"),{children:u,state:c}=tx({store:a,side:l,cssVars:tf,children:i}),d={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:s};return(0,I.useRenderElement)("div",e,{state:d,ref:t,props:[o,{children:u}],stateAttributesMapping:tE})});class tS{constructor(){this.store=new R}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,d.default)(80,e));this.store.setOpen(!0,(0,O.createChangeEventDetails)(x.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,O.createChangeEventDetails)(x.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ta,"Backdrop",0,ts,"Close",0,td,"Description",0,tc,"Handle",0,tS,"Popup",0,to,"Portal",0,es,"Positioner",0,e7,"Root",0,function(e){return p(!0)?(0,n.jsx)(N,{props:e}):(0,n.jsx)(u.FloatingTree,{children:(0,n.jsx)(N,{props:e})})},"Title",0,tu,"Trigger",0,eo,"Viewport",0,tw,"createHandle",0,function(){return new tS}],7311);var tC=e.i(7311),tC=tC,tR=e.i(52088);e.s(["Popover",0,function({...e}){return(0,n.jsx)(tC.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:o=4,...a}){return(0,n.jsx)(tC.Portal,{children:(0,n.jsx)(tC.Positioner,{align:t,alignOffset:r,side:i,sideOffset:o,className:"isolate z-50",children:(0,n.jsx)(tC.Popup,{"data-slot":"popover-content",className:(0,tR.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})},"PopoverDescription",0,function({className:e,...t}){return(0,n.jsx)(tC.Description,{"data-slot":"popover-description",className:(0,tR.cn)("text-muted-foreground",e),...t})},"PopoverHeader",0,function({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"popover-header",className:(0,tR.cn)("flex flex-col gap-1 text-xs",e),...t})},"PopoverTitle",0,function({className:e,...t}){return(0,n.jsx)(tC.Title,{"data-slot":"popover-title",className:(0,tR.cn)("font-heading text-sm font-medium",e),...t})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(tC.Trigger,{"data-slot":"popover-trigger",...e})}],37837)},70352,e=>{"use strict";let t,n,r;var i,o,a,l,s,u,c,d,f,p=/[\\\/_+.#"@\[\(\{&]/,m=/[\\\/_+.#"@\[\(\{&]/g,g=/[\s-]/,v=/[\s-]/g;function h(e){return e.toLowerCase().replace(v," ")}var y=e.i(71645);function b(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function x(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function E(...e){return t=>{let n=!1,r=e.map(e=>{let r=x(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():x(e[t],null)}}}}function w(...e){return y.useCallback(E(...e),e)}"u">typeof window&&window.document&&window.document.createElement;var S=e.i(18050),C=globalThis?.document?y.useLayoutEffect:()=>{},R=y[" useId ".trim().toString()]||(()=>void 0),O=0;function k(e){let[t,n]=y.useState(R());return C(()=>{e||n(e=>e??String(O++))},[e]),e||(t?`radix-${t}`:"")}y[" useEffectEvent ".trim().toString()],y[" useInsertionEffect ".trim().toString()];var T=y[" useInsertionEffect ".trim().toString()]||C;Symbol("RADIX:SYNC_STATE");var N=e.i(74080);function A(e){var t;let n,r=(t=e,(n=y.forwardRef((e,t)=>{let{children:n,...r}=e;if(y.isValidElement(n)){var i;let e,o,a=(i=n,(o=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(o=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),l=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==y.Fragment&&(l.ref=t?E(t,a):a),y.cloneElement(n,l)}return y.Children.count(n)>1?y.Children.only(null):null})).displayName=`${t}.SlotClone`,n),i=y.forwardRef((e,t)=>{let{children:n,...i}=e,o=y.Children.toArray(n),a=o.find(M);if(a){let e=a.props.children,n=o.map(t=>t!==a?t:y.Children.count(e)>1?y.Children.only(null):y.isValidElement(e)?e.props.children:null);return(0,S.jsx)(r,{...i,ref:t,children:y.isValidElement(e)?y.cloneElement(e,void 0,n):null})}return(0,S.jsx)(r,{...i,ref:t,children:n})});return i.displayName=`${e}.Slot`,i}var P=Symbol("radix.slottable");function M(e){return y.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===P}var I=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=A(`Primitive.${t}`),r=y.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,S.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function j(e){let t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...e)=>t.current?.(...e),[])}var L="dismissableLayer.update",D=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),F=y.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...u}=e,c=y.useContext(D),[d,f]=y.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=y.useState({}),g=w(t,e=>f(e)),v=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(h),E=d?v.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,R=E>=x,O=function(e,t=globalThis?.document){let n=j(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){$("dismissableLayer.pointerDownOutside",n,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...c.branches].some(e=>e.contains(t));R&&!n&&(o?.(e),l?.(e),e.defaultPrevented||s?.())},p),k=function(e,t=globalThis?.document){let n=j(e),r=y.useRef(!1);return y.useEffect(()=>{let e=e=>{e.target&&!r.current&&$("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;![...c.branches].some(e=>e.contains(t))&&(a?.(e),l?.(e),e.defaultPrevented||s?.())},p);return!function(e,t=globalThis?.document){let n=j(e);y.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{E===c.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},p),y.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(i=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),V(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=i)}},[d,p,n,c]),y.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),V())},[d,c]),y.useEffect(()=>{let e=()=>m({});return document.addEventListener(L,e),()=>document.removeEventListener(L,e)},[]),(0,S.jsx)(I.div,{...u,ref:g,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:b(e.onFocusCapture,k.onFocusCapture),onBlurCapture:b(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:b(e.onPointerDownCapture,O.onPointerDownCapture)})});function V(){let e=new CustomEvent(L);document.dispatchEvent(e)}function $(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&i.addEventListener(e,t,{once:!0}),r)i&&N.flushSync(()=>i.dispatchEvent(o));else i.dispatchEvent(o)}F.displayName="DismissableLayer",y.forwardRef((e,t)=>{let n=y.useContext(D),r=y.useRef(null),i=w(t,r);return y.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,S.jsx)(I.div,{...e,ref:i})}).displayName="DismissableLayerBranch";var _=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=A(`Primitive.${t}`),r=y.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,S.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),B="focusScope.autoFocusOnMount",W="focusScope.autoFocusOnUnmount",H={bubbles:!1,cancelable:!0},z=y.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[l,s]=y.useState(null),u=j(i),c=j(o),d=y.useRef(null),f=w(t,e=>s(e)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;let t=e.target;l.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||Y(d.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(l)});return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,l,p.paused]),y.useEffect(()=>{if(l){q.add(p);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(B,H);l.addEventListener(B,u),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}(U(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&Y(l))}return()=>{l.removeEventListener(B,u),setTimeout(()=>{let t=new CustomEvent(W,H);l.addEventListener(W,c),l.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),l.removeEventListener(W,c),q.remove(p)},0)}}},[l,u,c,p]);let m=y.useCallback(e=>{if(!n&&!r||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){var o;let t,r=e.currentTarget,[a,l]=[K(t=U(o=r),o),K(t.reverse(),o)];a&&l?e.shiftKey||i!==l?e.shiftKey&&i===a&&(e.preventDefault(),n&&Y(l,{select:!0})):(e.preventDefault(),n&&Y(a,{select:!0})):i===r&&e.preventDefault()}},[n,r,p.paused]);return(0,S.jsx)(_.div,{tabIndex:-1,...a,ref:f,onKeyDown:m})});function U(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function K(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function Y(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}z.displayName="FocusScope";var q=(r=[],{add(e){let t=r[0];e!==t&&t?.pause(),(r=X(r,e)).unshift(e)},remove(e){r=X(r,e),r[0]?.resume()}});function X(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var G=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=A(`Primitive.${t}`),r=y.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,S.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),J=y.forwardRef((e,t)=>{let{container:n,...r}=e,[i,o]=y.useState(!1);C(()=>o(!0),[]);let a=n||i&&globalThis?.document?.body;return a?N.default.createPortal((0,S.jsx)(G.div,{...r,ref:t}),a):null});J.displayName="Portal";var Z=e=>{var t;let n,r,{present:i,children:o}=e,a=function(e){var t,n;let[r,i]=y.useState(),o=y.useRef(null),a=y.useRef(e),l=y.useRef("none"),[s,u]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},y.useReducer((e,t)=>n[e][t]??e,t));return y.useEffect(()=>{let e=Q(o.current);l.current="mounted"===s?e:"none"},[s]),C(()=>{let t=o.current,n=a.current;if(n!==e){let r=l.current,i=Q(t);e?u("MOUNT"):"none"===i||t?.display==="none"?u("UNMOUNT"):n&&r!==i?u("ANIMATION_OUT"):u("UNMOUNT"),a.current=e}},[e,u]),C(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let i=Q(o.current).includes(CSS.escape(n.animationName));if(n.target===r&&i&&(u("ANIMATION_END"),!a.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},i=e=>{e.target===r&&(l.current=Q(o.current))};return r.addEventListener("animationstart",i),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",i),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(e=>{o.current=e?getComputedStyle(e):null,i(e)},[])}}(i),l="function"==typeof o?o({present:a.isPresent}):y.Children.only(o),s=w(a.ref,(t=l,(r=(n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.ref:(r=(n=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof o||a.isPresent?y.cloneElement(l,{ref:s}):null};function Q(e){return e?.animationName||"none"}Z.displayName="Presence";var ee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=A(`Primitive.${t}`),r=y.forwardRef((e,r)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,S.jsx)(i?n:t,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),et=0;function en(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var er=function(){return(er=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ei(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var eo=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ea="width-before-scroll-bar";function el(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var es="u">typeof window?y.useLayoutEffect:y.useEffect,eu=new WeakMap,ec=(void 0===a&&(a={}),(void 0===l&&(l=function(e){return e}),s=[],u=!1,c={read:function(){if(u)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:null},useMedium:function(e){var t=l(e,u);return s.push(t),function(){s=s.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(u=!0;s.length;){var t=s;s=[],t.forEach(e)}s={push:function(t){return e(t)},filter:function(){return s}}},assignMedium:function(e){u=!0;var t=[];if(s.length){var n=s;s=[],n.forEach(e),t=s}var r=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(r)};i(),s={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),s}}}}).options=er({async:!0,ssr:!1},a),c),ed=function(){},ef=y.forwardRef(function(e,t){var n,r,i,o,a=y.useRef(null),l=y.useState({onScrollCapture:ed,onWheelCapture:ed,onTouchMoveCapture:ed}),s=l[0],u=l[1],c=e.forwardProps,d=e.children,f=e.className,p=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,h=e.noRelative,b=e.noIsolation,x=e.inert,E=e.allowPinchZoom,w=e.as,S=e.gapMode,C=ei(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=(n=[a,t],r=function(e){return n.forEach(function(t){return el(t,e)})},(i=(0,y.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,o=i.facade,es(function(){var e=eu.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||el(e,null)}),r.forEach(function(e){t.has(e)||el(e,i)})}eu.set(o,n)},[n]),o),O=er(er({},C),s);return y.createElement(y.Fragment,null,m&&y.createElement(v,{sideCar:ec,removeScrollBar:p,shards:g,noRelative:h,noIsolation:b,inert:x,setCallbacks:u,allowPinchZoom:!!E,lockRef:a,gapMode:S}),c?y.cloneElement(y.Children.only(d),er(er({},O),{ref:R})):y.createElement(void 0===w?"div":w,er({},O,{className:f,ref:R}),d))});ef.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ef.classNames={fullWidth:ea,zeroRight:eo};var ep=function(e){var t=e.sideCar,n=ei(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return y.createElement(r,er({},n))};ep.isSideCarExport=!0;var em=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,i;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eg=function(){var e=em();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ev=function(){var e=eg();return function(t){return e(t.styles,t.dynamic),null}},eh={left:0,top:0,right:0,gap:0},ey=function(e){return parseInt(e||"",10)||0},eb=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[ey(n),ey(r),ey(i)]},ex=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return eh;var t=eb(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},eE=ev(),ew="data-scroll-locked",eS=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(ew,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(eo," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(ea," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(eo," .").concat(eo," {\n right: 0 ").concat(r,";\n }\n \n .").concat(ea," .").concat(ea," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(ew,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},eC=function(){var e=parseInt(document.body.getAttribute(ew)||"0",10);return isFinite(e)?e:0},eR=function(){y.useEffect(function(){return document.body.setAttribute(ew,(eC()+1).toString()),function(){var e=eC()-1;e<=0?document.body.removeAttribute(ew):document.body.setAttribute(ew,e.toString())}},[])},eO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;eR();var o=y.useMemo(function(){return ex(i)},[i]);return y.createElement(eE,{styles:eS(o,!t,i,n?"":"!important")})},ek=!1;if("u">typeof window)try{var eT=Object.defineProperty({},"passive",{get:function(){return ek=!0,!0}});window.addEventListener("test",eT,eT),window.removeEventListener("test",eT,eT)}catch(e){ek=!1}var eN=!!ek&&{passive:!1},eA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},eP=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),eM(e,r)){var i=eI(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},eM=function(e,t){return"v"===e?eA(t,"overflowY"):eA(t,"overflowX")},eI=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},ej=function(e,t,n,r,i){var o,a=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),l=a*r,s=n.target,u=t.contains(s),c=!1,d=l>0,f=0,p=0;do{if(!s)break;var m=eI(e,s),g=m[0],v=m[1]-m[2]-a*g;(g||v)&&eM(e,s)&&(f+=v,p+=g);var h=s.parentNode;s=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(i&&1>Math.abs(f)||!i&&l>f)?c=!0:!d&&(i&&1>Math.abs(p)||!i&&-l>p)&&(c=!0),c},eL=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eD=function(e){return[e.deltaX,e.deltaY]},eF=function(e){return e&&"current"in e?e.current:e},eV=0,e$=[];let e_=(d=function(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(eV++)[0],o=y.useState(ev)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(eF),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var i,o=eL(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],u="deltaY"in e?e.deltaY:l[1]-o[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var m=eP(d,c);if(!m)return!0;if(m?i=d:(i="v"===d?"h":"v",m=eP(d,c)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=i),!i)return!0;var g=r.current||i;return ej(g,t,e,"h"===g?s:u,!0)},[]),s=y.useCallback(function(e){if(e$.length&&e$[e$.length-1]===o){var n="deltaY"in e?eD(e):eL(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(a.current.shards||[]).map(eF).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=y.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=y.useCallback(function(e){n.current=eL(e),r.current=void 0},[]),d=y.useCallback(function(t){u(t.type,eD(t),t.target,l(t,e.lockRef.current))},[]),f=y.useCallback(function(t){u(t.type,eL(t),t.target,l(t,e.lockRef.current))},[]);y.useEffect(function(){return e$.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,eN),document.addEventListener("touchmove",s,eN),document.addEventListener("touchstart",c,eN),function(){e$=e$.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,eN),document.removeEventListener("touchmove",s,eN),document.removeEventListener("touchstart",c,eN)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?y.createElement(eO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},ec.useMedium(d),ep);var eB=y.forwardRef(function(e,t){return y.createElement(ef,er({},e,{ref:t,sideCar:e_}))});eB.classNames=ef.classNames;var eW=new WeakMap,eH=new WeakMap,ez={},eU=0,eK=function(e){return e&&(e.host||eK(e.parentNode))},eY=function(e,t,n,r){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=eK(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});ez[n]||(ez[n]=new WeakMap);var o=ez[n],a=[],l=new Set,s=new Set(i),u=function(e){!e||l.has(e)||(l.add(e),u(e.parentNode))};i.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(l.has(e))c(e);else try{var t=e.getAttribute(r),i=null!==t&&"false"!==t,s=(eW.get(e)||0)+1,u=(o.get(e)||0)+1;eW.set(e,s),o.set(e,u),a.push(e),1===s&&i&&eH.set(e,!0),1===u&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),l.clear(),eU++,function(){a.forEach(function(e){var t=eW.get(e)-1,i=o.get(e)-1;eW.set(e,t),o.set(e,i),t||(eH.has(e)||e.removeAttribute(r),eH.delete(e)),i||e.removeAttribute(n)}),--eU||(eW=new WeakMap,eW=new WeakMap,eH=new WeakMap,ez={})}},eq=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),eY(r,i,n,"aria-hidden")):function(){return null}},eX="Dialog",[eG,eJ]=function(e,t=[]){let n=[],r=()=>{let t=n.map(e=>y.createContext(e));return function(n){let r=n?.[e]||t;return y.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let i=y.createContext(r),o=n.length;n=[...n,r];let a=t=>{let{scope:n,children:r,...a}=t,l=n?.[e]?.[o]||i,s=y.useMemo(()=>a,Object.values(a));return(0,S.jsx)(l.Provider,{value:s,children:r})};return a.displayName=t+"Provider",[a,function(n,a){let l=a?.[e]?.[o]||i,s=y.useContext(l);if(s)return s;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}(eX),[eZ,eQ]=eG(eX),e0=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=y.useRef(null),s=y.useRef(null),[u,c]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,o,a]=function({defaultProp:e,onChange:t}){let[n,r]=y.useState(e),i=y.useRef(n),o=y.useRef(t);return T(()=>{o.current=t},[t]),y.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:i;{let t=y.useRef(void 0!==e);y.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,r])}return[s,y.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&a.current?.(n)}else o(t)},[l,e,o,a])]}({prop:r,defaultProp:i??!1,onChange:o,caller:eX});return(0,S.jsx)(eZ,{scope:t,triggerRef:l,contentRef:s,contentId:k(),titleId:k(),descriptionId:k(),open:u,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(e=>!e),[c]),modal:a,children:n})};e0.displayName=eX;var e1="DialogTrigger";y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eQ(e1,n),o=w(t,i.triggerRef);return(0,S.jsx)(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ts(i.open),...r,ref:o,onClick:b(e.onClick,i.onOpenToggle)})}).displayName=e1;var e2="DialogPortal",[e5,e7]=eG(e2,{forceMount:void 0}),e4=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=eQ(e2,t);return(0,S.jsx)(e5,{scope:t,forceMount:n,children:y.Children.map(r,e=>(0,S.jsx)(Z,{present:n||o.open,children:(0,S.jsx)(J,{asChild:!0,container:i,children:e})}))})};e4.displayName=e2;var e3="DialogOverlay",e8=y.forwardRef((e,t)=>{let n=e7(e3,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eQ(e3,e.__scopeDialog);return o.modal?(0,S.jsx)(Z,{present:r||o.open,children:(0,S.jsx)(e9,{...i,ref:t})}):null});e8.displayName=e3;var e6=A("DialogOverlay.RemoveScroll"),e9=y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eQ(e3,n);return(0,S.jsx)(eB,{as:e6,allowPinchZoom:!0,shards:[i.contentRef],children:(0,S.jsx)(ee.div,{"data-state":ts(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),te="DialogContent",tt=y.forwardRef((e,t)=>{let n=e7(te,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=eQ(te,e.__scopeDialog);return(0,S.jsx)(Z,{present:r||o.open,children:o.modal?(0,S.jsx)(tn,{...i,ref:t}):(0,S.jsx)(tr,{...i,ref:t})})});tt.displayName=te;var tn=y.forwardRef((e,t)=>{let n=eQ(te,e.__scopeDialog),r=y.useRef(null),i=w(t,n.contentRef,r);return y.useEffect(()=>{let e=r.current;if(e)return eq(e)},[]),(0,S.jsx)(ti,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:b(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:b(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:b(e.onFocusOutside,e=>e.preventDefault())})}),tr=y.forwardRef((e,t)=>{let n=eQ(te,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return(0,S.jsx)(ti,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),ti=y.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,l=eQ(te,n),s=y.useRef(null),u=w(t,s);return y.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??en()),document.body.insertAdjacentElement("beforeend",e[1]??en()),et++,()=>{1===et&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),et--}},[]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,S.jsx)(F,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ts(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(tf,{titleId:l.titleId}),(0,S.jsx)(tp,{contentRef:s,descriptionId:l.descriptionId})]})]})}),to="DialogTitle";y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eQ(to,n);return(0,S.jsx)(ee.h2,{id:i.titleId,...r,ref:t})}).displayName=to;var ta="DialogDescription";y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eQ(ta,n);return(0,S.jsx)(ee.p,{id:i.descriptionId,...r,ref:t})}).displayName=ta;var tl="DialogClose";function ts(e){return e?"open":"closed"}y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=eQ(tl,n);return(0,S.jsx)(ee.button,{type:"button",...r,ref:t,onClick:b(e.onClick,()=>i.onOpenChange(!1))})}).displayName=tl;var tu="DialogTitleWarning",[tc,td]=(f={contentName:te,titleName:to,docsSlug:"dialog"},t=y.createContext(f),(n=e=>{let{children:n,...r}=e,i=y.useMemo(()=>r,Object.values(r));return(0,S.jsx)(t.Provider,{value:i,children:n})}).displayName=tu+"Provider",[n,function(e){let n=y.useContext(t);if(n)return n;if(void 0!==f)return f;throw Error(`\`${e}\` must be used within \`${tu}\``)}]),tf=({titleId:e})=>{let t=td(tu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
-
3
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
-
5
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},tp=({contentRef:e,descriptionId:t})=>{let n=td("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return y.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},tm=Symbol.for("react.lazy"),tg=y[" use ".trim().toString()];function tv(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===tm&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var th=Symbol("radix.slottable");function ty(e){return y.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===th}var tb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var n,r;let i,o,a,l=(r=n=`Primitive.${t}`,(i=y.forwardRef((e,t)=>{let{children:n,...r}=e;if(tv(n)&&"function"==typeof tg&&(n=tg(n._payload)),y.isValidElement(n)){var i;let e,o,a=(i=n,(o=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(o=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),l=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==y.Fragment&&(l.ref=t?E(t,a):a),y.cloneElement(n,l)}return y.Children.count(n)>1?y.Children.only(null):null})).displayName=`${r}.SlotClone`,o=i,(a=y.forwardRef((e,t)=>{let{children:n,...r}=e;tv(n)&&"function"==typeof tg&&(n=tg(n._payload));let i=y.Children.toArray(n),a=i.find(ty);if(a){let e=a.props.children,n=i.map(t=>t!==a?t:y.Children.count(e)>1?y.Children.only(null):y.isValidElement(e)?e.props.children:null);return(0,S.jsx)(o,{...r,ref:t,children:y.isValidElement(e)?y.cloneElement(e,void 0,n):null})}return(0,S.jsx)(o,{...r,ref:t,children:n})})).displayName=`${n}.Slot`,a),s=y.forwardRef((e,n)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,S.jsx)(r?l:t,{...i,ref:n})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),tx='[cmdk-group=""]',tE='[cmdk-group-items=""]',tw='[cmdk-item=""]',tS=`${tw}:not([aria-disabled="true"])`,tC="cmdk-item-select",tR="data-value",tO=(e,t,n)=>{var r;return r=e,function e(t,n,r,i,o,a,l){if(a===n.length)return o===t.length?1:.99;var s=`${o},${a}`;if(void 0!==l[s])return l[s];for(var u,c,d,f,h=i.charAt(a),y=r.indexOf(h,o),b=0;y>=0;)(u=e(t,n,r,i,y+1,a+1,l))>b&&(y===o?u*=1:p.test(t.charAt(y-1))?(u*=.8,(d=t.slice(o,y-1).match(m))&&o>0&&(u*=Math.pow(.999,d.length))):g.test(t.charAt(y-1))?(u*=.9,(f=t.slice(o,y-1).match(v))&&o>0&&(u*=Math.pow(.999,f.length))):(u*=.17,o>0&&(u*=Math.pow(.999,y-o))),t.charAt(y)!==n.charAt(a)&&(u*=.9999)),(u<.1&&r.charAt(y-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&r.charAt(y-1)!==i.charAt(a))&&.1*(c=e(t,n,r,i,y+1,a+2,l))>u&&(u=.1*c),u>b&&(b=u),y=r.indexOf(h,y+1);return l[s]=b,b}(r=n&&n.length>0?`${r+" "+n.join(" ")}`:r,t,h(r),h(t),0,0,{})},tk=y.createContext(void 0),tT=y.createContext(void 0),tN=y.createContext(void 0),tA=y.forwardRef((e,t)=>{let n=t_(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=t_(()=>new Set),i=t_(()=>new Map),o=t_(()=>new Map),a=t_(()=>new Set),l=tV(e),{label:s,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:g=!1,vimBindings:v=!0,...h}=e,b=k(),x=k(),E=k(),w=y.useRef(null),S=tH();t$(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,C.emit()}},[c]),t$(()=>{S(6,P)},[]);let C=y.useMemo(()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,o,a,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)A(),T(),S(1,N);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(E);e?e.focus():null==(i=document.getElementById(b))||i.focus()}if(S(7,()=>{var e;n.current.selectedItemId=null==(e=M())?void 0:e.id,C.emit()}),r||S(5,P),(null==(o=l.current)?void 0:o.value)!==void 0){null==(s=(a=l.current).onValueChange)||s.call(a,null!=t?t:"");return}}C.emit()}},emit:()=>{a.current.forEach(e=>e())}}),[]),R=y.useMemo(()=>({value:(e,t,r)=>{var i;t!==(null==(i=o.current.get(e))?void 0:i.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,O(t,r)),S(2,()=>{T(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{A(),T(),n.current.value||N(),C.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();S(4,()=>{A(),(null==t?void 0:t.getAttribute("id"))===e&&N(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:E,labelId:x,listInnerRef:w}),[]);function O(e,t){var r,i;let o=null!=(i=null==(r=l.current)?void 0:r.filter)?i:tO;return e?o(e,n.current.search,t):0}function T(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),o=0;r.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([n,o])});let r=w.current;I().sort((t,n)=>{var r,i;let o=t.getAttribute("id"),a=n.getAttribute("id");return(null!=(r=e.get(a))?r:0)-(null!=(i=e.get(o))?i:0)}).forEach(e=>{let t=e.closest(tE);t?t.appendChild(e.parentElement===t?e:e.closest(`${tE} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${tE} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=w.current)?void 0:t.querySelector(`${tx}[${tR}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function N(){let e=I().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(tR);C.setState("value",t||void 0)}function A(){var e,t,a,s;if(!n.current.search||!1===l.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let u=0;for(let i of r.current){let r=O(null!=(t=null==(e=o.current.get(i))?void 0:e.value)?t:"",null!=(s=null==(a=o.current.get(i))?void 0:a.keywords)?s:[]);n.current.filtered.items.set(i,r),r>0&&u++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function P(){var e,t,n;let r=M();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(tx))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function M(){var e;return null==(e=w.current)?void 0:e.querySelector(`${tw}[aria-selected="true"]`)}function I(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(tS))||[])}function j(e){let t=I()[e];t&&C.setState("value",t.getAttribute(tR))}function L(e){var t;let n=M(),r=I(),i=r.findIndex(e=>e===n),o=r[i+e];null!=(t=l.current)&&t.loop&&(o=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),o&&C.setState("value",o.getAttribute(tR))}function D(e){let t=M(),n=null==t?void 0:t.closest(tx),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,tx):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,tx))?void 0:n.querySelector(tS);r?C.setState("value",r.getAttribute(tR)):L(e)}let F=()=>j(I().length-1),V=e=>{e.preventDefault(),e.metaKey?F():e.altKey?D(1):L(1)},$=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?D(-1):L(-1)};return y.createElement(tb.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=h.onKeyDown)||t.call(h,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||n))switch(e.key){case"n":case"j":v&&e.ctrlKey&&V(e);break;case"ArrowDown":V(e);break;case"p":case"k":v&&e.ctrlKey&&$(e);break;case"ArrowUp":$(e);break;case"Home":e.preventDefault(),j(0);break;case"End":e.preventDefault(),F();break;case"Enter":{e.preventDefault();let t=M();if(t){let e=new Event(tC);t.dispatchEvent(e)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:tU},s),tz(e,e=>y.createElement(tT.Provider,{value:C},y.createElement(tk.Provider,{value:R},e))))}),tP=y.forwardRef((e,t)=>{var n,r;let i=k(),o=y.useRef(null),a=y.useContext(tN),l=y.useContext(tk),s=tV(e),u=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==a?void 0:a.forceMount;t$(()=>{if(!u)return l.item(i,null==a?void 0:a.id)},[u]);let c=tW(i,o,[e.value,e.children,o],e.keywords),d=y.useContext(tT),f=tB(e=>e.value&&e.value===c.current),p=tB(e=>!!u||!1===l.filter()||!e.search||e.filtered.items.get(i)>0);function m(){var e,t;g(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function g(){d.setState("value",c.current,!0)}if(y.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(tC,m),()=>t.removeEventListener(tC,m)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:h,onSelect:b,forceMount:x,keywords:w,...S}=e;return y.createElement(tb.div,{ref:E(o,t),...S,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.getDisablePointerSelection()?void 0:g,onClick:v?void 0:m},e.children)}),tM=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=k(),l=y.useRef(null),s=y.useRef(null),u=k(),c=y.useContext(tk),d=tB(e=>!!i||!1===c.filter()||!e.search||e.filtered.groups.has(a));t$(()=>c.group(a),[]),tW(a,l,[e.value,e.heading,s]);let f=y.useMemo(()=>({id:a,forceMount:i}),[i]);return y.createElement(tb.div,{ref:E(l,t),...o,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&y.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),tz(e,e=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},y.createElement(tN.Provider,{value:f},e))))}),tI=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=tB(e=>!e.search);return n||o?y.createElement(tb.div,{ref:E(i,t),...r,"cmdk-separator":"",role:"separator"}):null}),tj=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=null!=e.value,o=y.useContext(tT),a=tB(e=>e.search),l=tB(e=>e.selectedItemId),s=y.useContext(tk);return y.useEffect(()=>{null!=e.value&&o.setState("search",e.value)},[e.value]),y.createElement(tb.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":l,id:s.inputId,type:"text",value:i?e.value:a,onChange:e=>{i||o.setState("search",e.target.value),null==n||n(e.target.value)}})}),tL=y.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=y.useRef(null),a=y.useRef(null),l=tB(e=>e.selectedItemId),s=y.useContext(tk);return y.useEffect(()=>{if(a.current&&o.current){let e=a.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),y.createElement(tb.div,{ref:E(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:s.listId},tz(e,e=>y.createElement("div",{ref:E(a,s.listInnerRef),"cmdk-list-sizer":""},e)))}),tD=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...l}=e;return y.createElement(e0,{open:n,onOpenChange:r},y.createElement(e4,{container:a},y.createElement(e8,{"cmdk-overlay":"",className:i}),y.createElement(tt,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(tA,{ref:t,...l}))))}),tF=Object.assign(tA,{List:tL,Item:tP,Input:tj,Group:tM,Separator:tI,Dialog:tD,Empty:y.forwardRef((e,t)=>tB(e=>0===e.filtered.count)?y.createElement(tb.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:y.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return y.createElement(tb.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},tz(e,e=>y.createElement("div",{"aria-hidden":!0},e)))})});function tV(e){let t=y.useRef(e);return t$(()=>{t.current=e}),t}var t$="u"<typeof window?y.useEffect:y.useLayoutEffect;function t_(e){let t=y.useRef();return void 0===t.current&&(t.current=e()),t}function tB(e){let t=y.useContext(tT),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function tW(e,t,n,r=[]){let i=y.useRef(),o=y.useContext(tk);return t$(()=>{var a;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),s=r.map(e=>e.trim());o.value(e,l,s),null==(a=t.current)||a.setAttribute(tR,l),i.current=l}),i}var tH=()=>{let[e,t]=y.useState(),n=t_(()=>new Map);return t$(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function tz({asChild:e,children:t},n){let r;return e&&y.isValidElement(t)?y.cloneElement("function"==typeof(r=t.type)?r(t.props):"render"in r?r.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var tU={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};e.s(["Command",0,tF],70352)},47161,54943,78784,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(44523),i=e.i(37727),o=e.i(37837),a=e.i(70352),l=e.i(52088);e.i(69068);var s=e.i(25913);function u({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,l.cn)("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...n})}e.i(85902),e.i(10012),e.i(41247);let c=(0,s.cva)("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function d({className:e,align:n="inline-start",...r}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:(0,l.cn)(c({align:n}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}(0,s.cva)("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});let f=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,f],54943);var p=e.i(78745);e.s(["CheckIcon",()=>p.default],78784);var p=p;function m({className:e,...n}){return(0,t.jsx)(a.Command,{"data-slot":"command",className:(0,l.cn)("flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground",e),...n})}function g({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,t.jsxs)(u,{className:"h-8! bg-input/20 dark:bg-input/30",children:[(0,t.jsx)(a.Command.Input,{"data-slot":"command-input",className:(0,l.cn)("w-full text-xs/relaxed outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...n}),(0,t.jsx)(d,{children:(0,t.jsx)(f,{className:"size-3.5 shrink-0 opacity-50"})})]})})}function v({className:e,...n}){return(0,t.jsx)(a.Command.List,{"data-slot":"command-list",className:(0,l.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...n})}function h({className:e,...n}){return(0,t.jsx)(a.Command.Empty,{"data-slot":"command-empty",className:(0,l.cn)("py-6 text-center text-xs/relaxed",e),...n})}function y({className:e,...n}){return(0,t.jsx)(a.Command.Group,{"data-slot":"command-group",className:(0,l.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2.5 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...n})}function b({className:e,children:n,...r}){return(0,t.jsxs)(a.Command.Item,{"data-slot":"command-item",className:(0,l.cn)("group/command-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2.5 py-1.5 text-xs/relaxed outline-hidden select-none in-data-[slot=dialog-content]:rounded-md data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-selected:*:[svg]:text-foreground",e),...r,children:[n,(0,t.jsx)(p.default,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}e.s(["Combobox",0,function({options:e,value:a,onChange:l,placeholder:s="Select option",disabled:u=!1,className:c="",allowCustomValue:d=!1,multiple:f=!1,onClear:p,showClearButton:x=!1}){let[E,w]=(0,n.useState)(!1),[S,C]=(0,n.useState)(""),R=(0,n.useRef)(null),O=(0,n.useMemo)(()=>Array.isArray(a)?a:[a],[a]),k=(0,n.useMemo)(()=>{if(f){if(1===O.length&&"all"===O[0]){let t=e.find(e=>"all"===e.value);return t?.label||""}return O.filter(e=>"all"!==e).map(t=>e.find(e=>e.value===t)?.label).filter(Boolean).join(", ")}return O.map(t=>e.find(e=>e.value===t)?.label).filter(Boolean).join(", ")},[O,e,f]),T=(0,n.useMemo)(()=>{let t={};for(let n of e){let e=n.group||"Other";t[e]||(t[e]=[]),t[e].push(n)}return t},[e]),N=(0,n.useMemo)(()=>Object.keys(T).length>1||!T.Other,[T]),A=e=>{if(f){let t=[...O],n=t.indexOf(e);n>=0?t.splice(n,1):t.push(e),l(t.length>0?t:[])}else l(e),w(!1)},P=()=>{d&&S&&!f&&(l(S),w(!1))};return(0,t.jsxs)(o.Popover,{open:E,onOpenChange:e=>{w(e),e||C("")},children:[(0,t.jsxs)("div",{className:`relative ${c}`,children:[(0,t.jsx)(o.PopoverTrigger,{ref:R,disabled:u,className:`flex h-9 w-full items-center justify-between pl-3 ${x?"pr-16":"pr-10"} border border-input rounded-md text-sm bg-input/20 dark:bg-input/30 text-foreground transition-colors outline-none hover:border-ring focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 data-[state=open]:border-ring data-[state=open]:ring-2 data-[state=open]:ring-ring/30 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap text-left shadow-xs`,children:(0,t.jsx)("span",{className:"truncate",children:k||(0,t.jsx)("span",{className:"text-muted-foreground",children:s})})}),x&&p&&(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),p()},className:"absolute right-8 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors cursor-pointer z-10","aria-label":"Clear selection",children:(0,t.jsx)(i.X,{className:"w-4 h-4"})}),(0,t.jsx)(r.ChevronsUpDown,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"})]}),(0,t.jsx)(o.PopoverContent,{className:"w-[var(--anchor-width)] p-0",align:"start",sideOffset:4,children:(0,t.jsxs)(m,{filter:(t,n)=>{let r=e.find(e=>e.value===t);return r?+!!`${r.label} ${r.group||""}`.toLowerCase().includes(n.toLowerCase()):0},children:[(0,t.jsx)(g,{placeholder:"Search...",value:S,onValueChange:C,onKeyDown:e=>{"Enter"===e.key&&d&&P()}}),(0,t.jsxs)(v,{children:[(0,t.jsx)(h,{children:d&&S?(0,t.jsxs)("button",{type:"button",className:"w-full px-2 py-1.5 text-left text-xs cursor-pointer hover:bg-accent rounded",onClick:P,children:['Use "',S,'"']}):"No options found"}),N?Object.entries(T).map(([e,n])=>(0,t.jsx)(y,{heading:e,children:n.map(e=>(0,t.jsx)(b,{value:e.value,"data-checked":O.includes(e.value),onSelect:()=>A(e.value),children:(0,t.jsx)("span",{className:"truncate",children:e.label})},e.value))},e)):(0,t.jsx)(y,{children:e.map(e=>(0,t.jsx)(b,{value:e.value,"data-checked":O.includes(e.value),onSelect:()=>A(e.value),children:(0,t.jsx)("span",{className:"truncate",children:e.label})},e.value))})]})]})})]})}],47161)},78917,e=>{"use strict";let t=(0,e.i(75254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],78917)},91810,e=>{"use strict";let t=(0,e.i(75254).default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);e.s(["RotateCw",0,t],91810)},43034,e=>{"use strict";let t=(0,e.i(75254).default)("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);e.s(["ArrowUpCircle",0,t],43034)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],74886)},99059,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(63209),i=e.i(43034),o=e.i(43531),a=e.i(74886),l=e.i(78917),s=e.i(31278),u=e.i(91810),c=e.i(85902),d=e.i(37837),f=e.i(57024),p=e.i(44142),m=e.i(52088);let g=["npm i -g @minimalcorp/tsunagi@latest","npx @minimalcorp/tsunagi@latest"];function v({command:e}){let[r,i]=(0,n.useState)(!1),l=async()=>{try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)}catch(e){console.error("Failed to copy command:",e)}};return(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-muted/50 pl-2",children:[(0,t.jsx)("code",{className:"flex-1 truncate font-mono text-xs",children:e}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",onClick:l,title:r?"Copied!":"Copy command","aria-label":r?"Copied to clipboard":"Copy command to clipboard",children:r?(0,t.jsx)(o.Check,{className:"text-success"}):(0,t.jsx)(a.Copy,{})})]})}function h(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"space-y-1.5",children:g.map(e=>(0,t.jsx)(v,{command:e},e))}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-muted-foreground",children:[(0,t.jsx)("span",{children:"Restart tsunagi to apply"}),(0,t.jsxs)("a",{href:"https://www.npmjs.com/package/@minimalcorp/tsunagi",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 hover:text-foreground",children:["npm",(0,t.jsx)(l.ExternalLink,{className:"size-3"})]})]})]})}function y(){let{restarting:e,restart:i}=(0,p.useRestartToUpdate)(),[o,a]=(0,n.useState)(!1),[l,d]=(0,n.useState)([]),m=async()=>{a(!0);try{let e=await i();d(e.ok?[]:e.blockers)}catch(e){f.toaster.create({type:"error",title:"Failed to restart",description:e instanceof Error?e.message:String(e)})}finally{a(!1)}};return e?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(s.Loader2,{className:"size-4 animate-spin"}),"Restarting..."]}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(c.Button,{className:"w-full",onClick:()=>void m(),disabled:o,children:[o?(0,t.jsx)(s.Loader2,{className:"animate-spin"}):(0,t.jsx)(u.RotateCw,{}),"Restart to update"]}),l.length>0?(0,t.jsxs)("div",{className:"space-y-1 text-warning",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(r.AlertCircle,{className:"size-3.5"}),"Wait for running tasks to finish"]}),(0,t.jsx)("ul",{className:"list-disc space-y-0.5 pl-5 text-muted-foreground",children:l.map(e=>(0,t.jsx)("li",{className:"truncate",children:e.title},e.taskId))})]}):(0,t.jsx)("p",{className:"text-muted-foreground",children:"Open terminal sessions will be closed."})]})}function b(){return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1 text-warning",children:[(0,t.jsx)(r.AlertCircle,{className:"mt-0.5 size-3.5 shrink-0"}),"Reinstall tsunagi to keep auto-update up to date"]}),(0,t.jsx)(v,{command:g[0]})]})}function x({status:e}){let{state:n,version:i,error:o}=e.autoUpdate;return"ready"===n?(0,t.jsx)(y,{}):"idle"===n||"installing"===n?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(s.Loader2,{className:"size-4 animate-spin"}),"Downloading v",i??e.latest,"..."]}):(0,t.jsxs)(t.Fragment,{children:["error"===n&&o&&(0,t.jsxs)("div",{className:"flex items-start gap-1 text-destructive",children:[(0,t.jsx)(r.AlertCircle,{className:"mt-0.5 size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"line-clamp-3 break-all",children:o})]}),(0,t.jsx)(h,{})]})}function E({status:e}){let{state:n,version:r}=e.autoUpdate,i="ready"===n&&r?r:e.latest;return(0,t.jsxs)(d.PopoverContent,{align:"end",className:"w-80 gap-3",children:[(0,t.jsxs)(d.PopoverHeader,{children:[(0,t.jsx)(d.PopoverTitle,{children:e.updateAvailable?"New version available":"Reinstall recommended"}),e.updateAvailable&&(0,t.jsxs)(d.PopoverDescription,{children:["v",e.current," → v",i]})]}),e.updateAvailable&&(0,t.jsx)(x,{status:e}),e.entryOutdated&&(0,t.jsx)(b,{})]})}e.s(["UpdateIndicator",0,function({className:e}){let n=(0,p.useUpdateStatus)(),{restarting:r}=(0,p.useRestartToUpdate)();if(r)return(0,t.jsxs)(c.Button,{variant:"outline",size:"lg",className:(0,m.cn)("border-info/50 text-info",e),disabled:!0,title:"Restarting to apply the update",children:[(0,t.jsx)(s.Loader2,{className:"animate-spin"}),"Restarting"]});if(!n||!n.updateAvailable&&!n.entryOutdated)return null;let o="ready"===n.autoUpdate.state,a=n.updateAvailable?`v${o&&n.autoUpdate.version?n.autoUpdate.version:n.latest}`:"Reinstall";return(0,t.jsxs)(d.Popover,{children:[(0,t.jsxs)(d.PopoverTrigger,{render:(0,t.jsx)(c.Button,{variant:"outline",size:"lg",className:(0,m.cn)("relative border-info/50 text-info hover:text-info active:scale-95",e),title:o?"Restart to update":n.updateAvailable?"New version available":"Reinstall recommended"}),children:[o?(0,t.jsx)(u.RotateCw,{}):(0,t.jsx)(i.ArrowUpCircle,{}),a,(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 size-2 rounded-full bg-info"})]}),(0,t.jsx)(E,{status:n})]})},"UpdatePopoverContent",0,E])},51846,e=>{"use strict";var t=e.i(71645);e.s(["useDocumentTitle",0,function(e,n=0){(0,t.useEffect)(()=>{let t=n>0?`(${n}) 繋`:"繋",r=e?`${t} | ${e}`:t,i=document.title;return document.title=r,()=>{document.title=i}},[e,n])}])}]);