PageSourceSearch

https://chat.lindy.ai/assets/confirmMeetingView-C1LJwMpT.js

js lindy.ai collected 2026-09-24 18:01:30 UTC 6,187 bytes, 1 lines download raw bytes

1import{r as m,v as S,c as h,j as t,P as y}from"./entry-BCe1jibU.js";import{e as p,g as w,h as v}from"./graphql-4Y3Cu4kt.js";import{L as N,C as M}from"./icons-B6i7AQrN.js";import{B as C}from"./NativeButton-DgYgvC9L.js";import"./buttonStyles-DgzPUjES.js";import"./bundle-mjs-CSqCgoPn.js";import"./index-pNUg2pyP.js";const D=v,k=w;function u(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}function g(e,n){const s=new Date(e);return Number.isNaN(s.getTime())||!u(n)?"":new Intl.DateTimeFormat("en-US",{weekday:"long",month:"short",day:"numeric",timeZone:n}).format(s)}function T(e,n,s){const i=new Date(e),l=new Date(n);if(Number.isNaN(i.getTime())||Number.isNaN(l.getTime())||!u(s))return"";const r=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",timeZone:s}),a=new Intl.DateTimeFormat("en-US",{timeZoneName:"short",timeZone:s}).formatToParts(i).find(o=>o.type==="timeZoneName")?.value;return`${r.format(i)} - ${r.format(l)}${a?` (${a})`:""}`}function E(e){return!e||typeof e.suggestedStart!="string"||typeof e.suggestedEnd!="string"||!u(e.timezone)||Number.isNaN(new Date(e.suggestedStart).getTime())||Number.isNaN(new Date(e.suggestedEnd).getTime())||e.confirmedSiblingSuggestedStart!=null&&typeof e.confirmedSiblingSuggestedStart!="string"?null:{...e,confirmedSiblingSuggestedStart:e.confirmedSiblingSuggestedStart??null,suggestedEnd:e.suggestedEnd,suggestedStart:e.suggestedStart}}function U({params:e}){const n=typeof e.token=="string"?e.token:"",[s,i]=m.useState({status:"loading"});return m.useEffect(()=>{document.title="Confirm meeting - Lindy";let l=!1;if(!n){i({status:"not-found"});return}return S(p(D,{token:n}).then(({meetingSuggestionByToken:r})=>{if(l)return;const a=E(r);i(a?{status:"ready",suggestion:a}:{status:"not-found"})}).catch(r=>{h(r),l||i({status:"not-found"})})),()=>{l=!0}},[n]),s.status==="loading"?t.jsx(y,{}):s.status==="not-found"?t.jsx(z,{}):t.jsx(I,{suggestion:s.suggestion})}function I({suggestion:e}){const[n,s]=m.useState(e.status==="confirmed"),[i,l]=m.useState(!1),[r,a]=m.useState(null),[o,f]=m.useState(!1),x=e.status==="superseded"&&!!e.confirmedSiblingSuggestedStart,d=m.useMemo(()=>({date:g(e.suggestedStart,e.timezone),time:T(e.suggestedStart,e.suggestedEnd,e.timezone),siblingDate:e.confirmedSiblingSuggestedStart?g(e.confirmedSiblingSuggestedStart,e.timezone):""}),[e]),b=m.useCallback(async()=>{if(!o){a(null),f(!0);try{const c=await p(k,{input:{token:e.id}});if(!c.confirmMeeting.success){a(c.confirmMeeting.error??"Failed to confirm meeting");return}l(!!c.confirmMeeting.rescheduled),s(!0)}catch(c){h(c),a("An unexpected error occurred")}finally{f(!1)}}},[o,e.id]);return m.useEffect(()=>{document.title=`${n?i?"Meeting Rescheduled":"Meeting Confirmed":"Confirm Meeting"} - ${e.meetingName}`},[n,e.meetingName,i]),t.jsx("main",{className:"min-h-full bg-panel px-4 pt-[18vh]",children:t.jsxs("div",{className:"mx-auto max-w-[851px]",children:[t.jsx("div",{className:"mb-8 flex justify-center",children:t.jsx(N,{className:"size-12"})}),n?t.jsx(L,{date:d.date,rescheduled:i,time:d.time}):t.jsxs(t.Fragment,{children:[t.jsxs("h1",{className:"mb-4 text-center text-xl font-medium leading-[1.4] tracking-[-0.5px] text-slate-12",children:["Confirm your meeting with ",e.ownerName]}),t.jsx(j,{date:d.date,time:d.time}),x?t.jsx("div",{className:"mx-auto mb-6 max-w-[530px] rounded-md bg-warning-2 p-4",children:t.jsxs("p",{className:"text-sm text-warning-11",children:["You already confirmed ",d.siblingDate,". Confirming this will reschedule the meeting."]})}):null,t.jsx("div",{className:"mb-6 flex justify-center",children:t.jsx(C,{disabled:o,onClick:b,type:"button",children:o?"Confirming…":x?"Reschedule meeting":"Confirm meeting"})}),r?t.jsx("div",{className:"mx-auto mb-6 max-w-[530px] rounded-md bg-danger-2 p-4",children:t.jsx("p",{className:"text-sm text-danger-11",children:r})}):null]})]})})}function L({date:e,rescheduled:n,time:s}){return t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"mb-4 flex items-center justify-center gap-2",children:[t.jsx("span",{"aria-hidden":"true",className:"flex size-7 items-center justify-center rounded-full bg-success-11 text-white",children:"✓"}),t.jsx("h1",{className:"text-xl font-medium leading-[1.4] tracking-[-0.5px] text-slate-12",children:n?"Meeting rescheduled":"Meeting confirmed"})]}),t.jsx(j,{date:e,time:s}),t.jsxs("a",{className:"mx-auto mt-16 flex max-w-[530px] items-center justify-between rounded-[20px] border border-edge bg-panel p-2 text-left shadow-sm hover:bg-slate-2",href:"/signup?ver
1sion=assistant",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(N,{className:"size-12 rounded-xl"}),t.jsxs("span",{children:[t.jsx("span",{className:"block text-base font-medium text-slate-12",children:"Pretty smooth huh?"}),t.jsx("span",{className:"block text-sm text-slate-11",children:"Get your own Lindy assistant"})]})]}),t.jsx("span",{"aria-hidden":"true",className:"mr-2 text-slate-9",children:"›"})]})]})}function j({date:e,time:n}){return t.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-center gap-1.5",children:[t.jsx(M,{className:"size-6 text-slate-9"}),t.jsxs("span",{className:"text-sm font-medium leading-5 tracking-[-0.084px] text-slate-11",children:[e,","]}),t.jsx("span",{className:"text-sm font-normal leading-5 tracking-[-0.084px] text-slate-10",children:n})]})}function z(){return t.jsx("main",{className:"flex min-h-full items-center justify-center bg-panel px-4",children:t.jsxs("div",{className:"flex flex-col gap-2 text-center",children:[t.jsx("h1",{className:"text-2xl font-semibold text-slate-12",children:"Meeting not available"}),t.jsx("p",{className:"text-sm text-slate-12",children:"This meeting suggestion is no longer available or has expired."}),t.jsx("a",{className:"mt-4 cursor-pointer rounded-sm text-sm font-medium text-primary-9 ring-primary-8 transition hover:text-primary-10 hover:underline active:text-primary-11 focus:outline-none focus-visible:underline focus-visible:ring-2",href:"/",children:"Go back home"})]})})}export{U as View,g as formatMeetingDate,T as formatMeetingTimeRange,u as isValidMeetingTimeZone};

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.