@agent-spaces/server 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/agents/agent-message-parts.js +2 -2
  2. package/dist/agents/issue-agent-runner.js +0 -1
  3. package/dist/app.js +0 -2
  4. package/dist/package.json +1 -1
  5. package/dist/routes/issue.js +12 -0
  6. package/dist/routes/speech-recognition.js +21 -2
  7. package/dist/services/issue.js +11 -2
  8. package/dist/services/speech-recognition/tencent.js +6 -1
  9. package/dist/storage/speech-recognition-store.js +4 -1
  10. package/dist/web/404.html +1 -1
  11. package/dist/web/__next.__PAGE__.txt +4 -4
  12. package/dist/web/__next._full.txt +27 -31
  13. package/dist/web/__next._head.txt +4 -4
  14. package/dist/web/__next._index.txt +13 -17
  15. package/dist/web/__next._tree.txt +2 -2
  16. package/dist/web/_next/static/chunks/002-dxhags4dj.js +2 -0
  17. package/dist/web/_next/static/chunks/{02unyp1obddyn.js → 0_g3irbniww6d.js} +1 -1
  18. package/dist/web/_next/static/chunks/{0d.v1csiyl.1~.js → 0anuxr11yn5iv.js} +2 -2
  19. package/dist/web/_next/static/chunks/0cwvdk55mrt_9.css +1 -0
  20. package/dist/web/_next/static/chunks/0e.z4v3cd78dx.js +1 -0
  21. package/dist/web/_next/static/chunks/0gczc8mmde5my.js +1 -0
  22. package/dist/web/_next/static/chunks/0j2w71psq6w9u.js +1 -0
  23. package/dist/web/_next/static/chunks/0lmeh15xwcj0s.js +204 -0
  24. package/dist/web/_next/static/chunks/0puhc.l_.mc99.js +1 -0
  25. package/dist/web/_next/static/chunks/0v7nmghv8ieef.js +1 -0
  26. package/dist/web/_next/static/chunks/{0~xn0gfqxa20r.js → 0w1iudd1d46sw.js} +3 -3
  27. package/dist/web/_next/static/chunks/0wekj7h15h7z7.js +5 -0
  28. package/dist/web/_next/static/chunks/0xwqf.llmm_u2.js +31 -0
  29. package/dist/web/_next/static/chunks/145qu5b0tgm9w.js +1 -0
  30. package/dist/web/_next/static/chunks/{turbopack-0kcwat8.leugk.js → turbopack-0lrdxynxb9-1t.js} +1 -1
  31. package/dist/web/_not-found/__next._full.txt +30 -34
  32. package/dist/web/_not-found/__next._head.txt +4 -4
  33. package/dist/web/_not-found/__next._index.txt +13 -17
  34. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
  35. package/dist/web/_not-found/__next._not-found.txt +3 -3
  36. package/dist/web/_not-found/__next._tree.txt +2 -2
  37. package/dist/web/_not-found.html +1 -1
  38. package/dist/web/_not-found.txt +30 -34
  39. package/dist/web/index.html +1 -1
  40. package/dist/web/index.txt +27 -31
  41. package/dist/web/login/__next._full.txt +30 -35
  42. package/dist/web/login/__next._head.txt +4 -4
  43. package/dist/web/login/__next._index.txt +13 -17
  44. package/dist/web/login/__next._tree.txt +2 -2
  45. package/dist/web/login/__next.login.__PAGE__.txt +4 -4
  46. package/dist/web/login/__next.login.txt +3 -3
  47. package/dist/web/login.html +1 -1
  48. package/dist/web/login.txt +30 -35
  49. package/dist/web/settings/__next._full.txt +31 -36
  50. package/dist/web/settings/__next._head.txt +4 -4
  51. package/dist/web/settings/__next._index.txt +13 -17
  52. package/dist/web/settings/__next._tree.txt +2 -2
  53. package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
  54. package/dist/web/settings/__next.settings.txt +5 -5
  55. package/dist/web/settings/agents/__next._full.txt +35 -39
  56. package/dist/web/settings/agents/__next._head.txt +4 -4
  57. package/dist/web/settings/agents/__next._index.txt +13 -17
  58. package/dist/web/settings/agents/__next._tree.txt +2 -2
  59. package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
  60. package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
  61. package/dist/web/settings/agents/__next.settings.txt +5 -5
  62. package/dist/web/settings/agents.html +1 -1
  63. package/dist/web/settings/agents.txt +35 -39
  64. package/dist/web/settings/mcps/__next._full.txt +35 -39
  65. package/dist/web/settings/mcps/__next._head.txt +4 -4
  66. package/dist/web/settings/mcps/__next._index.txt +13 -17
  67. package/dist/web/settings/mcps/__next._tree.txt +2 -2
  68. package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
  69. package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
  70. package/dist/web/settings/mcps/__next.settings.txt +5 -5
  71. package/dist/web/settings/mcps.html +1 -1
  72. package/dist/web/settings/mcps.txt +35 -39
  73. package/dist/web/settings/models/__next._full.txt +35 -39
  74. package/dist/web/settings/models/__next._head.txt +4 -4
  75. package/dist/web/settings/models/__next._index.txt +13 -17
  76. package/dist/web/settings/models/__next._tree.txt +2 -2
  77. package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
  78. package/dist/web/settings/models/__next.settings.models.txt +3 -3
  79. package/dist/web/settings/models/__next.settings.txt +5 -5
  80. package/dist/web/settings/models.html +1 -1
  81. package/dist/web/settings/models.txt +35 -39
  82. package/dist/web/settings/providers/__next._full.txt +35 -39
  83. package/dist/web/settings/providers/__next._head.txt +4 -4
  84. package/dist/web/settings/providers/__next._index.txt +13 -17
  85. package/dist/web/settings/providers/__next._tree.txt +2 -2
  86. package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
  87. package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
  88. package/dist/web/settings/providers/__next.settings.txt +5 -5
  89. package/dist/web/settings/providers.html +1 -1
  90. package/dist/web/settings/providers.txt +35 -39
  91. package/dist/web/settings/skills/__next._full.txt +35 -39
  92. package/dist/web/settings/skills/__next._head.txt +4 -4
  93. package/dist/web/settings/skills/__next._index.txt +13 -17
  94. package/dist/web/settings/skills/__next._tree.txt +2 -2
  95. package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
  96. package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
  97. package/dist/web/settings/skills/__next.settings.txt +5 -5
  98. package/dist/web/settings/skills.html +1 -1
  99. package/dist/web/settings/skills.txt +35 -39
  100. package/dist/web/settings.html +1 -1
  101. package/dist/web/settings.txt +31 -36
  102. package/dist/web/workflows/__next._full.txt +32 -36
  103. package/dist/web/workflows/__next._head.txt +4 -4
  104. package/dist/web/workflows/__next._index.txt +13 -17
  105. package/dist/web/workflows/__next._tree.txt +2 -2
  106. package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
  107. package/dist/web/workflows/__next.workflows.txt +3 -3
  108. package/dist/web/workflows.html +1 -1
  109. package/dist/web/workflows.txt +32 -36
  110. package/dist/web/workspace/_/__next._full.txt +34 -39
  111. package/dist/web/workspace/_/__next._head.txt +4 -4
  112. package/dist/web/workspace/_/__next._index.txt +13 -17
  113. package/dist/web/workspace/_/__next._tree.txt +2 -2
  114. package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -3
  115. package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
  116. package/dist/web/workspace/_/__next.workspace.txt +3 -3
  117. package/dist/web/workspace/_.html +1 -1
  118. package/dist/web/workspace/_.txt +34 -39
  119. package/dist/web/workspaces/__next._full.txt +31 -35
  120. package/dist/web/workspaces/__next._head.txt +4 -4
  121. package/dist/web/workspaces/__next._index.txt +13 -17
  122. package/dist/web/workspaces/__next._tree.txt +2 -2
  123. package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
  124. package/dist/web/workspaces/__next.workspaces.txt +3 -3
  125. package/dist/web/workspaces.html +1 -1
  126. package/dist/web/workspaces.txt +31 -35
  127. package/dist/ws/agent-runner.js +6 -2
  128. package/dist/ws/message-parts.js +2 -2
  129. package/package.json +1 -1
  130. package/dist/web/_next/static/chunks/0-mtp2au0a0nh.js +0 -189
  131. package/dist/web/_next/static/chunks/00amm3dvu3po9.js +0 -31
  132. package/dist/web/_next/static/chunks/0e~0o6v_awcod.js +0 -1
  133. package/dist/web/_next/static/chunks/0fpf.rso9mhc0.js +0 -1
  134. package/dist/web/_next/static/chunks/0glol5jdarfma.js +0 -2
  135. package/dist/web/_next/static/chunks/0m1ud--um8kjh.js +0 -1
  136. package/dist/web/_next/static/chunks/0o6w-uw2p.phy.js +0 -5
  137. package/dist/web/_next/static/chunks/0os7q6w~-tmg7.css +0 -1
  138. package/dist/web/_next/static/chunks/0vesz93a98px4.js +0 -1
  139. package/dist/web/_next/static/chunks/0xtmr0y4vo-~p.js +0 -1
  140. package/dist/web/_next/static/chunks/0~3uikgc074il.js +0 -1
  141. package/dist/web/_next/static/chunks/11ozf700niy2z.js +0 -1
  142. /package/dist/web/_next/static/{4dBAEZ275uRqcyeaRmXSx → gN3O86ki0NGTvGTqE2Ibh}/_buildManifest.js +0 -0
  143. /package/dist/web/_next/static/{4dBAEZ275uRqcyeaRmXSx → gN3O86ki0NGTvGTqE2Ibh}/_clientMiddlewareManifest.js +0 -0
  144. /package/dist/web/_next/static/{4dBAEZ275uRqcyeaRmXSx → gN3O86ki0NGTvGTqE2Ibh}/_ssgManifest.js +0 -0
