@inploi/sdk 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.js +1 -1
- package/dist/{chunk-KC7FKSIJ.mjs → chunk-U6WFJKHV.mjs} +3 -3
- package/dist/chunk-U6WFJKHV.mjs.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/sdk.country-codes-R6CUZ3IG.mjs +2 -0
- package/package.json +4 -3
- package/dist/chunk-KC7FKSIJ.mjs.map +0 -1
- package/dist/sdk.country-codes-W6HRF5SA.mjs +0 -2
- /package/dist/{sdk.country-codes-W6HRF5SA.mjs.map → sdk.country-codes-R6CUZ3IG.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Nt}from"./chunk-KC7FKSIJ.mjs";var oe="%c[inploi SDK]",ie="color: #65BC67; font-weight: bold;",Se={warn:(...t)=>console.warn(oe,ie,...t),error:(...t)=>console.error(oe,ie,...t),info:(...t)=>console.info(oe,ie,...t),log:(...t)=>console.log(oe,ie,...t)},be={info:()=>{},error:()=>{},log:()=>{},warn:()=>{}};var Bt=t=>t;function _e(t,r){if(!t)throw new Error(r)}function q(t,r){return r in t}var wr=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"});var Ft="Unauthenticated",Ut="This action is unauthorized.",D=class extends Error{constructor(i,s){super(i);this.status=s,this.name="ErrorWithStatus"}},$=class extends D{constructor(r){super(r??"Not found"),this.name="NotFoundError",this.status=404}},J=class extends D{constructor(r,i){super(r??"You are not authorised to perform this action."),this.name="UnauthorisedError",this.status=i??401}},k=class extends D{constructor(i,s){let p=s?` in ${s}`:"";super(`Schema validation failed${p}`);this.issues=i;this.source=s;this.name="SchemaValidationError",this.status=400}},H=class extends D{constructor(i,s,p){super(i);this.data=p;this.name="ApiError",this.status=s??500}},Mt=t=>t instanceof H&&t.data!==void 0,K=class extends D{constructor(i){super("Error parsing response into JSON.");this.response=i;this.name="ParsingError",this.status=i&&i.status>=300?i.status:500,this.contentType=new Headers(i?.headers).get("content-type")??void 0}};async function Ae(t){let i=new Headers(t.headers).get("content-type")?.replace(/;.*/,"").trim().toLowerCase();if(i&&i!=="application/json"&&!i.endsWith("+json"))throw new K(t);return t.json().catch(()=>{throw new K(t)})}var Vt=["message","error","errors","exception","exceptions"];function Gt(t){let r=[];if(typeof t=="object"&&t!==null){for(let i of Vt)if(q(t,i)){let s=t[i];typeof s=="string"&&r.push(s),Array.isArray(s)&&s.every(p=>typeof p=="string")&&r.push(...s)}q(t,"integration_response")&&typeof t.integration_response=="object"&&t.integration_response!==null&&q(t.integration_response,"error")&&typeof t.integration_response.error=="object"&&t.integration_response.error!==null&&q(t.integration_response.error,"message")&&typeof t.integration_response.error.message=="string"&&r.push(t.integration_response.error.message)}return r.length===0&&r.push("Unknown error"),[...new Set(r)].join(", ")}function xe(t,r){if(r>=300){let i=Gt(t);throw r===404?new $(i):i===Ft?new J("You are not authenticated.",r):i===Ut?new J(i,r):new H(i,r,t)}}var Ge=t=>{let r={Accept:"application/json","Content-Type":"application/json","x-publishable-key":t.publishableKey};return{fetch:async(i,s={})=>{let p={...s,headers:{...s.headers,...r}},l=await fetch(`${t.baseUrl}${i}`,p);if(l.status===404)throw new $;let u=await Ae(l);return xe(u,l.status),u}}},qe={NotFound:$,Unauthorised:J,SchemaValidation:k,Api:H,JsonParsing:K};function qt(t){return Object.values(qe).some(r=>t instanceof r)}var $e="3.1.2";var se={sandbox:"https://api.staging.inploi.com",production:"https://api.inploi.com",_internal_local:"http://api.test"},Je={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},He=$e;var C="isdk_session",Ke=`${C}-candidate_id`,We=`${C}-consent`;var ae=new Map,Te={get:t=>{if(ae.has(t))return ae.get(t)??null;try{return window.sessionStorage.getItem(t)}catch{return null}},set:(t,r)=>{try{window.sessionStorage.setItem(t,r),ae.delete(t)}catch{ae.set(t,r)}}};var Z=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16));var ze=7*24*60*60*1e3,Ze=t=>{let r=new Date;return r.setTime(r.getTime()+ze),`${C}=${t};expires=${r.toUTCString()};path=/`},Jt=(t,r)=>{let i=t.get("session_id");if(r||i)return i;let s=Te.get(`${C}-session_id`);return typeof s=="string"?s:null},Ht=()=>{if(typeof window>"u")return null;try{let t=window.localStorage.getItem(Ke);return typeof t=="string"&&t!==""?t:null}catch{return null}},Kt=new RegExp(`(?:^|;\\s*)${C}=([^;]+)`),Q=t=>{let r=t?t.headers.get("cookie"):document.cookie;return r?Kt.exec(r)?.[1]??null:null},Qe=()=>{try{let t=JSON.parse(window.localStorage.getItem(C)??"null");return typeof t!="object"||t===null||!("id"in t)||!("expires"in t)||typeof t.id!="string"||typeof t.expires!="number"?null:t.id!==""&&t.expires>Date.now()?t.id:null}catch{return null}},Ye=()=>Q()??(new URL(location.href).searchParams.get("anonymous_id")?null:Qe()),Wt=()=>location.protocol==="https:"&&window.self!==window.top?";SameSite=None;Secure;Partitioned":"",Xe=t=>{if(document.cookie=Ze(t)+Wt(),Q()!==t)try{window.localStorage.setItem(C,JSON.stringify({id:t,expires:Date.now()+ze}))}catch{}},Ee=t=>{let r=t?t.url:location.href,{searchParams:i}=new URL(r);return{anonymous_id:t?Q(t)??i.get("anonymous_id"):Q()??i.get("anonymous_id")??Qe(),session_id:Jt(i,typeof window>"u")}},et=()=>{if(typeof window>"u")throw new Error("getOrCreateAnonymousId() can only be called in browser environment");let t=Ee().anonymous_id;if(t)return t;let r=Z(),i=Ee().anonymous_id;return i||(Xe(r),r)},Yt=t=>typeof t!="object"||t===null?null:{anonymous_id:"anonymous_id"in t&&typeof t.anonymous_id=="string"?t.anonymous_id:null,session_id:"session_id"in t&&typeof t.session_id=="string"?t.session_id:null},zt=t=>t==="about:client"?"":t,Zt={pathname:"/log",method:"POST",schema:{response:O(),body:O()}},tt=({rpcClient:t,logger:r,onEvent:i,persistence:s="device",siteKind:p})=>{let l=null,u=null,m=0,b=0,E=d=>s==="none"?{anonymous_id:null,session_id:d?null:l}:Ee(d),V=async(d,y,ne)=>{try{let G={library:{name:"inploi-sdk",version:He},page:y},z=E(d.request),re=s==="none"?null:Ht(),S={anonymous_id:z.anonymous_id,session_id:z.session_id,candidate_id:re,event:d.event,sent_at:new Date().toISOString(),context:G,properties:d.properties,custom_properties:{...d.customProperties,...ne}},he=s==="none"?null:d.request?Q(d.request):Ye(),Me=++m,jt=await t.request(Zt,{body:S,...d.keepalive&&{keepalive:!0}}),I=Yt(jt);if(s==="none")return!d.request&&I?.session_id&&Me>b&&(b=Me,I.session_id!==S.session_id&&(l=I.session_id)),S.session_id=d.request?I?.session_id||null:l,i?.(S),{success:!0,data:S};let fe=d.request?he:Ye(),Dt=fe!==null&&fe!==he,ye=fe??he,Ve=!Dt&&(!ye||!I?.anonymous_id||ye===I.anonymous_id);return Ve?(I?.anonymous_id&&(S.anonymous_id=I.anonymous_id),I?.session_id&&(S.session_id=I.session_id)):S.anonymous_id=ye,!d.request&&typeof window<"u"&&S.anonymous_id&&(Ve&&S.session_id&&Te.set(`${C}-session_id`,S.session_id.toString()),Xe(S.anonymous_id)),i?.(S),{success:!0,data:S}}catch(G){return r.error("Failed to send log to API. Inspect error response of `log` for more information."),{success:!1,error:G}}},j=Promise.resolve();return{log:async d=>{_e(d.request||typeof window<"u","Cannot log on the server without a request. Please pass a request to `log`.");let y="request"in d&&d.request?{href:d.request.url,referrer:zt(d.request.referrer),title:""}:{href:location.href,referrer:document.referrer,title:document.title};if(d.page_context==="no_query"){let re=new URL(y.href),S=y.referrer?new URL(y.referrer):void 0;y={href:re.origin+re.pathname,referrer:S?S.origin+S.pathname:""}}s==="none"&&d.event==="FLOW_NODE"&&d.properties&&"trigger"in d.properties&&(d.properties.trigger==="pagehide"||d.properties.trigger==="hidden")&&(d={...d,keepalive:!0});let ne={event_id:Z(),consent_lane:s,site_kind:p};if(s==="device"||d.request||l||d.keepalive)return V(d,y,ne);let G=()=>V(d,y,ne),z=j.then(G,G);return j=z,z},supportsNoQueryPageContext:!0,getHeaders:d=>{let y=new Headers;return s==="none"||!d?.anonymous_id||y.append("Set-Cookie",Ze(d.anonymous_id)),y},getSessionInfo:E,getOrCreateAnonymousId:()=>s==="none"?u??(u=Z()):et()}};import{stringify as Qt}from"neoqs";function Ie(t,r,i){let s=t["~standard"].validate(r);if(s instanceof Promise)throw new TypeError("Async schema");if(s.issues)throw new k(s.issues,i);return s.value}function Xt(t,r,i){try{return{success:!0,output:Ie(t,r,i)}}catch(s){if(s instanceof k)return{success:!1,issues:s.issues,source:s.source};throw s}}var X=class{constructor(r){if(this.baseUrl=se[r.environment],this.headers=new Headers({"Content-Type":"application/json",Accept:"application/json"}),r.apiKey.type==="secret"){if(typeof window<"u")throw new Error("Secret key cannot be used in a browser environment");this.headers.set("x-secret-key",r.apiKey.key)}else this.headers.set("x-publishable-key",r.apiKey.key);this.logger=r.logger,this._environment=r.environment}get environment(){return this._environment}getFetchParams(r,i){let s=i.validateIn??!0,{searchParams:p,body:l}=s?nt(r,i):i,u=new URL(this.baseUrl),m=r.pathname;if("params"in i&&i.params)for(let[b,E]of Object.entries(i.params))m=m.replace(`:${b}`,String(E));return u.pathname=m,r.schema.searchParams&&(u.search=Qt(p)),[u.toString(),{method:r.method,body:l?JSON.stringify(l):void 0,headers:this.headers,signal:i.signal,...i.keepalive&&{keepalive:!0}}]}async parseResponse(r,i){let s=await Ae(i.response);if(xe(s,i.response.status),!(i.validateOut??!0))return s;let l=Xt(r.schema.response,s,"response");if(!l.success)throw new k(l.issues,l.source);return l.output}async request(r,i){try{let s=this.getFetchParams(r,i),p=await fetch(...s);return await this.parseResponse(r,{response:p,validateOut:i.validateOut})}catch(s){throw s instanceof k?this.logger.error(s.message,s.issues):this.logger.error(s),s}}};function O(){return{"~standard":{vendor:"inploi",version:1,validate:t=>({value:t})}}}function ce(t){return t}function nt(t,r){let i={searchParams:void 0,body:void 0,validateIn:!1};return t.schema.searchParams&&(i.searchParams=Ie(t.schema.searchParams,"searchParams"in r?r.searchParams:{})),t.schema.body&&(i.body=Ie(t.schema.body,"body"in r?r.body:{})),i}function en({publishableKey:t,env:r,logger:i=Se,onEvent:s,persistence:p,siteKind:l}){let u=Ge({baseUrl:se[r],publishableKey:t}),m=i===!1?be:i,b=new X({environment:r,apiKey:{type:"publishable",key:t},logger:m}),E=tt({rpcClient:b,logger:m,onEvent:s,persistence:p,siteKind:l});return{register:j=>j({logger:m,apiClient:u,analytics:E,rpcClient:b,publishableKey:t,env:r}),analytics:E,apiClient:u}}var tn={VIEW_PAGE:"A careers-site page shown (not a job page).",VIEW_JOB:"A job's own page shown; one per job id the page names.",PAGE_ENGAGEMENT:"A page view's attention summary, sent when the view is hidden or left.",VIEW_SEARCH:"A job search seen for two seconds.",SEARCH_SETTLE:"A searched query or filter with results, unchanged for five seconds.",SEARCH_RESULTS:"A search whose results returned, zero included; once per distinct query, filters, place and order.",SEARCH_PAGINATE:"A move to another page of search results.",SEARCH_JOB_CLICK:"A job opened from search results.",SAVE_JOB:"A job saved or unsaved by the candidate.",LINK_CLICK:"A tracked link clicked.",INTERACTION:"A tagged interaction (`tag` names it).",FLOW_START:"An application flow started.",FLOW_INTERACT:"The candidate's first answer in a flow.",FLOW_END:"An application flow ended.",FLOW_NODE:"The candidate's path through an application, summarised when it pauses or ends.",FLOW_SUBMIT:"An application submitted, with the outcome.",FLOW_REDIRECT:"A flow sent the candidate to an external apply page.",FEEDBACK:"A rating or comment.",ADDRESS_SHADOW_COMPARED:"Engineering telemetry: the address lookup's shadow comparison.",SUBMIT_FORM:"Declared but sent by nothing."};function we(t){let r=JSON.stringify({message:t.message,acceptLabel:t.acceptLabel??"",declineLabel:t.declineLabel??""}),i=5381;for(let s=0;s<r.length;s++)i=i*33^r.charCodeAt(s);return(i>>>0).toString(36)}function Re(t,r){return`${We}:${t}:${r}`}function nn(t,r){if(typeof window>"u")return!1;try{let i=Re(t,we(r));return window.localStorage.getItem(i)==="accepted"}catch{return!1}}function rn(t,r){if(!(typeof window>"u"))try{let i=Re(t,we(r));window.localStorage.setItem(i,"accepted")}catch{}}import*as a from"valibot";var on=["agent","sdk","form","integration","migration"],sn=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"];var an=["screening","cv_match","interview","overall"],cn=["PENDING","IN_PROGRESS","COMPLETED","CANCELLED"],ln=["agent"],pn=["job","company"],dn=["created_at","updated_at","score","interview_score"],un=["asc","desc"],vn=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],mn=["submit","stage_transition","move_to_stage","shortlist","move_to_interview","make_offer","hire","withdraw","disqualify","reinstate","rate","score_written","ats_submission_attempted","ats_submission_succeeded","ats_submission_failed","ats_retry_payload_purged","note","share","verdict","offer_terms","offer_sent","offer_accepted","offer_declined","offer_withdrawn","exported","message_held","message_sent","message_delivered","message_failed","message_uncertain","message_cancelled","message_not_sent","score_override"],gn=["interview","not_for_me"],rt=a.picklist(gn),hn=["accept","reject"],ot=a.picklist(hn),fn=["transient_pass_through","failed_ats_submission_hold","retention","erasure","demo_reset"],ao=a.picklist(fn),yn=["pending","submitted","failed","not_required"],Sn=["user","system","automation","integration","candidate"],le=a.picklist(on),w=a.picklist(sn),x=a.pipe(a.string(),a.trim(),a.minLength(1),a.maxLength(100)),pe=a.picklist(an),it=a.picklist(cn),st=a.picklist(ln),at=a.picklist(pn),ct=a.picklist(dn),lt=a.picklist(un),ee=a.pipe(a.string(),a.trim(),a.minLength(1),a.maxLength(100)),de=a.picklist(vn),Pe=a.picklist(mn),pt=a.picklist(Sn),N=a.picklist(yn);var h=a.variant("type",[a.object({type:a.literal("user"),id:a.pipe(a.string(),a.minLength(1)),email:a.pipe(a.string(),a.minLength(1)),name:a.pipe(a.string(),a.minLength(1))}),a.object({type:a.literal("system"),id:a.pipe(a.string(),a.minLength(1)),name:a.optional(a.string())}),a.object({type:a.literal("automation"),id:a.pipe(a.string(),a.minLength(1)),name:a.optional(a.string())}),a.object({type:a.literal("integration"),id:a.pipe(a.string(),a.minLength(1)),name:a.optional(a.string())}),a.object({type:a.literal("candidate"),id:a.pipe(a.string(),a.minLength(1)),email:a.optional(a.string())})]);import*as R from"valibot";var bn=R.object({total:R.number(),page:R.number(),perPage:R.number(),lastPage:R.number()});function dt(t){return R.object({data:R.array(t),pagination:bn})}import*as o from"valibot";function ut(t){return/^\p{Zs}*\(?\p{Zs}*(\+|00)[\p{Zs}().-]*\d/u.test(t)}var ke=o.object({id:o.string(),email:o.nullable(o.string()),firstName:o.nullable(o.string()),lastName:o.nullable(o.string()),phone:o.nullable(o.string()),source:o.nullable(le),identifiedAt:o.nullable(o.string()),createdAt:o.string(),updatedAt:o.string()}),_n=o.pipe(o.string(),o.trim(),o.minLength(1)),vt=64*1024,te=o.pipe(o.string(),o.trim(),o.minLength(1),o.maxLength(500)),An=o.pipe(o.string(),o.regex(/^[A-Z]{2}$/)),xn=o.pipe(o.string(),o.maxLength(500),o.check(t=>ut(t.trim()),"phone must start with its country code (+ or 00)")),Tn=o.pipe(o.string(),o.regex(/^[\w:-]+$/)),En=new Set(["__proto__","constructor","prototype"]),In=o.custom(t=>kn(t),"custom answer must be a JSON value"),mo=o.strictObject({firstName:o.nullable(o.string()),lastName:o.nullable(o.string()),email:o.string(),phone:o.nullable(o.string()),country:o.nullable(o.string()),postcode:o.nullable(o.string()),currentTitle:o.nullable(o.string()),currentEmployer:o.nullable(o.string()),custom:o.record(o.string(),o.unknown())});var mt=o.strictObject({firstName:o.optional(te),lastName:o.optional(te),phone:o.optional(o.nullable(xn)),country:o.optional(o.nullable(An)),postcode:o.optional(o.nullable(te)),currentTitle:o.optional(o.nullable(te)),currentEmployer:o.optional(o.nullable(te)),custom:o.optional(o.pipe(o.custom(t=>Ce(t)&&Object.keys(t).every(r=>!En.has(r))&&Cn(t)<=vt,`custom must be a JSON object of at most ${vt} bytes`),o.record(Tn,o.nullable(In))))}),wn=o.pipe(o.custom(t=>Ce(t)&&Object.keys(t).every(r=>Object.hasOwn(mt.entries,r)),"set must be an object of profile fields"),mt),Rn=o.strictObject({email:_n}),go=o.strictObject({identity:Rn,set:wn,ifVersion:o.optional(o.pipe(o.number(),o.integer(),o.minValue(0))),disclosures:o.optional(o.unknown())}),Pn=o.strictObject({noticeId:o.pipe(o.string(),o.minLength(1),o.maxLength(200)),version:o.pipe(o.string(),o.minLength(1),o.maxLength(64)),wordingHash:o.pipe(o.string(),o.minLength(1),o.maxLength(128))}),ho=o.variant("withdrawTalentPool",[o.strictObject({withdrawTalentPool:o.literal(!1)}),o.strictObject({withdrawTalentPool:o.literal(!0),notice:Pn})]);function Ce(t){if(typeof t!="object"||t===null)return!1;let r=Object.getPrototypeOf(t);return r===Object.prototype||r===null}function kn(t){try{return gt(t,JSON.parse(JSON.stringify(t)))}catch{return!1}}function gt(t,r){if(t===r)return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null||Array.isArray(t)!==Array.isArray(r)||!Array.isArray(t)&&!Ce(t))return!1;let i=Object.keys(t);return i.length!==Object.keys(r).length?!1:i.every(s=>Object.hasOwn(r,s)&>(t[s],r[s]))}function Cn(t){try{return new TextEncoder().encode(JSON.stringify(t)).length}catch{return Number.POSITIVE_INFINITY}}import*as n from"valibot";import*as f from"valibot";var T=f.pipe(f.string(),f.minLength(1)),B=f.pipe(f.number(),f.integer(),f.minValue(1)),L=f.record(f.string(),f.unknown()),Ln="(?!\\.{1,2}(?:/|$))[A-Za-z0-9._-]{1,128}",yo=f.pipe(f.string(),f.regex(new RegExp(`^${Ln}$`)));import*as _ from"valibot";var ht=_.object({id:_.string(),applicationId:_.string(),status:it,conductedBy:st,agentInterviewId:_.nullable(_.string()),generatedScore:_.nullable(_.number()),completedAt:_.nullable(_.string()),meta:_.nullable(L),createdAt:_.string(),updatedAt:_.string()});var On=n.object({quote:n.string(),source:n.picklist(["cv","answer"])}),Le=n.object({score:n.number(),reason:n.string(),confidence:n.number(),share:n.optional(n.number()),evidence:n.optional(n.array(On))}),Oe=n.object({categoryId:n.string(),answerKey:n.string(),reason:n.picklist(["unanswered","unrecognised"])}),ft=n.object({id:n.string(),candidateId:n.string(),jobId:n.number(),stage:x,stageGroup:w,stageEnteredAt:n.string(),rating:n.nullable(n.number()),disqualifiedAt:n.nullable(n.string()),disqualificationReason:n.nullable(ee),disqualificationNote:n.nullable(n.string()),source:de,sourceDetail:n.nullable(n.string()),sessionId:n.nullable(n.number()),externalApplicationId:n.nullable(n.string()),meta:n.nullable(L),context:n.nullable(L),scoredAt:n.nullable(n.string()),atsSubmissionStatus:n.optional(n.nullable(N)),atsSubmissionAttempts:n.optional(n.number()),atsNextAttemptAt:n.optional(n.nullable(n.string())),atsSubmittedAt:n.optional(n.nullable(n.string())),atsLastErrorCode:n.optional(n.nullable(n.string())),atsLastErrorMessage:n.optional(n.nullable(n.string())),createdAt:n.string(),updatedAt:n.string()}),jn=n.object({id:n.string(),applicationId:n.string(),scoreType:pe,score:n.nullable(n.number()),reason:n.nullable(n.string()),categories:n.nullable(n.record(n.string(),Le)),leftOut:n.optional(n.array(Oe)),scoredBy:n.nullable(n.string()),createdAt:n.string()}),F=n.object({...ft.entries,candidate:n.nullable(ke),score:n.nullable(jn),interview:n.nullable(ht)}),wo=n.object({...ke.entries,applications:n.array(ft)}),yt=n.object({id:n.string(),applicationId:n.string(),action:Pe,fromStage:n.nullable(x),fromStageGroup:n.nullable(w),toStage:n.nullable(x),toStageGroup:n.nullable(w),disqualificationReason:n.nullable(ee),disqualificationNote:n.nullable(n.string()),actorId:n.nullable(n.string()),actorType:pt,actorEmail:n.nullable(n.string()),actorName:n.nullable(n.string()),meta:n.nullable(L),schemaVersion:n.number(),createdAt:n.string()}),Dn=500,St=n.object({scoreId:n.pipe(n.string(),n.minLength(1),n.maxLength(255)),scoredBy:n.pipe(n.string(),n.regex(/^scoring:[^:\s]{1,128}:[^:\s]{1,128}$/)),decision:ot,reason:n.pipe(n.string(),n.maxLength(Dn),n.check(t=>t.trim().length>0,"reason must not be blank")),score:n.pipe(n.number(),n.finite())}),Nn=500,Bn=200,Ro=n.strictObject({from:n.pipe(n.string(),n.isoTimestamp()),to:n.pipe(n.string(),n.isoTimestamp()),jobIds:n.pipe(n.array(n.pipe(n.number(),n.integer(),n.minValue(1))),n.minLength(1),n.maxLength(Nn)),actions:n.optional(n.pipe(n.array(Pe),n.minLength(1))),cursor:n.nullable(n.pipe(n.string(),n.regex(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\|.{1,255}$/))),limit:n.pipe(n.number(),n.integer(),n.minValue(1),n.maxValue(Bn))});import*as g from"valibot";var bt=g.object({anonymousId:T,email:T,firstName:g.nullish(g.string()),lastName:g.nullish(g.string()),phone:g.nullish(g.string()),source:g.nullish(le),updateExisting:g.optional(g.boolean())}),je=g.object({candidateId:g.string(),isNew:g.boolean()}),Lo=g.union([g.object({ok:g.literal(!0)}),je]);import*as e from"valibot";var Fn=["note","share","verdict","offer_terms","offer_sent","offer_accepted","offer_declined","offer_withdrawn","exported","score_override"],Un=["stage_transition","move_to_stage","shortlist","move_to_interview","make_offer","hire","withdraw","disqualify","reinstate","rate",...Fn],ve=e.picklist(Un),De=e.pipe(e.string(),e.transform(t=>t.split(",").map(r=>r.trim()).filter(r=>r.length>0))),Mn=e.pipe(De,e.array(x)),Vn=e.pipe(De,e.array(w)),_t=e.pipe(e.string(),e.transform(t=>t.split(",").map(r=>Number(r.trim())).filter(r=>Number.isInteger(r)&&r>0))),Gn=e.pipe(De,e.array(N)),At=e.object({stages:e.optional(Mn),stage_groups:e.optional(Vn),job_id:e.optional(e.string()),job_ids:e.optional(_t),candidate_id:e.optional(e.string()),is_disqualified:e.optional(e.picklist(["true","false"])),created_from:e.optional(e.string()),created_to:e.optional(e.string()),updated_from:e.optional(e.string()),updated_to:e.optional(e.string()),entered_stage_from:e.optional(e.string()),entered_stage_to:e.optional(e.string()),from:e.optional(e.string()),to:e.optional(e.string()),q:e.optional(e.string()),scored:e.optional(e.picklist(["true","false"])),ats_submission_status:e.optional(Gn),sort:e.optional(ct),order:e.optional(lt),page:e.optional(e.string()),per_page:e.optional(e.string())}),W=e.pipe(T,e.maxLength(255)),qn=e.object({status:e.picklist(["pending","not_required"]),integrationId:e.nullish(W)}),Fo=e.pipe(e.object({candidateId:T,disclosures:e.optional(e.unknown()),jobLocation:e.optional(e.unknown()),jobId:B,meta:e.nullish(L),sessionId:e.nullish(e.number()),externalApplicationId:e.nullish(e.string()),externalJobId:e.nullish(e.pipe(T,e.maxLength(255))),context:e.nullish(L),source:e.nullish(de),sourceDetail:e.nullish(e.string()),stage:e.nullish(x),stageGroup:e.nullish(w),actor:e.nullish(h),atsSubmission:e.nullish(qn),duplicateScope:e.nullish(e.picklist(["job","attempt"]))}),e.check(t=>t.stage==null==(t.stageGroup==null),"stage and stageGroup must be supplied together"),e.check(t=>t.duplicateScope!=="attempt"||typeof t.meta?.attempt_id=="string"&&t.meta.attempt_id!=="","duplicateScope attempt needs meta.attempt_id")),xt=e.object({id:e.string(),stageGroup:e.string(),createdAt:e.string()}),Uo=e.union([e.object({ok:e.literal(!0),duplicate:e.literal(!1),applicationId:e.string(),candidateId:e.string(),atsHeld:e.optional(e.boolean())}),e.object({ok:e.literal(!0),duplicate:e.literal(!0),existingApplication:xt,atsHeld:e.optional(e.boolean())}),e.object({ok:e.literal(!1),refused:e.literal("pass_through_untracked")})]),Tt=e.object({email:e.pipe(e.string(),e.minLength(1),e.maxLength(320)),scope:e.optional(at,"job"),jobId:e.optional(e.union([e.string(),e.number()]))}),Et=e.object({isDuplicate:e.boolean(),existingApplication:e.optional(xt)}),$n=Date.UTC(1e4,0,1),It=e.pipe(e.string(),e.regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})$/),e.check(t=>{let[r,i,s]=t.slice(0,10).split("-").map(Number),p=new Date(Date.UTC(r,i-1,s)),l=Date.parse(t);return p.getUTCMonth()===i-1&&p.getUTCDate()===s&&l>=0&&l<$n},"must be a real time")),Ne=e.pipe(e.string(),e.regex(/^[A-Za-z0-9_.:-]{1,100}$/)),Mo=e.object({status:e.picklist(["pending","submitted","failed"]),nextAttemptAt:e.nullish(It),errorCode:e.nullish(Ne),errorMessage:e.nullish(e.pipe(e.string(),e.maxLength(1e4))),externalApplicationId:e.nullish(W),externalRunId:e.nullish(W),integrationId:e.nullish(W),answeredPending:e.optional(e.boolean())}),Jn=e.picklist(["invalid_transition","next_attempt_required","retry_hold_expired"]),Vo=e.variant("kind",[e.object({kind:e.literal("recorded"),application:F}),e.object({kind:e.literal("rejected"),applicationId:e.string(),from:e.nullable(N),to:N,reason:Jn})]),Hn=e.object({integrationId:e.string(),state:e.picklist(["closed","open","half_open"]),coolingUntil:e.nullable(e.string()),transientCount:e.number(),held:e.boolean()}),Go=e.object({groups:e.array(e.object({integrationId:e.nullable(e.string()),status:e.picklist(["pending","failed"]),errorCode:e.nullable(e.string()),count:e.number(),retryable:e.number(),sendable:e.optional(e.number()),nextRetryUntil:e.optional(e.nullable(e.string()))})),oldestPendingAgeSeconds:e.nullable(e.number()),breakers:e.array(Hn),restoreHold:e.optional(e.boolean())}),qo=e.object({status:e.picklist(["pending","failed"]),integrationId:e.nullable(W),errorCode:e.nullable(Ne)}),$o=e.object({rows:e.array(e.object({id:e.string(),jobId:e.number(),status:e.picklist(["pending","failed"]),errorCode:e.nullable(e.string()),errorMessage:e.nullable(e.string()),attempts:e.number(),nextAttemptAt:e.nullable(e.string()),payloadHeld:e.boolean(),receivedAt:e.nullable(e.string()),retryUntil:e.nullable(e.string()),updatedAt:e.string()})),truncated:e.boolean()}),Jo=e.object({actor:h,expectedAtsLogCount:e.optional(e.pipe(e.number(),e.integer(),e.minValue(0)))}),Kn=e.picklist(["invalid_transition","retry_payload_missing","retry_hold_expired","stale"]),Ho=e.variant("kind",[e.object({kind:e.literal("retried"),application:F}),e.object({kind:e.literal("rejected"),applicationId:e.string(),from:e.nullable(N),reason:Kn})]),Ko=e.object({status:e.optional(e.picklist(["pending","failed"])),integrationId:e.nullable(W),errorCode:e.nullable(Ne),actor:h}),Wo=e.object({retried:e.number()});var Yo=e.object({integrationId:e.string(),wasOpen:e.boolean()}),zo=e.object({integrationId:e.string(),wasHeld:e.boolean()}),Zo=e.object({applicationId:T,scoreType:pe,score:e.number(),reason:e.nullish(e.string()),categories:e.nullish(e.record(e.string(),Le)),leftOut:e.nullish(e.array(Oe)),scoredBy:e.nullish(e.string()),actor:e.nullish(h),idempotencyKey:e.nullish(e.pipe(e.string(),e.maxLength(255)))}),Qo=e.object({scoreId:e.string()}),Xo=dt(F);var ei=e.picklist(["already_in_target_stage","not_in_source_stage","disqualified"]),ti=e.array(yt),ue=e.object({stage:e.nullish(x),note:e.nullish(e.string())}),Wn=e.object({stage:e.nullish(x),startDate:e.nullish(e.string()),note:e.nullish(e.string())}),Yn=e.pipe(e.string(),e.regex(/^[a-z0-9_.:-]{1,64}$/));var U=e.pipe(e.object({mode:e.picklist(["send","hold","none"]),templateKey:e.pipe(e.string(),e.regex(/^(received|rejection|interest_confirmation|campaign:invite|stage:[a-z0-9_-]{1,48})$/)),templateVersion:e.pipe(e.number(),e.integer(),e.minValue(1)),configVersionId:T,voice:e.optional(e.picklist(["casual","formal"])),holdUntil:e.optional(e.pipe(It,e.endsWith("Z","must be UTC with a Z suffix"),e.check(t=>Date.parse(t)>Date.now(),"must be in the future"))),subject:e.optional(e.pipe(e.string(),e.maxLength(200))),body:e.optional(e.pipe(e.string(),e.maxLength(2e4)))}),e.check(t=>t.mode==="hold"||t.holdUntil===void 0,"holdUntil is only for hold mode"),e.transform(({subject:t,body:r,...i})=>({...i,...t===void 0||t===""?{}:{subject:t},...r===void 0||r===""?{}:{body:r}}))),zn=e.variant("action",[e.object({action:e.literal("note"),actor:h,message:e.optional(e.never()),meta:e.object({note:T})}),e.object({action:e.literal("share"),actor:h,message:e.optional(e.never()),meta:e.object({subjectUserIds:e.pipe(e.array(T),e.minLength(1),e.maxLength(20)),comment:e.optional(e.string())})}),e.object({action:e.literal("verdict"),actor:h,message:e.optional(e.never()),meta:e.object({code:rt,comment:e.optional(e.string())})}),e.object({action:e.literal("offer_terms"),actor:h,message:e.optional(e.never()),meta:e.object({salary:e.optional(e.string()),startDate:e.optional(e.string()),hours:e.optional(e.string())})}),...["offer_sent","offer_accepted","offer_declined","offer_withdrawn"].map(t=>e.object({action:e.literal(t),actor:h,message:e.optional(e.never()),meta:e.object({reason:e.optional(e.string())})})),e.object({action:e.literal("exported"),actor:h,message:e.optional(e.never()),meta:e.object({presetId:Yn,exportId:T})}),e.object({action:e.literal("score_override"),actor:h,message:e.optional(e.never()),meta:e.pipe(St,e.transform(t=>({...t,reason:t.reason.trim()})))})]),Zn=e.variant("action",[zn,e.object({action:e.literal("shortlist"),actor:h,message:e.optional(U),meta:e.nullish(ue)}),e.object({action:e.literal("move_to_interview"),actor:h,message:e.optional(U),meta:e.nullish(ue)}),e.object({action:e.literal("make_offer"),actor:h,message:e.optional(U),meta:e.nullish(ue)}),e.object({action:e.literal("hire"),actor:h,message:e.optional(U),meta:e.nullish(Wn)}),e.object({action:e.literal("withdraw"),actor:h,message:e.optional(e.never()),meta:e.nullish(ue)}),e.object({action:e.literal("move_to_stage"),actor:h,message:e.optional(e.never()),meta:e.object({stage:x,stageGroup:w,note:e.nullish(e.string())})}),e.object({action:e.literal("stage_transition"),actor:h,message:e.optional(U),meta:e.object({toStage:x,toStageGroup:w,note:e.nullish(e.string())})}),e.object({action:e.literal("disqualify"),actor:h,message:e.optional(U),meta:e.object({reason:ee,note:e.nullish(e.string())})}),e.object({action:e.literal("reinstate"),actor:h,message:e.optional(U),meta:e.object({toStage:x,toStageGroup:w,note:e.nullish(e.string())})}),e.object({action:e.literal("rate"),actor:h,message:e.optional(e.never()),meta:e.object({rating:e.nullable(e.pipe(e.number(),e.integer(),e.minValue(1),e.maxValue(5)))})})]),ni=e.object({applicationIds:e.pipe(e.array(e.string()),e.minLength(1)),body:Zn}),wt=e.picklist(["already_in_target_stage","not_in_source_stage","disqualified","already_disqualified"]),ri=e.variant("kind",[e.object({kind:e.literal("updated"),action:ve,application:F}),e.object({kind:e.literal("skipped"),action:ve,applicationId:e.string(),reason:wt})]),oi=e.object({updated:e.array(e.object({kind:e.literal("updated"),action:ve,application:F})),skipped:e.array(e.object({kind:e.literal("skipped"),action:ve,applicationId:e.string(),reason:wt})),failed:e.array(e.object({applicationId:e.string(),error:e.string()}))}),v=e.pipe(e.number(),e.integer(),e.minValue(0)),Rt=e.object({APPLIED:v,SHORTLISTED:v,INTERVIEWED:v,OFFERED:v,HIRED:v,REJECTED:v,WITHDRAWN:v}),Qn=e.pipe(e.string(),e.minLength(1),e.maxLength(255)),ii=e.object({pendingShares:e.optional(e.boolean())}),si=e.object({job_ids:_t,verdict_by:e.optional(Qn),pending_shares:e.optional(e.literal("1"))}),ai=e.object({counts:e.record(e.string(),Rt),existingAppliedCounts:e.optional(e.record(e.string(),v)),awaitingVerdictCounts:e.optional(e.record(e.string(),v)),pendingShareCounts:e.optional(e.record(e.string(),v))}),ci=e.omit(At,["sort","order","page","per_page"]),li=e.object({counts:Rt}),Pt=92,Xn=864e5,P=e.pipe(e.string(),e.regex(/^\d{4}-\d{2}-\d{2}$/),e.check(t=>{let r=new Date(`${t}T00:00:00Z`);return!Number.isNaN(r.getTime())&&r.toISOString().slice(0,10)===t},"must be a real calendar day"));function Be({from:t,to:r}){let i=(Date.parse(`${r}T00:00:00Z`)-Date.parse(`${t}T00:00:00Z`))/Xn+1;return i>=1&&i<=Pt}var Fe=`to must be on or after from, and the range must span at most ${Pt} days`,pi=e.pipe(e.object({from:P,to:P}),e.check(Be,Fe)),er=e.object({job_id:B,date:P,received:v,scored:v,shortlisted:v}),di=e.object({rows:e.array(er)}),tr=5e3,ui=e.pipe(e.object({from:P,to:P,jobIds:e.pipe(e.array(B),e.maxLength(tr))}),e.check(Be,Fe)),nr=e.object({job_id:B,date:P,received:v}),vi=e.object({rows:e.array(nr)}),rr=5e3,or=e.pipe(e.object({from:P,to:P,jobIds:e.optional(e.pipe(e.array(B),e.maxLength(rr)))}),e.check(Be,Fe)),mi=e.pipe(e.object({from:e.string(),to:e.string(),job_ids:e.optional(e.string())}),e.transform(({from:t,to:r,job_ids:i})=>({from:t,to:r,jobIds:i===void 0?void 0:i===""?[]:i.split(",").map(s=>/^\d+$/.test(s.trim())?Number(s):Number.NaN)})),or),Ue=e.pipe(e.array(v),e.length(5)),ir=e.object({received:v,scored:v,shortlisted:v,histogram:e.pipe(e.array(v),e.length(101)),median_lag_minutes:e.nullable(e.number()),scored_same_day:v}),sr=e.object({job_id:B,received:v,scored:v,shortlisted:v,score_sum:e.number(),bands:Ue}),ar=e.object({date:P,received:v,scored:v,score_sum:e.number(),bands:Ue,scored_on_day:v}),cr=e.object({id:e.string(),label:e.nullable(e.string()),sum:e.number(),count:v}),lr=e.object({template_id:e.string(),scored:v,criteria:e.array(cr)}),gi=e.object({totals:ir,by_job:e.array(sr),by_day:e.array(ar),criteria:e.array(lr)}),pr=e.object({date:P,scored:v,bands:Ue}),hi=e.object({rows:e.array(pr)});var fi=e.object({...e.omit(At,["page","per_page"]).entries,per_group:e.optional(e.string())}),M=e.object({data:e.array(F),total:v}),yi=e.object({board:e.object({APPLIED:M,SHORTLISTED:M,INTERVIEWED:M,OFFERED:M,HIRED:M,REJECTED:M,WITHDRAWN:M})});import*as Y from"valibot";var dr=({environment:t,publishableKey:r,logger:i})=>{let s=Je[t];return{async checkDuplicate(p){let l;try{l=Y.parse(Tt,{email:p.email,scope:p.scope,...p.scope==="job"&&p.jobId!=null?{jobId:p.jobId}:{}})}catch{return i.error("[TalentBankClient] checkDuplicate input failed validation"),{isDuplicate:!1}}try{let u=await fetch(`${s}/applications/check-duplicate`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":r},body:JSON.stringify(l)});if(!u.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${u.status}`),{isDuplicate:!1};let m=await u.json(),b=Y.safeParse(Et,m);return b.success?b.output:(i.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof m=="object"&&m!=null&&typeof m.isDuplicate=="boolean"?{isDuplicate:m.isDuplicate}:{isDuplicate:!1})}catch(u){return i.error("[TalentBankClient] checkDuplicate failed:",u),{isDuplicate:!1}}},async identify(p){try{if(!p.anonymousId)return i.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let l={email:p.email,firstName:p.firstName,lastName:p.lastName,phone:p.phone,anonymousId:p.anonymousId,source:p.source??"sdk"},u=Y.safeParse(bt,l);if(!u.success)return i.error("[TalentBankClient] identify received invalid input"),null;let m=await fetch(`${s}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":r},body:JSON.stringify(u.output)});if(!m.ok)return i.error(`[TalentBankClient] identify failed with status ${m.status}`),null;let b=Y.safeParse(je,await m.json());return b.success?b.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(l){return i.error("[TalentBankClient] identify failed:",l),null}}}};function ur(t){if(!(typeof document>"u")){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",t,{once:!0});return}Promise.resolve().then(t)}}import*as c from"valibot";var kt=["DAILY","WEEKLY","MONTHLY"],vr=c.record(c.string(),c.union([c.string(),c.array(c.string()),c.object({type:c.literal("provided"),lat:c.number(),lng:c.number(),radius:c.number(),unit:c.optional(c.picklist(["miles","km"])),label:c.optional(c.string())})])),mr={pathname:"/job/:id",method:"GET",schema:{response:c.object({id:c.number(),external_id:c.nullish(c.string()),city:c.nullish(c.string()),town:c.nullish(c.string()),category:c.nullish(c.string())})}};async function gr(t,{contact:r,job:i}){let s={};if(i){let p=await t.request(mr,{params:{id:i.id}});if((i.id_type==="internal"?String(p.id):p.external_id)!==i.id)throw new Error("Job lookup returned a different role");for(let u of["city","town","category"]){let m=p[u]?.trim();m&&(s[u]=[m])}}await t.request(Ct,{body:{contact:r,alerts:"WEEKLY",filters:s}})}var Ct={pathname:"/search/save",method:"POST",schema:{response:O(),body:c.object({contact:c.object({email:c.pipe(c.optional(c.string()),c.string(),c.email()),first_name:c.optional(c.string()),last_name:c.optional(c.string())}),alerts:c.pipe(c.optional(c.string()),c.string(),c.picklist(kt)),filters:vr})}};import*as A from"valibot";var Lt=async t=>{let r={method:"GET",pathname:"/search/filters",schema:{response:A.pipe(A.object({country:A.optional(A.array(A.object({value:A.string()})),[])}),A.transform(({country:i})=>i.map(({value:s})=>s))),searchParams:O()}};return t.request(r,{searchParams:{filters:{country:null}}})},me=new WeakMap,hr=t=>(me.has(t)||(me.set(t,void 0),Lt(t).then(async r=>{let{jobCountryCodes:i}=await import("./sdk.country-codes-W6HRF5SA.mjs");me.set(t,i(r).join(",")||void 0)}).catch(()=>{})),me.get(t)),Ot=(t,r)=>{let i=new Set,s=[];for(let p=0;p<Math.max(t.length,r.length);p++)for(let l of[t[p],r[p]]){if(!l)continue;let u=l.mapbox_id||l.full_address||[l.name,l.place_formatted].filter(Boolean).join(", ");if(!i.has(u)&&(i.add(u),s.push(l),s.length===5))return s}return s},fr=600,yr=async(t,r,i)=>{if(i?.throwIfAborted(),!r){let s=await t();return i?.throwIfAborted(),s}return new Promise((s,p)=>{let l,u,m,b=!1,E=()=>{b=!0,clearTimeout(m),i?.removeEventListener("abort",V)},V=()=>{E(),p(i?.reason)},j=()=>{E(),l?.status==="fulfilled"&&u?.status==="fulfilled"?s(Ot(l.value,u.value)):l?.status==="fulfilled"?s(l.value):u?.status==="fulfilled"?s(u.value):l?.status==="rejected"&&p(l.reason)},ge=(d,y)=>{b||(d?l=y:u=y,l&&u?j():y.status==="fulfilled"&&y.value.length>0&&(m=setTimeout(j,fr)))};i?.addEventListener("abort",V,{once:!0});for(let d of[!0,!1])t(d?r:void 0).then(y=>ge(d,{status:"fulfilled",value:y}),y=>ge(d,{status:"rejected",reason:y}))})};export{tn as ANALYTICS_EVENTS,H as ApiError,X as InploiRpcClient,kt as JOB_ALERT_FREQUENCIES,$ as NotFoundError,K as ParsingError,k as SchemaValidationError,qe as SdkError,J as UnauthorisedError,hr as addressSearchCountry,Ot as blendAddressSuggestions,Re as consentStorageKey,Bt as createPlugin,dr as createTalentBankClient,ce as endpoint,Z as generateUUID,nn as getConsentAcceptance,Lt as getJobCountries,et as getOrCreateAnonymousId,we as hashConsentConfig,en as initialiseSdk,Se as inploiBrandedLogger,Mt as isApiErrorWithData,qt as isSdkError,Nt as jobCountryCodes,be as noLogging,ur as ready,gr as saveClosedRoleJobAlerts,Ct as saveSearchEndpoint,yr as searchAddressSuggestions,rn as setConsentAcceptance,O as typed,nt as validateEndpointInputs};
|
|
1
|
+
import{b as Gt}from"./chunk-U6WFJKHV.mjs";var se="%c[inploi SDK]",ae="color: #65BC67; font-weight: bold;",_e={warn:(...t)=>console.warn(se,ae,...t),error:(...t)=>console.error(se,ae,...t),info:(...t)=>console.info(se,ae,...t),log:(...t)=>console.log(se,ae,...t)},xe={info:()=>{},error:()=>{},log:()=>{},warn:()=>{}};var Jt=t=>t;function Ae(t,o){if(!t)throw new Error(o)}function J(t,o){return o in t}var Jr=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"});var $t="Unauthenticated",Wt="This action is unauthorized.",N=class extends Error{constructor(i,s){super(i);this.status=s,this.name="ErrorWithStatus"}},$=class extends N{constructor(o){super(o??"Not found"),this.name="NotFoundError",this.status=404}},W=class extends N{constructor(o,i){super(o??"You are not authorised to perform this action."),this.name="UnauthorisedError",this.status=i??401}},C=class extends N{constructor(i,s){let d=s?` in ${s}`:"";super(`Schema validation failed${d}`);this.issues=i;this.source=s;this.name="SchemaValidationError",this.status=400}},H=class extends N{constructor(i,s,d){super(i);this.data=d;this.name="ApiError",this.status=s??500}},Ht=t=>t instanceof H&&t.data!==void 0,K=class extends N{constructor(i){super("Error parsing response into JSON.");this.response=i;this.name="ParsingError",this.status=i&&i.status>=300?i.status:500,this.contentType=new Headers(i?.headers).get("content-type")??void 0}};async function Te(t){let i=new Headers(t.headers).get("content-type")?.replace(/;.*/,"").trim().toLowerCase();if(i&&i!=="application/json"&&!i.endsWith("+json"))throw new K(t);return t.json().catch(()=>{throw new K(t)})}var Kt=["message","error","errors","exception","exceptions"];function Yt(t){let o=[];if(typeof t=="object"&&t!==null){for(let i of Kt)if(J(t,i)){let s=t[i];typeof s=="string"&&o.push(s),Array.isArray(s)&&s.every(d=>typeof d=="string")&&o.push(...s)}J(t,"integration_response")&&typeof t.integration_response=="object"&&t.integration_response!==null&&J(t.integration_response,"error")&&typeof t.integration_response.error=="object"&&t.integration_response.error!==null&&J(t.integration_response.error,"message")&&typeof t.integration_response.error.message=="string"&&o.push(t.integration_response.error.message)}return o.length===0&&o.push("Unknown error"),[...new Set(o)].join(", ")}function Ie(t,o){if(o>=300){let i=Yt(t);throw o===404?new $(i):i===$t?new W("You are not authenticated.",o):i===Wt?new W(i,o):new H(i,o,t)}}var Ge=t=>{let o={Accept:"application/json","Content-Type":"application/json","x-publishable-key":t.publishableKey};return{fetch:async(i,s={})=>{let d={...s,headers:{...s.headers,...o}},p=await fetch(`${t.baseUrl}${i}`,d);if(p.status===404)throw new $;let u=await Te(p);return Ie(u,p.status),u}}},Je={NotFound:$,Unauthorised:W,SchemaValidation:C,Api:H,JsonParsing:K};function zt(t){return Object.values(Je).some(o=>t instanceof o)}var $e="3.1.3";var ce={sandbox:"https://api.staging.inploi.com",production:"https://api.inploi.com",_internal_local:"http://api.test"},We={sandbox:"https://talent-bank.staging.inploi.com",production:"https://talent-bank.inploi.com",_internal_local:"http://localhost:8787"},He=$e;var L="isdk_session",Ke=`${L}-candidate_id`,Ye=`${L}-consent`;var le=new Map,Ee={get:t=>{if(le.has(t))return le.get(t)??null;try{return window.sessionStorage.getItem(t)}catch{return null}},set:(t,o)=>{try{window.sessionStorage.setItem(t,o),le.delete(t)}catch{le.set(t,o)}}};var Q=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16));var Qe=7*24*60*60*1e3,Ze=t=>{let o=new Date;return o.setTime(o.getTime()+Qe),`${L}=${t};expires=${o.toUTCString()};path=/`},Zt=(t,o)=>{let i=t.get("session_id");if(o||i)return i;let s=Ee.get(`${L}-session_id`);return typeof s=="string"?s:null},Xt=()=>{if(typeof window>"u")return null;try{let t=window.localStorage.getItem(Ke);return typeof t=="string"&&t!==""?t:null}catch{return null}},en=new RegExp(`(?:^|;\\s*)${L}=([^;]+)`),Z=t=>{let o=t?t.headers.get("cookie"):document.cookie;return o?en.exec(o)?.[1]??null:null},Xe=()=>{try{let t=JSON.parse(window.localStorage.getItem(L)??"null");return typeof t!="object"||t===null||!("id"in t)||!("expires"in t)||typeof t.id!="string"||typeof t.expires!="number"?null:t.id!==""&&t.expires>Date.now()?t.id:null}catch{return null}},ze=()=>Z()??(new URL(location.href).searchParams.get("anonymous_id")?null:Xe()),tn=()=>location.protocol==="https:"&&window.self!==window.top?";SameSite=None;Secure;Partitioned":"",et=t=>{if(document.cookie=Ze(t)+tn(),Z()!==t)try{window.localStorage.setItem(L,JSON.stringify({id:t,expires:Date.now()+Qe}))}catch{}},we=t=>{let o=t?t.url:location.href,{searchParams:i}=new URL(o);return{anonymous_id:t?Z(t)??i.get("anonymous_id"):Z()??i.get("anonymous_id")??Xe(),session_id:Zt(i,typeof window>"u")}},tt=()=>{if(typeof window>"u")throw new Error("getOrCreateAnonymousId() can only be called in browser environment");let t=we().anonymous_id;if(t)return t;let o=Q(),i=we().anonymous_id;return i||(et(o),o)},nn=t=>typeof t!="object"||t===null?null:{anonymous_id:"anonymous_id"in t&&typeof t.anonymous_id=="string"?t.anonymous_id:null,session_id:"session_id"in t&&typeof t.session_id=="string"?t.session_id:null},rn=t=>t==="about:client"?"":t,on={pathname:"/log",method:"POST",schema:{response:j(),body:j()}},nt=({rpcClient:t,logger:o,onEvent:i,persistence:s="device",siteKind:d})=>{let p=null,u=null,h=0,_=0,R=v=>s==="none"?{anonymous_id:null,session_id:v?null:p}:we(v),q=async(v,S,oe)=>{try{let G={library:{name:"inploi-sdk",version:He},page:S},z=R(v.request),ie=s==="none"?null:Xt(),y={anonymous_id:z.anonymous_id,session_id:z.session_id,candidate_id:ie,event:v.event,sent_at:new Date().toISOString(),context:G,properties:v.properties,custom_properties:{...v.customProperties,...oe}},be=s==="none"?null:v.request?Z(v.request):ze(),Me=++h,Mt=await t.request(on,{body:y,...v.keepalive&&{keepalive:!0}}),P=nn(Mt);if(s==="none")return!v.request&&P?.session_id&&Me>_&&(_=Me,P.session_id!==y.session_id&&(p=P.session_id)),y.session_id=v.request?P?.session_id||null:p,i?.(y),{success:!0,data:y};let Se=v.request?be:ze(),qt=Se!==null&&Se!==be,ye=Se??be,qe=!qt&&(!ye||!P?.anonymous_id||ye===P.anonymous_id);return qe?(P?.anonymous_id&&(y.anonymous_id=P.anonymous_id),P?.session_id&&(y.session_id=P.session_id)):y.anonymous_id=ye,!v.request&&typeof window<"u"&&y.anonymous_id&&(qe&&y.session_id&&Ee.set(`${L}-session_id`,y.session_id.toString()),et(y.anonymous_id)),i?.(y),{success:!0,data:y}}catch(G){return o.error("Failed to send log to API. Inspect error response of `log` for more information."),{success:!1,error:G}}},D=Promise.resolve();return{log:async v=>{Ae(v.request||typeof window<"u","Cannot log on the server without a request. Please pass a request to `log`.");let S="request"in v&&v.request?{href:v.request.url,referrer:rn(v.request.referrer),title:""}:{href:location.href,referrer:document.referrer,title:document.title};if(v.page_context==="no_query"){let ie=new URL(S.href),y=S.referrer?new URL(S.referrer):void 0;S={href:ie.origin+ie.pathname,referrer:y?y.origin+y.pathname:""}}s==="none"&&v.event==="FLOW_NODE"&&v.properties&&"trigger"in v.properties&&(v.properties.trigger==="pagehide"||v.properties.trigger==="hidden")&&(v={...v,keepalive:!0});let oe={event_id:Q(),consent_lane:s,site_kind:d};if(s==="device"||v.request||p||v.keepalive)return q(v,S,oe);let G=()=>q(v,S,oe),z=D.then(G,G);return D=z,z},supportsNoQueryPageContext:!0,getHeaders:v=>{let S=new Headers;return s==="none"||!v?.anonymous_id||S.append("Set-Cookie",Ze(v.anonymous_id)),S},getSessionInfo:R,getOrCreateAnonymousId:()=>s==="none"?u??(u=Q()):tt()}};import{stringify as sn}from"neoqs";function Re(t,o,i){let s=t["~standard"].validate(o);if(s instanceof Promise)throw new TypeError("Async schema");if(s.issues)throw new C(s.issues,i);return s.value}function an(t,o,i){try{return{success:!0,output:Re(t,o,i)}}catch(s){if(s instanceof C)return{success:!1,issues:s.issues,source:s.source};throw s}}var X=class{constructor(o){if(this.baseUrl=ce[o.environment],this.headers=new Headers({"Content-Type":"application/json",Accept:"application/json"}),o.apiKey.type==="secret"){if(typeof window<"u")throw new Error("Secret key cannot be used in a browser environment");this.headers.set("x-secret-key",o.apiKey.key)}else this.headers.set("x-publishable-key",o.apiKey.key);this.logger=o.logger,this._environment=o.environment}get environment(){return this._environment}getFetchParams(o,i){let s=i.validateIn??!0,{searchParams:d,body:p}=s?rt(o,i):i,u=new URL(this.baseUrl),h=o.pathname;if("params"in i&&i.params)for(let[_,R]of Object.entries(i.params))h=h.replace(`:${_}`,String(R));return u.pathname=h,o.schema.searchParams&&(u.search=sn(d)),[u.toString(),{method:o.method,body:p?JSON.stringify(p):void 0,headers:this.headers,signal:i.signal,...i.keepalive&&{keepalive:!0}}]}async parseResponse(o,i){let s=await Te(i.response);if(Ie(s,i.response.status),!(i.validateOut??!0))return s;let p=an(o.schema.response,s,"response");if(!p.success)throw new C(p.issues,p.source);return p.output}async request(o,i){try{let s=this.getFetchParams(o,i),d=await fetch(...s);return await this.parseResponse(o,{response:d,validateOut:i.validateOut})}catch(s){throw s instanceof C?this.logger.error(s.message,s.issues):this.logger.error(s),s}}};function j(){return{"~standard":{vendor:"inploi",version:1,validate:t=>({value:t})}}}function pe(t){return t}function rt(t,o){let i={searchParams:void 0,body:void 0,validateIn:!1};return t.schema.searchParams&&(i.searchParams=Re(t.schema.searchParams,"searchParams"in o?o.searchParams:{})),t.schema.body&&(i.body=Re(t.schema.body,"body"in o?o.body:{})),i}function cn({publishableKey:t,env:o,logger:i=_e,onEvent:s,persistence:d,siteKind:p}){let u=Ge({baseUrl:ce[o],publishableKey:t}),h=i===!1?xe:i,_=new X({environment:o,apiKey:{type:"publishable",key:t},logger:h}),R=nt({rpcClient:_,logger:h,onEvent:s,persistence:d,siteKind:p});return{register:D=>D({logger:h,apiClient:u,analytics:R,rpcClient:_,publishableKey:t,env:o}),analytics:R,apiClient:u}}var ln={VIEW_PAGE:"A careers-site page shown (not a job page).",VIEW_JOB:"A job's own page shown; one per job id the page names.",PAGE_ENGAGEMENT:"A page view's attention summary, sent when the view is hidden or left.",VIEW_SEARCH:"A job search seen for two seconds.",SEARCH_SETTLE:"A searched query or filter with results, unchanged for five seconds.",SEARCH_RESULTS:"A search whose results returned, zero included; once per distinct query, filters, place and order.",SEARCH_PAGINATE:"A move to another page of search results.",SEARCH_JOB_CLICK:"A job opened from search results.",SAVE_JOB:"A job saved or unsaved by the candidate.",LINK_CLICK:"A tracked link clicked.",INTERACTION:"A tagged interaction (`tag` names it).",FLOW_START:"An application flow started.",FLOW_INTERACT:"The candidate's first answer in a flow.",FLOW_END:"An application flow ended.",FLOW_NODE:"The candidate's path through an application, summarised when it pauses or ends.",FLOW_SUBMIT:"An application submitted, with the outcome.",FLOW_REDIRECT:"A flow sent the candidate to an external apply page.",FEEDBACK:"A rating or comment.",ADDRESS_SHADOW_COMPARED:"Engineering telemetry: the address lookup's shadow comparison.",SUBMIT_FORM:"Declared but sent by nothing."};function Pe(t){let o=JSON.stringify({message:t.message,acceptLabel:t.acceptLabel??"",declineLabel:t.declineLabel??""}),i=5381;for(let s=0;s<o.length;s++)i=i*33^o.charCodeAt(s);return(i>>>0).toString(36)}function ke(t,o){return`${Ye}:${t}:${o}`}function pn(t,o){if(typeof window>"u")return!1;try{let i=ke(t,Pe(o));return window.localStorage.getItem(i)==="accepted"}catch{return!1}}function dn(t,o){if(!(typeof window>"u"))try{let i=ke(t,Pe(o));window.localStorage.setItem(i,"accepted")}catch{}}import*as c from"valibot";var vn=["agent","sdk","form","integration","migration"],un=["APPLIED","SHORTLISTED","INTERVIEWED","OFFERED","HIRED","REJECTED","WITHDRAWN"];var mn=["screening","cv_match","interview","overall"],gn=["PENDING","IN_PROGRESS","COMPLETED","CANCELLED"],hn=["agent"],fn=["job","company"],bn=["created_at","updated_at","score","interview_score"],Sn=["asc","desc"],yn=["careers_site","chatbot","plugin_job_search","ats_import","referral","agency","other","unknown"],_n=["submit","stage_transition","move_to_stage","shortlist","move_to_interview","make_offer","hire","withdraw","disqualify","reinstate","rate","score_written","ats_submission_attempted","ats_submission_succeeded","ats_submission_failed","ats_retry_payload_purged","note","share","verdict","offer_terms","offer_sent","offer_accepted","offer_declined","offer_withdrawn","exported","message_held","message_sent","message_delivered","message_failed","message_uncertain","message_cancelled","message_not_sent","score_override"],xn=["interview","not_for_me"],ot=c.picklist(xn),An=["accept","reject"],it=c.picklist(An),Tn=["transient_pass_through","failed_ats_submission_hold","retention","erasure","demo_reset"],Io=c.picklist(Tn),In=["pending","submitted","failed","not_required"],En=["user","system","automation","integration","candidate"],de=c.picklist(vn),I=c.picklist(un),x=c.pipe(c.string(),c.trim(),c.minLength(1),c.maxLength(100)),ve=c.picklist(mn),st=c.picklist(gn),at=c.picklist(hn),ct=c.picklist(fn),lt=c.picklist(bn),pt=c.picklist(Sn),ee=c.pipe(c.string(),c.trim(),c.minLength(1),c.maxLength(100)),ue=c.picklist(yn),te=c.picklist(_n),dt=c.picklist(En),B=c.picklist(In);var b=c.variant("type",[c.object({type:c.literal("user"),id:c.pipe(c.string(),c.minLength(1)),email:c.pipe(c.string(),c.minLength(1)),name:c.pipe(c.string(),c.minLength(1))}),c.object({type:c.literal("system"),id:c.pipe(c.string(),c.minLength(1)),name:c.optional(c.string())}),c.object({type:c.literal("automation"),id:c.pipe(c.string(),c.minLength(1)),name:c.optional(c.string())}),c.object({type:c.literal("integration"),id:c.pipe(c.string(),c.minLength(1)),name:c.optional(c.string())}),c.object({type:c.literal("candidate"),id:c.pipe(c.string(),c.minLength(1)),email:c.optional(c.string())})]);import*as k from"valibot";var wn=k.object({total:k.number(),page:k.number(),perPage:k.number(),lastPage:k.number()});function vt(t){return k.object({data:k.array(t),pagination:wn})}import*as r from"valibot";import*as m from"valibot";var E=m.pipe(m.string(),m.minLength(1)),U=m.pipe(m.number(),m.integer(),m.minValue(1)),w=m.record(m.string(),m.unknown()),O=m.pipe(E,m.maxLength(255)),Rn="(?!\\.{1,2}(?:/|$))[A-Za-z0-9._-]{1,128}",Ro=m.pipe(m.string(),m.regex(new RegExp(`^${Rn}$`))),A=m.pipe(m.string(),m.regex(/^\d{4}-\d{2}-\d{2}$/),m.check(t=>{let o=new Date(`${t}T00:00:00Z`);return!Number.isNaN(o.getTime())&&o.toISOString().slice(0,10)===t},"must be a real calendar day"));function ut(t){return/^\p{Zs}*\(?\p{Zs}*(\+|00)[\p{Zs}().-]*\d/u.test(t)}var Ce=r.object({id:r.string(),email:r.nullable(r.string()),firstName:r.nullable(r.string()),lastName:r.nullable(r.string()),phone:r.nullable(r.string()),source:r.nullable(de),identifiedAt:r.nullable(r.string()),createdAt:r.string(),updatedAt:r.string()}),Pn=r.pipe(r.string(),r.trim(),r.minLength(1)),mt=64*1024,ne=r.pipe(r.string(),r.trim(),r.minLength(1),r.maxLength(500)),kn=r.pipe(r.string(),r.regex(/^[A-Z]{2}$/)),Cn=r.pipe(r.string(),r.maxLength(500),r.check(t=>ut(t.trim()),"phone must start with its country code (+ or 00)")),Ln=r.pipe(r.string(),r.regex(/^[\w:-]+$/)),On=new Set(["__proto__","constructor","prototype"]),jn=r.custom(t=>Fn(t),"custom answer must be a JSON value"),Dn=["full_time","part_time","weekends","evenings","flexible","bank"],ht=r.picklist(Dn),jo=r.strictObject({firstName:r.nullable(r.string()),lastName:r.nullable(r.string()),email:r.string(),phone:r.nullable(r.string()),country:r.nullable(r.string()),postcode:r.nullable(r.string()),currentTitle:r.nullable(r.string()),currentEmployer:r.nullable(r.string()),openToRelocation:r.nullable(r.boolean()),availableFrom:r.nullable(r.string()),workingPatterns:r.array(ht),custom:r.record(r.string(),r.unknown())});var gt=r.strictObject({firstName:r.optional(ne),lastName:r.optional(ne),phone:r.optional(r.nullable(Cn)),country:r.optional(r.nullable(kn)),postcode:r.optional(r.nullable(ne)),currentTitle:r.optional(r.nullable(ne)),currentEmployer:r.optional(r.nullable(ne)),openToRelocation:r.optional(r.nullable(r.boolean())),availableFrom:r.optional(r.nullable(A)),workingPatterns:r.optional(r.nullable(r.array(ht))),custom:r.optional(r.pipe(r.custom(t=>Le(t)&&Object.keys(t).every(o=>!On.has(o))&&Vn(t)<=mt,`custom must be a JSON object of at most ${mt} bytes`),r.record(Ln,r.nullable(jn))))}),Nn=r.pipe(r.custom(t=>Le(t)&&Object.keys(t).every(o=>Object.hasOwn(gt.entries,o)),"set must be an object of profile fields"),gt),Bn=r.strictObject({email:Pn}),Do=r.strictObject({talentPool:r.optional(r.boolean())}),No=r.strictObject({identity:Bn,set:Nn,ifVersion:r.optional(r.pipe(r.number(),r.integer(),r.minValue(0))),disclosures:r.optional(r.unknown())}),Un=r.strictObject({noticeId:r.pipe(r.string(),r.minLength(1),r.maxLength(200)),version:r.pipe(r.string(),r.minLength(1),r.maxLength(64)),wordingHash:r.pipe(r.string(),r.minLength(1),r.maxLength(128))}),Bo=r.variant("withdrawTalentPool",[r.strictObject({withdrawTalentPool:r.literal(!1),actorUserId:r.optional(r.pipe(r.string(),r.minLength(1),r.maxLength(200)))}),r.strictObject({withdrawTalentPool:r.literal(!0),notice:Un})]);function Le(t){if(typeof t!="object"||t===null)return!1;let o=Object.getPrototypeOf(t);return o===Object.prototype||o===null}function Fn(t){try{return ft(t,JSON.parse(JSON.stringify(t)))}catch{return!1}}function ft(t,o){if(t===o)return!0;if(typeof t!="object"||t===null||typeof o!="object"||o===null||Array.isArray(t)!==Array.isArray(o)||!Array.isArray(t)&&!Le(t))return!1;let i=Object.keys(t);return i.length!==Object.keys(o).length?!1:i.every(s=>Object.hasOwn(o,s)&&ft(t[s],o[s]))}function Vn(t){try{return new TextEncoder().encode(JSON.stringify(t)).length}catch{return Number.POSITIVE_INFINITY}}import*as n from"valibot";import*as a from"valibot";var St=a.object({id:a.string(),applicationId:a.string(),status:st,conductedBy:at,agentInterviewId:a.nullable(a.string()),generatedScore:a.nullable(a.number()),completedAt:a.nullable(a.string()),meta:a.nullable(w),createdAt:a.string(),updatedAt:a.string()}),Mn=/^[A-Za-z0-9_.:-]{1,128}$/,re=a.pipe(a.string(),a.regex(Mn)),qn=["audio/webm","audio/ogg","audio/mp4","audio/mpeg","audio/wav"],yt=a.pipe(a.string(),a.maxLength(255),a.regex(/^[\x20-\x7e]+$/),a.check(t=>qn.includes(t.split(";")[0].trim().toLowerCase()))),_t=30*1024*1024,Gn=100,Mo=1.5*1024*1024,xt=a.pipe(a.string(),a.regex(/^[0-9a-f]{64}$/)),qo=a.object({questionId:re,contentType:yt,sha256:xt,body:a.pipe(a.instance(ArrayBuffer),a.check(t=>t.byteLength>=1&&t.byteLength<=_t))}),Jn=a.object({questionId:re,text:a.string(),questionType:a.string(),isFollowUp:a.boolean(),parentQuestionId:a.nullable(re)}),$n=a.object({questionId:re,transcript:a.string(),evaluation:a.nullable(w)}),Wn=a.object({questionId:re,contentType:yt,byteLength:a.pipe(a.number(),a.integer(),a.minValue(1),a.maxValue(_t)),sha256:xt}),bt=t=>new Set(t.map(o=>o.questionId)).size===t.length,Go=a.pipe(a.object({questions:a.pipe(a.array(Jn),a.maxLength(Gn)),answers:a.array($n),evaluation:a.nullable(w),generatedScore:a.nullable(a.pipe(a.number(),a.minValue(0),a.maxValue(100))),display:a.object({jobTitle:a.string(),companyName:a.string()}),recordings:a.array(Wn),recordingsWithheld:a.nullable(a.literal("jurisdiction")),completedAt:a.pipe(a.string(),a.isoTimestamp())}),a.check(t=>{let o=new Set(t.questions.map(i=>i.questionId));return o.size===t.questions.length&&bt(t.answers)&&bt(t.recordings)&&[...t.answers,...t.recordings].every(i=>o.has(i.questionId))}));var Hn=n.object({quote:n.string(),source:n.picklist(["cv","answer"])}),Oe=n.object({score:n.number(),reason:n.string(),confidence:n.number(),share:n.optional(n.number()),evidence:n.optional(n.array(Hn))}),je=n.object({categoryId:n.string(),answerKey:n.string(),reason:n.picklist(["unanswered","unrecognised"])}),Tt=n.object({id:n.string(),candidateId:n.string(),jobId:n.number(),stage:x,stageGroup:I,stageEnteredAt:n.string(),rating:n.nullable(n.number()),disqualifiedAt:n.nullable(n.string()),disqualificationReason:n.nullable(ee),disqualificationNote:n.nullable(n.string()),source:ue,sourceDetail:n.nullable(n.string()),sessionId:n.nullable(n.number()),externalApplicationId:n.nullable(n.string()),meta:n.nullable(w),context:n.nullable(w),scoredAt:n.nullable(n.string()),atsSubmissionStatus:n.optional(n.nullable(B)),atsSubmissionAttempts:n.optional(n.number()),atsNextAttemptAt:n.optional(n.nullable(n.string())),atsSubmittedAt:n.optional(n.nullable(n.string())),atsLastErrorCode:n.optional(n.nullable(n.string())),atsLastErrorMessage:n.optional(n.nullable(n.string())),createdAt:n.string(),updatedAt:n.string()}),Kn=n.object({id:n.string(),applicationId:n.string(),scoreType:ve,score:n.nullable(n.number()),reason:n.nullable(n.string()),categories:n.nullable(n.record(n.string(),Oe)),leftOut:n.optional(n.array(je)),reasonsWrittenBlind:n.optional(n.literal(!0)),scoredBy:n.nullable(n.string()),createdAt:n.string()}),F=n.object({...Tt.entries,candidate:n.nullable(Ce),score:n.nullable(Kn),interview:n.nullable(St)}),Yo=n.object({...Ce.entries,applications:n.array(Tt)}),It=n.object({id:n.string(),applicationId:n.string(),action:te,fromStage:n.nullable(x),fromStageGroup:n.nullable(I),toStage:n.nullable(x),toStageGroup:n.nullable(I),disqualificationReason:n.nullable(ee),disqualificationNote:n.nullable(n.string()),actorId:n.nullable(n.string()),actorType:dt,actorEmail:n.nullable(n.string()),actorName:n.nullable(n.string()),meta:n.nullable(w),schemaVersion:n.number(),createdAt:n.string()}),Yn=500,Et=n.object({scoreId:n.pipe(n.string(),n.minLength(1),n.maxLength(255)),scoredBy:n.pipe(n.string(),n.regex(/^scoring:[^:\s]{1,128}:[^:\s]{1,128}$/)),decision:it,reason:n.pipe(n.string(),n.maxLength(Yn),n.check(t=>t.trim().length>0,"reason must not be blank")),score:n.pipe(n.number(),n.finite())}),zn=500,Qn=200,At={from:n.pipe(n.string(),n.isoTimestamp()),to:n.pipe(n.string(),n.isoTimestamp()),actions:n.optional(n.pipe(n.array(te),n.minLength(1))),cursor:n.nullable(n.pipe(n.string(),n.regex(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\|.{1,255}$/))),limit:n.pipe(n.number(),n.integer(),n.minValue(1),n.maxValue(Qn))},zo=n.union([n.strictObject({...At,jobIds:n.pipe(n.array(n.pipe(n.number(),n.integer(),n.minValue(1))),n.minLength(1),n.maxLength(zn))}),n.strictObject({...At,allJobs:n.literal(!0)})]),Zn=500,Qo=n.pipe(n.number(),n.integer(),n.minValue(1)),Zo=n.strictObject({cursor:n.nullable(n.pipe(n.string(),n.regex(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\|.{1,255}$/))),limit:n.pipe(n.number(),n.integer(),n.minValue(1),n.maxValue(Zn)),actions:n.optional(n.pipe(n.array(te),n.minLength(1))),maxApplications:n.optional(n.pipe(n.number(),n.integer(),n.minValue(0)))}),Xn=n.object({id:n.string(),applicationId:n.string(),action:te,fromStage:n.nullable(x),fromStageGroup:n.nullable(I),toStage:n.nullable(x),toStageGroup:n.nullable(I),createdAt:n.string()}),Xo=n.object({rows:n.array(Xn),nextCursor:n.nullable(n.string()),total:n.nullable(n.pipe(n.number(),n.integer(),n.minValue(0))),applications:n.pipe(n.number(),n.integer(),n.minValue(0))});import*as f from"valibot";var wt=f.object({anonymousId:E,email:E,firstName:f.nullish(f.string()),lastName:f.nullish(f.string()),phone:f.nullish(f.string()),source:f.nullish(de),updateExisting:f.optional(f.boolean())}),De=f.object({candidateId:f.string(),isNew:f.boolean()}),ri=f.union([f.object({ok:f.literal(!0)}),De]);import*as e from"valibot";var er=["note","share","verdict","offer_terms","offer_sent","offer_accepted","offer_declined","offer_withdrawn","exported","score_override"],tr=["stage_transition","move_to_stage","shortlist","move_to_interview","make_offer","hire","withdraw","disqualify","reinstate","rate",...er],ge=e.picklist(tr),Ne=e.pipe(e.string(),e.transform(t=>t.split(",").map(o=>o.trim()).filter(o=>o.length>0))),nr=e.pipe(Ne,e.array(x)),rr=e.pipe(Ne,e.array(I)),Rt=e.pipe(e.string(),e.transform(t=>t.split(",").map(o=>Number(o.trim())).filter(o=>Number.isInteger(o)&&o>0))),or=e.pipe(Ne,e.array(B)),Pt=e.object({stages:e.optional(nr),stage_groups:e.optional(rr),job_id:e.optional(e.string()),job_ids:e.optional(Rt),candidate_id:e.optional(e.string()),is_disqualified:e.optional(e.picklist(["true","false"])),created_from:e.optional(e.string()),created_to:e.optional(e.string()),updated_from:e.optional(e.string()),updated_to:e.optional(e.string()),entered_stage_from:e.optional(e.string()),entered_stage_to:e.optional(e.string()),from:e.optional(e.string()),to:e.optional(e.string()),q:e.optional(e.string()),scored:e.optional(e.picklist(["true","false"])),ats_submission_status:e.optional(or),sort:e.optional(lt),order:e.optional(pt),page:e.optional(e.string()),per_page:e.optional(e.string())}),ir=e.object({status:e.picklist(["pending","not_required"]),integrationId:e.nullish(O)}),li=e.pipe(e.object({candidateId:E,disclosures:e.optional(e.unknown()),jobLocation:e.optional(e.unknown()),jobId:U,meta:e.nullish(w),sessionId:e.nullish(e.number()),externalApplicationId:e.nullish(e.string()),externalJobId:e.nullish(e.pipe(E,e.maxLength(255))),context:e.nullish(w),source:e.nullish(ue),sourceDetail:e.nullish(e.string()),stage:e.nullish(x),stageGroup:e.nullish(I),actor:e.nullish(b),atsSubmission:e.nullish(ir),duplicateScope:e.nullish(e.picklist(["job","attempt"])),anonymousId:e.nullish(O)}),e.check(t=>t.stage==null==(t.stageGroup==null),"stage and stageGroup must be supplied together"),e.check(t=>t.duplicateScope!=="attempt"||typeof t.meta?.attempt_id=="string"&&t.meta.attempt_id!=="","duplicateScope attempt needs meta.attempt_id")),kt=e.object({id:e.string(),stageGroup:e.string(),createdAt:e.string()}),pi=e.union([e.object({ok:e.literal(!0),duplicate:e.literal(!1),applicationId:e.string(),candidateId:e.string(),atsHeld:e.optional(e.boolean())}),e.object({ok:e.literal(!0),duplicate:e.literal(!0),existingApplication:kt,atsHeld:e.optional(e.boolean())}),e.object({ok:e.literal(!1),refused:e.literal("pass_through_untracked")})]),Ct=e.object({email:e.pipe(e.string(),e.minLength(1),e.maxLength(320)),scope:e.optional(ct,"job"),jobId:e.optional(e.union([e.string(),e.number()]))}),Lt=e.object({isDuplicate:e.boolean(),existingApplication:e.optional(kt)}),sr=Date.UTC(1e4,0,1),Ot=e.pipe(e.string(),e.regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})$/),e.check(t=>{let[o,i,s]=t.slice(0,10).split("-").map(Number),d=new Date(Date.UTC(o,i-1,s)),p=Date.parse(t);return d.getUTCMonth()===i-1&&d.getUTCDate()===s&&p>=0&&p<sr},"must be a real time")),Be=e.pipe(e.string(),e.regex(/^[A-Za-z0-9_.:-]{1,100}$/)),di=e.object({status:e.picklist(["pending","submitted","failed"]),nextAttemptAt:e.nullish(Ot),errorCode:e.nullish(Be),errorMessage:e.nullish(e.pipe(e.string(),e.maxLength(1e4))),externalApplicationId:e.nullish(O),externalRunId:e.nullish(O),integrationId:e.nullish(O),answeredPending:e.optional(e.boolean())}),ar=e.picklist(["invalid_transition","next_attempt_required","retry_hold_expired"]),vi=e.variant("kind",[e.object({kind:e.literal("recorded"),application:F}),e.object({kind:e.literal("rejected"),applicationId:e.string(),from:e.nullable(B),to:B,reason:ar})]),cr=e.object({integrationId:e.string(),state:e.picklist(["closed","open","half_open"]),coolingUntil:e.nullable(e.string()),transientCount:e.number(),held:e.boolean()}),ui=e.object({groups:e.array(e.object({integrationId:e.nullable(e.string()),status:e.picklist(["pending","failed"]),errorCode:e.nullable(e.string()),count:e.number(),retryable:e.number(),sendable:e.optional(e.number()),nextRetryUntil:e.optional(e.nullable(e.string()))})),oldestPendingAgeSeconds:e.nullable(e.number()),breakers:e.array(cr),restoreHold:e.optional(e.boolean())}),mi=e.object({status:e.picklist(["pending","failed"]),integrationId:e.nullable(O),errorCode:e.nullable(Be)}),gi=e.object({rows:e.array(e.object({id:e.string(),jobId:e.number(),status:e.picklist(["pending","failed"]),errorCode:e.nullable(e.string()),errorMessage:e.nullable(e.string()),attempts:e.number(),nextAttemptAt:e.nullable(e.string()),payloadHeld:e.boolean(),receivedAt:e.nullable(e.string()),retryUntil:e.nullable(e.string()),updatedAt:e.string()})),truncated:e.boolean()}),hi=e.object({actor:b,expectedAtsLogCount:e.optional(e.pipe(e.number(),e.integer(),e.minValue(0)))}),lr=e.picklist(["invalid_transition","retry_payload_missing","retry_hold_expired","stale"]),fi=e.variant("kind",[e.object({kind:e.literal("retried"),application:F}),e.object({kind:e.literal("rejected"),applicationId:e.string(),from:e.nullable(B),reason:lr})]),bi=e.object({status:e.optional(e.picklist(["pending","failed"])),integrationId:e.nullable(O),errorCode:e.nullable(Be),actor:b}),Si=e.object({retried:e.number()}),pr=O,yi=e.object({integrationIds:e.optional(e.pipe(e.array(pr),e.maxLength(100)))}),_i=e.object({integrationId:e.string(),wasOpen:e.boolean()}),xi=e.object({integrationId:e.string(),wasHeld:e.boolean()}),Ai=e.object({applicationId:E,scoreType:ve,score:e.number(),reason:e.nullish(e.string()),categories:e.nullish(e.record(e.string(),Oe)),leftOut:e.nullish(e.array(je)),reasonsWrittenBlind:e.nullish(e.boolean()),scoredBy:e.nullish(e.string()),actor:e.nullish(b),idempotencyKey:e.nullish(e.pipe(e.string(),e.maxLength(255)))}),Ti=e.object({scoreId:e.string()}),Ii=vt(F);var Ei=e.picklist(["already_in_target_stage","not_in_source_stage","disqualified"]),wi=e.array(It),me=e.object({stage:e.nullish(x),note:e.nullish(e.string())}),dr=e.object({stage:e.nullish(x),startDate:e.nullish(e.string()),note:e.nullish(e.string())}),vr=e.pipe(e.string(),e.regex(/^[a-z0-9_.:-]{1,64}$/));var V=e.pipe(e.object({mode:e.picklist(["send","hold","none"]),templateKey:e.pipe(e.string(),e.regex(/^(received|rejection|interest_confirmation|campaign:invite|stage:[a-z0-9_-]{1,48})$/)),templateVersion:e.pipe(e.number(),e.integer(),e.minValue(1)),configVersionId:E,voice:e.optional(e.picklist(["casual","formal"])),holdUntil:e.optional(e.pipe(Ot,e.endsWith("Z","must be UTC with a Z suffix"),e.check(t=>Date.parse(t)>Date.now(),"must be in the future"))),subject:e.optional(e.pipe(e.string(),e.maxLength(200))),body:e.optional(e.pipe(e.string(),e.maxLength(2e4)))}),e.check(t=>t.mode==="hold"||t.holdUntil===void 0,"holdUntil is only for hold mode"),e.transform(({subject:t,body:o,...i})=>({...i,...t===void 0||t===""?{}:{subject:t},...o===void 0||o===""?{}:{body:o}}))),ur=e.variant("action",[e.object({action:e.literal("note"),actor:b,message:e.optional(e.never()),meta:e.object({note:E})}),e.object({action:e.literal("share"),actor:b,message:e.optional(e.never()),meta:e.object({subjectUserIds:e.pipe(e.array(E),e.minLength(1),e.maxLength(20)),comment:e.optional(e.string())})}),e.object({action:e.literal("verdict"),actor:b,message:e.optional(e.never()),meta:e.object({code:ot,comment:e.optional(e.string())})}),e.object({action:e.literal("offer_terms"),actor:b,message:e.optional(e.never()),meta:e.object({salary:e.optional(e.string()),startDate:e.optional(e.string()),hours:e.optional(e.string())})}),...["offer_sent","offer_accepted","offer_declined","offer_withdrawn"].map(t=>e.object({action:e.literal(t),actor:b,message:e.optional(e.never()),meta:e.object({reason:e.optional(e.string())})})),e.object({action:e.literal("exported"),actor:b,message:e.optional(e.never()),meta:e.object({presetId:vr,exportId:E})}),e.object({action:e.literal("score_override"),actor:b,message:e.optional(e.never()),meta:e.pipe(Et,e.transform(t=>({...t,reason:t.reason.trim()})))})]),mr=e.variant("action",[ur,e.object({action:e.literal("shortlist"),actor:b,message:e.optional(V),meta:e.nullish(me)}),e.object({action:e.literal("move_to_interview"),actor:b,message:e.optional(V),meta:e.nullish(me)}),e.object({action:e.literal("make_offer"),actor:b,message:e.optional(V),meta:e.nullish(me)}),e.object({action:e.literal("hire"),actor:b,message:e.optional(V),meta:e.nullish(dr)}),e.object({action:e.literal("withdraw"),actor:b,message:e.optional(e.never()),meta:e.nullish(me)}),e.object({action:e.literal("move_to_stage"),actor:b,message:e.optional(e.never()),meta:e.object({stage:x,stageGroup:I,note:e.nullish(e.string())})}),e.object({action:e.literal("stage_transition"),actor:b,message:e.optional(V),meta:e.object({toStage:x,toStageGroup:I,note:e.nullish(e.string())})}),e.object({action:e.literal("disqualify"),actor:b,message:e.optional(V),meta:e.object({reason:ee,note:e.nullish(e.string())})}),e.object({action:e.literal("reinstate"),actor:b,message:e.optional(V),meta:e.object({toStage:x,toStageGroup:I,note:e.nullish(e.string())})}),e.object({action:e.literal("rate"),actor:b,message:e.optional(e.never()),meta:e.object({rating:e.nullable(e.pipe(e.number(),e.integer(),e.minValue(1),e.maxValue(5)))})})]),Ri=e.object({applicationIds:e.pipe(e.array(e.string()),e.minLength(1)),body:mr}),jt=e.picklist(["already_in_target_stage","not_in_source_stage","disqualified","already_disqualified"]),Pi=e.variant("kind",[e.object({kind:e.literal("updated"),action:ge,application:F}),e.object({kind:e.literal("skipped"),action:ge,applicationId:e.string(),reason:jt})]),ki=e.object({updated:e.array(e.object({kind:e.literal("updated"),action:ge,application:F})),skipped:e.array(e.object({kind:e.literal("skipped"),action:ge,applicationId:e.string(),reason:jt})),failed:e.array(e.object({applicationId:e.string(),error:e.string()}))}),g=e.pipe(e.number(),e.integer(),e.minValue(0)),Dt=e.object({APPLIED:g,SHORTLISTED:g,INTERVIEWED:g,OFFERED:g,HIRED:g,REJECTED:g,WITHDRAWN:g}),gr=e.pipe(e.string(),e.minLength(1),e.maxLength(255)),Ci=e.object({pendingShares:e.optional(e.boolean())}),Li=e.object({job_ids:Rt,verdict_by:e.optional(gr),pending_shares:e.optional(e.literal("1"))}),Oi=e.object({counts:e.record(e.string(),Dt),existingAppliedCounts:e.optional(e.record(e.string(),g)),awaitingVerdictCounts:e.optional(e.record(e.string(),g)),pendingShareCounts:e.optional(e.record(e.string(),g))}),ji=e.omit(Pt,["sort","order","page","per_page"]),Di=e.object({counts:Dt}),Nt=92,hr=864e5;function Ue({from:t,to:o}){let i=(Date.parse(`${o}T00:00:00Z`)-Date.parse(`${t}T00:00:00Z`))/hr+1;return i>=1&&i<=Nt}var Fe=`to must be on or after from, and the range must span at most ${Nt} days`,Ni=e.pipe(e.object({from:A,to:A}),e.check(Ue,Fe)),fr=e.object({job_id:U,date:A,received:g,scored:g,shortlisted:g}),Bi=e.object({rows:e.array(fr)}),br=5e3,Ui=e.pipe(e.object({from:A,to:A,jobIds:e.pipe(e.array(U),e.maxLength(br))}),e.check(Ue,Fe)),Sr=e.object({job_id:U,date:A,received:g}),Fi=e.object({rows:e.array(Sr)}),yr=5e3,_r=e.pipe(e.object({from:A,to:A,jobIds:e.optional(e.pipe(e.array(U),e.maxLength(yr)))}),e.check(Ue,Fe)),Vi=e.pipe(e.object({from:e.string(),to:e.string(),job_ids:e.optional(e.string())}),e.transform(({from:t,to:o,job_ids:i})=>({from:t,to:o,jobIds:i===void 0?void 0:i===""?[]:i.split(",").map(s=>/^\d+$/.test(s.trim())?Number(s):Number.NaN)})),_r),Ve=e.pipe(e.array(g),e.length(5)),xr=e.object({received:g,scored:g,shortlisted:g,histogram:e.pipe(e.array(g),e.length(101)),median_lag_minutes:e.nullable(e.number()),scored_same_day:g}),Ar=e.object({job_id:U,received:g,scored:g,shortlisted:g,score_sum:e.number(),bands:Ve}),Tr=e.object({date:A,received:g,scored:g,score_sum:e.number(),bands:Ve,scored_on_day:g}),Ir=e.object({id:e.string(),label:e.nullable(e.string()),sum:e.number(),count:g}),Er=e.object({template_id:e.string(),scored:g,criteria:e.array(Ir)}),Mi=e.object({totals:xr,by_job:e.array(Ar),by_day:e.array(Tr),criteria:e.array(Er)}),wr=e.object({date:A,scored:g,bands:Ve}),qi=e.object({rows:e.array(wr)});var Gi=e.object({...e.omit(Pt,["page","per_page"]).entries,per_group:e.optional(e.string())}),M=e.object({data:e.array(F),total:g}),Ji=e.object({board:e.object({APPLIED:M,SHORTLISTED:M,INTERVIEWED:M,OFFERED:M,HIRED:M,REJECTED:M,WITHDRAWN:M})});import*as Y from"valibot";var Rr=({environment:t,publishableKey:o,logger:i})=>{let s=We[t];return{async checkDuplicate(d){let p;try{p=Y.parse(Ct,{email:d.email,scope:d.scope,...d.scope==="job"&&d.jobId!=null?{jobId:d.jobId}:{}})}catch{return i.error("[TalentBankClient] checkDuplicate input failed validation"),{isDuplicate:!1}}try{let u=await fetch(`${s}/applications/check-duplicate`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":o},body:JSON.stringify(p)});if(!u.ok)return i.error(`[TalentBankClient] checkDuplicate failed with status ${u.status}`),{isDuplicate:!1};let h=await u.json(),_=Y.safeParse(Lt,h);return _.success?_.output:(i.error("[TalentBankClient] checkDuplicate response failed strict validation; falling back to isDuplicate flag"),typeof h=="object"&&h!=null&&typeof h.isDuplicate=="boolean"?{isDuplicate:h.isDuplicate}:{isDuplicate:!1})}catch(u){return i.error("[TalentBankClient] checkDuplicate failed:",u),{isDuplicate:!1}}},async identify(d){try{if(!d.anonymousId)return i.error("[TalentBankClient] identify skipped because anonymousId is missing"),null;let p={email:d.email,firstName:d.firstName,lastName:d.lastName,phone:d.phone,anonymousId:d.anonymousId,source:d.source??"sdk"},u=Y.safeParse(wt,p);if(!u.success)return i.error("[TalentBankClient] identify received invalid input"),null;let h=await fetch(`${s}/identify`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","x-publishable-key":o},body:JSON.stringify(u.output)});if(!h.ok)return i.error(`[TalentBankClient] identify failed with status ${h.status}`),null;let _=Y.safeParse(De,await h.json());return _.success?_.output:(i.error("[TalentBankClient] identify returned an invalid response"),null)}catch(p){return i.error("[TalentBankClient] identify failed:",p),null}}}};function Pr(t){if(!(typeof document>"u")){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",t,{once:!0});return}Promise.resolve().then(t)}}import*as l from"valibot";var Bt=["DAILY","WEEKLY","MONTHLY"],kr=l.record(l.string(),l.union([l.string(),l.array(l.string()),l.object({type:l.literal("provided"),lat:l.number(),lng:l.number(),radius:l.number(),unit:l.optional(l.picklist(["miles","km"])),label:l.optional(l.string())})])),Cr={pathname:"/job/:id",method:"GET",schema:{response:l.object({id:l.number(),external_id:l.nullish(l.string()),city:l.nullish(l.string()),town:l.nullish(l.string()),category:l.nullish(l.string())})}};async function Lr(t,{contact:o,job:i}){let s={};if(i){let d=await t.request(Cr,{params:{id:i.id}});if((i.id_type==="internal"?String(d.id):d.external_id)!==i.id)throw new Error("Job lookup returned a different role");for(let u of["city","town","category"]){let h=d[u]?.trim();h&&(s[u]=[h])}}await t.request(Ut,{body:{contact:o,alerts:"WEEKLY",filters:s}})}var Ut={pathname:"/search/save",method:"POST",schema:{response:j(),body:l.object({contact:l.object({email:l.pipe(l.optional(l.string()),l.string(),l.email()),first_name:l.optional(l.string()),last_name:l.optional(l.string())}),alerts:l.pipe(l.optional(l.string()),l.string(),l.picklist(Bt)),filters:kr})}};import*as T from"valibot";var Ft=async t=>{let o={method:"GET",pathname:"/search/filters",schema:{response:T.pipe(T.object({country:T.optional(T.array(T.object({value:T.string()})),[])}),T.transform(({country:i})=>i.map(({value:s})=>s))),searchParams:j()}};return t.request(o,{searchParams:{filters:{country:null}}})},he=new WeakMap,Or=t=>(he.has(t)||(he.set(t,void 0),Ft(t).then(async o=>{let{jobCountryCodes:i}=await import("./sdk.country-codes-R6CUZ3IG.mjs");he.set(t,i(o).join(",")||void 0)}).catch(()=>{})),he.get(t)),Vt=(t,o)=>{let i=new Set,s=[];for(let d=0;d<Math.max(t.length,o.length);d++)for(let p of[t[d],o[d]]){if(!p)continue;let u=p.mapbox_id||p.full_address||[p.name,p.place_formatted].filter(Boolean).join(", ");if(!i.has(u)&&(i.add(u),s.push(p),s.length===5))return s}return s},jr=600,Dr=async(t,o,i)=>{if(i?.throwIfAborted(),!o){let s=await t();return i?.throwIfAborted(),s}return new Promise((s,d)=>{let p,u,h,_=!1,R=()=>{_=!0,clearTimeout(h),i?.removeEventListener("abort",q)},q=()=>{R(),d(i?.reason)},D=()=>{R(),p?.status==="fulfilled"&&u?.status==="fulfilled"?s(Vt(p.value,u.value)):p?.status==="fulfilled"?s(p.value):u?.status==="fulfilled"?s(u.value):p?.status==="rejected"&&d(p.reason)},fe=(v,S)=>{_||(v?p=S:u=S,p&&u?D():S.status==="fulfilled"&&S.value.length>0&&(h=setTimeout(D,jr)))};i?.addEventListener("abort",q,{once:!0});for(let v of[!0,!1])t(v?o:void 0).then(S=>fe(v,{status:"fulfilled",value:S}),S=>fe(v,{status:"rejected",reason:S}))})};export{ln as ANALYTICS_EVENTS,H as ApiError,X as InploiRpcClient,Bt as JOB_ALERT_FREQUENCIES,$ as NotFoundError,K as ParsingError,C as SchemaValidationError,Je as SdkError,W as UnauthorisedError,Or as addressSearchCountry,Vt as blendAddressSuggestions,ke as consentStorageKey,Jt as createPlugin,Rr as createTalentBankClient,pe as endpoint,Q as generateUUID,pn as getConsentAcceptance,Ft as getJobCountries,tt as getOrCreateAnonymousId,Pe as hashConsentConfig,cn as initialiseSdk,_e as inploiBrandedLogger,Ht as isApiErrorWithData,zt as isSdkError,Gt as jobCountryCodes,xe as noLogging,Pr as ready,Lr as saveClosedRoleJobAlerts,Ut as saveSearchEndpoint,Dr as searchAddressSuggestions,dn as setConsentAcceptance,j as typed,rt as validateEndpointInputs};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|