1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2138],{705:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n={src:"/_next/static/media/tiro-icon-ivory.fc1a603f.png",height:240,width:240,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAIVBMVEX+/vr+/vj///n9/fn///v///n///39/fr9/fj///z////II3rQAAAACnRSTlP9OVXroH3j7b3jHSedBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAADRJREFUeJw1i0EOwCAQhBh11fL/BzfbpDdCgDEB5mBrlW7AtWzrTW6TldQHJznCYzdu/v0FJycBGAMwRXgAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},64102:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSG:()=>k,default:()=>T});var n=r(6029),l=r(61499),s=r(73811),o=r(15548),c=r(95770),a=r(66085),i=r(28466),d=r(44907),u=r(91416),h=r(705),f=r(30387),g=r(76391),m=r(65837),A=r(29172),x=r(60573),p=r(29257),w=r(72033),v=r(69440),y=r(12294),b=r(20191),j=r(8588),N=r.n(j),C=r(55729);let S={"google-calendar":s.A,google:s.A,microsoft:a.A,hubspot:c.A,notion:i.A,slack:u.A,confluence:l.A,"google-drive":o.A,salesforce:d.A},E={"google-calendar":"Google Calendar",google:"Google Calendar",microsoft:"Microsoft Outlook",hubspot:"HubSpot",notion:"Notion",slack:"Slack",confluence:"Confluence","google-drive":"Google Drive",salesforce:"Salesforce"},R=e=>{if("string"!=typeof e)return!1;try{let t=new URL(e);return["tiro:","tiro-dev:"].includes(t.protocol)&&"auth"===t.hostname&&"/credential-attach-callback"===t.pathname}catch(e){return!1}},_=e=>{if("string"!=typeof e)return!1;try{let t=new URL(e);return["tiro:","tiro-dev:"].includes(t.protocol)&&["slack","notion","confluence","hubspot","google-drive"].includes(t.hostname)&&"/connect"===t.pathname}catch(e){return!1}};var k=!0;let T=()=>{var e;let{t}=(0,b.Bd)(),{loginService:r}=(0,f.h)(),l=(0,g.X)(),[s,o]=(0,C.useState)(null),[c,a]=(0,C.useState)("idle"),[i,d]=(0,C.useState)(null),u=(0,C.useRef)(!1),j=l.query.provider,k="string"==typeof l.query.credentialAttachError?l.query.credentialAttachError:null,T="string"==typeof l.query.credentialAttachCode?l.query.credentialAttachCode:null,q=(0,m.KT)(k),z=(0,w.yV)(l.query[w.dI]),P=R(l.query.next)&&!!k==!!T,B=_(l.query.next)&&"string"==typeof l.query.error,L="error"===c||P||!!q||B||z,I=!!T&&"success"!==c&&"error"!==c;return((0,C.useEffect)(()=>{let e;if(!l.isReady||u.current)return;u.current=!0;let t=new URL((0,A.Gt)(l.query.next,window.location.origin)),[n,s=""]=t.hash.split("?"),c=new URLSearchParams(s),i=c.get(x.gL);if(c.delete(x.gL),t.hash=c.size?"".concat(n,"?").concat(c.toString()):n,z&&t.searchParams.set(w.dI,w.oz),_(t.toString()))for(let e of["completionCode","error"]){let r=l.query[e];"string"==typeof r&&t.searchParams.set(e,r)}let h=R(t.toString());!i&&h&&(t.searchParams.delete("credentialAttachCode"),t.searchParams.delete("credentialAttachError"),!!k==!!T?(a("error"),(0,A.c1)(t,"credentialAttachError","invalid")):k?(0,A.c1)(t,"credentialAttachError",k):T&&(0,A.c1)(t,"credentialAttachCode",T));let f=t.toString();o(f);let g=()=>{e=setTimeout(()=>window.location.replace(f),p.Z2)};if(!i)return g(),()=>clearTimeout(e);let v=(0,x.qR)();return j&&(null==v?void 0:v.attemptId)===i&&v.provider===j&&!!k!=!!T?k?((0,x.nk)(i),a("error"),g()):(a("pending"),r.completeCredentialAttach(T,i,j).then(()=>a("success")).catch(e=>{d((0,m.Od)(e,"attach")),a("error")}).finally(g)):(a("error"),g()),()=>clearTimeout(e)},[k,T,r,j,l.isReady,l.query.next,z]),j)?(0,n.jsx)("div",{className:"w-full h-screen flex justify-center flex-col md:flex-row window-handler bg-tds-bg-primary",children:(0,n.jsx)("div",{className:"w-full flex flex-col items-center justify-center p-8",children:(0,n.jsxs)("div",{className:"flex flex-col items-center max-w-[600px] w-full px-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-center gap-6 mb-8",children:[(0,n.jsx)("div",{className:"w-20 h-20 rounded-full bg-transparent flex items-center justify-center",children:(0,n.jsx)(N(),{src:h.A,alt:"Tiro Logo",className:"w-20 h-20 rounded-lg"})}),(0,n.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full ".concat(L?"bg-tds-bg-errorSubtle text-tds-fg-errorEmphasis":"bg-tds-bg-successSubtle text-tds-fg-successEmphasis"),children:L?(0,n.jsx)(v.A,{className:"h-5 w-5"}):I?(0,n.jsx)(y.A,{className:"h-5 w-5 animate-spin"}):(0,n.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),(0,n.jsx)("div",{className:"w-20 h-20 rounded-lg bg-tds-bg-raised flex items-center justify-center",children:(0,n.jsx)(N(),{src:S[j],alt:E[j],width:48,height:48,className:"w-16 h-16"})})]}),(0,n.jsx)("h1",{className:"text-3xl md:text-4xl font-sans font-medium text-center mb-8 text-tds-fg-onPrimary",children:t(z?"settings.integration.salesforce.authorizationError.title":L?null!=(e=null!=q?q:i)?e:"settings.profile.loginMethods.addM
1odal.errorToast":I?"connectComplete.connectionPending":"connectComplete.connectionComplete")}),z?(0,n.jsx)("p",{className:"text-center text-tds-fg-onDarkSubtle w-full",children:t("settings.integration.salesforce.authorizationError.description")}):L?null:(0,n.jsx)("p",{className:"text-center text-tds-fg-onDarkSubtle w-full",children:t(I?"connectComplete.completingConnection":"connectComplete.connectedToProvider")}),(0,n.jsxs)("div",{className:"text-tds-fg-onDarkSubtle mb-8 text-center",children:[(0,n.jsx)("span",{className:"mr-1",children:t("connectComplete.redirectMessage")}),(0,n.jsx)("a",{href:null!=s?s:"",target:"_blank",rel:"noopener noreferrer",className:"text-tds-fg-infoEmphasis",children:t("connectComplete.redirectToTiro")})]}),(0,n.jsxs)("div",{className:"mt-8 text-sm text-tds-fg-muted",children:["\xa9 2025 ",(0,n.jsx)("span",{className:"hover:underline",children:"ThePlato Inc."})," ",t("landing.allRightsReserved")]})]})})}):(0,n.jsx)("div",{className:"h-screen w-full bg-tds-bg-primary"})}},65585:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/connect-complete",function(){return r(64102)}])}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(65585)),_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.