@alook/app 0.0.16 → 0.0.18

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 (68) hide show
  1. package/bundled/web/.open-next/.build/durable-objects/queue.js +4 -4
  2. package/bundled/web/.open-next/assets/BUILD_ID +1 -1
  3. package/bundled/web/.open-next/assets/_next/static/chunks/0-ak0pl36y6db.js +20 -0
  4. package/bundled/web/.open-next/assets/_next/static/chunks/03ttku7i148lq.js +1 -0
  5. package/bundled/web/.open-next/assets/_next/static/chunks/{0yj9pmm88z1pn.js → 0~d77nakvw-pm.js} +1 -1
  6. package/bundled/web/.open-next/assets/_next/static/chunks/{07oq~wuv265o6.js → 17trnn..dwzu7.js} +1 -1
  7. package/bundled/web/.open-next/cache/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/_global-error.cache +1 -1
  8. package/bundled/web/.open-next/cache/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/_not-found.cache +1 -1
  9. package/bundled/web/.open-next/cache/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/sitemap.xml.cache +1 -1
  10. package/bundled/web/.open-next/cloudflare/cache-assets-manifest.sql +1 -1
  11. package/bundled/web/.open-next/cloudflare/init.js +1 -1
  12. package/bundled/web/.open-next/dynamodb-provider/dynamodb-cache.json +1 -1
  13. package/bundled/web/.open-next/middleware/handler.mjs +2 -2
  14. package/bundled/web/.open-next/server-functions/default/src/web/.next/BUILD_ID +1 -1
  15. package/bundled/web/.open-next/server-functions/default/src/web/.next/build-manifest.json +3 -3
  16. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/invite/[token]/page_client-reference-manifest.js +1 -1
  17. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/studio/new/page_client-reference-manifest.js +1 -1
  18. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/activity/page_client-reference-manifest.js +1 -1
  19. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/[convId]/page_client-reference-manifest.js +1 -1
  20. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/page_client-reference-manifest.js +1 -1
  21. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/email/page_client-reference-manifest.js +1 -1
  22. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/files/page_client-reference-manifest.js +1 -1
  23. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/meetings/page_client-reference-manifest.js +1 -1
  24. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/page_client-reference-manifest.js +1 -1
  25. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/new/page_client-reference-manifest.js +1 -1
  26. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/page_client-reference-manifest.js +1 -1
  27. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/calendar/page_client-reference-manifest.js +1 -1
  28. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/help/email-setup/page_client-reference-manifest.js +1 -1
  29. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/home/page_client-reference-manifest.js +1 -1
  30. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/issues/page_client-reference-manifest.js +1 -1
  31. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/runtimes/page_client-reference-manifest.js +1 -1
  32. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/settings/page_client-reference-manifest.js +1 -1
  33. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/[traceId]/page_client-reference-manifest.js +1 -1
  34. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/page_client-reference-manifest.js +1 -1
  35. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/unread/page_client-reference-manifest.js +1 -1
  36. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/workspaces/page_client-reference-manifest.js +1 -1
  37. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(auth)/sign-in/page_client-reference-manifest.js +1 -1
  38. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  39. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/[id]/page_client-reference-manifest.js +1 -1
  41. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/page_client-reference-manifest.js +1 -1
  42. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +3 -3
  43. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0u~3z5r._.js +3 -0
  44. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +3 -3
  45. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0o6ydx5._.js +1 -1
  46. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0vhi1.k._.js +3 -0
  47. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0yeokgf._.js +3 -0
  48. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(auth)_sign-in_page_tsx_0jdlb-h._.js +1 -1
  49. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-build-manifest.js +3 -3
  50. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-manifest.json +1 -1
  51. package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs +8 -8
  52. package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +63 -63
  53. package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +2 -2
  54. package/bundled/web/custom-worker.ts +2 -2
  55. package/dist/cli/index.js +19660 -0
  56. package/dist/cli/meeting-runner.js +888 -0
  57. package/dist/cli/session-runner.js +18794 -0
  58. package/dist/index.js +15 -13
  59. package/package.json +8 -5
  60. package/bundled/web/.open-next/assets/_next/static/chunks/0tfsuh0extc-0.js +0 -1
  61. package/bundled/web/.open-next/assets/_next/static/chunks/12x34w3ifvehm.js +0 -20
  62. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__10ubs43._.js +0 -3
  63. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0js75xc._.js +0 -3
  64. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0yxlebv._.js +0 -3
  65. /package/bundled/web/.open-next/assets/_next/static/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/_buildManifest.js +0 -0
  66. /package/bundled/web/.open-next/assets/_next/static/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/_clientMiddlewareManifest.js +0 -0
  67. /package/bundled/web/.open-next/assets/_next/static/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/_ssgManifest.js +0 -0
  68. /package/bundled/web/.open-next/cache/{z2Xve2qYI6cufaKgk6mWN → 1KhJxRMQgsspHvsEB0i7h}/robots.txt.cache +0 -0
@@ -180,7 +180,7 @@ var DOQueueHandler = class extends DurableObject {
180
180
  "INSERT OR REPLACE INTO sync (id, lastSuccess, buildId) VALUES (?, unixepoch(), ?)",
181
181
  // We cannot use the deduplication id because it's not unique per route - every time a route is revalidated, the deduplication id is different.
182
182
  `${host}${url}`,
183
- "z2Xve2qYI6cufaKgk6mWN"
183
+ "1KhJxRMQgsspHvsEB0i7h"
184
184
  );
185
185
  }
186
186
  this.routeInFailedState.delete(msg.MessageDeduplicationId);
@@ -232,7 +232,7 @@ var DOQueueHandler = class extends DurableObject {
232
232
  }
233
233
  this.routeInFailedState.set(msg.MessageDeduplicationId, updatedFailedState);
234
234
  if (!this.disableSQLite) {
235
- this.sql.exec("INSERT OR REPLACE INTO failed_state (id, data, buildId) VALUES (?, ?, ?)", msg.MessageDeduplicationId, JSON.stringify(updatedFailedState), "z2Xve2qYI6cufaKgk6mWN");
235
+ this.sql.exec("INSERT OR REPLACE INTO failed_state (id, data, buildId) VALUES (?, ?, ?)", msg.MessageDeduplicationId, JSON.stringify(updatedFailedState), "1KhJxRMQgsspHvsEB0i7h");
236
236
  }
237
237
  await this.addAlarm();
238
238
  }