@@ -1,31 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,251007,(e,t,r)=>{"use strict";var n=e.r(764556);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),a=Symbol.for("react.optimistic_key"),c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:n===a?a:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=c.T,r=u.p;try{if(c.T=null,u.p=2,e)return e()}finally{c.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=l(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=l(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=l(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=l(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return c.H.useFormState(e,t,r)},r.useFormStatus=function(){return c.H.useHostTransitionStatus()},r.version="19.3.0-canary-3f0b9e61-20260317"},106206,(e,t,r)=>{"use strict";!function e(){if("u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(251007)},893300,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var a=[],c=!1,l=-1;function f(){c&&n&&(c=!1,n.length?a=n.concat(a):l=-1,a.length&&d())}function d(){if(!c){var e=s(f);c=!0;for(var t=a.length;t;){for(n=a,a=[];++l<t;)n&&n[l].run();l=-1,t=a.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];a.push(new p(e,t)),1!==a.length||c||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},u=!0;try{n[e](r,r.exports,i),u=!1}finally{u&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.2.4_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/process/",t.exports=i(229)},8890,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(893300)},136203,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},344180,(e,t,r)=>{"use strict";t.exports=e.r(136203)},627685,(e,t,r)=>{"use strict";var n=e.i(8890),o=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),h=Symbol.for("react.view_transition"),b=Symbol.iterator,v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,_={};function x(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||v}function S(){}function O(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||v}x.prototype.isReactComponent={},x.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},x.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=x.prototype;var j=O.prototype=new S;j.constructor=O,m(j,x.prototype),j.isPureReactComponent=!0;var E=Array.isArray;function T(){}var w={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function C(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function k(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var A=/\/+/g;function H(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function P(e,t,r){if(null==e)return e;var n=[],u=0;return!function e(t,r,n,u,s){var a,c,l,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var d=!1;if(null===t)d=!0;else switch(f){case"bigint":case"string":case"number":d=!0;break;case"object":switch(t.$$typeof){case o:case i:d=!0;break;case y:return e((d=t._init)(t._payload),r,n,u,s)}}if(d)return s=s(t),d=""===u?"."+H(t,0):u,E(s)?(n="",null!=d&&(n=d.replace(A,"$&/")+"/"),e(s,r,n,"",function(e){return e})):null!=s&&(k(s)&&(a=s,c=n+(null==s.key||t&&t.key===s.key?"":(""+s.key).replace(A,"$&/")+"/")+d,s=C(a.type,c,a.props)),r.push(s)),1;d=0;var p=""===u?".":u+":";if(E(t))for(var g=0;g<t.length;g++)f=p+H(u=t[g],g),d+=e(u,r,n,f,s);else if("function"==typeof(g=null===(l=t)||"object"!=typeof l?null:"function"==typeof(l=b&&l[b]||l["@@iterator"])?l:null))for(t=g.call(t),g=0;!(u=t.next()).done;)f=p+H(u=u.value,g++),d+=e(u,r,n,f,s);else if("object"===f){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,u,s);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return d}(e,n,"","",function(e){return t.call(r,e,u++)}),n}function M(e){if(-1===e._status){var t=(0,e._result)();t.then(function(r){(0===e._status||-1===e._status)&&(e._status=1,e._result=r,void 0===t.status&&(t.status="fulfilled",t.value=r))},function(r){(0===e._status||-1===e._status)&&(e._status=2,e._result=r,void 0===t.status&&(t.status="rejected",t.reason=r))}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function L(e){var t=w.T,r={};r.types=null!==t?t.types:null,w.T=r;try{var n=e(),o=w.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(T,I)}catch(e){I(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),w.T=t}}function $(e){var t=w.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else L($.bind(null,e))}r.Activity=g,r.Children={map:P,forEach:function(e,t,r){P(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=x,r.Fragment=u,r.Profiler=a,r.PureComponent=O,r.StrictMode=s,r.Suspense=d,r.ViewTransition=h,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},r.addTransitionType=$,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)R.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+2];n.children=u}return C(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:c,_context:e},e},r.createElement=function(e,t,r){var n,o={},i=null;if(null!=t)for(n in void 0!==t.key&&(i=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var s=Array(u),a=0;a<u;a++)s[a]=arguments[a+2];o.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return C(e,i,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:f,render:e}},r.isValidElement=k,r.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:M}},r.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},r.startTransition=L,r.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},r.use=function(e){return w.H.use(e)},r.useActionState=function(e,t,r){return w.H.useActionState(e,t,r)},r.useCallback=function(e,t){return w.H.useCallback(e,t)},r.useContext=function(e){return w.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return w.H.useEffect(e,t)},r.useEffectEvent=function(e){return w.H.useEffectEvent(e)},r.useId=function(){return w.H.useId()},r.useImperativeHandle=function(e,t,r){return w.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return w.H.useMemo(e,t)},r.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return w.H.useReducer(e,t,r)},r.useRef=function(e){return w.H.useRef(e)},r.useState=function(e){return w.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return w.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return w.H.useTransition()},r.version="19.3.0-canary-3f0b9e61-20260317"},764556,(e,t,r)=>{"use strict";t.exports=e.r(627685)},481258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},64791,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class u{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return s?new s:new u}function c(e){return s?s.bind(e):u.bind(e)}function l(){return s?s.snapshot():function(e,...t){return e(...t)}}},12267,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(64791).createAsyncLocalStorage)()},94932,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(12267)},745137,(e,t,r)=>{"use strict";let n;Object.defineProperty(r,"__esModule",{value:!0});var o={getAssetToken:function(){return a},getAssetTokenQuery:function(){return c},getDeploymentId:function(){return u},getDeploymentIdQuery:function(){return s}};for(var i in o)Object.defineProperty(r,i,{enumerable:!0,get:o[i]});function u(){return n}function s(e=!1){let t=n;return t?`${e?"&":"?"}dpl=${t}`:""}function a(){return!1}function c(e=!1){return""}"u">typeof window?(n=document.documentElement.dataset.dplId,delete document.documentElement.dataset.dplId):n=void 0},549424,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"handleISRError",{enumerable:!0,get:function(){return o}});let n="u"<typeof window?e.r(94932).workAsyncStorage:void 0;function o({error:e}){if(n){let t=n.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},801149,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={WarningIcon:function(){return a},errorStyles:function(){return u},errorThemeCss:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});e.r(481258);let i=e.r(344180);e.r(764556);let u={container:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},card:{marginTop:"-32px",maxWidth:"325px",padding:"32px 28px",textAlign:"left"},icon:{marginBottom:"24px"},title:{fontSize:"24px",fontWeight:500,letterSpacing:"-0.02em",lineHeight:"32px",margin:"0 0 12px 0",color:"var(--next-error-title)"},message:{fontSize:"14px",fontWeight:400,lineHeight:"21px",margin:"0 0 20px 0",color:"var(--next-error-message)"},form:{margin:0},buttonGroup:{display:"flex",gap:"8px",alignItems:"center"},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"32px",padding:"0 12px",fontSize:"14px",fontWeight:500,lineHeight:"20px",borderRadius:"6px",cursor:"pointer",color:"var(--next-error-btn-text)",background:"var(--next-error-btn-bg)",border:"var(--next-error-btn-border)"},buttonSecondary:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"32px",padding:"0 12px",fontSize:"14px",fontWeight:500,lineHeight:"20px",borderRadius:"6px",cursor:"pointer",color:"var(--next-error-btn-secondary-text)",background:"var(--next-error-btn-secondary-bg)",border:"var(--next-error-btn-secondary-border)"},digestFooter:{position:"fixed",bottom:"32px",left:"0",right:"0",textAlign:"center",fontFamily:'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace',fontSize:"12px",lineHeight:"18px",fontWeight:400,margin:"0",color:"var(--next-error-digest)"}},s=`
2
- :root {
3
- --next-error-bg: #fff;
4
- --next-error-text: #171717;
5
- --next-error-title: #171717;
6
- --next-error-message: #171717;
7
- --next-error-digest: #666666;
8
- --next-error-btn-text: #fff;
9
- --next-error-btn-bg: #171717;
10
- --next-error-btn-border: none;
11
- --next-error-btn-secondary-text: #171717;
12
- --next-error-btn-secondary-bg: transparent;
13
- --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);
14
- }
15
- @media (prefers-color-scheme: dark) {
16
- :root {
17
- --next-error-bg: #0a0a0a;
18
- --next-error-text: #ededed;
19
- --next-error-title: #ededed;
20
- --next-error-message: #ededed;
21
- --next-error-digest: #a0a0a0;
22
- --next-error-btn-text: #0a0a0a;
23
- --next-error-btn-bg: #ededed;
24
- --next-error-btn-border: none;
25
- --next-error-btn-secondary-text: #ededed;
26
- --next-error-btn-secondary-bg: transparent;
27
- --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);
28
- }
29
- }
30
- body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }
31
- `.replace(/\n\s*/g,"");function a(){return(0,i.jsx)("svg",{width:"32",height:"32",viewBox:"-0.2 -1.5 32 32",fill:"none",style:u.icon,children:(0,i.jsx)("path",{d:"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z",fill:"var(--next-error-title)"})})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},785502,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return u}}),e.r(481258);let n=e.r(344180);e.r(764556);let o=e.r(549424),i=e.r(801149),u=function({error:e}){let t=e?.digest,r=!!t;return(0,o.handleISRError)({error:e}),(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{children:(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:i.errorThemeCss}})}),(0,n.jsxs)("body",{children:[(0,n.jsx)("div",{style:i.errorStyles.container,children:(0,n.jsxs)("div",{style:i.errorStyles.card,children:[(0,n.jsx)(i.WarningIcon,{}),(0,n.jsx)("h1",{style:i.errorStyles.title,children:"This page couldn’t load"}),(0,n.jsx)("p",{style:i.errorStyles.message,children:r?"A server error occurred. Reload to try again.":"Reload to try again, or go back."}),(0,n.jsxs)("div",{style:i.errorStyles.buttonGroup,children:[(0,n.jsx)("form",{style:i.errorStyles.form,children:(0,n.jsx)("button",{type:"submit",style:i.errorStyles.button,children:"Reload"})}),!r&&(0,n.jsx)("button",{type:"button",style:i.errorStyles.buttonSecondary,onClick:()=>{window.history.length>1?window.history.back():window.location.href="/"},children:"Back"})]})]})}),t&&(0,n.jsxs)("p",{style:i.errorStyles.digestFooter,children:["ERROR ",t]})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,767467,e=>{"use strict";let t=(0,e.i(433721).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],767467)},189131,e=>{"use strict";var t=e.i(764556);let r=t.createContext(void 0);e.s(["useDirection",0,function(){let e=t.useContext(r);return e?.direction??"ltr"}])},459250,e=>{"use strict";var t=e.i(764556);let r=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,r,"useCompositeListContext",0,function(){return t.useContext(r)}])},296615,e=>{"use strict";var t,r=e.i(764556),n=e.i(277642),i=e.i(459250);let l=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);e.s(["useCompositeListItem",0,function(e={}){let{label:t,metadata:u,textRef:a,indexGuessBehavior:o,index:s}=e,{register:c,unregister:d,subscribeMapChange:f,elementsRef:v,labelsRef:b,nextIndexRef:m}=(0,i.useCompositeListContext)(),h=r.useRef(-1),[p,g]=r.useState(s??(o===l.GuessFromOrder?()=>{if(-1===h.current){let e=m.current;m.current+=1,h.current=e}return h.current}:-1)),y=r.useRef(null),x=r.useCallback(e=>{if(y.current=e,-1!==p&&null!==e&&(v.current[p]=e,b)){let r=void 0!==t;b.current[p]=r?t:a?.current?.textContent??e.textContent}},[p,v,b,t,a]);return(0,n.useIsoLayoutEffect)(()=>{if(null!=s)return;let e=y.current;if(e)return c(e,u),()=>{d(e)}},[s,c,d,u]),(0,n.useIsoLayoutEffect)(()=>{if(null==s)return f(e=>{let t=y.current?e.get(y.current)?.index:null;null!=t&&g(t)})},[s,f,g]),r.useMemo(()=>({ref:x,index:p}),[p,x])}])},756432,e=>{"use strict";var t=e.i(764556),r=e.i(549154),n=e.i(29905),i=e.i(277642),l=e.i(459250),u=e.i(344180);function a(){return new Map}function o(){return new Set}function s(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}e.s(["CompositeList",0,function(e){let{children:c,elementsRef:d,labelsRef:f,onMapChange:v}=e,b=(0,n.useStableCallback)(v),m=t.useRef(0),h=(0,r.useRefWithInit)(o).current,p=(0,r.useRefWithInit)(a).current,[g,y]=t.useState(0),x=t.useRef(g),E=(0,n.useStableCallback)((e,t)=>{p.set(e,t??null),x.current+=1,y(x.current)}),C=(0,n.useStableCallback)(e=>{p.delete(e),x.current+=1,y(x.current)}),I=t.useMemo(()=>{let e=new Map;return Array.from(p.keys()).filter(e=>e.isConnected).sort(s).forEach((t,r)=>{let n=p.get(t)??{};e.set(t,{...n,index:r})}),e},[p,g]);(0,i.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===I.size)return;let e=new MutationObserver(e=>{let t=new Set,r=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(r),e.addedNodes.forEach(r)}),0===t.size&&(x.current+=1,y(x.current))});return I.forEach((t,r)=>{r.parentElement&&e.observe(r.parentElement,{childList:!0})}),()=>{e.disconnect()}},[I]),(0,i.useIsoLayoutEffect)(()=>{x.current===g&&(d.current.length!==I.size&&(d.current.length=I.size),f&&f.current.length!==I.size&&(f.current.length=I.size),m.current=I.size),b(I)},[b,I,d,f,g]),(0,i.useIsoLayoutEffect)(()=>()=>{d.current=[]},[d]),(0,i.useIsoLayoutEffect)(()=>()=>{f&&(f.current=[])},[f]);let R=(0,n.useStableCallback)(e=>(h.add(e),()=>{h.delete(e)}));(0,i.useIsoLayoutEffect)(()=>{h.forEach(e=>e(I))},[h,I]);let S=t.useMemo(()=>({register:E,unregister:C,subscribeMapChange:R,elementsRef:d,labelsRef:f,nextIndexRef:m}),[E,C,R,d,f,m]);return(0,u.jsx)(l.CompositeListContext.Provider,{value:S,children:c})}])},464111,e=>{"use strict";e.s(["clamp",0,function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}])},394394,e=>{"use strict";var t=e.i(764556);let r=t.createContext(void 0),n={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(r)??n}])},517432,e=>{"use strict";var t=e.i(56032),r=e.i(863728);function n(){return r.NOOP}function i(){return!1}function l(){return!0}e.s(["useIsHydrating",0,function(){return(0,t.useSyncExternalStore)(n,i,l)}])},607452,e=>{"use strict";var t,r=e.i(344180);e.s([],885864),e.i(885864),e.i(8890);var n=e.i(764556),i=e.i(526850),l=e.i(535270),u=e.i(29905),a=e.i(106045),o=e.i(277642),s=e.i(602453),c=e.i(638144),d=e.i(139236),f=e.i(969490),v=e.i(464111);function b(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}var m=e.i(410421),h=e.i(756432),p=e.i(125231),g=e.i(975698),y=e.i(380414),x=e.i(443124);function E(e,t){return e-t}function C(e,t,r,n,i,l){var u;let a,o=e;return o=(0,v.clamp)(o,r,n),i&&(u=(0,v.clamp)(o,l[t-1]||-1/0,l[t+1]||1/0),(a=l.slice())[t]=u,o=a.sort(E)),o}function I(e,t,r){return!Array.isArray(e)||Math.min(...e.reduce((e,t,r,n)=>(r===n.length-1||e.push(Math.abs(t-n[r+1])),e),[]))>=t*r}let R={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...e.i(438904).fieldValidityMapping};var S=e.i(267805);let N=n.createContext(void 0);function A(){let e=n.useContext(N);if(void 0===e)throw Error((0,S.default)(62));return e}var w=e.i(742665);let M=n.forwardRef(function(e,t){let{"aria-labelledby":S,className:A,defaultValue:M,disabled:O=!1,id:T,format:P,largeStep:k=10,locale:L,render:D,max:F=100,min:_=0,minStepsBetweenValues:V=0,form:W,name:$,onValueChange:z,onValueCommitted:B,orientation:H="horizontal",step:G=1,thumbCollisionBehavior:j="push",thumbAlignment:U="center",value:K,style:q,...Y}=e,X=(0,d.useBaseUiId)(T),J=null==X?void 0:`${X}-label`,Q=(0,u.useStableCallback)(z),Z=(0,u.useStableCallback)(B),{clearErrors:ee}=(0,y.useFormContext)(),{state:et,disabled:er,name:en,setTouched:ei,setDirty:el,validityData:eu,shouldValidateOnChange:ea,validation:eo}=(0,p.useFieldRootContext)(),{labelId:es}=(0,x.useLabelableContext)(),[ec,ed]=n.useState(),ef=S??es??ec,ev=er||O,eb=en??$,[em,eh]=(0,l.useControlled)({controlled:K,default:M??_,name:"Slider"}),ep=n.useRef(null),eg=n.useRef(null),ey=n.useRef([]),ex=n.useRef(null),eE=n.useRef(null),eC=n.useRef(-1),eI=n.useRef(null),eR=n.useRef(null),eS=n.useRef("none"),eN=(0,a.useValueAsRef)(P),[eA,ew]=n.useState(-1),[eM,eO]=n.useState(-1),[eT,eP]=n.useState(!1),[ek,eL]=n.useState(()=>new Map),[eD,eF]=n.useState([void 0,void 0]),e_=(0,u.useStableCallback)(e=>{ew(e),-1!==e&&eO(e)});(0,g.useRegisterFieldControl)(eg,{id:X,value:em}),(0,c.useValueChanged)(em,()=>{ee(eb),ea()?eo.commit(em):eo.commit(em,!0);let e=eu.initialValue;el(Array.isArray(em)&&Array.isArray(e)?!b(em,e):em!==e)});let eV=(0,u.useStableCallback)(e=>{e&&(eg.current=e)}),eW=Array.isArray(em),e$=n.useMemo(()=>eW?em.slice().sort(E):[(0,v.clamp)(em,_,F)],[F,_,eW,em]),ez=(0,u.useStableCallback)((e,t)=>{if(Number.isNaN(e)||("number"==typeof e&&"number"==typeof em?e===em:!!(Array.isArray(e)&&Array.isArray(em))&&b(e,em)))return;let r=t??(0,s.createChangeEventDetails)(w.REASONS.none,void 0,void 0,{activeThumbIndex:-1});eS.current=r.reason;let n=r.event,i=new(n.constructor??Event)(n.type,n);Object.defineProperty(i,"target",{writable:!0,value:{value:e,name:eb}}),r.event=i,eR.current=e,Q(e,r),r.isCanceled||eh(e)}),eB=(0,u.useStableCallback)((e,t,r)=>{let n=C(e,t,_,F,eW,e$);if(I(n,G,V)){let e="key"in r?w.REASONS.keyboard:w.REASONS.inputChange;ez(n,(0,s.createChangeEventDetails)(e,r.nativeEvent,void 0,{activeThumbIndex:t})),ei(!0),Z(eR.current??n,(0,s.createGenericEventDetails)(e,r.nativeEvent))}});(0,o.useIsoLayoutEffect)(()=>{let e=(0,m.activeElement)((0,i.ownerDocument)(ep.current));ev&&(0,m.contains)(ep.current,e)&&e.blur()},[ev]),ev&&-1!==eA&&e_(-1);let eH=n.useMemo(()=>({...et,activeThumbIndex:eA,disabled:ev,dragging:eT,orientation:H,max:F,min:_,minStepsBetweenValues:V,step:G,values:e$}),[et,eA,ev,eT,F,_,V,H,G,e$]),eG=n.useMemo(()=>({active:eA,controlRef:eg,disabled:ev,dragging:eT,validation:eo,formatOptionsRef:eN,handleInputChange:eB,indicatorPosition:eD,inset:"center"!==U,labelId:ef,rootLabelId:J,largeStep:k,lastUsedThumbIndex:eM,lastChangedValueRef:eR,lastChangeReasonRef:eS,form:W,locale:L,max:F,min:_,minStepsBetweenValues:V,name:eb,onValueCommitted:Z,orientation:H,pressedInputRef:ex,pressedThumbCenterOffsetRef:eE,pressedThumbIndexRef:eC,pressedValuesRef:eI,registerFieldControlRef:eV,renderBeforeHydration:"edge"===U,setActive:e_,setDragging:eP,setIndicatorPosition:eF,setLabelId:ed,setValue:ez,state:eH,step:G,thumbCollisionBehavior:j,thumbMap:ek,thumbRefs:ey,values:e$}),[eA,eg,ef,J,ev,eT,eo,eN,eB,eD,k,eM,eR,eS,W,L,F,_,V,eb,Z,H,ex,eE,eC,eI,eV,e_,eP,eF,ed,ez,eH,G,j,U,ek,ey,e$]),ej=(0,f.useRenderElement)("div",e,{state:eH,ref:[t,ep],props:[{"aria-labelledby":ef,id:X,role:"group"},eo.getValidationProps,Y],stateAttributesMapping:R});return(0,r.jsx)(N.Provider,{value:eG,children:(0,r.jsx)(h.CompositeList,{elementsRef:ey,onMapChange:eL,children:ej})})});var O=e.i(92615),T=e.i(213700);let P=n.forwardRef(function(e,t){let{render:r,className:n,style:l,...u}=e;delete u.id;let{state:a,setLabelId:o,controlRef:s,rootLabelId:c}=A(),d=(0,T.useLabel)({id:c,setLabelId:o,focusControl:function(e,t){if(t){let r=(0,i.ownerDocument)(e.currentTarget).getElementById(t);if((0,O.isHTMLElement)(r))return void(0,T.focusElementWithVisible)(r)}let r=s.current?.querySelectorAll('input[type="range"]'),n=r?.length===1?r[0]:null;(0,O.isHTMLElement)(n)&&(0,T.focusElementWithVisible)(n)}});return(0,f.useRenderElement)("div",e,{ref:t,state:a,props:[d,u],stateAttributesMapping:R})});var k=e.i(842809);let L=n.forwardRef(function(e,t){let{"aria-live":r="off",render:i,className:l,children:u,style:a,...o}=e,{thumbMap:s,state:c,values:d,formatOptionsRef:v,locale:b}=A(),m=n.useMemo(()=>{let e="";for(let t of s.values())t?.inputId&&(e+=`${t.inputId} `);return""===e.trim()?void 0:e.trim()},[s]),h=n.useMemo(()=>{let e=[];for(let t=0;t<d.length;t+=1)e.push((0,k.formatNumber)(d[t],b,v.current??void 0));return e},[v,b,d]),p=n.useMemo(()=>{let e=[];for(let t=0;t<d.length;t+=1)e.push(h[t]||d[t]);return e.join(" – ")},[d,h]);return(0,f.useRenderElement)("output",e,{state:c,ref:t,props:[{"aria-live":r,children:"function"==typeof u?u(h,d):p,htmlFor:m},o],stateAttributesMapping:R})});var D=e.i(422561),F=e.i(859092),_=e.i(189131);function V(e){let t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function W(e){if(0===e)return 0;if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}function $(e,t,r){return Number((Math.round((e-r)/t)*t+r).toFixed(Math.max(W(t),W(r))))}function z({values:e,index:t,nextValue:r,min:n,max:i,step:l,minStepsBetweenValues:u,initialValues:a}){if(0===e.length)return[];let o=e.slice(),s=l*u,c=o.length-1,d=a??e;o[t]=(0,v.clamp)(r,n+t*s,i-(c-t)*s);for(let e=t+1;e<=c;e+=1){let t=o[e-1]+s,r=i-(c-e)*s,n=d[e]??o[e],l=Math.max(o[e],t);n<l&&(l=Math.max(n,t)),o[e]=(0,v.clamp)(l,t,r)}for(let e=t-1;e>=0;e-=1){let t=o[e+1]-s,r=n+e*s,i=d[e]??o[e],l=Math.min(o[e],t);i>l&&(l=Math.min(i,t)),o[e]=(0,v.clamp)(l,r,t)}for(let e=0;e<=c;e+=1)o[e]=Number(o[e].toFixed(12));return o}function B(e,t){if(null!=t.current&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){let n=e.changedTouches[r];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return null}return{x:e.clientX,y:e.clientY}}let H=n.forwardRef(function(e,t){let{render:r,className:l,style:o,...c}=e,{disabled:d,dragging:b,inset:h,lastChangedValueRef:p,lastChangeReasonRef:g,max:y,min:x,minStepsBetweenValues:E,onValueCommitted:C,orientation:S,pressedInputRef:N,pressedThumbCenterOffsetRef:M,pressedThumbIndexRef:T,pressedValuesRef:P,registerFieldControlRef:k,renderBeforeHydration:L,setActive:W,setDragging:H,setValue:G,state:j,step:U,thumbCollisionBehavior:K,thumbRefs:q,values:Y}=A(),X=(0,_.useDirection)(),J=Y.length>1,Q="vertical"===S,Z=n.useRef(null),ee=n.useRef(null),et=(0,u.useStableCallback)(e=>{e&&null==ee.current&&null==ee.current&&(ee.current=getComputedStyle(e))}),er=n.useRef(null),en=n.useRef(0),ei=n.useRef(0),el=(0,a.useValueAsRef)(Y),eu=(0,u.useStableCallback)(e=>{T.current!==e&&(T.current=e);let t=q.current[e];if(!t){M.current=null,N.current=null;return}N.current=t.querySelector('input[type="range"]')}),ea=(0,u.useStableCallback)(e=>{let t=Z.current;if(!t)return null;let{width:r,height:n,bottom:i,left:l,right:u}=t.getBoundingClientRect(),a=function(e,t){if(!e)return{start:0,end:0};function r(e){let t=null!=e?parseFloat(e):0;return Number.isNaN(t)?0:t}let n=t?"Top":"InlineStart",i=t?"Bottom":"InlineEnd";return{start:r(e[`border${n}Width`])+r(e[`padding${n}`]),end:r(e[`border${i}Width`])+r(e[`padding${i}`])}}(ee.current,Q),o=ei.current,s=(Q?n:r)-a.start-a.end-2*o,c=M.current??0,d=e.x-c,f=e.y-c,b=Q?i-f-a.end:("rtl"===X?u-d:d-l)-a.start,m=(y-x)*(0,v.clamp)((b-o)/s,0,1)+x;if(m=$(m,U,x),m=(0,v.clamp)(m,x,y),!J)return{value:m,thumbIndex:0,didSwap:!1};let h=T.current;if(h<0)return null;let p=function({behavior:e,values:t,currentValues:r,initialValues:n,pressedIndex:i,nextValue:l,min:u,max:a,step:o,minStepsBetweenValues:s}){let c=r??t,d=n??t;if(!(c.length>1))return{value:l,thumbIndex:0,didSwap:!1};let f=o*s;switch(e){case"swap":{let e=c[i],t=c.slice(),r=t[i-1],n=t[i+1],b=null!=r?r+f:u,m=null!=n?n-f:a,h=Number((0,v.clamp)(l,b,m).toFixed(12));t[i]=h;let p=l>e,g=l<e,y=p&&null!=n&&l>=n-1e-7,x=g&&null!=r&&l<=r+1e-7;if(!y&&!x)return{value:t,thumbIndex:i,didSwap:!1};let E=y?i+1:i-1,C=t.map((e,t)=>{if(t===i)return h;let r=d[t];return null!=r?r:c[t]}),I=l;I=y?Math.max(l,t[E]):Math.min(l,t[E]);let R=z({values:t,index:E,nextValue:I,min:u,max:a,step:o,minStepsBetweenValues:s,initialValues:C}),S=y?E-1:E+1;if(S>=0&&S<R.length){let e=R[S-1],t=R[S+1],r=null!=e?e+f:u;r=Math.max(r,u+S*f);let n=null!=t?t-f:a;n=Math.min(n,a-(R.length-1-S)*f);let i=(0,v.clamp)(h,r,n);R[S]=Number(i.toFixed(12))}return{value:R,thumbIndex:E,didSwap:!0}}case"push":return{value:z({values:c,index:i,nextValue:l,min:u,max:a,step:o,minStepsBetweenValues:s}),thumbIndex:i,didSwap:!1};default:{let e=c.slice(),t=e[i-1],r=e[i+1],n=null!=t?t+f:u,o=null!=r?r-f:a,s=(0,v.clamp)(l,n,o);return e[i]=Number(s.toFixed(12)),{value:e,thumbIndex:i,didSwap:!1}}}}({behavior:K,values:Y,currentValues:el.current??Y,initialValues:P.current,pressedIndex:h,nextValue:m,min:x,max:y,step:U,minStepsBetweenValues:E});return"swap"===K&&p.didSwap?eu(p.thumbIndex):T.current=p.thumbIndex,p}),eo=(0,u.useStableCallback)(e=>{P.current=J?Y.slice():null,el.current=Y;let t=T.current,r=t;if(t>-1&&t<Y.length){if(Y[t]===y){let e=t;for(;e>0&&Y[e-1]===y;)e-=1;r=e}}else{let t,n=Q?"y":"x";r=-1;for(let i=0;i<q.current.length;i+=1){let l=q.current[i];if((0,O.isElement)(l)){let u=V(l),a=Math.abs(e[n]-u[n]);(void 0===t||a<=t)&&(r=i,t=a)}}}if(r>-1&&r!==t&&eu(r),h){let e=q.current[r];(0,O.isElement)(e)&&(ei.current=e.getBoundingClientRect()[Q?"height":"width"]/2)}}),es=(0,u.useStableCallback)(e=>{let t=q.current?.[e]?.querySelector('input[type="range"]');t&&t.focus({preventScroll:!0,focusVisible:!1})}),ec=(0,u.useStableCallback)(e=>{let t=B(e,er);if(null==t)return;if(en.current+=1,"pointermove"===e.type&&0===e.buttons)return void ed(e);let r=ea(t);null!=r&&I(r.value,U,E)&&(!b&&en.current>2&&H(!0),G(r.value,(0,s.createChangeEventDetails)(w.REASONS.drag,e,void 0,{activeThumbIndex:r.thumbIndex})),el.current=Array.isArray(r.value)?r.value:[r.value],r.didSwap&&es(r.thumbIndex))});function ed(e){W(-1),H(!1),N.current=null,M.current=null;let t=B(e,er),r=null!=t?ea(t):null;if(null!=r){let t=g.current;C(p.current??r.value,(0,s.createGenericEventDetails)(t,e))}"pointerType"in e&&Z.current?.hasPointerCapture(e.pointerId)&&Z.current?.releasePointerCapture(e.pointerId),T.current=-1,er.current=null,P.current=null,ev()}let ef=(0,u.useStableCallback)(e=>{if(d)return;let t=e.changedTouches[0];null!=t&&(er.current=t.identifier);let r=B(e,er);if(null!=r){eo(r);let t=ea(r);if(null==t)return;es(t.thumbIndex),G(t.value,(0,s.createChangeEventDetails)(w.REASONS.trackPress,e,void 0,{activeThumbIndex:t.thumbIndex})),el.current=Array.isArray(t.value)?t.value:[t.value],t.didSwap&&es(t.thumbIndex)}en.current=0;let n=(0,i.ownerDocument)(Z.current);n.addEventListener("touchmove",ec,{passive:!0}),n.addEventListener("touchend",ed,{passive:!0})}),ev=(0,u.useStableCallback)(()=>{let e=(0,i.ownerDocument)(Z.current);e.removeEventListener("pointermove",ec),e.removeEventListener("pointerup",ed),e.removeEventListener("touchmove",ec),e.removeEventListener("touchend",ed),P.current=null}),eb=(0,F.useAnimationFrame)();return n.useEffect(()=>{let e=Z.current;if(!e)return()=>ev();let t=(0,D.addEventListener)(e,"touchstart",ef,{passive:!0});return()=>{t(),eb.cancel(),ev()}},[ev,ef,Z,eb]),n.useEffect(()=>{d&&ev()},[d,ev]),(0,f.useRenderElement)("div",e,{state:j,ref:[t,k,Z,et],props:[{"data-base-ui-slider-control":L?"":void 0,onPointerDown(e){let t=Z.current,r=(0,m.getTarget)(e.nativeEvent);if(!t||d||e.defaultPrevented||!(0,O.isElement)(r)||0!==e.button)return;let n=B(e,er);if(null!=n){eo(n);let r=ea(n);if(null==r)return;(0,m.contains)(q.current[r.thumbIndex],(0,m.activeElement)((0,i.ownerDocument)(t)))?e.preventDefault():eb.request(()=>{es(r.thumbIndex)}),H(!0),null==M.current&&(G(r.value,(0,s.createChangeEventDetails)(w.REASONS.trackPress,e.nativeEvent,void 0,{activeThumbIndex:r.thumbIndex})),el.current=Array.isArray(r.value)?r.value:[r.value],r.didSwap&&es(r.thumbIndex))}e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),en.current=0;let l=(0,i.ownerDocument)(Z.current);l.addEventListener("pointermove",ec,{passive:!0}),l.addEventListener("pointerup",ed,{once:!0})}},c],stateAttributesMapping:R})}),G=n.forwardRef(function(e,t){let{render:r,className:n,style:i,...l}=e,{state:u}=A();return(0,f.useRenderElement)("div",e,{state:u,ref:t,props:[{style:{position:"relative"}},l],stateAttributesMapping:R})});var j=e.i(204133),U=e.i(236706),K=e.i(370383),q=e.i(517432),Y=e.i(203922),X=e.i(100229),J=e.i(296615),Q=e.i(394394),Z=e.i(922970),ee=e.i(575665);let et=((t={}).index="data-index",t.dragging="data-dragging",t.orientation="data-orientation",t.disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.focused="data-focused",t),er=new Set([X.ARROW_UP,X.ARROW_DOWN,X.ARROW_LEFT,X.ARROW_RIGHT,X.HOME,X.END,X.PAGE_UP,X.PAGE_DOWN]);function en(e,t,r,n,i){let l=Number((1===r?e+t:e-t).toFixed(Math.max(W(e),W(t),W(n))));return(0,v.clamp)(l,n,i)}let ei=n.forwardRef(function(e,t){let i,{render:l,children:a,className:s,"aria-describedby":c,"aria-label":v,"aria-labelledby":b,disabled:m=!1,getAriaLabel:h,getAriaValueText:g,id:y,index:x,inputRef:E,onBlur:I,onFocus:S,onKeyDown:N,tabIndex:w,style:M,...O}=e,{nonce:T}=(0,Q.useCSPContext)(),P=(0,d.useBaseUiId)(y),{active:L,lastUsedThumbIndex:D,controlRef:F,disabled:W,validation:z,formatOptionsRef:B,handleInputChange:H,inset:G,labelId:ei,largeStep:el,locale:eu,max:ea,min:eo,minStepsBetweenValues:es,form:ec,name:ed,orientation:ef,pressedInputRef:ev,pressedThumbCenterOffsetRef:eb,pressedThumbIndexRef:em,renderBeforeHydration:eh,setActive:ep,setIndicatorPosition:eg,state:ey,step:ex,values:eE}=A(),eC=(0,_.useDirection)(),eI=eE.length>1,eR="vertical"===ef,eS="rtl"===eC,{setTouched:eN,setFocused:eA,validationMode:ew}=(0,p.useFieldRootContext)(),eM=n.useRef(null),eO=n.useRef(null),eT=n.useRef(!1),eP=(0,d.useBaseUiId)(),ek=(0,ee.useLabelableId)(),eL=eI?eP:ek,eD=n.useMemo(()=>({inputId:eL}),[eL]),{ref:eF,index:e_}=(0,J.useCompositeListItem)({metadata:eD}),eV=eI?x??e_:0,eW=eV===eE.length-1,e$=eE[eV],ez=(0,Y.valueToPercent)(e$,eo,ea),[eB,eH]=n.useState(),eG=(0,q.useIsHydrating)(),ej=D>=0&&D<eE.length?D:-1,eU=(0,u.useStableCallback)(()=>{let e=F.current,t=eM.current;if(!e||!t)return;let r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i=eR?"height":"width",l=n[i]-r[i],u=(r[i]/2+l*ez/100)/n[i]*100,a=Number.isFinite(u)?u:void 0;eH(a),0===eV?eg(e=>[a,e[1]]):eW&&eg(e=>[e[0],a])});(0,o.useIsoLayoutEffect)(()=>{G&&queueMicrotask(eU)},[eU,G]),(0,o.useIsoLayoutEffect)(()=>{G&&eU()},[eU,G,ez]),(0,o.useIsoLayoutEffect)(()=>{if(!G||"function"!=typeof ResizeObserver)return;let e=F.current,t=eM.current;if(!e||!t)return;let r=new ResizeObserver(eU);return r.observe(e),r.observe(t),()=>{r.disconnect()}},[F,eU,G]);let eK=n.useCallback(()=>{let e,t=eR?"bottom":"insetInlineStart",r=eR?"left":"top";return(eI?L===eV?e=2:ej===eV&&(e=1):L===eV&&(e=1),G)?{"--position":`${eB??0}%`,visibility:eh&&eG||void 0===eB?"hidden":void 0,position:"absolute",[t]:"var(--position)",[r]:"50%",translate:`${(eR||!eS?-1:1)*50}% ${(eR?1:-1)*50}%`,zIndex:e}:Number.isFinite(ez)?{position:"absolute",[t]:`${ez}%`,[r]:"50%",translate:`${(eR||!eS?-1:1)*50}% ${(eR?1:-1)*50}%`,zIndex:e}:U.visuallyHidden},[L,eV,G,eG,eB,eI,eh,eS,ej,ez,eR]);"vertical"===ef&&(i=eS?"vertical-rl":"vertical-lr");let eq="function"==typeof h?h(eV):v,eY=(0,K.mergeProps)({"aria-label":eq,"aria-labelledby":b??(null==eq?ei:void 0),"aria-describedby":c,"aria-orientation":ef,"aria-valuenow":e$,"aria-valuetext":"function"==typeof g?g((0,k.formatNumber)(e$,eu,B.current??void 0),e$,eV):function(e,t,r,n){if(!(t<0))return 2===e.length?0===t?`${(0,k.formatNumber)(e[t],n,r)} start range`:`${(0,k.formatNumber)(e[t],n,r)} end range`:r?(0,k.formatNumber)(e[t],n,r):void 0}(eE,eV,B.current??void 0,eu),disabled:m||W,form:ec,id:eL,max:ea,min:eo,name:ed,onChange(e){H(e.currentTarget.valueAsNumber,eV,e)},onFocus(e){let t=eT.current;eT.current=!1,ep(eV),eA(!0),t&&e.stopPropagation()},onBlur(e){eT.current?e.stopPropagation():eM.current&&(ep(-1),eN(!0),eA(!1),"onBlur"===ew&&z.commit(C(e$,eV,eo,ea,eI,eE)))},onKeyDown(e){if(!er.has(e.key))return;X.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation();let t=null,r=$(e$,ex,eo);switch(e.key){case X.ARROW_UP:t=en(r,e.shiftKey?el:ex,1,eo,ea);break;case X.ARROW_RIGHT:t=en(r,e.shiftKey?el:ex,eS?-1:1,eo,ea);break;case X.ARROW_DOWN:t=en(r,e.shiftKey?el:ex,-1,eo,ea);break;case X.ARROW_LEFT:t=en(r,e.shiftKey?el:ex,eS?1:-1,eo,ea);break;case X.PAGE_UP:t=en(r,el,1,eo,ea);break;case X.PAGE_DOWN:t=en(r,el,-1,eo,ea);break;case X.END:t=ea,eI&&(t=Number.isFinite(eE[eV+1])?eE[eV+1]-ex*es:ea);break;case X.HOME:t=eo,eI&&(t=Number.isFinite(eE[eV-1])?eE[eV-1]+ex*es:eo)}if(null!==t){let r=e.currentTarget;(0,Z.matchesFocusVisible)(r)||(eT.current=!0,r.blur(),r.focus({preventScroll:!0,focusVisible:!0})),H(t,eV,e),e.preventDefault()}},step:ex,style:{...U.visuallyHidden,width:"100%",height:"100%",writingMode:i},tabIndex:w??void 0,type:"range",value:e$??""},z.getInputValidationProps),eX=(0,j.useMergedRefs)(eO,z.inputRef,E);return(0,f.useRenderElement)("div",e,{state:ey,ref:[t,eF,eM],props:[{[et.index]:eV,children:(0,r.jsxs)(n.Fragment,{children:[a,(0,r.jsx)("input",{ref:eX,...eY,suppressHydrationWarning:!0}),G&&eG&&eh&&eW&&(0,r.jsx)("script",{nonce:T,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();'},suppressHydrationWarning:!0})]}),id:P,onBlur:I,onFocus:S,onPointerDown(e){if(em.current=eV,null!=eM.current){let t="horizontal"===ef?"x":"y",r=V(eM.current);eb.current=("horizontal"===ef?e.clientX:e.clientY)-r[t]}null!=eO.current&&ev.current!==eO.current&&(ev.current=eO.current)},style:eK(),suppressHydrationWarning:eh||void 0},O],stateAttributesMapping:R})}),el=n.forwardRef(function(e,t){var r,n;let i,l,u,a,{render:o,className:s,style:c,...d}=e,{indicatorPosition:v,inset:b,max:m,min:h,orientation:p,renderBeforeHydration:g,state:y,values:x}=A(),E=(0,q.useIsHydrating)(),C="vertical"===p,I=x.length>1,S=b?(r=v[0],n=v[1],i=void 0===r||I&&void 0===n?"hidden":void 0,l=C?"bottom":"insetInlineStart",u=C?"height":"width",((a={visibility:g&&E?"hidden":i,position:C?"absolute":"relative",[C?"width":"height"]:"inherit"})["--start-position"]=`${r??0}%`,I)?(a["--relative-size"]=`${(n??0)-(r??0)}%`,a[l]="var(--start-position)",a[u]="var(--relative-size)"):(a[l]=0,a[u]="var(--start-position)"),a):function(e,t,r,n){let i=e?"bottom":"insetInlineStart",l=e?"height":"width",u={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return u[i]=0,u[l]=`${r}%`,u;let a=n-r;return u[i]=`${r}%`,u[l]=`${a}%`,u}(C,I,(0,Y.valueToPercent)(x[0],h,m),(0,Y.valueToPercent)(x[x.length-1],h,m));return(0,f.useRenderElement)("div",e,{state:y,ref:t,props:[{"data-base-ui-slider-indicator":g?"":void 0,style:S,suppressHydrationWarning:g||void 0},d],stateAttributesMapping:R})});e.s(["Control",0,H,"Indicator",0,el,"Label",0,P,"Root",0,M,"Thumb",0,ei,"Track",0,G,"Value",0,L],414857);var eu=e.i(414857),eu=eu,ea=e.i(465458);e.s(["Slider",0,function({className:e,defaultValue:t,value:n,min:i=0,max:l=100,...u}){let a=Array.isArray(n)?n:void 0!==n?[n]:Array.isArray(t)?t:[i,l];return(0,r.jsx)(eu.Root,{className:(0,ea.cn)("data-horizontal:w-full data-vertical:h-full",e),"data-slot":"slider",defaultValue:t,value:n,min:i,max:l,thumbAlignment:"edge",...u,children:(0,r.jsxs)(eu.Control,{className:"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",children:[(0,r.jsx)(eu.Track,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",children:(0,r.jsx)(eu.Indicator,{"data-slot":"slider-range",className:"bg-primary select-none data-horizontal:h-full data-vertical:w-full"})}),Array.from({length:a.length},(e,t)=>(0,r.jsx)(eu.Thumb,{"data-slot":"slider-thumb",className:"relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"},t))]})})}],607452)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,523592,e=>{"use strict";var t=e.i(8890);let a="agent-spaces-servers",r="agent-spaces-active-server",n="active-server";function s(){let e=t.default.env.NEXT_PUBLIC_SERVER_URL?.trim();if(e)return e.replace(/\/$/,"");let{hostname:a,port:r}=window.location;return"tauri.localhost"===a||a.endsWith(".tauri.localhost")?"http://localhost:3100":("localhost"===a||"127.0.0.1"===a)&&"3000"===r?`http://${a}:3100`:window.location.origin}let i=[{id:"default",name:"Default",url:s()}];function o(){try{let e=localStorage.getItem(a);return e?JSON.parse(e).map(e=>"default"!==e.id||e.url?e:{...e,url:s()}):i}catch{return i}}function l(){return localStorage.getItem(r)||"default"}function d(){let e=o(),t=l();return e.find(e=>e.id===t)||e[0]||null}function c(){return d()?.url??null}e.s(["getActiveServer",0,d,"getActiveServerUrl",0,c,"loadActiveId",0,l,"loadServers",0,o,"resolveServerAssetUrl",0,function(e){if(!e)return"";if(/^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(e)||e.startsWith("data:")||e.startsWith("blob:"))return e;let t=c();return t?`${t.replace(/\/$/,"")}${e.startsWith("/")?"":"/"}${e}`:e},"saveActiveId",0,function(e){localStorage.setItem(r,e)},"saveServers",0,function(e){localStorage.setItem(a,JSON.stringify(e))},"setActiveServerCookie",0,function(e){e?document.cookie=`${n}=${encodeURIComponent(e)}; path=/; max-age=31536000; SameSite=Lax`:document.cookie=`${n}=; path=/; max-age=0`}])},344118,50153,e=>{"use strict";let t=(0,e.i(433721).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t],50153),e.s(["Check",0,t],344118)},355819,e=>{"use strict";let t=(0,e.i(816709).create)((e,t)=>({agents:[],loaded:!1,loading:!1,ensure:async()=>{let{loaded:a,loading:r}=t();if(!a&&!r){e({loading:!0});try{let t=await fetch("/api/agents/presets");if(!t.ok)return;let a=await t.json();e({agents:a,loaded:!0})}catch{}finally{e({loading:!1})}}},toggleEnabled:async a=>{let r=t().agents.find(e=>e.id===a);if(!r)return;let n=!r.enabled;e(e=>({agents:e.agents.map(e=>e.id===a?{...e,enabled:n}:e)}));try{(await fetch(`/api/agents/presets/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,enabled:n})})).ok||e(e=>({agents:e.agents.map(e=>e.id===a?{...e,enabled:r.enabled}:e)}))}catch{e(e=>({agents:e.agents.map(e=>e.id===a?{...e,enabled:r.enabled}:e)}))}}}));e.s(["findAgentById",0,function(e){return t.getState().agents.find(t=>t.id===e)},"useAgentStore",0,t])},942917,e=>{"use strict";let t=(0,e.i(433721).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},972846,e=>{"use strict";var t=e.i(912248);e.s(["X",()=>t.default])},451534,680422,e=>{"use strict";let t=(0,e.i(433721).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["default",0,t],680422),e.s(["FolderOpen",0,t],451534)},193251,e=>{"use strict";let t=(0,e.i(433721).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],193251)},411649,e=>{"use strict";let t=(0,e.i(433721).default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,t],411649)},62669,e=>{"use strict";let t=(0,e.i(433721).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],62669)},511800,612505,e=>{"use strict";let t=(0,e.i(433721).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(["default",0,t],612505),e.s(["AlertCircle",0,t],511800)},550080,e=>{"use strict";var t=e.i(144988);e.s(["File",()=>t.default])},220336,e=>{"use strict";let t=(0,e.i(433721).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["default",0,t])},973370,e=>{"use strict";var t=e.i(220336);e.s(["Folder",()=>t.default])},992764,e=>{"use strict";var t=e.i(942917);e.s(["ChevronRight",()=>t.default])},378371,e=>{"use strict";let t=(0,e.i(433721).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,t],378371)},198699,e=>{"use strict";let t=(0,e.i(433721).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",0,t],198699)},434805,660748,e=>{"use strict";var t,a=e.i(344180),r=e.i(764556),n=e.i(244073),s=e.i(550080),i=e.i(973370),o=e.i(451534),l=e.i(992764),d=e.i(378371),c=e.i(411649),u=e.i(62669),m=e.i(198699),h=e.i(344118),p=e.i(972846),f=e.i(433721);let g=(0,f.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),x=(0,f.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),y=(0,f.default)("shield-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);var b=e.i(465458),v=e.i(681622);e.s(["FolderPicker",0,function({value:e,onChange:t,className:f,placeholder:j="/path/to/project",allowFiles:w=!1,fileFilter:k}){let[N,C]=(0,r.useState)(!1),[M,S]=(0,r.useState)(e||""),[D,F]=(0,r.useState)([]),[P,W]=(0,r.useState)([]),z=(0,n.useTranslations)("folderPicker"),[A,T]=(0,r.useState)(null),[R,I]=(0,r.useState)(!1),[E,O]=(0,r.useState)(""),[$,H]=(0,r.useState)(!1),[L,U]=(0,r.useState)(""),[J,V]=(0,r.useState)(null),[B,q]=(0,r.useState)(!1),X=(0,r.useRef)(null),Y=(0,r.useRef)(null),K=(0,r.useRef)(null),Q=(0,r.useCallback)(async e=>{if(!e)return void V(null);q(!0);try{let t=await fetch(`/api/folder/check-permissions?path=${encodeURIComponent(e)}`);if(!t.ok)return void V(null);let a=await t.json();V(a)}catch{V(null)}finally{q(!1)}},[]),G=(0,r.useCallback)(async e=>{I(!0),O("");try{let t=`/api/folder/browse?path=${encodeURIComponent(e)}`;w&&(t+="&files=1",k&&(t+=`&fileFilter=${encodeURIComponent(k)}`));let a=await fetch(t);if(!a.ok)throw Error((await a.json()).error||"Failed to browse");let r=await a.json();S(r.path),F(r.directories),W(r.files??[]),T(r.parent),Q(r.path)}catch(e){O(e.message)}finally{I(!1)}},[Q,w,k]);(0,r.useEffect)(()=>{N&&G(e||"")},[N]),(0,r.useEffect)(()=>{$&&K.current&&K.current.focus()},[$]);let _=e=>{G(e)},Z=async()=>{let e=L.trim();if(!e)return;let a=M.includes("/")?"/":"\\",r=M?`${M}${a}${e}`:e;try{let e=await fetch("/api/folder/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:r})});if(!e.ok)throw Error((await e.json()).error||"Failed to create folder");H(!1),U(""),t(r),S(r),C(!1)}catch(e){O(e.message)}},ee=D.length>0||P.length>0;return(0,a.jsxs)("div",{className:(0,b.cn)("relative",f),children:[(0,a.jsxs)("div",{className:"flex gap-1.5",children:[(0,a.jsx)(v.Input,{className:"rounded-xl py-2.5",placeholder:j,value:e,onChange:e=>{t(e.target.value)},onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),G(e))},ref:X}),(0,a.jsxs)("button",{type:"button",onClick:()=>{N?(C(!1),H(!1),U("")):C(!0)},className:(0,b.cn)("flex items-center gap-1.5 rounded-xl border px-3 py-2.5 text-sm transition-colors",N?"border-primary bg-primary/5 text-primary":"border-border bg-background text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[(0,a.jsx)(o.FolderOpen,{className:"size-4"}),"Browse"]})]}),N&&(0,a.jsxs)("div",{className:"absolute left-0 right-0 top-full z-50 mt-1 flex flex-col rounded-xl border border-border bg-popover shadow-lg",style:{height:360},children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-border px-3 py-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Home",children:(0,a.jsx)(c.Home,{className:"size-3.5"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{A&&G(A)},className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Go up",children:(0,a.jsx)(d.ArrowUp,{className:"size-3.5"})}),(0,a.jsx)(v.Input,{className:"truncate bg-muted text-xs text-muted-foreground font-mono focus-visible:bg-background h-7",value:M,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),G(M))}}),(0,a.jsx)("button",{type:"button",onClick:()=>{H(!0),U("")},className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:z("newFolder"),children:(0,a.jsx)(m.FolderPlus,{className:"size-3.5"})}),!w&&(0,a.jsx)("button",{type:"button",onClick:()=>{t(M),C(!1)},className:"rounded-lg bg-primary px-3 py-1 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:z("select")})]}),$&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-border px-3 py-1.5",children:[(0,a.jsx)(m.FolderPlus,{className:"size-4 text-muted-foreground shrink-0"}),(0,a.jsx)(v.Input,{ref:K,className:"flex-1 h-7 text-sm",placeholder:z("folderNamePlaceholder"),value:L,onChange:e=>U(e.target.value),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),Z()):"Escape"===e.key&&(H(!1),U(""))}}),(0,a.jsx)("button",{type:"button",onClick:Z,className:"flex size-6 items-center justify-center rounded-md hover:bg-accent transition-colors",disabled:!L.trim(),children:(0,a.jsx)(h.Check,{className:"size-3.5 text-primary"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{H(!1),U("")},className:"flex size-6 items-center justify-center rounded-md hover:bg-accent transition-colors",children:(0,a.jsx)(p.X,{className:"size-3.5 text-muted-foreground"})})]}),(0,a.jsx)("div",{ref:Y,className:"flex-1 overflow-y-auto p-1.5",children:R?(0,a.jsxs)("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[(0,a.jsx)(u.Loader2,{className:"size-4 animate-spin mr-2"}),"Loading..."]}):E?(0,a.jsx)("div",{className:"px-3 py-8 text-center text-xs text-destructive",children:E}):ee?(0,a.jsxs)(a.Fragment,{children:[D.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>_(e.path),onDoubleClick:()=>{t(e.path),C(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm hover:bg-accent transition-colors text-left",children:[(0,a.jsx)(i.Folder,{className:"size-4 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"flex-1 truncate",children:e.name}),(0,a.jsx)(l.ChevronRight,{className:"size-3 text-muted-foreground shrink-0"})]},e.path)),P.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{t(e.path),C(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm hover:bg-accent transition-colors text-left",children:[(0,a.jsx)(s.File,{className:"size-4 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono text-xs",children:e.name})]},e.path))]}):(0,a.jsx)("div",{className:"px-3 py-8 text-center text-xs text-muted-foreground",children:"No subdirectories"})}),(0,a.jsx)("div",{className:"border-t border-border px-3 py-1.5 flex items-center gap-2 text-xs",children:B?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Loader2,{className:"size-3 animate-spin text-muted-foreground"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"Checking permissions..."})]}):J?(0,a.jsx)(a.Fragment,{children:J.readable&&J.writable?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g,{className:"size-3.5 text-green-500"}),(0,a.jsx)("span",{className:"text-green-600 dark:text-green-400",children:"Read/Write"})]}):J.readable&&!J.writable?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x,{className:"size-3.5 text-amber-500"}),(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Read-only — files cannot be written here"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{className:"size-3.5 text-destructive"}),(0,a.jsx)("span",{className:"text-destructive",children:J.error||"No access"})]})}):(0,a.jsx)("span",{className:"text-muted-foreground",children:z("selectDirectory")})})]})]})}],434805),e.s([],606106),e.i(606106),e.i(8890);var j=e.i(106045),w=e.i(236706),k=e.i(842809),N=e.i(969490),C=e.i(267805);let M=r.createContext(void 0);function S(){let e=r.useContext(M);if(void 0===e)throw Error((0,C.default)(51));return e}let D=((t={}).complete="data-complete",t.indeterminate="data-indeterminate",t.progressing="data-progressing",t),F={status:e=>"progressing"===e?{[D.progressing]:""}:"complete"===e?{[D.complete]:""}:"indeterminate"===e?{[D.indeterminate]:""}:null};function P(e,t){return null==t?"indeterminate progress":e||`${t}%`}let W=r.forwardRef(function(e,t){let{format:n,getAriaValueText:s=P,locale:i,max:o=100,min:l=0,value:d,render:c,className:u,children:m,style:h,...p}=e,[f,g]=r.useState(),x=(0,j.useValueAsRef)(n),y="indeterminate";Number.isFinite(d)&&(y=d===o?"complete":"progressing");let b=(0,k.formatNumberValue)(d,i,x.current),v=r.useMemo(()=>({status:y}),[y]),C={"aria-labelledby":f,"aria-valuemax":o,"aria-valuemin":l,"aria-valuenow":d??void 0,"aria-valuetext":s(b,d),role:"progressbar",children:(0,a.jsxs)(r.Fragment,{children:[m,(0,a.jsx)("span",{role:"presentation",style:w.visuallyHidden,children:"x"})]})},S=r.useMemo(()=>({formattedValue:b,max:o,min:l,setLabelId:g,state:v,status:y,value:d}),[b,o,l,g,v,y,d]),D=(0,N.useRenderElement)("div",e,{state:v,ref:t,props:[C,p],stateAttributesMapping:F});return(0,a.jsx)(M.Provider,{value:S,children:D})}),z=r.forwardRef(function(e,t){let{render:a,className:r,style:n,...s}=e,{state:i}=S();return(0,N.useRenderElement)("div",e,{state:i,ref:t,props:s,stateAttributesMapping:F})});var A=e.i(203922);let T=r.forwardRef(function(e,t){let{render:a,className:n,style:s,...i}=e,{max:o,min:l,value:d,state:c}=S(),u=Number.isFinite(d)&&null!==d?(0,A.valueToPercent)(d,l,o):null,m=r.useCallback(()=>null==u?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return(0,N.useRenderElement)("div",e,{state:c,ref:t,props:[{style:m()},i],stateAttributesMapping:F})}),R=r.forwardRef(function(e,t){let{className:a,render:r,children:n,style:s,...i}=e,{value:o,formattedValue:l,state:d}=S(),c=null==o?"indeterminate":l,u=null==o?null:l;return(0,N.useRenderElement)("span",e,{state:d,ref:t,props:[{"aria-hidden":!0,children:"function"==typeof n?n(c,o):u},i],stateAttributesMapping:F})});var I=e.i(559713);let E=r.forwardRef(function(e,t){let{render:a,className:r,style:n,id:s,...i}=e,{setLabelId:o,state:l}=S(),d=(0,I.useRegisteredLabelId)(s,o);return(0,N.useRenderElement)("span",e,{state:l,ref:t,props:[{id:d,role:"presentation"},i],stateAttributesMapping:F})});e.s(["Indicator",0,T,"Label",0,E,"Root",0,W,"Track",0,z,"Value",0,R],729535);var O=e.i(729535),O=O;function $({className:e,...t}){return(0,a.jsx)(O.Track,{className:(0,b.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function H({className:e,...t}){return(0,a.jsx)(O.Indicator,{"data-slot":"progress-indicator",className:(0,b.cn)("h-full bg-primary transition-all",e),...t})}e.s(["Progress",0,function({className:e,children:t,value:r,...n}){return(0,a.jsxs)(O.Root,{value:r,"data-slot":"progress",className:(0,b.cn)("flex flex-wrap gap-3",e),...n,children:[t,(0,a.jsx)($,{children:(0,a.jsx)(H,{})})]})},"ProgressIndicator",0,H,"ProgressLabel",0,function({className:e,...t}){return(0,a.jsx)(O.Label,{className:(0,b.cn)("text-sm font-medium",e),"data-slot":"progress-label",...t})},"ProgressTrack",0,$],660748)},361031,e=>{"use strict";let t=(0,e.i(816709).create)(e=>({workspaces:[],setWorkspaces:t=>e({workspaces:t}),upsertWorkspace:t=>{e(e=>{let a=e.workspaces.findIndex(e=>e.id===t.id);if(-1===a)return{workspaces:[...e.workspaces,t]};let r=[...e.workspaces];return r[a]=t,{workspaces:r}})},removeWorkspace:t=>{e(e=>({workspaces:e.workspaces.filter(e=>e.id!==t)}))}}));e.s(["useWorkspaceStore",0,t])},524,e=>{"use strict";var t=e.i(344180),a=e.i(764556),r=e.i(209988),n=e.i(260218),s=e.i(355819),i=e.i(193251),o=e.i(62669),l=e.i(511800),d=e.i(681622),c=e.i(434805),u=e.i(660748),m=e.i(244073);function h({open:e,onOpenChange:p,workspace:f,onSubmit:g}){let x=(0,m.useTranslations)("workspace"),y=(0,m.useTranslations)("common"),b=(0,s.useAgentStore)(e=>e.agents),[v,j]=(0,a.useState)(f?.name??""),[w,k]=(0,a.useState)(f?.boundDirs[0]??""),[N,C]=(0,a.useState)(!1),[M,S]=(0,a.useState)(!1),[D,F]=(0,a.useState)(""),[P,W]=(0,a.useState)(!1),[z,A]=(0,a.useState)(null),T=!!f,R=async()=>{if(v&&w){C(!0);try{await g({name:v,boundDirs:[w]}),p(!1)}finally{C(!1)}}},I=(0,a.useCallback)(async()=>{if(D&&w){W(!0),A(null);try{let e=await fetch("/api/workspaces/clone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:D,targetDir:w})});if(!e.ok){let t=await e.json();A({phase:"error",progress:0,error:t.error||x("clone.cloneFailed")}),W(!1);return}let t=e.body?.getReader();if(!t){A({phase:"error",progress:0,error:x("clone.noResponseBody")}),W(!1);return}let a=new TextDecoder,r="";for(;;){let{done:e,value:n}=await t.read();if(e)break;let s=(r+=a.decode(n,{stream:!0})).split("\n");for(let e of(r=s.pop()||"",s))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));A(t),("done"===t.phase||"error"===t.phase)&&(W(!1),"done"===t.phase&&t.cloneDir&&(k(t.cloneDir),v||j(D.split("/").pop()?.replace(".git","")||""),S(!1),F(""),A(null)))}catch{}}}catch(e){A({phase:"error",progress:0,error:e.message}),W(!1)}}},[D,w,v,x]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Dialog,{open:e,onOpenChange:p,children:(0,t.jsxs)(r.DialogContent,{children:[(0,t.jsxs)(r.DialogHeader,{children:[(0,t.jsx)(r.DialogTitle,{children:T?x("dialog.editTitle"):x("dialog.newTitle")}),(0,t.jsx)(r.DialogDescription,{children:T?x("dialog.editDescription"):x("dialog.newDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-2",children:[(0,t.jsx)(d.Input,{className:"rounded-xl py-2.5",placeholder:x("dialog.namePlaceholder"),value:v,onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)("div",{children:(0,t.jsx)(c.FolderPicker,{value:w,onChange:k,placeholder:"/path/to/project"})}),!T&&(0,t.jsxs)(n.Button,{type:"button",variant:"outline",size:"sm",className:"w-full gap-1.5",onClick:()=>S(!0),disabled:!w,title:w?x("clone.fromGitTooltip"):x("clone.selectFolderFirst"),children:[(0,t.jsx)(i.Download,{className:"size-4"}),x("clone.createFromGit")]}),T&&b.length>0&&(0,t.jsxs)("div",{className:"rounded-xl border border-border p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:b.length}),(0,t.jsx)("span",{children:x("agents")})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:e.name||e.role},e.id))})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>p(!1),disabled:N,children:y("cancel")}),(0,t.jsx)(n.Button,{onClick:R,disabled:!v||!w||N,children:y(T?"save":"create")})]})]})}),(0,t.jsx)(r.Dialog,{open:M,onOpenChange:e=>{P||S(e)},children:(0,t.jsxs)(r.DialogContent,{children:[(0,t.jsxs)(r.DialogHeader,{children:[(0,t.jsx)(r.DialogTitle,{children:x("clone.title")}),(0,t.jsx)(r.DialogDescription,{children:x("clone.description")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-2",children:[(0,t.jsx)(d.Input,{className:"rounded-xl py-2.5",placeholder:"https://github.com/user/repo.git",value:D,onChange:e=>F(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault(),disabled:P}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[x("clone.cloneTo"),w,"/",D?D.split("/").pop()?.replace(".git","")||"repo":"..."]}),z&&"done"!==z.phase&&"error"!==z.phase&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)(u.Progress,{value:z.progress,children:[(0,t.jsx)(u.ProgressLabel,{children:x(`clone.phase.${z.phase}`)}),(0,t.jsxs)("span",{className:"ml-auto text-sm text-muted-foreground tabular-nums",children:[z.progress,"%"]}),(0,t.jsx)(u.ProgressTrack,{children:(0,t.jsx)(u.ProgressIndicator,{})})]}),null!=z.received&&null!=z.total&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[z.received," / ",z.total," ",x("clone.objects")]})]}),z?.phase==="error"&&(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/5 p-3",children:[(0,t.jsx)(l.AlertCircle,{className:"size-4 mt-0.5 shrink-0 text-destructive"}),(0,t.jsx)("p",{className:"text-sm text-destructive",children:z.error})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>{P||S(!1)},disabled:P,children:y("cancel")}),(0,t.jsx)(n.Button,{onClick:I,disabled:!D||P,children:P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"size-4 animate-spin"}),x("clone.cloning")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Download,{className:"size-4"}),x("clone.clone")]})})]})]})})]})}e.s(["WorkspaceDialog",0,function({open:e,onOpenChange:a,workspace:r,onSubmit:n}){return(0,t.jsx)(h,{open:e,onOpenChange:a,workspace:r,onSubmit:n},e?r?.id??"new":"closed")}])},487122,511518,e=>{"use strict";let t=Symbol.for("constructDateFrom");e.s(["constructFromSymbol",0,t,"millisecondsInDay",0,864e5,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200],511518),e.s(["constructFrom",0,function(e,a){return"function"==typeof e?e(a):e&&"object"==typeof e&&t in e?e[t](a):e instanceof Date?new e.constructor(a):new Date(a)}],487122)},238153,244874,e=>{"use strict";var t;let a={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function r(e){return (t={})=>{let a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}let n={date:r({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:r({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:r({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function i(e){return(t,a)=>{let r;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,n=a?.width?String(a.width):t;r=e.formattingValues[n]||e.formattingValues[t]}else{let t=e.defaultWidth,n=a?.width?String(a.width):e.defaultWidth;r=e.values[n]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function o(e){return(t,a={})=>{let r,n=a.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;let o=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(l)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}(l,e=>e.test(o)):function(e,t){for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}(l,e=>e.test(o));return r=e.valueCallback?e.valueCallback(d):d,{value:r=a.valueCallback?a.valueCallback(r):r,rest:t.slice(o.length)}}}let l={code:"en-US",formatDistance:(e,t,r)=>{let n,s=a[e];if(n="string"==typeof s?s:1===t?s.one:s.other.replace("{{count}}",t.toString()),r?.addSuffix)if(r.comparison&&r.comparison>0)return"in "+n;else return n+" ago";return n},formatLong:n,formatRelative:(e,t,a,r)=>s[e],localize:{ordinalNumber:(e,t)=>{let a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:i({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:i({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:i({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:i({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:i({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(t={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,a={})=>{let r=e.match(t.matchPattern);if(!r)return null;let n=r[0],s=e.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:i=a.valueCallback?a.valueCallback(i):i,rest:e.slice(n.length)}}),era:o({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:o({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:o({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:o({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:o({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};e.s(["enUS",0,l],244874),e.s(["defaultLocale",0,l],238153)},492421,e=>{"use strict";let t={};e.s(["getDefaultOptions",0,function(){return t}])},632713,516467,e=>{"use strict";var t=e.i(487122);function a(e,a){return(0,t.constructFrom)(a||e,e)}e.s(["toDate",0,a],516467),e.s(["getTimezoneOffsetInMilliseconds",0,function(e){let t=a(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),e-r}],632713)},539392,e=>{"use strict";var t=e.i(487122);e.s(["normalizeDates",0,function(e,...a){let r=t.constructFrom.bind(null,e||a.find(e=>"object"==typeof e));return a.map(r)}])},731285,e=>{"use strict";var t=e.i(539392);e.s(["differenceInCalendarMonths",0,function(e,a,r){let[n,s]=(0,t.normalizeDates)(r?.in,e,a);return 12*(n.getFullYear()-s.getFullYear())+(n.getMonth()-s.getMonth())}])},936765,e=>{"use strict";var t=e.i(516467);e.s(["endOfMonth",0,function(e,a){let r=(0,t.toDate)(e,a?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}])}]);
@@ -1,2 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,837121,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},989484,905724,e=>{"use strict";let t=(0,e.i(433721).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",0,t],905724),e.s(["FileText",0,t],989484)},267624,e=>{"use strict";let t=(0,e.i(433721).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["LayoutGrid",0,t],267624)},100694,e=>{"use strict";var t,s,a,i,n;function l(e,t,s,a){if("a"===s&&!a)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(e):a?a.value:t.get(e)}function r(e,t,s,a,i){if("m"===a)throw TypeError("Private method is not writable");if("a"===a&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?i.call(e,s):i?i.value=s:t.set(e,s),s}"function"==typeof SuppressedError&&SuppressedError;let o="__TAURI_TO_IPC_KEY__";function c(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class d{constructor(e){t.set(this,void 0),s.set(this,0),a.set(this,[]),i.set(this,void 0),r(this,t,e||(()=>{}),"f"),this.id=c(e=>{let n=e.index;if("end"in e)return void(n==l(this,s,"f")?this.cleanupCallback():r(this,i,n,"f"));let o=e.message;if(n==l(this,s,"f")){for(l(this,t,"f").call(this,o),r(this,s,l(this,s,"f")+1,"f");l(this,s,"f")in l(this,a,"f");){let e=l(this,a,"f")[l(this,s,"f")];l(this,t,"f").call(this,e),delete l(this,a,"f")[l(this,s,"f")],r(this,s,l(this,s,"f")+1,"f")}l(this,s,"f")===l(this,i,"f")&&this.cleanupCallback()}else l(this,a,"f")[n]=o})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){r(this,t,e,"f")}get onmessage(){return l(this,t,"f")}[(t=new WeakMap,s=new WeakMap,a=new WeakMap,i=new WeakMap,o)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[o]()}}class m{constructor(e,t,s){this.plugin=e,this.event=t,this.channelId=s}async unregister(){return x(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function u(e,t,s){let a=new d(s);try{return await x(`plugin:${e}|register_listener`,{event:t,handler:a}),new m(e,t,a.id)}catch{return await x(`plugin:${e}|registerListener`,{event:t,handler:a}),new m(e,t,a.id)}}async function x(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}n=new WeakMap,e.s(["Resource",0,class{get rid(){return l(this,n,"f")}constructor(e){n.set(this,void 0),r(this,n,e,"f")}async close(){return x("plugin:resources|close",{rid:this.rid})}},"SERIALIZE_TO_IPC_FN",0,o,"addPluginListener",0,u,"invoke",0,x,"transformCallback",0,c],100694)},757106,e=>{"use strict";let t=(0,e.i(433721).default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);e.s(["default",0,t])},990336,e=>{"use strict";var t=e.i(757106);e.s(["Brain",()=>t.default])},307858,e=>{"use strict";let t=(0,e.i(433721).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],307858)},100559,e=>{"use strict";let t=(0,e.i(433721).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],100559)},549705,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(209988),n=e.i(260218),l=e.i(681622),r=e.i(562918),o=e.i(767467),c=e.i(100559),d=e.i(953700),m=e.i(137340),u=e.i(990336),x=e.i(307858),h=e.i(368942);let p={vision:"bg-blue-500/10 text-blue-600 border-blue-200",reasoning:"bg-purple-500/10 text-purple-600 border-purple-200",embedding:"bg-green-500/10 text-green-600 border-green-200"};function f({providers:e,providerModels:s,onEdit:i,onDelete:l,onAddModel:o}){let d=(0,a.useTranslations)("providers");return(0,t.jsxs)("div",{className:"flex flex-col p-2",children:[e.map(e=>{let a=s.find(t=>t.id===e.id),h=a?.models??[];return(0,t.jsxs)("div",{className:"group rounded-lg px-3 py-2.5 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>i(e),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex size-8 items-center justify-center rounded-lg bg-primary/10",children:(0,t.jsx)(c.Server,{className:"size-4 text-primary"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.apiBase||d("list.noApiBase")})]}),(0,t.jsxs)(r.Badge,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:[h.length," ",d("list.modelsCount")]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-xs",className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),l(e.id)},children:(0,t.jsx)(m.Trash2,{className:"size-3 text-destructive"})})]}),h.length>0&&(0,t.jsx)("div",{className:"mt-2 ml-11 flex flex-wrap gap-1",children:h.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-[11px] text-muted-foreground",children:[(0,t.jsx)(u.Brain,{className:"size-3"}),e.name,["vision","reasoning","embedding"].map(s=>e[s]?(0,t.jsx)("span",{className:`inline-block rounded px-1 text-[9px] font-medium border ${p[s]}`,children:s[0].toUpperCase()},s):null)]},e.id))}),(0,t.jsxs)(n.Button,{variant:"ghost",size:"xs",className:"mt-1 ml-11 h-6 text-[11px] text-muted-foreground",onClick:t=>{t.stopPropagation(),o(e.name)},children:[(0,t.jsx)(x.ExternalLink,{className:"size-3"}),d("list.addModel")]})]},e.id)}),0===e.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,t.jsx)(c.Server,{className:"size-10 mb-2 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:d("list.empty")})]})]})}function g({draft:e,onChange:s}){let i=(0,a.useTranslations)("providers");return(0,t.jsx)("div",{className:"flex flex-col gap-5 p-5",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:i("form.connection")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("form.name")}),(0,t.jsx)(l.Input,{value:e.name||"",onChange:e=>s("name",e.target.value),placeholder:i("form.namePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("form.apiBase")}),(0,t.jsx)(l.Input,{value:e.apiBase||"",onChange:e=>s("apiBase",e.target.value),placeholder:i("form.apiBasePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:i("form.apiKey")}),(0,t.jsx)(l.Input,{type:"password",value:e.apiKey||"",onChange:e=>s("apiKey",e.target.value),placeholder:i("form.apiKeyPlaceholder")})]})]})})}e.s(["ProvidersDialog",0,function({open:e,onOpenChange:l,onAddModel:r,standalone:c}){let m=(0,a.useTranslations)("providers"),u=(0,a.useTranslations)("common"),{models:x,providers:p,ensure:j,addProvider:v,updateProvider:N,removeProvider:y}=(0,h.useLLMStore)(),[b,k]=(0,s.useState)(null),[w,C]=(0,s.useState)(null),[S,T]=(0,s.useState)(!1),[z,D]=(0,s.useState)(!1),[I,P]=(0,s.useState)(null);(0,s.useEffect)(()=>{e&&(T(!0),P(null),j().finally(()=>T(!1)))},[e,j]);let $=()=>{k(null),C(null)},M=()=>{k(null),C({name:"",apiBase:"",apiKey:""})},A=async()=>{if(w&&w.name){D(!0),P(null);try{let e=!b,t=await fetch(e?"/api/providers":`/api/providers/${b.id}`,{method:e?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(!t.ok)throw Error();let s=await t.json();e?v(s):N(s),$()}catch{P(m("error.saveFailed"))}finally{D(!1)}}},E=async e=>{if(confirm(m("confirm.delete"))){D(!0);try{if(!(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok)throw Error();y(e),b?.id===e&&$()}catch{P(m("error.deleteFailed"))}finally{D(!1)}}},B=(0,t.jsxs)(t.Fragment,{children:[!c&&(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b px-5 py-4",children:[w&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:$,children:(0,t.jsx)(o.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)(i.DialogHeader,{className:"flex-1 space-y-0",children:[(0,t.jsx)(i.DialogTitle,{className:"text-base",children:w?b?m("dialog.editTitle"):m("dialog.addTitle"):m("dialog.title")}),(0,t.jsx)(i.DialogDescription,{className:"text-xs",children:w?m("dialog.editDescription"):m("dialog.listDescription")})]}),!w&&(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:M,className:"mr-6",children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),m("dialog.add")]})]}),c&&!w&&(0,t.jsx)("div",{className:"flex items-center justify-end px-5 py-3 border-b",children:(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:M,children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),m("dialog.add")]})}),c&&w&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:$,children:(0,t.jsx)(o.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-medium truncate",children:b?m("dialog.editTitle"):m("dialog.addTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:m("dialog.editDescription")})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[I&&(0,t.jsx)("div",{className:"mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:I}),S?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-muted-foreground",children:m("dialog.loading")}):w?(0,t.jsx)(g,{draft:w,onChange:(e,t)=>{C(s=>s?{...s,[e]:t}:s)}}):(0,t.jsx)(f,{providers:p,providerModels:p.map(e=>{let t;return{id:e.id,models:(t=e.name,x.filter(e=>e.provider===t))}}),onEdit:e=>{k(e),C({...e})},onDelete:E,onAddModel:e=>{c||l(!1),r(e)}})]}),w&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t px-5 py-3",children:[(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:$,disabled:z,children:u("cancel")}),(0,t.jsx)(n.Button,{size:"sm",onClick:A,disabled:z||!w.name,children:u(z?"saving":"save")})]})]});return c?(0,t.jsx)("div",{className:"h-full flex flex-col",children:B}):(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e||$(),l(e)},children:(0,t.jsx)(i.DialogContent,{className:"sm:max-w-2xl max-h-[85vh] flex flex-col p-0 gap-0",children:B})})}])},86477,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(209988),n=e.i(260218),l=e.i(681622),r=e.i(607452),o=e.i(562918),c=e.i(226624),d=e.i(767467),m=e.i(990336),u=e.i(953700),x=e.i(137340),h=e.i(368942);let p={vision:"bg-blue-500/10 text-blue-600 border-blue-200",reasoning:"bg-purple-500/10 text-purple-600 border-purple-200",embedding:"bg-green-500/10 text-green-600 border-green-200"},f=[{label:"8K",value:8192},{label:"16K",value:16384},{label:"32K",value:32768},{label:"64K",value:65536},{label:"128K",value:128e3},{label:"200K",value:2e5},{label:"256K",value:256e3},{label:"1M",value:1e6}],g=["low","medium","high"];function j({groups:e,providerNames:s,onEdit:i,onDelete:l}){let r=(0,a.useTranslations)("models"),c=s.length>0?s:["Other"],d=Object.keys(e).sort((e,t)=>{let s=c.indexOf(e),a=c.indexOf(t);return s>=0&&a>=0?s-a:s>=0?-1:a>=0?1:e.localeCompare(t)});return(0,t.jsxs)("div",{className:"flex flex-col p-4 gap-4",children:[d.map(s=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2 px-1",children:s}),(0,t.jsx)("div",{className:"flex flex-col gap-0.5",children:e[s].map(e=>{var s;return(0,t.jsxs)("div",{className:"group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>i(e),children:[(0,t.jsx)(m.Brain,{className:"size-4 text-muted-foreground shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground font-mono ml-2",children:e.modelId}),e.cost?(0,t.jsxs)("span",{className:"ml-2 text-[11px] text-muted-foreground font-mono",children:["$",y(e.cost.inputPerMillion),"/$",y(e.cost.outputPerMillion)]}):null,e.maxContextTokens?(0,t.jsxs)("span",{className:"ml-2 text-[11px] text-muted-foreground font-mono",children:[(s=e.maxContextTokens,new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(s))," ",r("list.contextAbbr")]}):null]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:["vision","reasoning","embedding"].map(s=>e[s]?(0,t.jsx)(o.Badge,{variant:"outline",className:`text-[10px] h-5 px-1.5 ${p[s]}`,children:r(`capability.${s}`)},s):null)}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-xs",className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),l(e.id)},children:(0,t.jsx)(x.Trash2,{className:"size-3 text-destructive"})})]},e.id)})})]},s)),0===d.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,t.jsx)(m.Brain,{className:"size-10 mb-2 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:r("list.empty")})]})]})}function v({draft:e,providerNames:i,onChange:n}){let o=(0,a.useTranslations)("models"),d=(0,s.useRef)(!1),[m,u]=(0,s.useState)(()=>(function(e){if(!e)return f.length;let t=f.findIndex(t=>t.value===e);return t>=0?t:f.length})(e.maxContextTokens)),x=i.length>0?i:["Other"];return(0,t.jsxs)("div",{className:"flex flex-col gap-5 p-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.details")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.modelId")}),(0,t.jsx)(l.Input,{value:e.modelId||"",onChange:e=>{let t=e.target.value;n("modelId",t),d.current||n("name",t)},placeholder:o("form.modelIdPlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.displayName")}),(0,t.jsx)(l.Input,{value:e.name||"",onChange:e=>{d.current=!0,n("name",e.target.value)},placeholder:o("form.displayNamePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.provider")}),(0,t.jsx)("select",{value:e.provider||"Other",onChange:e=>n("provider",e.target.value),className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 text-sm outline-none focus-visible:border-ring dark:bg-input/30",children:x.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.context")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.maxContextTokens")}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(r.Slider,{min:0,max:f.length,step:1,value:m,onValueChange:e=>{u(e),e<f.length&&n("maxContextTokens",f[e].value)},className:"flex-1"}),m<f.length?(0,t.jsx)("span",{className:"text-sm tabular-nums min-w-[3.5rem] text-right",children:f[m].label}):(0,t.jsx)(l.Input,{type:"number",min:"1",step:"1",value:e.maxContextTokens??"",onChange:e=>n("maxContextTokens",function(e){if(!e.trim())return;let t=Number(e);return Number.isFinite(t)&&t>0?Math.floor(t):void 0}(e.target.value)),placeholder:o("form.customContextPlaceholder"),className:"h-7 w-24 text-sm tabular-nums"})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.thinking")}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-input px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:o("form.enableThinking")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("form.enableThinkingHelper")})]}),(0,t.jsx)(c.Switch,{checked:e.thinkingEnabled??!0,onCheckedChange:e=>n("thinkingEnabled",e)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.effort")}),(0,t.jsx)("select",{value:e.thinkingEffort||"medium",onChange:e=>n("thinkingEffort",e.target.value),disabled:!(e.thinkingEnabled??!0),className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 text-sm outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",children:g.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.cost")}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.inputPerMillion")}),(0,t.jsx)(l.Input,{type:"number",min:"0",step:"0.0001",value:e.cost?.inputPerMillion??0,onChange:t=>n("cost",{inputPerMillion:N(t.target.value),outputPerMillion:e.cost?.outputPerMillion??0}),placeholder:o("form.costPlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:o("form.outputPerMillion")}),(0,t.jsx)(l.Input,{type:"number",min:"0",step:"0.0001",value:e.cost?.outputPerMillion??0,onChange:t=>n("cost",{inputPerMillion:e.cost?.inputPerMillion??0,outputPerMillion:N(t.target.value)}),placeholder:o("form.costPlaceholder")})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:o("form.capabilities")}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:["vision","reasoning","embedding"].map(s=>{let a=!!e[s];return(0,t.jsx)("button",{type:"button",onClick:()=>n(s,!a),className:`rounded-md border px-2 py-1 text-xs font-medium transition-colors cursor-pointer
2
- ${a?p[s]:"text-muted-foreground border-input hover:bg-muted/50"}`,children:o(`capability.${s}`)},s)})})]})]})}function N(e){let t=Number(e);return Number.isFinite(t)&&t>=0?t:0}function y(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:4}).format(e)}e.s(["ModelsDialog",0,function({open:e,onOpenChange:l,initialProvider:r,standalone:o}){let c=(0,a.useTranslations)("models"),m=(0,a.useTranslations)("common"),{models:x,providers:p,ensure:f,addModel:g,updateModel:N,removeModel:y}=(0,h.useLLMStore)(),b=p.map(e=>e.name),[k,w]=(0,s.useState)(null),[C,S]=(0,s.useState)(null),[T,z]=(0,s.useState)(!1),[D,I]=(0,s.useState)(!1),[P,$]=(0,s.useState)(null),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!e){M.current=!1;return}queueMicrotask(()=>{z(!0),$(null)}),f().finally(()=>z(!1))},[e,f]),(0,s.useEffect)(()=>{e&&r&&!C&&!M.current&&(M.current=!0,queueMicrotask(()=>{w(null),S({modelId:"",name:"",provider:r,cost:{inputPerMillion:0,outputPerMillion:0},maxContextTokens:128e3,thinkingEnabled:!0,thinkingEffort:"medium",vision:!1,reasoning:!1,embedding:!1})}))},[e,r,C]);let A=()=>{w(null),S(null)},E=()=>{w(null),S({modelId:"",name:"",provider:"Other",cost:{inputPerMillion:0,outputPerMillion:0},maxContextTokens:128e3,thinkingEnabled:!0,thinkingEffort:"medium",vision:!1,reasoning:!1,embedding:!1})},B=async()=>{if(C&&C.modelId&&C.name){I(!0),$(null);try{let e=!k,t=await fetch(e?"/api/models":`/api/models/${k.id}`,{method:e?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)});if(!t.ok)throw Error();let s=await t.json();e?g(s):N(s),A()}catch{$(c("error.saveFailed"))}finally{I(!1)}}},O=async e=>{if(confirm(c("confirm.delete"))){I(!0);try{if(!(await fetch(`/api/models/${e}`,{method:"DELETE"})).ok)throw Error();y(e),k?.id===e&&A()}catch{$(c("error.deleteFailed"))}finally{I(!1)}}},L=function(e){let t={};for(let s of e){let e=s.provider||"Other";(t[e]??=[]).push(s)}return t}(x),U=(0,t.jsxs)(t.Fragment,{children:[!o&&(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b px-5 py-4",children:[C&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:A,children:(0,t.jsx)(d.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)(i.DialogHeader,{className:"flex-1 space-y-0",children:[(0,t.jsx)(i.DialogTitle,{className:"text-base",children:C?k?c("dialog.editTitle"):c("dialog.addTitle"):c("dialog.title")}),(0,t.jsx)(i.DialogDescription,{className:"text-xs",children:C?c("dialog.editDescription"):c("dialog.listDescription")})]}),!C&&(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:E,className:"mr-6",children:[(0,t.jsx)(u.Plus,{className:"size-3.5"}),c("dialog.add")]})]}),o&&!C&&(0,t.jsx)("div",{className:"flex items-center justify-end px-5 py-3 border-b",children:(0,t.jsxs)(n.Button,{variant:"outline",size:"sm",onClick:E,children:[(0,t.jsx)(u.Plus,{className:"size-3.5"}),c("dialog.add")]})}),o&&C&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm",onClick:A,children:(0,t.jsx)(d.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-medium truncate",children:k?c("dialog.editTitle"):c("dialog.addTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c("dialog.editDescription")})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[P&&(0,t.jsx)("div",{className:"mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:P}),T?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-muted-foreground",children:c("dialog.loading")}):C?(0,t.jsx)(v,{draft:C,providerNames:b,onChange:(e,t)=>{S(s=>s?{...s,[e]:t}:s)}}):(0,t.jsx)(j,{groups:L,providerNames:b,onEdit:e=>{w(e),S({...e,thinkingEnabled:e.thinkingEnabled??!0,thinkingEffort:e.thinkingEffort??"medium"})},onDelete:O})]}),C&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t px-5 py-3",children:[(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:A,disabled:D,children:m("cancel")}),(0,t.jsx)(n.Button,{size:"sm",onClick:B,disabled:D||!C.modelId||!C.name,children:m(D?"saving":"save")})]})]});return o?(0,t.jsx)("div",{className:"h-full flex flex-col",children:U}):(0,t.jsx)(i.Dialog,{open:e,onOpenChange:e=>{e||A(),l(e)},children:(0,t.jsx)(i.DialogContent,{className:"sm:max-w-2xl max-h-[85vh] flex flex-col p-0 gap-0",children:U})})}])},515104,e=>{"use strict";function t(){return"tauri.localhost"===window.location.hostname||"__TAURI_INTERNALS__"in window}async function s(){return t()?r():"Notification"in window?l(Notification.permission):"unsupported"}async function a(){return t()?o():n()}async function i(e,s){var a,i;return t()?c(e,s):(a=e,i=s,void("Notification"in window&&"granted"===Notification.permission&&new Notification(a,{body:i,icon:"/favicon.ico"})))}async function n(){return"Notification"in window?l(await Notification.requestPermission()):"unsupported"}function l(e){switch(e){case"granted":return"granted";case"denied":return"denied";default:return"default"}}async function r(){try{let{isPermissionGranted:t}=await e.A(678001);return await t()?"granted":"default"}catch{return"unsupported"}}async function o(){try{let{requestPermission:t,isPermissionGranted:s}=await e.A(678001),a=await t();if("granted"===a||await s())return"granted";return"denied"}catch{return"unsupported"}}async function c(t,s){try{let{sendNotification:a,isPermissionGranted:i}=await e.A(678001);if(!await i())return;a({title:t,body:s})}catch{}}e.s(["getNotificationPermission",0,s,"isTauriEnvironment",0,t,"requestNotificationPermission",0,a,"sendNativeNotification",0,i])},437122,233297,286117,e=>{"use strict";var t=e.i(523592);function s(e){let[t,s=""]=e.split("#",2),[a,i=""]=t.split("?",2);if(!a.startsWith("/")||a.startsWith("/api/"))return e;if("/"===a)return`/${i?`?${i}`:""}${s?`#${s}`:""}`;if(a.startsWith("/workspace/")){let e=a.slice(11).split("/")[0],t=new URLSearchParams(i);return t.set("workspaceId",e),`/workspace/_.html${t.toString()?`?${t.toString()}`:""}${s?`#${s}`:""}`}let n=a.endsWith(".html")?a:`${a}.html`;return`${n}${i?`?${i}`:""}${s?`#${s}`:""}`}function a(e){return"/index.html"===e?"/":e.endsWith(".html")?e.slice(0,-5):e}function i(e){return"/login"===a(e)}e.i(8890),e.i(515104),e.s(["tauriNavigate",0,function(e,t,a=!1){t=s(t),a?window.location.replace(t):window.location.href=t},"toStaticHref",0,s],233297),e.s(["isLoginPath",0,i,"isWorkspacePath",0,function(e){return a(e).startsWith("/workspace/")},"workspaceIdFromLocation",0,function(e,t){let s=new URLSearchParams(t).get("workspaceId");if(s)return s;let i=a(e).match(/^\/workspace\/([^/]+)/);return i?.[1]??null}],286117);let n="agent-spaces-token",l="agent-spaces-auth-verified";function r(){let e=localStorage.getItem(n);if(null!==e)return e;let s=(0,t.getActiveServer)()?.secret;return void 0!==s?s:null}function o(){localStorage.removeItem(n),localStorage.removeItem(l)}function c(){let e=r();return null===e?{}:{Authorization:`Bearer ${e}`}}async function d(e,a){let n=function(e){if("string"!=typeof e||e.startsWith("http"))return e;let s=(0,t.getActiveServerUrl)();return s?`${s}${e.startsWith("/")?"":"/"}${e}`:e}(e),l={...c(),...a?.headers},r=await fetch(n,{...a,headers:l});return(401===r.status||403===r.status)&&(o(),i(window.location.pathname)||window.location.replace(s("/login"))),r}e.s(["authHeaders",0,c,"fetchWithAuth",0,d,"getToken",0,r,"isAuthenticated",0,function(){return"1"===localStorage.getItem(l)},"removeToken",0,o,"setToken",0,function(e){localStorage.setItem(n,e),localStorage.setItem(l,"1")}],437122)},962562,995684,e=>{"use strict";let t=(0,e.i(433721).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(["default",0,t],995684),e.s(["Pencil",0,t],962562)},210,e=>{"use strict";let t=(0,e.i(433721).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],210)},894920,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(209988),i=e.i(260218),n=e.i(681622),l=e.i(788010),r=e.i(344118),o=e.i(962562),c=e.i(953700),d=e.i(100559),m=e.i(137340);let u=(0,e.i(433721).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var x=e.i(244073);e.s(["ServerManagerDialog",0,function({open:e,onOpenChange:h,servers:p,activeId:f,onUpdate:g,onRemove:j,onSwitch:v}){let N=(0,x.useTranslations)("sidebar"),y=(0,x.useTranslations)("common"),[b,k]=s.useState(null),[w,C]=s.useState(""),[S,T]=s.useState(""),[z,D]=s.useState(""),[I,P]=s.useState(""),[$,M]=s.useState(""),[A,E]=s.useState(""),[B,O]=s.useState(""),[L,U]=s.useState(null),_=()=>{k(null),C(""),T(""),D("")},F=()=>{if(!w.trim()||!S.trim())return;let e=S.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),g(p.map(t=>t.id===b?{...t,name:w.trim(),url:e,secret:z.trim()||void 0}:t)),_()},R=s.useCallback(e=>{console.log(`[server-diagnostic] ${e}`),O(t=>`${t}${t?"\n":""}${e}`)},[]),H=async e=>{U(e.id),O("");let t=e.url.replace(/\/$/,""),s=`${t}/api/health`,a=new URL("/ws",t);a.protocol="https:"===a.protocol?"wss:":"ws:",a.searchParams.set("workspaceId","__diagnostic__"),a.searchParams.set("token",e.secret||"__diagnostic__"),R(`time: ${new Date().toISOString()}`),R(`window.origin: ${window.location.origin}`),R(`window.href: ${window.location.href}`),R(`navigator.onLine: ${navigator.onLine}`),R(`target: ${t}`),R(`health: ${s}`);let i=performance.now();try{let e=new AbortController,t=window.setTimeout(()=>e.abort(),1e4),a=await fetch(s,{method:"GET",cache:"no-store",mode:"cors",signal:e.signal});window.clearTimeout(t);let n=await a.text();R(`fetch /api/health: OK ${a.status} ${a.statusText} (${Math.round(performance.now()-i)}ms)`),R(`fetch response: ${n.slice(0,500)||"<empty>"}`)}catch(t){let e=t instanceof Error?t:Error(String(t));R(`fetch /api/health: FAILED ${e.name}: ${e.message} (${Math.round(performance.now()-i)}ms)`)}R(`websocket: ${a.toString()}`),await new Promise(e=>{let t=performance.now(),s=!1,i=(a,i)=>{if(!s){s=!0,R(`${a} (${Math.round(performance.now()-t)}ms)`);try{i?.close()}catch{}e()}};try{let e=new WebSocket(a.toString()),t=window.setTimeout(()=>i("websocket: TIMEOUT",e),1e4);e.onopen=()=>{window.clearTimeout(t),i("websocket: OPEN",e)},e.onerror=()=>{window.clearTimeout(t),i("websocket: ERROR",e)},e.onclose=s=>{window.clearTimeout(t),i(`websocket: CLOSE code=${s.code} reason=${s.reason||"<empty>"}`,e)}}catch(t){let e=t instanceof Error?t:Error(String(t));i(`websocket: FAILED ${e.name}: ${e.message}`)}}),U(null)};return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{h(e),e||_()},children:(0,t.jsxs)(a.DialogContent,{className:"max-w-md",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:N("server.manageServers")}),(0,t.jsx)(a.DialogDescription,{children:N("server.manageDescription")})]}),(0,t.jsx)("div",{className:"space-y-1",children:p.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2",children:[(0,t.jsx)(d.Server,{className:"size-4 shrink-0 text-muted-foreground"}),b===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Input,{className:"h-7 text-sm flex-1",value:w,onChange:e=>C(e.target.value),placeholder:"Name",autoFocus:!0}),(0,t.jsx)(n.Input,{className:"h-7 text-sm flex-[1.5]",value:S,onChange:e=>T(e.target.value),placeholder:"http://...",onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:F,className:"h-7 px-2",children:y("save")}),(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:_,className:"h-7 px-2",children:y("cancel")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:()=>{e.id!==f&&v(e)},children:[(0,t.jsx)("div",{className:"text-sm font-medium truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:e.url})]}),e.id===f?(0,t.jsx)(r.Check,{className:"size-4 shrink-0 text-primary"}):(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:()=>v(e),className:"h-7 px-2 text-xs shrink-0",children:N("server.switch")}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>H(e)}),(0,t.jsx)(o.Pencil,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>{k(e.id),C(e.name),T(e.url),D(e.secret||"")}}),"default"!==e.id&&(0,t.jsx)(m.Trash2,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-destructive",onClick:()=>j(e.id)})]})]})]},e.id))}),null===b&&(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:N("server.newServer")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{className:"h-8 text-sm",value:I,onChange:e=>P(e.target.value),placeholder:"Name"}),(0,t.jsx)(i.Button,{size:"sm",onClick:()=>{if(!I.trim()||!$.trim())return;let e=$.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),g([...p,{id:Date.now().toString(),name:I.trim(),url:e,secret:A.trim()||void 0}]),P(""),M(""),E("")},disabled:!I.trim()||!$.trim(),children:(0,t.jsx)(c.Plus,{className:"size-4"})})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(n.Input,{className:"h-8 text-sm flex-1",value:$,onChange:e=>M(e.target.value),placeholder:"http://..."})}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(n.Input,{className:"h-8 text-sm flex-1",type:"password",value:A,onChange:e=>E(e.target.value),placeholder:N("server.secretOptionalPlaceholder"),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})})]}),(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Network diagnostics"}),(0,t.jsx)(i.Button,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:!p.find(e=>e.id===f)||null!==L,onClick:()=>{let e=p.find(e=>e.id===f);e&&H(e)},children:L?"Testing...":"Test active"})]}),(0,t.jsx)(l.Textarea,{readOnly:!0,value:B||"Tap the Wi-Fi icon next to a server, or use Test active.",className:"h-36 resize-none font-mono text-[11px]"})]})]})})}],894920)},111343,e=>{"use strict";let t=(0,e.i(433721).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],111343)},255742,973767,401058,977694,e=>{"use strict";var t=e.i(433721);let s=(0,t.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["Star",0,s],255742);let a=(0,t.default)("star-off",[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["StarOff",0,a],973767);let i=(0,t.default)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);e.s(["MoreVertical",0,i],401058);let n=(0,t.default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);e.s(["Rocket",0,n],977694)},22906,191202,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(887836),n=e.i(209988),l=e.i(260218),r=e.i(681622),o=e.i(788010),c=e.i(191118),d=e.i(917955),m=e.i(996652),u=e.i(188815),x=e.i(611176),h=e.i(255742),p=e.i(973767),f=e.i(129981),g=e.i(887354);let j=(0,e.i(433721).default)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]);e.s(["Plug",0,j],191202);var v=e.i(972846),N=e.i(401058),y=e.i(137340),b=e.i(977694),k=e.i(111343),w=e.i(465458);e.i(462506);let C=(0,i.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["McpsDialog",0,function({open:e,onOpenChange:i,standalone:S}){let T=(0,a.useTranslations)("mcps"),z=(0,a.useTranslations)("common"),[D,I]=(0,s.useState)([]),[P,$]=(0,s.useState)([]),[M,A]=(0,s.useState)(!1),[E,B]=(0,s.useState)(""),[O,L]=(0,s.useState)("all"),[U,_]=(0,s.useState)(""),[F,R]=(0,s.useState)(!1),[H,W]=(0,s.useState)(""),[K,J]=(0,s.useState)(""),[q,V]=(0,s.useState)(null),[G,X]=(0,s.useState)([]),[Y,Z]=(0,s.useState)(null),[Q,ee]=(0,s.useState)(""),et=(0,s.useCallback)(async()=>{A(!0);try{let e=await fetch("/api/mcps");e.ok&&I(await e.json())}catch{}A(!1)},[]),es=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/agents/presets");if(e.ok){let t=await e.json();$(t.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})))}}catch{}},[]);(0,s.useEffect)(()=>{(e||S)&&(et(),es())},[e,S,et,es]);let ea=async e=>{try{let t=await fetch(`/api/mcps/${encodeURIComponent(e.name)}/favorite`,{method:"POST"});if(t.ok){let{favorited:s}=await t.json();I(t=>t.map(t=>t.name===e.name?{...t,favorited:s}:t))}}catch{}},ei=async()=>{J("");try{JSON.parse(H)}catch{J(T("importInvalidJson"));return}try{let e=await fetch("/api/mcps/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonText:H})});if(e.ok)W(""),R(!1),et();else{let t=await e.json();J(t.error||T("importFailed"))}}catch{J(T("importFailed"))}},en=async()=>{let e;if(Y){try{e=JSON.parse(Q)}catch{return}try{(await fetch(`/api/mcps/${encodeURIComponent(Y.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})})).ok&&(I(t=>t.map(t=>t.name===Y.name?{...t,config:e}:t)),Z(null))}catch{}}},el=async e=>{try{(await fetch(`/api/mcps/${encodeURIComponent(e.name)}`,{method:"DELETE"})).ok&&I(t=>t.filter(t=>t.name!==e.name))}catch{}},er=async()=>{if(q){for(let e of P){let t=q.boundAgents.some(t=>t.id===e.id),s=G.includes(e.id);if(t&&!s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json(),a=s.mcps||{},i={...a.mcpServers||{}};delete i[q.name],await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,mcps:{...a,mcpServers:i}})})}else if(!t&&s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json(),a=s.mcps||{},i={...a.mcpServers||{}};q.name in i||(i[q.name]=q.config,await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,mcps:{...a,mcpServers:i}})}))}}V(null),et()}},eo=e=>{X(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ec=D.filter(e=>{if(E){let t=E.toLowerCase();if(!e.name.toLowerCase().includes(t)&&!e.description.toLowerCase().includes(t))return!1}return("favorites"!==O||!!e.favorited)&&("agent"!==O||!U||!!e.boundAgents.some(e=>e.id===U))}),ed=(S||e)&&!q&&!Y,em=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-end pr-8 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[S?(0,t.jsx)("h2",{className:"text-base font-semibold",children:T("title")}):(0,t.jsx)(n.DialogTitle,{children:T("title")}),S?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("description")}):(0,t.jsx)(n.DialogDescription,{children:T("description")})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsxs)(m.Popover,{open:F,onOpenChange:R,children:[(0,t.jsx)(m.PopoverTrigger,{render:(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(f.Upload,{className:"size-3.5 mr-1"}),T("import")]})}),(0,t.jsx)(m.PopoverContent,{className:"w-96",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:T("importTitle")}),(0,t.jsx)(o.Textarea,{value:H,onChange:e=>{W(e.target.value),J("")},placeholder:'{\n "mcpServers": {\n "server-name": {\n "command": "npx",\n "args": ["-y", "package"],\n "env": {}\n }\n }\n}',className:"font-mono text-xs min-h-[180px] resize-none"}),K&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:K}),(0,t.jsx)(l.Button,{size:"sm",onClick:ei,disabled:!H.trim(),className:"w-full",children:T("importConfirm")})]})})]})})]})}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:flex w-44 shrink-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(l.Button,{variant:"all"===O?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("all"),_("")},children:[(0,t.jsx)(j,{className:"size-3.5 mr-1.5"}),T("filterAll")]}),(0,t.jsxs)(l.Button,{variant:"favorites"===O?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("favorites"),_("")},children:[(0,t.jsx)(h.Star,{className:"size-3.5 mr-1.5"}),T("filterFavorites")]})]}),P.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground px-2",children:T("filterByAgent")}),(0,t.jsx)(c.ScrollArea,{className:"max-h-48",children:P.map(e=>(0,t.jsxs)(l.Button,{variant:"agent"===O&&U===e.id?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("agent"),_(e.id)},children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-4 mr-1.5 rounded-full"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex md:hidden flex-col gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:E,onChange:e=>B(e.target.value),placeholder:T("search"),className:"pl-8"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex rounded-lg border border-input p-0.5",children:[(0,t.jsx)("button",{type:"button",className:(0,w.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","all"===O?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{L("all"),_("")},children:T("filterAll")}),(0,t.jsxs)("button",{type:"button",className:(0,w.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","favorites"===O?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{L("favorites"),_("")},children:[(0,t.jsx)(h.Star,{className:"size-3 inline-block mr-0.5 -mt-px"}),T("filterFavorites")]})]}),P.length>0&&(0,t.jsx)(u.SearchSelect,{value:"agent"===O?U:"",onChange:e=>{e?(L("agent"),_(e)):(L("all"),_(""))},options:P.map(e=>({value:e.id,label:e.name})),placeholder:T("filterByAgent"),allowCustom:!1,className:"flex-1 min-w-0"})]})]}),(0,t.jsxs)("div",{className:"hidden md:block relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:E,onChange:e=>B(e.target.value),placeholder:T("search"),className:"pl-8"})]}),(0,t.jsx)(c.ScrollArea,{className:"flex-1",children:M?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:z("loading")}):0===ec.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:T("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 pr-2",children:ec.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{Z(e),ee(JSON.stringify(e.config,null,2))},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(j,{className:"size-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center size-5 rounded hover:bg-accent",onClick:t=>{t.stopPropagation(),ea(e)},children:e.favorited?(0,t.jsx)(h.Star,{className:"size-3.5 text-yellow-500 fill-yellow-500"}):(0,t.jsx)(p.StarOff,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||e.config.command||e.config.url||JSON.stringify(e.config).slice(0,100)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>{V(e),X(e.boundAgents.map(e=>e.id))},children:[(0,t.jsx)(b.Rocket,{className:"size-3.5 mr-1"}),T("apply")]}),(0,t.jsxs)(d.DropdownMenu,{children:[(0,t.jsx)(d.DropdownMenuTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"size-7"}),children:(0,t.jsx)(N.MoreVertical,{className:"size-3.5"})}),(0,t.jsx)(d.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(d.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>el(e),children:[(0,t.jsx)(y.Trash2,{className:"size-3.5 mr-1.5"}),T("delete")]})})]})]})]}),e.boundAgents.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-2.5 pt-2.5 border-t border-border/50",children:[e.boundAgents.map(e=>(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"},e.id)),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:e.boundAgents.length})]})]},e.name))})})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[S&&ed&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:em}),!S&&(0,t.jsx)(n.Dialog,{open:ed,onOpenChange:i,children:(0,t.jsx)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:em})}),(0,t.jsx)(n.Dialog,{open:!!Y,onOpenChange:e=>{e||Z(null)},children:(0,t.jsxs)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.DialogTitle,{children:T("editTitle",{name:Y?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:T("editDescription")})]}),(0,t.jsxs)(l.Button,{size:"sm",onClick:en,children:[(0,t.jsx)(k.Save,{className:"size-3.5 mr-1"}),z("save")]})]})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 pt-2",children:(0,t.jsx)(C,{height:"100%",language:"json",value:Q,onChange:e=>ee(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on",formatOnPaste:!0}})})]})}),(0,t.jsx)(n.Dialog,{open:!!q,onOpenChange:e=>{e||V(null)},children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:T("bindTitle",{name:q?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:T("bindDescription")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,t.jsx)("div",{className:"max-h-52 overflow-y-auto space-y-0.5",children:P.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>eo(e.id),className:(0,w.cn)("flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors"),children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate",children:e.name}),e.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.description})]}),(0,t.jsx)("div",{className:(0,w.cn)("flex items-center justify-center size-4 rounded border shrink-0",G.includes(e.id)?"bg-primary border-primary text-primary-foreground":"border-input")})]},e.id))}),G.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:G.map(e=>{let s=P.find(t=>t.id===e);return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:[(0,t.jsx)(x.AgentIcon,{agentId:e,name:s?.name,className:"size-3.5 rounded-full"}),s?.name||e,(0,t.jsx)("button",{type:"button",onClick:()=>eo(e),className:"hover:text-destructive",children:(0,t.jsx)(v.X,{className:"size-3"})})]},e)})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>V(null),children:z("cancel")}),(0,t.jsx)(l.Button,{onClick:er,children:z("confirm")})]})]})]})})]})}],22906)},625873,e=>{"use strict";var t=e.i(344180),s=e.i(764556),a=e.i(244073),i=e.i(887836),n=e.i(209988),l=e.i(260218),r=e.i(681622),o=e.i(191118),c=e.i(917955),d=e.i(996652),m=e.i(460578),u=e.i(188815),x=e.i(611176),h=e.i(255742),p=e.i(973767),f=e.i(129981),g=e.i(887354),j=e.i(989484),v=e.i(972846),N=e.i(401058),y=e.i(137340),b=e.i(977694),k=e.i(111343),w=e.i(601039),C=e.i(465458);e.i(462506);let S=(0,i.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["SkillsDialog",0,function({open:e,onOpenChange:i,standalone:T}){let z=(0,a.useTranslations)("skills"),D=(0,a.useTranslations)("common"),[I,P]=(0,s.useState)([]),[$,M]=(0,s.useState)([]),[A,E]=(0,s.useState)(!1),[B,O]=(0,s.useState)(""),[L,U]=(0,s.useState)("all"),[_,F]=(0,s.useState)(""),[R,H]=(0,s.useState)(!1),[W,K]=(0,s.useState)([]),[J,q]=(0,s.useState)(null),[V,G]=(0,s.useState)([]),[X,Y]=(0,s.useState)(null),[Z,Q]=(0,s.useState)(""),[ee,et]=(0,s.useState)([]),[es,ea]=(0,s.useState)(new Set),[ei,en]=(0,s.useState)(!1),[el,er]=(0,s.useState)(!1),eo=(0,s.useCallback)(async()=>{E(!0);try{let e=await fetch("/api/skills");e.ok&&P(await e.json())}catch{}E(!1)},[]),ec=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/agents/presets");if(e.ok){let t=await e.json();M(t.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})))}}catch{}},[]);(0,s.useEffect)(()=>{(e||T)&&(eo(),ec())},[e,T,eo,ec]);let ed=async e=>{try{let t=await fetch(`/api/skills/${encodeURIComponent(e.name)}/favorite`,{method:"POST"});if(t.ok){let{favorited:s}=await t.json();P(t=>t.map(t=>t.name===e.name?{...t,favorited:s}:t))}}catch{}},em=async()=>{for(let e of W){let t=await e.file.text();await fetch("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:e.file.name,content:t})})}K([]),H(!1),eo()},eu=async()=>{if(X)try{(await fetch(`/api/skills/${encodeURIComponent(X.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:Z})})).ok&&(P(e=>e.map(e=>e.name===X.name?{...e,content:Z}:e)),Y(null))}catch{}},ex=async e=>{try{(await fetch(`/api/skills/${encodeURIComponent(e.name)}`,{method:"DELETE"})).ok&&P(t=>t.filter(t=>t.name!==e.name))}catch{}},eh=async()=>{if(J){for(let e of $){let t=J.boundAgents.some(t=>t.id===e.id),s=V.includes(e.id);if(t&&!s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json(),a=(s.skills||[]).filter(e=>e.replace(/\.md$/i,"")!==J.name);console.log("[skills] remove skill",J.name,"from agent",e.name,"updatedSkills:",a),await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,skills:a})})}else if(!t&&s){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let s=await t.json();if(!(s.skills||[]).map(e=>e.replace(/\.md$/i,"")).includes(J.name)){let t=[...s.skills||[],`${J.name}.md`];console.log("[skills] add skill",J.name,"to agent",e.name,"updatedSkills:",t),await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,skills:t})})}}}q(null),eo()}},ep=e=>{G(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},ef=async()=>{er(!0);try{let e=await fetch("/api/skills/sync-check");if(e.ok){let t=await e.json();et(t),ea(new Set(t.map(e=>`${e.agentId}::${e.skillName}`))),en(!0)}}catch{}er(!1)},eg=async()=>{let e=ee.filter(e=>es.has(`${e.agentId}::${e.skillName}`));if(0!==e.length)try{(await fetch("/api/skills/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:e.map(e=>({agentId:e.agentId,skillName:e.skillName}))})})).ok&&(en(!1),eo())}catch{}},ej=I.filter(e=>{if(B){let t=B.toLowerCase();if(!e.name.toLowerCase().includes(t)&&!e.content.toLowerCase().includes(t))return!1}return("favorites"!==L||!!e.favorited)&&("agent"!==L||!_||!!e.boundAgents.some(e=>e.id===_))}),ev=(T||e)&&!J&&!X,eN=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[T?(0,t.jsx)("h2",{className:"text-base font-semibold",children:z("title")}):(0,t.jsx)(n.DialogTitle,{children:z("title")}),T?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:z("description")}):(0,t.jsx)(n.DialogDescription,{children:z("description")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto shrink-0 pt-2",children:[(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:ef,disabled:el,children:[(0,t.jsx)(w.RefreshCw,{className:(0,C.cn)("size-3.5 mr-1",el&&"animate-spin")}),z("syncToAgents")]}),(0,t.jsxs)(d.Popover,{open:R,onOpenChange:H,children:[(0,t.jsx)(d.PopoverTrigger,{render:(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(f.Upload,{className:"size-3.5 mr-1"}),z("import")]})}),(0,t.jsx)(d.PopoverContent,{className:"w-80",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:z("importTitle")}),(0,t.jsx)(m.FileUpload,{value:W,onChange:K,accept:{"text/markdown":[".md"],"":[".md"]},placeholder:z("importPlaceholder"),maxFiles:10}),(0,t.jsx)(l.Button,{size:"sm",onClick:em,disabled:0===W.length,className:"w-full",children:z("importConfirm")})]})})]})]})]})}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:flex w-44 shrink-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(l.Button,{variant:"all"===L?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{U("all"),F("")},children:[(0,t.jsx)(j.FileText,{className:"size-3.5 mr-1.5"}),z("filterAll")]}),(0,t.jsxs)(l.Button,{variant:"favorites"===L?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{U("favorites"),F("")},children:[(0,t.jsx)(h.Star,{className:"size-3.5 mr-1.5"}),z("filterFavorites")]})]}),$.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground px-2",children:z("filterByAgent")}),(0,t.jsx)(o.ScrollArea,{className:"max-h-48",children:$.map(e=>(0,t.jsxs)(l.Button,{variant:"agent"===L&&_===e.id?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{U("agent"),F(e.id)},children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-4 mr-1.5 rounded-full"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex md:hidden flex-col gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:B,onChange:e=>O(e.target.value),placeholder:z("search"),className:"pl-8"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex rounded-lg border border-input p-0.5",children:[(0,t.jsx)("button",{type:"button",className:(0,C.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","all"===L?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{U("all"),F("")},children:z("filterAll")}),(0,t.jsxs)("button",{type:"button",className:(0,C.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","favorites"===L?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{U("favorites"),F("")},children:[(0,t.jsx)(h.Star,{className:"size-3 inline-block mr-0.5 -mt-px"}),z("filterFavorites")]})]}),$.length>0&&(0,t.jsx)(u.SearchSelect,{value:"agent"===L?_:"",onChange:e=>{e?(U("agent"),F(e)):(U("all"),F(""))},options:$.map(e=>({value:e.id,label:e.name})),placeholder:z("filterByAgent"),allowCustom:!1,className:"flex-1 min-w-0"})]})]}),(0,t.jsxs)("div",{className:"hidden md:block relative",children:[(0,t.jsx)(g.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(r.Input,{value:B,onChange:e=>O(e.target.value),placeholder:z("search"),className:"pl-8"})]}),(0,t.jsx)(o.ScrollArea,{className:"flex-1",children:A?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:D("loading")}):0===ej.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:z("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 pr-2",children:ej.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{Y(e),Q(e.content)},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center size-5 rounded hover:bg-accent",onClick:t=>{t.stopPropagation(),ed(e)},children:e.favorited?(0,t.jsx)(h.Star,{className:"size-3.5 text-yellow-500 fill-yellow-500"}):(0,t.jsx)(p.StarOff,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||e.content.slice(0,120).replace(/^#\s+/,"")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>{q(e),G(e.boundAgents.map(e=>e.id))},children:[(0,t.jsx)(b.Rocket,{className:"size-3.5 mr-1"}),z("apply")]}),(0,t.jsxs)(c.DropdownMenu,{children:[(0,t.jsx)(c.DropdownMenuTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"size-7"}),children:(0,t.jsx)(N.MoreVertical,{className:"size-3.5"})}),(0,t.jsx)(c.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(c.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>ex(e),children:[(0,t.jsx)(y.Trash2,{className:"size-3.5 mr-1.5"}),z("delete")]})})]})]})]}),e.boundAgents.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-2.5 pt-2.5 border-t border-border/50",children:[e.boundAgents.map(e=>(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"},e.id)),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:e.boundAgents.length})]})]},e.name))})})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[T&&ev&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:eN}),!T&&(0,t.jsx)(n.Dialog,{open:ev,onOpenChange:i,children:(0,t.jsx)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:eN})}),(0,t.jsx)(n.Dialog,{open:!!X,onOpenChange:e=>{e||Y(null)},children:(0,t.jsxs)(n.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(n.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.DialogTitle,{children:z("editTitle",{name:X?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:z("editDescription")})]}),(0,t.jsxs)(l.Button,{size:"sm",onClick:eu,children:[(0,t.jsx)(k.Save,{className:"size-3.5 mr-1"}),D("save")]})]})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 pt-2",children:(0,t.jsx)(S,{height:"100%",language:"markdown",value:Z,onChange:e=>Q(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on"}})})]})}),(0,t.jsx)(n.Dialog,{open:!!J,onOpenChange:e=>{e||q(null)},children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:z("bindTitle",{name:J?.name||""})}),(0,t.jsx)(n.DialogDescription,{children:z("bindDescription")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,t.jsx)("div",{className:"max-h-52 overflow-y-auto space-y-0.5",children:$.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>ep(e.id),className:(0,C.cn)("flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors"),children:[(0,t.jsx)(x.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate",children:e.name}),e.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.description})]}),(0,t.jsx)("div",{className:(0,C.cn)("flex items-center justify-center size-4 rounded border shrink-0",V.includes(e.id)?"bg-primary border-primary text-primary-foreground":"border-input")})]},e.id))}),V.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:V.map(e=>{let s=$.find(t=>t.id===e);return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:[(0,t.jsx)(x.AgentIcon,{agentId:e,name:s?.name,className:"size-3.5 rounded-full"}),s?.name||e,(0,t.jsx)("button",{type:"button",onClick:()=>ep(e),className:"hover:text-destructive",children:(0,t.jsx)(v.X,{className:"size-3"})})]},e)})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>q(null),children:D("cancel")}),(0,t.jsx)(l.Button,{onClick:eh,children:D("confirm")})]})]})]})}),(0,t.jsx)(n.Dialog,{open:ei,onOpenChange:en,children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-lg",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:z("syncTitle")}),(0,t.jsx)(n.DialogDescription,{children:z("syncDescription")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[0===ee.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-sm",children:z("syncEmpty")}):(0,t.jsx)(o.ScrollArea,{className:"max-h-72",children:(0,t.jsx)("div",{className:"space-y-1",children:ee.map(e=>{let s=`${e.agentId}::${e.skillName}`;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t,s;let a;return t=e.agentId,s=e.skillName,a=`${t}::${s}`,void ea(e=>{let t=new Set(e);return t.has(a)?t.delete(a):t.add(a),t})},className:"flex items-center gap-3 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors",children:[(0,t.jsx)("div",{className:(0,C.cn)("flex items-center justify-center size-4 rounded border shrink-0",es.has(s)?"bg-primary border-primary text-primary-foreground":"border-input")}),(0,t.jsx)(x.AgentIcon,{agentId:e.agentId,name:e.agentName,className:"size-5 rounded-full"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.agentName}),(0,t.jsxs)("span",{className:"text-muted-foreground text-xs shrink-0",children:[e.skillName,".md"]})]},s)})})}),ee.length>0&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>en(!1),children:D("cancel")}),(0,t.jsx)(l.Button,{onClick:eg,disabled:0===es.size,children:z("syncConfirm")})]})]})]})})]})}])},678001,e=>{e.v(t=>Promise.all(["static/chunks/0vesz93a98px4.js"].map(t=>e.l(t))).then(()=>t(228394)))},863812,e=>{e.v(t=>Promise.all(["static/chunks/168ojsxhm7ypc.js"].map(t=>e.l(t))).then(()=>t(158480)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,799543,(e,t,n)=>{t.exports=e.r(233331)},953700,e=>{"use strict";let t=(0,e.i(433721).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],953700)},137340,288556,e=>{"use strict";let t=(0,e.i(433721).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(["default",0,t],288556),e.s(["Trash2",0,t],137340)},816709,e=>{"use strict";var t=e.i(764556);let n=e=>{let t,n=new Set,o=(e,o)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=o?o:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,i={setState:o,getState:r,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(o,r,i);return i},o=e=>{let o=e?n(e):n,r=e=>(function(e,n=e=>e){let o=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>n(e.getState()),[e,n]),t.default.useCallback(()=>n(e.getInitialState()),[e,n]));return t.default.useDebugValue(o),o})(o,e);return Object.assign(r,o),r};e.s(["create",0,e=>e?o(e):o],816709)},996652,e=>{"use strict";var t,n=e.i(344180);e.s([],739605),e.i(739605);var o=e.i(764556),r=e.i(166392),i=e.i(538501),a=e.i(427396),s=e.i(974578),l=e.i(389124),u=e.i(107164);e.i(8890);var d=e.i(267805);let c=o.createContext(void 0);function p(e){let t=o.useContext(c);if(void 0===t&&!e)throw Error((0,d.default)(47));return t}var g=e.i(106206),f=e.i(493696),h=e.i(332976),S=e.i(232449),v=e.i(549154),m=e.i(130522),C=e.i(742665),x=e.i(695011),R=e.i(561213),y=e.i(576487);let b={...x.popupStoreSelectors,disabled:(0,h.createSelector)(e=>e.disabled),instantType:(0,h.createSelector)(e=>e.instantType),openMethod:(0,h.createSelector)(e=>e.openMethod),openChangeReason:(0,h.createSelector)(e=>e.openChangeReason),modal:(0,h.createSelector)(e=>e.modal),focusManagerModal:(0,h.createSelector)(e=>e.focusManagerModal),stickIfOpen:(0,h.createSelector)(e=>e.stickIfOpen),titleElementId:(0,h.createSelector)(e=>e.titleElementId),descriptionElementId:(0,h.createSelector)(e=>e.descriptionElementId),openOnHover:(0,h.createSelector)(e=>e.openOnHover),closeDelay:(0,h.createSelector)(e=>e.closeDelay),hasViewport:(0,h.createSelector)(e=>e.hasViewport)};class O extends f.ReactStore{constructor(e){const t={...(0,x.createInitialPopupStoreState)(),disabled:!1,modal:!1,focusManagerModal:!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:o.createRef(),backdropRef:o.createRef(),internalBackdropRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:o.createRef(),beforeContentFocusGuardRef:o.createRef(),stickIfOpenTimeout:new S.Timeout,triggerElements:new R.PopupTriggerMap},b)}setOpen=(e,t)=>{let n=t.reason===C.REASONS.triggerHover,o=t.reason===C.REASONS.triggerPress&&0===t.event.detail,r=!e&&(t.reason===C.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let i=()=>{let n={open:e,openChangeReason:t.reason},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(y.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),g.flushSync(i)):i(),o||r?this.set("instantType",o?"click":"dismiss"):t.reason===C.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,v.useRefWithInit)(()=>new O(t)).current,o=e??n;return(0,m.useOnMount)(n.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var E=e.i(602453),T=e.i(279501),P=e.i(564846);function I({props:e}){let{children:t,open:d,defaultOpen:p=!1,onOpenChange:g,onOpenChangeComplete:f,modal:h=!1,handle:S,triggerId:v,defaultTriggerId:m=null}=e,x=O.useStore(S?.store,{modal:h,open:p,openProp:d,activeTriggerId:m,triggerIdProp:v});(0,r.useOnFirstRender)(()=>{void 0===d&&!1===x.state.open&&!0===p&&x.update({open:!0,activeTriggerId:m})}),x.useControlledProp("openProp",d),x.useControlledProp("triggerIdProp",v);let R=x.useState("open"),y=x.useState("payload");x.useContextCallback("onOpenChange",g),x.useContextCallback("onOpenChangeComplete",f);let{openMethod:b,triggerProps:M}=(0,P.useOpenInteractionType)(R);(0,T.useImplicitActiveTrigger)(x);let{forceUnmount:w}=(0,T.useOpenStateTransitions)(R,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});o.useEffect(()=>{R||x.context.stickIfOpenTimeout.clear()},[x,R]);let k=o.useCallback(()=>{x.setOpen(!1,(0,E.createChangeEventDetails)(C.REASONS.imperativeAction))},[x]);o.useImperativeHandle(e.actionsRef,()=>({unmount:w,close:k}),[w,k]);let A=(0,u.useSyncedFloatingRootContext)({popupStore:x,onOpenChange:x.setOpen}),j=(0,i.useDismiss)(A,{outsidePressEvent:{mouse:"trap-focus"===h?"sloppy":"intentional",touch:"sloppy"}}),D=(0,s.useRole)(A),{getReferenceProps:F,getFloatingProps:N,getTriggerProps:H}=(0,a.useInteractions)([j,D]),V=o.useMemo(()=>F(M),[F,M]),L=o.useMemo(()=>H(M),[H,M]),B=o.useMemo(()=>N(),[N]);x.useSyncedValues({modal:h,openMethod:b,activeTriggerProps:V,inactiveTriggerProps:L,popupProps:B,floatingRootContext:A,nested:null!=(0,l.useFloatingParentNodeId)()});let z=o.useMemo(()=>({store:x}),[x]);return(0,n.jsx)(c.Provider,{value:z,children:"function"==typeof t?t({payload:y}):t})}var M=e.i(931709),w=e.i(817955),k=e.i(969490),A=e.i(499198),j=e.i(934940),D=e.i(480283),F=e.i(139236),N=e.i(601957),H=e.i(660079);let V=o.forwardRef(function(e,t){let{render:r,className:i,disabled:s=!1,nativeButton:l=!0,handle:u,payload:c,openOnHover:g=!1,delay:f=300,closeDelay:h=0,id:S,style:v,...m}=e,x=p(!0),R=u?.store??x?.store;if(!R)throw Error((0,d.default)(74));let b=(0,F.useBaseUiId)(S),O=R.useState("isTriggerActive",b),E=R.useState("floatingRootContext"),P=R.useState("isOpenedByTrigger",b),I=o.useRef(null),{registerTrigger:V,isMountedByThisTrigger:L}=(0,T.useTriggerDataForwarding)(b,I,R,{payload:c,disabled:s,openOnHover:g,closeDelay:h}),B=R.useState("openChangeReason"),z=R.useState("stickIfOpen"),U=R.useState("openMethod"),G=R.useState("focusManagerModal"),_=(0,D.useHoverReferenceInteraction)(E,{enabled:null!=E&&g&&("touch"!==U||B!==C.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,A.safePolygon)(),restMs:f,delay:{close:h},triggerElementRef:I,isActiveTrigger:O,isClosing:()=>"ending"===R.select("transitionStatus")}),K=(0,j.useClick)(E,{enabled:null!=E,stickIfOpen:z}),W=(0,a.useInteractions)([K]),X=R.useState("triggerProps",L),{getButtonProps:Y,buttonRef:q}=(0,M.useButton)({disabled:s,native:l}),J=o.useMemo(()=>({open:e=>e&&B===C.REASONS.triggerPress?w.pressableTriggerOpenStateMapping.open(e):w.triggerOpenStateMapping.open(e)}),[B]),Q=(0,k.useRenderElement)("button",e,{state:{disabled:s,open:P},ref:[q,t,V,I],props:[W.getReferenceProps(),_,X,{[y.CLICK_TRIGGER_IDENTIFIER]:"",id:b},m,Y],stateAttributesMapping:J}),{preFocusGuardRef:Z,handlePreFocusGuardFocus:$,handleFocusTargetFocus:ee}=(0,H.useTriggerFocusGuards)(R,I);return O&&!G?(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(N.FocusGuard,{ref:Z,onFocus:$}),(0,n.jsx)(o.Fragment,{children:Q},b),(0,n.jsx)(N.FocusGuard,{ref:R.context.triggerFocusTargetRef,onFocus:ee})]}):(0,n.jsx)(o.Fragment,{children:Q},b)});var L=e.i(128108);let B=o.createContext(void 0),z=o.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e,{store:i}=p();return i.useState("mounted")||o?(0,n.jsx)(B.Provider,{value:o,children:(0,n.jsx)(L.FloatingPortal,{ref:t,...r})}):null});var U=e.i(677822),G=e.i(277642);let _=o.createContext(void 0);function K(){let e=o.useContext(_);if(!e)throw Error((0,d.default)(46));return e}var W=e.i(576557),X=e.i(251817),Y=e.i(427708),q=e.i(909852),J=e.i(263635),Q=e.i(900587);let Z=o.forwardRef(function(e,t){let{render:r,className:i,anchor:a,positionMethod:s="absolute",side:u="bottom",align:c="center",sideOffset:g=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:S=5,arrowPadding:v=5,sticky:m=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=y.POPUP_COLLISION_AVOIDANCE,style:b,...O}=e,{store:E}=p(),T=function(){let e=o.useContext(B);if(void 0===e)throw Error((0,d.default)(45));return e}(),P=(0,l.useFloatingNodeId)(),I=E.useState("floatingRootContext"),M=E.useState("mounted"),w=E.useState("open"),k=E.useState("openChangeReason"),A=E.useState("activeTriggerElement"),j=E.useState("modal"),D=E.useState("openMethod"),F=E.useState("positionerElement"),N=E.useState("instantType"),H=E.useState("transitionStatus"),V=E.useState("hasViewport"),L=o.useRef(null),z=(0,Y.useAnimationsFinished)(F,!1,!1),K=(0,W.useAnchorPositioning)({anchor:a,floatingRootContext:I,positionMethod:s,mounted:M,side:u,sideOffset:g,align:c,alignOffset:f,arrowPadding:v,collisionBoundary:h,collisionPadding:S,sticky:m,disableAnchorTracking:x,keepMounted:T,nodeId:P,collisionAvoidance:R,adaptiveOrigin:V?q.adaptiveOrigin:void 0}),Z=I.useState("domReferenceElement");(0,G.useIsoLayoutEffect)(()=>{let e=L.current;if(Z&&(L.current=Z),e&&Z&&Z!==e){E.set("instantType",void 0);let e=new AbortController;return z(()=>{E.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Z,z,E]);let $={open:w,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:N};(0,Q.useAnchoredPopupScrollLock)(w&&!0===j&&k!==C.REASONS.triggerHover,"touch"===D,F,A);let ee=o.useCallback(e=>{E.set("positionerElement",e)},[E]),et=(0,J.usePositioner)(e,$,{styles:K.positionerStyles,transitionStatus:H,props:O,refs:[t,ee],hidden:!M,inert:!w});return(0,n.jsxs)(_.Provider,{value:K,children:[M&&!0===j&&k!==C.REASONS.triggerHover&&(0,n.jsx)(X.InternalBackdrop,{ref:E.context.internalBackdropRef,inert:(0,U.inertValue)(!w),cutout:A}),(0,n.jsx)(l.FloatingNode,{id:P,children:et})]})});var $=e.i(92615),ee=e.i(583289),et=e.i(795914),en=e.i(282458),eo=e.i(273598),er=e.i(100229),ei=e.i(971109),ea=e.i(328657),es=e.i(29905);let el=o.createContext(void 0);function eu(e){let{value:t,children:o}=e;return(0,n.jsx)(el.Provider,{value:t,children:o})}let ed={...w.popupStateMapping,...en.transitionStatusMapping},ec=o.forwardRef(function(e,t){let{className:r,render:i,initialFocus:a,finalFocus:s,style:l,...u}=e,{store:d}=p(),c=K(),g=null!=(0,ei.useToolbarRootContext)(!0),{context:f,hasClosePart:h}=function(){let[e,t]=o.useState(0),n=(0,es.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:o.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),S=d.useState("open"),v=d.useState("openMethod"),m=d.useState("instantType"),x=d.useState("transitionStatus"),R=d.useState("popupProps"),y=d.useState("titleElementId"),b=d.useState("descriptionElementId"),O=d.useState("modal"),E=d.useState("mounted"),T=d.useState("openChangeReason"),P=d.useState("activeTriggerElement"),I=d.useState("floatingRootContext");(0,eo.useOpenChangeComplete)({open:S,ref:d.context.popupRef,onComplete(){S&&d.context.onOpenChangeComplete?.(!0)}});let M=d.useState("disabled"),w=d.useState("openOnHover"),A=d.useState("closeDelay");(0,et.useHoverFloatingInteraction)(I,{enabled:w&&!M,closeDelay:A});let j=void 0===a?function(e){return"touch"!==e||d.context.popupRef.current}:a,D={open:S,side:c.side,align:c.align,instant:m,transitionStatus:x},F=!1!==O&&h;d.useSyncedValue("focusManagerModal",F);let N=o.useCallback(e=>{d.set("popupElement",e)},[d]),H=(0,k.useRenderElement)("div",e,{state:D,ref:[t,d.context.popupRef,N],props:[R,{"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){g&&er.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ea.getDisabledMountTransitionStyles)(x),u],stateAttributesMapping:ed});return(0,n.jsx)(ee.FloatingFocusManager,{context:I,openInteractionType:v,modal:F,disabled:!E||T===C.REASONS.triggerHover,initialFocus:j,returnFocus:s,restoreFocus:"popup",previousFocusableElement:(0,$.isHTMLElement)(P)?P:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:(0,n.jsx)(eu,{value:f,children:H})})}),ep=o.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,{store:a}=p(),s=a.useState("open"),{arrowRef:l,side:u,align:d,arrowUncentered:c,arrowStyles:g}=K();return(0,k.useRenderElement)("div",e,{state:{open:s,side:u,align:d,uncentered:c},ref:[t,l],props:[{style:g,"aria-hidden":!0},i],stateAttributesMapping:w.popupStateMapping})}),eg={...w.popupStateMapping,...en.transitionStatusMapping},ef=o.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,{store:a}=p(),s=a.useState("open"),l=a.useState("mounted"),u=a.useState("transitionStatus"),d=a.useState("openChangeReason");return(0,k.useRenderElement)("div",e,{state:{open:s,transitionStatus:u},ref:[a.context.backdropRef,t],props:[{role:"presentation",hidden:!l,style:{pointerEvents:d===C.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:eg})}),eh=o.forwardRef(function(e,t){let{render:n,className:o,style:r,...i}=e,{store:a}=p(),s=(0,F.useBaseUiId)(i.id);return(0,G.useIsoLayoutEffect)(()=>(a.set("titleElementId",s),()=>{a.set("titleElementId",void 0)}),[a,s]),(0,k.useRenderElement)("h2",e,{ref:t,props:[{id:s},i]})}),eS=o.forwardRef(function(e,t){let{render:n,className:o,style:r,...i}=e,{store:a}=p(),s=(0,F.useBaseUiId)(i.id);return(0,G.useIsoLayoutEffect)(()=>(a.set("descriptionElementId",s),()=>{a.set("descriptionElementId",void 0)}),[a,s]),(0,k.useRenderElement)("p",e,{ref:t,props:[{id:s},i]})}),ev=o.forwardRef(function(e,t){let n,{render:r,className:i,disabled:a=!1,nativeButton:s=!0,style:l,...u}=e,{buttonRef:d,getButtonProps:c}=(0,M.useButton)({disabled:a,focusableWhenDisabled:!1,native:s}),{store:g}=p();return n=o.useContext(el),(0,G.useIsoLayoutEffect)(()=>n?.register(),[n]),(0,k.useRenderElement)("button",e,{ref:[t,d],props:[{onClick(e){g.setOpen(!1,(0,E.createChangeEventDetails)(C.REASONS.closePress,e.nativeEvent,e.currentTarget))}},u,c]})}),em=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var eC=e.i(3310);let ex={activationDirection:e=>e?{"data-activation-direction":e}:null},eR=o.forwardRef(function(e,t){let{render:n,className:o,style:r,children:i,...a}=e,{store:s}=p(),{side:l}=K(),u=s.useState("instantType"),{children:d,state:c}=(0,eC.usePopupViewport)({store:s,side:l,cssVars:em,children:i}),g={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:u};return(0,k.useRenderElement)("div",e,{state:g,ref:t,props:[a,{children:d}],stateAttributesMapping:ex})});class ey{constructor(){this.store=new O}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,E.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,E.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,ep,"Backdrop",0,ef,"Close",0,ev,"Description",0,eS,"Handle",0,ey,"Popup",0,ec,"Portal",0,z,"Positioner",0,Z,"Root",0,function(e){return p(!0)?(0,n.jsx)(I,{props:e}):(0,n.jsx)(l.FloatingTree,{children:(0,n.jsx)(I,{props:e})})},"Title",0,eh,"Trigger",0,V,"Viewport",0,eR,"createHandle",0,function(){return new ey}],631858);var eb=e.i(631858),eb=eb,eO=e.i(465458);e.s(["Popover",0,function({...e}){return(0,n.jsx)(eb.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:t="center",alignOffset:o=0,side:r="bottom",sideOffset:i=4,...a}){return(0,n.jsx)(eb.Portal,{children:(0,n.jsx)(eb.Positioner,{align:t,alignOffset:o,side:r,sideOffset:i,className:"isolate z-50",children:(0,n.jsx)(eb.Popup,{"data-slot":"popover-content",className:(0,eO.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm 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})})})},"PopoverTrigger",0,function({...e}){return(0,n.jsx)(eb.Trigger,{"data-slot":"popover-trigger",...e})}],996652)},144988,e=>{"use strict";let t=(0,e.i(433721).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",0,t])},601039,e=>{"use strict";let t=(0,e.i(433721).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],601039)},842809,203922,e=>{"use strict";let t=new Map;function n(e,n,o){return null==e?"":(function(e,n){let o=JSON.stringify({locale:e,options:n}),r=t.get(o);if(r)return r;let i=new Intl.NumberFormat(e,n);return t.set(o,i),i})(n,o).format(e)}e.s(["formatNumber",0,n,"formatNumberValue",0,function(e,t,o){return null==e?"":o?n(e,t,o):n(e/100,t,{style:"percent"})}],842809),e.s(["valueToPercent",0,function(e,t,n){return(e-t)*100/(n-t)}],203922)},817854,e=>{"use strict";var t=e.i(344180),n=e.i(465458);e.s(["Label",0,function({className:e,...o}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...o})}])},935002,514312,641294,61895,278282,475162,827187,213761,e=>{"use strict";e.s([],935002),e.i(8890);var t,n=e.i(764556),o=e.i(155461),r=e.i(166392),i=e.i(277642),a=e.i(267805);let s=n.createContext(void 0);function l(e){let t=n.useContext(s);if(void 0===t&&!e)throw Error((0,a.default)(72));return t}e.s(["TooltipRootContext",0,s,"useTooltipRootContext",0,l],514312);var u=e.i(92615),d=e.i(422561),c=e.i(29905),p=e.i(410421),g=e.i(150129);function f(e){return null!=e&&null!=e.clientX}var h=e.i(538501),S=e.i(427396),v=e.i(602453),m=e.i(279501),C=e.i(106206),x=e.i(332976),R=e.i(493696),y=e.i(549154),b=e.i(107164),O=e.i(742665),E=e.i(695011),T=e.i(561213);let P={...E.popupStoreSelectors,disabled:(0,x.createSelector)(e=>e.disabled),instantType:(0,x.createSelector)(e=>e.instantType),isInstantPhase:(0,x.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,x.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,x.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,x.createSelector)(e=>e.openChangeReason),closeOnClick:(0,x.createSelector)(e=>e.closeOnClick),closeDelay:(0,x.createSelector)(e=>e.closeDelay),hasViewport:(0,x.createSelector)(e=>e.hasViewport)};class I extends R.ReactStore{constructor(e){super({...(0,E.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new T.PopupTriggerMap},P)}setOpen=(e,t)=>{let n=t.reason,o=n===O.REASONS.triggerHover,r=e&&n===O.REASONS.triggerFocus,i=!e&&(n===O.REASONS.triggerPress||n===O.REASONS.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a=()=>{let o={open:e,openChangeReason:n};r?o.instantType="focus":i?o.instantType="dismiss":n===O.REASONS.triggerHover&&(o.instantType=void 0);let a=t.trigger?.id??null;(a||e)&&(o.activeTriggerId=a,o.activeTriggerElement=t.trigger??null),this.update(o)};o?C.flushSync(a):a()};static useStore(e,t){let n=(0,y.useRefWithInit)(()=>new I(t)).current,o=e??n,r=(0,b.useSyncedFloatingRootContext)({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=r,o}}e.s(["TooltipStore",0,I],641294);var M=e.i(344180);let w=(0,o.fastComponent)(function(e){let{disabled:t=!1,defaultOpen:o=!1,open:a,disableHoverablePopup:l=!1,trackCursorAxis:C="none",actionsRef:x,onOpenChange:R,onOpenChangeComplete:y,handle:b,triggerId:E,defaultTriggerId:T=null,children:P}=e,w=I.useStore(b?.store,{open:o,openProp:a,activeTriggerId:T,triggerIdProp:E});(0,r.useOnFirstRender)(()=>{void 0===a&&!1===w.state.open&&!0===o&&w.update({open:!0,activeTriggerId:T})}),w.useControlledProp("openProp",a),w.useControlledProp("triggerIdProp",E),w.useContextCallback("onOpenChange",R),w.useContextCallback("onOpenChangeComplete",y);let k=w.useState("open"),A=!t&&k,j=w.useState("activeTriggerId"),D=w.useState("payload");w.useSyncedValues({trackCursorAxis:C,disableHoverablePopup:l}),(0,i.useIsoLayoutEffect)(()=>{k&&t&&w.setOpen(!1,(0,v.createChangeEventDetails)(O.REASONS.disabled))},[k,t,w]),w.useSyncedValue("disabled",t),(0,m.useImplicitActiveTrigger)(w);let{forceUnmount:F,transitionStatus:N}=(0,m.useOpenStateTransitions)(A,w),H=w.select("floatingRootContext"),V=w.useState("isInstantPhase"),L=w.useState("instantType"),B=w.useState("lastOpenChangeReason"),z=n.useRef(null);(0,i.useIsoLayoutEffect)(()=>{"ending"===N&&B===O.REASONS.none||"ending"!==N&&V?("delay"!==L&&(z.current=L),w.set("instantType","delay")):null!==z.current&&(w.set("instantType",z.current),z.current=null)},[N,V,B,L,w]),(0,i.useIsoLayoutEffect)(()=>{A&&null==j&&w.set("payload",void 0)},[w,j,A]);let U=n.useCallback(()=>{w.setOpen(!1,(0,v.createChangeEventDetails)(O.REASONS.imperativeAction))},[w]);n.useImperativeHandle(x,()=>({unmount:F,close:U}),[F,U]);let G=(0,h.useDismiss)(H,{enabled:!t,referencePress:()=>w.select("closeOnClick")}),_=function(e,t={}){let o="rootStore"in e?e.rootStore:e,r=o.useState("open"),i=o.useState("floatingElement"),a=o.useState("domReferenceElement"),s=o.context.dataRef,{enabled:l=!0,axis:h="both"}=t,S=n.useRef(!1),v=n.useRef(null),[m,C]=n.useState(),[x,R]=n.useState([]),y=(0,c.useStableCallback)((e,t,n)=>{if(!S.current&&(!s.current.openEvent||f(s.current.openEvent))){var r,i;let l,u,d;o.set("positionReference",(r=n??a,i={x:e,y:t,axis:h,dataRef:s,pointerType:m},l=null,u=null,d=!1,{contextElement:r||void 0,getBoundingClientRect(){let e=r?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===i.axis||"both"===i.axis,n="y"===i.axis||"both"===i.axis,o=["mouseenter","mousemove"].includes(i.dataRef.current.openEvent?.type||"")&&"touch"!==i.pointerType,a=e.width,s=e.height,c=e.x,p=e.y;return null==l&&i.x&&t&&(l=e.x-i.x),null==u&&i.y&&n&&(u=e.y-i.y),c-=l||0,p-=u||0,a=0,s=0,!d||o?(a="y"===i.axis?e.width:0,s="x"===i.axis?e.height:0,c=t&&null!=i.x?i.x:c,p=n&&null!=i.y?i.y:p):d&&!o&&(s="x"===i.axis?e.height:s,a="y"===i.axis?e.width:a),d=!0,{width:a,height:s,x:c,y:p,top:p,right:c+a,bottom:p+s,left:c}}}))}}),b=(0,c.useStableCallback)(e=>{r?v.current||R([]):y(e.clientX,e.clientY,e.currentTarget)}),O=(0,g.isMouseLikePointerType)(m)?i:r,E=n.useCallback(()=>{if(!O||!l)return;let e=(0,u.getWindow)(i);if(!s.current.openEvent||f(s.current.openEvent))return v.current=(0,d.addEventListener)(e,"mousemove",function(e){let t=(0,p.getTarget)(e);(0,p.contains)(i,t)?(v.current?.(),v.current=null):y(e.clientX,e.clientY)}),()=>{v.current?.(),v.current=null};o.set("positionReference",a)},[O,l,i,s,a,o,y]);n.useEffect(()=>E(),[E,x]),n.useEffect(()=>{l&&!i&&(S.current=!1)},[l,i]),n.useEffect(()=>{!l&&r&&(S.current=!0)},[l,r]);let T=n.useMemo(()=>{function e(e){C(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:b,onMouseEnter:b}},[b]);return n.useMemo(()=>l?{reference:T,trigger:T}:{},[l,T])}(H,{enabled:!t&&"none"!==C,axis:"none"===C?void 0:C}),{getReferenceProps:K,getFloatingProps:W,getTriggerProps:X}=(0,S.useInteractions)([G,_]),Y=n.useMemo(()=>K(),[K]),q=n.useMemo(()=>X(),[X]),J=n.useMemo(()=>W(),[W]);return w.useSyncedValues({activeTriggerProps:Y,inactiveTriggerProps:q,popupProps:J}),(0,M.jsx)(s.Provider,{value:w,children:"function"==typeof P?P({payload:D}):P})});e.s(["TooltipRoot",0,w],61895);var k=e.i(817955),A=e.i(969490),j=e.i(139236);let D=n.createContext(void 0);function F(){return n.useContext(D)}e.s(["TooltipProviderContext",0,D,"useTooltipProviderContext",0,F],278282);var N=e.i(499198),H=e.i(232449),V=e.i(49863);let L=n.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new H.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});function B(e,t={open:!1}){let o="rootStore"in e?e.rootStore:e,r=o.useState("floatingId"),{open:a}=t,{currentIdRef:s,delayRef:l,timeoutMs:u,initialDelayRef:d,currentContextRef:c,hasProvider:p,timeout:g}=n.useContext(L),[f,h]=n.useState(!1);return(0,i.useIsoLayoutEffect)(()=>{function e(){h(!1),c.current?.setIsInstantPhase(!1),s.current=null,c.current=null,l.current=d.current}if(s.current&&!a&&s.current===r){if(h(!1),u)return g.start(u,()=>{o.select("open")||s.current&&s.current!==r||e()}),()=>{g.clear()};e()}},[a,r,s,l,u,d,c,g,o]),(0,i.useIsoLayoutEffect)(()=>{if(!a)return;let e=c.current,t=s.current;g.clear(),c.current={onOpenChange:o.setOpen,setIsInstantPhase:h},s.current=r,l.current={open:0,close:(0,V.getDelay)(d.current,"close")},null!==t&&t!==r?(h(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,v.createChangeEventDetails)(O.REASONS.none))):(h(!1),e?.setIsInstantPhase(!1))},[a,r,o,s,l,u,d,c,g]),(0,i.useIsoLayoutEffect)(()=>()=>{c.current=null},[c]),n.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:f}),[p,l,f])}e.s(["FloatingDelayGroup",0,function(e){let{children:t,delay:o,timeoutMs:r=0}=e,i=n.useRef(o),a=n.useRef(o),s=n.useRef(null),l=n.useRef(null),u=(0,H.useTimeout)();return(0,M.jsx)(L.Provider,{value:n.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:s,timeoutMs:r,currentContextRef:l,timeout:u}),[r,u]),children:t})},"useDelayGroup",0,B],475162);var z=e.i(604921),U=e.i(480283);let G=((t={})[t.popupOpen=k.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t),_=(0,o.fastComponentRef)(function(e,t){let{className:o,render:r,handle:i,payload:s,disabled:u,delay:d,closeOnClick:c=!0,closeDelay:p,id:g,style:f,...h}=e,S=l(!0),v=i?.store??S;if(!v)throw Error((0,a.default)(82));let C=(0,j.useBaseUiId)(g),x=v.useState("isTriggerActive",C),R=v.useState("isOpenedByTrigger",C),y=v.useState("floatingRootContext"),b=n.useRef(null),O=d??600,E=p??0,{registerTrigger:T,isMountedByThisTrigger:P}=(0,m.useTriggerDataForwarding)(C,b,v,{payload:s,closeOnClick:c,closeDelay:E}),I=F(),{delayRef:M,isInstantPhase:w,hasProvider:D}=B(y,{open:R});v.useSyncedValue("isInstantPhase",w);let H=v.useState("disabled"),V=u??H,L=v.useState("trackCursorAxis"),_=v.useState("disableHoverablePopup"),K=(0,U.useHoverReferenceInteraction)(y,{enabled:!V,mouseOnly:!0,move:!1,handleClose:_||"both"===L?null:(0,N.safePolygon)(),restMs(){let e=I?.delay,t="object"==typeof M.current?M.current.open:void 0,n=O;return D&&(n=0!==t?d??e??O:0),n},delay(){let e="object"==typeof M.current?M.current.close:void 0,t=E;return null==p&&D&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:x,isClosing:()=>"ending"===v.select("transitionStatus")}),W=(0,z.useFocus)(y,{enabled:!V}).reference,X=v.useState("triggerProps",P);return(0,A.useRenderElement)("button",e,{state:{open:R},ref:[t,T,b],props:[K,W,X,{onPointerDown(){v.set("closeOnClick",c)},id:C,[G.triggerDisabled]:V?"":void 0},h],stateAttributesMapping:k.triggerOpenStateMapping})});e.s(["TooltipTrigger",0,_],827187);let K=n.createContext(void 0);e.s(["TooltipPortalContext",0,K,"useTooltipPortalContext",0,function(){let e=n.useContext(K);if(void 0===e)throw Error((0,a.default)(70));return e}],213761)},384389,e=>{"use strict";var t=e.i(764556),n=e.i(106206),o=e.i(128108),r=e.i(344180);let i=t.forwardRef(function(e,i){let{children:a,container:s,className:l,render:u,style:d,...c}=e,{portalNode:p,portalSubtree:g}=(0,o.useFloatingPortalNode)({container:s,ref:i,componentProps:e,elementProps:c});return g||p?(0,r.jsxs)(t.Fragment,{children:[g,p&&n.createPortal(a,p)]}):null});e.s(["FloatingPortalLite",0,i])},638322,e=>{"use strict";var t,n=e.i(344180);e.i(935002);var o=e.i(61895),r=e.i(827187);e.i(8890);var i=e.i(764556),a=e.i(514312),s=e.i(213761),l=e.i(384389);let u=i.forwardRef(function(e,t){let{keepMounted:o=!1,...r}=e;return(0,a.useTooltipRootContext)().useState("mounted")||o?(0,n.jsx)(s.TooltipPortalContext.Provider,{value:o,children:(0,n.jsx)(l.FloatingPortalLite,{ref:t,...r})}):null});var d=e.i(267805);let c=i.createContext(void 0);function p(){let e=i.useContext(c);if(void 0===e)throw Error((0,d.default)(71));return e}var g=e.i(576557),f=e.i(576487),h=e.i(909852),S=e.i(263635);let v=i.forwardRef(function(e,t){let{render:o,className:r,anchor:l,positionMethod:u="absolute",side:d="top",align:p="center",sideOffset:v=0,alignOffset:m=0,collisionBoundary:C="clipping-ancestors",collisionPadding:x=5,arrowPadding:R=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:O=f.POPUP_COLLISION_AVOIDANCE,style:E,...T}=e,P=(0,a.useTooltipRootContext)(),I=(0,s.useTooltipPortalContext)(),M=P.useState("open"),w=P.useState("mounted"),k=P.useState("trackCursorAxis"),A=P.useState("disableHoverablePopup"),j=P.useState("floatingRootContext"),D=P.useState("instantType"),F=P.useState("transitionStatus"),N=P.useState("hasViewport"),H=(0,g.useAnchorPositioning)({anchor:l,positionMethod:u,floatingRootContext:j,mounted:w,side:d,sideOffset:v,align:p,alignOffset:m,collisionBoundary:C,collisionPadding:x,sticky:y,arrowPadding:R,disableAnchorTracking:b,keepMounted:I,collisionAvoidance:O,adaptiveOrigin:N?h.adaptiveOrigin:void 0}),V=i.useMemo(()=>({open:M,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:"none"!==k?"tracking-cursor":D}),[M,H.side,H.align,H.anchorHidden,k,D]),L=(0,S.usePositioner)(e,V,{styles:H.positionerStyles,transitionStatus:F,props:T,refs:[t,P.useStateSetter("positionerElement")],hidden:!w,inert:!M||"both"===k||A});return(0,n.jsx)(c.Provider,{value:H,children:L})});var m=e.i(817955),C=e.i(282458),x=e.i(273598),R=e.i(969490),y=e.i(328657),b=e.i(795914);let O={...m.popupStateMapping,...C.transitionStatusMapping},E=i.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,s=(0,a.useTooltipRootContext)(),{side:l,align:u}=p(),d=s.useState("open"),c=s.useState("instantType"),g=s.useState("transitionStatus"),f=s.useState("popupProps"),h=s.useState("floatingRootContext");(0,x.useOpenChangeComplete)({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}});let S=s.useState("disabled"),v=s.useState("closeDelay");return(0,b.useHoverFloatingInteraction)(h,{enabled:!S,closeDelay:v}),(0,R.useRenderElement)("div",e,{state:{open:d,side:l,align:u,instant:c,transitionStatus:g},ref:[t,s.context.popupRef,s.useStateSetter("popupElement")],props:[f,(0,y.getDisabledMountTransitionStyles)(g),i],stateAttributesMapping:O})}),T=i.forwardRef(function(e,t){let{className:n,render:o,style:r,...i}=e,s=(0,a.useTooltipRootContext)(),l=s.useState("open"),u=s.useState("instantType"),{arrowRef:d,side:c,align:g,arrowUncentered:f,arrowStyles:h}=p();return(0,R.useRenderElement)("div",e,{state:{open:l,side:c,align:g,uncentered:f,instant:u},ref:[t,d],props:[{style:h,"aria-hidden":!0},i],stateAttributesMapping:m.popupStateMapping})});var P=e.i(475162),I=e.i(278282);let M=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var w=e.i(3310);let k={activationDirection:e=>e?{"data-activation-direction":e}:null},A=i.forwardRef(function(e,t){let{render:n,className:o,style:r,children:i,...s}=e,l=(0,a.useTooltipRootContext)(),u=p(),d=l.useState("instantType"),{children:c,state:g}=(0,w.usePopupViewport)({store:l,side:u.side,cssVars:M,children:i}),f={activationDirection:g.activationDirection,transitioning:g.transitioning,instant:d};return(0,R.useRenderElement)("div",e,{state:f,ref:t,props:[s,{children:c}],stateAttributesMapping:k})});var j=e.i(641294),D=e.i(602453),F=e.i(742665);class N{constructor(){this.store=new j.TooltipStore}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,d.default)(81,e));this.store.setOpen(!0,(0,D.createChangeEventDetails)(F.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,D.createChangeEventDetails)(F.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,T,"Handle",0,N,"Popup",0,E,"Portal",0,u,"Positioner",0,v,"Provider",0,function(e){let{delay:t,closeDelay:o,timeout:r=400}=e,a=i.useMemo(()=>({delay:t,closeDelay:o}),[t,o]),s=i.useMemo(()=>({open:t,close:o}),[t,o]);return(0,n.jsx)(I.TooltipProviderContext.Provider,{value:a,children:(0,n.jsx)(P.FloatingDelayGroup,{delay:s,timeoutMs:r,children:e.children})})},"Root",()=>o.TooltipRoot,"Trigger",()=>r.TooltipTrigger,"Viewport",0,A,"createHandle",0,function(){return new N}],638295);var H=e.i(638295),H=H,V=e.i(465458);e.s(["Tooltip",0,function({...e}){return(0,n.jsx)(H.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:o=4,align:r="center",alignOffset:i=0,children:a,...s}){return(0,n.jsx)(H.Portal,{children:(0,n.jsx)(H.Positioner,{align:r,alignOffset:i,side:t,sideOffset:o,className:"isolate z-50",children:(0,n.jsxs)(H.Popup,{"data-slot":"tooltip-content",className:(0,V.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...s,children:[a,(0,n.jsx)(H.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,n.jsx)(H.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,n.jsx)(H.Trigger,{"data-slot":"tooltip-trigger",...e})}],638322)},226651,e=>{"use strict";let t=(0,e.i(433721).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t])}]);