PageSourceSearch

https://www.delphi.ai/_next/static/immutable/chunks/0oxxpw_023zdi.js

js delphi.ai collected 2026-10-03 17:34:51 UTC 28,527 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]="5b1f39c6-47d3-ba69-f3e6-5186228a711c")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,471611,e=>{"use strict";function t(){return(t=Object.assign.bind()).apply(null,arguments)}e.s(["default",()=>t])},226159,781962,e=>{"use strict";var t=e.i(546711),r=e.i(218885),n=e.i(145373);let i=(0,n.createContext)(null);function a(e){let a,o,l,s,c,u,d,p,m,f=(0,r.c)(14),{children:b,initialInput:h}=e,[g,x]=(0,n.useState)(void 0===h?"":h),[v,y]=(0,n.useState)(!1),w=(0,n.useRef)(null),S=(0,n.useRef)(null);f[0]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{S.current=e},f[0]=a):a=f[0];let z=a;f[1]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{x(""),y(!1)},f[1]=o):o=f[1];let R=o;f[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{let e=S.current;e&&(e.requestSubmit?e.requestSubmit():e.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0})))},f[2]=l):l=f[2];let k=l;f[3]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{x(e)},f[3]=s):s=f[3];let C=s;f[4]!==g||f[5]!==v?(c={input:g,isExpanded:v},f[4]=g,f[5]=v,f[6]=c):c=f[6],f[7]===Symbol.for("react.memo_cache_sentinel")?(u={clear:R,setExpanded:y,setInput:C,submit:k},d={formRef:S,textareaRef:w,setFormNode:z},f[7]=u,f[8]=d):(u=f[7],d=f[8]),f[9]!==c?(p={state:c,actions:u,meta:d},f[9]=c,f[10]=p):p=f[10];let j=p;return f[11]!==b||f[12]!==j?(m=(0,t.jsx)(i.Provider,{value:j,children:b}),f[11]=b,f[12]=j,f[13]=m):m=f[13],m}function o(){let e=(0,n.use)(i);if(!e)throw Error("Wrap your component in PromptInput.Provider to use usePromptInput().");return e}e.s(["PromptInputProvider",0,a,"usePromptInput",0,o],781962);var l=e.i(632137),s=e.i(280855);let c=(0,l.cn)("relative overflow-hidden rounded-[32px] border border-loud p-1","bg-sand-1/60 dark:bg-sand-4/70 backdrop-blur-md","transition-[color,background-color,box-shadow]",s.chatChrome.promptContainerShadow);var u=e.i(591401),d=e.i(471611),p=n.useLayoutEffect,m=function(e){var t=n.default.useRef(e);return p(function(){t.current=e}),t},f=function(e,t){"function"==typeof e?e(t):e.current=t},b=function(e,t){var r=n.default.useRef();return n.default.useCallback(function(n){e.current=n,r.current&&f(r.current,null),r.current=t,t&&f(t,n)},[t])},h={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},g=function(e){Object.keys(h).forEach(function(t){e.style.setProperty(t,h[t],"important")})},x=null,v=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize},y=function(){},w=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],S=!!document.documentElement.currentStyle,z=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var r=w.reduce(function(e,r){return e[r]=t[r],e},{}),n=r.boxSizing;if(""===n)return null;S&&"border-box"===n&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}};function R(e,t,r){var i=m(r);n.useLayoutEffect(function(){var r=function(e){return i.current(e)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var k=function(e,t){R(document.body,"reset",function(r){e.current.form===r.target&&t(r)})},C=function(e){R(window,"resize",e)},j=function(e){R(document.fonts,"loadingdone",e)},E=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],I=n.forwardRef(function(e,t){var r=e.cac
2heMeasurements,i=e.maxRows,a=e.minRows,o=e.onChange,l=void 0===o?y:o,s=e.onHeightChange,c=void 0===s?y:s,u=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,E),p=void 0!==u.value,m=n.useRef(null),f=b(m,t),h=n.useRef(0),w=n.useRef(),S=function(){var e=m.current,t=r&&w.current?w.current:z(e);if(t){w.current=t;var n,o,l,s,u,d,p,f,b,y,S,R=(n=e.value||e.placeholder||"x",void 0===(o=a)&&(o=1),void 0===(l=i)&&(l=1/0),x||((x=document.createElement("textarea")).setAttribute("tabindex","-1"),x.setAttribute("aria-hidden","true"),g(x)),null===x.parentNode&&document.body.appendChild(x),s=t.paddingSize,u=t.borderSize,p=(d=t.sizingStyle).boxSizing,Object.keys(d).forEach(function(e){x.style[e]=d[e]}),g(x),x.value=n,f=v(x,t),x.value=n,f=v(x,t),x.value="x",y=(b=x.scrollHeight-s)*o,"border-box"===p&&(y=y+s+u),f=Math.max(y,f),S=b*l,"border-box"===p&&(S=S+s+u),[f=Math.min(S,f),b]),k=R[0],C=R[1];h.current!==k&&(h.current=k,e.style.setProperty("height",k+"px","important"),c(k,{rowHeight:C}))}};return n.useLayoutEffect(S),k(m,function(){if(!p){var e=m.current.value;requestAnimationFrame(function(){var t=m.current;t&&e!==t.value&&S()})}}),C(S),j(S),n.createElement("textarea",(0,d.default)({},u,{onChange:function(e){p||S(),l(e)},ref:f}))}),P=e.i(448855),N=e.i(403773),T=e.i(865367),_=e.i(357219),F=e.i(560541),B=e.i(86853),L=e.i(535473);let M={Actions:function(e){let n,i,a,s,c,u,d=(0,r.c)(12);d[0]!==e?({className:i,children:n,layout:s,...a}=e,d[0]=e,d[1]=n,d[2]=i,d[3]=a,d[4]=s):(n=d[1],i=d[2],a=d[3],s=d[4]);let p=void 0===s?"stacked":s,{state:m}=o(),f="stacked"===p&&m.isExpanded&&"flex-wrap";return d[5]!==i||d[6]!==f?(c=(0,l.cn)("relative flex items-center justify-between",f,i),d[5]=i,d[6]=f,d[7]=c):c=d[7],d[8]!==n||d[9]!==a||d[10]!==c?(u=(0,t.jsx)("div",{className:c,...a,children:n}),d[8]=n,d[9]=a,d[10]=c,d[11]=u):u=d[11],u},Attachment:function({onClick:e=()=>{console.log("attachment clicked")},"aria-label":r,...n}){return(0,t.jsx)(P.PromptInputButton,{"aria-label":r??"Add attachment",type:"button",onClick:e,...n,children:(0,t.jsx)(N.PaperclipVerticalIcon,{className:"size-5"})})},Button:P.PromptInputButton,Call:T.PromptInputCall,Cancel:F.PromptInputCancel,Chat:_.PromptInputChat,Confirm:B.PromptInputConfirm,Frame:function(e){let i,a,s,u,d,p,m,f,b,h,g,x=(0,r.c)(22);x[0]!==e?({allowEmptySubmit:p,className:a,onSubmit:u,children:i,ref:s,...d}=e,x[0]=e,x[1]=i,x[2]=a,x[3]=s,x[4]=u,x[5]=d,x[6]=p):(i=x[1],a=x[2],s=x[3],u=x[4],d=x[5],p=x[6]);let v=void 0!==p&&p,{state:y,meta:w}=o(),{setFormNode:S}=w,z=(0,n.useRef)(null);x[7]===Symbol.for("react.memo_cache_sentinel")?(m=()=>z.current,x[7]=m):m=x[7],(0,n.useImperativeHandle)(s,m),x[8]!==S?(f=e=>{z.current=e,S(e)},x[8]=S,x[9]=f):f=x[9];let R=f;x[10]!==v||x[11]!==u||x[12]!==y.input?(b=e=>{e.preventDefault();let t=y.input.trim();(t||v)&&u({text:t})},x[10]=v,x[11]=u,x[12]=y.input,x[13]=b):b=x[13];let k=b;return x[14]!==a?(h=(0,l.cn)(c,a),x[14]=a,x[15]=h):h=x[15],x[16]!==i||x[17]!==k||x[18]!==d||x[19]!==R||x[20]!==h?(g=(0,t.jsx)("form",{ref:R,className:h,"data-surface-prompt-form":!0,onSubmit:k,...d,children:i}),x[16]=i,x[17]=k,x[18]=d,x[19]=R,x[20]=h,x[21]=g):g=x[21],g},Provider:a,Speech:L.PromptInputSpeech,Submit:function(e){let n,i,a,o,s,c,u,d,p,m,f=(0,r.c)(25);f[0]!==e?({className:n,status:s,onStop:a,onClick:i,collapsed:c,...o}=e,f[0]=e,f[1]=n,f[2]=i,f[3]=a,f[4]=o,f[5]=s,f[6]=c):(n=f[1],i=f[2],a=f[3],o=f[4],s=f[5],c=f[6]);let b=void 0===s?"ready":s,h=void 0!==c&&c,g="submitted"===b||"streaming"===b,x=g&&!!a,v=("ready"===b||"error"===b)&&!h&&!o.disabled;f[7]!==g?(u=g?(0,t.jsx)(N.StopSolidIcon,{className:"size-4 md:size-5"}):(0,t.jsx)(N.ArrowUpSolidIcon,{className:"size-4 md:size-5"}),f[7]=g,f[8]=u):u=f[8];let y=u;f[9]!==i||f[10]!==a||f[11]!==x?(d=e=>{if(x){e.preventDefault(),a?.();return}i?.(e)},f[9]=i,f[10]=a,f[11]=x,f[12]=d):d=f[12];let w=d,S=v?"submit":"muted",z=x?"Stop":"Submit message",R=g||v?"0 24.348px 24.348px 0 rgba(0, 0, 0, 0.05), 0 12.986px 12.986px -6.493px rgba(239, 5, 240, 0), 0 6.493px 6.493px -3.246px rgba(0, 0, 0, 0.05), 0 3.246px 3.246px -1.623px rgba(0, 0, 0, 0.05), 0 0.812px 0.812px -0.406px rgba(239, 95, 0, 0.05), 0 0 0 0.812px rgba(0, 0, 0, 0.04), 0 
2-1.623px 1.623px 0 rgba(255, 255, 255, 0.2) inset, 0 1.623px 1.623px 0 rgba(255, 255, 255, 0.2) inset":void 0;f[13]!==n?(p=(0,l.cn)("absolute mr-1",n),f[13]=n,f[14]=p):p=f[14];let k=x?"button":"submit";return f[15]!==h||f[16]!==y||f[17]!==w||f[18]!==o||f[19]!==z||f[20]!==R||f[21]!==p||f[22]!==k||f[23]!==S?(m=(0,t.jsx)(P.PromptInputButton,{"aria-label":z,boxShadow:R,className:p,collapsed:h,type:k,variant:S,onClick:w,...o,children:y}),f[15]=h,f[16]=y,f[17]=w,f[18]=o,f[19]=z,f[20]=R,f[21]=p,f[22]=k,f[23]=S,f[24]=m):m=f[24],m},Textarea:function(e){let i,a,s,c,d,p,m,f,b,h,g,x,v,y,w,S,z,R,k,C=(0,r.c)(52);if(C[0]!==e){let{className:t,layout:r,maxRows:n,minRows:o,onValueChange:l,onKeyDown:u,placeholder:h,id:g,style:x,...v}=e;i=t,m=r,f=n,b=o,c=l,s=u,d=h,a=g,p=v,C[0]=e,C[1]=i,C[2]=a,C[3]=s,C[4]=c,C[5]=d,C[6]=p,C[7]=m,C[8]=f,C[9]=b}else i=C[1],a=C[2],s=C[3],c=C[4],d=C[5],p=C[6],m=C[7],f=C[8],b=C[9];let j=void 0===m?"stacked":m,E=void 0===f?7:f,P=void 0===b?1:b,{state:N,actions:T,meta:_}=o(),{textareaRef:F}=_,B=(0,n.useId)(),L=a??`prompt-input-${B}`,{setExpanded:M}=T,D="stacked"===j&&N.isExpanded;C[10]!==T||C[11]!==c||C[12]!==N.isExpanded?(h=e=>{let t=e.target.value;T.setInput(t),c?.(t),!t.trim()&&N.isExpanded&&T.setExpanded(!1)},C[10]=T,C[11]=c,C[12]=N.isExpanded,C[13]=h):h=C[13];let H=h;C[14]!==P||C[15]!==M||C[16]!==N.isExpanded||C[17]!==F?(g=()=>{if(N.isExpanded)return;let e=F.current;if(!e||0===e.scrollHeight)return;let t=window.getComputedStyle(e),r=Number.parseFloat(t.lineHeight),n=(Number.isFinite(r)?r:1.2*Number.parseFloat(t.fontSize))*P+(Number.parseFloat(t.paddingTop)+Number.parseFloat(t.paddingBottom));e.scrollHeight>n+4&&M(!0)},C[14]=P,C[15]=M,C[16]=N.isExpanded,C[17]=F,C[18]=g):g=C[18],C[19]!==P||C[20]!==M||C[21]!==N.input||C[22]!==N.isExpanded||C[23]!==F?(x=[N.input,N.isExpanded,P,M,F],C[19]=P,C[20]=M,C[21]=N.input,C[22]=N.isExpanded,C[23]=F,C[24]=x):x=C[24],(0,n.useLayoutEffect)(g,x),C[25]!==T||C[26]!==s?(v=e=>{s?.(e),e.defaultPrevented||"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),T.submit())},C[25]=T,C[26]=s,C[27]=v):v=C[27];let W=v,A=D&&"order-first";C[28]!==i||C[29]!==A?(y=(0,l.cn)("flex w-full min-w-0 items-center min-h-[44px] md:min-h-[52px] relative",A,i),C[28]=i,C[29]=A,C[30]=y):y=C[30];let O=8*!!D,U=8*!!D,K=52*!!D;return C[31]!==O||C[32]!==U||C[33]!==K?(w={paddingLeft:O,paddingRight:U,marginBottom:K},C[31]=O,C[32]=U,C[33]=K,C[34]=w):w=C[34],C[35]===Symbol.for("react.memo_cache_sentinel")?(S={damping:30,stiffness:400,type:"spring"},C[35]=S):S=C[35],C[36]!==H||C[37]!==W||C[38]!==L||C[39]!==E||C[40]!==P||C[41]!==d||C[42]!==p||C[43]!==N.input||C[44]!==F?(z=(0,t.jsx)(I,{...p,ref:F,className:"text-fg-high placeholder:text-fg-low w-full resize-none border-0 bg-transparent pl-3 pr-1 py-2.5 text-base shadow-none outline-none ring-0 focus:ring-0 focus-visible:ring-0 md:py-3 md:text-lg overflow-y-auto [&::-webkit-scrollbar]:hidden [scrollbar-width:none]",id:L,maxRows:E,minRows:P,rows:P,onChange:H,onKeyDown:W,placeholder:d,value:N.input}),C[36]=H,C[37]=W,C[38]=L,C[39]=E,C[40]=P,C[41]=d,C[42]=p,C[43]=N.input,C[44]=F,C[45]=z):z=C[45],C[46]!==w||C[47]!==z?(R=(0,t.jsx)(u.motion.div,{className:"flex w-full min-w-0 items-center min-h-[44px] md:min-h-[52px] relative",initial:!1,animate:w,transition:S,children:z}),C[46]=w,C[47]=z,C[48]=R):R=C[48],C[49]!==y||C[50]!==R?(k=(0,t.jsx)("div",{className:y,children:R}),C[49]=y,C[50]=R,C[51]=k):k=C[51],k}};e.s(["PromptInput",0,M],226159)},448855,e=>{"use strict";var t=e.i(546711),r=e.i(218885),n=e.i(632137);let i=(0,e.i(294237).cva)("inline-flex shrink-0 items-center justify-center rounded-full text-sm font-medium focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none",{defaultVariants:{collapsed:!1,size:"default",variant:"ghost"},variants:{collapsed:{false:"scale-100 opacity-100",true:"pointer-events-none scale-0 opacity-0"},size:{default:"size-10 md:size-12",sm:"size-8",responsive:"size-8 md:size-12"},variant:{default:"bg-primary text-fg-inverted hover:bg-primary/90",ghost:"text-sand-11 hover:bg-sand-4 hover:text-fg-high","ghost-soft":"text-sand-10 hover:bg-sand-3 hover:text-sand-11",outline:"border border-subtle bg-background hover:bg-accent",accent:"bg-primary text-fg-inverted shadow-sm hover:brightness-110 active:scale-95",sand:"bg-muted/60 text-fg-mid hover:bg-muted active:scale-95",muted:"bg-black/[0.03] text-sand-11 hover:bg-black/[0.05] dark:bg-white/[0.06] dark:hover:bg-white/10 active:scale-95",submit:"bg-tangerine-9 text-white hover:brightness-110 active:scale-95",call:"bg-[#028326] text-white hover:brightness-110 dark:bg-[#004d09] active:scale-95","call-disabled":"bg-black/[0.03] text-fg-mid dark:bg-white/[0.06]"}}}),a={transition:"opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1)"};e.s(["PromptInputButton",0,function(e){let o,l,s,c,u,d,p,m,f,b,h,g,x,v,y,w=(0,r.c)(30);w[0]!==e?({className:s,children:l,variant:h,size:p,collapsed:f,disabled:c,type:b,style:m,boxShadow:o,ref:d,...u}=e,w[0]=e,w[1]=o,w[2]=l,w[3]=s,w[4]=c,w[5]=u,w[6]=d,w[7]=p,w[8]=m,w[9]=f,w[10]=b,w[11]=h):(o=w[1],l=w[2],s=w[3],c=w[4],u=w[5],d=w[6],p=w[7],m=w[8],f=w[9],b=w[10],h=w[11]);let S=void 0!==f&&f,z=void 0===b?"button":b,R=!!c||S;w[12]!==s||w[13]!==S||w[14]!==p||w[15]!==h?(g=(0,n.cn)(i({className:s,collapsed:S,size:p,variant:h})),w[12]=s,w[13]=S,w[14]=p,w[15]=h,w[16]=g):g=w[16],w[17]!==o?(x=o?{boxSh
2adow:o}:void 0,w[17]=o,w[18]=x):x=w[18],w[19]!==m||w[20]!==x?(v={...a,...x,...m},w[19]=m,w[20]=x,w[21]=v):v=w[21];let k=l;return w[22]!==R||w[23]!==u||w[24]!==d||w[25]!==g||w[26]!==v||w[27]!==k||w[28]!==z?(y=(0,t.jsx)("button",{ref:d,className:g,disabled:R,style:v,type:z,...u,children:k}),w[22]=R,w[23]=u,w[24]=d,w[25]=g,w[26]=v,w[27]=k,w[28]=z,w[29]=y):y=w[29],y}])},865367,357219,e=>{"use strict";var t=e.i(546711),r=e.i(218885),n=e.i(632137),i=e.i(181241),a=e.i(591401),o=e.i(403773),l=e.i(448855);let s="0 24.348px 24.348px 0 rgba(0,0,0,0.05), 0 12.986px 12.986px -6.493px rgba(239,5,240,0), 0 6.493px 6.493px -3.246px rgba(0,0,0,0.05), 0 3.246px 3.246px -1.623px rgba(0,0,0,0.05), 0 0.812px 0.812px -0.406px rgba(239,95,0,0.05), 0 0 0 0.812px rgba(0,0,0,0.04), 0 -1.623px 1.623px 0 rgba(255,255,255,0.2) inset, 0 1.623px 1.623px 0 rgba(255,255,255,0.2) inset";e.s(["PromptInputCall",0,function(e){let c,u,d,p,m,f,b,h,g,x,v,y,w,S,z,R=(0,r.c)(63);R[0]!==e?({className:u,showLabel:f,hideIcon:b,equalWidth:h,onClick:p,disabled:g,disabledByPolicy:x,grayscale:v,collapsed:d,children:c,...m}=e,R[0]=e,R[1]=c,R[2]=u,R[3]=d,R[4]=p,R[5]=m,R[6]=f,R[7]=b,R[8]=h,R[9]=g,R[10]=x,R[11]=v):(c=R[1],u=R[2],d=R[3],p=R[4],m=R[5],f=R[6],b=R[7],h=R[8],g=R[9],x=R[10],v=R[11]);let k=void 0!==b&&b,C=void 0!==x&&x,j=void 0!==v&&v,E=!!(void 0!==g&&g||C),I=E||j?"call-disabled":"call",P=void 0!==h&&h||k;if(void 0!==f&&f){let e,r,l,m,f,b,h=E||j?"bg-black/[0.03] text-fg-mid dark:bg-white/[0.06]":"bg-[#028326] text-white hover:brightness-110 dark:bg-[#004d09]",g=E&&"cursor-not-allowed",x=P?"h-full min-w-0 flex-1 basis-0 gap-1.5":"h-12 gap-1.5 md:h-[52px]";R[12]!==u||R[13]!==h||R[14]!==g||R[15]!==x?(e=(0,n.cn)("flex items-center justify-center overflow-hidden rounded-full transition-transform active:scale-95",h,g,x,u),R[12]=u,R[13]=h,R[14]=g,R[15]=x,R[16]=e):e=R[16],R[17]!==d||R[18]!==P?(r=P?void 0:{width:96*!d,opacity:+!d,marginRight:0},R[17]=d,R[18]=P,R[19]=r):r=R[19],R[20]===Symbol.for("react.memo_cache_sentinel")?(l={duration:.3,ease:[.16,1,.3,1]},R[20]=l):l=R[20];let v=j?"grayscale(1)":void 0,y=d?"none":"auto";R[21]!==v||R[22]!==y?(m={boxShadow:s,filter:v,pointerEvents:y},R[21]=v,R[22]=y,R[23]=m):m=R[23];let w=E||d;R[24]!==c||R[25]!==j||R[26]!==k||R[27]!==E?(f=c??(0,t.jsxs)(t.Fragment,{children:[k?null:(0,t.jsx)(o.PhoneSolidIcon,{className:(0,n.cn)("size-6 shrink-0 md:size-7",E||j?"text-fg-mid":"text-white")}),(0,t.jsx)("span",{className:"whitespace-nowrap text-base font-medium md:text-lg",children:"Call"})]}),R[24]=c,R[25]=j,R[26]=k,R[27]=E,R[28]=f):f=R[28],R[29]!==p||R[30]!==e||R[31]!==r||R[32]!==m||R[33]!==w||R[34]!==f?(b=(0,t.jsx)(a.motion.button,{"aria-label":"Start voice call",className:e,initial:!1,type:"button",animate:r,transition:l,style:m,disabled:w,onClick:p,children:f}),R[29]=p,R[30]=e,R[31]=r,R[32]=m,R[33]=w,R[34]=f,R[35]=b):b=R[35];let S=b;if(C){let e,r,n;return R[36]!==S?(e=(0,t.jsx)(i.TooltipTrigger,{asChild:!0,children:S}),R[36]=S,R[37]=e):e=R[37],R[38]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(i.TooltipContent,{side:"top",children:"Voice calling is not available"}),R[38]=r):r=R[38],R[39]!==e?(n=(0,t.jsxs)(i.Tooltip,{children:[e,r]}),R[39]=e,R[40]=n):n=R[40],n}return S}let N=j&&"grayscale";R[41]!==u||R[42]!==N?(y=(0,n.cn)("absolute",N,u),R[41]=u,R[42]=N,R[43]=y):y=R[43],R[44]!==j?(w=j?{filter:"grayscale(1)"}:void 0,R[44]=j,R[45]=w):w=R[45],R[46]!==c||R[47]!==E?(S=c??(0,t.jsx)(o.PhoneSolidIcon,{className:(0,n.cn)("size-5 shrink-0 md:size-7",E?"text-fg-mid":"text-white")}),R[46]=c,R[47]=E,R[48]=S):S=R[48],R[49]!==I||R[50]!==d||R[51]!==E||R[52]!==p||R[53]!==m||R[54]!==S||R[55]!==y||R[56]!==w?(z=(0,t.jsx)(l.PromptInputButton,{"aria-label":"Start voice call",boxShadow:s,className:y,collapsed:d,disabled:E,style:w,type:"button",variant:I,onClick:p,...m,children:S}),R[49]=I,R[50]=d,R[51]=E,R[52]=p,R[53]=m,R[54]=S,R[55]=y,R[56]=w,R[57]=z):z=R[57];let T=z;if(C){let e,r,n;return R[58]!==T?(e=(0,t.jsx)(i.TooltipTrigger,{asChild:!0,children:T}),R[58]=T,R[59]=e):e=R[59],R[60]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(i.TooltipContent,{side:"top",children:"Voice calling is not available"}),R[60]=r):r=R[60],R[61]!==e?(n=(0,t.jsxs)(i.Tooltip,{children:[e,r]}),R[61]=e,R[62]=n):n=R[62],n}return T}],865367);var c=e.i(280855);e.s(["PromptInputChat",0,function(e){let i,a,s,u,d,p,m,f,b,h=(0,r.c)(27);h[0]!==e?({className:a,showLabel:p,onClick:u,collapsed:m,disabled:s,children:i,...d}=e,h[0]=e,h[1]=i,h[2]=a,h[3]=s,h[4]=u,h[5]=d,h[6]=p,h[7]=m):(i=h[1],a=h[2],s=h[3],u=h[4],d=h[5],p=h[6],m=h[7]);let g=void 0!==m&&m;if(void 0!==p&&p){let e,r,l,d;return h[8]!==a?(e=(0,n.cn)("flex h-full min-w-0 flex-1 basis-0 items-center justify-center gap-2 overflow-hidden rounded-full font-medium transition-transform active:scale-95",c.control.subtle,a),h[8]=a,h[9]=e):e=h[9],h[10]===Symbol.for("react.memo_cache_sentinel")?(r={boxShadow:"0 24.348px 24.348px 0 rgba(0,0,0,0.05), 0 6.493px 6.493px -3.246px rgba(0,0,0,0.05), 0 3.246px 3.246px -1.623px rgba(0,0,0,0.05), 0 0 0 0.812px rgba(0,0,0,0.04), 0 
2-1.623px 1.623px 0 rgba(255,255,255,0.2) inset, 0 1.623px 1.623px 0 rgba(255,255,255,0.2) inset"},h[10]=r):r=h[10],h[11]!==i||h[12]!==g?(l=i??(0,t.jsxs)(t.Fragment,{children:[g?null:(0,t.jsx)(o.ConversationsSolidIcon,{className:"size-6 shrink-0 md:size-7"}),(0,t.jsx)("span",{className:"whitespace-nowrap text-base font-medium md:text-lg",children:"Chat"})]}),h[11]=i,h[12]=g,h[13]=l):l=h[13],h[14]!==s||h[15]!==u||h[16]!==e||h[17]!==l?(d=(0,t.jsx)("button",{"aria-label":"Open chat",className:e,disabled:s,style:r,type:"button",onClick:u,children:l}),h[14]=s,h[15]=u,h[16]=e,h[17]=l,h[18]=d):d=h[18],d}return h[19]!==i?(f=i??(0,t.jsx)(o.ConversationsSolidIcon,{className:"size-5 shrink-0 md:size-7"}),h[19]=i,h[20]=f):f=h[20],h[21]!==a||h[22]!==g||h[23]!==u||h[24]!==d||h[25]!==f?(b=(0,t.jsx)(l.PromptInputButton,{"aria-label":"Open chat",className:a,collapsed:g,type:"button",variant:"sand",onClick:u,...d,children:f}),h[21]=a,h[22]=g,h[23]=u,h[24]=d,h[25]=f,h[26]=b):b=h[26],b}],357219)},560541,86853,e=>{"use strict";var t=e.i(546711),r=e.i(218885),n=e.i(403773),i=e.i(632137);e.s(["PromptInputCancel",0,function(e){let a,o,l,s,c,u,d,p,m,f,b=(0,r.c)(23);b[0]!==e?({className:l,collapsed:s,children:o,size:u,"aria-label":a,...c}=e,b[0]=e,b[1]=a,b[2]=o,b[3]=l,b[4]=s,b[5]=c,b[6]=u):(a=b[1],o=b[2],l=b[3],s=b[4],c=b[5],u=b[6]);let h="sm"===(void 0===u?"default":u)?"size-8":"size-10 md:size-12";b[7]!==l||b[8]!==h?(d=(0,i.cn)("absolute flex items-center justify-center rounded-full",h,"bg-sand-4 text-sand-11 hover:bg-sand-5 transition-colors",l),b[7]=l,b[8]=h,b[9]=d):d=b[9];let g=+!s,x=s?"scale(0)":"scale(1)",v=s?"none":"auto";b[10]!==g||b[11]!==x||b[12]!==v?(p={opacity:g,transform:x,transition:"all cubic-bezier(0.16, 1, 0.3, 1) 0.4s",pointerEvents:v},b[10]=g,b[11]=x,b[12]=v,b[13]=p):p=b[13];let y=a??"Cancel recording";return b[14]!==o?(m=o??(0,t.jsx)(n.XmarkSolidIcon,{className:"size-4 md:size-5"}),b[14]=o,b[15]=m):m=b[15],b[16]!==s||b[17]!==c||b[18]!==d||b[19]!==p||b[20]!==y||b[21]!==m?(f=(0,t.jsx)("button",{type:"button",className:d,style:p,disabled:s,"aria-label":y,...c,children:m}),b[16]=s,b[17]=c,b[18]=d,b[19]=p,b[20]=y,b[21]=m,b[22]=f):f=b[22],f}],560541);var a=e.i(280855);e.s(["PromptInputConfirm",0,function(e){let o,l,s,c,u,d,p,m,f,b,h=(0,r.c)(23);h[0]!==e?({className:s,collapsed:c,children:l,size:d,"aria-label":o,...u}=e,h[0]=e,h[1]=o,h[2]=l,h[3]=s,h[4]=c,h[5]=u,h[6]=d):(o=h[1],l=h[2],s=h[3],c=h[4],u=h[5],d=h[6]);let g="sm"===(void 0===d?"default":d)?"size-8":"size-10 md:size-12";h[7]!==s||h[8]!==g?(p=(0,i.cn)("absolute flex items-center justify-center rounded-full",g,"bg-brand-accent text-white hover:brightness-110",a.shadow.default,s),h[7]=s,h[8]=g,h[9]=p):p=h[9];let x=+!c,v=c?"scale(0)":"scale(1)",y=c?"none":"auto";h[10]!==x||h[11]!==v||h[12]!==y?(m={opacity:x,transform:v,transition:"all cubic-bezier(0.16, 1, 0.3, 1) 0.4s",pointerEvents:y},h[10]=x,h[11]=v,h[12]=y,h[13]=m):m=h[13];let w=o??"Submit recording";return h[14]!==l?(f=l??(0,t.jsx)(n.CheckSolidIcon,{className:"size-4 md:size-5"}),h[14]=l,h[15]=f):f=h[15],h[16]!==c||h[17]!==u||h[18]!==p||h[19]!==m||h[20]!==w||h[21]!==f?(b=(0,t.jsx)("button",{type:"button",className:p,style:m,disabled:c,"aria-label":w,...u,children:f}),h[16]=c,h[17]=u,h[18]=p,h[19]=m,h[20]=w,h[21]=f,h[22]=b):b=h[22],b}],86853)},535473,e=>{"use strict";var t=e.i(546711),r=e.i(403773),n=e.i(145373),i=e.i(448855);let a=Math.floor(44e5/(4/3));function o(){let e=globalThis.window;return e?"MediaRecorder"in e&&e.navigator.mediaDevices?"media-recorder":"SpeechRecognition"in e||"webkitSpeechRecognition"in e?"speech-recognition":"none":"none"}async function l(e){return new Promise((t,r)=>{let n=new FileReader;n.onloadend=()=>{let e=n.result.split(",")[1];e?t(e):r(Error("Failed to convert blob to base64"))},n.onerror=()=>{r(Error("read failed"))},n.readAsDataURL(e)})}function s({className:e,collapsed:c,disabled:u,lang:d="en-US",onLimitReached:p,onRecordingLost:m,onStateChange:f,onTranscriptionChange:b,onTranscriptionError:h,transcribe:g,ref:x,...v}){let[y,w]=(0,n.useState)(!1),[S,z]=(0,n.useState)(!1),[R,k]=(0,n.useState)(!1),C=(0,n.use
2SyncExternalStore)(()=>()=>{},o,()=>"none"),[j,E]=(0,n.useState)(null),I=j??C,P=(0,n.useRef)(null),N=(0,n.useRef)(null),T=(0,n.useRef)([]),_=(0,n.useRef)(null),F=(0,n.useRef)(""),B=(0,n.useRef)(!0),L=(0,n.useRef)(null),M=(0,n.useRef)(!1),D=(0,n.useRef)(null),H=(0,n.useRef)(0),W=(0,n.useRef)(null),A=(0,n.useRef)(()=>{}),O=(0,n.useRef)(!1),U=(0,n.useRef)(null),K=(0,n.useRef)(null),V=(0,n.useRef)(b),q=(0,n.useRef)(h),$=(0,n.useRef)(p),G=(0,n.useRef)(m),X=(0,n.useRef)(f);(0,n.useEffect)(()=>{V.current=b,q.current=h,$.current=p,G.current=m,X.current=f},[p,m,f,b,h]);let J=(0,n.useCallback)(()=>{null!==U.current&&(clearTimeout(U.current),U.current=null)},[]);(0,n.useEffect)(()=>()=>{W.current&&G.current?.()},[]),(0,n.useEffect)(()=>{M.current=y,O.current=S},[y,S]);let Q=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=S?"processing":y?"recording":R?"error":"idle";e!==Q.current&&(Q.current=e,X.current?.(e,_.current))},[R,y,S]),(0,n.useEffect)(()=>{if("speech-recognition"!==I)return;let e=window.SpeechRecognition??window.webkitSpeechRecognition;if(!e)return;let t=new e;return t.continuous=!0,t.interimResults=!0,t.lang=d,t.onstart=()=>{D.current&&(clearTimeout(D.current),D.current=null),F.current="",w(!0)},t.onend=()=>{w(!1),B.current&&F.current.trim()&&V.current?.(F.current.trim()),F.current="",B.current=!0},t.onresult=e=>{for(let t=e.resultIndex;t<e.results.length;t++){let r=e.results[t];r?.isFinal&&(F.current+=r[0]?.transcript??"")}},t.onerror=e=>{console.error("Speech recognition error:",e.error),w(!1),D.current&&(clearTimeout(D.current),D.current=null),new Set(["aborted","audio-capture","network","not-allowed","service-not-allowed"]).has(e.error)&&"MediaRecorder"in window&&"mediaDevices"in navigator&&(E("media-recorder"),L.current?.())},P.current=t,()=>{if(P.current)try{P.current.stop()}catch{}D.current&&(clearTimeout(D.current),D.current=null)}},[d,I]),(0,n.useEffect)(()=>()=>{if(J(),_.current)for(let e of _.current.getTracks())e.stop()},[J]);let Y=(0,n.useCallback)((e,t)=>{k(!0),q.current?.({canRetry:null!==W.current,error:e,reason:t,retry:()=>A.current()})},[]),Z=(0,n.useCallback)(async e=>{W.current=e,k(!1),z(!0);try{let t=await g(e);W.current=null,t.text&&V.current?.(t.text)}catch(e){Y(e,"transcription")}finally{z(!1)}},[Y,g]),ee=(0,n.useCallback)(()=>{let e=W.current;e&&!O.current&&Z(e)},[Z]);(0,n.useEffect)(()=>{A.current=ee},[ee]);let et=(0,n.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});_.current=e;let t=new MediaRecorder(e,{audioBitsPerSecond:24e3,...function(){if("isTypeSupported"in MediaRecorder){for(let e of["audio/webm;codecs=opus","audio/webm","audio/mp4"])if(MediaRecorder.isTypeSupported(e))return{mimeType:e}}}()??{}});T.current=[],H.current=0,t.ondataavailable=e=>{0!==e.data.size&&(T.current.push(e.data),H.current+=e.data.size,H.current>=3e6&&"recording"===t.state&&($.current?.(),t.stop()))},t.onstop=async()=>{let r;for(let t of(J(),e.getTracks()))t.stop();_.current=null,w(!1);let n=K.current;if(K.current=null,!B.current){B.current=!0;return}let i=t.mimeType||"audio/webm",o=new Blob(T.current,{type:i});if(0===o.size){null!==n&&Y(n,"microphone");return}if(!(o.size<=a))return void Y(Error(`Recording too large to transcribe: ${o.size} bytes`),"recording-too-long");z(!0);try{r={data:await l(o),filename:i.includes("mp4")||i.includes("m4a")?"audio.mp4":i.includes("ogg")?"audio.ogg":i.includes("mpeg")?"audio.mp3":i.includes("wav")?"audio.wav":"audio.webm",mimeType:i}}catch(e){z(!1),Y(e,"recording-unreadable");return}await Z(r)},t.onerror=t=>{for(let r of(K.current=t,J(),w(!1),e.getTracks()))r.stop();_.current=null},N.current=t,t.start(1e3),w(!0),U.current=setTimeout(()=>{U.current=null,"recording"===t.state&&($.current?.(),t.stop())},3e5)}catch(e){w(!1),Y(e,"microphone")}},[J,Y,Z]);(0,n.useEffect)(()=>{L.current=et},[et]);let er=(0,n.useCallback)(()=>{N.current?.state==="recording"&&N.current.stop(),w(!1)},[]),en=(0,n.useCallback)(()=>{if(B.current=!1,N.current?.state==="recording"&&N.current.stop(),_.current){for(let e of _.current.getTracks())e.stop();_.current=null}w(!1)},[]),ei=(0,n.useCallback)(()=>
2{if(!y&&!S)if(W.current=null,k(!1),"speech-recognition"===I&&P.current){try{P.current.start()}catch{"MediaRecorder"in window&&"mediaDevices"in navigator&&(E("media-recorder"),et());return}D.current=setTimeout(()=>{if(!M.current&&"MediaRecorder"in window&&"mediaDevices"in navigator){try{P.current?.stop()}catch{}E("media-recorder"),et()}},1500)}else"media-recorder"===I&&et()},[y,S,I,et]),ea=(0,n.useCallback)(()=>{y&&("speech-recognition"===I&&P.current?(B.current=!1,P.current.stop()):"media-recorder"===I&&en())},[I,y,en]),eo=(0,n.useCallback)(()=>{y&&("speech-recognition"===I&&P.current?(B.current=!0,P.current.stop()):"media-recorder"===I&&er())},[I,y,er]);(0,n.useImperativeHandle)(x,()=>({cancelRecording:ea,startRecording:ei,submitRecording:eo}),[ea,ei,eo]);let el=!!u||"none"===I||S||y;return(0,t.jsx)(i.PromptInputButton,{"aria-label":"Start voice input",className:e,collapsed:c,disabled:el,type:"button",onClick:ei,...v,children:(0,t.jsx)(r.MicrophoneIcon,{className:"size-5"})})}s.displayName="PromptInputSpeech",e.s(["PromptInputSpeech",0,s,"isSpeechBusy",0,function(e){return"recording"===e||"processing"===e}],535473)}]);
3
4//# debugId=5b1f39c6-47d3-ba69-f3e6-5186228a711c

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.