1import{_ as A}from"./BaseCard-Cb5443uK.js";import{F as E}from"./FormButton-CCi9BtWO.js";import{v as C,o as O,n as D,p as B,I as R}from"./UseIndeedVisibilityConnection-B_8_ZNsW.js";import{am as S,M as z,ae as W,N as j,o as u,c as K,d as b,w as x,J as n,u as a,e as v,K as I,L as M}from"./SetupSentry-DE6y2Ajh.js";import{a as V,r as $}from"./ShieldExclamationIcon-BH-r3vlV.js";import"./XMarkIcon-Dpv1f6WB.js";import"./_sentry-release-injection-file-DmW9TZFH.js";import"./WebsitePopup-Dt0FgmkJ.js";import"./_commonjsHelpers-DKZAErUA.js";import"./preload-helper-nkV39p5t.js";import"./GoogleAnalytics-kF7mJAxL.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="ddb143d5-796c-444d-8131-fa36aded84d8",s._sentryDebugIdIdentifier="sentry-dbid-ddb143d5-796c-444d-8131-fa36aded84d8")}catch{}})();{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};i._sentryModuleMetadata=i._sentryModuleMetadata||{},i._sentryModuleMetadata[new i.Error().stack]=Object.assign({},i._sentryModuleMetadata[new i.Error().stack],{"_sentryBundlerPluginAppKey:business-draft-crm":!0})}const F={class:"absolute inset-0 flex items-start justify-center overflow-y-auto bg-slate-200 px-2 py-8 sm:items-center"},J={class:"flex flex-1 flex-col p-8"},L={class:"text-xl font-bold capitalize text-slate-900"},U={class:"mt-2 flex flex-grow flex-col items-start justify-between"},H={class:"text-sm text-slate-500"},Y="oauth",ae={__name:"AuthIntegrationCallback",setup(s){var _,g,h;const e=S(),d=e.query.intent==="visibility",T=C(e.query.return_to),k=!!((_=e.meta)!=null&&_.connected)||!1,P=((g=e.meta)==null?void 0:g.integration)||"account",o=O({integrationName:P,success:k,reconnected:e.query.reconnected==="1",connectionPreserved:e.query.connection_preserved==="1",error:e.query.error}),l=z(),q=W(),c=`${((h=e.params)==null?void 0:h.service)||(d?"indeed":"")}`;let w=!1;const p=()=>{var t;return window.opener&&window.opener!==window||window.name===Y?!0:!!((t=window.history)!=null&&t.length)&&window.history.length<=2},f=()=>{if(w)return;w=!0;const t=B({service:c,status:o.status,success:o.success,message:o.message,authorizationContext:{version:e.query.auth_version,userId:e.query.auth_user_id,c
1ompanyId:e.query.auth_company_id,authorizationRevision:e.query.auth_revision}});try{window.localStorage.setItem(R,JSON.stringify(t))}catch(r){console.error(r)}window.opener&&window.opener!==window&&!window.opener.closed&&window.opener.postMessage(t,window.location.origin)},m=()=>{if(!window.closed){if(d||e.query.return_to){l.push(T);return}l.push({path:"/integrations",query:c?{select:c}:void 0})}},N=()=>{window.close(),window.setTimeout(()=>{if(!window.closed){try{window.open("","_self"),window.close()}catch(t){console.error(t)}window.setTimeout(()=>{window.closed||m()},150)}},150)},y=()=>{if(f(),p()){N();return}m()};return j(()=>{const t=D(o);q[t.type](t.message,t.options),f(),p()&&window.setTimeout(()=>{y()},150)}),(t,r)=>(u(),K("div",F,[b(A,{"no-padding":"",class:"w-screen max-w-sm"},{default:x(()=>[n("div",J,[n("h3",L,[a(o).success?(u(),v(a(V),{key:0,class:"-mt-1 mr-2 inline-block h-6 w-6 text-green-600","aria-hidden":"true"})):(u(),v(a($),{key:1,class:"-mt-1 mr-2 inline-block h-6 w-6 text-amber-600","aria-hidden":"true"})),n("span",null,I(a(o).title),1)]),n("dl",U,[r[0]||(r[0]=n("dt",{class:"sr-only"},"Description",-1)),n("dd",H,[n("span",null,I(a(o).message),1)])]),b(E,{size:"tall",class:"mt-6",color:"gradient",onClick:y},{default:x(()=>r[1]||(r[1]=[M("Close Window")])),_:1})])]),_:1})]))}};export{ae as default}; 2//# sourceMappingURL=AuthIntegrationCallback-Bo4dTJLo.js.map
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.