PageSourceSearch

https://www.ambiguous.ai/_next/static/chunks/0_foi2sbzcupn.js?dpl=dpl_BBG8C1mDAxoMSLKsz1H8TPHC4Yrz

js ambiguous.ai collected 2026-10-05 01:03:37 UTC 31,779 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="64841131-b477-ed8a-ea4d-6f6d95e02efc")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,651715,437438,e=>{"use strict";e.i(247167);var t=e.i(843476),n=e.i(271645),r=e.i(174017);function a({size:e=24,className:r,variant:i="gradient"}){let o=n.default.useId();return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 94 94",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,"aria-hidden":"true",children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:`brand-grad-${o}`,x1:"67.669",y1:"37.7997",x2:"32.2511",y2:"74.2291",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#1C6AFF"}),(0,t.jsx)("stop",{offset:"0.495192",stopColor:"#4F87ED"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#8979CB"})]})}),"badge"===i&&(0,t.jsx)("rect",{x:"2",y:"2",width:"90",height:"90",rx:"20",fill:`url(#brand-grad-${o})`}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.0534 51.8913L56.4872 66.1835C57.0702 68.0601 58.7416 69.2886 60.7107 69.2886H67.9619L62.8926 54.8488C62.2596 53.0448 60.6307 51.8913 58.7191 51.8913H52.0534Z",fill:"badge"===i||"white"===i?"#FFFFFF":"var(--color-text-primary)"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.3404 46.6044L52.0534 51.8913L35.5995 68.3453C34.5361 69.4087 33.24 69.9466 31.7362 69.9466H31.4785C29.6494 69.9466 28.0781 69.1335 27.0197 67.6422C25.9638 66.1509 25.7186 64.3969 26.3241 62.673L37.8764 29.7751C39.1024 26.2846 42.2526 24.0527 45.9507 24.0527H46.0158C49.7164 24.0527 52.8666 26.2846 54.0926 29.7751L58.3863 42.013C58.9643 43.6544 58.5714 45.3733 57.3404 46.6044ZM47.9049 45.8087L42.3076 51.4084C41.9148 51.7988 41.3243 51.8713 40.8514 51.5811C40.3785 51.2933 40.1708 50.7354 40.341 50.2074L44.8723 36.108C45.0325 35.6075 45.4803 35.2848 46.0058 35.2873C46.5287 35.2898 46.9741 35.6175 47.1292 36.118L48.8982 41.7828C49.3536 43.2415 48.9883 44.7278 47.9049 45.8087Z",fill:"badge"===i||"white"===i?"#FFFFFF":"gradient"===i?`url(#brand-grad-${o})`:"var(--color-accent)"})]})}"u">typeof window&&window.document&&window.document.createElement;var i=globalThis?.document?n.useLayoutEffect:()=>{};n[" useEffectEvent ".trim().toString()],n[" useInsertionEffect ".trim().toString()];var o=n[" useInsertionEffect ".trim().toString()]||i;function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function c(e){let t=n.forwardRef((t,r)=>{var a;let i,o,{children:s,...c}=t,u=null,m=!1,x=[];f(s)&&"function"==typeof v&&(s=v(s._payload)),n.Children.forEach(s,e=>{var t;if(t=e,n.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===d){m=!0;let t="child"in e.props?e.props.child:e.props.children;f(t)&&"function"==typeof v&&(t=v(t._payload)),u=p(e,t),x.push(u?.props?.children)}else x.push(e)}),u?u=n.cloneElement(u,void 0,x):!m&&1===n.Children.count(s)&&n.isValidElement(s)&&(u=s);let y=u?(a=u,(o=(i=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning)?a.ref:(o=(i=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,w=function(...e){return n.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=l(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():l(e[t],null)}}}}(...e),e)}(r,y);if(!u){if(s||0===s)throw Error(m?h(e):g(e));return s}let b=function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(c,u.props??{});return u.type!==n.Fragment&&(b.ref=r?w:y),n.cloneElement(u,b)});return t.displayName=`${e}.Slot`,t}Symbol("RADIX:SYNC_STATE"),e.i(174080);var u=c("Slot"),d=Symbol.for("radix.slottable"),p=(e,t)=>{if("child"in e.props){let t=e.props.child;return n.isValidElement(t)?n.cloneElement(t,void 0,e.props.children(t.props.children)):null}return n.isValidElement(t)?t:null},m=Symbol.for("react.lazy");function f(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===m&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var g=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,h=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,v=n[" use ".trim().toString()],x=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let a=c(`Primitive.${r}
2`),i=n.forwardRef((e,n)=>{let{asChild:i,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(i?a:r,{...o,ref:n})});return i.displayName=`Primitive.${r}`,{...e,[r]:i}},{}),y=e=>{var t;let r,a,{present:o,children:s}=e,l=function(e){var t,r;let[a,o]=n.useState(),s=n.useRef(null),l=n.useRef(e),c=n.useRef("none"),u=n.useRef(void 0),[d,p]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},n.useReducer((e,t)=>r[e][t]??e,t));return n.useEffect(()=>{"mounted"===d?(c.current=u.current??b(s.current),u.current=void 0):c.current="none"},[d]),i(()=>{let t=s.current,n=l.current;if(n!==e){let r=c.current,a=b(t);e?(u.current=a,p("MOUNT")):"none"===a||t?.display==="none"?p("UNMOUNT"):n&&r!==a?p("ANIMATION_OUT"):p("UNMOUNT"),l.current=e}},[e,p]),i(()=>{if(a){let e,t=a.ownerDocument.defaultView??window,n=n=>{let r=b(s.current).includes(CSS.escape(n.animationName));if(n.target===a&&r&&(p("ANIMATION_END"),!l.current)){let n=a.style.animationFillMode;a.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===a.style.animationFillMode&&(a.style.animationFillMode=n)})}},r=e=>{e.target===a&&(c.current=b(s.current))};return a.addEventListener("animationstart",r),a.addEventListener("animationcancel",n),a.addEventListener("animationend",n),()=>{t.clearTimeout(e),a.removeEventListener("animationstart",r),a.removeEventListener("animationcancel",n),a.removeEventListener("animationend",n)}}p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:n.useCallback(e=>{if(e){let t=getComputedStyle(e);s.current=t,u.current=b(t)}else s.current=null;o(e)},[])}}(o),c="function"==typeof s?s({present:l.isPresent}):n.Children.only(s),u=function(...e){let t=n.useRef(e);return t.current=e,n.useCallback(e=>{let n=t.current,r=!1,a=n.map(t=>{let n=w(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<a.length;e++){let t=a[e];"function"==typeof t?t():w(n[e],null)}}},[])}(l.ref,(t=c,(a=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(a=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof s||l.isPresent?n.cloneElement(c,{ref:u}):null};function w(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function b(e){return e?.animationName||"none"}y.displayName="Presence";var N=n[" useId ".trim().toString()]||(()=>void 0),j=0,C="Collapsible",[T,S]=function(e,r=[]){let a=[],i=()=>{let t=a.map(e=>n.createContext(e));return function(r){let a=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:a}}),[r,a])}};return i.scopeName=e,[function(r,i){let o=n.createContext(i);o.displayName=r+"Context";let s=a.length;a=[...a,i];let l=r=>{let{scope:a,children:i,...l}=r,c=a?.[e]?.[s]||o,u=n.useMemo(()=>l,Object.values(l));return(0,t.jsx)(c.Provider,{value:u,children:i})};return l.displayName=r+"Provider",[l,function(t,a,l={}){let{optional:c=!1}=l,u=a?.[e]?.[s]||o,d=n.useContext(u);if(d)return d;if(void 0!==i)return i;if(!c)throw Error(`\`${t}\` must be used within \`${r}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let a=r.reduce((t,{useScope:n,scopeName:r})=>{let a=n(e)[`__scope${r}`];return{...t,...a}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}(i,...r)]}(C),[E,k]=T(C),R=n.forwardRef((e,r)=>{let{__scopeCollapsible:a,open:s,defaultOpen:l,disabled:c,onOpenChange:u,...d}=e,[p,m]=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){let[i,s,l]=function({defaultProp:e,onChange:t}){let[r,a]=n.useState(e),i=n.useRef(r),s=n.useRef(t);return o(()=>{s.current=t},[t]),n.useEffect(()=>{i.current!==r&&(s.current?.(r),i.current=r)},[r,i]),[r,a,s]}({defaultProp:t,onChange:r}),c=void 0!==e,u=c?e:i;{let t=n.useRef(void 0!==e);n.useEffect(()=>{let e=t.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,a])}return[u,n.useCallback(t=>{if(c){let n="function"==typeof t?t(e):t;n!==e&&l.current?.(n)}else s(t)},[c,e,s,l])]}({prop:s,defaultProp:l??!1,onChange:u,caller:C});
2return(0,t.jsx)(E,{scope:a,disabled:c,contentId:function(){let[e,t]=n.useState(N());return i(()=>{t(e=>e??String(j++))},[void 0]),e?`radix-${e}`:""}(),open:p,onOpenToggle:n.useCallback(()=>m(e=>!e),[m]),children:(0,t.jsx)(x.div,{"data-state":P(p),"data-disabled":c?"":void 0,...d,ref:r})})});R.displayName=C;var A="CollapsibleTrigger",I=n.forwardRef((e,n)=>{let{__scopeCollapsible:r,...a}=e,i=k(A,r);return(0,t.jsx)(x.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":P(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...a,ref:n,onClick:function(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)}}(e.onClick,i.onOpenToggle)})});I.displayName=A;var M="CollapsibleContent",_=n.forwardRef((e,n)=>{let{forceMount:r,...a}=e,i=k(M,e.__scopeCollapsible);return(0,t.jsx)(y,{present:r||i.open,children:({present:e})=>(0,t.jsx)(D,{...a,ref:n,present:e})})});_.displayName=M;var D=n.forwardRef((e,r)=>{let{__scopeCollapsible:a,present:o,children:l,...c}=e,u=k(M,a),[d,p]=n.useState(o),m=n.useRef(null),f=function(...e){return n.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():s(e[t],null)}}}}(...e),e)}(r,m),g=n.useRef(0),h=g.current,v=n.useRef(0),y=v.current,w=u.open||d,b=n.useRef(w),N=n.useRef(void 0);return n.useEffect(()=>{let e=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(e)},[]),i(()=>{let e=m.current;if(e){N.current=N.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,v.current=t.width,b.current||(e.style.transitionDuration=N.current.transitionDuration,e.style.animationName=N.current.animationName),p(o)}},[u.open,o]),(0,t.jsx)(x.div,{"data-state":P(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...c,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:w&&l})});function P(e){return e?"open":"closed"}var O=e.i(326999),L=e.i(647163);let $=O.Root;O.Trigger;let F=O.Close,z=O.Portal,U=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(O.Overlay,{ref:r,className:(0,L.cn)("fixed inset-0 z-50 bg-[var(--color-overlay)] backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=open]:fade-in-0","data-[state=closed]:animate-out data-[state=closed]:fade-out-0",e),...n}));U.displayName="DialogOverlay";let H=n.forwardRef(({className:e,children:a,hideClose:i,draggable:o=!0,fullScreenMobile:s=!1,...l},c)=>{let u=n.useRef(null),[d,p]=n.useState({x:0,y:0}),[m,f]=n.useState(!1),g=n.useRef({x:0,y:0}),h=function(){let[e,t]=(0,n.useState)(0);return(0,n.useEffect)(()=>{let e=window.visualViewport;if(e)return e.addEventListener("resize",n),n(),()=>e.removeEventListener("resize",n);function n(){t(Math.max(0,window.innerHeight-e.height))}},[]),e}(),[v,x]=n.useState(0),[y,w]=n.useState(!1),b=n.useRef(null),N=n.useRef(!1),[j,C]=n.useState(window.innerWidth<768);n.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),t=e=>C(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let T=j&&!s,S=o&&!j;n.useImperativeHandle(c,()=>u.current),n.useEffect(()=>{if(!S||!m)return;let e=e=>{let t=e.clientX-g.current.x,n=e.clientY-g.current.y,r=u.current?.getBoundingClientRect();r&&p({x:Math.max(0,Math.min(window.innerWidth-r.width,t)),y:Math.max(0,Math.min(window.innerHeight-r.height,n))})},t=()=>f(!1);return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[m,S]);let E=n.useCallback(e=>{if(!T)return;let t=e.target,n=t.closest("[data-sheet-handle]"),r=t.closest("[data-dialog-header]");(n||r)&&(b.current={y:e.touches[0].clientY,time:Date.now()},N.current=!1)},[T]),k=n.useCallback(e=>{if(!b.current||!T)return;let t=e.touches[0].clientY-b.current.y;if(t<0)return void x(0);if(!N.current&&t>5&&(N.current=!0,w(!0)),!N.current)return;let n=t;n>100&&(n=100+(n-100)*.4),x(n=Math.min(n,400))},[T]),R=n.useCallback(e=>{if(!b.current||!T)return;let t=e.changedTouches[0].clientY-b.current.y,n=t/Math.max(Date.now()-b.current.time,1);b.current=null,N.current=!1,w(!1),t>100||n>.5?(x(window.innerHeight),setTimeout(()=>{u.current?.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0})),setTimeout(()=>x(0),200)},150)):x(0)},[T]);n.useEffect(()=>()=>{x(0),w(!1),b.current=null},[]);let A=T&&v>0?`translateY(${v}px)`:void 0;return(0,t.jsxs)(z,{children:[(0,t.jsx)(U,{}),(0,t.jsxs)(O.Content,{ref:u,className:(0,L.cn)("fixed z-50","w-full max-w-lg","bg-[var(--color-surface-0)] border border-[var(--color-bg-tertiary)]","shadow-[var(--shadow-lg)]","p-[var(--spacing-6)]","focus:outline-none",!T&&!(j&&s)&&["rounded-[var(--radius-xl)]","max-h-[90dvh] overflow-y-auto"],e,T&&["bottom-0 left-0 right-0 max-w-none","rounded-t-[16px] rounded-b-none","max-h-[90dvh] overflow-y-auto","pb-[calc(var(--spacing-6)+env(safe-area-inset-bottom,0px))]","data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom-full data-[state=open]:fade-in-0","data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom-full data-[state=closed]:fade-out-0",!y&&0===v&&"transition-[transform,bottom] duration-[200ms] ease-out"],!T&&j&&s&&["
2inset-0 max-w-none rounded-none h-full","pt-[env(safe-area-inset-top,0px)] pb-[env(safe-area-inset-bottom,0px)]","rounded-none"],m&&"cursor-grabbing"),style:{...T?{transform:A,...y?{transition:"none"}:{},...h>0?{bottom:`${h}px`,maxHeight:`${window.innerHeight-h}px`}:{}}:!j?{left:d.x>0?`${d.x}px`:"50%",top:d.y>0?`${d.y}px`:"50%",transform:0===d.x&&0===d.y?"translate(-50%, -50%)":"none"}:{}},onMouseDown:e=>{if(!S)return;let t=e.target;if(!("BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.closest("button, input, textarea, select"))){if(!t.closest("[data-dialog-header]")){let t=u.current?.getBoundingClientRect();if(!t||e.clientY-t.top>80)return}f(!0),g.current={x:e.clientX-d.x,y:e.clientY-d.y},e.preventDefault(),e.stopPropagation()}},onTouchStart:E,onTouchMove:k,onTouchEnd:R,...l,children:[T&&(0,t.jsx)("div",{"data-sheet-handle":!0,className:"flex justify-center pt-[var(--spacing-1)] pb-[var(--spacing-3)] -mt-[var(--spacing-2)] cursor-grab active:cursor-grabbing touch-none",children:(0,t.jsx)("div",{className:"w-9 h-1 rounded-full bg-[var(--color-bg-tertiary)]"})}),a,!i&&(0,t.jsxs)(O.Close,{className:(0,L.cn)("absolute right-4 top-4","rounded-[var(--radius-sm)] p-1","flex items-center justify-center","min-h-11 min-w-11 sm:min-h-0 sm:min-w-0","text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)]","hover:bg-[var(--color-bg-secondary)]","transition-colors duration-[var(--duration-micro)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]",T&&"top-6"),children:[(0,t.jsx)(r.XIcon,{size:16}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});H.displayName="DialogContent";let K=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)("div",{ref:r,"data-dialog-header":!0,className:(0,L.cn)("flex flex-col gap-[var(--spacing-1)] pt-[var(--spacing-1)] mb-[var(--spacing-4)]","cursor-grab active:cursor-grabbing select-none",e),...n}));K.displayName="DialogHeader";let W=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(O.Title,{ref:r,className:(0,L.cn)("text-[length:var(--text-title-l)] leading-7 font-semibold text-[var(--color-text-primary)]",e),...n}));W.displayName="DialogTitle";let Y=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(O.Description,{ref:r,className:(0,L.cn)("text-[length:var(--text-body-m)] leading-5 text-[var(--color-text-secondary)]",e),...n}));Y.displayName="DialogDescription";let B={primary:"bg-[var(--color-accent-cta-bg)] text-[var(--color-text-on-accent)] hover:bg-[var(--color-accent-cta-bg-hover)] active:brightness-90",cta:"text-[var(--color-text-on-accent)] hover:brightness-110 active:brightness-90 [background:var(--gradient-cta)]",secondary:"bg-[var(--color-bg-secondary)] text-[var(--color-text-primary)] hover:bg-[var(--color-bg-tertiary)] active:brightness-95",ghost:"bg-transparent text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-secondary)] active:bg-[var(--color-bg-tertiary)]",destructive:"bg-[var(--color-error)] text-[var(--color-text-on-accent)] hover:brightness-90 active:brightness-80"},V={compact:"h-8 px-4 text-[length:var(--text-label-m)] gap-2",default:"h-9 px-5 text-[length:var(--text-body-m)] gap-2",large:"h-11 px-6 text-[length:var(--text-body-l)] gap-3",icon:"h-9 w-9 p-0 justify-center active:scale-95","icon-sm":"h-8 w-8 p-0 justify-center active:scale-95","icon-mobile":"h-9 w-9 max-md:h-11 max-md:w-11 p-0 justify-center active:scale-95"},Z=n.default.forwardRef(({className:e,variant:n="primary",size:r="default",asChild:a,...i},o)=>(0,t.jsx)(a?u:"button",{ref:o,className:(0,L.cn)("appearance-none inline-flex items-center justify-center font-medium rounded-[var(--radius-md)] cursor-pointer","transition-all duration-[var(--duration-micro)]","focus-visible:outline-2 focus-visible:outline-[var(--color-accent)] focus-visible:outline-offset-2","disabled:opacity-40 disabled:pointer-events-none disabled:cursor-not-allowed","select-none whitespace-nowrap",B[n],V[r],e),...i}));Z.displayName="Button";var G=e.i(676525),J=e.i(749136),X=e.i(779282),q=e.i(892311),Q=e.i(807211);let ee="ambi:invite-agent:session:v1";function et(e){e.removeItem(ee)}
2var en=e.i(657688);let er={"Claude Code":{iconPath:"/brand/clients/claude-code.svg"},Codex:{iconPath:"/brand/clients/chatgpt.svg"},Muse:{iconPath:"/brand/clients/meta-muse.svg"},Hermes:{icon:"terminal"},OpenClaw:{iconPath:"/brand/clients/openclaw.svg"},"Grok Bot":{icon:"sparkles"}};function ea({client:e}){let n=er[e];return n.iconPath?(0,t.jsx)(en.default,{src:n.iconPath,alt:"",width:24,height:24,className:"h-5 w-5 md:h-6 md:w-6",unoptimized:!0}):"terminal"===n.icon?(0,t.jsx)(r.TerminalIcon,{size:16,"aria-hidden":"true"}):(0,t.jsx)(r.SparklesIcon,{size:16,"aria-hidden":"true"})}function ei({className:e}){return(0,t.jsx)("ul",{"aria-label":"Supported agents",className:(0,L.cn)("grid w-full list-none grid-cols-3 items-start justify-items-center gap-x-[var(--spacing-2)] gap-y-[var(--spacing-3)] p-0 md:flex md:w-auto md:flex-wrap md:items-center md:gap-x-[var(--spacing-5)]",e),children:Q.INVITE_AGENT_CLIENTS.map(e=>(0,t.jsxs)("li",{className:"flex min-w-0 flex-col items-center gap-[var(--spacing-1)] text-center text-[length:var(--text-label-s)] font-medium text-[var(--color-text-secondary)] md:flex-row md:gap-[var(--spacing-2)] md:text-left md:text-[length:var(--text-label-m)]",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"flex h-5 w-5 items-center justify-center text-[var(--color-text-secondary)] md:h-6 md:w-6",children:(0,t.jsx)(ea,{client:e})}),(0,t.jsx)("span",{className:"whitespace-nowrap",children:e})]},e))})}e.s(["SupportedAgentList",0,ei],437438);let eo=()=>()=>{},es=()=>!0,el=()=>!1,ec=[{withinMs:12e4,everyMs:3e3},{withinMs:9e5,everyMs:15e3}];function eu(e){return ec.find(t=>e<t.withinMs)?.everyMs??6e4}let ed={code:"7K3M-W9QP",expiresAt:"2099-01-01T00:00:00.000Z"};function ep({status:e}){if("ready"===e)return null;let n=["creating","pending","waiting","provisioning"].includes(e),a="handoff_failed"===e,i="creating"===e?"Getting your prompt ready":"handoff_failed"===e?"Your workspace is ready":"provisioning"===e?"Your agent is creating the workspace":"email_fallback"===e?"Continue in your agent":"claimed"===e?"This invitation was already accepted":"expired"===e?"Your return code expired":"failed"===e||"unavailable"===e?"Automatic return isn’t available":"Waiting for your agent",o="creating"===e?"Copy now if you like. We’re adding a one-time code that brings you back here automatically.":"handoff_failed"===e?"We couldn’t open it automatically. Try again.":"provisioning"===e?"Keep this window open. You’ll continue automatically when it’s ready.":"email_fallback"===e?"After signup, claim the workspace from the invitation sent to your email.":"claimed"===e?"The workspace has already been claimed or merged.":"expired"===e?"Get a new code to come back here automatically, or claim the workspace from the email invitation after signup.":"failed"===e||"unavailable"===e?"Your prompt still works. After signup, claim the workspace from the email invitation.":"When your agent finishes signup, this page continues on its own. Keep it open.";return(0,t.jsxs)("div",{role:a?"alert":"status","aria-live":a?"assertive":"polite",className:"mt-[var(--spacing-3)] flex items-start gap-[var(--spacing-3)] rounded-[var(--radius-md)] border border-[var(--color-bg-tertiary)] bg-[var(--color-bg-secondary)] px-[var(--spacing-3)] py-[var(--spacing-3)]",children:["email_fallback"===e?(0,t.jsx)(r.CheckIcon,{size:17,className:"mt-0.5 shrink-0 text-[var(--color-success)]","aria-hidden":"true"}):n?(0,t.jsx)(r.ProgressCircleIcon,{size:17,className:"mt-0.5 shrink-0 animate-spin text-[var(--color-accent)] motion-reduce:animate-none","aria-hidden":"true"}):(0,t.jsx)(r.AlertCircleIcon,{size:17,className:"mt-0.5 shrink-0 text-[var(--color-warning)]","aria-hidden":"true"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-[length:var(--text-body-m)] font-semibold text-[var(--color-text-primary)]",children:i}),(0,t.jsx)("span",{className:"mt-0.5 block text-[length:var(--text-body-s)] leading-5 text-[var(--color-text-tertiary)]",children:o})]})]})}e.s(["HeroInviteAgent",0,function({initialStatus:e,defaultOpen:i=!1,onReady:o,from:s="hero",triggerClassName:l="btn-hero-mobile-secondary w-full sm:w-auto"}={}
2){let c=(0,n.useRef)(null),u=(0,n.useSyncExternalStore)(eo,es,el),d=void 0!==e,[p,m]=(0,n.useState)(!1),f=d||p,[g,h]=(0,n.useState)(i),[v,x]=(0,n.useState)(e??"creating"),[y,w]=(0,n.useState)(e&&["pending","ready","waiting","provisioning"].includes(e)?ed:null),b=(0,n.useMemo)(()=>(0,Q.buildInviteAgentPrompt)(y?.code),[y]),[N,j]=(0,n.useState)("waiting"===e?(0,Q.buildInviteAgentPrompt)(ed.code):null),C=N===b,[T,S]=(0,n.useState)(!1),E=(0,n.useRef)(0),k=(0,n.useRef)(!1),A=(0,n.useRef)(null),M=(0,n.useRef)(!1),D=(0,n.useCallback)(async()=>{let e=++E.current;x("creating"),j(null),w(null),S(!1),et(window.sessionStorage);let t=new AbortController,n=setTimeout(()=>t.abort(),15e3);try{var r;let n=await fetch("/api/invite-agent/session",{signal:t.signal,method:"POST",headers:{accept:"application/json"},credentials:"same-origin"}),a=await n.json();if(!n.ok||!(a&&"object"==typeof a&&"pending"===a.status&&"string"==typeof a.code&&/^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$/.test(a.code)&&"string"==typeof a.expires_at&&Number.isFinite(Date.parse(a.expires_at))))throw Error("pairing_create_failed");if(e!==E.current)return;let i={code:a.code,expiresAt:a.expires_at};r=window.sessionStorage,r.setItem(ee,JSON.stringify(i)),w(i),x("ready")}catch{e===E.current&&x("unavailable")}finally{clearTimeout(n)}},[]);async function P(){let e=null!==y;await (0,X.copyText)(b)&&(e||(E.current+=1,et(window.sessionStorage),w(null)),j(b),x(e?"waiting":"email_fallback"))}(0,n.useEffect)(()=>{if(!g||f)return;if(M.current){M.current=!1;return}let e=window.requestAnimationFrame(()=>{let e=function(e){let t=e.getItem(ee);if(!t)return null;try{let n=JSON.parse(t);if("string"!=typeof n.code||!/^[0-9A-HJKMNP-TV-Z]{4}-[0-9A-HJKMNP-TV-Z]{4}$/.test(n.code)||"string"!=typeof n.expiresAt||!Number.isFinite(Date.parse(n.expiresAt)))return e.removeItem(ee),null;return{code:n.code,expiresAt:n.expiresAt}}catch{return e.removeItem(ee),null}}(window.sessionStorage);if(e&&Date.parse(e.expiresAt)>Date.now()){w(e),x("ready");return}D()});return()=>window.cancelAnimationFrame(e)},[D,g,f]),(0,n.useEffect)(()=>{let e,t;if(!g||f||!y||k.current||["expired","failed","handoff_failed","claimed"].includes(v))return;let n=!1;A.current?.code!==y.code&&(A.current={code:y.code,startedAt:Date.now()});let r=()=>Date.now()-(A.current?.startedAt??Date.now()),a=!1,i=async()=>{if(Date.parse(y.expiresAt)<=Date.now()){et(window.sessionStorage),w(null),x("expired");return}if("hidden"===document.visibilityState){e=setTimeout(i,6e4);return}a=!0;let s=new AbortController;t=s;let l=setTimeout(()=>s.abort(),15e3);try{let t=await fetch("/api/invite-agent/session/status",{signal:s.signal,headers:{accept:"application/json"},credentials:"same-origin",cache:"no-store"});if(n)return;if([401,404,410].includes(t.status)){et(window.sessionStorage),w(null),x("expired");return}if(429===t.status){e=setTimeout(i,6e4);return}let a=await t.json();if(!t.ok||!(a&&"object"==typeof a&&["pending","provisioning","ready","claimed","expired","failed"].includes(String(a.status))))throw Error("pairing_status_failed");if(n)return;if("ready"===a.status){k.current=!0,et(window.sessionStorage),o?o():window.location.assign("/api/invite-agent/session/continue");return}if("expired"===a.status||"failed"===a.status||"claimed"===a.status){et(window.sessionStorage),"claimed"!==a.status&&w(null),x(a.status);return}"provisioning"===a.status?x("provisioning"):x(C?"waiting":"ready");let l=a.retry_after_ms,c="number"==typeof l&&Number.isFinite(l)?Math.max(1e3,Math.min(l,5e3)):3e3;e=setTimeout(i,Math.max(c,eu(r())))}catch{n||(e=setTimeout(i,eu(r())))}finally{a=!1,clearTimeout(l)}},s=()=>{n||a||"visible"!==document.visibilityState||(e&&clearTimeout(e),e=setTimeout(i,0))};return document.addEventListener("visibilitychange",s),e=setTimeout(i,250),()=>{n=!0,t?.abort(),document.removeEventListener("visibilitychange",s),e&&clearTimeout(e)}},[C,o,g,f,y,v]),(0,n.useEffect)(()=>{if(void 0!==e)return;let t=new URLSearchParams(window.location.search).get("invite-agent-error");if("handoff"===t||"expired"===t){M.current=!0;let e=window.requestAnimationFrame(()=>{w(null),x("expired"===t?"expired":"handoff_failed"),h(!0);let e=new URL(window.location.href);e.searchParams.delete("invite-agent-error"),window.history.replaceState(window.history.state,"",e)});return()=>window.cancelAnimationFrame(e)}},[e]);let O=["handoff_failed","claimed"].includes(v),L=!y&&["expired","failed","unavailable"].includes(v);return(0,t.jsxs)($,{open:g,onOpenChange:e=>{h(e),e||(E.current+=1,S(!1))},children:[(0,t.jsx)(G.Button,{asChild:!0,variant:"secondary",size:"lg",className:l,children:(0,t.jsx)("a",{ref:c,href:(0,q.siteInviteAgentHref)(s),"aria-haspopup":u?"dialog":void 0,onKeyDown:e=>{u&&" "===e.key&&(e.preventDefault(),h(!0))},onClick:e=>{e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),h(!0))},children:"Invite your agent"})}),(0,t.jsxs)(H,{className:"max-w-xl",onCloseAutoFocus:e=>{e.preventDefault(),c.current?.focus()},children:[(0,t.jsxs)(K,{className:"mb-0 flex-row items-start gap-[var(--spacing-3)] pt-0 pr-[var(--spacing-10)]",children:[(0,t.jsx)(a,{size:56,variant:"badge",className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(W,{children:"Invite your agent"}),(0,t.jsx)(Y,{className:"mt-[var(--spacing-2)]",children:"Give your agent a workspace in one prompt."})]})]}),(0,t.jsx)("div",{className:"mt-[var(--spacing-6)]",children:"handoff_failed"===v?(0,t.jsx)(Z,{type:"button",size:"large",className:"w-full",onClick:function(){o?o():window.location.assign("/api/invite-agent/session/continue")},children:"Open your workspace"}):"claimed"===v?(0,t.jsx)(F,{asChild:!0,children:(0,t.jsx)(Z,{type:"button",size:"large",className:"w-full",children:"Done"})}):(0,t.jsxs)(Z,{type:"button",size:"large",className:"w-full",onClick:P,disabled:!!O,children:[C?(0,t.jsx)(r.CheckIcon,{size:17,"aria-hidden":"true"}):(0,t.jsx)(r.CopyIcon,{size:17,"aria-hidden":"true"}),(0,t.jsx)("span",{children:C?"Copied":"Copy prompt"})]})}),!O&&(0,t.jsxs)("section",{className:"mt-[var(--spacing-6)]","aria-labelledby":"paste-agent-heading",children:[(0,t.jsx)("h2",{id:"paste-agent-heading",className:"text-[length:var(--text-body-l)] font-semibold text-[var(--color-text-primary)]",children:"Paste it into a 
2new conversation"}),(0,t.jsx)(ei,{className:"mt-[var(--spacing-3)]"}),(0,t.jsx)("p",{className:"mt-[var(--spacing-3)] text-[length:var(--text-body-m)] leading-5 text-[var(--color-text-secondary)]",children:y?"Your agent will ask for its name, your email, and a workspace name, then create the workspace and bring you back here to claim it.":"Your agent will ask for its name, your email, and a workspace name, then create the workspace and email you an invitation to claim it."})]}),(0,t.jsx)(ep,{status:v}),L&&(0,t.jsx)("div",{className:"mt-[var(--spacing-2)] flex justify-center",children:(0,t.jsxs)(Z,{type:"button",variant:"ghost",size:"compact",onClick:D,children:[(0,t.jsx)(r.RefreshIcon,{size:14,"aria-hidden":"true"}),"Get a new code"]})}),b&&!O&&(0,t.jsxs)(R,{open:T,onOpenChange:S,className:"mt-[var(--spacing-5)] border-t border-[var(--color-bg-tertiary)] pt-[var(--spacing-2)]",children:[(0,t.jsxs)("div",{className:"flex min-h-11 items-center justify-between gap-[var(--spacing-3)]",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-[var(--spacing-2)] text-[length:var(--text-body-s)] leading-5 text-[var(--color-text-tertiary)]",children:[(0,t.jsx)(r.KeyIcon,{size:14,className:"shrink-0","aria-hidden":"true"}),(0,t.jsx)("span",{children:y?"This magic prompt links your session.":"No account or credential is included."})]}),(0,t.jsx)(I,{asChild:!0,children:(0,t.jsxs)(Z,{variant:"ghost",size:"compact",className:"shrink-0",children:["Preview prompt",(0,t.jsx)(r.ChevronDownIcon,{size:14,className:`transition-transform duration-[var(--duration-micro)] ${T?"rotate-180":""}`,"aria-hidden":"true"})]})})]}),(0,t.jsx)(_,{children:(0,t.jsx)("div",{className:"mt-[var(--spacing-2)] max-h-60 overflow-y-auto",children:(0,t.jsx)(J.CodeBlock,{"data-sentry-mask":!0,className:"border-[var(--color-bg-tertiary)] bg-[var(--color-bg-primary)] shadow-none",code:b,language:"text","aria-label":"Invitation prompt preview",showCopy:!1})})})]})]})]})}],651715)}]);
3
4//# debugId=64841131-b477-ed8a-ea4d-6f6d95e02efc

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.