PageSourceSearch

https://www.vapiblocks.com/_next/static/chunks/3066.c420ab89dd0cb29d.js

js vapiblocks.com collected 2026-10-04 22:24:17 UTC 7,376 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3066,5],{3066:function(e,t,a){a.r(t);var r=a(5964);a(800);var n=a(5);t.default=function(){return(0,r.jsx)("section",{className:"relative w-full mx-auto flex flex-col justify-center items-center gap-8",children:(0,r.jsxs)("div",{className:"flex flex-col gap-5 text-center animate-hero-in",children:[(0,r.jsx)("span",{className:"text-4xl mt-8 max-w-3xl font-medium tracking-tighter sm:text-5xl md:text-6xl lg:text-7xl/none bg-clip-text",children:"Two theme options"}),(0,r.jsx)("h1",{children:'"iOS"'}),(0,r.jsx)(n.default,{theme:"ios"}),(0,r.jsx)("br",{}),(0,r.jsx)("h1",{children:'"iOS9"'}),(0,r.jsx)(n.default,{theme:"ios9"})]})})}},5:function(e,t,a){a.r(t);var r=a(5964),n=a(800),s=a(6354),i=a(6063),l=a(1986),o=a(2796),c=a(6967),d=a(5584),u=a(3061),m=a(4816),p=a(1331),f=a(4502);t.default=e=>{let{theme:t}=e,{volumeLevel:a,isSessionActive:x,toggleCall:h}=(0,d.Z)(),[g,j]=(0,n.useState)({theme:t||"ios9",ratio:1,speed:.2,amplitude:1,frequency:6,color:"#9E9E9E",cover:!0,width:300,height:100,autostart:!0,pixelDepth:1,lerpSpeed:.1});(0,n.useEffect)(()=>{j(e=>({...e,amplitude:x&&a>.01?7.5*a:0,speed:x&&a>.5?10*a:0,frequency:x?a>.01?5*a:0:a>.5?10*a:0}))},[a,x]);let y=(e,t)=>{j(a=>({...a,[e]:t}))};return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-full",children:[(0,r.jsxs)("div",{className:"flex items-center justify-center",children:[(0,r.jsx)(o.E.button,{onClick:()=>{h()},className:"p-2 rounded-xl bg-secondary",whileTap:{scale:.9},whileHover:{scale:1.1},initial:{x:0},animate:{x:x?-10:0},transition:{duration:.3},style:{zIndex:10,position:"relative"},children:(0,r.jsx)(c.M,{children:x?(0,r.jsx)(i.Z,{size:20}):(0,r.jsx)(o.E.div,{initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,r.jsx)(s.Z,{size:20})},"micIcon")})},"callButton"),(0,r.jsx)(o.E.div,{className:"rounded-4xl p-4 overflow-hidden",initial:{width:0,opacity:0},animate:{width:"100%",opacity:1},exit:{width:0,opacity:0},transition:{duration:.3},style:{marginLeft:"10px"},children:(0,r.jsx)(l.Z,{...g})})]}),(0,r.jsxs)(f.J2,{children:[(0,r.jsx)(f.xo,{asChild:!0,children:(0,r.jsx)(u.z,{variant:"outline",className:"mt-4",children:"Configure Siriwave"})}),(0,r.jsx)(f.yk,{className:"w-80",children:(0,r.jsxs)("div",{className:"grid gap-4",children:[(0,r.jsx)("div",{className:"space-y-2",children:(0,r.jsx)("h4",{className:"font-medium leading-none",children:"Siriwave Configuration"})}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,r.jsx)(p._,{htmlFor:"theme",children:"Theme"}),(0,r.jsx)(m.I,{id:"theme",defaultValue:g.theme,className:"col-span-2 h-8",onChange:e=>y("theme",e.target.value)})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,r.jsx)(p._,{htmlFor:"speed",children:"Speed"}),(0,r.jsx)(m.I,{id:"speed",type:"number",defaultValue:g.speed,className:"col-span-2 h-8",onChange:e=>y("speed",parseFloat(e.target.value))})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,r.jsx)(p._,{htmlFor:"amplitude",children:"Amplitude"}),(0,r.jsx)(m.I,{id:"amplitude",type:"number",defaultValue:g.amplitude,className:"col-span-2 h-8",onChange:e=>y("amplitude",parseFloat(e.target.value))})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,r.jsx)(p._,{htmlFor:"frequency",children:"Frequency"}),(0,r.jsx)(m.I,{id:"frequency",type:"number",defaultValue:g.frequency,className:"col-span-2 h-8",onChange:e=>y("frequency",parseFloat(e.target.value))})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 items-center gap-4",children:[(0,r.jsx)(p._,{htmlFor:"color",children:"Color"}),(0,r.jsx)(m.I,{id:"color",type:"text",defaultValue:g.color,className:"col-span-2 h-8",onChange:e=>y("color",e.target.value)})]})]})]})})]})]})}},4816:function(e,t,a){a.d(t,{I:function(){return i}});var r=a(5964),n=a(800),s=a(9958);let i=n.forwardRef((e,t)=>{let{className:a,type:n,...i}=e;return(0,r.jsx)("input",{type:n,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...i})});i.displayName="Input"}
1,1331:function(e,t,a){a.d(t,{_:function(){return c}});var r=a(5964),n=a(800),s=a(9506),i=a(1370),l=a(9958);let o=(0,i.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.f,{ref:t,className:(0,l.cn)(o(),a),...n})});c.displayName=s.f.displayName},4502:function(e,t,a){a.d(t,{J2:function(){return l},xo:function(){return o},yk:function(){return c}});var r=a(5964),n=a(800),s=a(8940),i=a(9958);let l=s.fC,o=s.xz;s.ee;let c=n.forwardRef((e,t)=>{let{className:a,align:n="center",sideOffset:l=4,...o}=e;return(0,r.jsx)(s.h_,{children:(0,r.jsx)(s.VY,{ref:t,align:n,sideOffset:l,className:(0,i.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...o})})});c.displayName=s.VY.displayName},5584:function(e,t,a){var r=a(800),n=a(6857),s=a.n(n);t.Z=()=>{let[e,t]=(0,r.useState)(0),[a,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[o,c]=(0,r.useState)([]),d=(0,r.useRef)(null),u=(0,r.useCallback)(()=>{if(!d.current){let e=new(s())("9277e914-73a3-4ccc-9a9c-8f4e20a86ecf");d.current=e,e.on("call-start",()=>{n(!0)}),e.on("call-end",()=>{n(!1),c([])}),e.on("volume-level",e=>{t(e)}),e.on("message",e=>{if("transcript"===e.type&&c(t=>{let a=new Date().toLocaleTimeString(),r=[...t];if("final"===e.transcriptType){let t=r.findIndex(t=>t.role===e.role&&!t.isFinal);-1!==t?r[t]={role:e.role,text:e.transcript,timestamp:r[t].timestamp,isFinal:!0}:r.push({role:e.role,text:e.transcript,timestamp:a,isFinal:!0})}else{let t=r.findIndex(t=>t.role===e.role&&!t.isFinal);-1!==t?r[t]={...r[t],text:e.transcript}:r.push({role:e.role,text:e.transcript,timestamp:a,isFinal:!1})}return r}),"function-call"===e.type&&"changeUrl"===e.functionCall.name){let t=e.functionCall.parameters.url.toLowerCase();console.log(t),t?window.location.href=t:console.error("Unknown route:",t)}}),e.on("error",e=>{console.error("Vapi error:",e)})}},[]);(0,r.useEffect)(()=>(u(),()=>{d.current&&(d.current.stop(),d.current=null)}),[u]);let m=async()=>{try{a?await d.current.stop():await d.current.start("984c75a8-2b0e-433c-8308-9b061556ce17")}catch(e){console.error("Error toggling Vapi session:",e)}};return{volumeLevel:e,isSessionActive:a,conversation:o,toggleCall:m,sendMessage:(e,t)=>{d.current&&d.current.send({type:"add-message",message:{role:e,content:t}})},say:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.current&&d.current.say(e,t)},toggleMute:()=>{if(d.current){let e=!i;d.current.setMuted(e),l(e)}},isMuted:i}}}}]);

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.