@@ -256,8 +256,8 @@ var DOQueueHandler = class extends DurableObject {
256
256
  return;
257
257
  this.sql.exec("CREATE TABLE IF NOT EXISTS failed_state (id TEXT PRIMARY KEY, data TEXT, buildId TEXT)");
258
258
  this.sql.exec("CREATE TABLE IF NOT EXISTS sync (id TEXT PRIMARY KEY, lastSuccess INTEGER, buildId TEXT)");
259
- this.sql.exec("DELETE FROM failed_state WHERE buildId != ?", "z2Xve2qYI6cufaKgk6mWN");
260
- this.sql.exec("DELETE FROM sync WHERE buildId != ?", "z2Xve2qYI6cufaKgk6mWN");
259
+ this.sql.exec("DELETE FROM failed_state WHERE buildId != ?", "1KhJxRMQgsspHvsEB0i7h");
260
+ this.sql.exec("DELETE FROM sync WHERE buildId != ?", "1KhJxRMQgsspHvsEB0i7h");
261
261
  const failedStateCursor = this.sql.exec("SELECT * FROM failed_state");
262
262
  for (const row of failedStateCursor) {
263
263
  this.routeInFailedState.set(row.id, JSON.parse(row.data));
@@ -1 +1 @@
1
- z2Xve2qYI6cufaKgk6mWN
1
+ 1KhJxRMQgsspHvsEB0i7h
@@ -0,0 +1,20 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,855062,e=>{"use strict";var t=e.i(298699);e.s(["useLocalStorage",0,function(e,a){let[n,r]=(0,t.useState)(a);return(0,t.useLayoutEffect)(()=>{try{let t=localStorage.getItem(e);t&&r(JSON.parse(t))}catch{}},[e]),[n,(0,t.useCallback)(t=>{r(a=>{let n=t instanceof Function?t(a):t;try{localStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e])]}])},957563,e=>{"use strict";var t=e.i(298699),a=e.i(597849);let n=t.forwardRef(function(e,t){let{className:n,render:r,orientation:l="horizontal",style:i,...o}=e;return(0,a.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"separator","aria-orientation":l},o]})});e.s(["Separator",0,n])},934351,e=>{"use strict";var t=e.i(368075),a=e.i(613349);e.s(["Card",0,function({className:e,size:n="default",...r}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,a.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-4 group-data-[size=sm]/card:px-3",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},473131,e=>{"use strict";var t=e.i(368075),a=e.i(613349);e.s(["Label",0,function({className:e,...n}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.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),...n})}])},898707,e=>{"use strict";var t=e.i(368075);e.s(["GradientBackground",0,function(){return(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none fixed inset-0 -z-10 overflow-hidden bg-[oklch(0.93_0.015_80)] dark:bg-transparent"})}])},860115,e=>{"use strict";let t=(0,e.i(706875).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",0,t])},45356,e=>{"use strict";var t=e.i(368075),a=e.i(298699),n=e.i(208020),r=e.i(23055),l=e.i(186339),i=e.i(934351),o=e.i(903477),s=Object.defineProperty,c=Object.defineProperties,d=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,f=(e,t,a)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=a.createContext({}),g=a.forwardRef((e,t)=>{let n;var r,l,i,o,s,{value:g,onChange:b,maxLength:w,textAlign:j="left",pattern:y,placeholder:S,inputMode:C="numeric",onComplete:k,pushPasswordManagerStrategy:E="increase-width",pasteTransformer:N,containerClassName:P,noScriptCSSFallback:M=x,render:R,children:T}=e,B=((e,t)=>{var a={};for(var n in e)p.call(e,n)&&0>t.indexOf(n)&&(a[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&m.call(e,n)&&(a[n]=e[n]);return a})(e,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[O,D]=a.useState("string"==typeof B.defaultValue?B.defaultValue:""),F=null!=g?g:O,I=(n=a.useRef(),a.useEffect(()=>{n.current=F}),n.current),A=a.useCallback(e=>{null==b||b(e),D(e)},[b]),z=a.useMemo(()=>y?"string"==typeof y?new RegExp(y):y:null,[y]),W=a.useRef(null),L=a.useRef(null),_=a.useRef({value:F,onChange:A,isIOS:"u">typeof window&&(null==(l=null==(r=null==window?void 0:window.CSS)?void 0:r.supports)?void 0:l.call(r,"-webkit-touch-callout","none"))}),H=a.useRef({prev:[null==(i=W.current)?void 0:i.selectionStart,null==(o=W.current)?void 0:o.selectionEnd,null==(s=W.current)?void 0:s.selectionDirection]});a.useImperativeHandle(t,()=>W.current,[]),a.useEffect(()=>{let e=W.current,t=L.current;if(!e||!t)return;function a(){if(document.activeElement!==e){J(null),X(null);return}let t=e.selectionStart,a=e.selectionEnd,n=e.selectionDirection,r=e.maxLength,l=e.value,i=H.current.prev,o=-1,s=-1,c;if(0!==l.length&&null!==t&&null!==a){let e=t===a,n=t===l.length&&l.length<r;if(e&&!n){if(0===t)o=0,s=1,c="forward";else if(t===r)o=t-1,s=t,c="backward";else if(r>1&&l.length>1){let e=0;if(null!==i[0]&&null!==i[1]){c=t<i[1]?"backward":"forward";let a=i[0]===i[1]&&i[0]<r;"backward"!==c||a||(e=-1)}o=e+t,s=e+t+1}}-1!==o&&-1!==s&&o!==s&&W.current.setSelectionRange(o,s,c)}let d=-1!==o?o:t,u=-1!==s?s:a,p=null!=c?c:n;J(d),X(u),H.current.prev=[d,u,p]}if(_.current.value!==e.value&&_.current.onChange(e.value),H.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",a,{capture:!0}),a(),document.activeElement===e&&$(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";v(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),v(e.sheet,`[data-input-otp]:autofill { ${t} }`),v(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),v(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),v(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let n=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};n();let r=new ResizeObserver(n);return r.observe(e),()=>{document.removeEventListener("selectionchange",a,{capture:!0}),r.disconnect()}},[]);let[G,U]=a.useState(!1),[V,$]=a.useState(!1),[q,J]=a.useState(null),[K,X]=a.useState(null);a.useEffect(()=>{var e;setTimeout(e=()=>{var e,t,a,n;null==(e=W.current)||e.dispatchEvent(new Event("input"));let r=null==(t=W.current)?void 0:t.selectionStart,l=null==(a=W.current)?void 0:a.selectionEnd,i=null==(n=W.current)?void 0:n.selectionDirection;null!==r&&null!==l&&(J(r),X(l),H.current.prev=[r,l,i])},0),setTimeout(e,10),setTimeout(e,50)},[F,V]),a.useEffect(()=>{void 0!==I&&F!==I&&I.length<w&&F.length===w&&(null==k||k(F))},[w,k,I,F]);let Y=function({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[l,i]=a.useState(!1),[o,s]=a.useState(!1),[c,d]=a.useState(!1),u=a.useMemo(()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&l&&o,[l,o,n]),p=a.useCallback(()=>{let a=e.current,r=t.current;if(!a||!r||c||"none"===n)return;let l=a.getBoundingClientRect().left+a.offsetWidth,o=a.getBoundingClientRect().top+a.offsetHeight/2;0===document.querySelectorAll('[data-lastpass-icon-root],com-1password-button,[data-dashlanecreated],[style$="2147483647 !important;"]').length&&document.elementFromPoint(l-18,o)===a||(i(!0),d(!0))},[e,t,c,n]);return a.useEffect(()=>{let t=e.current;if(!t||"none"===n)return;function a(){s(window.innerWidth-t.getBoundingClientRect().right>=40)}a();let r=setInterval(a,1e3);return()=>{clearInterval(r)}},[e,n]),a.useEffect(()=>{let e=r||document.activeElement===t.current;if("none"===n||!e)return;let a=setTimeout(p,0),l=setTimeout(p,2e3),i=setTimeout(p,5e3),o=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(a),clearTimeout(l),clearTimeout(i),clearTimeout(o)}},[t,r,n,p]),{hasPWMBadge:l,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:L,inputRef:W,pushPasswordManagerStrategy:E,isFocused:V}),Q=a.useCallback(e=>{let t=e.currentTarget.value.slice(0,w);t.length>0&&z&&!z.test(t)?e.preventDefault():("string"==typeof I&&t.length<I.length&&document.dispatchEvent(new Event("selectionchange")),A(t))},[w,A,I,z]),Z=a.useCallback(()=>{var e;if(W.current){let t=Math.min(W.current.value.length,w-1),a=W.current.value.length;null==(e=W.current)||e.setSelectionRange(t,a),J(t),X(a)}$(!0)},[w]),ee=a.useCallback(e=>{var t,a;let n=W.current;if(!N&&(!_.current.isIOS||!e.clipboardData||!n))return;let r=e.clipboardData.getData("text/plain"),l=N?N(r):r;e.preventDefault();let i=null==(t=W.current)?void 0:t.selectionStart,o=null==(a=W.current)?void 0:a.selectionEnd,s=(i!==o?F.slice(0,i)+l+F.slice(o):F.slice(0,i)+l+F.slice(i)).slice(0,w);if(s.length>0&&z&&!z.test(s))return;n.value=s,A(s);let c=Math.min(s.length,w-1),d=s.length;n.setSelectionRange(c,d),J(c),X(d)},[w,A,z,F]),et=a.useMemo(()=>({position:"relative",cursor:B.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[B.disabled]),ea=a.useMemo(()=>({position:"absolute",inset:0,width:Y.willPushPWMBadge?`calc(100% + ${Y.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Y.willPushPWMBadge?`inset(0 ${Y.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:j,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Y.PWM_BADGE_SPACE_WIDTH,Y.willPushPWMBadge,j]),en=a.useMemo(()=>a.createElement("input",c(((e,t)=>{for(var a in t||(t={}))p.call(t,a)&&f(e,a,t[a]);if(u)for(var a of u(t))m.call(t,a)&&f(e,a,t[a]);return e})({autoComplete:B.autoComplete||"one-time-code"},B),d({"data-input-otp":!0,"data-input-otp-placeholder-shown":0===F.length||void 0,"data-input-otp-mss":q,"data-input-otp-mse":K,inputMode:C,pattern:null==z?void 0:z.source,"aria-placeholder":S,style:ea,maxLength:w,value:F,ref:W,onPaste:e=>{var t;ee(e),null==(t=B.onPaste)||t.call(B,e)},onChange:Q,onMouseOver:e=>{var t;U(!0),null==(t=B.onMouseOver)||t.call(B,e)},onMouseLeave:e=>{var t;U(!1),null==(t=B.onMouseLeave)||t.call(B,e)},onFocus:e=>{var t;Z(),null==(t=B.onFocus)||t.call(B,e)},onBlur:e=>{var t;$(!1),null==(t=B.onBlur)||t.call(B,e)}}))),[Q,Z,ee,C,ea,w,K,q,B,null==z?void 0:z.source,F]),er=a.useMemo(()=>({slots:Array.from({length:w}).map((e,t)=>{var a;let n=V&&null!==q&&null!==K&&(q===K&&t===q||t>=q&&t<K),r=void 0!==F[t]?F[t]:null;return{char:r,placeholderChar:void 0!==F[0]?null:null!=(a=null==S?void 0:S[t])?a:null,isActive:n,hasFakeCaret:n&&null===r}}),isFocused:V,isHovering:!B.disabled&&G}),[V,G,w,K,q,B.disabled,F]),el=a.useMemo(()=>R?R(er):a.createElement(h.Provider,{value:er},T),[T,er,R]);return a.createElement(a.Fragment,null,null!==M&&a.createElement("noscript",null,a.createElement("style",null,M)),a.createElement("div",{ref:L,"data-input-otp-container":!0,style:et,className:P},el,a.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},en)))});function v(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}g.displayName="Input";var x=`
2
+ [data-input-otp] {
3
+ --nojs-bg: white !important;
4
+ --nojs-fg: black !important;
5
+
6
+ background-color: var(--nojs-bg) !important;
7
+ color: var(--nojs-fg) !important;
8
+ caret-color: var(--nojs-fg) !important;
9
+ letter-spacing: .25em !important;
10
+ text-align: center !important;
11
+ border: 1px solid var(--nojs-fg) !important;
12
+ border-radius: 4px !important;
13
+ width: 100% !important;
14
+ }
15
+ @media (prefers-color-scheme: dark) {
16
+ [data-input-otp] {
17
+ --nojs-bg: black !important;
18
+ --nojs-fg: white !important;
19
+ }
20
+ }`,b=e.i(613349);function w({className:e,containerClassName:a,...n}){return(0,t.jsx)(g,{"data-slot":"input-otp",containerClassName:(0,b.cn)("cn-input-otp flex items-center has-disabled:opacity-50",a),spellCheck:!1,className:(0,b.cn)("disabled:cursor-not-allowed",e),...n})}function j({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"input-otp-group",className:(0,b.cn)("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",e),...a})}function y({index:e,className:n,...r}){let l=a.useContext(h),{char:i,hasFakeCaret:o,isActive:s}=l?.slots[e]??{};return(0,t.jsxs)("div",{"data-slot":"input-otp-slot","data-active":s,className:(0,b.cn)("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",n),...r,children:[i,o&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})}e.i(860115);var S=e.i(294237),C=e.i(473131),k=e.i(957563);function E({className:e,orientation:a="horizontal",...n}){return(0,t.jsx)(k.Separator,{"data-slot":"separator",orientation:a,className:(0,b.cn)("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...n})}function N({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"field-group",className:(0,b.cn)("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",e),...a})}let P=(0,S.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function M({className:e,orientation:a="vertical",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:(0,b.cn)(P({orientation:a}),e),...n})}function R({className:e,...a}){return(0,t.jsx)(C.Label,{"data-slot":"field-label",className:(0,b.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...a})}function T({children:e,className:a,...n}){return(0,t.jsxs)("div",{"data-slot":"field-separator","data-content":!!e,className:(0,b.cn)("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",a),...n,children:[(0,t.jsx)(E,{className:"absolute inset-0 top-1/2"}),e&&(0,t.jsx)("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:e})]})}function B({className:e,children:n,errors:r,...l}){let i=(0,a.useMemo)(()=>{if(n)return n;if(!r?.length)return null;let e=[...new Map(r.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,t.jsx)("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:e.map((e,a)=>e?.message&&(0,t.jsx)("li",{children:e.message},a))})},[n,r]);return i?(0,t.jsx)("div",{role:"alert","data-slot":"field-error",className:(0,b.cn)("text-sm font-normal text-destructive",e),...l,children:i}):null}let O=a.forwardRef(function({title:e="GitHub",color:a="currentColor",size:n=24,...r},l){return"default"===a&&(a="#181717"),(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,fill:a,viewBox:"0 0 24 24",ref:l,...r,children:[(0,t.jsx)("title",{children:e}),(0,t.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),D=a.forwardRef(function({title:e="Google",color:a="currentColor",size:n=24,...r},l){return"default"===a&&(a="#4285F4"),(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,fill:a,viewBox:"0 0 24 24",ref:l,...r,children:[(0,t.jsx)("title",{children:e}),(0,t.jsx)("path",{d:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"})]})});var F=e.i(898707),I=e.i(795379);e.i(954194);var A=e.i(582168);let z=!(0,b.isLocalMode)();function W({postLoginUrl:e}){let[n,i]=(0,a.useState)(""),[s,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1),[p,m]=(0,a.useState)(""),[f,h]=(0,a.useState)("email"),[g,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(null==g)return;let e=setTimeout(()=>{v(e=>null==e||e<=1?null:e-1)},1e3);return()=>clearTimeout(e)},[g]);let x={onError:e=>{if(429===e.response.status){let t=function(e){let t=e.get("X-Retry-After")??e.get("Retry-After");if(!t)return null;let a=Number.parseInt(t,10);return Number.isFinite(a)&&a>0?a:null}(e.response.headers);null!=t&&v(t)}}};async function b(e){if(e.preventDefault(),null==g){c(""),v(null),u(!0);try{let{error:e}=await r.authClient.emailOtp.sendVerificationOtp({email:n,type:"sign-in",fetchOptions:x});e?429!==e.status&&c(e.message??"Failed to send code"):h("code")}catch{c("Failed to send code")}u(!1)}}async function S(t){if(m(t),6===t.length){c(""),u(!0);try{let{error:a}=await r.authClient.signIn.emailOtp({email:n,otp:t});if(a)c(a.message??"Invalid code"),m("");else{window.location.href=e;return}}catch{c("Invalid code"),m("")}u(!1)}}async function C(t){t.preventDefault(),c(""),u(!0);let{error:a}=await r.signIn.email({email:n,password:A.DEV_PASSWORD},{onError:()=>{}});if(a){let{error:e}=await r.signUp.email({name:n.split("@")[0],email:n,password:A.DEV_PASSWORD},{onError:()=>{}});if(e){c(e.message??"Failed to sign in"),u(!1);return}}window.location.href=e}let k=null!=g,E=d?"Sending...":k?`Wait ${g}s`:"Send Code",P=z&&"code"===f?"Enter the code we sent you":z?"Enter your email — we’ll send you a verification code":void 0;return(0,t.jsxs)(N,{children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Sign in"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"or create an account to get started"}),P&&(0,t.jsx)("p",{className:"text-balance text-muted-foreground",children:P})]}),k&&(0,t.jsxs)(B,{children:["Too many requests. Try again in ",g,"s."]}),s&&!k&&(0,t.jsx)(B,{children:s}),z?"email"===f?(0,t.jsx)("form",{onSubmit:b,children:(0,t.jsxs)(N,{children:[(0,t.jsxs)(M,{children:[(0,t.jsx)(R,{htmlFor:"email",children:"Email"}),(0,t.jsx)(o.Input,{id:"email",type:"email",placeholder:"you@example.com",value:n,onChange:e=>i(e.target.value),required:!0,autoFocus:!0})]}),(0,t.jsx)(M,{children:(0,t.jsx)(l.Button,{type:"submit",disabled:d||k,className:"w-full",children:E})})]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm text-muted-foreground text-center",children:["We sent a code to ",(0,t.jsx)("strong",{children:n})]}),(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(w,{maxLength:6,value:p,onChange:S,disabled:d,autoFocus:!0,children:(0,t.jsxs)(j,{children:[(0,t.jsx)(y,{index:0}),(0,t.jsx)(y,{index:1}),(0,t.jsx)(y,{index:2}),(0,t.jsx)(y,{index:3}),(0,t.jsx)(y,{index:4}),(0,t.jsx)(y,{index:5})]})})}),(0,t.jsx)(l.Button,{variant:"ghost",className:"w-full",onClick:()=>{h("email"),m(""),c("")},children:"Use a different email"})]}):(0,t.jsx)("form",{onSubmit:C,children:(0,t.jsxs)(N,{children:[(0,t.jsxs)(M,{children:[(0,t.jsx)(R,{htmlFor:"email",children:"Email"}),(0,t.jsx)(o.Input,{id:"email",type:"email",placeholder:"you@example.com",value:n,onChange:e=>i(e.target.value),required:!0,autoFocus:!0})]}),(0,t.jsx)(M,{children:(0,t.jsx)(l.Button,{type:"submit",disabled:d,className:"w-full",children:d?"Signing in...":"Sign in"})})]})}),(0,t.jsx)(T,{className:"*:data-[slot=field-separator-content]:bg-card",children:"Or continue with"}),(0,t.jsxs)(M,{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)(l.Button,{variant:"outline",type:"button",onClick:()=>r.signIn.social({provider:"github",callbackURL:e}),children:[(0,t.jsx)(O,{className:"size-4"}),"GitHub"]}),(0,t.jsxs)(l.Button,{variant:"outline",type:"button",onClick:()=>r.signIn.social({provider:"google",callbackURL:e}),children:[(0,t.jsx)(D,{className:"size-4"}),"Google"]})]})]})}e.s(["default",0,function(){var e;let a=(e=(0,n.useSearchParams)().get("redirect"))&&e.startsWith("/")&&!e.startsWith("//")?e:"/workspaces?auto";return(0,t.jsxs)("div",{className:"relative flex min-h-svh flex-col items-center justify-center p-6 md:p-10",children:[(0,t.jsx)(F.GradientBackground,{}),(0,t.jsx)("div",{className:"w-full max-w-sm md:max-w-4xl",children:(0,t.jsx)("div",{className:"flex flex-col gap-6",children:(0,t.jsx)(i.Card,{className:"overflow-hidden p-0",children:(0,t.jsxs)(i.CardContent,{className:"grid p-0 md:grid-cols-2",children:[(0,t.jsx)("div",{className:"p-6 md:p-8 md:min-h-105 flex flex-col justify-center",children:(0,t.jsx)(W,{postLoginUrl:a})}),(0,t.jsx)("div",{className:"hidden bg-muted md:flex items-center justify-center overflow-visible min-h-80 pt-24",children:(0,t.jsx)(I.TypewriterVisual,{className:"scale-[0.65] shrink-0",emails:I.EMAILS_PLAYFUL,blobScale:2.5,blobBottom:"30%"})})]})})})})]})}],45356)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,858924,e=>{"use strict";let s=(0,e.i(706875).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,s],858924)},393153,e=>{"use strict";var s=e.i(368075),t=e.i(779646),a=e.i(186339);e.s(["ConfirmDialog",0,function({open:e,onOpenChange:n,title:r,description:i,confirmLabel:l="Remove",loadingLabel:d,confirmVariant:o="destructive",loading:c=!1,onConfirm:u}){return(0,s.jsx)(t.Dialog,{open:e,onOpenChange:n,children:(0,s.jsxs)(t.DialogContent,{showCloseButton:!1,children:[(0,s.jsxs)(t.DialogHeader,{children:[(0,s.jsx)(t.DialogTitle,{children:r}),(0,s.jsx)(t.DialogDescription,{children:i})]}),(0,s.jsxs)(t.DialogFooter,{children:[(0,s.jsx)(a.Button,{variant:"outline",size:"sm",onClick:()=>n(!1),disabled:c,children:"Cancel"}),(0,s.jsx)(a.Button,{variant:o,size:"sm",onClick:u,disabled:c,children:c?d??`${l}...`:l})]})]})})}])},934351,e=>{"use strict";var s=e.i(368075),t=e.i(613349);e.s(["Card",0,function({className:e,size:a="default",...n}){return(0,s.jsx)("div",{"data-slot":"card","data-size":a,className:(0,t.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-action",className:(0,t.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})},"CardContent",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,t.cn)("px-4 group-data-[size=sm]/card:px-3",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,t.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,t.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...a})}])},855372,e=>{"use strict";var s=e.i(368075),t=e.i(609049);function a({className:e}){return(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"#D97757",className:e,children:(0,s.jsx)("path",{d:"m3.127 10.604 3.135-1.76.053-.153-.053-.085H6.11l-.525-.032-1.791-.048-1.554-.065-1.505-.08-.38-.081L0 7.832l.036-.234.32-.214.455.04 1.009.069 1.513.105 1.097.064 1.626.17h.259l.036-.105-.089-.065-.068-.064-1.566-1.062-1.695-1.121-.887-.646-.48-.327-.243-.306-.104-.67.435-.48.585.04.15.04.593.456 1.267.981 1.654 1.218.242.202.097-.068.012-.049-.109-.181-.9-1.626-.96-1.655-.428-.686-.113-.411a2 2 0 0 1-.068-.484l.496-.674L4.446 0l.662.089.279.242.411.94.666 1.48 1.033 2.014.302.597.162.553.06.17h.105v-.097l.085-1.134.157-1.392.154-1.792.052-.504.25-.605.497-.327.387.186.319.456-.045.294-.19 1.23-.37 1.93-.243 1.29h.142l.161-.16.654-.868 1.097-1.372.484-.545.565-.601.363-.287h.686l.505.751-.226.775-.707.895-.585.759-.839 1.13-.524.904.048.072.125-.012 1.897-.403 1.024-.186 1.223-.21.553.258.06.263-.218.536-1.307.323-1.533.307-2.284.54-.028.02.032.04 1.029.098.44.024h1.077l2.005.15.525.346.315.424-.053.323-.807.411-3.631-.863-.872-.218h-.12v.073l.726.71 1.331 1.202 1.667 1.55.084.383-.214.302-.226-.032-1.464-1.101-.565-.497-1.28-1.077h-.084v.113l.295.432 1.557 2.34.08.718-.112.234-.404.141-.444-.08-.911-1.28-.94-1.44-.759-1.291-.093.053-.448 4.821-.21.246-.484.186-.403-.307-.214-.496.214-.98.258-1.28.21-1.016.19-1.263.112-.42-.008-.028-.092.012-.953 1.307-1.448 1.957-1.146 1.227-.274.109-.477-.247.045-.44.266-.39 1.586-2.018.956-1.25.617-.723-.004-.105h-.036l-4.212 2.736-.75.096-.324-.302.04-.496.154-.162 1.267-.871z"})})}function n({className:e}){return(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:e,children:(0,s.jsx)("path",{d:"M14.949 6.547a3.94 3.94 0 0 0-.348-3.273 4.11 4.11 0 0 0-4.4-1.934A4.1 4.1 0 0 0 8.423.2 4.15 4.15 0 0 0 6.305.086a4.1 4.1 0 0 0-1.891.948 4.04 4.04 0 0 0-1.158 1.753 4.1 4.1 0 0 0-1.563.679A4 4 0 0 0 .554 4.72a3.99 3.99 0 0 0 .502 4.731 3.94 3.94 0 0 0 .346 3.274 4.11 4.11 0 0 0 4.402 1.933c.382.425.852.764 1.377.995.526.231 1.095.35 1.67.346 1.78.002 3.358-1.132 3.901-2.804a4.1 4.1 0 0 0 1.563-.68 4 4 0 0 0 1.14-1.253 3.99 3.99 0 0 0-.506-4.716m-6.097 8.406a3.05 3.05 0 0 1-1.945-.694l.096-.054 3.23-1.838a.53.53 0 0 0 .265-.455v-4.49l1.366.778q.02.011.025.035v3.722c-.003 1.653-1.361 2.992-3.037 2.996m-6.53-2.75a2.95 2.95 0 0 1-.36-2.01l.095.057L5.29 12.09a.53.53 0 0 0 .527 0l3.949-2.246v1.555a.05.05 0 0 1-.022.041L6.473 13.3c-1.454.826-3.311.335-4.15-1.098m-.85-6.94A3.02 3.02 0 0 1 3.07 3.949v3.785a.51.51 0 0 0 .262.451l3.93 2.237-1.366.779a.05.05 0 0 1-.048 0L2.585 9.342a2.98 2.98 0 0 1-1.113-4.094zm11.216 2.571L8.747 5.576l1.362-.776a.05.05 0 0 1 .048 0l3.265 1.86a3 3 0 0 1 1.173 1.207 2.96 2.96 0 0 1-.27 3.2 3.05 3.05 0 0 1-1.36.997V8.279a.52.52 0 0 0-.276-.445m1.36-2.015-.097-.057-3.226-1.855a.53.53 0 0 0-.53 0L6.249 6.153V4.598a.04.04 0 0 1 .019-.04L9.533 2.7a3.07 3.07 0 0 1 3.257.139c.474.325.843.778 1.066 1.303.223.526.289 1.103.191 1.664zM5.503 8.575 4.139 7.8a.05.05 0 0 1-.026-.037V4.049c0-.57.166-1.127.476-1.607s.752-.864 1.275-1.105a3.08 3.08 0 0 1 3.234.41l-.096.054-3.23 1.838a.53.53 0 0 0-.265.455zm.742-1.577 1.758-1 1.762 1v2l-1.755 1-1.762-1z"})})}function r({className:e}){return(0,s.jsxs)("svg",{viewBox:"0 0 240 300",fill:"none",className:e,children:[(0,s.jsx)("path",{d:"M180 240H60V120H180V240Z",fill:"#CFCECD"}),(0,s.jsx)("path",{d:"M180 60H60V240H180V60ZM240 300H0V0H240V300Z",fill:"#211E1E"})]})}function i({className:e}){return(0,s.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",className:e,children:[(0,s.jsx)("path",{d:"M8 2C5.5 2 3.5 4 3.5 6.5S5 10.5 6.5 11v1.5H8V11c.3.1.7.1 1 0v1.5h1.5V11c1.5-.5 3-2.5 3-4.5S10.5 2 8 2Z",fill:"#E8453A"}),(0,s.jsx)("path",{d:"M3.5 5.5C2 5 1 6 1.5 7s2 .5 2.2-.7",fill:"#FF6B5A"}),(0,s.jsx)("path",{d:"M12.5 5.5c1.5-.5 2.5.5 2 1.5s-2 .5-2.2-.7",fill:"#FF6B5A"}),(0,s.jsx)("path",{d:"M6.5 3Q5 1.2 4.3 1.5",stroke:"#FF6B5A",strokeWidth:"0.8",strokeLinecap:"round"}),(0,s.jsx)("path",{d:"M9.5 3Q11 1.2 11.7 1.5",stroke:"#FF6B5A",strokeWidth:"0.8",strokeLinecap:"round"}),(0,s.jsx)("circle",{cx:"6.2",cy:"5.2",r:"0.9",fill:"#050810"}),(0,s.jsx)("circle",{cx:"9.8",cy:"5.2",r:"0.9",fill:"#050810"}),(0,s.jsx)("circle",{cx:"6.4",cy:"5",r:"0.3",fill:"#00E5CC"}),(0,s.jsx)("circle",{cx:"10",cy:"5",r:"0.3",fill:"#00E5CC"})]})}function l({className:e}){return(0,s.jsx)("img",{src:"data:image/webp;base64,UklGRuYDAABXRUJQVlA4INoDAADQEwCdASowADAAPm0uk0ckIiGhKrqpWIANiWkAEyQea/fD8IewvGL5V7Nb3H8u/MA8G9rT+4flL+UfIe42/23GB8zPqF/o3E0UAP5h/h/+F6ZX+x5evnX/r+4T/K/67/u/zg7znogfrusMANZLkn1gvlY/vNsKubtj/9xLSzxTsLr7K9GLdFNs5rwtISRcPXvH4z57n2fg0XR3aQ2D+pPpycwyl7TwAAD+/2DbjivnePzfyHCsdOgJXKlUR/OgAkofD7K4AdmsPKyP5Ml4/4HBYmIm5/efn/H+X3IZtngyaUOvwbFuRS/1yODFYO3vf3qeXGgPdfgIROXd/EPT7K2jysfvY9N71+w6g2gBPs+P6lxYkPf6S9QfpvH/7Pp7i8xRh0nVDBTEQyczSz7V9hoqo4nDJuii+SfibZRR/d5zB+9jkcb1DNN7YnC5Y7+WfGrE3eseXt3hSm+NS5++m1MHbjsrd9z/Q4HPRP/C85Po41XObalGyIUcFUL2j2n3uI/Yh6U8r6trCUJFB4kT3fsv6+8ylX/d96y2hq869FCXLjq4YqEO8vs5BtT52sf7KyDxPAWkH/b06YbfVXf4/7y5THL6Sr/4mOrrY9P2LW81f05HHFN8n0jcyqKOH7AluMm0AHPgFyz8RVrfBdmnPiC2FLMQfNDte5yGFzGC3fMlDed/tS/PO3Q/hjsNLvAXUUjqHyCo3JeN69jyNgWjjf8iUqoBsXT+lJyp2r8p60ad1jxhNyTblyJwda8aWEw1hFDeGjpMGguDF66RL4c+ZO+PhculC6WxvCsZ7IPAsdD7/ywx3w3AowJ66hAAK7k+m6X2QV06OVOCwyIGERex/AUyuBbLUK93X58+M+Si7YfYjVYGpoJ7JvSgD8ExaA21z9OY+si+1wreacDanKnFDmhwBQC3t6MLeXCOGp3VURDKl10K7tdKHQcb4hr48ba+1x/MrMRwHfq3IQrDIXPYCg4b0OLnVN9JyXttKGM63B5imIdKuU0r6hhSslT10lGLjnIJuwO5WKR0RHs+BX5vs6H63y3K7IuuZ1eRN+Aczvbs4QuDs6ZRuzjJ/1DJ5R/3ZrFPrtxvMwT06vAXIgcbhLGNLhOQUYRPdUN5MgyCtL5NH71ArTPLRRkIjhGwoCYXKKqlqIKKT9NX3vwp/nlh4SX71dlYg/mPXbJ9bMeVugyjqFahjFTJ/rT3HtBCWG8h+OvvbOFDFKurCG9BOhO9B719OS7zsP0KPqoymnv7hVvoJyZp0iziCbBvaJpmF9Cvfs8/vWqWr7TUo616WfMW+X9nkgpuqtnfAAAAAA==",alt:"Hermes",className:`${e} rounded-sm`})}function d({className:e}){return(0,s.jsxs)("svg",{viewBox:"0 0 800 800",fill:"none",className:e,children:[(0,s.jsx)("rect",{width:"800",height:"800",rx:"150",fill:"#09090b"}),(0,s.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z"}),(0,s.jsx)("path",{fill:"#fff",d:"M517.36 400H634.72V634.72H517.36Z"})]})}function o({className:e}){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:e,children:(0,s.jsx)("path",{d:"M12 1C5.9225 1 1 5.9225 1 12C1 16.8675 4.14875 20.9787 8.52125 22.4362C9.07125 22.5325 9.2775 22.2025 9.2775 21.9137C9.2775 21.6525 9.26375 20.7862 9.26375 19.865C6.5 20.3737 5.785 19.1912 5.565 18.5725C5.44125 18.2562 4.905 17.28 4.4375 17.0187C4.0525 16.8125 3.5025 16.3037 4.42375 16.29C5.29 16.2762 5.90875 17.0875 6.115 17.4175C7.105 19.0812 8.68625 18.6137 9.31875 18.325C9.415 17.61 9.70375 17.1287 10.02 16.8537C7.5725 16.5787 5.015 15.63 5.015 11.4225C5.015 10.2262 5.44125 9.23625 6.1425 8.46625C6.0325 8.19125 5.6475 7.06375 6.2525 5.55125C6.2525 5.55125 7.17375 5.2625 9.2775 6.67875C10.1575 6.43125 11.0925 6.3075 12.0275 6.3075C12.9625 6.3075 13.8975 6.43125 14.7775 6.67875C16.8813 5.24875 17.8025 5.55125 17.8025 5.55125C18.4075 7.06375 18.0225 8.19125 17.9125 8.46625C18.6138 9.23625 19.04 10.2125 19.04 11.4225C19.04 15.6437 16.4688 16.5787 14.0213 16.8537C14.42 17.1975 14.7638 17.8575 14.7638 18.8887C14.7638 20.36 14.75 21.5425 14.75 21.9137C14.75 22.2025 14.9563 22.5462 15.5063 22.4362C19.8513 20.9787 23 16.8537 23 12C23 5.9225 18.0775 1 12 1Z"})})}function c({className:e}){return(0,s.jsxs)("svg",{viewBox:"600 300 400 400",fill:"none",className:e,children:[(0,s.jsx)("path",{fill:"#14120B",d:"M999.994 554.294C999.994 559.859 999.994 565.419 999.962 570.984C999.935 575.67 999.882 580.357 999.753 585.038C999.475 595.247 998.875 605.542 997.059 615.639C995.217 625.88 992.212 635.409 987.477 644.718C982.822 653.861 976.738 662.233 969.485 669.491C962.227 676.748 953.861 682.828 944.712 687.482C935.409 692.217 925.875 695.222 915.633 697.065C905.537 698.88 895.242 699.48 885.033 699.759C880.346 699.887 875.665 699.941 870.978 699.968C865.413 700.005 859.853 700 854.288 700H745.695C740.13 700 734.571 700 729.005 699.968C724.319 699.941 719.632 699.887 714.951 699.759C704.742 699.48 694.447 698.88 684.35 697.065C674.109 695.222 664.58 692.217 655.271 687.482C646.128 682.828 637.756 676.743 630.499 669.491C623.241 662.233 617.161 653.866 612.507 644.718C607.772 635.414 604.767 625.88 602.925 615.639C601.109 605.542 600.509 595.247 600.23 585.038C600.102 580.352 600.048 575.67 600.021 570.984C600 565.419 600 559.859 600 554.294V445.701C600 440.136 600 434.576 600.032 429.011C600.059 424.324 600.112 419.637 600.241 414.956C600.52 404.747 601.119 394.452 602.935 384.356C604.778 374.115 607.783 364.586 612.518 355.277C617.172 346.133 623.257 337.762 630.509 330.504C637.767 323.246 646.133 317.167 655.282 312.512C664.586 307.777 674.12 304.772 684.361 302.93C694.458 301.114 704.752 300.514 714.961 300.236C719.648 300.107 724.329 300.054 729.016 300.027C734.576 300 740.136 300 745.701 300H854.294C859.859 300 865.419 300 870.984 300.032C875.67 300.059 880.357 300.112 885.038 300.241C895.247 300.52 905.542 301.119 915.639 302.935C925.88 304.778 935.409 307.783 944.718 312.518C953.861 317.172 962.233 323.257 969.491 330.509C976.748 337.767 982.828 346.133 987.482 355.282C992.217 364.586 995.222 374.12 997.065 384.361C998.88 394.458 999.48 404.752 999.759 414.961C999.887 419.648 999.941 424.329 999.968 429.016C1000.01 434.581 1000 440.141 1000 445.706V554.299L999.994 554.294Z"}),(0,s.jsx)("path",{fill:"#72716D",d:"M800.004 500L923.821 571.486C923.061 572.804 921.957 573.929 920.591 574.716L804.863 641.531C801.858 643.266 798.151 643.266 795.146 641.531L679.417 574.716C678.052 573.929 676.948 572.804 676.188 571.486L800.004 500Z"}),(0,s.jsx)("path",{fill:"#55544F",d:"M800.005 357.168V500L676.188 571.486C675.427 570.168 675.004 568.647 675.004 567.072V432.928C675.004 429.774 676.686 426.865 679.418 425.285L795.141 358.47C796.646 357.602 798.323 357.168 799.999 357.168H800.005Z"}),(0,s.jsx)("path",{fill:"#43413C",d:"M923.815 428.515C923.055 427.197 921.951 426.072 920.586 425.285L804.857 358.47C803.357 357.602 801.68 357.168 800.004 357.168V500L923.821 571.486C924.581 570.168 925.005 568.647 925.005 567.072V432.928C925.005 431.348 924.587 429.838 923.821 428.515H923.815Z"}),(0,s.jsx)("path",{fill:"#D6D5D2",d:"M915.156 433.518C915.857 434.728 915.954 436.281 915.156 437.663L802.764 632.323C802.008 633.641 800 633.1 800 631.584V503.311C800 502.287 799.727 501.302 799.229 500.44L915.15 433.512H915.156V433.518Z"}),(0,s.jsx)("path",{fill:"white",d:"M915.155 433.518L799.233 500.445C798.741 499.588 798.023 498.86 797.134 498.345L686.049 434.209C684.731 433.453 685.272 431.445 686.788 431.445H911.566C913.162 431.445 914.459 432.307 915.155 433.518Z"})]})}function u({className:e}){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",className:e,children:[(0,s.jsx)("path",{d:"M12 24C12 18.2 12 15.5 10.1 13.9C8.5 12 5.8 12 0 12C5.8 12 8.5 12 10.1 10.1C12 8.5 12 5.8 12 0C12 5.8 12 8.5 13.9 10.1C15.5 12 18.2 12 24 12C18.2 12 15.5 12 13.9 13.9C12 15.5 12 18.2 12 24Z",fill:"url(#gemini-gradient)"}),(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:"gemini-gradient",x1:"0",y1:"0",x2:"24",y2:"24",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#4285F4"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#886FBF"})]})})]})}e.s(["ProviderLogo",0,function({provider:e,className:m="h-4 w-4"}){switch(e){case"claude":return(0,s.jsx)(a,{className:m});case"codex":return(0,s.jsx)(n,{className:m});case"opencode":return(0,s.jsx)(r,{className:m});case"openclaw":return(0,s.jsx)(i,{className:m});case"hermes":return(0,s.jsx)(l,{className:m});case"pi":return(0,s.jsx)(d,{className:m});case"copilot":return(0,s.jsx)(o,{className:m});case"cursor":return(0,s.jsx)(c,{className:m});case"gemini":return(0,s.jsx)(u,{className:m});default:return(0,s.jsx)(t.Monitor,{className:m})}}])},371406,e=>{"use strict";var s=e.i(368075),t=e.i(298699),a=e.i(186339),n=e.i(575607),r=e.i(880932),i=e.i(613349);function l({step:e,completed:t}){return t?(0,s.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-emerald-500 text-white transition-all duration-300",children:(0,s.jsx)(n.Check,{className:"size-3",strokeWidth:3})}):(0,s.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-foreground text-background text-xs font-semibold",children:e})}e.s(["ConnectMachineSteps",0,function({generatedToken:e,generatingToken:n,onGenerateToken:d,registered:o}){let c=(0,t.useRef)(!1);(0,t.useEffect)(()=>{e||n||c.current||(c.current=!0,d())},[e,n,d]);let u=()=>{navigator.clipboard.writeText(`${(0,i.cliCmd)()} register --token ${e}`),r.toast.success("Copied to clipboard")},m=`${(0,i.cliCmd)()} daemon start`,x=()=>{navigator.clipboard.writeText(m),r.toast.success("Copied to clipboard")};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,s.jsx)(l,{step:1,completed:o}),"Register your CLI",o&&(0,s.jsx)("span",{className:"text-xs text-emerald-500 font-normal",children:"Done"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"Run this in your terminal to link your machine."}),n?(0,s.jsx)("div",{className:"pl-7",children:(0,s.jsx)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground animate-pulse",children:"Generating token..."})}):e?(0,s.jsxs)("div",{className:"pl-7 space-y-2",children:[(0,s.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors break-all",onClick:u,title:"Click to copy",children:[(0,i.cliCmd)()," register --token"," ",(0,s.jsx)("span",{className:"text-foreground/70",children:e})]}),!o&&(0,s.jsx)(a.Button,{size:"sm",onClick:u,className:"w-full",children:"Copy Command"})]}):null]}),(0,s.jsxs)("div",{className:`space-y-2 transition-opacity duration-300 ${!o?"opacity-40 pointer-events-none":""}`,children:[(0,s.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,s.jsx)(l,{step:2,completed:!1}),"Start the daemon"]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"The daemon connects your local agents to Alook."}),(0,s.jsx)("div",{className:"ml-7 rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:x,title:"Click to copy",children:m}),o&&(0,s.jsx)("div",{className:"pl-7",children:(0,s.jsx)(a.Button,{size:"sm",onClick:x,className:"w-full",children:"Copy Command"})})]})]})}])},7374,e=>{"use strict";var s=e.i(368075),t=e.i(298699),a=e.i(208020),n=e.i(355578),r=e.i(186339),i=e.i(875061),l=e.i(934351),d=e.i(332680),o=e.i(393153),c=e.i(880932),u=e.i(728886),m=e.i(609049),x=e.i(877942);e.i(954194);var h=e.i(907903),p=e.i(613349),f=e.i(855372),g=e.i(222862),C=e.i(858924),j=e.i(695554),v=e.i(371406);e.s(["default",0,function(){let{agents:e,runtimes:N,loading:b,handleGenerateToken:y,handleDeleteMachine:w,subscribeWs:S,workspaceId:k}=(0,n.useAgentContext)(),A=(0,a.useSearchParams)(),L=(0,a.useRouter)(),z=(0,a.usePathname)(),[R,B]=(0,t.useState)(()=>A.has("connect")),[M,H]=(0,t.useState)(""),[V,D]=(0,t.useState)(!1),[F,P]=(0,t.useState)(!1),[T,U]=(0,t.useState)(null),[O,I]=(0,t.useState)(new Set),[K,X]=(0,t.useState)(new Set),[G,Z]=(0,t.useState)(!1),[E,Y]=(0,t.useState)(""),[_,q]=(0,t.useState)(""),[J,Q]=(0,t.useState)("Remove"),[W,$]=(0,t.useState)(void 0),[ee,es]=(0,t.useState)("destructive"),[et,ea]=(0,t.useState)(!1),en=(0,t.useRef)(null);(0,t.useEffect)(()=>{(0,g.fetchLatestCliVersion)().then(e=>U(e.version)).catch(()=>{})},[]),(0,t.useEffect)(()=>{A.has("connect")&&L.replace(z,{scroll:!1})},[A,L,z]);let er=(0,t.useRef)(R);(0,t.useEffect)(()=>{er.current=R},[R]);let ei=(0,t.useRef)(e);(0,t.useEffect)(()=>{ei.current=e},[e]),(0,t.useEffect)(()=>S(e=>{if(er.current&&("runtime.registered"===e.type&&e.workspaceId===k&&P(!0),"runtime.status"===e.type&&e.workspaceId===k&&"online"===e.status)&&(B(!1),H(""),P(!1),c.toast.success("Machine connected"),0===ei.current.length)){let e=z.split("/")[2];L.push(`/w/${e}/agents/new`)}}),[S,k,z,L]);let el=(e,s,t,a)=>{Y(e),q(s),Q(a?.label??"Remove"),$(a?.loadingLabel),es(a?.variant??"destructive"),en.current=t,Z(!0)},ed=async()=>{if(en.current){ea(!0);try{await en.current()}finally{ea(!1),Z(!1),en.current=null}}},eo=(0,t.useCallback)(async()=>{D(!0);try{let e=await y();e&&H(e)}finally{D(!1)}},[y]),ec=async(e,s)=>{I(e=>new Set(e).add(s));try{await (0,g.triggerRuntimeUpdate)(e,k),c.toast.success("Update triggered")}catch{c.toast.error("Failed to trigger update"),I(e=>{let t=new Set(e);return t.delete(s),t})}},eu=async(e,s)=>{X(e=>new Set(e).add(s));try{await (0,g.triggerRuntimeRescan)(e,k),c.toast.success("Rescan triggered — daemon will restart to detect runtimes")}catch{c.toast.error("Failed to trigger rescan"),X(e=>{let t=new Set(e);return t.delete(s),t})}},em=(0,t.useMemo)(()=>{if(0===O.size)return O;let e=new Set;for(let s of N){let t=s.daemon_id||s.id;O.has(t)&&s.pending_update_version&&e.add(t)}return e},[N,O]),ex=(0,t.useMemo)(()=>{if(0===K.size)return K;let e=new Set;for(let s of N){let t=s.daemon_id||s.id;K.has(t)&&s.pending_rescan&&e.add(t)}return e},[N,K]),eh=new Map;for(let e of N){let s=e.daemon_id||e.id;if(!eh.has(s)){let t=e.metadata;eh.set(s,{deviceInfo:"string"==typeof e.device_info?e.device_info:"",status:e.status,lastSeenAt:e.last_seen_at,pendingUpdateVersion:e.pending_update_version??null,pendingRescan:!!e.pending_rescan,cliVersion:t?.cli_version??null,runtimes:[]})}eh.get(s).runtimes.push(e)}return b?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(u.Skeleton,{className:"h-4 w-16"}),(0,s.jsx)(u.Skeleton,{className:"h-3 w-52"})]}),(0,s.jsx)(u.Skeleton,{className:"h-8 w-29 rounded-md"})]}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:(0,s.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((e,t)=>(0,s.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u.Skeleton,{className:"size-4 rounded"}),(0,s.jsx)(u.Skeleton,{className:"h-4 w-28"})]}),(0,s.jsx)("div",{className:"space-y-2",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(u.Skeleton,{className:"h-3 w-20"}),(0,s.jsx)(u.Skeleton,{className:"h-3 w-28"})]}),(0,s.jsx)(u.Skeleton,{className:"h-5 w-14 rounded-full"})]})})]},t))})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h1",{className:"text-sm font-medium",children:"Runtimes"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your machines and their agent runtimes."})]}),(0,s.jsxs)(r.Button,{size:"sm",variant:"outline",onClick:()=>{H(""),P(!1),B(!0)},disabled:V,children:[(0,s.jsx)(x.Plus,{className:"size-3.5"}),"New machine"]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:0===N.length?(0,s.jsx)("div",{className:"flex flex-1 items-center justify-center min-h-[60vh]",children:(0,s.jsxs)("div",{className:"text-center animate-[fade-up_400ms_ease-out_both]",children:[(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"Connect a machine to start running agents locally."}),(0,s.jsx)(r.Button,{size:"sm",className:"mt-4 glow-border",onClick:()=>{H(""),B(!0)},children:"Connect Machine"})]})}):(0,s.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from(eh.entries()).map(([e,t])=>{let a,n,d,o=t.deviceInfo||e;return(0,s.jsxs)(l.Card,{size:"sm",children:[(0,s.jsx)(l.CardHeader,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(m.Monitor,{className:"size-4 text-muted-foreground shrink-0"}),(0,s.jsx)(l.CardTitle,{className:"truncate",children:o}),t.cliVersion&&(0,s.jsxs)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:["v",t.cliVersion]}),(0,s.jsx)(i.Badge,{variant:"online"===t.status?"default":"outline",className:"shrink-0",children:t.status})]})}),(0,s.jsx)(l.CardContent,{children:(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:t.lastSeenAt?new Date(t.lastSeenAt).toLocaleString():"Never seen"}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(a=!!t.pendingUpdateVersion||em.has(e),n=T&&(!t.cliVersion||!(0,h.semverGte)(t.cliVersion,T)),a?(0,s.jsxs)(r.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,s.jsx)(C.Loader2,{className:"size-3 animate-spin mr-1"}),"Updating..."]}):n?(0,s.jsx)(r.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>el("Update daemon",`This will update the daemon on "${o}" to the latest CLI version. The daemon will restart during the update.`,async()=>{await ec(t.runtimes[0].id,e)},{label:"Update",loadingLabel:"Updating...",variant:"default"}),children:"Update"}):null),(d=t.pendingRescan||ex.has(e),"online"!==t.status?null:d?(0,s.jsxs)(r.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,s.jsx)(j.RefreshCw,{className:"size-3 animate-spin mr-1"}),"Rescanning..."]}):(0,s.jsxs)(r.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>el("Rescan runtimes",`This will restart the daemon on "${o}" to re-detect available runtimes (Claude Code, Codex, OpenCode).`,async()=>{await eu(t.runtimes[0].id,e)},{label:"Rescan",loadingLabel:"Triggering...",variant:"default"}),children:[(0,s.jsx)(j.RefreshCw,{className:"size-3 mr-1"}),"Rescan"]})),(0,s.jsx)(r.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground h-6 px-2 hover:text-destructive",onClick:()=>{el("Remove machine",`This will remove "${o}" and all its runtimes. Agents using these runtimes will be unlinked.`,async()=>{await w(e)})},children:"Remove"})]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.runtimes.map(e=>(0,s.jsxs)(i.Badge,{variant:"secondary",className:"gap-1.5",children:[(0,s.jsx)(f.ProviderLogo,{provider:e.provider,className:"h-3.5 w-3.5"}),e.provider,e.metadata?.version?(0,s.jsx)("span",{className:"text-muted-foreground font-normal",children:String(e.metadata.version)}):null]},e.id))}),"online"!==t.status&&(0,s.jsxs)("div",{className:"pt-1.5 border-t border-border/50",children:[(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mb-1.5",children:"Bring this machine online:"}),(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-md bg-muted px-2.5 py-1.5 font-mono text-[11px] text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:()=>{navigator.clipboard.writeText(`${(0,p.cliCmd)()} daemon start`),c.toast.success("Copied to clipboard")},title:"Click to copy",children:[(0,s.jsx)("span",{className:"absolute inset-0 -translate-x-full animate-[shimmer_2.5s_infinite] bg-linear-to-r from-transparent via-(--shimmer-peak) to-transparent"}),(0,s.jsxs)("span",{className:"relative",children:[(0,p.cliCmd)()," daemon start"]})]})]})]})})]},e)})})}),(0,s.jsx)(d.Sheet,{open:R,onOpenChange:e=>{B(e),e||H("")},children:(0,s.jsxs)(d.SheetContent,{className:"data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:rounded-xl data-[side=right]:sm:border",children:[(0,s.jsxs)(d.SheetHeader,{children:[(0,s.jsx)(d.SheetTitle,{children:"Connect a machine"}),(0,s.jsx)(d.SheetDescription,{children:"Your machine runs AI agents locally using Claude Code, Codex, or OpenCode."})]}),(0,s.jsx)(d.SheetBody,{children:(0,s.jsx)(v.ConnectMachineSteps,{generatedToken:M,generatingToken:V,onGenerateToken:eo,registered:F})})]})}),(0,s.jsx)(o.ConfirmDialog,{open:G,onOpenChange:Z,title:E,description:_,confirmLabel:J,loadingLabel:W,confirmVariant:ee,loading:et,onConfirm:ed})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,642342,e=>{"use strict";var r=e.i(459119),t=e.i(298699);let n=(0,e.i(613349).isLocalMode)(),a=Number(r.default.env.NEXT_PUBLIC_WS_DO_PORT)||8789,s=Number(r.default.env.NEXT_PUBLIC_WS_RECONNECT_DELAY_MS)||1e3,o=Number(r.default.env.NEXT_PUBLIC_WS_RECONNECT_MAX_DELAY_MS)||3e4;e.s(["useUserWs",0,function(e){let r=(0,t.useRef)(null),i=(0,t.useRef)(s),l=(0,t.useRef)(e),d=(0,t.useRef)(null);(0,t.useEffect)(()=>{l.current=e},[e]);let c=(0,t.useRef)(null),u=(0,t.useCallback)(()=>{let e=Math.min(i.current,o);i.current=Math.min(2*e,o),d.current=setTimeout(()=>{c.current?.()},e+500*Math.random())},[]),f=(0,t.useCallback)(async()=>{let e,t,o;try{let r=await fetch("/api/ws/token");if(!r.ok){console.warn("[ws] token fetch failed:",r.status),u();return}let n=await r.json();e=n.userId,t=n.token}catch(e){console.warn("[ws] token fetch error:",e),u();return}let d=n?`ws://localhost:${a}/?userId=${e}`:`${location.origin.replace("http","ws")}/api/ws/user?userId=${e}`;try{o=new WebSocket(d)}catch(e){console.warn("[ws] WebSocket creation failed:",e),u();return}r.current=o,o.onopen=()=>{i.current=s,o.send(JSON.stringify({type:"auth",token:t}))},o.onmessage=e=>{try{let r=JSON.parse(e.data);if("auth.ok"===r.type)return;l.current(r)}catch{}},o.onerror=()=>{},o.onclose=()=>{o===r.current&&u()}},[u]);(0,t.useEffect)(()=>{c.current=f},[f]),(0,t.useEffect)(()=>(f(),()=>{null!==d.current&&(clearTimeout(d.current),d.current=null);let e=r.current;r.current=null,e?.close()}),[f])}])},996718,e=>{"use strict";var r=e.i(298699);e.s(["useIsMobile",0,function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 639px)"),r=()=>{t(window.innerWidth<640)};return e.addEventListener("change",r),t(window.innerWidth<640),()=>e.removeEventListener("change",r)},[]),!!e}])},400175,126366,819748,108772,e=>{"use strict";var r=e.i(368075),t=e.i(298699);let n="#27272a",a={fill:"rgba(255,255,255,0.92)",stroke:"rgba(255,255,255,0.95)",strokeWidth:3.5},s=[{name:"Purple",value:"#a855f7",gradient:["#c084fc","#a855f7","#7c3aed"],faceColor:"#2e1065"},{name:"Teal",value:"#14b8a6",gradient:["#5eead4","#14b8a6","#0d9488"],faceColor:"#134e4a"},{name:"Orange",value:"#f97316",gradient:["#fdba74","#f97316","#c2410c"],faceColor:"#7c2d12"},{name:"Blue",value:"#3b82f6",gradient:["#93c5fd","#3b82f6","#1d4ed8"],faceColor:"#1e3a5f"},{name:"Pink",value:"#f472b6",gradient:["#fda4af","#f472b6","#be185d"],faceColor:"#831843"},{name:"Yellow",value:"#eab308",gradient:["#fde047","#eab308","#a16207"],faceColor:"#713f12"},{name:"Green",value:"#22c55e",gradient:["#86efac","#22c55e","#15803d"],faceColor:"#14532d"},{name:"Beige",value:"#d6ccb8",gradient:["#e8e0d4","#d6ccb8","#b8a990"],faceColor:"#57534e"},{name:"Red",value:"#ef4444",gradient:["#fca5a5","#ef4444","#991b1b"],faceColor:"#7f1d1d"},{name:"Lake Blue",value:"#6366f1",gradient:["#a5b4fc","#6366f1","#3730a3"],faceColor:"#312e81"},{name:"Gray",value:"#9ca3af",gradient:["#d4d4d8","#9ca3af","#6b7280"],faceColor:"#374151"},{name:"Deep Purple",value:"#8b5cf6",gradient:["#c4b5fd","#8b5cf6","#5b21b6"],faceColor:"#3b0764"}],o={circle:{name:"Circle",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("circle",{cx:"100",cy:"100",r:"66",...a})},rounded:{name:"Rounded",face:{cx:100,cy:100,w:90},render:()=>(0,r.jsx)("rect",{x:"30",y:"30",width:"140",height:"140",rx:"32",...a})},hexagon:{name:"Hexagon",face:{cx:100,cy:100,w:86},render:()=>(0,r.jsx)("path",{d:"M100 32 C108 32 114 35 120 39 L155 60 C161 64 165 70 165 78 L165 122 C165 130 161 136 155 140 L120 161 C114 165 108 168 100 168 C92 168 86 165 80 161 L45 140 C39 136 35 130 35 122 L35 78 C35 70 39 64 45 60 L80 39 C86 35 92 32 100 32 Z",...a})},task:{name:"Task",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("rect",{x:"34",y:"34",width:"132",height:"132",rx:"24",...a})},book:{name:"Book",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("path",{d:"M42 162 L42 88 C42 54 68 34 100 34 C132 34 158 54 158 88 L158 162 C158 166 154 170 150 170 L50 170 C46 170 42 166 42 162 Z",...a})},mail:{name:"Mail",face:{cx:100,cy:100,w:86},render:()=>(0,r.jsx)("rect",{x:"28",y:"54",width:"144",height:"92",rx:"46",...a})},calendar:{name:"Calendar",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("path",{d:"M100 34 C138 34 166 52 166 80 C166 94 158 106 158 118 C158 148 138 166 100 166 C62 166 42 148 42 118 C42 106 34 94 34 80 C34 52 62 34 100 34 Z",...a})},bulb:{name:"Bulb",face:{cx:100,cy:104,w:76},render:()=>(0,r.jsx)("ellipse",{cx:"100",cy:"104",rx:"58",ry:"66",...a})},folder:{name:"Folder",face:{cx:102,cy:108,w:80},render:()=>(0,r.jsx)("path",{d:"M62 144 C40 144 32 128 36 116 C32 104 40 90 54 88 C56 72 70 60 88 62 C100 50 118 50 132 58 C144 52 162 60 162 76 C172 82 174 98 166 108 C172 120 164 136 150 140 Z",...a})},mountain:{name:"Mountain",face:{cx:100,cy:100,w:76},render:()=>(0,r.jsx)("path",{d:"M92 36 C120 32 156 48 164 78 C172 108 156 148 124 160 C92 172 48 156 38 124 C28 92 62 40 92 36 Z",...a})}},i=Object.keys(o),l={dot:{name:"Dot",render:(e=n)=>(0,r.jsx)("circle",{cx:"0",cy:"0",r:"4.5",fill:e})},dash:{name:"Dash",render:(e=n)=>(0,r.jsx)("line",{x1:"-10",y1:"0",x2:"10",y2:"0",stroke:e,strokeWidth:"5",strokeLinecap:"round"})},hookL:{name:"Hook",render:(e=n)=>(0,r.jsx)("path",{d:"M-11 0 Q-5.5 7 0 1.5 Q5.5 7 11 0",fill:"none",stroke:e,strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})},smile:{name:"Smile",render:(e=n)=>(0,r.jsx)("path",{d:"M-11 0 Q0 11 11 0",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"})},caret:{name:"Caret",render:(e=n)=>(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{d:"M-10 0 Q0 8 10 0",fill:"none",stroke:e,strokeWidth:"4.5",strokeLinecap:"round"}),(0,r.jsx)("ellipse",{cx:"3",cy:"6",rx:"4",ry:"4.5",fill:"#f472b6"})]})},arrow:{name:"Arrow",render:(e=n)=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"6",ry:"7.5",fill:e})},oh:{name:"o",render:(e=n)=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"7",ry:"7.5",fill:"none",stroke:e,strokeWidth:"4.5"})}},d=Object.keys(l),c=(e,t)=>{let a=t??e,s=(t,s=n)=>(0,r.jsxs)("g",{children:[(0,r.jsx)("g",{transform:`translate(${-t}, 0)`,children:e(s)}),(0,r.jsx)("g",{transform:`translate(${t}, 0)`,children:a(s)})]});return s.displayName="EyePair",s},u={dots:{name:"Dots",render:c(e=>(0,r.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:e}))},big:{name:"Big",render:c(e=>(0,r.jsxs)("g",{children:[(0,r.jsx)("circle",{cx:"0",cy:"0",r:"10",fill:e}),(0,r.jsx)("circle",{cx:"2.5",cy:"-3",r:"3.5",fill:"rgba(255,255,255,0.9)"})]}))},rings:{name:"Rings",render:c(e=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:"none",stroke:e,strokeWidth:"4.5"}))},arches:{name:"Arches",render:c(e=>(0,r.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},lines:{name:"Lines",render:c(e=>(0,r.jsx)("path",{d:"M-10 0 Q0 -6 10 0",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},happy:{name:"Happy",render:c(e=>(0,r.jsx)("path",{d:"M-10 5 Q0 -11 10 5",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},sleepy:{name:"Sleepy",render:c(e=>(0,r.jsx)("path",{d:"M-10 -2 Q0 8 10 -2",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},shy:{name:"Shy",render:c(e=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:e}))},wink:{name:"Wink",render:(e,t=n)=>(0,r.jsxs)("g",{children:[(0,r.jsx)("g",{transform:`translate(${-e}, 0)`,children:(0,r.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:t})}),(0,r.jsx)("g",{transform:`translate(${e}, 0)`,children:(0,r.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:t,strokeWidth:"5",strokeLinecap:"round"})})]})}},f=Object.keys(u),x={shape:"book",eye:"happy",nose:"dash",bg:1},h=[{name:"Task",config:{shape:"task",nose:"dot",eye:"dots",bg:0}},{name:"Notes",config:{shape:"book",nose:"dash",eye:"happy",bg:1}},{name:"Mail",config:{shape:"mail",nose:"smile",eye:"dots",bg:3}},{name:"Schedule",config:{shape:"calendar",nose:"dot",eye:"dots",bg:4}},{name:"Idea",config:{shape:"bulb",nose:"oh",eye:"rings",bg:5}},{name:"Project",config:{shape:"folder",nose:"dash",eye:"lines",bg:7}},{name:"Goal",config:{shape:"mountain",nose:"caret",eye:"arches",bg:8}},{name:"Dream",config:{shape:"circle",nose:"smile",eye:"shy",bg:11}},{name:"Organize",config:{shape:"rounded",nose:"dot",eye:"sleepy",bg:6}},{name:"Explore",config:{shape:"hexagon",nose:"hookL",eye:"wink",bg:9}},{name:"Focus",config:{shape:"task",nose:"caret",eye:"lines",bg:2}},{name:"Collect",config:{shape:"book",nose:"oh",eye:"rings",bg:10}}];function m(e){return e[Math.floor(Math.random()*e.length)]}function p(){return{shape:m(i),eye:m(f),nose:m(d),bg:Math.floor(Math.random()*s.length)}}function g({config:e,size:n=200,className:a}){let i=(0,t.useId)().replace(/:/g,""),d=o[e.shape]??o.book,c=u[e.eye],f=l[e.nose],x=s[e.bg]??s[0],[h,m,p]=x.gradient,b=x.faceColor,{cx:v,cy:y,w:j}=d.face,k=Math.max(13,.24*j),C=y-Math.max(12,.16*j);return(0,r.jsxs)("svg",{viewBox:"0 0 200 200",width:n,height:n,className:a,style:{display:"block"},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:`bg-${i}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:h}),(0,r.jsx)("stop",{offset:"50%",stopColor:m}),(0,r.jsx)("stop",{offset:"100%",stopColor:p})]}),(0,r.jsxs)("radialGradient",{id:`gl-${i}`,cx:"30%",cy:"25%",r:"60%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"rgba(255,255,255,0.32)"}),(0,r.jsx)("stop",{offset:"100%",stopColor:"rgba(255,255,255,0)"})]}),(0,r.jsx)("filter",{id:`sh-${i}`,x:"-10%",y:"-5%",width:"120%",height:"130%",children:(0,r.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"4",floodColor:"rgba(0,0,0,0.18)"})})]}),(0,r.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#bg-${i})`}),(0,r.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#gl-${i})`}),(0,r.jsxs)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:[(0,r.jsx)("g",{"data-avatar-shape":"",filter:`url(#sh-${i})`,children:d.render()}),c&&(0,r.jsx)("g",{transform:`translate(${v}, ${C})`,children:(0,r.jsx)("g",{"data-avatar-eyes":"",children:c.render(k,b)})}),f&&(0,r.jsx)("g",{transform:`translate(${v}, ${y+7})`,children:(0,r.jsx)("g",{"data-avatar-nose":"",children:f.render(b)})})]})]})}let b="avatar:";e.s(["AvatarRenderer",0,g,"BG_COLORS",0,s,"DEFAULT_CONFIG",0,x,"EYE_KEYS",0,f,"Eyes",0,u,"NOSE_KEYS",0,d,"Noses",0,l,"PRESETS",0,h,"SHAPE_KEYS",0,i,"Shapes",0,o,"parseAvatarUrl",0,function(e){if(!e||!e.startsWith(b))return null;try{let r=JSON.parse(e.slice(b.length));if("object"==typeof r&&null!==r&&"string"==typeof r.shape&&"string"==typeof r.eye&&"string"==typeof r.nose&&"number"==typeof r.bg)return r;if("object"==typeof r&&null!==r&&"outline"in r)return x;return null}catch{return null}},"randomConfig",0,p,"serializeAvatarConfig",0,function(e){return b+JSON.stringify(e)}],126366);let v=["avatar-anim-shape-bounce","avatar-anim-head-tilt","avatar-anim-shake","avatar-anim-wobble","avatar-anim-pulse","avatar-anim-spin","avatar-anim-jelly","avatar-anim-float","avatar-anim-nod"];e.s(["AnimatedAvatar",0,function({config:e,size:n,className:a,isHovered:s,isWorking:o}){let[i,l]=(0,t.useState)(null),d=(0,t.useRef)(-1);function c(){let e=Math.floor(Math.random()*v.length);return e===d.current&&(e=(e+1)%v.length),d.current=e,v[e]}return(0,t.useEffect)(()=>{s?l(c()):o||l(null)},[s,o]),(0,t.useEffect)(()=>{if(!o){s||l(null);return}l(c());let e=setInterval(()=>{l(c())},4e3);return()=>clearInterval(e)},[s,o]),(0,r.jsx)("div",{className:i??void 0,children:(0,r.jsx)(g,{config:e,size:n,className:a})})}],819748);var y=e.i(613349);function j({label:e,keys:t,value:n,onChange:a,renderThumb:s,mobile:o=!1}){let i=t.indexOf(n),l=e=>a(t[(i+e+t.length)%t.length]),d=t[(i-1+t.length)%t.length],c=t[(i+1)%t.length];return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-12 text-xs font-medium text-muted-foreground shrink-0",children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>l(-1),className:(0,y.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",o?"size-10":"size-7"),children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,r.jsx)("path",{d:"M15 5 L8 12 L15 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,r.jsxs)("div",{className:"flex items-center gap-1 flex-1 justify-center",children:[(0,r.jsx)("button",{type:"button",onClick:()=>l(-1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:s(d)}),(0,r.jsx)("button",{type:"button",onClick:()=>l(1),className:"border-2 border-primary rounded-lg p-0.5",children:s(n)}),(0,r.jsx)("button",{type:"button",onClick:()=>l(1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:s(c)})]}),(0,r.jsx)("button",{type:"button",onClick:()=>l(1),className:(0,y.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",o?"size-10":"size-7"),children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,r.jsx)("path",{d:"M9 5 L16 12 L9 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function k({config:e,onChange:n,layout:a="vertical",mobile:c=!1}){let[x,m]=(0,t.useState)("presets"),b=(0,t.useCallback)((r,t)=>{n({...e,[r]:t})},[e,n]),[v,C]=(0,t.useState)(!1),w=(0,t.useRef)(e);(0,t.useEffect)(()=>{if(w.current.shape!==e.shape||w.current.eye!==e.eye||w.current.nose!==e.nose||w.current.bg!==e.bg){C(!0);let r=setTimeout(()=>C(!1),450);return w.current=e,()=>clearTimeout(r)}},[e]),(0,t.useEffect)(()=>{if("horizontal"!==a)return;let e=e=>{"Space"===e.code&&e.target===document.body&&(e.preventDefault(),n(p()))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a,n]);let N="horizontal"===a,L=N?220:c?120:160,M=(0,r.jsxs)("div",{className:(0,y.cn)("flex flex-col items-center gap-3 rounded-2xl bg-muted/30",c?"p-3":"p-4",N?"w-70 shrink-0 justify-center":""),children:[(0,r.jsx)("div",{className:(0,y.cn)("rounded-2xl",v&&"animate-[shake_0.45s_cubic-bezier(.36,.07,.19,.97)]"),children:(0,r.jsx)(g,{config:e,size:L})}),(0,r.jsxs)("button",{type:"button",onClick:()=>n(p()),className:"inline-flex items-center gap-2 rounded-full bg-foreground px-4 py-1.5 text-sm font-medium text-background hover:bg-foreground/80 transition-colors",children:[(0,r.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"3"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"8",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8",cy:"16",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"16",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"})]}),"Random",N&&(0,r.jsx)("kbd",{className:"ml-1 rounded bg-background/20 px-1.5 py-0.5 text-[10px] font-mono",children:"Space"})]})]}),z=(0,r.jsxs)("div",{className:(0,y.cn)("flex flex-col gap-3 flex-1 min-w-0",N&&"rounded-2xl bg-muted/30 p-4 h-95"),children:[(0,r.jsxs)("div",{className:"flex border-b border-border",children:[(0,r.jsx)("button",{type:"button",onClick:()=>m("presets"),className:(0,y.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","presets"===x?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"★ Presets"}),(0,r.jsx)("button",{type:"button",onClick:()=>m("custom"),className:(0,y.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","custom"===x?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"⚙ Custom"})]}),(0,r.jsxs)("div",{className:(0,y.cn)("flex-1 min-h-0",N&&"overflow-y-auto thin-scrollbar"),children:["presets"===x&&(0,r.jsx)("div",{className:(0,y.cn)("grid gap-2",c?"grid-cols-3":"grid-cols-4"),children:h.map(t=>{let a=t.config.shape===e.shape&&t.config.eye===e.eye&&t.config.nose===e.nose&&t.config.bg===e.bg;return(0,r.jsx)("button",{type:"button",onClick:()=>n(t.config),className:(0,y.cn)("flex items-center justify-center rounded-xl border p-2 transition-all",a?"border-primary border-2 bg-primary/5 shadow-sm":"border-border bg-background hover:border-primary/40"),children:(0,r.jsx)(g,{config:t.config,size:56})},t.name)})}),"custom"===x&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(j,{label:"Shape",keys:i,value:e.shape,onChange:e=>b("shape",e),renderThumb:e=>(0,r.jsxs)("svg",{viewBox:"0 0 200 200",width:"40",height:"40",children:[(0,r.jsx)("rect",{width:"200",height:"200",rx:"56",fill:"hsl(var(--muted))"}),(0,r.jsx)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:o[e]?.render()})]}),mobile:c}),(0,r.jsx)(j,{label:"Nose",keys:d,value:e.nose,onChange:e=>b("nose",e),renderThumb:e=>(0,r.jsx)("svg",{viewBox:"-14 -10 28 20",width:"36",height:"24",children:l[e]?.render("currentColor")}),mobile:c}),(0,r.jsx)(j,{label:"Eyes",keys:f,value:e.eye,onChange:e=>b("eye",e),renderThumb:e=>(0,r.jsx)("svg",{viewBox:"-18 -10 36 20",width:"44",height:"24",children:u[e]?.render(8,"currentColor")}),mobile:c}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Color"}),(0,r.jsx)("div",{className:(0,y.cn)("flex flex-wrap p-1",c?"gap-3":"gap-2"),children:s.map((t,n)=>(0,r.jsx)("button",{type:"button",onClick:()=>b("bg",n),title:t.name,className:(0,y.cn)("rounded-full transition-shadow",c?"size-8":"size-7",e.bg===n?"ring-2 ring-primary ring-offset-2":"ring-1 ring-border"),style:{background:`linear-gradient(135deg, ${t.gradient[0]}, ${t.gradient[1]}, ${t.gradient[2]})`}},t.value))})]})]})]})]});return N?(0,r.jsxs)("div",{className:"flex gap-4",children:[M,z]}):(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[M,z]})}var C=e.i(779646),w=e.i(996718);e.s(["AvatarPickerDialog",0,function({config:e,onChange:n}){let[a,s]=(0,t.useState)(!1),[o,i]=(0,t.useState)(e),l=(0,w.useIsMobile)();return(0,r.jsxs)(C.Dialog,{open:a,onOpenChange:r=>{r&&i(e),s(r)},children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(C.DialogTrigger,{render:(0,r.jsx)("button",{type:"button",className:"rounded-2xl bg-background p-1.5 shadow-sm border border-border hover:border-primary/40 transition-colors cursor-pointer"}),children:(0,r.jsx)(g,{config:e,size:80})})}),(0,r.jsxs)(C.DialogContent,{className:l?"top-auto left-0 translate-x-0 translate-y-0 bottom-0 max-w-full sm:max-w-full w-full rounded-b-none rounded-t-xl max-h-[85dvh] overflow-y-auto pb-[env(safe-area-inset-bottom)]":"sm:max-w-180",children:[(0,r.jsx)(C.DialogHeader,{children:(0,r.jsx)(C.DialogTitle,{children:"Choose Avatar"})}),(0,r.jsx)(k,{config:o,layout:l?"vertical":"horizontal",onChange:e=>{i(e),n(e)},mobile:l}),l&&(0,r.jsx)("button",{type:"button",onClick:()=>s(!1),className:"w-full rounded-xl bg-primary py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:"Done"})]})]})}],108772),e.s([],400175)},952003,e=>{"use strict";let r=(0,e.i(706875).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,r],952003)},575607,e=>{"use strict";var r=e.i(29512);e.s(["Check",()=>r.default])},208020,(e,r,t)=>{r.exports=e.r(170928)},706875,e=>{"use strict";var r=e.i(298699);let t=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),n=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,r.createContext)({}),o=(0,r.forwardRef)(({color:e,size:n,strokeWidth:o,absoluteStrokeWidth:i,className:l="",children:d,iconNode:c,...u},f)=>{let{size:x=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:p="currentColor",className:g=""}=(0,r.useContext)(s)??{},b=i??m?24*Number(o??h)/Number(n??x):o??h;return(0,r.createElement)("svg",{ref:f,...a,width:n??x??a.width,height:n??x??a.height,stroke:e??p,strokeWidth:b,className:t("lucide",g,l),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(d)?d:[d]])});e.s(["default",0,(e,a)=>{let s=(0,r.forwardRef)(({className:s,...i},l)=>(0,r.createElement)(o,{ref:l,iconNode:a,className:t(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...i}));return s.displayName=n(e),s}],706875)},616117,484665,e=>{"use strict";e.i(459119);var r=e.i(298699),t=e.i(92615),n=e.i(773825),a=e.i(389068),s=e.i(943891),o=e.i(398258);let i=r.createContext(void 0);function l(e=!1){let t=r.useContext(i);if(void 0===t&&!e)throw Error((0,o.default)(16));return t}function d(e){return(0,t.isHTMLElement)(e)&&"BUTTON"===e.tagName}e.s(["CompositeRootContext",0,i,"useCompositeRootContext",0,l],484665),e.s(["useButton",0,function(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:i=0,native:c=!0,composite:u}=e,f=r.useRef(null),x=l(!0),h=u??void 0!==x,{props:m}=function(e){let{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:s=0,isNativeButton:o}=e,i=a&&!1!==t,l=a&&!1===t;return{props:r.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return a||(e.tabIndex=s,!o&&n&&(e.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(e["aria-disabled"]=n),o&&(!t||l)&&(e.disabled=n),e},[a,n,t,i,l,o,s])}}({focusableWhenDisabled:o,disabled:t,composite:h,tabIndex:i,isNativeButton:c}),p=r.useCallback(()=>{let e=f.current;d(e)&&h&&t&&void 0===m.disabled&&e.disabled&&(e.disabled=!1)},[t,m.disabled,h]);return(0,a.useIsoLayoutEffect)(p,[p]),{getButtonProps:r.useCallback((e={})=>{let{onClick:r,onMouseDown:n,onKeyUp:a,onKeyDown:o,onPointerDown:i,...l}=e,u=c?"button":void 0;return(0,s.mergeProps)({type:u,onClick(e){t?e.preventDefault():r?.(e)},onMouseDown(e){t||n?.(e)},onKeyDown(e){var n;if(t||((0,s.makeEventPreventable)(e),o?.(e),e.baseUIHandlerPrevented))return;let a=e.target===e.currentTarget,i=e.currentTarget,l=d(i),u=!c&&(n=i,!!(n?.tagName==="A"&&n?.href)),f=a&&(c?l:!u),x="Enter"===e.key,m=" "===e.key,p=i.getAttribute("role"),g=p?.startsWith("menuitem")||"option"===p||"gridcell"===p;if(a&&h&&m){if(e.defaultPrevented&&g)return;e.preventDefault(),u||c&&l?(i.click(),e.preventBaseUIHandler()):f&&(r?.(e),e.preventBaseUIHandler());return}f&&(!c&&(m||x)&&e.preventDefault(),!c&&x&&r?.(e))},onKeyUp(e){t||(((0,s.makeEventPreventable)(e),a?.(e),e.target===e.currentTarget&&c&&h&&d(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||c||h||" "!==e.key||r?.(e)))},onPointerDown(e){t?e.preventDefault():i?.(e)}},c?void 0:{role:"button"},m,l)},[t,m,h,c]),buttonRef:(0,n.useStableCallback)(e=>{f.current=e,p()})}}],616117)},294237,e=>{"use strict";var r=e.i(7284);let t=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=r.clsx;e.s(["cva",0,(e,r)=>a=>{var s;if((null==r?void 0:r.variants)==null)return n(e,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:o,defaultVariants:i}=r,l=Object.keys(o).map(e=>{let r=null==a?void 0:a[e],n=null==i?void 0:i[e];if(null===r)return null;let s=t(r)||t(n);return o[e][s]}),d=a&&Object.entries(a).reduce((e,r)=>{let[t,n]=r;return void 0===n||(e[t]=n),e},{});return n(e,l,null==r||null==(s=r.compoundVariants)?void 0:s.reduce((e,r)=>{let{class:t,className:n,...a}=r;return Object.entries(a).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):({...i,...d})[r]===t})?[...e,t,n]:e},[]),null==a?void 0:a.class,null==a?void 0:a.className)}])},186339,e=>{"use strict";var r=e.i(368075);e.i(459119);var t=e.i(298699),n=e.i(616117),a=e.i(597849);let s=t.forwardRef(function(e,r){let{render:t,className:s,disabled:o=!1,focusableWhenDisabled:i=!1,nativeButton:l=!0,style:d,...c}=e,{getButtonProps:u,buttonRef:f}=(0,n.useButton)({disabled:o,focusableWhenDisabled:i,native:l});return(0,a.useRenderElement)("button",e,{state:{disabled:o},ref:[r,f],props:[c,u]})});var o=e.i(294237),i=e.i(613349);let l=(0,o.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:t="default",size:n="default",...a}){return(0,r.jsx)(s,{"data-slot":"button",className:(0,i.cn)(l({variant:t,size:n,className:e})),...a})},"buttonVariants",0,l],186339)},29512,e=>{"use strict";let r=(0,e.i(706875).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,r])},858924,e=>{"use strict";let r=(0,e.i(706875).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,r],858924)},972248,e=>{"use strict";let r=(0,e.i(706875).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",0,r],972248)},934351,e=>{"use strict";var r=e.i(368075),t=e.i(613349);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,r.jsx)("div",{"data-slot":"card","data-size":n,className:(0,t.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-action",className:(0,t.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,t.cn)("px-4 group-data-[size=sm]/card:px-3",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,t.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,t.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},784371,e=>{"use strict";var r=e.i(298699),t=e.i(613349);function n(){let[e,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{n((0,t.isLocalMode)())},[]),e}e.s(["useCliCmd",0,function(){return n()?"npx @alook/app cli":"npx @alook/cli"},"useIsLocalMode",0,n])},371406,e=>{"use strict";var r=e.i(368075),t=e.i(298699),n=e.i(186339),a=e.i(575607),s=e.i(880932),o=e.i(784371);function i({step:e,completed:t}){return t?(0,r.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-emerald-500 text-white transition-all duration-300",children:(0,r.jsx)(a.Check,{className:"size-3",strokeWidth:3})}):(0,r.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-foreground text-background text-xs font-semibold",children:e})}e.s(["ConnectMachineSteps",0,function({generatedToken:e,generatingToken:a,onGenerateToken:l,registered:d}){let c=(0,t.useRef)(!1),u=(0,o.useCliCmd)();(0,t.useEffect)(()=>{e||a||c.current||(c.current=!0,l())},[e,a,l]);let f=()=>{navigator.clipboard.writeText(`${u} register --token ${e}`),s.toast.success("Copied to clipboard")},x=`${u} daemon start`,h=()=>{navigator.clipboard.writeText(x),s.toast.success("Copied to clipboard")};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,r.jsx)(i,{step:1,completed:d}),"Register your CLI",d&&(0,r.jsx)("span",{className:"text-xs text-emerald-500 font-normal",children:"Done"})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"Run this in your terminal to link your machine."}),a?(0,r.jsx)("div",{className:"pl-7",children:(0,r.jsx)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground animate-pulse",children:"Generating token..."})}):e?(0,r.jsxs)("div",{className:"pl-7 space-y-2",children:[(0,r.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors break-all",onClick:f,title:"Click to copy",children:[u," register --token"," ",(0,r.jsx)("span",{className:"text-foreground/70",children:e})]}),!d&&(0,r.jsx)(n.Button,{size:"sm",onClick:f,className:"w-full",children:"Copy Command"})]}):null]}),(0,r.jsxs)("div",{className:`space-y-2 transition-opacity duration-300 ${!d?"opacity-40 pointer-events-none":""}`,children:[(0,r.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,r.jsx)(i,{step:2,completed:!1}),"Start the daemon"]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"The daemon connects your local agents to Alook."}),(0,r.jsx)("div",{className:"ml-7 rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:h,title:"Click to copy",children:x}),d&&(0,r.jsx)("div",{className:"pl-7",children:(0,r.jsx)(n.Button,{size:"sm",onClick:h,className:"w-full",children:"Copy Command"})})]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,642342,e=>{"use strict";var r=e.i(459119),t=e.i(298699);let n=(0,e.i(613349).isLocalMode)(),a=Number(r.default.env.NEXT_PUBLIC_WS_DO_PORT)||8789,s=Number(r.default.env.NEXT_PUBLIC_WS_RECONNECT_DELAY_MS)||1e3,o=Number(r.default.env.NEXT_PUBLIC_WS_RECONNECT_MAX_DELAY_MS)||3e4;e.s(["useUserWs",0,function(e){let r=(0,t.useRef)(null),i=(0,t.useRef)(s),l=(0,t.useRef)(e),d=(0,t.useRef)(null);(0,t.useEffect)(()=>{l.current=e},[e]);let c=(0,t.useRef)(null),u=(0,t.useCallback)(()=>{let e=Math.min(i.current,o);i.current=Math.min(2*e,o),d.current=setTimeout(()=>{c.current?.()},e+500*Math.random())},[]),f=(0,t.useCallback)(async()=>{let e,t,o;try{let r=await fetch("/api/ws/token");if(!r.ok){console.warn("[ws] token fetch failed:",r.status),u();return}let n=await r.json();e=n.userId,t=n.token}catch(e){console.warn("[ws] token fetch error:",e),u();return}let d=n?`ws://localhost:${a}/?userId=${e}`:`${location.origin.replace("http","ws")}/api/ws/user?userId=${e}`;try{o=new WebSocket(d)}catch(e){console.warn("[ws] WebSocket creation failed:",e),u();return}r.current=o,o.onopen=()=>{i.current=s,o.send(JSON.stringify({type:"auth",token:t}))},o.onmessage=e=>{try{let r=JSON.parse(e.data);if("auth.ok"===r.type)return;l.current(r)}catch{}},o.onerror=()=>{},o.onclose=()=>{o===r.current&&u()}},[u]);(0,t.useEffect)(()=>{c.current=f},[f]),(0,t.useEffect)(()=>(f(),()=>{null!==d.current&&(clearTimeout(d.current),d.current=null);let e=r.current;r.current=null,e?.close()}),[f])}])},996718,e=>{"use strict";var r=e.i(298699);e.s(["useIsMobile",0,function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 639px)"),r=()=>{t(window.innerWidth<640)};return e.addEventListener("change",r),t(window.innerWidth<640),()=>e.removeEventListener("change",r)},[]),!!e}])},400175,126366,819748,108772,e=>{"use strict";var r=e.i(368075),t=e.i(298699);let n="#27272a",a={fill:"rgba(255,255,255,0.92)",stroke:"rgba(255,255,255,0.95)",strokeWidth:3.5},s=[{name:"Purple",value:"#a855f7",gradient:["#c084fc","#a855f7","#7c3aed"],faceColor:"#2e1065"},{name:"Teal",value:"#14b8a6",gradient:["#5eead4","#14b8a6","#0d9488"],faceColor:"#134e4a"},{name:"Orange",value:"#f97316",gradient:["#fdba74","#f97316","#c2410c"],faceColor:"#7c2d12"},{name:"Blue",value:"#3b82f6",gradient:["#93c5fd","#3b82f6","#1d4ed8"],faceColor:"#1e3a5f"},{name:"Pink",value:"#f472b6",gradient:["#fda4af","#f472b6","#be185d"],faceColor:"#831843"},{name:"Yellow",value:"#eab308",gradient:["#fde047","#eab308","#a16207"],faceColor:"#713f12"},{name:"Green",value:"#22c55e",gradient:["#86efac","#22c55e","#15803d"],faceColor:"#14532d"},{name:"Beige",value:"#d6ccb8",gradient:["#e8e0d4","#d6ccb8","#b8a990"],faceColor:"#57534e"},{name:"Red",value:"#ef4444",gradient:["#fca5a5","#ef4444","#991b1b"],faceColor:"#7f1d1d"},{name:"Lake Blue",value:"#6366f1",gradient:["#a5b4fc","#6366f1","#3730a3"],faceColor:"#312e81"},{name:"Gray",value:"#9ca3af",gradient:["#d4d4d8","#9ca3af","#6b7280"],faceColor:"#374151"},{name:"Deep Purple",value:"#8b5cf6",gradient:["#c4b5fd","#8b5cf6","#5b21b6"],faceColor:"#3b0764"}],o={circle:{name:"Circle",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("circle",{cx:"100",cy:"100",r:"66",...a})},rounded:{name:"Rounded",face:{cx:100,cy:100,w:90},render:()=>(0,r.jsx)("rect",{x:"30",y:"30",width:"140",height:"140",rx:"32",...a})},hexagon:{name:"Hexagon",face:{cx:100,cy:100,w:86},render:()=>(0,r.jsx)("path",{d:"M100 32 C108 32 114 35 120 39 L155 60 C161 64 165 70 165 78 L165 122 C165 130 161 136 155 140 L120 161 C114 165 108 168 100 168 C92 168 86 165 80 161 L45 140 C39 136 35 130 35 122 L35 78 C35 70 39 64 45 60 L80 39 C86 35 92 32 100 32 Z",...a})},task:{name:"Task",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("rect",{x:"34",y:"34",width:"132",height:"132",rx:"24",...a})},book:{name:"Book",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("path",{d:"M42 162 L42 88 C42 54 68 34 100 34 C132 34 158 54 158 88 L158 162 C158 166 154 170 150 170 L50 170 C46 170 42 166 42 162 Z",...a})},mail:{name:"Mail",face:{cx:100,cy:100,w:86},render:()=>(0,r.jsx)("rect",{x:"28",y:"54",width:"144",height:"92",rx:"46",...a})},calendar:{name:"Calendar",face:{cx:100,cy:100,w:80},render:()=>(0,r.jsx)("path",{d:"M100 34 C138 34 166 52 166 80 C166 94 158 106 158 118 C158 148 138 166 100 166 C62 166 42 148 42 118 C42 106 34 94 34 80 C34 52 62 34 100 34 Z",...a})},bulb:{name:"Bulb",face:{cx:100,cy:104,w:76},render:()=>(0,r.jsx)("ellipse",{cx:"100",cy:"104",rx:"58",ry:"66",...a})},folder:{name:"Folder",face:{cx:102,cy:108,w:80},render:()=>(0,r.jsx)("path",{d:"M62 144 C40 144 32 128 36 116 C32 104 40 90 54 88 C56 72 70 60 88 62 C100 50 118 50 132 58 C144 52 162 60 162 76 C172 82 174 98 166 108 C172 120 164 136 150 140 Z",...a})},mountain:{name:"Mountain",face:{cx:100,cy:100,w:76},render:()=>(0,r.jsx)("path",{d:"M92 36 C120 32 156 48 164 78 C172 108 156 148 124 160 C92 172 48 156 38 124 C28 92 62 40 92 36 Z",...a})}},i=Object.keys(o),l={dot:{name:"Dot",render:(e=n)=>(0,r.jsx)("circle",{cx:"0",cy:"0",r:"4.5",fill:e})},dash:{name:"Dash",render:(e=n)=>(0,r.jsx)("line",{x1:"-10",y1:"0",x2:"10",y2:"0",stroke:e,strokeWidth:"5",strokeLinecap:"round"})},hookL:{name:"Hook",render:(e=n)=>(0,r.jsx)("path",{d:"M-11 0 Q-5.5 7 0 1.5 Q5.5 7 11 0",fill:"none",stroke:e,strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})},smile:{name:"Smile",render:(e=n)=>(0,r.jsx)("path",{d:"M-11 0 Q0 11 11 0",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"})},caret:{name:"Caret",render:(e=n)=>(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{d:"M-10 0 Q0 8 10 0",fill:"none",stroke:e,strokeWidth:"4.5",strokeLinecap:"round"}),(0,r.jsx)("ellipse",{cx:"3",cy:"6",rx:"4",ry:"4.5",fill:"#f472b6"})]})},arrow:{name:"Arrow",render:(e=n)=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"6",ry:"7.5",fill:e})},oh:{name:"o",render:(e=n)=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"7",ry:"7.5",fill:"none",stroke:e,strokeWidth:"4.5"})}},d=Object.keys(l),c=(e,t)=>{let a=t??e,s=(t,s=n)=>(0,r.jsxs)("g",{children:[(0,r.jsx)("g",{transform:`translate(${-t}, 0)`,children:e(s)}),(0,r.jsx)("g",{transform:`translate(${t}, 0)`,children:a(s)})]});return s.displayName="EyePair",s},u={dots:{name:"Dots",render:c(e=>(0,r.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:e}))},big:{name:"Big",render:c(e=>(0,r.jsxs)("g",{children:[(0,r.jsx)("circle",{cx:"0",cy:"0",r:"10",fill:e}),(0,r.jsx)("circle",{cx:"2.5",cy:"-3",r:"3.5",fill:"rgba(255,255,255,0.9)"})]}))},rings:{name:"Rings",render:c(e=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:"none",stroke:e,strokeWidth:"4.5"}))},arches:{name:"Arches",render:c(e=>(0,r.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},lines:{name:"Lines",render:c(e=>(0,r.jsx)("path",{d:"M-10 0 Q0 -6 10 0",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},happy:{name:"Happy",render:c(e=>(0,r.jsx)("path",{d:"M-10 5 Q0 -11 10 5",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},sleepy:{name:"Sleepy",render:c(e=>(0,r.jsx)("path",{d:"M-10 -2 Q0 8 10 -2",fill:"none",stroke:e,strokeWidth:"5",strokeLinecap:"round"}))},shy:{name:"Shy",render:c(e=>(0,r.jsx)("ellipse",{cx:"0",cy:"0",rx:"8.5",ry:"9.5",fill:e}))},wink:{name:"Wink",render:(e,t=n)=>(0,r.jsxs)("g",{children:[(0,r.jsx)("g",{transform:`translate(${-e}, 0)`,children:(0,r.jsx)("circle",{cx:"0",cy:"0",r:"7",fill:t})}),(0,r.jsx)("g",{transform:`translate(${e}, 0)`,children:(0,r.jsx)("path",{d:"M-10 2 Q0 -9 10 2",fill:"none",stroke:t,strokeWidth:"5",strokeLinecap:"round"})})]})}},f=Object.keys(u),x={shape:"book",eye:"happy",nose:"dash",bg:1},h=[{name:"Task",config:{shape:"task",nose:"dot",eye:"dots",bg:0}},{name:"Notes",config:{shape:"book",nose:"dash",eye:"happy",bg:1}},{name:"Mail",config:{shape:"mail",nose:"smile",eye:"dots",bg:3}},{name:"Schedule",config:{shape:"calendar",nose:"dot",eye:"dots",bg:4}},{name:"Idea",config:{shape:"bulb",nose:"oh",eye:"rings",bg:5}},{name:"Project",config:{shape:"folder",nose:"dash",eye:"lines",bg:7}},{name:"Goal",config:{shape:"mountain",nose:"caret",eye:"arches",bg:8}},{name:"Dream",config:{shape:"circle",nose:"smile",eye:"shy",bg:11}},{name:"Organize",config:{shape:"rounded",nose:"dot",eye:"sleepy",bg:6}},{name:"Explore",config:{shape:"hexagon",nose:"hookL",eye:"wink",bg:9}},{name:"Focus",config:{shape:"task",nose:"caret",eye:"lines",bg:2}},{name:"Collect",config:{shape:"book",nose:"oh",eye:"rings",bg:10}}];function m(e){return e[Math.floor(Math.random()*e.length)]}function p(){return{shape:m(i),eye:m(f),nose:m(d),bg:Math.floor(Math.random()*s.length)}}function g({config:e,size:n=200,className:a}){let i=(0,t.useId)().replace(/:/g,""),d=o[e.shape]??o.book,c=u[e.eye],f=l[e.nose],x=s[e.bg]??s[0],[h,m,p]=x.gradient,b=x.faceColor,{cx:v,cy:y,w:j}=d.face,k=Math.max(13,.24*j),C=y-Math.max(12,.16*j);return(0,r.jsxs)("svg",{viewBox:"0 0 200 200",width:n,height:n,className:a,style:{display:"block"},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:`bg-${i}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:h}),(0,r.jsx)("stop",{offset:"50%",stopColor:m}),(0,r.jsx)("stop",{offset:"100%",stopColor:p})]}),(0,r.jsxs)("radialGradient",{id:`gl-${i}`,cx:"30%",cy:"25%",r:"60%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"rgba(255,255,255,0.32)"}),(0,r.jsx)("stop",{offset:"100%",stopColor:"rgba(255,255,255,0)"})]}),(0,r.jsx)("filter",{id:`sh-${i}`,x:"-10%",y:"-5%",width:"120%",height:"130%",children:(0,r.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"4",floodColor:"rgba(0,0,0,0.18)"})})]}),(0,r.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#bg-${i})`}),(0,r.jsx)("rect",{x:"0",y:"0",width:"200",height:"200",rx:"56",fill:`url(#gl-${i})`}),(0,r.jsxs)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:[(0,r.jsx)("g",{"data-avatar-shape":"",filter:`url(#sh-${i})`,children:d.render()}),c&&(0,r.jsx)("g",{transform:`translate(${v}, ${C})`,children:(0,r.jsx)("g",{"data-avatar-eyes":"",children:c.render(k,b)})}),f&&(0,r.jsx)("g",{transform:`translate(${v}, ${y+7})`,children:(0,r.jsx)("g",{"data-avatar-nose":"",children:f.render(b)})})]})]})}let b="avatar:";e.s(["AvatarRenderer",0,g,"BG_COLORS",0,s,"DEFAULT_CONFIG",0,x,"EYE_KEYS",0,f,"Eyes",0,u,"NOSE_KEYS",0,d,"Noses",0,l,"PRESETS",0,h,"SHAPE_KEYS",0,i,"Shapes",0,o,"parseAvatarUrl",0,function(e){if(!e||!e.startsWith(b))return null;try{let r=JSON.parse(e.slice(b.length));if("object"==typeof r&&null!==r&&"string"==typeof r.shape&&"string"==typeof r.eye&&"string"==typeof r.nose&&"number"==typeof r.bg)return r;if("object"==typeof r&&null!==r&&"outline"in r)return x;return null}catch{return null}},"randomConfig",0,p,"serializeAvatarConfig",0,function(e){return b+JSON.stringify(e)}],126366);let v=["avatar-anim-shape-bounce","avatar-anim-head-tilt","avatar-anim-shake","avatar-anim-wobble","avatar-anim-pulse","avatar-anim-spin","avatar-anim-jelly","avatar-anim-float","avatar-anim-nod"];e.s(["AnimatedAvatar",0,function({config:e,size:n,className:a,isHovered:s,isWorking:o}){let[i,l]=(0,t.useState)(null),d=(0,t.useRef)(-1);function c(){let e=Math.floor(Math.random()*v.length);return e===d.current&&(e=(e+1)%v.length),d.current=e,v[e]}return(0,t.useEffect)(()=>{s?l(c()):o||l(null)},[s,o]),(0,t.useEffect)(()=>{if(!o){s||l(null);return}l(c());let e=setInterval(()=>{l(c())},4e3);return()=>clearInterval(e)},[s,o]),(0,r.jsx)("div",{className:i??void 0,children:(0,r.jsx)(g,{config:e,size:n,className:a})})}],819748);var y=e.i(613349);function j({label:e,keys:t,value:n,onChange:a,renderThumb:s,mobile:o=!1}){let i=t.indexOf(n),l=e=>a(t[(i+e+t.length)%t.length]),d=t[(i-1+t.length)%t.length],c=t[(i+1)%t.length];return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-12 text-xs font-medium text-muted-foreground shrink-0",children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>l(-1),className:(0,y.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",o?"size-10":"size-7"),children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,r.jsx)("path",{d:"M15 5 L8 12 L15 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,r.jsxs)("div",{className:"flex items-center gap-1 flex-1 justify-center",children:[(0,r.jsx)("button",{type:"button",onClick:()=>l(-1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:s(d)}),(0,r.jsx)("button",{type:"button",onClick:()=>l(1),className:"border-2 border-primary rounded-lg p-0.5",children:s(n)}),(0,r.jsx)("button",{type:"button",onClick:()=>l(1),className:"opacity-30 hover:opacity-60 transition-opacity",tabIndex:-1,children:s(c)})]}),(0,r.jsx)("button",{type:"button",onClick:()=>l(1),className:(0,y.cn)("flex items-center justify-center rounded-md hover:bg-accent transition-colors",o?"size-10":"size-7"),children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",children:(0,r.jsx)("path",{d:"M9 5 L16 12 L9 19",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function k({config:e,onChange:n,layout:a="vertical",mobile:c=!1}){let[x,m]=(0,t.useState)("presets"),b=(0,t.useCallback)((r,t)=>{n({...e,[r]:t})},[e,n]),[v,C]=(0,t.useState)(!1),w=(0,t.useRef)(e);(0,t.useEffect)(()=>{if(w.current.shape!==e.shape||w.current.eye!==e.eye||w.current.nose!==e.nose||w.current.bg!==e.bg){C(!0);let r=setTimeout(()=>C(!1),450);return w.current=e,()=>clearTimeout(r)}},[e]),(0,t.useEffect)(()=>{if("horizontal"!==a)return;let e=e=>{"Space"===e.code&&e.target===document.body&&(e.preventDefault(),n(p()))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a,n]);let N="horizontal"===a,L=N?220:c?120:160,z=(0,r.jsxs)("div",{className:(0,y.cn)("flex flex-col items-center gap-3 rounded-2xl bg-muted/30",c?"p-3":"p-4",N?"w-70 shrink-0 justify-center":""),children:[(0,r.jsx)("div",{className:(0,y.cn)("rounded-2xl",v&&"animate-[shake_0.45s_cubic-bezier(.36,.07,.19,.97)]"),children:(0,r.jsx)(g,{config:e,size:L})}),(0,r.jsxs)("button",{type:"button",onClick:()=>n(p()),className:"inline-flex items-center gap-2 rounded-full bg-foreground px-4 py-1.5 text-sm font-medium text-background hover:bg-foreground/80 transition-colors",children:[(0,r.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"3"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"8",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8",cy:"16",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"16",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"})]}),"Random",N&&(0,r.jsx)("kbd",{className:"ml-1 rounded bg-background/20 px-1.5 py-0.5 text-[10px] font-mono",children:"Space"})]})]}),E=(0,r.jsxs)("div",{className:(0,y.cn)("flex flex-col gap-3 flex-1 min-w-0",N&&"rounded-2xl bg-muted/30 p-4 h-95"),children:[(0,r.jsxs)("div",{className:"flex border-b border-border",children:[(0,r.jsx)("button",{type:"button",onClick:()=>m("presets"),className:(0,y.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","presets"===x?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"★ Presets"}),(0,r.jsx)("button",{type:"button",onClick:()=>m("custom"),className:(0,y.cn)("flex-1 pb-2 text-sm font-medium text-center transition-colors border-b-2","custom"===x?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"⚙ Custom"})]}),(0,r.jsxs)("div",{className:(0,y.cn)("flex-1 min-h-0",N&&"overflow-y-auto thin-scrollbar"),children:["presets"===x&&(0,r.jsx)("div",{className:(0,y.cn)("grid gap-2",c?"grid-cols-3":"grid-cols-4"),children:h.map(t=>{let a=t.config.shape===e.shape&&t.config.eye===e.eye&&t.config.nose===e.nose&&t.config.bg===e.bg;return(0,r.jsx)("button",{type:"button",onClick:()=>n(t.config),className:(0,y.cn)("flex items-center justify-center rounded-xl border p-2 transition-all",a?"border-primary border-2 bg-primary/5 shadow-sm":"border-border bg-background hover:border-primary/40"),children:(0,r.jsx)(g,{config:t.config,size:56})},t.name)})}),"custom"===x&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(j,{label:"Shape",keys:i,value:e.shape,onChange:e=>b("shape",e),renderThumb:e=>(0,r.jsxs)("svg",{viewBox:"0 0 200 200",width:"40",height:"40",children:[(0,r.jsx)("rect",{width:"200",height:"200",rx:"56",fill:"hsl(var(--muted))"}),(0,r.jsx)("g",{transform:"translate(100,100) scale(0.8) translate(-100,-100)",children:o[e]?.render()})]}),mobile:c}),(0,r.jsx)(j,{label:"Nose",keys:d,value:e.nose,onChange:e=>b("nose",e),renderThumb:e=>(0,r.jsx)("svg",{viewBox:"-14 -10 28 20",width:"36",height:"24",children:l[e]?.render("currentColor")}),mobile:c}),(0,r.jsx)(j,{label:"Eyes",keys:f,value:e.eye,onChange:e=>b("eye",e),renderThumb:e=>(0,r.jsx)("svg",{viewBox:"-18 -10 36 20",width:"44",height:"24",children:u[e]?.render(8,"currentColor")}),mobile:c}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Color"}),(0,r.jsx)("div",{className:(0,y.cn)("flex flex-wrap p-1",c?"gap-3":"gap-2"),children:s.map((t,n)=>(0,r.jsx)("button",{type:"button",onClick:()=>b("bg",n),title:t.name,className:(0,y.cn)("rounded-full transition-shadow",c?"size-8":"size-7",e.bg===n?"ring-2 ring-primary ring-offset-2":"ring-1 ring-border"),style:{background:`linear-gradient(135deg, ${t.gradient[0]}, ${t.gradient[1]}, ${t.gradient[2]})`}},t.value))})]})]})]})]});return N?(0,r.jsxs)("div",{className:"flex gap-4",children:[z,E]}):(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[z,E]})}var C=e.i(779646),w=e.i(996718);e.s(["AvatarPickerDialog",0,function({config:e,onChange:n}){let[a,s]=(0,t.useState)(!1),[o,i]=(0,t.useState)(e),l=(0,w.useIsMobile)();return(0,r.jsxs)(C.Dialog,{open:a,onOpenChange:r=>{r&&i(e),s(r)},children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(C.DialogTrigger,{render:(0,r.jsx)("button",{type:"button",className:"rounded-2xl bg-background p-1.5 shadow-sm border border-border hover:border-primary/40 transition-colors cursor-pointer"}),children:(0,r.jsx)(g,{config:e,size:80})})}),(0,r.jsxs)(C.DialogContent,{className:l?"top-auto left-0 translate-x-0 translate-y-0 bottom-0 max-w-full sm:max-w-full w-full rounded-b-none rounded-t-xl max-h-[85dvh] overflow-y-auto pb-[env(safe-area-inset-bottom)]":"sm:max-w-180",children:[(0,r.jsx)(C.DialogHeader,{children:(0,r.jsx)(C.DialogTitle,{children:"Choose Avatar"})}),(0,r.jsx)(k,{config:o,layout:l?"vertical":"horizontal",onChange:e=>{i(e),n(e)},mobile:l}),l&&(0,r.jsx)("button",{type:"button",onClick:()=>s(!1),className:"w-full rounded-xl bg-primary py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:"Done"})]})]})}],108772),e.s([],400175)},952003,e=>{"use strict";let r=(0,e.i(706875).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,r],952003)},575607,e=>{"use strict";var r=e.i(29512);e.s(["Check",()=>r.default])},208020,(e,r,t)=>{r.exports=e.r(170928)},706875,e=>{"use strict";var r=e.i(298699);let t=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),n=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,r.createContext)({}),o=(0,r.forwardRef)(({color:e,size:n,strokeWidth:o,absoluteStrokeWidth:i,className:l="",children:d,iconNode:c,...u},f)=>{let{size:x=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:p="currentColor",className:g=""}=(0,r.useContext)(s)??{},b=i??m?24*Number(o??h)/Number(n??x):o??h;return(0,r.createElement)("svg",{ref:f,...a,width:n??x??a.width,height:n??x??a.height,stroke:e??p,strokeWidth:b,className:t("lucide",g,l),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(d)?d:[d]])});e.s(["default",0,(e,a)=>{let s=(0,r.forwardRef)(({className:s,...i},l)=>(0,r.createElement)(o,{ref:l,iconNode:a,className:t(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...i}));return s.displayName=n(e),s}],706875)},616117,484665,e=>{"use strict";e.i(459119);var r=e.i(298699),t=e.i(92615),n=e.i(773825),a=e.i(389068),s=e.i(943891),o=e.i(398258);let i=r.createContext(void 0);function l(e=!1){let t=r.useContext(i);if(void 0===t&&!e)throw Error((0,o.default)(16));return t}function d(e){return(0,t.isHTMLElement)(e)&&"BUTTON"===e.tagName}e.s(["CompositeRootContext",0,i,"useCompositeRootContext",0,l],484665),e.s(["useButton",0,function(e={}){let{disabled:t=!1,focusableWhenDisabled:o,tabIndex:i=0,native:c=!0,composite:u}=e,f=r.useRef(null),x=l(!0),h=u??void 0!==x,{props:m}=function(e){let{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:s=0,isNativeButton:o}=e,i=a&&!1!==t,l=a&&!1===t;return{props:r.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return a||(e.tabIndex=s,!o&&n&&(e.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(e["aria-disabled"]=n),o&&(!t||l)&&(e.disabled=n),e},[a,n,t,i,l,o,s])}}({focusableWhenDisabled:o,disabled:t,composite:h,tabIndex:i,isNativeButton:c}),p=r.useCallback(()=>{let e=f.current;d(e)&&h&&t&&void 0===m.disabled&&e.disabled&&(e.disabled=!1)},[t,m.disabled,h]);return(0,a.useIsoLayoutEffect)(p,[p]),{getButtonProps:r.useCallback((e={})=>{let{onClick:r,onMouseDown:n,onKeyUp:a,onKeyDown:o,onPointerDown:i,...l}=e,u=c?"button":void 0;return(0,s.mergeProps)({type:u,onClick(e){t?e.preventDefault():r?.(e)},onMouseDown(e){t||n?.(e)},onKeyDown(e){var n;if(t||((0,s.makeEventPreventable)(e),o?.(e),e.baseUIHandlerPrevented))return;let a=e.target===e.currentTarget,i=e.currentTarget,l=d(i),u=!c&&(n=i,!!(n?.tagName==="A"&&n?.href)),f=a&&(c?l:!u),x="Enter"===e.key,m=" "===e.key,p=i.getAttribute("role"),g=p?.startsWith("menuitem")||"option"===p||"gridcell"===p;if(a&&h&&m){if(e.defaultPrevented&&g)return;e.preventDefault(),u||c&&l?(i.click(),e.preventBaseUIHandler()):f&&(r?.(e),e.preventBaseUIHandler());return}f&&(!c&&(m||x)&&e.preventDefault(),!c&&x&&r?.(e))},onKeyUp(e){t||(((0,s.makeEventPreventable)(e),a?.(e),e.target===e.currentTarget&&c&&h&&d(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||c||h||" "!==e.key||r?.(e)))},onPointerDown(e){t?e.preventDefault():i?.(e)}},c?void 0:{role:"button"},m,l)},[t,m,h,c]),buttonRef:(0,n.useStableCallback)(e=>{f.current=e,p()})}}],616117)},294237,e=>{"use strict";var r=e.i(7284);let t=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=r.clsx;e.s(["cva",0,(e,r)=>a=>{var s;if((null==r?void 0:r.variants)==null)return n(e,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:o,defaultVariants:i}=r,l=Object.keys(o).map(e=>{let r=null==a?void 0:a[e],n=null==i?void 0:i[e];if(null===r)return null;let s=t(r)||t(n);return o[e][s]}),d=a&&Object.entries(a).reduce((e,r)=>{let[t,n]=r;return void 0===n||(e[t]=n),e},{});return n(e,l,null==r||null==(s=r.compoundVariants)?void 0:s.reduce((e,r)=>{let{class:t,className:n,...a}=r;return Object.entries(a).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):({...i,...d})[r]===t})?[...e,t,n]:e},[]),null==a?void 0:a.class,null==a?void 0:a.className)}])},186339,e=>{"use strict";var r=e.i(368075);e.i(459119);var t=e.i(298699),n=e.i(616117),a=e.i(597849);let s=t.forwardRef(function(e,r){let{render:t,className:s,disabled:o=!1,focusableWhenDisabled:i=!1,nativeButton:l=!0,style:d,...c}=e,{getButtonProps:u,buttonRef:f}=(0,n.useButton)({disabled:o,focusableWhenDisabled:i,native:l});return(0,a.useRenderElement)("button",e,{state:{disabled:o},ref:[r,f],props:[c,u]})});var o=e.i(294237),i=e.i(613349);let l=(0,o.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:t="default",size:n="default",...a}){return(0,r.jsx)(s,{"data-slot":"button",className:(0,i.cn)(l({variant:t,size:n,className:e})),...a})},"buttonVariants",0,l],186339)},29512,e=>{"use strict";let r=(0,e.i(706875).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,r])},858924,e=>{"use strict";let r=(0,e.i(706875).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,r],858924)},934351,e=>{"use strict";var r=e.i(368075),t=e.i(613349);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,r.jsx)("div",{"data-slot":"card","data-size":n,className:(0,t.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-action",className:(0,t.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,t.cn)("px-4 group-data-[size=sm]/card:px-3",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,t.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,t.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},972248,e=>{"use strict";let r=(0,e.i(706875).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",0,r],972248)},371406,e=>{"use strict";var r=e.i(368075),t=e.i(298699),n=e.i(186339),a=e.i(575607),s=e.i(880932),o=e.i(613349);function i({step:e,completed:t}){return t?(0,r.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-emerald-500 text-white transition-all duration-300",children:(0,r.jsx)(a.Check,{className:"size-3",strokeWidth:3})}):(0,r.jsx)("span",{className:"flex items-center justify-center size-5 rounded-full bg-foreground text-background text-xs font-semibold",children:e})}e.s(["ConnectMachineSteps",0,function({generatedToken:e,generatingToken:a,onGenerateToken:l,registered:d}){let c=(0,t.useRef)(!1);(0,t.useEffect)(()=>{e||a||c.current||(c.current=!0,l())},[e,a,l]);let u=()=>{navigator.clipboard.writeText(`${(0,o.cliCmd)()} register --token ${e}`),s.toast.success("Copied to clipboard")},f=`${(0,o.cliCmd)()} daemon start`,x=()=>{navigator.clipboard.writeText(f),s.toast.success("Copied to clipboard")};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,r.jsx)(i,{step:1,completed:d}),"Register your CLI",d&&(0,r.jsx)("span",{className:"text-xs text-emerald-500 font-normal",children:"Done"})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"Run this in your terminal to link your machine."}),a?(0,r.jsx)("div",{className:"pl-7",children:(0,r.jsx)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground animate-pulse",children:"Generating token..."})}):e?(0,r.jsxs)("div",{className:"pl-7 space-y-2",children:[(0,r.jsxs)("div",{className:"rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors break-all",onClick:u,title:"Click to copy",children:[(0,o.cliCmd)()," register --token"," ",(0,r.jsx)("span",{className:"text-foreground/70",children:e})]}),!d&&(0,r.jsx)(n.Button,{size:"sm",onClick:u,className:"w-full",children:"Copy Command"})]}):null]}),(0,r.jsxs)("div",{className:`space-y-2 transition-opacity duration-300 ${!d?"opacity-40 pointer-events-none":""}`,children:[(0,r.jsxs)("p",{className:"text-sm font-medium flex items-center gap-2",children:[(0,r.jsx)(i,{step:2,completed:!1}),"Start the daemon"]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground pl-7",children:"The daemon connects your local agents to Alook."}),(0,r.jsx)("div",{className:"ml-7 rounded-md bg-muted p-2.5 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:x,title:"Click to copy",children:f}),d&&(0,r.jsx)("div",{className:"pl-7",children:(0,r.jsx)(n.Button,{size:"sm",onClick:x,className:"w-full",children:"Copy Command"})})]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,610580,t=>{"use strict";var e=t.i(298699);let n={};t.s(["useRefWithInit",0,function(t,r){let i=e.useRef(n);return i.current===n&&(i.current=t(r)),i}])},389068,t=>{"use strict";var e=t.i(298699);let n="u">typeof document?e.useLayoutEffect:()=>{};t.s(["useIsoLayoutEffect",0,n])},398258,t=>{"use strict";let e=function(t,...e){let n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",t.toString()),e.forEach(t=>n.searchParams.append("args[]",t)),`Base UI error #${t}; visit ${n} for the full message.`};t.s(["default",0,e])},92615,t=>{"use strict";let e;function n(){return"u">typeof window}function r(t){return o(t)?(t.nodeName||"").toLowerCase():"#document"}function i(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function s(t){var e;return null==(e=(o(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function o(t){return!!n()&&(t instanceof Node||t instanceof i(t).Node)}function u(t){return!!n()&&(t instanceof Element||t instanceof i(t).Element)}function l(t){return!!n()&&(t instanceof HTMLElement||t instanceof i(t).HTMLElement)}function a(t){return!(!n()||"u"<typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof i(t).ShadowRoot)}function c(t){let{overflow:e,overflowX:n,overflowY:r,display:i}=b(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&"inline"!==i&&"contents"!==i}function f(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}let d=/transform|translate|scale|rotate|perspective|filter/,p=/paint|layout|strict|content/,m=t=>!!t&&"none"!==t;function g(t){let e=u(t)?b(t):t;return m(e.transform)||m(e.translate)||m(e.scale)||m(e.rotate)||m(e.perspective)||!h()&&(m(e.backdropFilter)||m(e.filter))||d.test(e.willChange||"")||p.test(e.contain||"")}function h(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function v(t){return/^(html|body|#document)$/.test(r(t))}function b(t){return i(t).getComputedStyle(t)}function y(t){if("html"===r(t))return t;let e=t.assignedSlot||t.parentNode||a(t)&&t.host||s(t);return a(e)?e.host:e}function E(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}t.s(["getComputedStyle",0,b,"getContainingBlock",0,function(t){let e=y(t);for(;l(e)&&!v(e);){if(g(e))return e;if(f(e))break;e=y(e)}return null},"getDocumentElement",0,s,"getFrameElement",0,E,"getNodeName",0,r,"getNodeScroll",0,function(t){return u(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}},"getOverflowAncestors",0,function t(e,n,r){var s;void 0===n&&(n=[]),void 0===r&&(r=!0);let o=function t(e){let n=y(e);return v(n)?e.ownerDocument?e.ownerDocument.body:e.body:l(n)&&c(n)?n:t(n)}(e),u=o===(null==(s=e.ownerDocument)?void 0:s.body),a=i(o);if(!u)return n.concat(o,t(o,[],r));{let e=E(a);return n.concat(a,a.visualViewport||[],c(o)?o:[],e&&r?t(e):[])}},"getParentNode",0,y,"getWindow",0,i,"isContainingBlock",0,g,"isElement",0,u,"isHTMLElement",0,l,"isLastTraversableNode",0,v,"isNode",0,o,"isOverflowElement",0,c,"isShadowRoot",0,a,"isTableElement",0,function(t){return/^(table|td|th)$/.test(r(t))},"isTopLayer",0,f,"isWebKit",0,h])},773825,t=>{"use strict";var e=t.i(298699),n=t.i(610580);let r=e[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],i=r&&r!==e.useLayoutEffect?r:t=>t();function s(){let t={next:void 0,callback:o,trampoline:(...e)=>t.callback?.(...e),effect:()=>{t.callback=t.next}};return t}function o(){}t.s(["useStableCallback",0,function(t){let e=(0,n.useRefWithInit)(s).current;return e.next=t,i(e.effect),e.trampoline}])},128726,t=>{"use strict";let e=Object.freeze([]),n=Object.freeze({});t.s(["EMPTY_ARRAY",0,e,"EMPTY_OBJECT",0,n,"NOOP",0,function(){}])},938593,t=>{"use strict";let e=parseInt(t.i(298699).version,10);t.s(["isReactVersionAtLeast",0,function(t){return e>=t}])},617517,t=>{"use strict";var e=t.i(610580);function n(){return{callback:null,cleanup:null,refs:[]}}function r(t,e){if(t.refs=e,e.every(t=>null==t)){t.callback=null;return}t.callback=n=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),null!=n){let r=Array(e.length).fill(null);for(let t=0;t<e.length;t+=1){let i=e[t];if(null!=i)switch(typeof i){case"function":{let e=i(n);"function"==typeof e&&(r[t]=e);break}case"object":i.current=n}}t.cleanup=()=>{for(let t=0;t<e.length;t+=1){let n=e[t];if(null!=n)switch(typeof n){case"function":{let e=r[t];"function"==typeof e?e():n(null);break}case"object":n.current=null}}}}}}t.s(["useMergedRefs",0,function(t,i,s,o){var u,l,a,c,f;let d=(0,e.useRefWithInit)(n).current;return u=d,l=t,a=i,c=s,f=o,(u.refs[0]!==l||u.refs[1]!==a||u.refs[2]!==c||u.refs[3]!==f)&&r(d,[t,i,s,o]),d.callback},"useMergedRefsN",0,function(t){var i,s;let o=(0,e.useRefWithInit)(n).current;return i=o,s=t,(i.refs.length!==s.length||i.refs.some((t,e)=>t!==s[e]))&&r(o,t),o.callback}])},861645,t=>{"use strict";var e=t.i(298699),n=t.i(938593);t.s(["getReactElementRef",0,function(t){if(!e.isValidElement(t))return null;let r=t.props;return((0,n.isReactVersionAtLeast)(19)?r?.ref:t.ref)??null}])},22560,t=>{"use strict";t.s(["mergeObjects",0,function(t,e){return t&&!e?t:!t&&e?e:t||e?{...t,...e}:void 0}])},656202,t=>{"use strict";t.s(["warn",0,function(){}])},533891,20470,331668,t=>{"use strict";t.s(["getStateAttributesProps",0,function(t,e){let n={};for(let r in t){let i=t[r];if(e?.hasOwnProperty(r)){let t=e[r](i);null!=t&&Object.assign(n,t);continue}!0===i?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}],533891),t.s(["resolveClassName",0,function(t,e){return"function"==typeof t?t(e):t}],20470),t.s(["resolveStyle",0,function(t,e){return"function"==typeof t?t(e):t}],331668)},943891,t=>{"use strict";var e=t.i(22560);let n={};function r(t){return o(t)?{...u(t,n)}:function(t){let e={...t};for(let t in e){let n=e[t];s(t,n)&&(e[t]=l(n))}return e}(t)}function i(t,n){return o(n)?u(n,t):function(t,n){if(!n)return t;for(let r in n){let i=n[r];switch(r){case"style":t[r]=(0,e.mergeObjects)(t.style,i);break;case"className":t[r]=c(t.className,i);break;default:s(r,i)?t[r]=function(t,e){return e?t?(...n)=>{let r=n[0];if(f(r)){a(r);let i=e(...n);return r.baseUIHandlerPrevented||t?.(...n),i}let i=e(...n);return t?.(...n),i}:l(e):t}(t[r],i):t[r]=i}}return t}(t,n)}function s(t,e){let n=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2);return 111===n&&110===r&&i>=65&&i<=90&&("function"==typeof e||void 0===e)}function o(t){return"function"==typeof t}function u(t,e){return o(t)?t(e):t??n}function l(t){return t?(...e)=>{let n=e[0];return f(n)&&a(n),t(...e)}:t}function a(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function c(t,e){return e?t?e+" "+t:e:t}function f(t){return null!=t&&"object"==typeof t&&"nativeEvent"in t}t.s(["makeEventPreventable",0,a,"mergeClassNames",0,c,"mergeProps",0,function(t,e,n,s,o){if(!n&&!s&&!o&&!t)return r(e);let u=r(t);return e&&(u=i(u,e)),n&&(u=i(u,n)),s&&(u=i(u,s)),o&&(u=i(u,o)),u},"mergePropsN",0,function(t){if(0===t.length)return n;if(1===t.length)return r(t[0]);let e=r(t[0]);for(let n=1;n<t.length;n+=1)e=i(e,t[n]);return e}])},597849,t=>{"use strict";var e=t.i(398258),n=t.i(298699),r=t.i(617517),i=t.i(861645),s=t.i(22560);t.i(656202);var o=t.i(128726),u=t.i(533891),l=t.i(20470),a=t.i(331668),c=t.i(943891);let f=Symbol.for("react.lazy");t.s(["useRenderElement",0,function(t,d,p={}){let m=d.render,g=function(t,e={}){var n;let{className:f,style:d,render:p}=t,{state:m=o.EMPTY_OBJECT,ref:g,props:h,stateAttributesMapping:v,enabled:b=!0}=e,y=b?(0,l.resolveClassName)(f,m):void 0,E=b?(0,a.resolveStyle)(d,m):void 0,A=b?(0,u.getStateAttributesProps)(m,v):o.EMPTY_OBJECT,w=b&&h?Array.isArray(n=h)?(0,c.mergePropsN)(n):(0,c.mergeProps)(void 0,n):void 0,S=b?(0,s.mergeObjects)(A,w)??{}:o.EMPTY_OBJECT;return("u">typeof document&&(b?Array.isArray(g)?S.ref=(0,r.useMergedRefsN)([S.ref,(0,i.getReactElementRef)(p),...g]):S.ref=(0,r.useMergedRefs)(S.ref,(0,i.getReactElementRef)(p),g):(0,r.useMergedRefs)(null,null)),b)?(void 0!==y&&(S.className=(0,c.mergeClassNames)(S.className,y)),void 0!==E&&(S.style=(0,s.mergeObjects)(S.style,E)),S):o.EMPTY_OBJECT}(d,p);return!1===p.enabled?null:function(t,r,i,s){if(r){if("function"==typeof r)return r(i,s);let t=(0,c.mergeProps)(i,r.props);t.ref=i.ref;let e=r;return e?.$$typeof===f&&(e=n.Children.toArray(r)[0]),n.cloneElement(e,t)}if(t&&"string"==typeof t){var o,u;return o=t,u=i,"button"===o?(0,n.createElement)("button",{type:"button",...u,key:u.key}):"img"===o?(0,n.createElement)("img",{alt:"",...u,key:u.key}):n.createElement(o,u)}throw Error((0,e.default)(8))}(t,m,g,p.state??o.EMPTY_OBJECT)}])},613349,t=>{"use strict";var e=t.i(7284),n=t.i(479656);t.s(["cn",0,function(...t){return(0,n.twMerge)((0,e.clsx)(t))},"isLocalMode",0,function(){return!!["localhost","127.0.0.1"].includes(window.location.hostname)}])},677320,t=>{"use strict";var e=t.i(92615);t.s(["activeElement",0,function(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e},"contains",0,function(t,n){if(!t||!n)return!1;let r=n.getRootNode?.();if(t.contains(n))return!0;if(r&&(0,e.isShadowRoot)(r)){let e=n;for(;e;){if(t===e)return!0;e=e.parentNode||e.host}}return!1},"getTarget",0,function(t){return"composedPath"in t?t.composedPath()[0]:t.target}])},297099,t=>{"use strict";let e="u">typeof navigator,n=function(){if(!e)return{platform:"",maxTouchPoints:-1};let t=navigator.userAgentData;return t?.platform?{platform:t.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),r=function(){if(!e)return"";let t=navigator.userAgentData;return t?.platform?t.platform:navigator.platform??""}(),i=function(){if(!e)return"";let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:t,version:e})=>`${t}/${e}`).join(" "):navigator.userAgent}(),s="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),o="MacIntel"===n.platform&&n.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(n.platform);e&&/firefox/i.test(i);let u=e&&/apple/i.test(navigator.vendor);e&&/Edg/i.test(i);let l=e&&/android/i.test(r)||/android/i.test(i),a=e&&r.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,c=i.includes("jsdom/");t.s(["isAndroid",0,l,"isIOS",0,o,"isJSDOM",0,c,"isMac",0,a,"isSafari",0,u,"isWebKit",0,s])},658507,t=>{"use strict";var e=t.i(298699);let n=[];t.s(["useOnMount",0,function(t){e.useEffect(t,n)}])},541126,926249,t=>{"use strict";var e=t.i(298699);let n={...e},r=0,i=n.useId;function s(t,n){if(void 0!==i){let e=i();return t??(n?`${n}-${e}`:e)}return function(t,n="mui"){let[i,s]=e.useState(t),o=t||i;return e.useEffect(()=>{null==i&&(r+=1,s(`${n}-${r}`))},[i,n]),o}(t,n)}t.s(["useId",0,s],926249),t.s(["useBaseUiId",0,function(t){return s(t,"base-ui")}],541126)},730310,t=>{"use strict";t.s(["addEventListener",0,function(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}])},385967,t=>{"use strict";var e=t.i(610580),n=t.i(658507);class r{static create(){return new r}currentId=0;start(t,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,e()},t)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}t.s(["Timeout",0,r,"useTimeout",0,function(){let t=(0,e.useRefWithInit)(r.create).current;return(0,n.useOnMount)(t.disposeEffect),t}])},9722,t=>{"use strict";var e=t.i(297099);t.s(["isClickLikeEvent",0,function(t){let e=t.type;return"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e},"isMouseLikePointerType",0,function(t,e){let n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)},"isReactEvent",0,function(t){return"nativeEvent"in t},"isVirtualClick",0,function(t){return""===t.pointerType&&!!t.isTrusted||(e.isAndroid&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)},"isVirtualPointerEvent",0,function(t){return!e.isJSDOM&&(!e.isAndroid&&0===t.width&&0===t.height||e.isAndroid&&1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"===t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail&&"touch"===t.pointerType)},"stopEvent",0,function(t){t.preventDefault(),t.stopPropagation()}])},208700,t=>{"use strict";t.s(["ownerDocument",0,function(t){return t?.ownerDocument||document}])},869576,t=>{"use strict";t.s(["ACTIVE_KEY",0,"active","ARROW_DOWN",0,"ArrowDown","ARROW_LEFT",0,"ArrowLeft","ARROW_RIGHT",0,"ArrowRight","ARROW_UP",0,"ArrowUp","FOCUSABLE_ATTRIBUTE",0,"data-base-ui-focusable","SELECTED_KEY",0,"selected","TYPEABLE_SELECTOR",0,"input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"])},211752,857504,t=>{"use strict";var e=t.i(128726);t.s(["createChangeEventDetails",0,function(t,n,r,i){let s=!1,o=!1,u=i??e.EMPTY_OBJECT;return{reason:t,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:r,...u}}],211752),t.s(["cancelOpen",0,"cancel-open","chipRemovePress",0,"chip-remove-press","clearPress",0,"clear-press","closePress",0,"close-press","closeWatcher",0,"close-watcher","decrementPress",0,"decrement-press","disabled",0,"disabled","drag",0,"drag","escapeKey",0,"escape-key","focusOut",0,"focus-out","imperativeAction",0,"imperative-action","incrementPress",0,"increment-press","inputBlur",0,"input-blur","inputChange",0,"input-change","inputClear",0,"input-clear","inputPaste",0,"input-paste","inputPress",0,"input-press","itemPress",0,"item-press","keyboard",0,"keyboard","linkPress",0,"link-press","listNavigation",0,"list-navigation","none",0,"none","outsidePress",0,"outside-press","pointer",0,"pointer","scrub",0,"scrub","siblingOpen",0,"sibling-open","swipe",0,"swipe","trackPress",0,"track-press","triggerFocus",0,"trigger-focus","triggerHover",0,"trigger-hover","triggerPress",0,"trigger-press","wheel",0,"wheel","windowResize",0,"window-resize"],795610);var n=t.i(795610);t.s(["REASONS",0,n],857504)},729537,t=>{"use strict";var e=t.i(610580),n=t.i(658507);let r=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let e=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<e.length;n+=1)e[n]?.(t)};request(t){let e=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),e}cancel(t){let e=t-this.startId;e<0||e>=this.callbacks.length||(this.callbacks[e]=null,this.callbacksCount-=1)}};class i{static create(){return new i}static request(t){return r.request(t)}static cancel(t){return r.cancel(t)}currentId=null;request(t){this.cancel(),this.currentId=r.request(()=>{this.currentId=null,t()})}cancel=()=>{null!==this.currentId&&(r.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}t.s(["AnimationFrame",0,i,"useAnimationFrame",0,function(){let t=(0,e.useRefWithInit)(i.create).current;return(0,n.useOnMount)(t.disposeEffect),t}])},221995,t=>{"use strict";var e=t.i(298699),n=t.i(389068),r=t.i(729537);t.s(["useTransitionStatus",0,function(t,i=!1,s=!1){let[o,u]=e.useState(t&&i?"idle":void 0),[l,a]=e.useState(t);return t&&!l&&(a(!0),u("starting")),t||!l||"ending"===o||s||u("ending"),t||l||"ending"!==o||u(void 0),(0,n.useIsoLayoutEffect)(()=>{if(!t&&l&&"ending"!==o&&s){let t=r.AnimationFrame.request(()=>{u("ending")});return()=>{r.AnimationFrame.cancel(t)}}},[t,l,o,s]),(0,n.useIsoLayoutEffect)(()=>{if(!t||i)return;let e=r.AnimationFrame.request(()=>{u(void 0)});return()=>{r.AnimationFrame.cancel(e)}},[i,t]),(0,n.useIsoLayoutEffect)(()=>{if(!t||!i)return;t&&l&&"idle"!==o&&u("starting");let e=r.AnimationFrame.request(()=>{u("idle")});return()=>{r.AnimationFrame.cancel(e)}},[i,t,l,o]),{mounted:l,setMounted:a,transitionStatus:o}}])},221022,t=>{"use strict";t.s(["resolveRef",0,function(t){return null==t?t:"current"in t?t.current:t}])},106580,t=>{"use strict";var e;let n=((e={}).startingStyle="data-starting-style",e.endingStyle="data-ending-style",e),r={[n.startingStyle]:""},i={[n.endingStyle]:""};t.s(["TransitionStatusDataAttributes",0,n,"transitionStatusMapping",0,{transitionStatus:t=>"starting"===t?r:"ending"===t?i:null}])},570868,406451,t=>{"use strict";var e=t.i(298699),n=t.i(773825),r=t.i(550008),i=t.i(729537),s=t.i(221022),o=t.i(106580);function u(t,e=!1,l=!0){let a=(0,i.useAnimationFrame)();return(0,n.useStableCallback)((n,i=null)=>{a.cancel();let u=(0,s.resolveRef)(t);if(null==u)return;let c=()=>{r.flushSync(n)};if("function"!=typeof u.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void n();function f(){Promise.all(u.getAnimations().map(t=>t.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(l){i?.aborted||c();return}let t=u.getAnimations();!i?.aborted&&t.length>0&&t.some(t=>t.pending||"finished"!==t.playState)&&f()})}if(e){let t=o.TransitionStatusDataAttributes.startingStyle;if(!u.hasAttribute(t))return void a.request(f);let e=new MutationObserver(()=>{u.hasAttribute(t)||(e.disconnect(),f())});return e.observe(u,{attributes:!0,attributeFilter:[t]}),void i?.addEventListener("abort",()=>e.disconnect(),{once:!0})}a.request(f)})}t.s(["useAnimationsFinished",0,u],406451),t.s(["useOpenChangeComplete",0,function(t){let{enabled:r=!0,open:i,ref:s,onComplete:o}=t,l=(0,n.useStableCallback)(o),a=u(s,i,!1);e.useEffect(()=>{if(!r)return;let t=new AbortController;return a(l,t.signal),()=>{t.abort()}},[r,i,l,a])}],570868)},120480,(t,e,n)=>{"use strict";var r=t.r(298699),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=r.useState,o=r.useEffect,u=r.useLayoutEffect,l=r.useDebugValue;function a(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!i(t,n)}catch(t){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=s({inst:{value:n,getSnapshot:e}}),i=r[0].inst,c=r[1];return u(function(){i.value=n,i.getSnapshot=e,a(i)&&c({inst:i})},[t,n,e]),o(function(){return a(i)&&c({inst:i}),t(function(){a(i)&&c({inst:i})})},[t]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},207102,(t,e,n)=>{"use strict";e.exports=t.r(120480)},641645,t=>{"use strict";let e=["top","right","bottom","left"],n=e.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]),r=Math.min,i=Math.max,s=Math.round,o=Math.floor,u={left:"right",right:"left",bottom:"top",top:"bottom"};function l(t){return t.split("-")[0]}function a(t){return t.split("-")[1]}function c(t){return"x"===t?"y":"x"}function f(t){return"y"===t?"height":"width"}function d(t){let e=t[0];return"t"===e||"b"===e?"y":"x"}function p(t){return c(d(t))}function m(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}let g=["left","right"],h=["right","left"],v=["top","bottom"],b=["bottom","top"];function y(t){let e=l(t);return u[e]+t.slice(e.length)}t.s(["clamp",0,function(t,e,n){return i(t,r(e,n))},"createCoords",0,t=>({x:t,y:t}),"evaluate",0,function(t,e){return"function"==typeof t?t(e):t},"floor",0,o,"getAlignment",0,a,"getAlignmentAxis",0,p,"getAlignmentSides",0,function(t,e,n){void 0===n&&(n=!1);let r=a(t),i=p(t),s=f(i),o="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=y(o)),[o,y(o)]},"getAxisLength",0,f,"getExpandedPlacements",0,function(t){let e=y(t);return[m(t),e,m(e)]},"getOppositeAlignmentPlacement",0,m,"getOppositeAxis",0,c,"getOppositeAxisPlacements",0,function(t,e,n,r){let i=a(t),s=function(t,e,n){switch(t){case"top":case"bottom":if(n)return e?h:g;return e?g:h;case"left":case"right":return e?v:b;default:return[]}}(l(t),"start"===n,r);return i&&(s=s.map(t=>t+"-"+i),e&&(s=s.concat(s.map(m)))),s},"getOppositePlacement",0,y,"getPaddingObject",0,function(t){return"number"!=typeof t?{top:0,right:0,bottom:0,left:0,...t}:{top:t,right:t,bottom:t,left:t}},"getSide",0,l,"getSideAxis",0,d,"max",0,i,"min",0,r,"placements",0,n,"rectToClientRect",0,function(t){let{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}},"round",0,s,"sides",0,e])},845879,t=>{"use strict";var e=t.i(641645),n=t.i(92615),r=t.i(9722),i=t.i(869576);function s(t,e,n){return Math.floor(t/e)!==n}function o(t,e){return e<0||e>=t.length}function u(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let s=e;do s+=n?-i:i;while(s>=0&&s<=t.length-1&&l(t,s,r))return s}function l(t,e,n){if("function"==typeof n?n(e):n?.includes(e)??!1)return!0;let r=t[e];return!!r&&(!a(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function a(t,e=t?(0,n.getComputedStyle)(t):null){var r;return!!t&&!!t.isConnected&&!!e&&"hidden"!==(r=e).visibility&&"collapse"!==r.visibility&&("function"==typeof t.checkVisibility?t.checkVisibility():"none"!==e.display&&"contents"!==e.display)}t.s(["createGridCellMap",0,function(t,e,n){let r=[],i=0;return t.forEach(({width:t,height:s},o)=>{let u=!1;for(n&&(i=0);!u;){let n=[];for(let r=0;r<t;r+=1)for(let t=0;t<s;t+=1)n.push(i+r+t*e);i%e+t<=e&&n.every(t=>null==r[t])?(n.forEach(t=>{r[t]=o}),u=!0):i+=1}}),[...r]},"findNonDisabledListIndex",0,u,"getGridCellIndexOfCorner",0,function(t,e,n,r,i){if(-1===t)return -1;let s=n.indexOf(t),o=e[t];switch(i){case"tl":return s;case"tr":if(!o)return s;return s+o.width-1;case"bl":if(!o)return s;return s+(o.height-1)*r;case"br":return n.lastIndexOf(t);default:return -1}},"getGridCellIndices",0,function(t,e){return e.flatMap((e,n)=>t.includes(e)?[n]:[])},"getGridNavigatedIndex",0,function(t,{event:n,orientation:a,loopFocus:c,onLoop:f,rtl:d,cols:p,disabledIndices:m,minIndex:g,maxIndex:h,prevIndex:v,stopEvent:b=!1}){let y,E=v;if(n.key===i.ARROW_UP?y="up":n.key===i.ARROW_DOWN&&(y="down"),y){let i=[],s=[],a=!1,d=0;{let e=null,n=-1;t.forEach((t,r)=>{if(null==t)return;d+=1;let o=t.closest('[role="row"]');o&&(a=!0),(o!==e||-1===n)&&(e=o,i[n+=1]=[]),i[n].push(r),s[r]=n})}let A=!1,w=0;if(a)for(let t of i){let e=t.length;e>w&&(w=e),e!==p&&(A=!0)}let S=A&&d<t.length,R=w||p;b&&(0,r.stopEvent)(n);let I=(e=>{if(!A||-1===v)return;let r=s[v];if(null==r)return;let o=i[r].indexOf(v),u="up"===e?-1:1;for(let e=r+u,a=0;a<i.length;a+=1,e+=u){if(e<0||e>=i.length){if(!c||S)return;if(e=e<0?i.length-1:0,f){let t=Math.min(o,i[e].length-1);e=s[f(n,v,i[e][t]??i[e][0])]??e}}let r=i[e];for(let e=Math.min(o,r.length-1);e>=0;e-=1){let n=r[e];if(!l(t,n,m))return n}}})(y)??(n=>{if(!S||-1===v)return;let r=v%R,i="up"===n?-R:R,s=h-h%R,o=(0,e.floor)(h/R)+1;for(let e=v-r+i,n=0;n<o;n+=1,e+=i){if(e<0||e>h){if(!c)return;e=e<0?s:0}let n=Math.min(e+R-1,h);for(let i=Math.min(e+r,n);i>=e;i-=1)if(!l(t,i,m))return i}})(y);if(void 0!==I)E=I;else if(-1===v)E="up"===y?h:g;else if(E=u(t,{startingIndex:v,amount:R,decrement:"up"===y,disabledIndices:m}),c){if("up"===y&&(v-R<g||E<0)){let t=v%R,e=h%R,r=h-(e-t);E=e===t?h:e>t?r:r-R,f&&(E=f(n,v,E))}"down"===y&&v+R>h&&(E=u(t,{startingIndex:v%R-R,amount:R,disabledIndices:m}),f&&(E=f(n,v,E)))}o(t,E)&&(E=v)}if("both"===a){let l=(0,e.floor)(v/p);n.key===(d?i.ARROW_LEFT:i.ARROW_RIGHT)&&(b&&(0,r.stopEvent)(n),v%p!=p-1?(E=u(t,{startingIndex:v,disabledIndices:m}),c&&s(E,p,l)&&(E=u(t,{startingIndex:v-v%p-1,disabledIndices:m}),f&&(E=f(n,v,E)))):c&&(E=u(t,{startingIndex:v-v%p-1,disabledIndices:m}),f&&(E=f(n,v,E))),s(E,p,l)&&(E=v)),n.key===(d?i.ARROW_RIGHT:i.ARROW_LEFT)&&(b&&(0,r.stopEvent)(n),v%p!=0?(E=u(t,{startingIndex:v,decrement:!0,disabledIndices:m}),c&&s(E,p,l)&&(E=u(t,{startingIndex:v+(p-v%p),decrement:!0,disabledIndices:m}),f&&(E=f(n,v,E)))):c&&(E=u(t,{startingIndex:v+(p-v%p),decrement:!0,disabledIndices:m}),f&&(E=f(n,v,E))),s(E,p,l)&&(E=v));let a=(0,e.floor)(h/p)===l;o(t,E)&&(c&&a?(E=n.key===(d?i.ARROW_RIGHT:i.ARROW_LEFT)?h:u(t,{startingIndex:v-v%p-1,disabledIndices:m}),f&&(E=f(n,v,E))):E=v)}return E},"getMaxListIndex",0,function(t,e){return u(t.current,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})},"getMinListIndex",0,function(t,e){return u(t.current,{disabledIndices:e})},"isElementVisible",0,a,"isIndexOutOfListBounds",0,o,"isListIndexDisabled",0,l])},191760,t=>{"use strict";var e=t.i(938593);t.s(["inertValue",0,function(t){return(0,e.isReactVersionAtLeast)(19)?t:t?"true":void 0}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,610580,t=>{"use strict";var e=t.i(298699);let n={};t.s(["useRefWithInit",0,function(t,r){let i=e.useRef(n);return i.current===n&&(i.current=t(r)),i}])},389068,t=>{"use strict";var e=t.i(298699);let n="u">typeof document?e.useLayoutEffect:()=>{};t.s(["useIsoLayoutEffect",0,n])},398258,t=>{"use strict";let e=function(t,...e){let n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",t.toString()),e.forEach(t=>n.searchParams.append("args[]",t)),`Base UI error #${t}; visit ${n} for the full message.`};t.s(["default",0,e])},92615,t=>{"use strict";let e;function n(){return"u">typeof window}function r(t){return o(t)?(t.nodeName||"").toLowerCase():"#document"}function i(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function s(t){var e;return null==(e=(o(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function o(t){return!!n()&&(t instanceof Node||t instanceof i(t).Node)}function u(t){return!!n()&&(t instanceof Element||t instanceof i(t).Element)}function l(t){return!!n()&&(t instanceof HTMLElement||t instanceof i(t).HTMLElement)}function a(t){return!(!n()||"u"<typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof i(t).ShadowRoot)}function c(t){let{overflow:e,overflowX:n,overflowY:r,display:i}=b(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&"inline"!==i&&"contents"!==i}function f(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}let d=/transform|translate|scale|rotate|perspective|filter/,p=/paint|layout|strict|content/,m=t=>!!t&&"none"!==t;function g(t){let e=u(t)?b(t):t;return m(e.transform)||m(e.translate)||m(e.scale)||m(e.rotate)||m(e.perspective)||!h()&&(m(e.backdropFilter)||m(e.filter))||d.test(e.willChange||"")||p.test(e.contain||"")}function h(){return null==e&&(e="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),e}function v(t){return/^(html|body|#document)$/.test(r(t))}function b(t){return i(t).getComputedStyle(t)}function y(t){if("html"===r(t))return t;let e=t.assignedSlot||t.parentNode||a(t)&&t.host||s(t);return a(e)?e.host:e}function E(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}t.s(["getComputedStyle",0,b,"getContainingBlock",0,function(t){let e=y(t);for(;l(e)&&!v(e);){if(g(e))return e;if(f(e))break;e=y(e)}return null},"getDocumentElement",0,s,"getFrameElement",0,E,"getNodeName",0,r,"getNodeScroll",0,function(t){return u(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}},"getOverflowAncestors",0,function t(e,n,r){var s;void 0===n&&(n=[]),void 0===r&&(r=!0);let o=function t(e){let n=y(e);return v(n)?e.ownerDocument?e.ownerDocument.body:e.body:l(n)&&c(n)?n:t(n)}(e),u=o===(null==(s=e.ownerDocument)?void 0:s.body),a=i(o);if(!u)return n.concat(o,t(o,[],r));{let e=E(a);return n.concat(a,a.visualViewport||[],c(o)?o:[],e&&r?t(e):[])}},"getParentNode",0,y,"getWindow",0,i,"isContainingBlock",0,g,"isElement",0,u,"isHTMLElement",0,l,"isLastTraversableNode",0,v,"isNode",0,o,"isOverflowElement",0,c,"isShadowRoot",0,a,"isTableElement",0,function(t){return/^(table|td|th)$/.test(r(t))},"isTopLayer",0,f,"isWebKit",0,h])},773825,t=>{"use strict";var e=t.i(298699),n=t.i(610580);let r=e[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],i=r&&r!==e.useLayoutEffect?r:t=>t();function s(){let t={next:void 0,callback:o,trampoline:(...e)=>t.callback?.(...e),effect:()=>{t.callback=t.next}};return t}function o(){}t.s(["useStableCallback",0,function(t){let e=(0,n.useRefWithInit)(s).current;return e.next=t,i(e.effect),e.trampoline}])},128726,t=>{"use strict";let e=Object.freeze([]),n=Object.freeze({});t.s(["EMPTY_ARRAY",0,e,"EMPTY_OBJECT",0,n,"NOOP",0,function(){}])},938593,t=>{"use strict";let e=parseInt(t.i(298699).version,10);t.s(["isReactVersionAtLeast",0,function(t){return e>=t}])},617517,t=>{"use strict";var e=t.i(610580);function n(){return{callback:null,cleanup:null,refs:[]}}function r(t,e){if(t.refs=e,e.every(t=>null==t)){t.callback=null;return}t.callback=n=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),null!=n){let r=Array(e.length).fill(null);for(let t=0;t<e.length;t+=1){let i=e[t];if(null!=i)switch(typeof i){case"function":{let e=i(n);"function"==typeof e&&(r[t]=e);break}case"object":i.current=n}}t.cleanup=()=>{for(let t=0;t<e.length;t+=1){let n=e[t];if(null!=n)switch(typeof n){case"function":{let e=r[t];"function"==typeof e?e():n(null);break}case"object":n.current=null}}}}}}t.s(["useMergedRefs",0,function(t,i,s,o){var u,l,a,c,f;let d=(0,e.useRefWithInit)(n).current;return u=d,l=t,a=i,c=s,f=o,(u.refs[0]!==l||u.refs[1]!==a||u.refs[2]!==c||u.refs[3]!==f)&&r(d,[t,i,s,o]),d.callback},"useMergedRefsN",0,function(t){var i,s;let o=(0,e.useRefWithInit)(n).current;return i=o,s=t,(i.refs.length!==s.length||i.refs.some((t,e)=>t!==s[e]))&&r(o,t),o.callback}])},861645,t=>{"use strict";var e=t.i(298699),n=t.i(938593);t.s(["getReactElementRef",0,function(t){if(!e.isValidElement(t))return null;let r=t.props;return((0,n.isReactVersionAtLeast)(19)?r?.ref:t.ref)??null}])},22560,t=>{"use strict";t.s(["mergeObjects",0,function(t,e){return t&&!e?t:!t&&e?e:t||e?{...t,...e}:void 0}])},656202,t=>{"use strict";t.s(["warn",0,function(){}])},533891,20470,331668,t=>{"use strict";t.s(["getStateAttributesProps",0,function(t,e){let n={};for(let r in t){let i=t[r];if(e?.hasOwnProperty(r)){let t=e[r](i);null!=t&&Object.assign(n,t);continue}!0===i?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}],533891),t.s(["resolveClassName",0,function(t,e){return"function"==typeof t?t(e):t}],20470),t.s(["resolveStyle",0,function(t,e){return"function"==typeof t?t(e):t}],331668)},943891,t=>{"use strict";var e=t.i(22560);let n={};function r(t){return o(t)?{...u(t,n)}:function(t){let e={...t};for(let t in e){let n=e[t];s(t,n)&&(e[t]=l(n))}return e}(t)}function i(t,n){return o(n)?u(n,t):function(t,n){if(!n)return t;for(let r in n){let i=n[r];switch(r){case"style":t[r]=(0,e.mergeObjects)(t.style,i);break;case"className":t[r]=c(t.className,i);break;default:s(r,i)?t[r]=function(t,e){return e?t?(...n)=>{let r=n[0];if(f(r)){a(r);let i=e(...n);return r.baseUIHandlerPrevented||t?.(...n),i}let i=e(...n);return t?.(...n),i}:l(e):t}(t[r],i):t[r]=i}}return t}(t,n)}function s(t,e){let n=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2);return 111===n&&110===r&&i>=65&&i<=90&&("function"==typeof e||void 0===e)}function o(t){return"function"==typeof t}function u(t,e){return o(t)?t(e):t??n}function l(t){return t?(...e)=>{let n=e[0];return f(n)&&a(n),t(...e)}:t}function a(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function c(t,e){return e?t?e+" "+t:e:t}function f(t){return null!=t&&"object"==typeof t&&"nativeEvent"in t}t.s(["makeEventPreventable",0,a,"mergeClassNames",0,c,"mergeProps",0,function(t,e,n,s,o){if(!n&&!s&&!o&&!t)return r(e);let u=r(t);return e&&(u=i(u,e)),n&&(u=i(u,n)),s&&(u=i(u,s)),o&&(u=i(u,o)),u},"mergePropsN",0,function(t){if(0===t.length)return n;if(1===t.length)return r(t[0]);let e=r(t[0]);for(let n=1;n<t.length;n+=1)e=i(e,t[n]);return e}])},597849,t=>{"use strict";var e=t.i(398258),n=t.i(298699),r=t.i(617517),i=t.i(861645),s=t.i(22560);t.i(656202);var o=t.i(128726),u=t.i(533891),l=t.i(20470),a=t.i(331668),c=t.i(943891);let f=Symbol.for("react.lazy");t.s(["useRenderElement",0,function(t,d,p={}){let m=d.render,g=function(t,e={}){var n;let{className:f,style:d,render:p}=t,{state:m=o.EMPTY_OBJECT,ref:g,props:h,stateAttributesMapping:v,enabled:b=!0}=e,y=b?(0,l.resolveClassName)(f,m):void 0,E=b?(0,a.resolveStyle)(d,m):void 0,A=b?(0,u.getStateAttributesProps)(m,v):o.EMPTY_OBJECT,w=b&&h?Array.isArray(n=h)?(0,c.mergePropsN)(n):(0,c.mergeProps)(void 0,n):void 0,S=b?(0,s.mergeObjects)(A,w)??{}:o.EMPTY_OBJECT;return("u">typeof document&&(b?Array.isArray(g)?S.ref=(0,r.useMergedRefsN)([S.ref,(0,i.getReactElementRef)(p),...g]):S.ref=(0,r.useMergedRefs)(S.ref,(0,i.getReactElementRef)(p),g):(0,r.useMergedRefs)(null,null)),b)?(void 0!==y&&(S.className=(0,c.mergeClassNames)(S.className,y)),void 0!==E&&(S.style=(0,s.mergeObjects)(S.style,E)),S):o.EMPTY_OBJECT}(d,p);return!1===p.enabled?null:function(t,r,i,s){if(r){if("function"==typeof r)return r(i,s);let t=(0,c.mergeProps)(i,r.props);t.ref=i.ref;let e=r;return e?.$$typeof===f&&(e=n.Children.toArray(r)[0]),n.cloneElement(e,t)}if(t&&"string"==typeof t){var o,u;return o=t,u=i,"button"===o?(0,n.createElement)("button",{type:"button",...u,key:u.key}):"img"===o?(0,n.createElement)("img",{alt:"",...u,key:u.key}):n.createElement(o,u)}throw Error((0,e.default)(8))}(t,m,g,p.state??o.EMPTY_OBJECT)}])},613349,t=>{"use strict";var e=t.i(7284),n=t.i(479656);t.s(["cliCmd",0,function(){return["localhost","127.0.0.1"].includes(window.location.hostname)?"npx @alook/app cli":"npx @alook/cli"},"cn",0,function(...t){return(0,n.twMerge)((0,e.clsx)(t))},"isLocalMode",0,function(){return!!["localhost","127.0.0.1"].includes(window.location.hostname)}])},677320,t=>{"use strict";var e=t.i(92615);t.s(["activeElement",0,function(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e},"contains",0,function(t,n){if(!t||!n)return!1;let r=n.getRootNode?.();if(t.contains(n))return!0;if(r&&(0,e.isShadowRoot)(r)){let e=n;for(;e;){if(t===e)return!0;e=e.parentNode||e.host}}return!1},"getTarget",0,function(t){return"composedPath"in t?t.composedPath()[0]:t.target}])},297099,t=>{"use strict";let e="u">typeof navigator,n=function(){if(!e)return{platform:"",maxTouchPoints:-1};let t=navigator.userAgentData;return t?.platform?{platform:t.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),r=function(){if(!e)return"";let t=navigator.userAgentData;return t?.platform?t.platform:navigator.platform??""}(),i=function(){if(!e)return"";let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:t,version:e})=>`${t}/${e}`).join(" "):navigator.userAgent}(),s="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),o="MacIntel"===n.platform&&n.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(n.platform);e&&/firefox/i.test(i);let u=e&&/apple/i.test(navigator.vendor);e&&/Edg/i.test(i);let l=e&&/android/i.test(r)||/android/i.test(i),a=e&&r.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,c=i.includes("jsdom/");t.s(["isAndroid",0,l,"isIOS",0,o,"isJSDOM",0,c,"isMac",0,a,"isSafari",0,u,"isWebKit",0,s])},658507,t=>{"use strict";var e=t.i(298699);let n=[];t.s(["useOnMount",0,function(t){e.useEffect(t,n)}])},541126,926249,t=>{"use strict";var e=t.i(298699);let n={...e},r=0,i=n.useId;function s(t,n){if(void 0!==i){let e=i();return t??(n?`${n}-${e}`:e)}return function(t,n="mui"){let[i,s]=e.useState(t),o=t||i;return e.useEffect(()=>{null==i&&(r+=1,s(`${n}-${r}`))},[i,n]),o}(t,n)}t.s(["useId",0,s],926249),t.s(["useBaseUiId",0,function(t){return s(t,"base-ui")}],541126)},730310,t=>{"use strict";t.s(["addEventListener",0,function(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}])},385967,t=>{"use strict";var e=t.i(610580),n=t.i(658507);class r{static create(){return new r}currentId=0;start(t,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,e()},t)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}t.s(["Timeout",0,r,"useTimeout",0,function(){let t=(0,e.useRefWithInit)(r.create).current;return(0,n.useOnMount)(t.disposeEffect),t}])},9722,t=>{"use strict";var e=t.i(297099);t.s(["isClickLikeEvent",0,function(t){let e=t.type;return"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e},"isMouseLikePointerType",0,function(t,e){let n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)},"isReactEvent",0,function(t){return"nativeEvent"in t},"isVirtualClick",0,function(t){return""===t.pointerType&&!!t.isTrusted||(e.isAndroid&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)},"isVirtualPointerEvent",0,function(t){return!e.isJSDOM&&(!e.isAndroid&&0===t.width&&0===t.height||e.isAndroid&&1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"===t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail&&"touch"===t.pointerType)},"stopEvent",0,function(t){t.preventDefault(),t.stopPropagation()}])},208700,t=>{"use strict";t.s(["ownerDocument",0,function(t){return t?.ownerDocument||document}])},869576,t=>{"use strict";t.s(["ACTIVE_KEY",0,"active","ARROW_DOWN",0,"ArrowDown","ARROW_LEFT",0,"ArrowLeft","ARROW_RIGHT",0,"ArrowRight","ARROW_UP",0,"ArrowUp","FOCUSABLE_ATTRIBUTE",0,"data-base-ui-focusable","SELECTED_KEY",0,"selected","TYPEABLE_SELECTOR",0,"input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"])},211752,857504,t=>{"use strict";var e=t.i(128726);t.s(["createChangeEventDetails",0,function(t,n,r,i){let s=!1,o=!1,u=i??e.EMPTY_OBJECT;return{reason:t,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:r,...u}}],211752),t.s(["cancelOpen",0,"cancel-open","chipRemovePress",0,"chip-remove-press","clearPress",0,"clear-press","closePress",0,"close-press","closeWatcher",0,"close-watcher","decrementPress",0,"decrement-press","disabled",0,"disabled","drag",0,"drag","escapeKey",0,"escape-key","focusOut",0,"focus-out","imperativeAction",0,"imperative-action","incrementPress",0,"increment-press","inputBlur",0,"input-blur","inputChange",0,"input-change","inputClear",0,"input-clear","inputPaste",0,"input-paste","inputPress",0,"input-press","itemPress",0,"item-press","keyboard",0,"keyboard","linkPress",0,"link-press","listNavigation",0,"list-navigation","none",0,"none","outsidePress",0,"outside-press","pointer",0,"pointer","scrub",0,"scrub","siblingOpen",0,"sibling-open","swipe",0,"swipe","trackPress",0,"track-press","triggerFocus",0,"trigger-focus","triggerHover",0,"trigger-hover","triggerPress",0,"trigger-press","wheel",0,"wheel","windowResize",0,"window-resize"],795610);var n=t.i(795610);t.s(["REASONS",0,n],857504)},729537,t=>{"use strict";var e=t.i(610580),n=t.i(658507);let r=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let e=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<e.length;n+=1)e[n]?.(t)};request(t){let e=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),e}cancel(t){let e=t-this.startId;e<0||e>=this.callbacks.length||(this.callbacks[e]=null,this.callbacksCount-=1)}};class i{static create(){return new i}static request(t){return r.request(t)}static cancel(t){return r.cancel(t)}currentId=null;request(t){this.cancel(),this.currentId=r.request(()=>{this.currentId=null,t()})}cancel=()=>{null!==this.currentId&&(r.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}t.s(["AnimationFrame",0,i,"useAnimationFrame",0,function(){let t=(0,e.useRefWithInit)(i.create).current;return(0,n.useOnMount)(t.disposeEffect),t}])},221995,t=>{"use strict";var e=t.i(298699),n=t.i(389068),r=t.i(729537);t.s(["useTransitionStatus",0,function(t,i=!1,s=!1){let[o,u]=e.useState(t&&i?"idle":void 0),[l,a]=e.useState(t);return t&&!l&&(a(!0),u("starting")),t||!l||"ending"===o||s||u("ending"),t||l||"ending"!==o||u(void 0),(0,n.useIsoLayoutEffect)(()=>{if(!t&&l&&"ending"!==o&&s){let t=r.AnimationFrame.request(()=>{u("ending")});return()=>{r.AnimationFrame.cancel(t)}}},[t,l,o,s]),(0,n.useIsoLayoutEffect)(()=>{if(!t||i)return;let e=r.AnimationFrame.request(()=>{u(void 0)});return()=>{r.AnimationFrame.cancel(e)}},[i,t]),(0,n.useIsoLayoutEffect)(()=>{if(!t||!i)return;t&&l&&"idle"!==o&&u("starting");let e=r.AnimationFrame.request(()=>{u("idle")});return()=>{r.AnimationFrame.cancel(e)}},[i,t,l,o]),{mounted:l,setMounted:a,transitionStatus:o}}])},221022,t=>{"use strict";t.s(["resolveRef",0,function(t){return null==t?t:"current"in t?t.current:t}])},106580,t=>{"use strict";var e;let n=((e={}).startingStyle="data-starting-style",e.endingStyle="data-ending-style",e),r={[n.startingStyle]:""},i={[n.endingStyle]:""};t.s(["TransitionStatusDataAttributes",0,n,"transitionStatusMapping",0,{transitionStatus:t=>"starting"===t?r:"ending"===t?i:null}])},570868,406451,t=>{"use strict";var e=t.i(298699),n=t.i(773825),r=t.i(550008),i=t.i(729537),s=t.i(221022),o=t.i(106580);function u(t,e=!1,l=!0){let a=(0,i.useAnimationFrame)();return(0,n.useStableCallback)((n,i=null)=>{a.cancel();let u=(0,s.resolveRef)(t);if(null==u)return;let c=()=>{r.flushSync(n)};if("function"!=typeof u.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void n();function f(){Promise.all(u.getAnimations().map(t=>t.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(l){i?.aborted||c();return}let t=u.getAnimations();!i?.aborted&&t.length>0&&t.some(t=>t.pending||"finished"!==t.playState)&&f()})}if(e){let t=o.TransitionStatusDataAttributes.startingStyle;if(!u.hasAttribute(t))return void a.request(f);let e=new MutationObserver(()=>{u.hasAttribute(t)||(e.disconnect(),f())});return e.observe(u,{attributes:!0,attributeFilter:[t]}),void i?.addEventListener("abort",()=>e.disconnect(),{once:!0})}a.request(f)})}t.s(["useAnimationsFinished",0,u],406451),t.s(["useOpenChangeComplete",0,function(t){let{enabled:r=!0,open:i,ref:s,onComplete:o}=t,l=(0,n.useStableCallback)(o),a=u(s,i,!1);e.useEffect(()=>{if(!r)return;let t=new AbortController;return a(l,t.signal),()=>{t.abort()}},[r,i,l,a])}],570868)},120480,(t,e,n)=>{"use strict";var r=t.r(298699),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=r.useState,o=r.useEffect,u=r.useLayoutEffect,l=r.useDebugValue;function a(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!i(t,n)}catch(t){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=s({inst:{value:n,getSnapshot:e}}),i=r[0].inst,c=r[1];return u(function(){i.value=n,i.getSnapshot=e,a(i)&&c({inst:i})},[t,n,e]),o(function(){return a(i)&&c({inst:i}),t(function(){a(i)&&c({inst:i})})},[t]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},207102,(t,e,n)=>{"use strict";e.exports=t.r(120480)},641645,t=>{"use strict";let e=["top","right","bottom","left"],n=e.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]),r=Math.min,i=Math.max,s=Math.round,o=Math.floor,u={left:"right",right:"left",bottom:"top",top:"bottom"};function l(t){return t.split("-")[0]}function a(t){return t.split("-")[1]}function c(t){return"x"===t?"y":"x"}function f(t){return"y"===t?"height":"width"}function d(t){let e=t[0];return"t"===e||"b"===e?"y":"x"}function p(t){return c(d(t))}function m(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}let g=["left","right"],h=["right","left"],v=["top","bottom"],b=["bottom","top"];function y(t){let e=l(t);return u[e]+t.slice(e.length)}t.s(["clamp",0,function(t,e,n){return i(t,r(e,n))},"createCoords",0,t=>({x:t,y:t}),"evaluate",0,function(t,e){return"function"==typeof t?t(e):t},"floor",0,o,"getAlignment",0,a,"getAlignmentAxis",0,p,"getAlignmentSides",0,function(t,e,n){void 0===n&&(n=!1);let r=a(t),i=p(t),s=f(i),o="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=y(o)),[o,y(o)]},"getAxisLength",0,f,"getExpandedPlacements",0,function(t){let e=y(t);return[m(t),e,m(e)]},"getOppositeAlignmentPlacement",0,m,"getOppositeAxis",0,c,"getOppositeAxisPlacements",0,function(t,e,n,r){let i=a(t),s=function(t,e,n){switch(t){case"top":case"bottom":if(n)return e?h:g;return e?g:h;case"left":case"right":return e?v:b;default:return[]}}(l(t),"start"===n,r);return i&&(s=s.map(t=>t+"-"+i),e&&(s=s.concat(s.map(m)))),s},"getOppositePlacement",0,y,"getPaddingObject",0,function(t){return"number"!=typeof t?{top:0,right:0,bottom:0,left:0,...t}:{top:t,right:t,bottom:t,left:t}},"getSide",0,l,"getSideAxis",0,d,"max",0,i,"min",0,r,"placements",0,n,"rectToClientRect",0,function(t){let{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}},"round",0,s,"sides",0,e])},845879,t=>{"use strict";var e=t.i(641645),n=t.i(92615),r=t.i(9722),i=t.i(869576);function s(t,e,n){return Math.floor(t/e)!==n}function o(t,e){return e<0||e>=t.length}function u(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let s=e;do s+=n?-i:i;while(s>=0&&s<=t.length-1&&l(t,s,r))return s}function l(t,e,n){if("function"==typeof n?n(e):n?.includes(e)??!1)return!0;let r=t[e];return!!r&&(!a(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function a(t,e=t?(0,n.getComputedStyle)(t):null){var r;return!!t&&!!t.isConnected&&!!e&&"hidden"!==(r=e).visibility&&"collapse"!==r.visibility&&("function"==typeof t.checkVisibility?t.checkVisibility():"none"!==e.display&&"contents"!==e.display)}t.s(["createGridCellMap",0,function(t,e,n){let r=[],i=0;return t.forEach(({width:t,height:s},o)=>{let u=!1;for(n&&(i=0);!u;){let n=[];for(let r=0;r<t;r+=1)for(let t=0;t<s;t+=1)n.push(i+r+t*e);i%e+t<=e&&n.every(t=>null==r[t])?(n.forEach(t=>{r[t]=o}),u=!0):i+=1}}),[...r]},"findNonDisabledListIndex",0,u,"getGridCellIndexOfCorner",0,function(t,e,n,r,i){if(-1===t)return -1;let s=n.indexOf(t),o=e[t];switch(i){case"tl":return s;case"tr":if(!o)return s;return s+o.width-1;case"bl":if(!o)return s;return s+(o.height-1)*r;case"br":return n.lastIndexOf(t);default:return -1}},"getGridCellIndices",0,function(t,e){return e.flatMap((e,n)=>t.includes(e)?[n]:[])},"getGridNavigatedIndex",0,function(t,{event:n,orientation:a,loopFocus:c,onLoop:f,rtl:d,cols:p,disabledIndices:m,minIndex:g,maxIndex:h,prevIndex:v,stopEvent:b=!1}){let y,E=v;if(n.key===i.ARROW_UP?y="up":n.key===i.ARROW_DOWN&&(y="down"),y){let i=[],s=[],a=!1,d=0;{let e=null,n=-1;t.forEach((t,r)=>{if(null==t)return;d+=1;let o=t.closest('[role="row"]');o&&(a=!0),(o!==e||-1===n)&&(e=o,i[n+=1]=[]),i[n].push(r),s[r]=n})}let A=!1,w=0;if(a)for(let t of i){let e=t.length;e>w&&(w=e),e!==p&&(A=!0)}let S=A&&d<t.length,R=w||p;b&&(0,r.stopEvent)(n);let I=(e=>{if(!A||-1===v)return;let r=s[v];if(null==r)return;let o=i[r].indexOf(v),u="up"===e?-1:1;for(let e=r+u,a=0;a<i.length;a+=1,e+=u){if(e<0||e>=i.length){if(!c||S)return;if(e=e<0?i.length-1:0,f){let t=Math.min(o,i[e].length-1);e=s[f(n,v,i[e][t]??i[e][0])]??e}}let r=i[e];for(let e=Math.min(o,r.length-1);e>=0;e-=1){let n=r[e];if(!l(t,n,m))return n}}})(y)??(n=>{if(!S||-1===v)return;let r=v%R,i="up"===n?-R:R,s=h-h%R,o=(0,e.floor)(h/R)+1;for(let e=v-r+i,n=0;n<o;n+=1,e+=i){if(e<0||e>h){if(!c)return;e=e<0?s:0}let n=Math.min(e+R-1,h);for(let i=Math.min(e+r,n);i>=e;i-=1)if(!l(t,i,m))return i}})(y);if(void 0!==I)E=I;else if(-1===v)E="up"===y?h:g;else if(E=u(t,{startingIndex:v,amount:R,decrement:"up"===y,disabledIndices:m}),c){if("up"===y&&(v-R<g||E<0)){let t=v%R,e=h%R,r=h-(e-t);E=e===t?h:e>t?r:r-R,f&&(E=f(n,v,E))}"down"===y&&v+R>h&&(E=u(t,{startingIndex:v%R-R,amount:R,disabledIndices:m}),f&&(E=f(n,v,E)))}o(t,E)&&(E=v)}if("both"===a){let l=(0,e.floor)(v/p);n.key===(d?i.ARROW_LEFT:i.ARROW_RIGHT)&&(b&&(0,r.stopEvent)(n),v%p!=p-1?(E=u(t,{startingIndex:v,disabledIndices:m}),c&&s(E,p,l)&&(E=u(t,{startingIndex:v-v%p-1,disabledIndices:m}),f&&(E=f(n,v,E)))):c&&(E=u(t,{startingIndex:v-v%p-1,disabledIndices:m}),f&&(E=f(n,v,E))),s(E,p,l)&&(E=v)),n.key===(d?i.ARROW_RIGHT:i.ARROW_LEFT)&&(b&&(0,r.stopEvent)(n),v%p!=0?(E=u(t,{startingIndex:v,decrement:!0,disabledIndices:m}),c&&s(E,p,l)&&(E=u(t,{startingIndex:v+(p-v%p),decrement:!0,disabledIndices:m}),f&&(E=f(n,v,E)))):c&&(E=u(t,{startingIndex:v+(p-v%p),decrement:!0,disabledIndices:m}),f&&(E=f(n,v,E))),s(E,p,l)&&(E=v));let a=(0,e.floor)(h/p)===l;o(t,E)&&(c&&a?(E=n.key===(d?i.ARROW_RIGHT:i.ARROW_LEFT)?h:u(t,{startingIndex:v-v%p-1,disabledIndices:m}),f&&(E=f(n,v,E))):E=v)}return E},"getMaxListIndex",0,function(t,e){return u(t.current,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})},"getMinListIndex",0,function(t,e){return u(t.current,{disabledIndices:e})},"isElementVisible",0,a,"isIndexOutOfListBounds",0,o,"isListIndexDisabled",0,l])},191760,t=>{"use strict";var e=t.i(938593);t.s(["inertValue",0,function(t){return(0,e.isReactVersionAtLeast)(19)?t:t?"true":void 0}])}]);