1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83d13bcd-9a6d-4ef2-9c47-4f862b9f9a86",e._sentryDebugIdIdentifier="sentry-dbid-83d13bcd-9a6d-4ef2-9c47-4f862b9f9a86")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2804],{83608:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/calling",function(){return n(41617)}])},41617:function(e,t,n){"use strict";n.r(t);var r=n(85893),l=n(67294),s=n(66308),a=n(85169),i=n(12999),o=n(6388),c=n(4455),d=n(82690),u=n(27361),x=n.n(u),h=n(12847);let m=()=>{let{initiateCall:e,callState:t,callStatus:n,error:a}=(0,i.Y)(),[u,m]=(0,l.useState)("+447572110302"),[b,p]=(0,l.useState)(!1),{loading:j,data:N}=(0,o.aM)(c.p,{fetchPolicy:"cache-first"});if(j)return(0,r.jsx)(d.Z,{});let w=x()(N,"channels.nodes",[]).filter(e=>"WHATSAPP"===e.gateway),v=async()=>{if(w.length&&u){p(!0);try{await e(w[0].id,u)}finally{p(!1)}}},y=a?{text:"Error: ".concat(a),color:"error"}:"incoming"===t?{text:"Incoming call! Check the top bar to answer or decline.",color:"warning"}:"ended"===t?"REJECTED"===n?{text:"Call declined by recipient",color:"error"}:"NO_ANSWER"===n?{text:"No answer",color:"error"}:"BUSY"===n?{text:"Line busy",color:"error"}:{text:"Call ended",color:"info"}:"outgoing"===t?"RINGING"===n?{text:"Phone is ringing...",color:"info"}:{text:"Connecting...",color:"info"}:"active"===t?{text:"Call in progress. Check the top bar to see the timer and hang up.",color:"success"}:null;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.p,{title:"Calling"}),(0,r.jsx)("main",{className:"flex-1 py-6 md:py-8 px-6 -ml-4",children:(0,r.jsx)("div",{className:"mx-auto max-w-7xl",children:(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{className:"flex items-center justify-between",children:(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight text-neutral-900",children:"Calling"})}),(0,r.jsx)("div",{className:"rounded-xl border border-neutral-200 bg-white shadow-sm",children:(0,r.jsxs)("div",{className:"p-6 space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-neutral-900 flex items-center gap-2",children:[(0,r.jsx)(f,{}),"Make a Call"]}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-neutral-500",children:["Make an outbound WhatsApp call via ",x()(w,"[0].description","your WhatsApp channel"),"."]})]}),(0,r.jsx)("div",{className:"border-t border-neutral-200"}),w.length>0?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"phone",className:"block text-sm font-medium text-neutral-700 mb-1",children:"Phone Number"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,r.jsx)(g,{})}),(0,r.jsx)("input",{id:"phone",type:"text",value:u,onChange:e=>m(e.target.value),placeholder:"+447572110302",className:"block w-full rounded-lg border border-neutral-300 py-2.5 pl-10 pr-3 text-sm text-neutral-900 placeholder:text-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-1 focus:ring-neutral-500"})]})]}),(0,r.jsx)(h.z,{size:"lg",disabled:!u||b||"idle"!==t,onClick:v,className:"bg-green-600 text-white hover:bg-green-700 focus-visible:ring-green-600 w-full sm:w-auto",children:b?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent"}),"Connecting..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f,{}),"Call ",u]})}),y&&(0,r.jsx)("div",{className:"rounded-lg p-3 ".concat({error:"bg-red-50 text-red-800",warning:"bg-amber-50 text-amber-800",info:"bg-blue-50 text-blue-800",success:"bg-green-50 text-green-800"}[y.color]||"bg-neutral-50 text-neutral-800"),children:(0,r.jsx)("p",{className:"text-sm font-medium",children:y.text})})]}):(0,r.jsx)("div",{className:"rounded-lg bg-amber-50 p-3",children:(0,r.jsx)("p",{className:"text-sm text-amber-800",children:"No WhatsApp channel configured. Please set up a WhatsApp channel first."})})]})})]})})})]})},g=()=>(0,r.jsx)("svg",{className:"h-5 w-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})}),f=()=>(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 3.75v4.5m0-4.5h-4.5m4.5 0l-6 6m3 12c-8.284 0-15-6.716-15-15V4.5A2.25 2.25 0 014.5 2.25h1.372c.516 0 .966.351 1.091.852l1.106 4.423c.11.44-.055.902-.417 1.173l-1.293.97a1.062 1.062 0 00-.38 1.21 12.035 12.035 0 007.143 7.143c.441.162.928-.004 1.21-.38l.97-1.293a1.125 1.125 0 011.173-.417l4.423 1.106c.5.125.852.575.852 1.091V19.5a2.25 2.25 0 01-2.25 2.25h-2.25z"})});m.getLayout=e=>(0,r.jsx)(a.A,{children:e}),t.default=m}},function(e){e.O(0,[6837,5169,2888,9774,179],function(){return e(e.s=83608)}),_N_E=e.O()}]);
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.