@frigade/react 1.34.3 → 1.34.4

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/lib/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import{ThemeProvider as Pp}from"styled-components";import yt,{useContext as ep,useEffect as Eo,useState as mr}from"react";import{useCallback as xt,useContext as vl,useEffect as Bl}from"react";import Ko,{useMemo as Nr}from"react";var Ir="1.34.3 ";var Ne="NOT_STARTED_STEP",Q="COMPLETED_FLOW",mo="ABORTED_FLOW",gt="STARTED_FLOW",$e="NOT_STARTED_FLOW",Me="COMPLETED_STEP",uo="STARTED_STEP";function _e(){let{publicApiKey:e,userId:t,apiUrl:o}=Ko.useContext(K);return{config:Nr(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":Ir,"X-Frigade-SDK-Platform":"React"}}),[e,t]),apiUrl:Nr(()=>`${o}/v1/public/`,[o])}}var gl="frigade-last-call-at-",xl="frigade-last-call-data-";function Bt(){let{shouldGracefullyDegrade:e,readonly:t}=Ko.useContext(K);return async(o,r)=>{if(t&&(r.method==="POST"||r.method==="PUT"||r.method==="DELETE"))return vt();if(e)return console.log(`Skipping ${o} call to Frigade due to error`),vt();let i=gl+o,n=xl+o;if(window&&window.localStorage&&r&&r.body&&r.method==="POST"){let p=window.localStorage.getItem(i),c=window.localStorage.getItem(n);if(p&&c&&c==r.body){let a=new Date(p);if(new Date().getTime()-a.getTime()<1e3)return vt()}window.localStorage.setItem(i,new Date().toISOString()),window.localStorage.setItem(n,r.body)}let s;try{s=await fetch(o,r)}catch(p){return vt(p)}return s?s.ok?s:vt(s.statusText):vt()}}function vt(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function Et(){let{publicApiKey:e,shouldGracefullyDegrade:t}=Ko.useContext(K);function o(){return t?(console.error("Frigade hooks cannot be used when Frigade SDK has failed to initialize"),!1):e?!0:(console.error("Frigade hooks cannot be used outside the scope of FrigadeProvider"),!1)}return{verifySDKInitiated:o}}import{useContext as Fl,useState as Or}from"react";import{useContext as Cl,useEffect as Sl,useState as yl}from"react";import bl from"swr";import{useContext as hl}from"react";function Pe(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o,setCompletedFlowsToKeepOpenDuringSession:r,completedFlowsToKeepOpenDuringSession:i}=hl(K);function n(d,h=!1){return e[d]??h}function s(d,h){t(y=>({...y,[d]:h}))}function p(d){t(h=>{let{[d]:y,...w}=h;return{...w}})}function c(d){i.includes(d)||r(h=>[...h,d])}function a(d){return i.includes(d)}function x(d){return Object.entries(e).some(([h,y])=>y&&h!=d)||o}return{getOpenFlowState:n,setOpenFlowState:s,resetOpenFlowState:p,hasOpenModals:x,setKeepCompletedFlowOpenDuringSession:c,shouldKeepCompletedFlowOpenDuringSession:a}}import wl from"swr/immutable";var Tl="unknown";function ve(){let{config:e,apiUrl:t}=_e(),{publicApiKey:o,userId:r,organizationId:i,flows:n,setShouldGracefullyDegrade:s,readonly:p}=Cl(K),{resetOpenFlowState:c}=Pe(),[a,x]=yl(!1),d={data:n.map(k=>({flowId:k.id,flowState:Q,lastStepId:null,userId:r,foreignUserId:r,stepStates:{},shouldTrigger:!1}))},h=k=>fetch(k,e).then(T=>{if(T.ok)return T.json();throw new Error("Failed to fetch user flow states")}).catch(T=>(console.log(`Error fetching ${k}: ${T}. Will gracefully degrade and hide Frigade`),s(!0),d)),y=o&&n&&r?`${t}userFlowStates?foreignUserId=${encodeURIComponent(r)}${i?`&foreignUserGroupId=${encodeURIComponent(i)}`:""}`:null,{data:w,isLoading:v,mutate:f,error:E}=p?wl(y,h):bl(y,h,{revalidateOnFocus:!0,revalidateIfStale:!0,keepPreviousData:!0,revalidateOnMount:!0,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>d,onLoadingSlow:()=>d}),b=w==null?void 0:w.data;Sl(()=>{!a&&!v&&b&&x(!0)},[b,a,v]);async function S(k){if(b&&!p){let T=b.find(N=>N.flowId===k);T&&T.flowState!==Q&&(T.flowState=Q),await f(Promise.resolve({...w,data:b}),{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}async function A(k,T,N){if(b){let I=b.find(U=>U.flowId===k);I&&(I.stepStates[T]=N,I.flowState=gt),await f(Promise.resolve({...w,data:b}),{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}async function C(k,T,N){if(b){let I=b.find(U=>U.flowId===k);I&&(I.lastStepId=T,I.stepStates[T]=N,I.flowState=gt),await f({...w,data:b},{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}async function m(k){if(b){let T=b.find(N=>N.flowId===k);T&&T.flowState!==$e&&(T.flowState=$e,T.lastStepId=Tl,Object.keys(T.stepStates).forEach(N=>{T.stepStates[N].actionType=Ne,T.stepStates[N].createdAt=new Date().toISOString()}),await f({...w,data:b},{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1}),c(k))}}async function B(k,T){if(b){let N=b.find(I=>I.flowId===k);N&&N.stepStates[T]!==Ne&&(N.stepStates[T]=Ne),await f({...w,data:b},{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}return{userFlowStatesData:b,isLoadingUserFlowStateData:!a,mutateUserFlowState:f,optimisticallyMarkFlowCompleted:S,optimisticallyMarkFlowNotStarted:m,optimisticallyMarkStepCompleted:A,optimisticallyMarkStepNotStarted:B,optimisticallyMarkStepStarted:C,error:E}}function Gt(){let{config:e,apiUrl:t}=_e(),{userFlowStatesData:o,mutateUserFlowState:r}=ve(),{failedFlowResponses:i,setFailedFlowResponses:n,flowResponses:s,setFlowResponses:p}=Fl(K),[c,a]=Or(new Set),[x,d]=Or(new Set),h=Bt();function y(f){let E=JSON.stringify(f);if(c.has(E))return null;c.add(E),a(c),x.add(f),d(x);let b=s==null?void 0:s.find(S=>S.flowSlug===f.flowSlug&&S.stepId===f.stepId&&S.actionType===f.actionType&&S.createdAt===f.createdAt);return h(`${t}flowResponses`,{...e,method:"POST",body:E}).then(S=>{S.status!==200&&S.status!==201?(console.log("Failed to send flow response for step "+f.stepId+". Will retry again later."),n([...i,f])):b||p(A=>[...A??[],f])})}async function w(f){f.foreignUserId&&(f.actionType===gt||f.actionType===$e?await y(f):f.actionType===Q?await y(f):f.actionType===uo?await y(f):f.actionType===Me?await y(f):f.actionType===mo?await y(f):f.actionType===Ne&&await y(f))}function v(){let f=[];return o==null||o.forEach(E=>{if(E&&E.stepStates&&Object.keys(E.stepStates).length!==0)for(let b in E.stepStates){let S=E.stepStates[b];f.push({foreignUserId:E.foreignUserId,flowSlug:E.flowId,stepId:S.stepId,actionType:S.actionType,data:{},createdAt:new Date(S.createdAt),blocked:S.blocked,hidden:S.hidden})}}),[...f,...s]}return{addResponse:w,setFlowResponses:p,getFlowResponses:v}}import El from"swr";var kl=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,Lr=e=>{let t=kl.exec(e);if(t===null)return null;let o=null;return t.forEach((r,i)=>{let n=Pl(r,"'","");n.startsWith("flow_")&&(o=n)}),o},Pl=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function Z(){let{config:e,apiUrl:t}=_e(),{flows:o,setFlows:r,userId:i,publicApiKey:n,customVariables:s,setCustomVariables:p,hasActiveFullPageFlow:c,setHasActiveFullPageFlow:a,setFlowResponses:x,setShouldGracefullyDegrade:d,readonly:h}=vl(K),y={data:[]},{verifySDKInitiated:w}=Et(),{addResponse:v,getFlowResponses:f}=Gt(),E=g=>fetch(g,e).then(u=>u.ok?u.json():(console.log(`Error fetching ${g} (${u.status}): ${u.statusText}. .Will gracefully degrade and hide Frigade`),d(!0),y)).catch(u=>(console.log(`Error fetching ${g}: ${u}. Will gracefully degrade and hide Frigade`),d(!0),y)),{mutateUserFlowState:b,userFlowStatesData:S,isLoadingUserFlowStateData:A,optimisticallyMarkFlowCompleted:C,optimisticallyMarkFlowNotStarted:m,optimisticallyMarkStepCompleted:B,optimisticallyMarkStepNotStarted:k,optimisticallyMarkStepStarted:T}=ve(),{data:N,error:I,isLoading:U}=El(n?`${t}flows${h?"?readonly=true":""}`:null,E,{keepPreviousData:!0});Bl(()=>{if(I){console.error(I);return}N&&N.data&&r(N.data)},[N,I]);function $(g){if(U)return null;let u=o.find(F=>F.slug===g);return!u&&o.length>0&&!A&&!U?(console.log(`Flow with slug ${g} not found`),null):(u==null?void 0:u.active)===!1?null:u}function L(g){var _;if(!$(g))return[];let u=$(g).data;return u?(u=ee(u),(((_=JSON.parse(u))==null?void 0:_.data)??[]).map(ce=>{let Go=oe(ce);return{handleSecondaryButtonClick:()=>{ce.skippable===!0&&V(g,ce.id,{skipped:!0})},...ce,complete:ge(g,ce.id)===Me||Go>=1,blocked:te(g,ce.id),hidden:O(g,ce.id),handlePrimaryButtonClick:()=>{(!ce.completionCriteria&&(ce.autoMarkCompleted||ce.autoMarkCompleted===void 0)||ce.completionCriteria&&ce.autoMarkCompleted===!0)&&V(g,ce.id)},progress:Go}}).filter(ce=>ce.hidden!==!0)):[]}function ee(g){return g.replaceAll(/\${(.*?)}/g,(u,F)=>s[F]===void 0?"":String(s[F]).replace(/[\u00A0-\u9999<>\&]/g,function(_){return"&#"+_.charCodeAt(0)+";"}).replaceAll(/[\\]/g,"\\\\").replaceAll(/[\"]/g,'\\"').replaceAll(/[\/]/g,"\\/").replaceAll(/[\b]/g,"\\b").replaceAll(/[\f]/g,"\\f").replaceAll(/[\n]/g,"\\n").replaceAll(/[\r]/g,"\\r").replaceAll(/[\t]/g,"\\t"))}function z(g){if(!$(g))return[];let u=$(g).data;return u?(u=ee(u),JSON.parse(u)??{}):[]}function J(g,u){p(F=>({...F,[g]:u}))}function fe(g){!A&&!U&&g&&JSON.stringify(s)!=JSON.stringify({...s,...g})&&Object.keys(g).forEach(u=>{J(u,g[u])})}let q=xt(async(g,u,F)=>{if(!w())return;let _={foreignUserId:i,flowSlug:g,stepId:u,actionType:uo,data:F??{},createdAt:new Date,blocked:!1,hidden:!1};Y(_)&&(await T(g,u,_),v(_))},[i,S]),H=xt(async(g,u,F)=>{if(!w())return;let _={foreignUserId:i,flowSlug:g,stepId:u,actionType:Ne,data:F??{},createdAt:new Date,blocked:!1,hidden:!1};Y(_)&&(await k(g,u),v(_))},[i,S]),V=xt(async(g,u,F)=>{if(!w())return;let _={foreignUserId:i,flowSlug:g,stepId:u,actionType:Me,data:F??{},createdAt:new Date,blocked:!1,hidden:!1};Y(_)&&(await B(g,u,_),v(_))},[i,S]),he=xt(async(g,u)=>{if(!w()||Ce(g)===$e)return;let F={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:$e,data:u??{},createdAt:new Date,blocked:!1,hidden:!1};await m(g),Y(F)&&v(F)},[i,S]),Ie=xt(async(g,u)=>{if(!w())return;let F={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:gt,data:u??{},createdAt:new Date,blocked:!1,hidden:!1};Y(F)&&v(F)},[i,S]),ye=xt(async(g,u)=>{if(!w())return;let F={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Q,data:u??{},createdAt:new Date,blocked:!1,hidden:!1};Y(F)&&(await C(g),v(F))},[i,S]),de=xt(async(g,u)=>{if(!w())return;let F={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:mo,data:u??{},createdAt:new Date,blocked:!1,hidden:!1};Y(F)&&(await C(g),v(F))},[i,S]);function Y(g){var u;if(!S&&g.actionType===Ne)return!1;if(S){let F=S.find(_=>_.flowId===g.flowSlug);if(g.actionType===Ne&&(!(F!=null&&F.stepStates[g.stepId])||F.stepStates[g.stepId].actionType===Ne)||F&&((u=F.stepStates[g.stepId])==null?void 0:u.actionType)===g.actionType||F&&F.flowState===Q&&g.actionType===Q)return!1}return!0}function ge(g,u){let F=G(g,u);return A?null:F?F.actionType:Ne}function te(g,u){let F=G(g,u);return F?F.blocked:!1}function O(g,u){let F=G(g,u);return F?F.hidden:!1}function G(g,u){if(A)return null;let F=S==null?void 0:S.find(_=>_.flowId===g);return!F||!F.stepStates[u]?null:F.stepStates[u]??null}function D(g){var F;if(A||!S)return null;if(Ce(g)===$e)return L(g)[0]??null;let u=(F=S.find(_=>_.flowId===g))==null?void 0:F.lastStepId;return u?L(g).find(_=>_.id===u):null}function ne(g){let u=D(g);if(!u)return 0;let F=L(g).findIndex(_=>_.id===u.id)??0;return ge(g,u.id)===Me&&F<L(g).length-1?F+1:F}function oe(g){if(!g.completionCriteria)return;let u=Lr(g.completionCriteria);if(u===null)return;let F=De(u),_=Ge(u);return _===0?void 0:F/_}function Ce(g){let u=S==null?void 0:S.find(F=>F.flowId===g);return u?u.flowState:null}function De(g){let u=L(g);return u.length===0?0:u.filter(_=>ge(g,_.id)===Me).length}function Ge(g){return L(g).length}function j(g){let u=o.find(F=>F.slug===g);return u?JSON.parse(u.data):null}function ke(g){if(h)return!1;if(A)return!0;if(g!=null&&g.targetingLogic&&S){let u=S.find(F=>F.flowId===g.slug);if(u)return u.shouldTrigger===!1}return!!(g!=null&&g.targetingLogic&&i&&i.startsWith("guest_"))}function ft(g){return!ke($(g))}function jo(){i&&b()}return{getFlow:$,getFlowData:j,isLoading:A||U,getStepStatus:ge,getFlowSteps:L,getCurrentStepIndex:ne,markStepStarted:q,markStepCompleted:V,markFlowNotStarted:he,markFlowStarted:Ie,markFlowCompleted:ye,markFlowAborted:de,markStepNotStarted:H,getFlowStatus:Ce,getNumberOfStepsCompleted:De,getNumberOfSteps:Ge,targetingLogicShouldHideFlow:ke,setCustomVariable:J,updateCustomVariables:fe,customVariables:s,getStepOptionalProgress:oe,getFlowMetadata:z,isStepBlocked:te,isStepHidden:O,hasActiveFullPageFlow:c,setHasActiveFullPageFlow:a,isFlowAvailableToUser:ft,refresh:jo}}import{useCallback as Dr,useContext as Al,useEffect as Il}from"react";var At="guest_";function Kt(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:r,shouldGracefullyDegrade:i}=Al(K),{config:n,apiUrl:s}=_e(),{mutateUserFlowState:p}=ve(),c=Bt(),{verifySDKInitiated:a}=Et();Il(()=>{if(e&&!t){if(e.startsWith(At))return;let h=`frigade-user-registered-${e}`;localStorage.getItem(h)||(c(`${s}users`,{...n,method:"POST",body:JSON.stringify({foreignId:e})}),localStorage.setItem(h,"true"))}},[e,i,t]);let x=Dr(async h=>{if(!a())return;let y={foreignId:e,properties:h};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(y)}),r(w=>({...w,...h})),p()},[e,n,i,p]),d=Dr(async(h,y)=>{if(!a())return;let v={foreignId:e,events:[{event:h,properties:y}]};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(v)}),p()},[e,n,p]);return{userId:e,setUserId:o,addPropertiesToUser:x,trackEventForUser:d}}import{v4 as tp}from"uuid";import He,{useEffect as Ja,useState as Qa}from"react";import Ue,{useEffect as Ul}from"react";import xo from"styled-components";import Nl from"react";import Ol from"styled-components";var $r="fr-",qt="cfr-";function l(e,t){let o=`${$r}${e}`;if(!t)return o;if(t.styleOverrides&&t.styleOverrides[e]){if(typeof t.styleOverrides[e]=="string")return o+" "+t.styleOverrides[e];if(typeof t.styleOverrides[e]=="object")return o+" "+qt+e}return o}function P(e){if(!e.className||e.className.indexOf(qt)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith($r)?"":`:not(${o.map(r=>`.${r}`).join(", ")})`}function qo(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function Ke(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${qo(t)}: ${e.styleOverrides[t]};`).join(" "):""}function be(...e){return e.filter(Boolean).join(" ")}function Yt(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ll=Ol.div`
2
+ import yt,{createContext as kp,useEffect as No,useState as Oe}from"react";import{ThemeProvider as Pp}from"styled-components";import St,{useContext as ep,useEffect as Ao,useState as dr}from"react";import{useCallback as gt,useContext as vl,useEffect as Bl}from"react";import jo,{useMemo as Ir}from"react";var Ar="1.34.4 ";var Ne="NOT_STARTED_STEP",Q="COMPLETED_FLOW",uo="ABORTED_FLOW",ft="STARTED_FLOW",$e="NOT_STARTED_FLOW",Me="COMPLETED_STEP",fo="STARTED_STEP";function _e(){let{publicApiKey:e,userId:t,apiUrl:o}=jo.useContext(K);return{config:Ir(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":Ar,"X-Frigade-SDK-Platform":"React"}}),[e,t]),apiUrl:Ir(()=>`${o}/v1/public/`,[o])}}var gl="frigade-last-call-at-",xl="frigade-last-call-data-";function vt(){let{shouldGracefullyDegrade:e,readonly:t}=jo.useContext(K);return async(o,r)=>{if(t&&(r.method==="POST"||r.method==="PUT"||r.method==="DELETE"))return Pt();if(e)return console.log(`Skipping ${o} call to Frigade due to error`),Pt();let i=gl+o,n=xl+o;if(window&&window.localStorage&&r&&r.body&&r.method==="POST"){let p=window.localStorage.getItem(i),c=window.localStorage.getItem(n);if(p&&c&&c==r.body){let a=new Date(p);if(new Date().getTime()-a.getTime()<1e3)return Pt()}window.localStorage.setItem(i,new Date().toISOString()),window.localStorage.setItem(n,r.body)}let s;try{s=await fetch(o,r)}catch(p){return Pt(p)}return s?s.ok?s:Pt(s.statusText):Pt()}}function Pt(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function Bt(){let{publicApiKey:e,shouldGracefullyDegrade:t}=jo.useContext(K);function o(){return t?(console.error("Frigade hooks cannot be used when Frigade SDK has failed to initialize"),!1):e?!0:(console.error("Frigade hooks cannot be used outside the scope of FrigadeProvider"),!1)}return{verifySDKInitiated:o}}import{useContext as Fl,useState as Nr}from"react";import{useContext as Cl,useEffect as Sl,useState as yl}from"react";import bl from"swr";import{useContext as hl}from"react";function Pe(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o,setCompletedFlowsToKeepOpenDuringSession:r,completedFlowsToKeepOpenDuringSession:i}=hl(K);function n(d,x=!1){return e[d]??x}function s(d,x){t(y=>({...y,[d]:x}))}function p(d){t(x=>{let{[d]:y,...w}=x;return{...w}})}function c(d){i.includes(d)||r(x=>[...x,d])}function a(d){return i.includes(d)}function g(d){return Object.entries(e).some(([x,y])=>y&&x!=d)||o}return{getOpenFlowState:n,setOpenFlowState:s,resetOpenFlowState:p,hasOpenModals:g,setKeepCompletedFlowOpenDuringSession:c,shouldKeepCompletedFlowOpenDuringSession:a}}import wl from"swr/immutable";var Tl="unknown";function ve(){let{config:e,apiUrl:t}=_e(),{publicApiKey:o,userId:r,organizationId:i,flows:n,setShouldGracefullyDegrade:s,readonly:p}=Cl(K),{resetOpenFlowState:c}=Pe(),[a,g]=yl(!1),d={data:n.map(F=>({flowId:F.id,flowState:Q,lastStepId:null,userId:r,foreignUserId:r,stepStates:{},shouldTrigger:!1}))},x=F=>fetch(F,e).then(T=>{if(T.ok)return T.json();throw new Error("Failed to fetch user flow states")}).catch(T=>(console.log(`Error fetching ${F}: ${T}. Will gracefully degrade and hide Frigade`),s(!0),d)),y=o&&n&&r?`${t}userFlowStates?foreignUserId=${encodeURIComponent(r)}${i?`&foreignUserGroupId=${encodeURIComponent(i)}`:""}`:null,{data:w,isLoading:P,mutate:f,error:E}=p?wl(y,x):bl(y,x,{revalidateOnFocus:!0,revalidateIfStale:!0,keepPreviousData:!0,revalidateOnMount:!0,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>d,onLoadingSlow:()=>d}),b=w==null?void 0:w.data;Sl(()=>{!a&&!P&&b&&g(!0)},[b,a,P]);async function S(F){if(b&&!p){let T=b.find(O=>O.flowId===F);T&&T.flowState!==Q&&(T.flowState=Q),await f(Promise.resolve({...w,data:b}),{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}async function A(F,T,O){if(b){let I=b.find(M=>M.flowId===F);I&&(I.stepStates[T]=O,I.flowState=ft),await f(Promise.resolve({...w,data:b}),{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}async function C(F,T,O){if(b){let I=b.find(M=>M.flowId===F);I&&(I.lastStepId=T,I.stepStates[T]=O,I.flowState=ft),await f({...w,data:b},{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}async function m(F){if(b){let T=b.find(O=>O.flowId===F);T&&T.flowState!==$e&&(T.flowState=$e,T.lastStepId=Tl,Object.keys(T.stepStates).forEach(O=>{T.stepStates[O].actionType=Ne,T.stepStates[O].createdAt=new Date().toISOString()}),await f({...w,data:b},{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1}),c(F))}}async function B(F,T){if(b){let O=b.find(I=>I.flowId===F);O&&O.stepStates[T]!==Ne&&(O.stepStates[T]=Ne),await f({...w,data:b},{optimisticData:{...w,data:b},revalidate:!1,rollbackOnError:!1})}}return{userFlowStatesData:b,isLoadingUserFlowStateData:!a,mutateUserFlowState:f,optimisticallyMarkFlowCompleted:S,optimisticallyMarkFlowNotStarted:m,optimisticallyMarkStepCompleted:A,optimisticallyMarkStepNotStarted:B,optimisticallyMarkStepStarted:C,error:E}}function Gt(){let{config:e,apiUrl:t}=_e(),{userFlowStatesData:o,mutateUserFlowState:r}=ve(),{failedFlowResponses:i,setFailedFlowResponses:n,flowResponses:s,setFlowResponses:p}=Fl(K),[c,a]=Nr(new Set),[g,d]=Nr(new Set),x=vt();function y(f){let E=JSON.stringify(f);if(c.has(E))return null;c.add(E),a(c),g.add(f),d(g);let b=s==null?void 0:s.find(S=>S.flowSlug===f.flowSlug&&S.stepId===f.stepId&&S.actionType===f.actionType&&S.createdAt===f.createdAt);return x(`${t}flowResponses`,{...e,method:"POST",body:E}).then(S=>{S.status!==200&&S.status!==201?(console.log("Failed to send flow response for step "+f.stepId+". Will retry again later."),n([...i,f])):b||p(A=>[...A??[],f])})}async function w(f){f.foreignUserId&&(f.actionType===ft||f.actionType===$e?await y(f):f.actionType===Q?await y(f):f.actionType===fo?await y(f):f.actionType===Me?await y(f):f.actionType===uo?await y(f):f.actionType===Ne&&await y(f))}function P(){let f=[];return o==null||o.forEach(E=>{if(E&&E.stepStates&&Object.keys(E.stepStates).length!==0)for(let b in E.stepStates){let S=E.stepStates[b];f.push({foreignUserId:E.foreignUserId,flowSlug:E.flowId,stepId:S.stepId,actionType:S.actionType,data:{},createdAt:new Date(S.createdAt),blocked:S.blocked,hidden:S.hidden})}}),[...f,...s]}return{addResponse:w,setFlowResponses:p,getFlowResponses:P}}import El from"swr";var kl=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,Or=e=>{let t=kl.exec(e);if(t===null)return null;let o=null;return t.forEach((r,i)=>{let n=Pl(r,"'","");n.startsWith("flow_")&&(o=n)}),o},Pl=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function Z(){let{config:e,apiUrl:t}=_e(),{flows:o,setFlows:r,userId:i,publicApiKey:n,customVariables:s,setCustomVariables:p,hasActiveFullPageFlow:c,setHasActiveFullPageFlow:a,setFlowResponses:g,setShouldGracefullyDegrade:d,readonly:x}=vl(K),y={data:[]},{verifySDKInitiated:w}=Bt(),{addResponse:P,getFlowResponses:f}=Gt(),E=u=>fetch(u,e).then(h=>h.ok?h.json():(console.log(`Error fetching ${u} (${h.status}): ${h.statusText}. .Will gracefully degrade and hide Frigade`),d(!0),y)).catch(h=>(console.log(`Error fetching ${u}: ${h}. Will gracefully degrade and hide Frigade`),d(!0),y)),{mutateUserFlowState:b,userFlowStatesData:S,isLoadingUserFlowStateData:A,optimisticallyMarkFlowCompleted:C,optimisticallyMarkFlowNotStarted:m,optimisticallyMarkStepCompleted:B,optimisticallyMarkStepNotStarted:F,optimisticallyMarkStepStarted:T}=ve(),{data:O,error:I,isLoading:M}=El(n?`${t}flows${x?"?readonly=true":""}`:null,E,{keepPreviousData:!0});Bl(()=>{if(I){console.error(I);return}O&&O.data&&r(O.data)},[O,I]);function D(u){if(M)return null;let h=o.find(v=>v.slug===u);return!h&&o.length>0&&!A&&!M?(console.log(`Flow with slug ${u} not found`),null):(h==null?void 0:h.active)===!1?null:h}function L(u){var _;if(!D(u))return[];let h=D(u).data;return h?(h=ee(h),(((_=JSON.parse(h))==null?void 0:_.data)??[]).map(Ce=>{let Er=ne(Ce);return{handleSecondaryButtonClick:()=>{Ce.skippable===!0&&H(u,Ce.id,{skipped:!0})},...Ce,complete:ge(u,Ce.id)===Me||Er>=1,blocked:te(u,Ce.id),hidden:N(u,Ce.id),handlePrimaryButtonClick:()=>{(!Ce.completionCriteria&&(Ce.autoMarkCompleted||Ce.autoMarkCompleted===void 0)||Ce.completionCriteria&&Ce.autoMarkCompleted===!0)&&H(u,Ce.id)},progress:Er}}).filter(Ce=>Ce.hidden!==!0)):[]}function ee(u){return u.replaceAll(/\${(.*?)}/g,(h,v)=>s[v]===void 0?"":String(s[v]).replace(/[\u00A0-\u9999<>\&]/g,function(_){return"&#"+_.charCodeAt(0)+";"}).replaceAll(/[\\]/g,"\\\\").replaceAll(/[\"]/g,'\\"').replaceAll(/[\/]/g,"\\/").replaceAll(/[\b]/g,"\\b").replaceAll(/[\f]/g,"\\f").replaceAll(/[\n]/g,"\\n").replaceAll(/[\r]/g,"\\r").replaceAll(/[\t]/g,"\\t"))}function U(u){if(!D(u))return[];let h=D(u).data;return h?(h=ee(h),JSON.parse(h)??{}):[]}function J(u,h){p(v=>({...v,[u]:h}))}function fe(u){!A&&!M&&u&&JSON.stringify(s)!=JSON.stringify({...s,...u})&&Object.keys(u).forEach(h=>{J(h,u[h])})}let q=gt(async(u,h,v)=>{if(!w())return;let _={foreignUserId:i,flowSlug:u,stepId:h,actionType:fo,data:v??{},createdAt:new Date,blocked:!1,hidden:!1};Y(_)&&(await T(u,h,_),P(_))},[i,S]),W=gt(async(u,h,v)=>{if(!w())return;let _={foreignUserId:i,flowSlug:u,stepId:h,actionType:Ne,data:v??{},createdAt:new Date,blocked:!1,hidden:!1};Y(_)&&(await F(u,h),P(_))},[i,S]),H=gt(async(u,h,v)=>{if(!w())return;let _={foreignUserId:i,flowSlug:u,stepId:h,actionType:Me,data:v??{},createdAt:new Date,blocked:!1,hidden:!1};Y(_)&&(await B(u,h,_),P(_))},[i,S]),he=gt(async(u,h)=>{if(!w()||le(u)===$e)return;let v={foreignUserId:i,flowSlug:u,stepId:"unknown",actionType:$e,data:h??{},createdAt:new Date,blocked:!1,hidden:!1};await m(u),Y(v)&&P(v)},[i,S]),Ie=gt(async(u,h)=>{if(!w())return;let v={foreignUserId:i,flowSlug:u,stepId:"unknown",actionType:ft,data:h??{},createdAt:new Date,blocked:!1,hidden:!1};Y(v)&&P(v)},[i,S]),ye=gt(async(u,h)=>{if(!w())return;let v={foreignUserId:i,flowSlug:u,stepId:"unknown",actionType:Q,data:h??{},createdAt:new Date,blocked:!1,hidden:!1};Y(v)&&(await C(u),P(v))},[i,S]),ce=gt(async(u,h)=>{if(!w())return;let v={foreignUserId:i,flowSlug:u,stepId:"unknown",actionType:uo,data:h??{},createdAt:new Date,blocked:!1,hidden:!1};Y(v)&&(await C(u),P(v))},[i,S]);function Y(u){var h;if(!S&&u.actionType===Ne)return!1;if(S){let v=S.find(_=>_.flowId===u.flowSlug);if(u.actionType===Ne&&(!(v!=null&&v.stepStates[u.stepId])||v.stepStates[u.stepId].actionType===Ne)||v&&((h=v.stepStates[u.stepId])==null?void 0:h.actionType)===u.actionType||v&&v.flowState===Q&&u.actionType===Q)return!1}return!0}function ge(u,h){let v=V(u,h);return A?null:v?v.actionType:Ne}function te(u,h){let v=V(u,h);return v?v.blocked:!1}function N(u,h){let v=V(u,h);return v?v.hidden:!1}function V(u,h){if(A)return null;let v=S==null?void 0:S.find(_=>_.flowId===u);return!v||!v.stepStates[h]?null:v.stepStates[h]??null}function j(u){var v;if(A||!S)return null;if(le(u)===$e)return L(u)[0]??null;let h=(v=S.find(_=>_.flowId===u))==null?void 0:v.lastStepId;return h?L(u).find(_=>_.id===h):null}function ie(u){let h=j(u);if(!h)return 0;let v=L(u).findIndex(_=>_.id===h.id)??0;return ge(u,h.id)===Me&&v<L(u).length-1?v+1:v}function ne(u){if(!u.completionCriteria)return;let h=Or(u.completionCriteria);if(h===null)return;let v=Ge(h),_=De(h);return _===0?void 0:v/_}function le(u){let h=S==null?void 0:S.find(v=>v.flowId===u);return h?h.flowState:null}function Ge(u){let h=L(u);return h.length===0?0:h.filter(_=>ge(u,_.id)===Me).length}function De(u){return L(u).length}function G(u){let h=o.find(v=>v.slug===u);return h?JSON.parse(h.data):null}function ke(u){if(x)return!1;if(A)return!0;if(u!=null&&u.targetingLogic&&S){let h=S.find(v=>v.flowId===u.slug);if(h)return h.shouldTrigger===!1}return!!(u!=null&&u.targetingLogic&&i&&i.startsWith("guest_"))}function jt(u){return!ke(D(u))}function mo(){i&&b()}return{getFlow:D,getFlowData:G,isLoading:A||M,getStepStatus:ge,getFlowSteps:L,getCurrentStepIndex:ie,markStepStarted:q,markStepCompleted:H,markFlowNotStarted:he,markFlowStarted:Ie,markFlowCompleted:ye,markFlowAborted:ce,markStepNotStarted:W,getFlowStatus:le,getNumberOfStepsCompleted:Ge,getNumberOfSteps:De,targetingLogicShouldHideFlow:ke,setCustomVariable:J,updateCustomVariables:fe,customVariables:s,getStepOptionalProgress:ne,getFlowMetadata:U,isStepBlocked:te,isStepHidden:N,hasActiveFullPageFlow:c,setHasActiveFullPageFlow:a,isFlowAvailableToUser:jt,refresh:mo}}import{useCallback as Lr,useContext as Al,useEffect as Il}from"react";var Et="guest_";function Kt(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:r,shouldGracefullyDegrade:i}=Al(K),{config:n,apiUrl:s}=_e(),{mutateUserFlowState:p}=ve(),c=vt(),{verifySDKInitiated:a}=Bt();Il(()=>{if(e&&!t){if(e.startsWith(Et))return;let x=`frigade-user-registered-${e}`;localStorage.getItem(x)||(c(`${s}users`,{...n,method:"POST",body:JSON.stringify({foreignId:e})}),localStorage.setItem(x,"true"))}},[e,i,t]);let g=Lr(async x=>{if(!a())return;let y={foreignId:e,properties:x};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(y)}),r(w=>({...w,...x})),p()},[e,n,i,p]),d=Lr(async(x,y)=>{if(!a())return;let P={foreignId:e,events:[{event:x,properties:y}]};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(P)}),p()},[e,n,p]);return{userId:e,setUserId:o,addPropertiesToUser:g,trackEventForUser:d}}import{v4 as tp}from"uuid";import He,{useEffect as Ja,useState as Qa}from"react";import Ue,{useEffect as Ul}from"react";import ho from"styled-components";import Nl from"react";import Ol from"styled-components";var Dr="fr-",qt="cfr-";function l(e,t){let o=`${Dr}${e}`;if(!t)return o;if(t.styleOverrides&&t.styleOverrides[e]){if(typeof t.styleOverrides[e]=="string")return o+" "+t.styleOverrides[e];if(typeof t.styleOverrides[e]=="object")return o+" "+qt+e}return o}function k(e){if(!e.className||e.className.indexOf(qt)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(Dr)?"":`:not(${o.map(r=>`.${r}`).join(", ")})`}function Go(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function Ke(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${Go(t)}: ${e.styleOverrides[t]};`).join(" "):""}function be(...e){return e.filter(Boolean).join(" ")}function Yt(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ll=Ol.div`
3
3
  display: flex;
4
4
  justify-content: center;
5
5
  position: fixed;
@@ -7,7 +7,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
7
7
  left: 0;
8
8
  bottom: 0;
9
9
  right: 0;
10
- ${e=>P(e)} {
10
+ ${e=>k(e)} {
11
11
  background-color: rgba(0, 0, 0, 0.6);
12
12
  z-index: 1400;
13
13
  }
@@ -23,12 +23,12 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
23
23
  opacity: 1;
24
24
  }
25
25
  }
26
- `,Mr=({onClose:e,appearance:t})=>Nl.createElement(Ll,{className:l("modalBackground",t),onClick:()=>e()});import Yo from"react";import Dl from"styled-components";var $l=Dl.div`
26
+ `,$r=({onClose:e,appearance:t})=>Nl.createElement(Ll,{className:l("modalBackground",t),onClick:()=>e()});import Ko from"react";import Dl from"styled-components";var $l=Dl.div`
27
27
  :hover {
28
28
  opacity: 0.8;
29
29
  }
30
- `,Be=()=>Yo.createElement($l,null,Yo.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},Yo.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5 15L15 5M5 5l10 10"})));import{Portal as zl}from"react-portal";import Xr from"react";import Xo from"react";function Ml({style:e,className:t}){return Xo.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"54",height:"14",fill:"none",viewBox:"0 0 54 14",style:e,className:t},Xo.createElement("path",{fill:"currentColor",d:"M16.293 3.476v1.036h1.593v1.256h-1.593v5.098h-1.41V5.768H14V4.512h.883V3.244c0-.67.294-1.744 1.777-1.744.515 0 .969.049 1.361.146l-.233 1.232a5.939 5.939 0 00-.833-.073c-.442 0-.662.22-.662.67zm6.534.975V5.83c-.846 0-1.63.159-2.342.476v4.56h-1.41V4.513h1.263l.086.61c.846-.451 1.655-.67 2.403-.67zm2.505-.951c-.331.33-.944.33-1.287 0a.93.93 0 01-.246-.659c0-.268.086-.487.246-.646.343-.33.956-.33 1.287 0 .343.33.343.964 0 1.305zm.061 7.366h-1.41V4.512h1.41v6.354zm6.928-5.756c.246.146.368.402.368.756v4.976c0 1.804-.858 2.658-2.672 2.658-.92 0-1.753-.146-2.514-.439l.417-1.073c.674.22 1.336.33 1.974.33.98 0 1.385-.379 1.385-1.403v-.171c-.588.134-1.09.207-1.52.207-.907 0-1.655-.305-2.231-.902-.576-.598-.87-1.39-.87-2.354 0-.963.294-1.756.87-2.354.576-.61 1.324-.914 2.231-.914 1.005 0 1.864.232 2.562.683zm-2.488 4.634a5.15 5.15 0 001.446-.22V5.951a3.695 3.695 0 00-1.446-.292c-1.08 0-1.778.841-1.778 2.048 0 1.22.699 2.037 1.778 2.037zm7.34-5.317c1.52 0 2.28.878 2.28 2.634v3.805h-1.275l-.073-.524c-.601.414-1.288.621-2.084.621-1.263 0-2.06-.658-2.06-1.731 0-1.269 1.25-2.025 3.408-2.025.135 0 .503.013.662.013v-.171c0-1.012-.343-1.451-1.115-1.451-.675 0-1.435.158-2.256.475l-.466-1.012c1.017-.427 2.01-.634 2.979-.634zm-1.839 4.756c0 .427.343.695 1.017.695.528 0 1.251-.22 1.68-.512V8.22h-.441c-1.508 0-2.256.317-2.256.963zm9.953-4.549v-2.83h1.41v7.72c0 .354-.123.598-.368.757-.71.45-1.57.67-2.562.67-.907 0-1.655-.305-2.231-.902-.577-.61-.87-1.39-.87-2.354 0-.963.293-1.756.87-2.354.576-.61 1.324-.914 2.23-.914.43 0 .933.073 1.521.207zM43.84 9.72c.503 0 .981-.098 1.447-.293V5.854a5.15 5.15 0 00-1.447-.22c-1.078 0-1.777.817-1.777 2.037s.699 2.049 1.777 2.049zM54 7.866v.439h-4.573c.184.963.858 1.512 1.827 1.512.613 0 1.275-.146 1.986-.451l.466 1.024c-.87.378-1.729.573-2.575.573-.931 0-1.692-.304-2.268-.902-.576-.61-.87-1.402-.87-2.366 0-.975.294-1.768.87-2.366.576-.597 1.324-.902 2.244-.902.968 0 1.691.33 2.17.975.478.647.723 1.464.723 2.464zm-4.61-.586h3.298c-.086-1.073-.613-1.731-1.581-1.731-.969 0-1.582.695-1.717 1.731z"}),Xo.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.196 1.229A4.009 4.009 0 014.08 0l4.092.027C9.183.027 10 .867 10 1.904c0 .6-.273 1.133-.7 1.478-.31.25-.7.399-1.126.4h-.001l-4.09-.027h-.002a4.804 4.804 0 00-2.614.77A4.986 4.986 0 000 5.974v-1.78C0 3.036.456 1.988 1.196 1.23zm4.525 4.65a4.282 4.282 0 00-1.184 2.513l3.637.023c.131 0 .259-.015.382-.042h.002c.81-.178 1.42-.908 1.44-1.788v-.046a1.9 1.9 0 00-.533-1.328 1.813 1.813 0 00-.908-.508h-.002l-.002-.001a1.68 1.68 0 00-.366-.042A4.084 4.084 0 005.72 5.88zm-4.525-.016A4.235 4.235 0 000 8.829C0 10.997 1.601 12.78 3.654 13V9.265h-.005l.005-.439v-.437h.023a5.175 5.175 0 011.439-3.13 5.05 5.05 0 01.72-.614l-1.754-.011H4.08c-.787 0-1.521.229-2.144.625a4.11 4.11 0 00-.74.603z",clipRule:"evenodd"}))}var Ur=Ml;import Jo from"styled-components";import ot from"styled-components";var fo=ot.div`
31
- ${e=>P(e)} {
30
+ `,Be=()=>Ko.createElement($l,null,Ko.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},Ko.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5 15L15 5M5 5l10 10"})));import{Portal as zl}from"react-portal";import Yr from"react";import qo from"react";function Ml({style:e,className:t}){return qo.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"54",height:"14",fill:"none",viewBox:"0 0 54 14",style:e,className:t},qo.createElement("path",{fill:"currentColor",d:"M16.293 3.476v1.036h1.593v1.256h-1.593v5.098h-1.41V5.768H14V4.512h.883V3.244c0-.67.294-1.744 1.777-1.744.515 0 .969.049 1.361.146l-.233 1.232a5.939 5.939 0 00-.833-.073c-.442 0-.662.22-.662.67zm6.534.975V5.83c-.846 0-1.63.159-2.342.476v4.56h-1.41V4.513h1.263l.086.61c.846-.451 1.655-.67 2.403-.67zm2.505-.951c-.331.33-.944.33-1.287 0a.93.93 0 01-.246-.659c0-.268.086-.487.246-.646.343-.33.956-.33 1.287 0 .343.33.343.964 0 1.305zm.061 7.366h-1.41V4.512h1.41v6.354zm6.928-5.756c.246.146.368.402.368.756v4.976c0 1.804-.858 2.658-2.672 2.658-.92 0-1.753-.146-2.514-.439l.417-1.073c.674.22 1.336.33 1.974.33.98 0 1.385-.379 1.385-1.403v-.171c-.588.134-1.09.207-1.52.207-.907 0-1.655-.305-2.231-.902-.576-.598-.87-1.39-.87-2.354 0-.963.294-1.756.87-2.354.576-.61 1.324-.914 2.231-.914 1.005 0 1.864.232 2.562.683zm-2.488 4.634a5.15 5.15 0 001.446-.22V5.951a3.695 3.695 0 00-1.446-.292c-1.08 0-1.778.841-1.778 2.048 0 1.22.699 2.037 1.778 2.037zm7.34-5.317c1.52 0 2.28.878 2.28 2.634v3.805h-1.275l-.073-.524c-.601.414-1.288.621-2.084.621-1.263 0-2.06-.658-2.06-1.731 0-1.269 1.25-2.025 3.408-2.025.135 0 .503.013.662.013v-.171c0-1.012-.343-1.451-1.115-1.451-.675 0-1.435.158-2.256.475l-.466-1.012c1.017-.427 2.01-.634 2.979-.634zm-1.839 4.756c0 .427.343.695 1.017.695.528 0 1.251-.22 1.68-.512V8.22h-.441c-1.508 0-2.256.317-2.256.963zm9.953-4.549v-2.83h1.41v7.72c0 .354-.123.598-.368.757-.71.45-1.57.67-2.562.67-.907 0-1.655-.305-2.231-.902-.577-.61-.87-1.39-.87-2.354 0-.963.293-1.756.87-2.354.576-.61 1.324-.914 2.23-.914.43 0 .933.073 1.521.207zM43.84 9.72c.503 0 .981-.098 1.447-.293V5.854a5.15 5.15 0 00-1.447-.22c-1.078 0-1.777.817-1.777 2.037s.699 2.049 1.777 2.049zM54 7.866v.439h-4.573c.184.963.858 1.512 1.827 1.512.613 0 1.275-.146 1.986-.451l.466 1.024c-.87.378-1.729.573-2.575.573-.931 0-1.692-.304-2.268-.902-.576-.61-.87-1.402-.87-2.366 0-.975.294-1.768.87-2.366.576-.597 1.324-.902 2.244-.902.968 0 1.691.33 2.17.975.478.647.723 1.464.723 2.464zm-4.61-.586h3.298c-.086-1.073-.613-1.731-1.581-1.731-.969 0-1.582.695-1.717 1.731z"}),qo.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.196 1.229A4.009 4.009 0 014.08 0l4.092.027C9.183.027 10 .867 10 1.904c0 .6-.273 1.133-.7 1.478-.31.25-.7.399-1.126.4h-.001l-4.09-.027h-.002a4.804 4.804 0 00-2.614.77A4.986 4.986 0 000 5.974v-1.78C0 3.036.456 1.988 1.196 1.23zm4.525 4.65a4.282 4.282 0 00-1.184 2.513l3.637.023c.131 0 .259-.015.382-.042h.002c.81-.178 1.42-.908 1.44-1.788v-.046a1.9 1.9 0 00-.533-1.328 1.813 1.813 0 00-.908-.508h-.002l-.002-.001a1.68 1.68 0 00-.366-.042A4.084 4.084 0 005.72 5.88zm-4.525-.016A4.235 4.235 0 000 8.829C0 10.997 1.601 12.78 3.654 13V9.265h-.005l.005-.439v-.437h.023a5.175 5.175 0 011.439-3.13 5.05 5.05 0 01.72-.614l-1.754-.011H4.08c-.787 0-1.521.229-2.144.625a4.11 4.11 0 00-.74.603z",clipRule:"evenodd"}))}var Mr=Ml;import Yo from"styled-components";import ot from"styled-components";var go=ot.div`
31
+ ${e=>k(e)} {
32
32
  background: ${e=>e.appearance.theme.colorBackground};
33
33
  }
34
34
 
@@ -38,14 +38,14 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
38
38
  min-width: 300px;
39
39
  padding: 22px 22px 12px;
40
40
  z-index: ${e=>e.zIndex};
41
- `,zr=ot.div`
41
+ `,Ur=ot.div`
42
42
  display: block;
43
43
  cursor: pointer;
44
44
  position: absolute;
45
45
  top: 12px;
46
46
  right: 12px;
47
- `,_r=ot.img`
48
- ${e=>P(e)} {
47
+ `,zr=ot.img`
48
+ ${e=>k(e)} {
49
49
  display: block;
50
50
  width: 100%;
51
51
  height: auto;
@@ -53,38 +53,38 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
53
53
  margin-top: ${e=>e.dismissible?"24px":"0px"};
54
54
  margin-bottom: 16px;
55
55
  }
56
- `,Wr=ot.div`
57
- ${e=>P(e)} {
56
+ `,_r=ot.div`
57
+ ${e=>k(e)} {
58
58
  display: block;
59
59
  width: 100%;
60
60
  height: auto;
61
61
  margin-top: ${e=>e.dismissible?"24px":"0px"};
62
62
  margin-bottom: 16px;
63
63
  }
64
- `,Hr=ot.div`
64
+ `,Wr=ot.div`
65
65
  display: flex;
66
66
  flex-direction: row;
67
67
  justify-content: space-between;
68
68
  align-content: center;
69
- `,Vr=ot.div`
69
+ `,Hr=ot.div`
70
70
  display: flex;
71
71
  flex: 1;
72
72
  flex-direction: column;
73
73
  justify-content: center;
74
- `,jr=ot.div`
74
+ `,Vr=ot.div`
75
75
  display: flex;
76
76
  flex: 2;
77
77
  flex-shrink: 1;
78
78
  gap: 8px;
79
79
  height: 64px;
80
- ${e=>P(e)} {
80
+ ${e=>k(e)} {
81
81
  flex-direction: row;
82
82
  justify-content: ${e=>e.showStepCount?"flex-end":"flex-start"};
83
83
  align-content: center;
84
84
  align-items: center;
85
85
  }
86
- `,Gr=ot.p`
87
- ${e=>P(e)} {
86
+ `,jr=ot.p`
87
+ ${e=>k(e)} {
88
88
  font-style: normal;
89
89
  font-weight: 600;
90
90
  font-size: 15px;
@@ -92,7 +92,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
92
92
  color: #808080;
93
93
  }
94
94
  margin: 0;
95
- `;var Kr=Jo.div`
95
+ `;var Gr=Yo.div`
96
96
  background-color: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
97
97
  position: absolute;
98
98
  bottom: -47px;
@@ -103,7 +103,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
103
103
  align-items: center;
104
104
  justify-content: center;
105
105
  border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
106
- `,qr=Jo(fo)`
106
+ `,Kr=Yo(go)`
107
107
  background-color: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
108
108
  position: absolute;
109
109
  bottom: -60px;
@@ -116,7 +116,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
116
116
  border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
117
117
  padding: 0;
118
118
  z-index: ${e=>e.zIndex};
119
- `,Yr=Jo.div`
119
+ `,qr=Yo.div`
120
120
  display: flex;
121
121
  justify-content: center;
122
122
  align-items: center;
@@ -125,8 +125,8 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
125
125
  font-size: 12px;
126
126
  line-height: 18px;
127
127
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
128
- `;function go({appearance:e}){return Xr.createElement(Yr,{className:l("poweredByFrigadeContainer",e),appearance:e},"Powered by \xA0",Xr.createElement(Ur,null))}var _l=xo.div`
129
- ${e=>P(e)} {
128
+ `;function xo({appearance:e}){return Yr.createElement(qr,{className:l("poweredByFrigadeContainer",e),appearance:e},"Powered by \xA0",Yr.createElement(Mr,null))}var _l=ho.div`
129
+ ${e=>k(e)} {
130
130
  // Anything inside this block will be ignored if the user provides a custom class
131
131
  background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
132
132
  /* Mobile */
@@ -167,28 +167,28 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
167
167
  opacity: 1;
168
168
  }
169
169
  }
170
- `,Wl=xo.div`
170
+ `,Wl=ho.div`
171
171
  position: relative;
172
172
  flex: 0 1 auto;
173
- `,Hl=xo.div`
173
+ `,Hl=ho.div`
174
174
  position: absolute;
175
175
  top: 24px;
176
176
  right: 24px;
177
177
  cursor: pointer;
178
178
  z-index: 1501;
179
- ${e=>P(e)} {
179
+ ${e=>k(e)} {
180
180
  // Anything inside this block will be ignored if the user provides a custom class
181
181
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
182
182
  }
183
- `,Vl=xo.div`
183
+ `,Vl=ho.div`
184
184
  overflow: scroll;
185
185
  flex: 1 1;
186
186
  display: flex;
187
187
  ::-webkit-scrollbar {
188
188
  display: none;
189
189
  }
190
- `,rt=({onClose:e,visible:t,headerContent:o=null,style:r=null,children:i,appearance:n,dismissible:s=!0,showFrigadeBranding:p=!1})=>(Ul(()=>{let c=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",c),t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset",document.removeEventListener("keydown",c)}},[e,t]),t?Ue.createElement(zl,null,Ue.createElement(Mr,{appearance:n,onClose:()=>{s&&e()}}),Ue.createElement(_l,{appearance:n,className:l("modalContainer",n),styleOverrides:r},s&&Ue.createElement(Hl,{className:l("modalClose",n),onClick:()=>e(),appearance:n},Ue.createElement(Be,null)),o&&Ue.createElement(Wl,null,o),Ue.createElement(Vl,null,i),p&&Ue.createElement(Kr,{appearance:n,className:l("poweredByFrigadeRibbon",n)},Ue.createElement(go,{appearance:n})))):Ue.createElement(Ue.Fragment,null));import it,{useEffect as jl}from"react";import ho from"styled-components";import{Portal as Gl}from"react-portal";var Kl=ho.div`
191
- ${e=>P(e)} {
190
+ `,rt=({onClose:e,visible:t,headerContent:o=null,style:r=null,children:i,appearance:n,dismissible:s=!0,showFrigadeBranding:p=!1})=>(Ul(()=>{let c=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",c),t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset",document.removeEventListener("keydown",c)}},[e,t]),t?Ue.createElement(zl,null,Ue.createElement($r,{appearance:n,onClose:()=>{s&&e()}}),Ue.createElement(_l,{appearance:n,className:l("modalContainer",n),styleOverrides:r},s&&Ue.createElement(Hl,{className:l("modalClose",n),onClick:()=>e(),appearance:n},Ue.createElement(Be,null)),o&&Ue.createElement(Wl,null,o),Ue.createElement(Vl,null,i),p&&Ue.createElement(Gr,{appearance:n,className:l("poweredByFrigadeRibbon",n)},Ue.createElement(xo,{appearance:n})))):Ue.createElement(Ue.Fragment,null));import it,{useEffect as jl}from"react";import Co from"styled-components";import{Portal as Gl}from"react-portal";var Kl=Co.div`
191
+ ${e=>k(e)} {
192
192
  // Anything inside this block will be ignored if the user provides a custom class
193
193
  background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
194
194
  position: fixed;
@@ -205,41 +205,41 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
205
205
  bottom: 0;
206
206
  margin-right: 28px;
207
207
  margin-bottom: 28px;
208
- `,ql=ho.div`
208
+ `,ql=Co.div`
209
209
  position: relative;
210
210
  flex: 1;
211
- `,Yl=ho.div`
211
+ `,Yl=Co.div`
212
212
  position: absolute;
213
213
  top: 24px;
214
214
  right: 24px;
215
215
  cursor: pointer;
216
216
  z-index: 1501;
217
- ${e=>P(e)} {
217
+ ${e=>k(e)} {
218
218
  // Anything inside this block will be ignored if the user provides a custom class
219
219
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
220
220
  }
221
- `,Xl=ho.div`
221
+ `,Xl=Co.div`
222
222
  overflow: scroll;
223
223
  flex: 5;
224
224
  ::-webkit-scrollbar {
225
225
  display: none;
226
226
  }
227
- `,Jr=({onClose:e,visible:t,headerContent:o=null,children:r,appearance:i})=>(jl(()=>{let n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset",document.removeEventListener("keydown",n)}},[e,t]),t?it.createElement(Gl,null,it.createElement(Kl,{appearance:i,className:l("cornerModalContainer",i)},it.createElement(Yl,{className:l("cornerModalClose",i),onClick:()=>e()},it.createElement(Be,null)),o&&it.createElement(ql,null,o),it.createElement(Xl,null,r))):it.createElement(it.Fragment,null));import{useContext as Jl}from"react";function R(){let{defaultAppearance:e}=Jl(K);function t(o){let r=JSON.parse(JSON.stringify(e));return o?{styleOverrides:Object.assign(r.styleOverrides??{},o.styleOverrides??{}),theme:Object.assign(r.theme,o.theme??{})}:r}return{mergeAppearanceWithDefault:t}}import ht,{useContext as Sa,useEffect as ya,useState as nr}from"react";import wo from"styled-components";import yo,{useEffect as Ql,useState as oi}from"react";import Ro from"styled-components";import Co from"styled-components";var Qr=Co.label`
228
- ${e=>P(e)} {
227
+ `,Xr=({onClose:e,visible:t,headerContent:o=null,children:r,appearance:i})=>(jl(()=>{let n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset",document.removeEventListener("keydown",n)}},[e,t]),t?it.createElement(Gl,null,it.createElement(Kl,{appearance:i,className:l("cornerModalContainer",i)},it.createElement(Yl,{className:l("cornerModalClose",i),onClick:()=>e()},it.createElement(Be,null)),o&&it.createElement(ql,null,o),it.createElement(Xl,null,r))):it.createElement(it.Fragment,null));import{useContext as Jl}from"react";function R(){let{defaultAppearance:e}=Jl(K);function t(o){let r=JSON.parse(JSON.stringify(e));return o?{styleOverrides:Object.assign(r.styleOverrides??{},o.styleOverrides??{}),theme:Object.assign(r.theme,o.theme??{})}:r}return{mergeAppearanceWithDefault:t}}import xt,{useContext as Sa,useEffect as ya,useState as rr}from"react";import To from"styled-components";import bo,{useEffect as Ql,useState as ti}from"react";import Qo from"styled-components";import So from"styled-components";var Jr=So.label`
228
+ ${e=>k(e)} {
229
229
  font-size: 14px;
230
230
  line-height: 20px;
231
231
  margin-bottom: 5px;
232
232
  margin-top: 10px;
233
233
  }
234
234
  display: flex;
235
- `,Zr=Co.label`
236
- ${e=>P(e)} {
235
+ `,Qr=So.label`
236
+ ${e=>k(e)} {
237
237
  font-size: 12px;
238
238
  line-height: 20px;
239
239
  margin-bottom: 5px;
240
240
  }
241
241
  display: flex;
242
- `,Rr=Co.span`
242
+ `,Zr=So.span`
243
243
  font-weight: 400;
244
244
  font-size: 14px;
245
245
  line-height: 22px;
@@ -247,17 +247,17 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
247
247
  display: flex;
248
248
  margin-right: 5px;
249
249
  margin-top: 10px;
250
- `,So=Co.div`
250
+ `,yo=So.div`
251
251
  display: flex;
252
252
  align-items: flex-start;
253
253
  justify-content: left;
254
254
  margin-bottom: 10px;
255
- `;import Qo from"react";var qe={theme:{colorPrimary:"#0171F8",colorSecondary:"#EEEEEE",colorText:"#000000",colorBackground:"#ffffff",colorBackgroundSecondary:"#d2d2d2",colorTextOnPrimaryBackground:"#ffffff",colorTextSecondary:"#505050",colorTextDisabled:"#C7C7C7",colorBorder:"#E5E5E5",colorTextError:"#c00000",borderRadius:20}};function nt({title:e,required:t,appearance:o=qe}){return e?Qo.createElement(So,null,t?Qo.createElement(Rr,{className:l("formLabelRequired",o),appearance:o},"*"):null,Qo.createElement(Qr,{className:l("formLabel",o)},e)):null}import ei from"react";function It({title:e,appearance:t}){return e?ei.createElement(So,null,ei.createElement(Zr,{className:l("formSubLabel",t)},e)):null}import{z as Zo}from"zod";function ti(e,t){try{if(t){if(t.type=="number"){let o=Zo.number();if(t.props)for(let r of t.props)r.requirement=="min"?o=o.min(Number(r.value),r.message??"Value is too small"):r.requirement=="max"?o=o.max(Number(r.value),r.message??"Value is too large"):r.requirement=="positive"?o=o.positive(r.message??"Value must be positive"):r.requirement=="negative"&&(o=o.nonpositive(r.message??"Value must be negative"));o.parse(Number(e))}if(t.type=="string"){let o=Zo.string();if(t.props)for(let r of t.props)r.requirement=="min"?o=o.min(Number(r.value),r.message??"Value is too short"):r.requirement=="max"?o=o.max(Number(r.value),r.message??"Value is too long"):r.requirement=="regex"&&(o=o.regex(new RegExp(String(r.value)),r.message??"Value does not match requirements"));o.parse(e)}return}}catch(o){if(o instanceof Zo.ZodError)return o.issues&&o.issues.length>0?o.issues[0].message:null;console.error("Frigade Form validation failed for rule ",t,o)}return null}var Zl=Ro.div`
255
+ `;import Xo from"react";var qe={theme:{colorPrimary:"#0171F8",colorSecondary:"#EEEEEE",colorText:"#000000",colorBackground:"#ffffff",colorBackgroundSecondary:"#d2d2d2",colorTextOnPrimaryBackground:"#ffffff",colorTextSecondary:"#505050",colorTextDisabled:"#C7C7C7",colorBorder:"#E5E5E5",colorTextError:"#c00000",borderRadius:20}};function nt({title:e,required:t,appearance:o=qe}){return e?Xo.createElement(yo,null,t?Xo.createElement(Zr,{className:l("formLabelRequired",o),appearance:o},"*"):null,Xo.createElement(Jr,{className:l("formLabel",o)},e)):null}import Rr from"react";function At({title:e,appearance:t}){return e?Rr.createElement(yo,null,Rr.createElement(Qr,{className:l("formSubLabel",t)},e)):null}import{z as Jo}from"zod";function ei(e,t){try{if(t){if(t.type=="number"){let o=Jo.number();if(t.props)for(let r of t.props)r.requirement=="min"?o=o.min(Number(r.value),r.message??"Value is too small"):r.requirement=="max"?o=o.max(Number(r.value),r.message??"Value is too large"):r.requirement=="positive"?o=o.positive(r.message??"Value must be positive"):r.requirement=="negative"&&(o=o.nonpositive(r.message??"Value must be negative"));o.parse(Number(e))}if(t.type=="string"){let o=Jo.string();if(t.props)for(let r of t.props)r.requirement=="min"?o=o.min(Number(r.value),r.message??"Value is too short"):r.requirement=="max"?o=o.max(Number(r.value),r.message??"Value is too long"):r.requirement=="regex"&&(o=o.regex(new RegExp(String(r.value)),r.message??"Value does not match requirements"));o.parse(e)}return}}catch(o){if(o instanceof Jo.ZodError)return o.issues&&o.issues.length>0?o.issues[0].message:null;console.error("Frigade Form validation failed for rule ",t,o)}return null}var Zl=Qo.div`
256
256
  display: flex;
257
257
  flex-direction: column;
258
258
  width: 100%;
259
- `,er=Ro.input`
260
- ${e=>P(e)} {
259
+ `,Zo=Qo.input`
260
+ ${e=>k(e)} {
261
261
  // Anything inside this block will be ignored if the user provides a custom class
262
262
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
263
263
  font-size: 14px;
@@ -272,8 +272,8 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
272
272
  box-sizing: border-box;
273
273
  padding: 0 10px;
274
274
  margin-bottom: 10px;
275
- `,Rl=Ro.textarea`
276
- ${e=>P(e)} {
275
+ `,Rl=Qo.textarea`
276
+ ${e=>k(e)} {
277
277
  // Anything inside this block will be ignored if the user provides a custom class
278
278
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
279
279
  font-size: 14px;
@@ -288,14 +288,14 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
288
288
  min-height: 70px;
289
289
  box-sizing: border-box;
290
290
  margin-bottom: 10px;
291
- `;function tr({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:r,inputData:i}){let n=e,[s,p]=oi((i==null?void 0:i.text)||""),[c,a]=oi(!1),x=er;Ql(()=>{s===""&&!c&&(a(!0),d(""))},[]);function d(y){if(p(y),o({text:y}),n.required===!0&&y.trim()===""){r([{id:n.id,message:`${n.title??"Field"} is required`}]);return}let w=ti(y,n.validation);if(w){r([{id:n.id,message:w}]);return}r([])}n.multiline&&(x=Rl);function h(){var y;switch((y=n==null?void 0:n.validation)==null?void 0:y.type){case"email":return"email";case"number":return"number";case"password":return"password"}return null}return yo.createElement(Zl,null,yo.createElement(nt,{title:n.title,required:n.required,appearance:t.appearance}),yo.createElement(x,{className:l("inputComponent",t.appearance),value:s,onChange:y=>{d(y.target.value)},appearance:t.appearance,placeholder:n.placeholder,type:h()}),yo.createElement(It,{title:n.subtitle,appearance:t.appearance}))}import We,{useEffect as ri,useState as ii}from"react";import ni from"styled-components";var or="",ea=ni.div`
291
+ `;function Ro({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:r,inputData:i}){let n=e,[s,p]=ti((i==null?void 0:i.text)||""),[c,a]=ti(!1),g=Zo;Ql(()=>{s===""&&!c&&(a(!0),d(""))},[]);function d(y){if(p(y),o({text:y}),n.required===!0&&y.trim()===""){r([{id:n.id,message:`${n.title??"Field"} is required`}]);return}let w=ei(y,n.validation);if(w){r([{id:n.id,message:w}]);return}r([])}n.multiline&&(g=Rl);function x(){var y;switch((y=n==null?void 0:n.validation)==null?void 0:y.type){case"email":return"email";case"number":return"number";case"password":return"password"}return null}return bo.createElement(Zl,null,bo.createElement(nt,{title:n.title,required:n.required,appearance:t.appearance}),bo.createElement(g,{className:l("inputComponent",t.appearance),value:s,onChange:y=>{d(y.target.value)},appearance:t.appearance,placeholder:n.placeholder,type:x()}),bo.createElement(At,{title:n.subtitle,appearance:t.appearance}))}import We,{useEffect as oi,useState as ri}from"react";import ii from"styled-components";var er="",ea=ii.div`
292
292
  display: flex;
293
293
  flex-direction: column;
294
294
  width: 100%;
295
295
  -webkit-appearance: none;
296
296
  appearance: none;
297
- `,ta=ni.select`
298
- ${e=>P(e)} {
297
+ `,ta=ii.select`
298
+ ${e=>k(e)} {
299
299
  // Anything inside this block will be ignored if the user provides a custom class
300
300
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
301
301
  font-size: 14px;
@@ -315,16 +315,16 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
315
315
  background-repeat: no-repeat;
316
316
  background-size: 1.5em 1.5em;
317
317
  -webkit-print-color-adjust: exact;
318
- `;function si({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:r,setFormValidationErrors:i}){var x,d,h,y,w,v;let n=e,[s,p]=ii(((x=r==null?void 0:r.choice)==null?void 0:x[0])||""),[c,a]=ii(!1);return ri(()=>{var f,E,b,S;if(s===""&&!c){if(a(!0),n.requireSelection){p(or);return}if(n.defaultValue&&((f=n.props.options)!=null&&f.find(A=>A.id===n.defaultValue))){let A=(E=n.props.options)==null?void 0:E.find(C=>C.id===n.defaultValue);p(A.id),o({choice:[A.id]})}else p(((b=n.props.options)==null?void 0:b[0].id)||""),o({choice:[((S=n.props.options)==null?void 0:S[0].id)||""]})}},[]),ri(()=>{n.requireSelection&&s===or?i([{message:"Please select an option",id:n.id}]):i([])},[s]),We.createElement(ea,null,We.createElement(nt,{title:n.title,required:!1,appearance:t.appearance}),We.createElement(ta,{value:s,onChange:f=>{p(f.target.value),o({choice:[f.target.value]})},placeholder:n.placeholder,appearance:t.appearance,className:l("multipleChoiceSelect",t.appearance)},n.requireSelection&&We.createElement("option",{key:"null-value",value:or,disabled:!0},n.placeholder??"Select an option"),(d=n.props.options)==null?void 0:d.map(f=>We.createElement("option",{key:f.id,value:f.id},f.title))),((y=(h=n.props.options)==null?void 0:h.find(f=>f.id===s))==null?void 0:y.isOpenEnded)&&We.createElement(We.Fragment,null,We.createElement(nt,{title:((v=(w=n.props.options)==null?void 0:w.find(f=>f.id===s))==null?void 0:v.openEndedLabel)??"Please specify",required:!1,appearance:t.appearance}),We.createElement(er,{type:"text",placeholder:"Enter your answer here",onChange:f=>{o({choice:[f.target.value]})},appearance:t.appearance})),We.createElement(It,{title:n.subtitle,appearance:t.appearance}))}import Qt,{useEffect as rr,useState as ai}from"react";import pi from"styled-components";import Jt from"react";import Xt from"react";var li=({color:e,percentage:t,size:o})=>{let r=o*.5-2,i=2*Math.PI*r,n=(1-t)*i;return Xt.createElement("circle",{r,cx:o*.5,cy:o*.5,fill:"transparent",stroke:n!==i?e:"",strokeWidth:"3px",strokeDasharray:i,strokeDashoffset:t?n:0})},oa=({fillColor:e,size:t,percentage:o,children:r,bgColor:i="#D9D9D9",className:n,style:s})=>Xt.createElement("svg",{style:s,className:n,width:t,height:t,overflow:"visible"},Xt.createElement("g",{transform:`rotate(-90 ${`${t*.5} ${t*.5}`})`},Xt.createElement(li,{color:i,size:t}),Xt.createElement(li,{color:e,percentage:o,size:t})),r),Nt=oa;import ra from"styled-components";var ia=({color:e="#FFFFFF"})=>Jt.createElement("svg",{width:10,height:8,viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jt.createElement("path",{d:"M1 4.34815L3.4618 7L3.4459 6.98287L9 1",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),na={width:"22px",height:"22px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center"},sa={width:"22px",height:"22px",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center"},la={border:"1px solid #000000",color:"#FFFFFF"},aa={border:"1px solid #E6E6E6"},pa={color:"#FFFFFF"},da={border:"3px solid #D9D9D9"},ca=e=>e==="square"?na:sa,ma=(e,t)=>e==="square"?t?la:aa:t?pa:da,ua=ra.div`
318
+ `;function ni({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:r,setFormValidationErrors:i}){var g,d,x,y,w,P;let n=e,[s,p]=ri(((g=r==null?void 0:r.choice)==null?void 0:g[0])||""),[c,a]=ri(!1);return oi(()=>{var f,E,b,S;if(s===""&&!c){if(a(!0),n.requireSelection){p(er);return}if(n.defaultValue&&((f=n.props.options)!=null&&f.find(A=>A.id===n.defaultValue))){let A=(E=n.props.options)==null?void 0:E.find(C=>C.id===n.defaultValue);p(A.id),o({choice:[A.id]})}else p(((b=n.props.options)==null?void 0:b[0].id)||""),o({choice:[((S=n.props.options)==null?void 0:S[0].id)||""]})}},[]),oi(()=>{n.requireSelection&&s===er?i([{message:"Please select an option",id:n.id}]):i([])},[s]),We.createElement(ea,null,We.createElement(nt,{title:n.title,required:!1,appearance:t.appearance}),We.createElement(ta,{value:s,onChange:f=>{p(f.target.value),o({choice:[f.target.value]})},placeholder:n.placeholder,appearance:t.appearance,className:l("multipleChoiceSelect",t.appearance)},n.requireSelection&&We.createElement("option",{key:"null-value",value:er,disabled:!0},n.placeholder??"Select an option"),(d=n.props.options)==null?void 0:d.map(f=>We.createElement("option",{key:f.id,value:f.id},f.title))),((y=(x=n.props.options)==null?void 0:x.find(f=>f.id===s))==null?void 0:y.isOpenEnded)&&We.createElement(We.Fragment,null,We.createElement(nt,{title:((P=(w=n.props.options)==null?void 0:w.find(f=>f.id===s))==null?void 0:P.openEndedLabel)??"Please specify",required:!1,appearance:t.appearance}),We.createElement(Zo,{type:"text",placeholder:"Enter your answer here",onChange:f=>{o({choice:[f.target.value]})},appearance:t.appearance})),We.createElement(At,{title:n.subtitle,appearance:t.appearance}))}import Qt,{useEffect as tr,useState as li}from"react";import ai from"styled-components";import Jt from"react";import Xt from"react";var si=({color:e,percentage:t,size:o})=>{let r=o*.5-2,i=2*Math.PI*r,n=(1-t)*i;return Xt.createElement("circle",{r,cx:o*.5,cy:o*.5,fill:"transparent",stroke:n!==i?e:"",strokeWidth:"3px",strokeDasharray:i,strokeDashoffset:t?n:0})},oa=({fillColor:e,size:t,percentage:o,children:r,bgColor:i="#D9D9D9",className:n,style:s})=>Xt.createElement("svg",{style:s,className:n,width:t,height:t,overflow:"visible"},Xt.createElement("g",{transform:`rotate(-90 ${`${t*.5} ${t*.5}`})`},Xt.createElement(si,{color:i,size:t}),Xt.createElement(si,{color:e,percentage:o,size:t})),r),It=oa;import ra from"styled-components";var ia=({color:e="#FFFFFF"})=>Jt.createElement("svg",{width:10,height:8,viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jt.createElement("path",{d:"M1 4.34815L3.4618 7L3.4459 6.98287L9 1",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),na={width:"22px",height:"22px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center"},sa={width:"22px",height:"22px",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center"},la={border:"1px solid #000000",color:"#FFFFFF"},aa={border:"1px solid #E6E6E6"},pa={color:"#FFFFFF"},da={border:"3px solid #D9D9D9"},ca=e=>e==="square"?na:sa,ma=(e,t)=>e==="square"?t?la:aa:t?pa:da,ua=ra.div`
319
319
  ${e=>Ke(e)}
320
- `,Ye=({value:e,type:t="square",primaryColor:o="#000000",progress:r,appearance:i=qe,style:n,className:s})=>{let p=ca(t),c=ma(t,e);return e===!0?p={...p,...c,backgroundColor:o,borderColor:t==="square"?o:"none"}:p={...p,...c},e!==!0&&t==="round"&&r!==void 0&&r!==1?Jt.createElement(Nt,{fillColor:o,percentage:r,size:22}):Jt.createElement(ua,{styleOverrides:p,style:n,role:"checkbox",className:be(l("checkIconContainer",i),l(e?"checkIconContainerChecked":"checkIconContainerUnchecked",i),e?"checkIconContainerChecked":"checkIconContainerUnchecked",s)},e&&Jt.createElement(ia,{color:"#FFFFFF"}))};var fa=pi.div`
320
+ `,Ye=({value:e,type:t="square",primaryColor:o="#000000",progress:r,appearance:i=qe,style:n,className:s})=>{let p=ca(t),c=ma(t,e);return e===!0?p={...p,...c,backgroundColor:o,borderColor:t==="square"?o:"none"}:p={...p,...c},e!==!0&&t==="round"&&r!==void 0&&r!==1?Jt.createElement(It,{fillColor:o,percentage:r,size:22}):Jt.createElement(ua,{styleOverrides:p,style:n,role:"checkbox",className:be(l("checkIconContainer",i),l(e?"checkIconContainerChecked":"checkIconContainerUnchecked",i),e?"checkIconContainerChecked":"checkIconContainerUnchecked",s)},e&&Jt.createElement(ia,{color:"#FFFFFF"}))};var fa=ai.div`
321
321
  display: flex;
322
322
  flex-direction: column;
323
323
  width: 100%;
324
324
  -webkit-appearance: none;
325
325
  appearance: none;
326
- `,ga=pi.button`
327
- ${e=>P(e)} {
326
+ `,ga=ai.button`
327
+ ${e=>k(e)} {
328
328
  // Anything inside this block will be ignored if the user provides a custom class
329
329
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
330
330
  font-size: 14px;
@@ -348,8 +348,8 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
348
348
  height: 60px;
349
349
  padding: 0 18px;
350
350
  margin-bottom: 10px;
351
- `;function di({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:r,setFormValidationErrors:i}){var x;let n=e,[s,p]=ai((r==null?void 0:r.choice)||[]),[c,a]=ai(!1);return rr(()=>{s.length==0&&!c&&(a(!0),o({choice:[]}))},[]),rr(()=>{o({choice:s})},[s]),rr(()=>{n.required&&(s.length<n.props.minChoices||s.length>n.props.maxChoices)?i([{message:"",id:n.id}]):i([])},[s]),Qt.createElement(fa,null,Qt.createElement(nt,{title:n.title,required:n.required,appearance:t.appearance}),(x=n.props.options)==null?void 0:x.map(d=>Qt.createElement(ga,{appearance:t.appearance,className:l("multipleChoiceListItem",t.appearance),key:d.id,value:d.id,"data-selected":s.includes(d.id),onClick:()=>{if(s.includes(d.id)){p(s.filter(h=>h!==d.id));return}s.length<n.props.maxChoices?p([...s,d.id]):s.length==1&&n.props.maxChoices==1&&p([d.id])}},d.title,Qt.createElement(Ye,{type:"round",primaryColor:t.appearance.theme.colorPrimary,value:s.includes(d.id),appearance:t.appearance}))),Qt.createElement(It,{title:n.subtitle,appearance:t.appearance}))}import bo from"react";import ci from"styled-components";import xa from"dompurify";function me(e){return{__html:xa.sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img"],ALLOWED_ATTR:["style","class","target","id","href","alt","src"]})}}var ha=ci.h1`
352
- ${e=>P(e)} {
351
+ `;function pi({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:r,setFormValidationErrors:i}){var g;let n=e,[s,p]=li((r==null?void 0:r.choice)||[]),[c,a]=li(!1);return tr(()=>{s.length==0&&!c&&(a(!0),o({choice:[]}))},[]),tr(()=>{o({choice:s})},[s]),tr(()=>{n.required&&(s.length<n.props.minChoices||s.length>n.props.maxChoices)?i([{message:"",id:n.id}]):i([])},[s]),Qt.createElement(fa,null,Qt.createElement(nt,{title:n.title,required:n.required,appearance:t.appearance}),(g=n.props.options)==null?void 0:g.map(d=>Qt.createElement(ga,{appearance:t.appearance,className:l("multipleChoiceListItem",t.appearance),key:d.id,value:d.id,"data-selected":s.includes(d.id),onClick:()=>{if(s.includes(d.id)){p(s.filter(x=>x!==d.id));return}s.length<n.props.maxChoices?p([...s,d.id]):s.length==1&&n.props.maxChoices==1&&p([d.id])}},d.title,Qt.createElement(Ye,{type:"round",primaryColor:t.appearance.theme.colorPrimary,value:s.includes(d.id),appearance:t.appearance}))),Qt.createElement(At,{title:n.subtitle,appearance:t.appearance}))}import wo from"react";import di from"styled-components";import xa from"dompurify";function me(e){return{__html:xa.sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img"],ALLOWED_ATTR:["style","class","target","id","href","alt","src"]})}}var ha=di.h1`
352
+ ${e=>k(e)} {
353
353
  font-style: normal;
354
354
  font-weight: 600;
355
355
  font-size: ${e=>e.size=="small"?"15px":"18px"};
@@ -359,48 +359,48 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
359
359
  margin-bottom: 4px;
360
360
  color: ${e=>e.appearance.theme.colorText};
361
361
  }
362
- `,Ca=ci.h2`
363
- ${e=>P(e)} {
362
+ `,Ca=di.h2`
363
+ ${e=>k(e)} {
364
364
  font-style: normal;
365
365
  font-weight: 400;
366
366
  font-size: 15px;
367
367
  line-height: 20px;
368
368
  color: ${e=>e.appearance.theme.colorTextSecondary};
369
369
  }
370
- `;function we({appearance:e,title:t,subtitle:o,size:r="medium",classPrefix:i=""}){return bo.createElement(bo.Fragment,null,bo.createElement(ha,{appearance:e,className:l(`${i}${i?Yt(r):r}Title`,e),dangerouslySetInnerHTML:me(t),size:r}),o&&bo.createElement(Ca,{appearance:e,className:l(`${i}${i?Yt(r):r}Subtitle`,e),dangerouslySetInnerHTML:me(o),size:r}))}import*as ir from"react";var mi=e=>ir.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,"aria-hidden":"true",viewBox:"0 0 16 16",...e},ir.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.115 1.308 5.635 11.269A2.365 2.365 0 0 1 13.634 16H2.365A2.365 2.365 0 0 1 .25 12.577L5.884 1.308a2.365 2.365 0 0 1 4.231 0zM8 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM8 9c.552 0 1-.32 1-.714V4.714C9 4.32 8.552 4 8 4s-1 .32-1 .714v3.572C7 8.68 7.448 9 8 9z"}));var ba=wo.div`
370
+ `;function we({appearance:e,title:t,subtitle:o,size:r="medium",classPrefix:i=""}){return wo.createElement(wo.Fragment,null,wo.createElement(ha,{appearance:e,className:l(`${i}${i?Yt(r):r}Title`,e),dangerouslySetInnerHTML:me(t),size:r}),o&&wo.createElement(Ca,{appearance:e,className:l(`${i}${i?Yt(r):r}Subtitle`,e),dangerouslySetInnerHTML:me(o),size:r}))}import*as or from"react";var ci=e=>or.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,"aria-hidden":"true",viewBox:"0 0 16 16",...e},or.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.115 1.308 5.635 11.269A2.365 2.365 0 0 1 13.634 16H2.365A2.365 2.365 0 0 1 .25 12.577L5.884 1.308a2.365 2.365 0 0 1 4.231 0zM8 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM8 9c.552 0 1-.32 1-.714V4.714C9 4.32 8.552 4 8 4s-1 .32-1 .714v3.572C7 8.68 7.448 9 8 9z"}));var ba=To.div`
371
371
  display: flex;
372
372
  flex-direction: column;
373
373
  justify-content: flex-end;
374
374
  padding-bottom: 14px;
375
375
  overflow: visible;
376
- `,wa=wo.div`
376
+ `,wa=To.div`
377
377
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextError}};
378
378
  font-size: 12px;
379
379
  margin-bottom: 12px;
380
380
  display: flex;
381
381
  align-items: center;
382
- `,Ta=wo.div`
382
+ `,Ta=To.div`
383
383
  margin-right: 4px;
384
384
  display: inline-flex;
385
- `,Fa=wo.div`
385
+ `,Fa=To.div`
386
386
  padding-left: 1px;
387
387
  padding-right: 1px;
388
- `,ka={text:tr,multipleChoice:si,multipleChoiceList:di},sr="frigade-multiInputStepTypeData";function ui({flowId:e,stepData:t,canContinue:o,setCanContinue:r,onSaveData:i,appearance:n,customFormElements:s,prefillData:p}){var C;let c=t.props,[a,x]=nr([]),[d,h]=nr([]),{userId:y}=Kt(),[w,v]=nr(S()||(p?p[t.id]:null)||{}),{readonly:f}=Sa(K),E={...ka,...s};ya(()=>{r(a.length===0)},[a,r]);function b(m,B){let k={...w,[m.id]:B};v(k),i(k),window&&window.localStorage&&!f&&window.localStorage.setItem(A(),JSON.stringify(k))}function S(){if(window&&window.localStorage){let m=window.localStorage.getItem(A());if(m)return JSON.parse(m)}return null}function A(){return`${sr}-${e}-${t.id}-${y}`}return ht.createElement(Fa,{className:l("multiInput",n)},ht.createElement(we,{appearance:n,title:t.title,subtitle:t.subtitle}),ht.createElement(ba,{className:l("multiInputContainer",n)},(C=c.data)==null?void 0:C.map(m=>{var k;let B=(k=a.reverse().find(T=>T.id===m.id))==null?void 0:k.message;return E[m.type]?ht.createElement("span",{key:m.id,"data-field-id":m.id,className:l("multiInputField",n)},E[m.type]({formInput:m,customFormTypeProps:{flowId:e,stepData:t,canContinue:o,setCanContinue:r,onSaveData:i,appearance:n},onSaveInputData:T=>{!d.includes(m.id)&&T&&(T==null?void 0:T.text)!==""&&h(N=>[...N,m.id]),b(m,T)},inputData:w[m.id],setFormValidationErrors:T=>{x(N=>T.length===0?N.filter(I=>I.id!==m.id):[...N,...T])}}),B&&d.includes(m.id)&&ht.createElement(wa,{initial:{opacity:0,height:0,marginBottom:0},animate:{opacity:1,height:"auto",marginBottom:12},exit:{opacity:0,height:0,marginBottom:0},key:m.id,style:{overflow:"hidden"},transition:{duration:.1,ease:"easeInOut",delay:.5},appearance:n,className:l("multiInputValidationError",n)},ht.createElement(Ta,{appearance:n,className:l("multiInputValidationErrorIcon",n)},ht.createElement(mi,null)),B)):null})))}import Ct from"styled-components";var fi=Ct.div`
388
+ `,ka={text:Ro,multipleChoice:ni,multipleChoiceList:pi},ir="frigade-multiInputStepTypeData";function mi({flowId:e,stepData:t,canContinue:o,setCanContinue:r,onSaveData:i,appearance:n,customFormElements:s,prefillData:p}){var C;let c=t.props,[a,g]=rr([]),[d,x]=rr([]),{userId:y}=Kt(),[w,P]=rr(S()||(p?p[t.id]:null)||{}),{readonly:f}=Sa(K),E={...ka,...s};ya(()=>{r(a.length===0)},[a,r]);function b(m,B){let F={...w,[m.id]:B};P(F),i(F),window&&window.localStorage&&!f&&window.localStorage.setItem(A(),JSON.stringify(F))}function S(){if(window&&window.localStorage){let m=window.localStorage.getItem(A());if(m)return JSON.parse(m)}return null}function A(){return`${ir}-${e}-${t.id}-${y}`}return xt.createElement(Fa,{className:l("multiInput",n)},xt.createElement(we,{appearance:n,title:t.title,subtitle:t.subtitle}),xt.createElement(ba,{className:l("multiInputContainer",n)},(C=c.data)==null?void 0:C.map(m=>{var F;let B=(F=a.reverse().find(T=>T.id===m.id))==null?void 0:F.message;return E[m.type]?xt.createElement("span",{key:m.id,"data-field-id":m.id,className:l("multiInputField",n)},E[m.type]({formInput:m,customFormTypeProps:{flowId:e,stepData:t,canContinue:o,setCanContinue:r,onSaveData:i,appearance:n},onSaveInputData:T=>{!d.includes(m.id)&&T&&(T==null?void 0:T.text)!==""&&x(O=>[...O,m.id]),b(m,T)},inputData:w[m.id],setFormValidationErrors:T=>{g(O=>T.length===0?O.filter(I=>I.id!==m.id):[...O,...T])}}),B&&d.includes(m.id)&&xt.createElement(wa,{initial:{opacity:0,height:0,marginBottom:0},animate:{opacity:1,height:"auto",marginBottom:12},exit:{opacity:0,height:0,marginBottom:0},key:m.id,style:{overflow:"hidden"},transition:{duration:.1,ease:"easeInOut",delay:.5},appearance:n,className:l("multiInputValidationError",n)},xt.createElement(Ta,{appearance:n,className:l("multiInputValidationErrorIcon",n)},xt.createElement(ci,null)),B)):null})))}import ht from"styled-components";var ui=ht.div`
389
389
  align-items: center;
390
390
  display: flex;
391
391
  justify-content: ${e=>e.showBackButton?"space-between":"flex-end"};
392
392
  padding-top: 14px;
393
- `,gi=Ct.div`
393
+ `,fi=ht.div`
394
394
  color: ${e=>e.appearance.theme.colorTextError};
395
395
  font-size: 12px;
396
- `,xi=Ct.div`
396
+ `,gi=ht.div`
397
397
  display: flex;
398
398
  gap: 12px;
399
- `,hi=Ct.div`
399
+ `,xi=ht.div`
400
400
  display: flex;
401
401
  flex-direction: row;
402
402
  flex: 1 1;
403
- `,Ci=Ct.div`
403
+ `,hi=ht.div`
404
404
  display: flex;
405
405
  // If type is set to large-modal, use padding 60px horizontal, 80px vertical
406
406
  // Otherwise, use 4px padding
@@ -408,11 +408,11 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
408
408
  flex-grow: 1;
409
409
  flex-basis: 0;
410
410
  position: relative;
411
- `,Si=Ct.div`
411
+ `,Ci=ht.div`
412
412
  padding: ${e=>e.type==="large-modal"?"50px":"0px"};
413
413
  position: relative;
414
414
  overflow-y: auto;
415
- `,yi=Ct.div`
415
+ `,Si=ht.div`
416
416
  display: flex;
417
417
  align-self: stretch;
418
418
  flex-grow: 1;
@@ -424,10 +424,10 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
424
424
  background-position: center;
425
425
  border-top-right-radius: ${e=>e.appearance.theme.borderRadius}px;
426
426
  border-bottom-right-radius: ${e=>e.appearance.theme.borderRadius}px;
427
- `;import st from"react";import Pa from"react";import bi from"styled-components";var va=bi.button`
427
+ `;import st from"react";import Pa from"react";import yi from"styled-components";var va=yi.button`
428
428
  justify-content: center;
429
429
  align-content: center;
430
- ${e=>P(e)} {
430
+ ${e=>k(e)} {
431
431
  display: flex;
432
432
  // Anything inside this block will be ignored if the user provides a custom class
433
433
  width: ${e=>e.type==="full-width"?"100%":"auto"};
@@ -455,8 +455,8 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
455
455
  opacity: 0.3;
456
456
  cursor: not-allowed;
457
457
  }
458
- `,To=bi.div`
459
- ${e=>P(e)} {
458
+ `,Fo=yi.div`
459
+ ${e=>k(e)} {
460
460
  display: flex;
461
461
  flex-direction: row;
462
462
  justify-content: flex-start;
@@ -466,14 +466,14 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
466
466
  margin-right: 8px;
467
467
  }
468
468
  }
469
- `,re=({onClick:e,title:t,style:o,disabled:r,type:i="inline",size:n="medium",secondary:s=!1,appearance:p,withMargin:c=!0,classPrefix:a=""})=>{function x(){let d=s?"buttonSecondary":"button";return a===""?d:`${a}${Yt(d)}`}return Pa.createElement(va,{secondary:s,appearance:p,disabled:r,onClick:e,styleOverrides:o,type:i,withMargin:c,size:n,className:l(x(),p)},t??"Continue")};var wi=({step:e,canContinue:t,appearance:o,onPrimaryClick:r,onSecondaryClick:i,formType:n,selectedStep:s,steps:p,onBack:c,allowBackNavigation:a,errorMessage:x})=>{let d=n==="inline"?"inline":"full-width",h=p.length>1&&s!=0&&a;return st.createElement(st.Fragment,null,x!==null&&x!=null&&st.createElement(gi,{appearance:o,className:l("formCTAError",o)},x),st.createElement(fi,{showBackButton:h,className:l("formCTAContainer",o)},h&&st.createElement(re,{title:e.backButtonTitle??"\u2190",onClick:c,secondary:!0,withMargin:!1,type:d,appearance:o,style:{width:"90px",maxWidth:"90px"},classPrefix:"back"}),st.createElement(xi,{className:l("ctaWrapper",o)},e.secondaryButtonTitle?st.createElement(re,{title:e.secondaryButtonTitle,onClick:i,secondary:!0,withMargin:!1,type:d,appearance:o}):null," ",e.primaryButtonTitle?st.createElement(re,{disabled:!t,withMargin:!1,title:e.primaryButtonTitle,onClick:r,type:d,appearance:o}):null)))};import lr from"react";import Ba from"styled-components";var Ea=Ba.div`
469
+ `,oe=({onClick:e,title:t,style:o,disabled:r,type:i="inline",size:n="medium",secondary:s=!1,appearance:p,withMargin:c=!0,classPrefix:a=""})=>{function g(){let d=s?"buttonSecondary":"button";return a===""?d:`${a}${Yt(d)}`}return Pa.createElement(va,{secondary:s,appearance:p,disabled:r,onClick:e,styleOverrides:o,type:i,withMargin:c,size:n,className:l(g(),p)},t??"Continue")};var bi=({step:e,canContinue:t,appearance:o,onPrimaryClick:r,onSecondaryClick:i,formType:n,selectedStep:s,steps:p,onBack:c,allowBackNavigation:a,errorMessage:g})=>{let d=n==="inline"?"inline":"full-width",x=p.length>1&&s!=0&&a;return st.createElement(st.Fragment,null,g!==null&&g!=null&&st.createElement(fi,{appearance:o,className:l("formCTAError",o)},g),st.createElement(ui,{showBackButton:x,className:l("formCTAContainer",o)},x&&st.createElement(oe,{title:e.backButtonTitle??"\u2190",onClick:c,secondary:!0,withMargin:!1,type:d,appearance:o,style:{width:"90px",maxWidth:"90px"},classPrefix:"back"}),st.createElement(gi,{className:l("ctaWrapper",o)},e.secondaryButtonTitle?st.createElement(oe,{title:e.secondaryButtonTitle,onClick:i,secondary:!0,withMargin:!1,type:d,appearance:o}):null," ",e.primaryButtonTitle?st.createElement(oe,{disabled:!t,withMargin:!1,title:e.primaryButtonTitle,onClick:r,type:d,appearance:o}):null)))};import nr from"react";import Ba from"styled-components";var Ea=Ba.div`
470
470
  text-align: center;
471
- `,Ti=({stepCount:e=0,currentStep:t=0,className:o,appearance:r})=>{let{theme:i}=R().mergeAppearanceWithDefault(r);return lr.createElement(Ea,{className:o},lr.createElement("svg",{width:16*e-8,height:8,viewBox:`0 0 ${16*e-8} 8`,fill:"none"},Array(e).fill(null).map((n,s)=>lr.createElement("rect",{key:s,x:16*s,y:0,width:8,height:8,rx:4,fill:t===s?i.colorPrimary:"#E6E6E6"}))))};import St from"react";import Ot from"styled-components";import{useContext as Aa}from"react";function le(){let e=Aa(K);function t(i){r(i.primaryButtonUri,i.primaryButtonUriTarget)}function o(i){r(i.secondaryButtonUri,i.secondaryButtonUriTarget)}function r(i,n){if(!i)return;let s=i.startsWith("http")?"_blank":"_self";n&&n!=="_blank"&&(s="_self"),e.navigate(i,s)}return{primaryCTAClickSideEffects:t,secondaryCTAClickSideEffects:o,handleUrl:r}}var Ia=Ot.div`
471
+ `,wi=({stepCount:e=0,currentStep:t=0,className:o,appearance:r})=>{let{theme:i}=R().mergeAppearanceWithDefault(r);return nr.createElement(Ea,{className:o},nr.createElement("svg",{width:16*e-8,height:8,viewBox:`0 0 ${16*e-8} 8`,fill:"none"},Array(e).fill(null).map((n,s)=>nr.createElement("rect",{key:s,x:16*s,y:0,width:8,height:8,rx:4,fill:t===s?i.colorPrimary:"#E6E6E6"}))))};import Ct from"react";import Nt from"styled-components";import{useContext as Aa}from"react";function ae(){let e=Aa(K);function t(i){r(i.primaryButtonUri,i.primaryButtonUriTarget)}function o(i){r(i.secondaryButtonUri,i.secondaryButtonUriTarget)}function r(i,n){if(!i)return;let s=i.startsWith("http")?"_blank":"_self";n&&n!=="_blank"&&(s="_self"),e.navigate(i,s)}return{primaryCTAClickSideEffects:t,secondaryCTAClickSideEffects:o,handleUrl:r}}var Ia=Nt.div`
472
472
  display: flex;
473
473
  flex-wrap: wrap;
474
474
  align-content: center;
475
475
  justify-content: center;
476
- `,Na=Ot.div`
476
+ `,Na=Nt.div`
477
477
  align-content: center;
478
478
  align-items: center;
479
479
  display: flex;
@@ -487,10 +487,10 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
487
487
  flex-basis: 255px;
488
488
  flex-grow: 0;
489
489
  flex-shrink: 0;
490
- `,Oa=Ot.img`
490
+ `,Oa=Nt.img`
491
491
  width: 78px;
492
492
  height: auto;
493
- `,La=Ot.button`
493
+ `,La=Nt.button`
494
494
  font-style: normal;
495
495
  font-weight: 600;
496
496
  font-size: 13px;
@@ -503,11 +503,11 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
503
503
  border-radius: 100px;
504
504
  padding: 8px 12px;
505
505
  margin-top: 16px;
506
- `,Da=Ot.h1`
506
+ `,Da=Nt.h1`
507
507
  font-weight: 700;
508
508
  font-size: 28px;
509
509
  line-height: 34px;
510
- `,$a=Ot.h2`
510
+ `,$a=Nt.h2`
511
511
  font-style: normal;
512
512
  font-weight: 400;
513
513
  font-size: 16px;
@@ -516,7 +516,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
516
516
  margin-top: 12px;
517
517
  margin-bottom: 16px;
518
518
  max-width: 70%;
519
- `;function Fi({stepData:e,appearance:t}){var r,i;let{handleUrl:o}=le();return St.createElement("div",null,St.createElement(Da,null,e.title),St.createElement($a,null,e.subtitle),St.createElement(Ia,null,(i=(r=e.props)==null?void 0:r.links)==null?void 0:i.map(n=>St.createElement(Na,{key:n.title},St.createElement(Oa,{src:n.imageUri}),St.createElement(La,{style:{borderColor:t.theme.colorPrimary,color:t.theme.colorPrimary},onClick:()=>{n.uri&&o(n.uri,n.uriTarget??"_blank")}},n.title)))))}import Lt,{useEffect as Va}from"react";import Po from"styled-components";import ar from"react";var Fo=({style:e,className:t})=>ar.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,style:e},ar.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),ar.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"}));import Zt,{useRef as Ma,useState as Ua}from"react";import ko from"styled-components";var za=ko.div`
519
+ `;function Ti({stepData:e,appearance:t}){var r,i;let{handleUrl:o}=ae();return Ct.createElement("div",null,Ct.createElement(Da,null,e.title),Ct.createElement($a,null,e.subtitle),Ct.createElement(Ia,null,(i=(r=e.props)==null?void 0:r.links)==null?void 0:i.map(n=>Ct.createElement(Na,{key:n.title},Ct.createElement(Oa,{src:n.imageUri}),Ct.createElement(La,{style:{borderColor:t.theme.colorPrimary,color:t.theme.colorPrimary},onClick:()=>{n.uri&&o(n.uri,n.uriTarget??"_blank")}},n.title)))))}import Ot,{useEffect as Va}from"react";import vo from"styled-components";import sr from"react";var ko=({style:e,className:t})=>sr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,style:e},sr.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),sr.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"}));import Zt,{useRef as Ma,useState as Ua}from"react";import Po from"styled-components";var za=Po.div`
520
520
  display: flex;
521
521
  align-items: center;
522
522
  justify-content: flex-start;
@@ -524,7 +524,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
524
524
  width: 100%;
525
525
  height: 100%;
526
526
  position: relative;
527
- `,_a=ko.div`
527
+ `,_a=Po.div`
528
528
  position: absolute;
529
529
  display: flex;
530
530
  align-items: center;
@@ -543,56 +543,56 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
543
543
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
544
544
  border-radius: 50%;
545
545
  }
546
- `,Wa=ko.video`
546
+ `,Wa=Po.video`
547
547
  width: 100%;
548
548
  height: 100%;
549
549
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
550
- `,Ha=ko.iframe`
550
+ `,Ha=Po.iframe`
551
551
  width: 100%;
552
552
  height: 100%;
553
553
  min-height: 260px;
554
554
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
555
- `;function lt({appearance:e,videoUri:t}){let o=Ma(),[r,i]=Ua(!1);if(t.includes("youtube")){let n=t.split("v=")[1],s=n.indexOf("&");return s!==-1&&(n=n.substring(0,s)),Zt.createElement(Ha,{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,appearance:e})}return Zt.createElement(za,{className:l("videoPlayerWrapper",e),appearance:e},!r&&Zt.createElement(_a,{onClick:()=>{i(!0),o.current.play()},appearance:e},Zt.createElement(Fo,null)),Zt.createElement(Wa,{appearance:e,controls:r,ref:o,play:r,src:t}))}var ja=Po.div`
556
- ${e=>P(e)} {
555
+ `;function lt({appearance:e,videoUri:t}){let o=Ma(),[r,i]=Ua(!1);if(t.includes("youtube")){let n=t.split("v=")[1],s=n.indexOf("&");return s!==-1&&(n=n.substring(0,s)),Zt.createElement(Ha,{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,appearance:e})}return Zt.createElement(za,{className:l("videoPlayerWrapper",e),appearance:e},!r&&Zt.createElement(_a,{onClick:()=>{i(!0),o.current.play()},appearance:e},Zt.createElement(ko,null)),Zt.createElement(Wa,{appearance:e,controls:r,ref:o,play:r,src:t}))}var ja=vo.div`
556
+ ${e=>k(e)} {
557
557
  display: flex;
558
558
  flex-direction: column;
559
559
  justify-content: center;
560
560
  }
561
- `,Ga=Po.img`
562
- ${e=>P(e)} {
561
+ `,Ga=vo.img`
562
+ ${e=>k(e)} {
563
563
  width: 100%;
564
564
  height: auto;
565
565
  max-height: 250px;
566
566
  margin-bottom: 24px;
567
567
  }
568
- `,Ka=Po.div`
569
- ${e=>P(e)} {
568
+ `,Ka=vo.div`
569
+ ${e=>k(e)} {
570
570
  margin-bottom: 24px;
571
571
  }
572
- `,qa=Po.div`
573
- ${e=>P(e)} {
572
+ `,qa=vo.div`
573
+ ${e=>k(e)} {
574
574
  width: 100%;
575
575
  height: auto;
576
576
  max-height: 250px;
577
577
  margin-bottom: 24px;
578
578
  }
579
- `;function ki({stepData:e,appearance:t,setCanContinue:o}){return Va(()=>{o(!0)},[]),Lt.createElement(ja,{className:l("callToActionContainer",t)},Lt.createElement(Ka,{className:l("callToActionTextContainer",t)},Lt.createElement(we,{appearance:t,title:e.title,subtitle:e.subtitle})),e.imageUri&&Lt.createElement(Ga,{className:l("callToActionImage",t),src:e.imageUri}),!e.imageUri&&e.videoUri&&Lt.createElement(qa,{appearance:t,className:l("callToActionVideo",t)},Lt.createElement(lt,{appearance:t,videoUri:e.videoUri})))}import Xe,{useEffect as pr,useState as dr}from"react";import at from"styled-components";var Pi=at.div`
579
+ `;function Fi({stepData:e,appearance:t,setCanContinue:o}){return Va(()=>{o(!0)},[]),Ot.createElement(ja,{className:l("callToActionContainer",t)},Ot.createElement(Ka,{className:l("callToActionTextContainer",t)},Ot.createElement(we,{appearance:t,title:e.title,subtitle:e.subtitle})),e.imageUri&&Ot.createElement(Ga,{className:l("callToActionImage",t),src:e.imageUri}),!e.imageUri&&e.videoUri&&Ot.createElement(qa,{appearance:t,className:l("callToActionVideo",t)},Ot.createElement(lt,{appearance:t,videoUri:e.videoUri})))}import Xe,{useEffect as lr,useState as ar}from"react";import at from"styled-components";var ki=at.div`
580
580
  width: auto;
581
581
  display: flex;
582
582
  flex-direction: column;
583
583
  justify-content: center;
584
584
  align-items: center;
585
585
  padding: 4px;
586
- `,vi=at.div`
586
+ `,Pi=at.div`
587
587
  width: 100%;
588
588
  text-align: left;
589
- `,Bi=at.h1`
589
+ `,vi=at.h1`
590
590
  font-style: normal;
591
591
  font-weight: 700;
592
592
  font-size: 32px;
593
593
  line-height: 38px;
594
594
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
595
- `,Ei=at.h1`
595
+ `,Bi=at.h1`
596
596
  font-style: normal;
597
597
  font-weight: 400;
598
598
  font-size: 16px;
@@ -600,7 +600,7 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
600
600
  margin-top: 16px;
601
601
  margin-bottom: 16px;
602
602
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
603
- `,Ai=at.div`
603
+ `,Ei=at.div`
604
604
  padding-top: 12px;
605
605
  padding-bottom: 12px;
606
606
  flex-direction: row;
@@ -611,17 +611,17 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
611
611
  cursor: pointer;
612
612
  border-bottom: ${e=>e.hideBottomBorder?"none":"1px solid #D8D8D8"};
613
613
  width: 100%;
614
- `,Ii=at.div`
614
+ `,Ai=at.div`
615
615
  padding-top: 10px;
616
616
  padding-bottom: 10px;
617
617
  flex-direction: row;
618
618
  display: flex;
619
619
  justify-content: flex-start;
620
- `,Ni=at.img`
620
+ `,Ii=at.img`
621
621
  width: 42px;
622
622
  height: 42px;
623
623
  margin-right: 12px;
624
- `,Oi=at.p`
624
+ `,Ni=at.p`
625
625
  font-style: normal;
626
626
  font-weight: 500;
627
627
  font-size: 17px;
@@ -629,8 +629,8 @@ import bt,{createContext as kp,useEffect as Io,useState as Oe}from"react";import
629
629
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
630
630
  display: flex;
631
631
  align-self: center;
632
- `;var Li=({stepData:e,setCanContinue:t,onSaveData:o,appearance:r})=>{let i=e.props,[n,s]=dr([]),[p,c]=dr(!1),[a,x]=dr(e.id);return pr(()=>{n.length==0&&!p&&(c(!0),o({choice:[]}))},[p]),pr(()=>{a!==e.id&&(x(e.id),s([]))},[e]),pr(()=>{o({choice:n}),n.length>=i.minChoices?t(!0):t(!1)},[n]),Xe.createElement(Pi,{className:l("selectListContainer",r)},Xe.createElement(vi,null,Xe.createElement(Bi,{className:l("selectListTitle",r)},e.title),Xe.createElement(Ei,{appearance:r,className:l("selectListSubtitle",r)},e.subtitle)),i.options.map((d,h)=>{let y=n.includes(d.id);return Xe.createElement(Ai,{key:`select-item-${h}`,onClick:()=>{if(n.includes(d.id)){s(n.filter(w=>w!==d.id));return}n.length<i.maxChoices?s([...n,d.id]):n.length==1&&i.maxChoices==1&&s([d.id])},hideBottomBorder:h===i.options.length-1,className:l("selectListSelectItem",r)},Xe.createElement(Ii,{className:l("selectListItemImage",r)},d.imageUri&&Xe.createElement(Ni,{src:d.imageUri,alt:`select-icon-${h}`}),Xe.createElement(Oi,{appearance:r,className:l("selectListSelectItemText",r)},d.title)),Xe.createElement(Ye,{appearance:r,value:y,primaryColor:r.theme.colorPrimary}))}))};import Te,{useEffect as vo,useState as Rt}from"react";var Ya=({children:e,id:t,shouldWrap:o=!1})=>Te.createElement(Te.Fragment,null,o?Te.createElement("div",{key:t,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,overflowY:"auto"}},e):e),Bo=({appearance:e,steps:t,selectedStep:o,customStepTypes:r,customVariables:i,onButtonClick:n,onStepCompletion:s,flowId:p,type:c,hideOnFlowCompletion:a,onComplete:x,setVisible:d,setShowModal:h,onDismiss:y,showPagination:w=!1,customFormElements:v,allowBackNavigation:f,validationHandler:E,onFormDataChange:b,showFooter:S,prefillData:A})=>{var G;let m={...{linkCollection:Fi,multiInput:ui,callToAction:ki,selectList:Li},...r},{primaryCTAClickSideEffects:B,secondaryCTAClickSideEffects:k}=le(),[T,N]=Rt(!1),[I,U]=Rt({}),[$,L]=Rt(!1),[ee,z]=Rt(!1),[J,fe]=Rt(null),q=t[o]??null,{markStepCompleted:H,markStepStarted:V,isLoading:he,updateCustomVariables:Ie,markFlowCompleted:ye}=Z();vo(()=>{Ie(i)},[i,he]),vo(()=>{b&&b(I,de(),t[o],o)},[I]),vo(()=>{window&&f&&!ee&&(window.location.hash=t[o].id,z(!0))},[f,ee,z]),vo(()=>{var D;if(window&&((D=window==null?void 0:window.location)!=null&&D.hash)&&window.location.hash.replace("#","")!==t[o].id){let ne=window.location.hash.replace("#",""),oe=t.findIndex(Ce=>Ce.id===ne);oe!==-1&&V(p,t[oe].id)}},[(G=window==null?void 0:window.location)==null?void 0:G.hash,V,o,t]);function de(){return{data:I[t[o].id]??{},stepId:t[o].id,customVariables:i}}function Y(D,ne,oe){let Ce=o+1<t.length?t[o+1]:null;return s&&s(D,oe,Ce,I,de()),n?n(D,o,ne,Ce):!0}function ge(D,ne){U(oe=>{let Ce={};return Ce[D.id]=ne,{...oe,...Ce}})}function te(D){return D.selectedStep.imageUri?Te.createElement(yi,{image:D.selectedStep.imageUri,appearance:e,className:l("formContainerSidebarImage",e)}):null}let O=S&&Te.createElement(wi,{step:t[o],canContinue:T&&!$,formType:c,selectedStep:o,appearance:e,onPrimaryClick:async()=>{if(L(!0),E){let oe=await E(t[o],o,t[o+1],I,de());if(oe||oe===!1){fe(typeof oe=="string"?oe:null),L(!1);return}else fe(null)}let D={...de()};await H(p,t[o].id,D),o+1<t.length&&await V(p,t[o+1].id);let ne=Y(t[o],"primary",o);o+1>=t.length&&(x&&x(),y&&y(),a&&ne&&(d&&d(!1),h(!1)),await ye(p)),B(t[o]),L(!1),window&&f&&o+1<t.length&&(window.location.hash=t[o+1].id)},onSecondaryClick:()=>{Y(t[o],"secondary",o),k(t[o])},onBack:async()=>{o-1>=0&&(L(!0),await V(p,t[o-1].id),L(!1))},steps:t,allowBackNavigation:f,errorMessage:J});return Te.createElement(Te.Fragment,null,Te.createElement(hi,{className:l("formContainer",e)},Te.createElement(Ci,null,Te.createElement(Ya,{id:o,shouldWrap:c==="large-modal"},Te.createElement(Si,{key:q.id,type:c,className:l("formContent",e)},t.map(D=>{let ne=m[D.type];return q.id!==D.id?null:Te.createElement(ne,{key:D.id,stepData:D,canContinue:T,setCanContinue:N,onSaveData:oe=>{ge(D,oe)},appearance:e,customFormElements:v,flowId:p,prefillData:A})}),w&&Te.createElement(Ti,{className:l("formPagination",e),appearance:e,stepCount:t.length,currentStep:o}),O))),c=="large-modal"&&Te.createElement(te,{selectedStep:t[o]})))};import eo from"react";import{createGlobalStyle as Xa}from"styled-components";function ie({appearance:e}){if(!e||!e.styleOverrides)return eo.createElement(eo.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([r,i])=>typeof i=="object");if(t.length===0)return eo.createElement(eo.Fragment,null);let o=Xa`
633
- ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map(([s,p])=>`${qo(s)}: ${p};`).join(" ")} }`).join(" ")}`;return eo.createElement(o,{inlineStyles:t})}var Di=({flowId:e,customStepTypes:t={},type:o="inline",visible:r,setVisible:i,customVariables:n,customFormElements:s,onComplete:p,appearance:c,hideOnFlowCompletion:a=!0,onStepCompletion:x,onButtonClick:d,dismissible:h=!0,endFlowOnDismiss:y=!1,modalPosition:w="center",repeatable:v=!1,onDismiss:f,showPagination:E=!1,allowBackNavigation:b=!1,validationHandler:S,showFrigadeBranding:A=!1,onFormDataChange:C,showFooter:m=!0,prefillData:B={}})=>{let{getFlow:k,getFlowSteps:T,isLoading:N,targetingLogicShouldHideFlow:I,getFlowStatus:U,getCurrentStepIndex:$,markFlowCompleted:L,markFlowNotStarted:ee}=Z(),z=$(e),{mergeAppearanceWithDefault:J}=R(),[fe,q]=Qa(!1),{setOpenFlowState:H,getOpenFlowState:V,hasOpenModals:he}=Pe();c=J(c);let[Ie,ye]=r!==void 0&&i!==void 0?[r,i]:[V(e,!0),te=>H(e,te)];if(Ja(()=>{!fe&&!N&&(q(!0),U(e)===Q&&v&&(ee(e),window&&window.localStorage&&Object.keys(window.localStorage).forEach(O=>{O.startsWith(sr)&&window.localStorage.removeItem(O)})),q(!0))},[fe,q,N]),N)return null;let de=k(e);if(!de||I(de))return null;let Y=T(e);if(!Y||r!==void 0&&r===!1||U(e)===Q&&a||(o=="modal"||o=="corner-modal")&&he(e))return null;let ge=()=>{ye(!1),f&&f(),y===!0&&L(e)};if(w=="center"&&o==="modal"||o==="large-modal"){let te={padding:"24px"};return o==="large-modal"?(te.width="85%",te.height="90%",te.maxHeight="800px",te.minHeight="500px",te.padding="0"):te.width="400px",He.createElement(rt,{appearance:c,onClose:ge,visible:Ie,style:te,dismissible:h,showFrigadeBranding:A},He.createElement(ie,{appearance:c}),He.createElement(Bo,{appearance:c,steps:Y,selectedStep:z,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:x,flowId:e,type:o,hideOnFlowCompletion:a,onComplete:p,setVisible:i,setShowModal:ye,onDismiss:f,showPagination:E,customFormElements:s,allowBackNavigation:b,validationHandler:S,onFormDataChange:C,showFooter:m,prefillData:B}))}return o==="modal"&&w!=="center"?He.createElement(Jr,{appearance:c,onClose:ge,visible:Ie},He.createElement(ie,{appearance:c}),He.createElement(Bo,{appearance:c,steps:Y,selectedStep:z,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:x,flowId:e,type:o,hideOnFlowCompletion:a,onComplete:p,setVisible:i,setShowModal:ye,onDismiss:f,showPagination:E,customFormElements:s,allowBackNavigation:b,validationHandler:S,onFormDataChange:C,showFooter:m,prefillData:B})):He.createElement(He.Fragment,null,He.createElement(ie,{appearance:c}),He.createElement(Bo,{appearance:c,steps:Y,selectedStep:z,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:x,flowId:e,type:o,hideOnFlowCompletion:a,onComplete:p,setVisible:i,setShowModal:ye,onDismiss:f,showPagination:E,customFormElements:s,allowBackNavigation:b,validationHandler:S,onFormDataChange:C,showFooter:m,prefillData:B}))},$i=Di;import{useCallback as Mi,useContext as Za,useEffect as Ra}from"react";function cr(){let{organizationId:e,userId:t,setOrganizationId:o}=Za(K),{mutateUserFlowState:r}=ve(),{config:i,apiUrl:n}=_e(),s=Bt(),{verifySDKInitiated:p}=Et();Ra(()=>{if(t&&e){if(t.startsWith(At))return;let x=`frigade-user-group-registered-${t}-${e}`;localStorage.getItem(x)||(s(`${n}userGroups`,{...i,method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})}),localStorage.setItem(x,"true"))}},[t,e]);let c=Mi(async x=>{if(!p())return;if(!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationId:e,userId:t});return}let d={foreignUserId:t,foreignUserGroupId:e,properties:x};await s(`${n}userGroups`,{...i,method:"POST",body:JSON.stringify(d)}),r()},[e,t,i,r]),a=Mi(async(x,d)=>{if(!p())return;if(!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationId:e,userId:t});return}let y={foreignUserId:t,foreignUserGroupId:e,events:[{event:x,properties:d}]};await s(`${n}userGroups`,{...i,method:"POST",body:JSON.stringify(y)}),r()},[e,t,i,r]);return{organizationId:e,setOrganizationId:o,addPropertiesToOrganization:c,trackEventForOrganization:a}}var Ui="frigade-xFrigade_guestUserId",to="frigade-xFrigade_userId",zi=({})=>{let{setFlowResponses:e}=Gt(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:r}=ve(),{userId:i,setUserId:n}=Kt(),[s,p]=mr(null),{getFlowStatus:c}=Z(),{flows:a,userProperties:x,setIsNewGuestUser:d,flowResponses:h}=ep(K),[y,w]=mr([]),[v,f]=mr([]),{organizationId:E}=cr();Eo(()=>{if(!o&&t)for(let C=0;C<t.length;C++){let m=t[C],B=a.find(k=>k.slug===(m==null?void 0:m.flowId));if(B&&m&&m.shouldTrigger===!0&&B.type=="FORM"&&B.triggerType==="AUTOMATIC"&&!v.includes(B.slug)){setTimeout(()=>{b(m.flowId)},500);break}}},[o,t]),Eo(()=>{h.length>0&&r()},[h]);function b(C){let m=a.find(B=>B.slug===C);m&&m.triggerType==="AUTOMATIC"&&!v.includes(m.slug)&&(f([...v,m.slug]),w([m]))}function S(){if(!i){let C=localStorage.getItem(to);if(C){n(C);return}let m=localStorage.getItem(Ui);if(m){n(m);return}d(!0);let B=At+tp();try{localStorage.setItem(Ui,B)}catch(k){console.log("Failed to save guest user id locally: Local storage unavailable",k)}n(k=>k||B)}}Eo(()=>{try{if(a){let C=[];a.forEach(m=>{if(m.data){let B=m.data.match(/"imageUri":"(.*?)"/g);B&&B.forEach(k=>{let T=k.replace('"imageUri":"',"").replace('"',"");if(C.includes(T))return;let N=new Image;N.src=T,C.push(T)})}})}}catch{}},[a]),Eo(()=>{if(i!==s&&e([]),p(i),i&&!i.startsWith(At))try{localStorage.setItem(to,i)}catch(C){console.log("Failed to save user id locally: Local storage available",C)}i===null&&setTimeout(()=>{i===null&&S()},50)},[i,a,x]);function A(){return yt.createElement(yt.Fragment,null,y.map(C=>c(C.slug)!==$e?null:yt.createElement("span",{key:C.slug},yt.createElement($i,{flowId:C.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return yt.createElement(yt.Fragment,null,yt.createElement(A,null))};import{ErrorBoundary as vp}from"react-error-boundary";import oo from"core-js-pure/actual/structured-clone";function ur(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function pt(...e){let t=e.shift(),o=e.length===1?e[0]:pt(...e);if(!ur(t)||!ur(o))throw new Error("deepmerge can only merge Objects");let r=oo(t);return Object.entries(o).forEach(([i,n])=>{ur(n)?r[i]!==void 0?Object.assign(r,{[i]:pt(r[i],oo(n))}):Object.assign(r,{[i]:oo(n)}):Array.isArray(n)?r[i]!==void 0?Object.assign(r,{[i]:[...r[i],...oo(n)]}):Object.assign(r,{[i]:oo(n)}):Object.assign(r,{[i]:n})}),r}var _i={colorPrimary:"colors.primary.background",colorText:"colors.neutral.foreground",colorBackground:"colors.neutral.background",colorBackgroundSecondary:"colors.secondary.background",colorTextOnPrimaryBackground:"colors.primary.foreground",colorTextSecondary:"colors.secondary.foreground",colorTextDisabled:"colors.gray700",colorBorder:"colors.gray800",colorTextError:"colors.negative.foreground",borderRadius:"radii.lg"};function op(e){if(!e)return;let t={};return Object.entries(e).forEach(([o,r])=>{if(_i[o]){let i=_i[o].split("."),n=t;i.forEach((s,p)=>{n[s]||(n[s]=p===i.length-1?r:{}),n=n[s]})}}),t}function rp(e){if(!e)return;let t=pt({},e),o={};return Object.keys(t).forEach(r=>{let i=`.fr-${r}`;o[i]=t[r]}),o}function Wi(e){let{theme:t,styleOverrides:o}=e,r=op(t),i=rp(o);return{overrides:r,css:i}}import hp from"styled-components";import{compose as Cp,variant as Vi}from"styled-system";import Hi from"react";import ip,{ThemeProvider as np,useTheme as sp}from"styled-components";import{border as lp,color as ap,compose as pp,get as dp,shadow as cp,space as mp,system as up,typography as fp}from"styled-system";var gp={width:{property:"width",scale:"sizes",transform:(e,t)=>dp(t,e,!(typeof e=="number"&&!isNaN(e))||e>1?e:e*100+"%")},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},xp=ip("div")(({css:e})=>e,pp(lp,ap,cp,mp,fp,up(gp))),ro=({as:e,children:t,overrides:o,...r})=>{let i=sp(),n={border:"none",boxSizing:"border-box",m:0,p:0},s=()=>Hi.createElement(xp,{as:e,...n,...r},t);if(o!==void 0){let p=pt(i,o);return Hi.createElement(np,{theme:p},s())}return s()};var io={Primary:{backgroundColor:"primary.background",color:"primary.foreground","&:hover":{backgroundColor:"blue400"}},Secondary:{backgroundColor:"white",border:"1px solid",borderColor:"gray800",color:"neutral.foreground","&:hover":{backgroundColor:"blue900"}},Link:{backgroundColor:"transparent",color:"primary.inverted"},Plain:{backgroundColor:"transparent",color:"neutral.foreground"}},Sp={sm:{paddingX:4,paddingY:1},md:{paddingX:6,paddingY:2}},ji=hp(ro)(()=>({whiteSpace:"nowrap"}),Cp(Vi({scale:"components.Button",variants:"components.Button"}),Vi({prop:"size",variants:Sp})));import yp from"styled-components";import{variant as bp,system as wp}from"styled-system";var Ao={Display1:{fontSize:"5xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"4xl"},Display2:{fontSize:"4xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"3xl"},H1:{fontSize:"3xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"2xl"},H2:{fontSize:"2xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"xl"},H3:{fontSize:"xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"lg"},H4:{fontSize:"lg",fontWeight:"bold",letterSpacing:"md",lineHeight:"md"},Body1:{fontSize:"md",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Body2:{fontSize:"sm",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Caption:{fontSize:"xs",fontWeight:"regular",letterSpacing:"md",lineHeight:"sm"}};var Gi=yp(ro)(bp({scale:"components.Text",variants:"components.Text"}),wp({fontWeight:{property:"fontWeight",scale:"fontWeights"}}));var Ki=4,qi="px",Tp=20,Fp=Object.fromEntries(Array.from(Array(Tp+1),(e,t)=>t===0?[.5,`${.5*Ki}${qi}`]:[t,`${t*Ki}${qi}`])),Dt={black:"#000000",gray100:"#14161A",gray200:"#181B20",gray300:"#1F2329",gray400:"#2E343D",gray500:"#4C5766",gray600:"#5A6472",gray700:"#C5CBD3",gray800:"#E2E5E9",gray900:"#F1F2F4",white:"#ffffff",blue400:"#015AC6",blue500:"#0171F8",blue800:"#DBECFF",blue900:"#F5F9FF",green400:"#009E37",green500:"#00D149",green800:"#DBFFE8",transparent:"#FFFFFF00",red500:"#c00000"},fr={colors:{...Dt,neutral:{foreground:Dt.gray300},primary:{background:Dt.blue500,foreground:Dt.white,inverted:Dt.blue500},negative:{foreground:Dt.red500}},fonts:{default:"TT Interphases Pro, sans-serif"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{regular:400,semibold:500,bold:700},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"},radii:{md:"8px",lg:"20px",round:"50%"},shadows:{md:"0px 4px 20px rgba(0, 0, 0, 0.06)"},space:Fp,components:{Button:io,Text:Ao}};var Yi="https://api.frigade.com",K=kp({publicApiKey:"",setUserId:()=>{},flows:[],setFlows:()=>{},failedFlowResponses:[],setFailedFlowResponses:()=>{},flowResponses:[],setFlowResponses:()=>{},userProperties:{},setUserProperties:()=>{},openFlowStates:{},setOpenFlowStates:()=>{},completedFlowsToKeepOpenDuringSession:[],setCompletedFlowsToKeepOpenDuringSession:()=>{},customVariables:{},setCustomVariables:()=>{},isNewGuestUser:!1,setIsNewGuestUser:()=>{},hasActiveFullPageFlow:!1,setHasActiveFullPageFlow:()=>{},organizationId:"",setOrganizationId:()=>{},navigate:()=>{},defaultAppearance:qe,shouldGracefullyDegrade:!1,setShouldGracefullyDegrade:()=>{},apiUrl:Yi,readonly:!1});function Bp(){Object.keys(localStorage).forEach(e=>{e.startsWith("frigade-")&&localStorage.removeItem(e)})}var Ep=({publicApiKey:e,userId:t,organizationId:o,config:r,children:i})=>{var fe,q;let[n,s]=Oe(t||null),[p,c]=Oe(o||null),[a,x]=Oe([]),[d,h]=Oe([]),[y,w]=Oe([]),[v,f]=Oe({}),[E,b]=Oe({}),[S,A]=Oe([]),[C,m]=Oe({}),[B,k]=Oe(!1),[T,N]=Oe(!1),[I,U]=Oe(!ee(e)),$=(H,V)=>{if(V==="_blank"){window.open(H,"_blank");return}setTimeout(()=>{window.location.href=H},50)},L={theme:{...qe.theme,...((fe=r==null?void 0:r.defaultAppearance)==null?void 0:fe.theme)??{}},styleOverrides:{...qe.styleOverrides,...((q=r==null?void 0:r.defaultAppearance)==null?void 0:q.styleOverrides)??{}}};function ee(H){return!!(H&&H.length>10&&H.substring(0,10)==="api_public")}Io(()=>{t&&s(t)},[t]),Io(()=>{n&&window&&window.localStorage&&window.localStorage.getItem(to)&&window.localStorage.getItem(to)!==n&&Bp()},[n]),Io(()=>{o&&c(o)},[o]),Io(()=>{if(ee(e))U(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),U(!0);return}},[e,U]);let z={publicApiKey:e,userId:n,setUserId:s,setFlows:x,flows:a,failedFlowResponses:d,setFailedFlowResponses:h,flowResponses:y,setFlowResponses:w,userProperties:v,setUserProperties:f,openFlowStates:E,setOpenFlowStates:b,completedFlowsToKeepOpenDuringSession:S,setCompletedFlowsToKeepOpenDuringSession:A,customVariables:C,setCustomVariables:m,isNewGuestUser:B,setIsNewGuestUser:k,hasActiveFullPageFlow:T,setHasActiveFullPageFlow:N,organizationId:p,setOrganizationId:c,navigate:r&&r.navigate?r.navigate:$,defaultAppearance:L,shouldGracefullyDegrade:I,setShouldGracefullyDegrade:U,apiUrl:r&&r.apiUrl?r.apiUrl:Yi,readonly:r&&r.readonly?r.readonly:!1};if(I)return bt.createElement(K.Provider,{value:z},i);let{overrides:J}=Wi(L);return bt.createElement(vp,{fallback:bt.createElement(bt.Fragment,null,i)},bt.createElement(K.Provider,{value:z},bt.createElement(Pp,{theme:pt(L.theme,fr,J??{},(r==null?void 0:r.theme)??{})},i,bt.createElement(zi,null))))};import Cd from"react";import pe,{useEffect as Ts,useState as Fs}from"react";import ze,{useState as qp}from"react";import Ft from"styled-components";import Lo from"react";import wt from"react";import Ji from"styled-components";var Xi=Ji.span`
632
+ `;var Oi=({stepData:e,setCanContinue:t,onSaveData:o,appearance:r})=>{let i=e.props,[n,s]=ar([]),[p,c]=ar(!1),[a,g]=ar(e.id);return lr(()=>{n.length==0&&!p&&(c(!0),o({choice:[]}))},[p]),lr(()=>{a!==e.id&&(g(e.id),s([]))},[e]),lr(()=>{o({choice:n}),n.length>=i.minChoices?t(!0):t(!1)},[n]),Xe.createElement(ki,{className:l("selectListContainer",r)},Xe.createElement(Pi,null,Xe.createElement(vi,{className:l("selectListTitle",r)},e.title),Xe.createElement(Bi,{appearance:r,className:l("selectListSubtitle",r)},e.subtitle)),i.options.map((d,x)=>{let y=n.includes(d.id);return Xe.createElement(Ei,{key:`select-item-${x}`,onClick:()=>{if(n.includes(d.id)){s(n.filter(w=>w!==d.id));return}n.length<i.maxChoices?s([...n,d.id]):n.length==1&&i.maxChoices==1&&s([d.id])},hideBottomBorder:x===i.options.length-1,className:l("selectListSelectItem",r)},Xe.createElement(Ai,{className:l("selectListItemImage",r)},d.imageUri&&Xe.createElement(Ii,{src:d.imageUri,alt:`select-icon-${x}`}),Xe.createElement(Ni,{appearance:r,className:l("selectListSelectItemText",r)},d.title)),Xe.createElement(Ye,{appearance:r,value:y,primaryColor:r.theme.colorPrimary}))}))};import Te,{useEffect as Bo,useState as Rt}from"react";var Ya=({children:e,id:t,shouldWrap:o=!1})=>Te.createElement(Te.Fragment,null,o?Te.createElement("div",{key:t,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,overflowY:"auto"}},e):e),Eo=({appearance:e,steps:t,selectedStep:o,customStepTypes:r,customVariables:i,onButtonClick:n,onStepCompletion:s,flowId:p,type:c,hideOnFlowCompletion:a,onComplete:g,setVisible:d,setShowModal:x,onDismiss:y,showPagination:w=!1,customFormElements:P,allowBackNavigation:f,validationHandler:E,onFormDataChange:b,showFooter:S,prefillData:A})=>{var V;let m={...{linkCollection:Ti,multiInput:mi,callToAction:Fi,selectList:Oi},...r},{primaryCTAClickSideEffects:B,secondaryCTAClickSideEffects:F}=ae(),[T,O]=Rt(!1),[I,M]=Rt({}),[D,L]=Rt(!1),[ee,U]=Rt(!1),[J,fe]=Rt(null),q=t[o]??null,{markStepCompleted:W,markStepStarted:H,isLoading:he,updateCustomVariables:Ie,markFlowCompleted:ye}=Z();Bo(()=>{Ie(i)},[i,he]),Bo(()=>{b&&b(I,ce(),t[o],o)},[I]),Bo(()=>{window&&f&&!ee&&(window.location.hash=t[o].id,U(!0))},[f,ee,U]),Bo(()=>{var j;if(window&&((j=window==null?void 0:window.location)!=null&&j.hash)&&window.location.hash.replace("#","")!==t[o].id){let ie=window.location.hash.replace("#",""),ne=t.findIndex(le=>le.id===ie);ne!==-1&&H(p,t[ne].id)}},[(V=window==null?void 0:window.location)==null?void 0:V.hash,H,o,t]);function ce(){return{data:I[t[o].id]??{},stepId:t[o].id,customVariables:i}}function Y(j,ie,ne){let le=o+1<t.length?t[o+1]:null;return s&&s(j,ne,le,I,ce()),n?n(j,o,ie,le):!0}function ge(j,ie){M(ne=>{let le={};return le[j.id]=ie,{...ne,...le}})}function te(j){return j.selectedStep.imageUri?Te.createElement(Si,{image:j.selectedStep.imageUri,appearance:e,className:l("formContainerSidebarImage",e)}):null}let N=S&&Te.createElement(bi,{step:t[o],canContinue:T&&!D,formType:c,selectedStep:o,appearance:e,onPrimaryClick:async()=>{if(L(!0),E){let ne=await E(t[o],o,t[o+1],I,ce());if(ne||ne===!1){fe(typeof ne=="string"?ne:null),L(!1);return}else fe(null)}let j={...ce()};await W(p,t[o].id,j),o+1<t.length&&await H(p,t[o+1].id);let ie=Y(t[o],"primary",o);o+1>=t.length&&(g&&g(),y&&y(),a&&ie&&(d&&d(!1),x(!1)),await ye(p)),B(t[o]),L(!1),window&&f&&o+1<t.length&&(window.location.hash=t[o+1].id)},onSecondaryClick:()=>{Y(t[o],"secondary",o),F(t[o])},onBack:async()=>{o-1>=0&&(L(!0),await H(p,t[o-1].id),L(!1))},steps:t,allowBackNavigation:f,errorMessage:J});return Te.createElement(Te.Fragment,null,Te.createElement(xi,{className:l("formContainer",e)},Te.createElement(hi,null,Te.createElement(Ya,{id:o,shouldWrap:c==="large-modal"},Te.createElement(Ci,{key:q.id,type:c,className:l("formContent",e)},t.map(j=>{let ie=m[j.type];return q.id!==j.id?null:Te.createElement(ie,{key:j.id,stepData:j,canContinue:T,setCanContinue:O,onSaveData:ne=>{ge(j,ne)},appearance:e,customFormElements:P,flowId:p,prefillData:A})}),w&&Te.createElement(wi,{className:l("formPagination",e),appearance:e,stepCount:t.length,currentStep:o}),N))),c=="large-modal"&&Te.createElement(te,{selectedStep:t[o]})))};import eo from"react";import{createGlobalStyle as Xa}from"styled-components";function re({appearance:e}){if(!e||!e.styleOverrides)return eo.createElement(eo.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([r,i])=>typeof i=="object");if(t.length===0)return eo.createElement(eo.Fragment,null);let o=Xa`
633
+ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map(([s,p])=>`${Go(s)}: ${p};`).join(" ")} }`).join(" ")}`;return eo.createElement(o,{inlineStyles:t})}var Li=({flowId:e,customStepTypes:t={},type:o="inline",visible:r,setVisible:i,customVariables:n,customFormElements:s,onComplete:p,appearance:c,hideOnFlowCompletion:a=!0,onStepCompletion:g,onButtonClick:d,dismissible:x=!0,endFlowOnDismiss:y=!1,modalPosition:w="center",repeatable:P=!1,onDismiss:f,showPagination:E=!1,allowBackNavigation:b=!1,validationHandler:S,showFrigadeBranding:A=!1,onFormDataChange:C,showFooter:m=!0,prefillData:B={}})=>{let{getFlow:F,getFlowSteps:T,isLoading:O,targetingLogicShouldHideFlow:I,getFlowStatus:M,getCurrentStepIndex:D,markFlowCompleted:L,markFlowNotStarted:ee}=Z(),U=D(e),{mergeAppearanceWithDefault:J}=R(),[fe,q]=Qa(!1),{setOpenFlowState:W,getOpenFlowState:H,hasOpenModals:he}=Pe();c=J(c);let[Ie,ye]=r!==void 0&&i!==void 0?[r,i]:[H(e,!0),te=>W(e,te)];if(Ja(()=>{!fe&&!O&&(q(!0),M(e)===Q&&P&&(ee(e),window&&window.localStorage&&Object.keys(window.localStorage).forEach(N=>{N.startsWith(ir)&&window.localStorage.removeItem(N)})),q(!0))},[fe,q,O]),O)return null;let ce=F(e);if(!ce||I(ce))return null;let Y=T(e);if(!Y||r!==void 0&&r===!1||M(e)===Q&&a||(o=="modal"||o=="corner-modal")&&he(e))return null;let ge=()=>{ye(!1),f&&f(),y===!0&&L(e)};if(w=="center"&&o==="modal"||o==="large-modal"){let te={padding:"24px"};return o==="large-modal"?(te.width="85%",te.height="90%",te.maxHeight="800px",te.minHeight="500px",te.padding="0"):te.width="400px",He.createElement(rt,{appearance:c,onClose:ge,visible:Ie,style:te,dismissible:x,showFrigadeBranding:A},He.createElement(re,{appearance:c}),He.createElement(Eo,{appearance:c,steps:Y,selectedStep:U,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:g,flowId:e,type:o,hideOnFlowCompletion:a,onComplete:p,setVisible:i,setShowModal:ye,onDismiss:f,showPagination:E,customFormElements:s,allowBackNavigation:b,validationHandler:S,onFormDataChange:C,showFooter:m,prefillData:B}))}return o==="modal"&&w!=="center"?He.createElement(Xr,{appearance:c,onClose:ge,visible:Ie},He.createElement(re,{appearance:c}),He.createElement(Eo,{appearance:c,steps:Y,selectedStep:U,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:g,flowId:e,type:o,hideOnFlowCompletion:a,onComplete:p,setVisible:i,setShowModal:ye,onDismiss:f,showPagination:E,customFormElements:s,allowBackNavigation:b,validationHandler:S,onFormDataChange:C,showFooter:m,prefillData:B})):He.createElement(He.Fragment,null,He.createElement(re,{appearance:c}),He.createElement(Eo,{appearance:c,steps:Y,selectedStep:U,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:g,flowId:e,type:o,hideOnFlowCompletion:a,onComplete:p,setVisible:i,setShowModal:ye,onDismiss:f,showPagination:E,customFormElements:s,allowBackNavigation:b,validationHandler:S,onFormDataChange:C,showFooter:m,prefillData:B}))},Di=Li;import{useCallback as $i,useContext as Za,useEffect as Ra}from"react";function pr(){let{organizationId:e,userId:t,setOrganizationId:o}=Za(K),{mutateUserFlowState:r}=ve(),{config:i,apiUrl:n}=_e(),s=vt(),{verifySDKInitiated:p}=Bt();Ra(()=>{if(t&&e){if(t.startsWith(Et))return;let g=`frigade-user-group-registered-${t}-${e}`;localStorage.getItem(g)||(s(`${n}userGroups`,{...i,method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})}),localStorage.setItem(g,"true"))}},[t,e]);let c=$i(async g=>{if(!p())return;if(!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationId:e,userId:t});return}let d={foreignUserId:t,foreignUserGroupId:e,properties:g};await s(`${n}userGroups`,{...i,method:"POST",body:JSON.stringify(d)}),r()},[e,t,i,r]),a=$i(async(g,d)=>{if(!p())return;if(!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationId:e,userId:t});return}let y={foreignUserId:t,foreignUserGroupId:e,events:[{event:g,properties:d}]};await s(`${n}userGroups`,{...i,method:"POST",body:JSON.stringify(y)}),r()},[e,t,i,r]);return{organizationId:e,setOrganizationId:o,addPropertiesToOrganization:c,trackEventForOrganization:a}}var Mi="frigade-xFrigade_guestUserId",to="frigade-xFrigade_userId",Ui=({})=>{let{setFlowResponses:e}=Gt(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:r}=ve(),{userId:i,setUserId:n}=Kt(),[s,p]=dr(null),{getFlowStatus:c}=Z(),{flows:a,userProperties:g,setIsNewGuestUser:d,flowResponses:x}=ep(K),[y,w]=dr([]),[P,f]=dr([]),{organizationId:E}=pr();Ao(()=>{if(!o&&t)for(let C=0;C<t.length;C++){let m=t[C],B=a.find(F=>F.slug===(m==null?void 0:m.flowId));if(B&&m&&m.shouldTrigger===!0&&B.type=="FORM"&&B.triggerType==="AUTOMATIC"&&!P.includes(B.slug)){setTimeout(()=>{b(m.flowId)},500);break}}},[o,t]),Ao(()=>{x.length>0&&r()},[x]);function b(C){let m=a.find(B=>B.slug===C);m&&m.triggerType==="AUTOMATIC"&&!P.includes(m.slug)&&(f([...P,m.slug]),w([m]))}function S(){if(!i){let C=localStorage.getItem(to);if(C){n(C);return}let m=localStorage.getItem(Mi);if(m){n(m);return}d(!0);let B=Et+tp();try{localStorage.setItem(Mi,B)}catch(F){console.log("Failed to save guest user id locally: Local storage unavailable",F)}n(F=>F||B)}}Ao(()=>{try{if(a){let C=[];a.forEach(m=>{if(m.data){let B=m.data.match(/"imageUri":"(.*?)"/g);B&&B.forEach(F=>{let T=F.replace('"imageUri":"',"").replace('"',"");if(C.includes(T))return;let O=new Image;O.src=T,C.push(T)})}})}}catch{}},[a]),Ao(()=>{if(i!==s&&e([]),p(i),i&&!i.startsWith(Et))try{localStorage.setItem(to,i)}catch(C){console.log("Failed to save user id locally: Local storage available",C)}i===null&&setTimeout(()=>{i===null&&S()},50)},[i,a,g]);function A(){return St.createElement(St.Fragment,null,y.map(C=>c(C.slug)!==$e?null:St.createElement("span",{key:C.slug},St.createElement(Di,{flowId:C.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return St.createElement(St.Fragment,null,St.createElement(A,null))};import{ErrorBoundary as vp}from"react-error-boundary";import oo from"core-js-pure/actual/structured-clone";function cr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function pt(...e){let t=e.shift(),o=e.length===1?e[0]:pt(...e);if(!cr(t)||!cr(o))throw new Error("deepmerge can only merge Objects");let r=oo(t);return Object.entries(o).forEach(([i,n])=>{cr(n)?r[i]!==void 0?Object.assign(r,{[i]:pt(r[i],oo(n))}):Object.assign(r,{[i]:oo(n)}):Array.isArray(n)?r[i]!==void 0?Object.assign(r,{[i]:[...r[i],...oo(n)]}):Object.assign(r,{[i]:oo(n)}):Object.assign(r,{[i]:n})}),r}var zi={colorPrimary:"colors.primary.background",colorText:"colors.neutral.foreground",colorBackground:"colors.neutral.background",colorBackgroundSecondary:"colors.secondary.background",colorTextOnPrimaryBackground:"colors.primary.foreground",colorTextSecondary:"colors.secondary.foreground",colorTextDisabled:"colors.gray700",colorBorder:"colors.gray800",colorTextError:"colors.negative.foreground",borderRadius:"radii.lg"};function op(e){if(!e)return;let t={};return Object.entries(e).forEach(([o,r])=>{if(zi[o]){let i=zi[o].split("."),n=t;i.forEach((s,p)=>{n[s]||(n[s]=p===i.length-1?r:{}),n=n[s]})}}),t}function rp(e){if(!e)return;let t=pt({},e),o={};return Object.keys(t).forEach(r=>{let i=`.fr-${r}`;o[i]=t[r]}),o}function _i(e){let{theme:t,styleOverrides:o}=e,r=op(t),i=rp(o);return{overrides:r,css:i}}import hp from"styled-components";import{compose as Cp,variant as Hi}from"styled-system";import Wi from"react";import ip,{ThemeProvider as np,useTheme as sp}from"styled-components";import{border as lp,color as ap,compose as pp,get as dp,shadow as cp,space as mp,system as up,typography as fp}from"styled-system";var gp={width:{property:"width",scale:"sizes",transform:(e,t)=>dp(t,e,!(typeof e=="number"&&!isNaN(e))||e>1?e:e*100+"%")},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},xp=ip("div")(({css:e})=>e,pp(lp,ap,cp,mp,fp,up(gp))),ro=({as:e,children:t,overrides:o,...r})=>{let i=sp(),n={border:"none",boxSizing:"border-box",m:0,p:0},s=()=>Wi.createElement(xp,{as:e,...n,...r},t);if(o!==void 0){let p=pt(i,o);return Wi.createElement(np,{theme:p},s())}return s()};var io={Primary:{backgroundColor:"primary.background",color:"primary.foreground","&:hover":{backgroundColor:"blue400"}},Secondary:{backgroundColor:"white",border:"1px solid",borderColor:"gray800",color:"neutral.foreground","&:hover":{backgroundColor:"blue900"}},Link:{backgroundColor:"transparent",color:"primary.inverted"},Plain:{backgroundColor:"transparent",color:"neutral.foreground"}},Sp={sm:{paddingX:4,paddingY:1},md:{paddingX:6,paddingY:2}},Vi=hp(ro)(()=>({whiteSpace:"nowrap"}),Cp(Hi({scale:"components.Button",variants:"components.Button"}),Hi({prop:"size",variants:Sp})));import yp from"styled-components";import{variant as bp,system as wp}from"styled-system";var Io={Display1:{fontSize:"5xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"4xl"},Display2:{fontSize:"4xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"3xl"},H1:{fontSize:"3xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"2xl"},H2:{fontSize:"2xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"xl"},H3:{fontSize:"xl",fontWeight:"bold",letterSpacing:"md",lineHeight:"lg"},H4:{fontSize:"lg",fontWeight:"bold",letterSpacing:"md",lineHeight:"md"},Body1:{fontSize:"md",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Body2:{fontSize:"sm",fontWeight:"regular",letterSpacing:"md",lineHeight:"md"},Caption:{fontSize:"xs",fontWeight:"regular",letterSpacing:"md",lineHeight:"sm"}};var ji=yp(ro)(bp({scale:"components.Text",variants:"components.Text"}),wp({fontWeight:{property:"fontWeight",scale:"fontWeights"}}));var Gi=4,Ki="px",Tp=20,Fp=Object.fromEntries(Array.from(Array(Tp+1),(e,t)=>t===0?[.5,`${.5*Gi}${Ki}`]:[t,`${t*Gi}${Ki}`])),Lt={black:"#000000",gray100:"#14161A",gray200:"#181B20",gray300:"#1F2329",gray400:"#2E343D",gray500:"#4C5766",gray600:"#5A6472",gray700:"#C5CBD3",gray800:"#E2E5E9",gray900:"#F1F2F4",white:"#ffffff",blue400:"#015AC6",blue500:"#0171F8",blue800:"#DBECFF",blue900:"#F5F9FF",green400:"#009E37",green500:"#00D149",green800:"#DBFFE8",transparent:"#FFFFFF00",red500:"#c00000"},mr={colors:{...Lt,neutral:{foreground:Lt.gray300},primary:{background:Lt.blue500,foreground:Lt.white,inverted:Lt.blue500},negative:{foreground:Lt.red500}},fonts:{default:"TT Interphases Pro, sans-serif"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{regular:400,semibold:500,bold:700},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"},radii:{md:"8px",lg:"20px",round:"50%"},shadows:{md:"0px 4px 20px rgba(0, 0, 0, 0.06)"},space:Fp,components:{Button:io,Text:Io}};var qi="https://api.frigade.com",K=kp({publicApiKey:"",setUserId:()=>{},flows:[],setFlows:()=>{},failedFlowResponses:[],setFailedFlowResponses:()=>{},flowResponses:[],setFlowResponses:()=>{},userProperties:{},setUserProperties:()=>{},openFlowStates:{},setOpenFlowStates:()=>{},completedFlowsToKeepOpenDuringSession:[],setCompletedFlowsToKeepOpenDuringSession:()=>{},customVariables:{},setCustomVariables:()=>{},isNewGuestUser:!1,setIsNewGuestUser:()=>{},hasActiveFullPageFlow:!1,setHasActiveFullPageFlow:()=>{},organizationId:"",setOrganizationId:()=>{},navigate:()=>{},defaultAppearance:qe,shouldGracefullyDegrade:!1,setShouldGracefullyDegrade:()=>{},apiUrl:qi,readonly:!1});function Bp(){Object.keys(localStorage).forEach(e=>{e.startsWith("frigade-")&&localStorage.removeItem(e)})}var Ep=({publicApiKey:e,userId:t,organizationId:o,config:r,children:i})=>{var fe,q;let[n,s]=Oe(t||null),[p,c]=Oe(o||null),[a,g]=Oe([]),[d,x]=Oe([]),[y,w]=Oe([]),[P,f]=Oe({}),[E,b]=Oe({}),[S,A]=Oe([]),[C,m]=Oe({}),[B,F]=Oe(!1),[T,O]=Oe(!1),[I,M]=Oe(!ee(e)),D=(W,H)=>{if(H==="_blank"){window.open(W,"_blank");return}setTimeout(()=>{window.location.href=W},50)},L={theme:{...qe.theme,...((fe=r==null?void 0:r.defaultAppearance)==null?void 0:fe.theme)??{}},styleOverrides:{...qe.styleOverrides,...((q=r==null?void 0:r.defaultAppearance)==null?void 0:q.styleOverrides)??{}}};function ee(W){return!!(W&&W.length>10&&W.substring(0,10)==="api_public")}No(()=>{t&&s(t)},[t]),No(()=>{n&&window&&window.localStorage&&window.localStorage.getItem(to)&&window.localStorage.getItem(to)!==n&&Bp()},[n]),No(()=>{o&&c(o)},[o]),No(()=>{if(ee(e))M(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),M(!0);return}},[e,M]);let U={publicApiKey:e,userId:n,setUserId:s,setFlows:g,flows:a,failedFlowResponses:d,setFailedFlowResponses:x,flowResponses:y,setFlowResponses:w,userProperties:P,setUserProperties:f,openFlowStates:E,setOpenFlowStates:b,completedFlowsToKeepOpenDuringSession:S,setCompletedFlowsToKeepOpenDuringSession:A,customVariables:C,setCustomVariables:m,isNewGuestUser:B,setIsNewGuestUser:F,hasActiveFullPageFlow:T,setHasActiveFullPageFlow:O,organizationId:p,setOrganizationId:c,navigate:r&&r.navigate?r.navigate:D,defaultAppearance:L,shouldGracefullyDegrade:I,setShouldGracefullyDegrade:M,apiUrl:r&&r.apiUrl?r.apiUrl:qi,readonly:r&&r.readonly?r.readonly:!1};if(I)return yt.createElement(K.Provider,{value:U},i);let{overrides:J}=_i(L);return yt.createElement(vp,{fallback:yt.createElement(yt.Fragment,null,i)},yt.createElement(K.Provider,{value:U},yt.createElement(Pp,{theme:pt(L.theme,mr,J??{},(r==null?void 0:r.theme)??{})},i,yt.createElement(Ui,null))))};import Cd from"react";import de,{useEffect as Ts,useState as Fs}from"react";import ze,{useState as qp}from"react";import Tt from"styled-components";import Do from"react";import bt from"react";import Xi from"styled-components";var Yi=Xi.span`
634
634
  font-weight: 400;
635
635
  font-size: 15px;
636
636
  line-height: 20px;
@@ -639,7 +639,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
639
639
  vertical-align: middle;
640
640
  margin-left: 12px;
641
641
  padding-right: 12px;
642
- `,Ap=Ji.div`
642
+ `,Ap=Xi.div`
643
643
  flex-direction: row;
644
644
  justify-content: space-between;
645
645
  display: flex;
@@ -647,24 +647,24 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
647
647
  padding-bottom: 20px;
648
648
  border-top: 1px solid ${e=>e.theme.colorBorder};
649
649
  width: 100%;
650
- `,No=({label:e,value:t,labelStyle:o={},labelPosition:r="right",style:i,primaryColor:n="#000000",checkBoxType:s="square",appearance:p})=>wt.createElement(wt.Fragment,null,wt.createElement(Ap,{className:l("checklistStepsContainer",p),appearance:p,style:{...i}},r==="left"&&e&&wt.createElement(Xi,{className:l("checklistStepLabel",p),style:o},e),wt.createElement(Ye,{appearance:p,value:t,type:s,primaryColor:n}),r==="right"&&e&&wt.createElement(Xi,{className:l("checklistStepLabel",p),style:o},e)),wt.createElement(ie,{appearance:p}));import no from"styled-components";var Qi=no.div`
650
+ `,Oo=({label:e,value:t,labelStyle:o={},labelPosition:r="right",style:i,primaryColor:n="#000000",checkBoxType:s="square",appearance:p})=>bt.createElement(bt.Fragment,null,bt.createElement(Ap,{className:l("checklistStepsContainer",p),appearance:p,style:{...i}},r==="left"&&e&&bt.createElement(Yi,{className:l("checklistStepLabel",p),style:o},e),bt.createElement(Ye,{appearance:p,value:t,type:s,primaryColor:n}),r==="right"&&e&&bt.createElement(Yi,{className:l("checklistStepLabel",p),style:o},e)),bt.createElement(re,{appearance:p}));import no from"styled-components";var Ji=no.div`
651
651
  font-weight: 700;
652
652
  font-size: 18px;
653
653
  line-height: 22px;
654
- `,Zi=no.p`
654
+ `,Qi=no.p`
655
655
  font-weight: 700;
656
656
  font-size: 18px;
657
657
  line-height: 30px;
658
658
  margin: 20px 0px 0px 0px;
659
659
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
660
- `,Ri=no.p`
660
+ `,Zi=no.p`
661
661
  font-weight: 400;
662
662
  font-size: 15px;
663
663
  line-height: 28px;
664
664
  max-width: 540px;
665
665
  margin: 8px 0px 0px 0px;
666
666
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
667
- `,Oo=no.div`
667
+ `,Lo=no.div`
668
668
  width: 4px;
669
669
  position: absolute;
670
670
  left: 0;
@@ -672,10 +672,10 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
672
672
  height: 80%;
673
673
  border-top-right-radius: 8px;
674
674
  border-bottom-right-radius: 8px;
675
- `,en=no.div`
675
+ `,Ri=no.div`
676
676
  flex-direction: row;
677
677
  justify-content: flex-start;
678
- `;var tn=({data:e,index:t,isSelected:o,primaryColor:r,style:i,onClick:n,appearance:s})=>{var p,c;return Lo.createElement("div",{style:{position:"relative",paddingLeft:"20px"},onClick:()=>{n()}},o&&Lo.createElement(Oo,{className:l("checklistStepItemSelectedIndicator",s),layoutId:"checklis-step-selected",style:{backgroundColor:((p=s==null?void 0:s.theme)==null?void 0:p.colorPrimary)??r}}),Lo.createElement(en,{className:l("checklistStepItem",s),key:`hero-checklist-step-${t}`,role:"listitem"},Lo.createElement(No,{value:e.complete,labelPosition:"left",label:e.stepName??e.title,style:i,primaryColor:((c=s==null?void 0:s.theme)==null?void 0:c.colorPrimary)??r,appearance:s})))};import Tt from"react";import gr from"styled-components";import Je from"styled-components";var Ux=Je.div`
678
+ `;var en=({data:e,index:t,isSelected:o,primaryColor:r,style:i,onClick:n,appearance:s})=>{var p,c;return Do.createElement("div",{style:{position:"relative",paddingLeft:"20px"},onClick:()=>{n()}},o&&Do.createElement(Lo,{className:l("checklistStepItemSelectedIndicator",s),layoutId:"checklis-step-selected",style:{backgroundColor:((p=s==null?void 0:s.theme)==null?void 0:p.colorPrimary)??r}}),Do.createElement(Ri,{className:l("checklistStepItem",s),key:`hero-checklist-step-${t}`,role:"listitem"},Do.createElement(Oo,{value:e.complete,labelPosition:"left",label:e.stepName??e.title,style:i,primaryColor:((c=s==null?void 0:s.theme)==null?void 0:c.colorPrimary)??r,appearance:s})))};import wt from"react";import ur from"styled-components";import Je from"styled-components";var Ux=Je.div`
679
679
  background: #ffffff;
680
680
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
681
681
  border-radius: 20px;
@@ -701,7 +701,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
701
701
  display: flex;
702
702
  justify-content: flex-start;
703
703
  flex-direction: row;
704
- `,on=Je.div`
704
+ `,tn=Je.div`
705
705
  position: absolute;
706
706
  left: 0;
707
707
  top: 0;
@@ -709,7 +709,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
709
709
  width: ${e=>e.fgWidth};
710
710
  border-radius: 20px;
711
711
  background-color: ${e=>e.theme.colorPrimary};
712
- `,rn=Je.div`
712
+ `,on=Je.div`
713
713
  position: relative;
714
714
  left: 0;
715
715
  top: 0;
@@ -718,7 +718,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
718
718
  height: ${e=>e.barHeight};
719
719
  border-radius: 20px;
720
720
  background-color: ${e=>e.theme.colorSecondary};
721
- `;var Ip=gr.div`
721
+ `;var Ip=ur.div`
722
722
  display: flex;
723
723
  flex-direction: ${e=>e.textLocation=="top"?"column":"row"};
724
724
  justify-content: flex-start;
@@ -726,11 +726,11 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
726
726
  width: 100%;
727
727
 
728
728
  ${e=>Ke(e)}
729
- `,Np=gr.div`
729
+ `,Np=ur.div`
730
730
  flex-grow: 1;
731
731
  position: relative;
732
732
  ${e=>e.textLocation=="top"?"width: 100%;":""}
733
- `,Op=gr.span`
733
+ `,Op=ur.span`
734
734
  font-weight: 500;
735
735
  font-size: 15px;
736
736
  line-height: 18px;
@@ -738,13 +738,13 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
738
738
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
739
739
  margin-bottom: ${e=>e.textLocation=="top"?"8px":"0px"};
740
740
  ${e=>Ke(e)}
741
- `;var Le=({count:e,total:t,display:o="count",textLocation:r="left",style:i={},textStyle:n={},appearance:s})=>{if(t===0)return Tt.createElement(Tt.Fragment,null);let p=e===0?"10px":`${e/t*100}%`,c=o==="compact"?"5px":"10px",a=Math.round(e/t*100),x=o==="compact"?"5px":"20px",d;return o==="count"?d=`${e} of ${t}`:o==="compact"?d=`${a}%`:o==="percent"&&(d=`${a}% complete`),r==="top"&&(x="0px"),Tt.createElement(Ip,{className:l("progressBarContainer",s),textLocation:r,styleOverrides:i},Tt.createElement(Op,{className:l("progressBarStepText",s),style:{...n,fontSize:o==="compact"?12:15,fontWeight:o==="compact"?400:500},appearance:s,padding:x,textLocation:r},d),Tt.createElement(Np,{textLocation:r,className:l("progressBar",s)},Tt.createElement(on,{style:{zIndex:o=="compact"?1:5},fgWidth:p,barHeight:c,appearance:s,className:l("progressBarFill",s)}),Tt.createElement(rn,{className:l("progressBarBackground",s),barHeight:c,appearance:s})))};import so from"react";import Dp from"styled-components";import $o from"react";import Do from"react";var $t=({stepData:e,appearance:t})=>Do.createElement(Do.Fragment,null,Do.createElement(Zi,{appearance:t,className:l("checklistStepTitle",t),dangerouslySetInnerHTML:me(e.title)}),Do.createElement(Ri,{appearance:t,className:l("checklistStepSubtitle",t),dangerouslySetInnerHTML:me(e.subtitle)}));import xr from"react";var Mt=({stepData:e,appearance:t})=>{let o=()=>{e.handlePrimaryButtonClick&&e.handlePrimaryButtonClick()},r=()=>{e.handleSecondaryButtonClick&&e.handleSecondaryButtonClick()};return xr.createElement(To,{className:l("ctaContainer",t)},e.secondaryButtonTitle&&xr.createElement(re,{appearance:t,secondary:!0,title:e.secondaryButtonTitle,onClick:r,style:{width:"auto",marginRight:"12px"}}),xr.createElement(re,{appearance:t,title:e.primaryButtonTitle,onClick:o}))};var Ut=({stepData:e,appearance:t})=>$o.createElement($o.Fragment,null,$o.createElement($t,{stepData:e,appearance:t}),$o.createElement(Mt,{stepData:e,appearance:t}));import Lp from"react";function nn(e){return Lp.createElement(lt,{appearance:e.appearance,videoUri:e.videoUri})}var hr="default",$p=Dp.img`
741
+ `;var Le=({count:e,total:t,display:o="count",textLocation:r="left",style:i={},textStyle:n={},appearance:s})=>{if(t===0)return wt.createElement(wt.Fragment,null);let p=e===0?"10px":`${e/t*100}%`,c=o==="compact"?"5px":"10px",a=Math.round(e/t*100),g=o==="compact"?"5px":"20px",d;return o==="count"?d=`${e} of ${t}`:o==="compact"?d=`${a}%`:o==="percent"&&(d=`${a}% complete`),r==="top"&&(g="0px"),wt.createElement(Ip,{className:l("progressBarContainer",s),textLocation:r,styleOverrides:i},wt.createElement(Op,{className:l("progressBarStepText",s),style:{...n,fontSize:o==="compact"?12:15,fontWeight:o==="compact"?400:500},appearance:s,padding:g,textLocation:r},d),wt.createElement(Np,{textLocation:r,className:l("progressBar",s)},wt.createElement(tn,{style:{zIndex:o=="compact"?1:5},fgWidth:p,barHeight:c,appearance:s,className:l("progressBarFill",s)}),wt.createElement(on,{className:l("progressBarBackground",s),barHeight:c,appearance:s})))};import so from"react";import Dp from"styled-components";import Mo from"react";import $o from"react";var Dt=({stepData:e,appearance:t})=>$o.createElement($o.Fragment,null,$o.createElement(Qi,{appearance:t,className:l("checklistStepTitle",t),dangerouslySetInnerHTML:me(e.title)}),$o.createElement(Zi,{appearance:t,className:l("checklistStepSubtitle",t),dangerouslySetInnerHTML:me(e.subtitle)}));import fr from"react";var $t=({stepData:e,appearance:t})=>{let o=()=>{e.handlePrimaryButtonClick&&e.handlePrimaryButtonClick()},r=()=>{e.handleSecondaryButtonClick&&e.handleSecondaryButtonClick()};return fr.createElement(Fo,{className:l("ctaContainer",t)},e.secondaryButtonTitle&&fr.createElement(oe,{appearance:t,secondary:!0,title:e.secondaryButtonTitle,onClick:r,style:{width:"auto",marginRight:"12px"}}),fr.createElement(oe,{appearance:t,title:e.primaryButtonTitle,onClick:o}))};var Mt=({stepData:e,appearance:t})=>Mo.createElement(Mo.Fragment,null,Mo.createElement(Dt,{stepData:e,appearance:t}),Mo.createElement($t,{stepData:e,appearance:t}));import Lp from"react";function rn(e){return Lp.createElement(lt,{appearance:e.appearance,videoUri:e.videoUri})}var gr="default",$p=Dp.img`
742
742
  border-radius: 4px;
743
743
  max-height: 260px;
744
744
  min-height: 200px;
745
- `,sn=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return so.createElement("div",null,o)}return so.createElement(Qi,{className:l("checklistStepContent",t)},e.imageUri?so.createElement($p,{className:l("checklistStepImage",t),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?so.createElement(nn,{videoUri:e.videoUri,appearance:t}):null,so.createElement(Ut,{stepData:e,appearance:t}))};import Ee,{useRef as Mp,useState as Up}from"react";import zt from"styled-components";var ln=zt.div`
745
+ `,nn=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return so.createElement("div",null,o)}return so.createElement(Ji,{className:l("checklistStepContent",t)},e.imageUri?so.createElement($p,{className:l("checklistStepImage",t),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?so.createElement(rn,{videoUri:e.videoUri,appearance:t}):null,so.createElement(Mt,{stepData:e,appearance:t}))};import Ee,{useRef as Mp,useState as Up}from"react";import Ut from"styled-components";var sn=Ut.div`
746
746
  display: block;
747
- `,zp=zt.div`
747
+ `,zp=Ut.div`
748
748
  display: flex;
749
749
  flex-direction: row;
750
750
  flex-wrap: wrap;
@@ -754,20 +754,20 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
754
754
  align-content: center;
755
755
  margin-top: 24px;
756
756
  margin-bottom: 24px;
757
- `,_p=zt.div`
757
+ `,_p=Ut.div`
758
758
  display: flex;
759
759
  align-items: center;
760
760
  justify-content: flex-start;
761
761
  flex-direction: column;
762
762
  margin-right: 16px;
763
- `,Wp=zt.video`
763
+ `,Wp=Ut.video`
764
764
  width: 200px;
765
765
  height: 120px;
766
- `,Hp=zt.div`
766
+ `,Hp=Ut.div`
767
767
  font-size: 14px;
768
768
  line-height: 20px;
769
769
  text-align: center;
770
- `,Vp=zt.div`
770
+ `,Vp=Ut.div`
771
771
  position: absolute;
772
772
  width: 200px;
773
773
  height: 120px;
@@ -787,9 +787,9 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
787
787
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
788
788
  border-radius: 50%;
789
789
  }
790
- `,an="videoCarousel",pn=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.videos))return Ee.createElement(ln,null,Ee.createElement(Ut,{stepData:e,appearance:t}));function o({video:n}){let s=Mp(),[p,c]=Up(!1);return Ee.createElement(_p,null,!p&&Ee.createElement(Vp,{onClick:()=>{c(!0),s.current.play()},appearance:t},Ee.createElement(Fo,null)),Ee.createElement(Wp,{controls:p,ref:s,play:p,src:n.uri}),Ee.createElement(Hp,null,n.title))}let r=e.props;return r.videos?Ee.createElement(ln,null,Ee.createElement($t,{stepData:e,appearance:t}),Ee.createElement(zp,null,r.videos.map((n,s)=>Ee.createElement("span",{key:`${n.uri}-${s}`},Ee.createElement(o,{video:n})))),Ee.createElement(Mt,{stepData:e,appearance:t})):null};import Qe from"react";import Mo from"styled-components";var dn=Mo.div`
790
+ `,ln="videoCarousel",an=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.videos))return Ee.createElement(sn,null,Ee.createElement(Mt,{stepData:e,appearance:t}));function o({video:n}){let s=Mp(),[p,c]=Up(!1);return Ee.createElement(_p,null,!p&&Ee.createElement(Vp,{onClick:()=>{c(!0),s.current.play()},appearance:t},Ee.createElement(ko,null)),Ee.createElement(Wp,{controls:p,ref:s,play:p,src:n.uri}),Ee.createElement(Hp,null,n.title))}let r=e.props;return r.videos?Ee.createElement(sn,null,Ee.createElement(Dt,{stepData:e,appearance:t}),Ee.createElement(zp,null,r.videos.map((n,s)=>Ee.createElement("span",{key:`${n.uri}-${s}`},Ee.createElement(o,{video:n})))),Ee.createElement($t,{stepData:e,appearance:t})):null};import Qe from"react";import Uo from"styled-components";var pn=Uo.div`
791
791
  display: block;
792
- `,jp=Mo.pre`
792
+ `,jp=Uo.pre`
793
793
  display: block;
794
794
  background-color: #2a2a2a;
795
795
  color: #f8f8f8;
@@ -805,69 +805,69 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
805
805
  white-space: -o-pre-wrap; /* Opera 7 */
806
806
  word-wrap: break-word; /* Internet Explorer 5.5+ */
807
807
  margin-bottom: 24px;
808
- `,Gp=Mo.div`
808
+ `,Gp=Uo.div`
809
809
  font-size: 15px;
810
810
  line-height: 20px;
811
811
  margin-bottom: 12px;
812
812
  margin-top: 12px;
813
- `,Kp=Mo.div`
813
+ `,Kp=Uo.div`
814
814
  margin-top: 24px;
815
- `,cn="codeSnippet",mn=({stepData:e,appearance:t})=>{var r;if(!((r=e.props)!=null&&r.codeSnippets))return Qe.createElement(dn,null,Qe.createElement(Ut,{stepData:e,appearance:t}));let o=e.props;return o.codeSnippets?Qe.createElement(dn,null,Qe.createElement($t,{stepData:e,appearance:t}),Qe.createElement(Kp,null,o.codeSnippets.map((i,n)=>Qe.createElement("div",{key:n},i.title?Qe.createElement(Gp,null,i.title):null,i.code?Qe.createElement(jp,null,i.code):null))),Qe.createElement(Mt,{stepData:e,appearance:t})):null};var Yp=Ft.div`
815
+ `,dn="codeSnippet",cn=({stepData:e,appearance:t})=>{var r;if(!((r=e.props)!=null&&r.codeSnippets))return Qe.createElement(pn,null,Qe.createElement(Mt,{stepData:e,appearance:t}));let o=e.props;return o.codeSnippets?Qe.createElement(pn,null,Qe.createElement(Dt,{stepData:e,appearance:t}),Qe.createElement(Kp,null,o.codeSnippets.map((i,n)=>Qe.createElement("div",{key:n},i.title?Qe.createElement(Gp,null,i.title):null,i.code?Qe.createElement(jp,null,i.code):null))),Qe.createElement($t,{stepData:e,appearance:t})):null};var Yp=Tt.div`
816
816
  display: flex;
817
817
  flex-direction: row;
818
818
  min-width: ${e=>e.type!="modal"?"1000px":"100%"};
819
819
  background: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
820
820
  box-shadow: ${e=>e.type!="modal"?"0px 6px 25px rgba(0, 0, 0, 0.06)":"none"};
821
821
  border-radius: 8px;
822
- `,Xp=Ft.h1`
822
+ `,Xp=Tt.h1`
823
823
  font-size: 24px;
824
824
  font-weight: 600;
825
825
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
826
- `,Jp=Ft.h2`
826
+ `,Jp=Tt.h2`
827
827
  font-size: 15px;
828
828
  line-height: 28px;
829
829
  color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary)??"#4d4d4d"}};
830
830
  margin: 10px 0px 0px 0px;
831
- `,un=Ft.div`
831
+ `,mn=Tt.div`
832
832
  padding-bottom: 16px;
833
- `,Qp=Ft.div`
833
+ `,Qp=Tt.div`
834
834
  list-style: none;
835
835
  padding: 0;
836
836
  margin: 0;
837
837
  cursor: pointer;
838
838
  width: 300px;
839
- `,Zp=Ft.div`
839
+ `,Zp=Tt.div`
840
840
  width: 1px;
841
841
  margin: 40px;
842
842
  background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
843
- `,Rp=Ft.div`
843
+ `,Rp=Tt.div`
844
844
  flex: 2;
845
845
  padding: 2rem;
846
- `,ed=({title:e,subtitle:t,steps:o=[],style:r={},selectedStep:i,setSelectedStep:n,className:s="",customStepTypes:p=new Map,appearance:c,type:a})=>{let{mergeAppearanceWithDefault:x}=R();c=x(c);let h={...{[hr]:sn,[an]:pn,[cn]:mn},...p},[y,w]=qp(0),v=i??y,f=n??w,E=o.filter(S=>S.complete===!0).length,b=()=>{var S;return!((S=o[v])!=null&&S.type)||!h[o[v].type]?h[hr]({stepData:o[v],appearance:c}):h[o[v].type]({stepData:o[v],appearance:c})};return ze.createElement(Yp,{type:a,style:r,className:s,appearance:c},ze.createElement(un,{style:{flex:1}},ze.createElement(un,{style:{padding:"30px 0px 30px 30px",borderBottom:"none"}},ze.createElement(Xp,{className:l("checklistTitle",c),appearance:c},e),ze.createElement(Jp,{className:l("checklistSubtitle",c),appearance:c},t),ze.createElement(Le,{total:o.length,count:E,style:{marginTop:"24px"},appearance:c})),ze.createElement(Qp,{className:l("checklistStepsContainer",c)},o.map((S,A)=>ze.createElement(tn,{data:S,index:A,key:A,listLength:o.length,isSelected:A===v,primaryColor:c.theme.colorPrimary,style:{justifyContent:"space-between"},onClick:()=>{f(A)}})))),ze.createElement(Zp,{appearance:c,className:l("checklistDivider",c)}),ze.createElement(Rp,null,ze.createElement(b,null)))},Cr=ed;import M,{useState as nd}from"react";import fn from"react";import td from"styled-components";var od=td.svg`
846
+ `,ed=({title:e,subtitle:t,steps:o=[],style:r={},selectedStep:i,setSelectedStep:n,className:s="",customStepTypes:p=new Map,appearance:c,type:a})=>{let{mergeAppearanceWithDefault:g}=R();c=g(c);let x={...{[gr]:nn,[ln]:an,[dn]:cn},...p},[y,w]=qp(0),P=i??y,f=n??w,E=o.filter(S=>S.complete===!0).length,b=()=>{var S;return!((S=o[P])!=null&&S.type)||!x[o[P].type]?x[gr]({stepData:o[P],appearance:c}):x[o[P].type]({stepData:o[P],appearance:c})};return ze.createElement(Yp,{type:a,style:r,className:s,appearance:c},ze.createElement(mn,{style:{flex:1}},ze.createElement(mn,{style:{padding:"30px 0px 30px 30px",borderBottom:"none"}},ze.createElement(Xp,{className:l("checklistTitle",c),appearance:c},e),ze.createElement(Jp,{className:l("checklistSubtitle",c),appearance:c},t),ze.createElement(Le,{total:o.length,count:E,style:{marginTop:"24px"},appearance:c})),ze.createElement(Qp,{className:l("checklistStepsContainer",c)},o.map((S,A)=>ze.createElement(en,{data:S,index:A,key:A,listLength:o.length,isSelected:A===P,primaryColor:c.theme.colorPrimary,style:{justifyContent:"space-between"},onClick:()=>{f(A)}})))),ze.createElement(Zp,{appearance:c,className:l("checklistDivider",c)}),ze.createElement(Rp,null,ze.createElement(b,null)))},xr=ed;import $,{useState as nd}from"react";import un from"react";import td from"styled-components";var od=td.svg`
847
847
  transition: 'transform 0.35s ease-in-out';
848
- `,_t=({color:e="#323232",style:t,className:o})=>fn.createElement(od,{width:"7",height:"10",viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,className:o},fn.createElement("path",{d:"M1 13L7.5 7L0.999999 1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));import ue from"styled-components";var Sr={boxShadow:"0px 6px 25px rgba(0, 0, 0, 0.06)",padding:"32px",maxHeight:"700px",msOverflowStyle:"none",scrollbarWidth:"none",paddingBottom:"12px",minHeight:"610px"},gn=ue.div`
848
+ `,zt=({color:e="#323232",style:t,className:o})=>un.createElement(od,{width:"7",height:"10",viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,className:o},un.createElement("path",{d:"M1 13L7.5 7L0.999999 1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));import ue from"styled-components";var hr={boxShadow:"0px 6px 25px rgba(0, 0, 0, 0.06)",padding:"32px",maxHeight:"700px",msOverflowStyle:"none",scrollbarWidth:"none",paddingBottom:"12px",minHeight:"610px"},fn=ue.div`
849
849
  max-height: 350px;
850
850
  padding-bottom: 40px;
851
- `,xn=ue.div`
851
+ `,gn=ue.div`
852
852
  display: flex;
853
853
  flex-direction: column;
854
854
  margin-top: 20px;
855
- `,hn=ue.h1`
855
+ `,xn=ue.h1`
856
856
  font-style: normal;
857
857
  font-weight: 600;
858
858
  font-size: 30px;
859
859
  line-height: 36px;
860
860
  margin-bottom: 16px;
861
861
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
862
- `,Cn=ue.h2`
862
+ `,hn=ue.h2`
863
863
  font-weight: 400;
864
864
  font-size: 16px;
865
865
  line-height: 20px;
866
866
  margin-bottom: 16px;
867
867
  padding-left: 1px;
868
868
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
869
- `,Sn=ue.div`
870
- ${e=>P(e)} {
869
+ `,Cn=ue.div`
870
+ ${e=>k(e)} {
871
871
  border: 1px solid #fafafa;
872
872
  }
873
873
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
@@ -876,12 +876,12 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
876
876
  flex-direction: column;
877
877
  min-height: 240px;
878
878
  overflow: hidden;
879
- `,yn=ue.div`
879
+ `,Sn=ue.div`
880
880
  display: flex;
881
881
  flex-direction: row;
882
882
  justify-content: space-between;
883
- `,bn=ue.p`
884
- ${e=>P(e)} {
883
+ `,yn=ue.p`
884
+ ${e=>k(e)} {
885
885
  font-weight: 400;
886
886
  font-size: 10px;
887
887
  line-height: 12px;
@@ -889,13 +889,13 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
889
889
  color: #8c8c8c;
890
890
  margin: 20px;
891
891
  }
892
- `,wn=ue.div`
892
+ `,bn=ue.div`
893
893
  display: flex;
894
894
  flex-direction: row;
895
- `,Tn=ue.div`
895
+ `,wn=ue.div`
896
896
  flex: 1;
897
- `,Fn=ue.div`
898
- ${e=>P(e)} {
897
+ `,Tn=ue.div`
898
+ ${e=>k(e)} {
899
899
  display: flex;
900
900
  justify-content: center;
901
901
  align-content: center;
@@ -904,8 +904,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
904
904
  padding-left: 8px;
905
905
  padding-right: 8px;
906
906
  }
907
- `,kn=ue.p`
908
- ${e=>P(e)} {
907
+ `,Fn=ue.p`
908
+ ${e=>k(e)} {
909
909
  font-style: normal;
910
910
  font-weight: 600;
911
911
  font-size: 22px;
@@ -916,8 +916,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
916
916
  margin-top: 20px;
917
917
  margin-bottom: 16px;
918
918
  }
919
- `,Pn=ue.p`
920
- ${e=>P(e)} {
919
+ `,kn=ue.p`
920
+ ${e=>k(e)} {
921
921
  font-weight: 400;
922
922
  font-size: 14px;
923
923
  line-height: 18px;
@@ -925,15 +925,15 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
925
925
  color: ${e=>e.appearance.theme.colorTextSecondary};
926
926
  margin-bottom: 8px;
927
927
  }
928
- `,vn=ue.div`
929
- ${e=>P(e)} {
928
+ `,Pn=ue.div`
929
+ ${e=>k(e)} {
930
930
  display: flex;
931
931
  flex-direction: row;
932
932
  justify-content: center;
933
933
  gap: 8px;
934
934
  }
935
- `,Bn=ue.div`
936
- ${e=>P(e)} {
935
+ `,vn=ue.div`
936
+ ${e=>k(e)} {
937
937
  // Anything inside this block will be ignored if the user provides a custom class
938
938
  background-color: ${e=>e.selected?"#FAFAFA":"#FFFFFF"};
939
939
  :hover {
@@ -952,8 +952,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
952
952
  justify-content: space-between;
953
953
  position: relative;
954
954
  cursor: pointer;
955
- `,En=ue.p`
956
- ${e=>P(e)} {
955
+ `,Bn=ue.p`
956
+ ${e=>k(e)} {
957
957
  // Anything inside this block will be ignored if the user provides a custom class
958
958
  color: ${e=>e.selected?"#434343":"#BFBFBF"};
959
959
  }
@@ -961,12 +961,12 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
961
961
  font-size: 14px;
962
962
  line-height: 22px;
963
963
  margin: 0;
964
- `,An=ue.div`
964
+ `,En=ue.div`
965
965
  display: flex;
966
966
  flex-direction: row;
967
967
  justify-content: flex-end;
968
968
  align-content: center;
969
- `,In=ue.div`
969
+ `,An=ue.div`
970
970
  display: flex;
971
971
  flex: 1;
972
972
  flex-direction: row;
@@ -974,14 +974,14 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
974
974
  align-content: center;
975
975
  align-items: center;
976
976
  margin-right: 20px;
977
- `,Nn=ue.div`
977
+ `,In=ue.div`
978
978
  display: block;
979
979
  width: 100%;
980
- `;import rd from"styled-components";var On=rd.div`
980
+ `;import rd from"styled-components";var Nn=rd.div`
981
981
  flex-direction: column;
982
982
  justify-content: center;
983
983
  display: flex;
984
- `;import Re from"react";import Ze from"styled-components";var Ln=Ze.div`
984
+ `;import Re from"react";import Ze from"styled-components";var On=Ze.div`
985
985
  border: 1px solid #fafafa;
986
986
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
987
987
  border-radius: 14px;
@@ -989,14 +989,14 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
989
989
  display: flex;
990
990
  flex-direction: column;
991
991
  overflow: hidden;
992
- `,Dn=Ze.div`
992
+ `,Ln=Ze.div`
993
993
  display: flex;
994
994
  flex-wrap: wrap;
995
995
  justify-content: space-between;
996
996
  overflow: hidden;
997
997
  row-gap: 10px;
998
- `,$n=Ze.div`
999
- ${e=>P(e)} {
998
+ `,Dn=Ze.div`
999
+ ${e=>k(e)} {
1000
1000
  color: #595959;
1001
1001
  }
1002
1002
  text-transform: uppercase;
@@ -1005,8 +1005,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1005
1005
  line-height: 12px;
1006
1006
  letter-spacing: 0.09em;
1007
1007
  margin-bottom: 12px;
1008
- `,Mn=Ze.div`
1009
- ${e=>P(e)} {
1008
+ `,$n=Ze.div`
1009
+ ${e=>k(e)} {
1010
1010
  // Anything inside this block will be ignored if the user provides a custom class
1011
1011
  background: #ffffff;
1012
1012
  border: 1px solid #fafafa;
@@ -1018,8 +1018,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1018
1018
 
1019
1019
  max-width: 150px;
1020
1020
  min-width: 200px;
1021
- `,Un=Ze.div`
1022
- ${e=>P(e)} {
1021
+ `,Mn=Ze.div`
1022
+ ${e=>k(e)} {
1023
1023
  background: radial-gradient(50% 50% at 50% 50%, #ffffff 0%, #f7f7f7 100%);
1024
1024
  }
1025
1025
  width: 40px;
@@ -1030,14 +1030,14 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1030
1030
  justify-content: center;
1031
1031
  align-content: center;
1032
1032
  align-items: center;
1033
- `,zn=Ze.div`
1033
+ `,Un=Ze.div`
1034
1034
  font-weight: 600;
1035
1035
  font-size: 20px;
1036
1036
  line-height: 24px;
1037
1037
  width: 20px;
1038
1038
  height: 20px;
1039
- `,_n=Ze.div`
1040
- ${e=>P(e)} {
1039
+ `,zn=Ze.div`
1040
+ ${e=>k(e)} {
1041
1041
  color: #434343;
1042
1042
  }
1043
1043
  font-weight: 600;
@@ -1045,20 +1045,20 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1045
1045
  line-height: 17px;
1046
1046
  margin-top: 12px;
1047
1047
  margin-bottom: 8px;
1048
- `,Wn=Ze.div`
1049
- ${e=>P(e)} {
1048
+ `,_n=Ze.div`
1049
+ ${e=>k(e)} {
1050
1050
  color: #8c8c8c;
1051
1051
  }
1052
1052
  font-weight: 400;
1053
1053
  font-size: 12px;
1054
1054
  line-height: 14px;
1055
- `,Hn=Ze.a`
1055
+ `,Wn=Ze.a`
1056
1056
  color: ${e=>e.color};
1057
1057
  font-size: 12px;
1058
1058
  line-height: 14px;
1059
1059
  font-weight: 400;
1060
1060
  cursor: pointer;
1061
- `;var id=({steps:e,style:t,title:o,primaryColor:r,appearance:i,onButtonClick:n})=>{let{primaryCTAClickSideEffects:s}=le();return Re.createElement(Ln,{style:t,className:l("guideContainer",i)},Re.createElement($n,{className:l("guideTitle",i)},o),Re.createElement(Dn,{className:l("guideItemContainer",i)},e.map((p,c)=>Re.createElement(Mn,{key:`guide-${p.id??c}`,className:l("guideItem",i)},p.icon&&Re.createElement(Un,{className:l("guideIcon",i)},Re.createElement(zn,null,p.icon)),Re.createElement(_n,{className:l("guideItemTitle",i),dangerouslySetInnerHTML:me(p.title)}),Re.createElement(Wn,{className:l("guideItemSubtitle",i),dangerouslySetInnerHTML:me(p.subtitle)}),Re.createElement(Hn,{className:l("guideItemLink",i),color:r,onClick:()=>{p.primaryButtonUri&&s(p),n&&n(p)}},p.primaryButtonTitle)))))},lo=id;var sd=({steps:e,title:t,subtitle:o,stepsTitle:r,visible:i,onClose:n,selectedStep:s,setSelectedStep:p,customStepTypes:c,appearance:a,guideData:x,guideTitle:d,onGuideButtonClick:h})=>{let y=({stepData:m,handleSecondaryCTAClick:B,handleCTAClick:k})=>m?M.createElement(Fn,{className:l("checklistStepContainer",a),"data-testid":"checklistStepContainer"},M.createElement(kn,{appearance:a,className:l("checklistStepTitle",a),dangerouslySetInnerHTML:me(m.title)}),M.createElement(Pn,{appearance:a,className:l("checklistStepSubtitle",a),dangerouslySetInnerHTML:me(m.subtitle)}),M.createElement(vn,{className:l("checklistCTAContainer",a)},m.secondaryButtonTitle&&M.createElement(re,{title:m.secondaryButtonTitle,onClick:B,appearance:a,secondary:!0}),M.createElement(re,{title:m.primaryButtonTitle,onClick:k,appearance:a}))):M.createElement(M.Fragment,null),v={...{default:m=>{var N;if((N=e[b])!=null&&N.StepContent){let I=e[b].StepContent;return M.createElement("div",null,I)}let B=e[b];return M.createElement(y,{stepData:m,handleCTAClick:()=>{B.handlePrimaryButtonClick&&B.handlePrimaryButtonClick()},handleSecondaryCTAClick:()=>{B.handleSecondaryButtonClick&&B.handleSecondaryButtonClick()}})}},...c},[f,E]=nd(0),b=s??f,S=p??E,A=()=>{var m;return e?!((m=e[b])!=null&&m.type)||!v[e[b].type]?v.default(e[b]):v[e[b].type]({stepData:e[b],primaryColor:a.theme.colorPrimary}):M.createElement(M.Fragment,null)},C=e.filter(m=>m.complete).length;return i?(a.theme.modalContainer||(a.theme.borderRadius&&(Sr.borderRadius=a.theme.borderRadius+"px"),a.theme.modalContainer=Sr),M.createElement(rt,{onClose:n,visible:i,appearance:a},M.createElement(Nn,null,M.createElement(xn,null,M.createElement(hn,{appearance:a,className:l("checklistTitle",a)},t),M.createElement(Cn,{appearance:a,className:l("checklistSubtitle",a)},o)),M.createElement(gn,null,e&&e.length>0&&M.createElement(Sn,{className:l("stepsContainer",a)},M.createElement(yn,null,M.createElement("div",{style:{flex:3}},M.createElement(bn,{className:l("stepsTitle",a)},r)),M.createElement(In,null,M.createElement(Le,{style:{width:"100%"},count:C,total:e.length,appearance:a}))),M.createElement(wn,null,M.createElement(Tn,{className:l("checklistStepListContainer",a),appearance:a},e.map((m,B)=>{let k=b===B;return M.createElement(Bn,{selected:k,className:l(`checklistStepListItem${k?"Selected":""}`,a),key:`checklist-guide-step-${m.id??B}`,disabled:m.blocked,onClick:()=>{m.blocked||S(B)},title:m.blocked?"Finish remaining steps to continue":void 0},k&&M.createElement(Oo,{className:l("checklistStepItemSelectedIndicator",a),layoutId:"checklist-step-selected",style:{backgroundColor:a.theme.colorPrimary,borderRadius:0,height:"100%",top:"0%",width:"2px"}}),M.createElement(En,{selected:k,className:l(`checklistStepListStepName${k?"Selected":""}`,a)},m.stepName),M.createElement(An,null,M.createElement(Ye,{value:m.complete,type:"round",primaryColor:a.theme.colorPrimary,progress:m.progress,appearance:a}),M.createElement(On,null,M.createElement(_t,{style:{marginLeft:"10px"},color:a.theme.colorBackgroundSecondary}))))})),M.createElement(A,null))),x&&x.length>0&&M.createElement(lo,{steps:x,title:d,primaryColor:a.theme.colorPrimary,style:{border:"none",boxShadow:"none"},appearance:a,onButtonClick:m=>(h&&h(m),!0)}))))):M.createElement(M.Fragment,null)},yr=sd;import{useEffect as ld,useState as ad}from"react";var Uo=()=>{let e={isSmall:"(max-width: 480px)",isMedium:"(min-width: 481px) AND (max-width: 1023px)",isLarge:"(min-width: 1025px)"},t=Object.fromEntries(Object.entries(e).map(([p])=>[p,!1])),[o,r]=ad(t),i=null,n=()=>{i!==null?clearTimeout(i):s(),i=setTimeout(()=>{s()},16)},s=()=>{let p=Object.fromEntries(Object.entries(e).map(([c,a])=>{if(!window)return[c,!1];let x=window.matchMedia(a);return x.addEventListener("change",n),[c,x.matches]}));r(p)};return ld(()=>{s()},[]),o};import Fe,{useEffect as rs,useState as pd}from"react";import xe from"react";import et from"styled-components";var Vn=et.div`
1061
+ `;var id=({steps:e,style:t,title:o,primaryColor:r,appearance:i,onButtonClick:n})=>{let{primaryCTAClickSideEffects:s}=ae();return Re.createElement(On,{style:t,className:l("guideContainer",i)},Re.createElement(Dn,{className:l("guideTitle",i)},o),Re.createElement(Ln,{className:l("guideItemContainer",i)},e.map((p,c)=>Re.createElement($n,{key:`guide-${p.id??c}`,className:l("guideItem",i)},p.icon&&Re.createElement(Mn,{className:l("guideIcon",i)},Re.createElement(Un,null,p.icon)),Re.createElement(zn,{className:l("guideItemTitle",i),dangerouslySetInnerHTML:me(p.title)}),Re.createElement(_n,{className:l("guideItemSubtitle",i),dangerouslySetInnerHTML:me(p.subtitle)}),Re.createElement(Wn,{className:l("guideItemLink",i),color:r,onClick:()=>{p.primaryButtonUri&&s(p),n&&n(p)}},p.primaryButtonTitle)))))},lo=id;var sd=({steps:e,title:t,subtitle:o,stepsTitle:r,visible:i,onClose:n,selectedStep:s,setSelectedStep:p,customStepTypes:c,appearance:a,guideData:g,guideTitle:d,onGuideButtonClick:x})=>{let y=({stepData:m,handleSecondaryCTAClick:B,handleCTAClick:F})=>m?$.createElement(Tn,{className:l("checklistStepContainer",a),"data-testid":"checklistStepContainer"},$.createElement(Fn,{appearance:a,className:l("checklistStepTitle",a),dangerouslySetInnerHTML:me(m.title)}),$.createElement(kn,{appearance:a,className:l("checklistStepSubtitle",a),dangerouslySetInnerHTML:me(m.subtitle)}),$.createElement(Pn,{className:l("checklistCTAContainer",a)},m.secondaryButtonTitle&&$.createElement(oe,{title:m.secondaryButtonTitle,onClick:B,appearance:a,secondary:!0}),$.createElement(oe,{title:m.primaryButtonTitle,onClick:F,appearance:a}))):$.createElement($.Fragment,null),P={...{default:m=>{var O;if((O=e[b])!=null&&O.StepContent){let I=e[b].StepContent;return $.createElement("div",null,I)}let B=e[b];return $.createElement(y,{stepData:m,handleCTAClick:()=>{B.handlePrimaryButtonClick&&B.handlePrimaryButtonClick()},handleSecondaryCTAClick:()=>{B.handleSecondaryButtonClick&&B.handleSecondaryButtonClick()}})}},...c},[f,E]=nd(0),b=s??f,S=p??E,A=()=>{var m;return e?!((m=e[b])!=null&&m.type)||!P[e[b].type]?P.default(e[b]):P[e[b].type]({stepData:e[b],primaryColor:a.theme.colorPrimary}):$.createElement($.Fragment,null)},C=e.filter(m=>m.complete).length;return i?(a.theme.modalContainer||(a.theme.borderRadius&&(hr.borderRadius=a.theme.borderRadius+"px"),a.theme.modalContainer=hr),$.createElement(rt,{onClose:n,visible:i,appearance:a},$.createElement(In,null,$.createElement(gn,null,$.createElement(xn,{appearance:a,className:l("checklistTitle",a)},t),$.createElement(hn,{appearance:a,className:l("checklistSubtitle",a)},o)),$.createElement(fn,null,e&&e.length>0&&$.createElement(Cn,{className:l("stepsContainer",a)},$.createElement(Sn,null,$.createElement("div",{style:{flex:3}},$.createElement(yn,{className:l("stepsTitle",a)},r)),$.createElement(An,null,$.createElement(Le,{style:{width:"100%"},count:C,total:e.length,appearance:a}))),$.createElement(bn,null,$.createElement(wn,{className:l("checklistStepListContainer",a),appearance:a},e.map((m,B)=>{let F=b===B;return $.createElement(vn,{selected:F,className:l(`checklistStepListItem${F?"Selected":""}`,a),key:`checklist-guide-step-${m.id??B}`,disabled:m.blocked,onClick:()=>{m.blocked||S(B)},title:m.blocked?"Finish remaining steps to continue":void 0},F&&$.createElement(Lo,{className:l("checklistStepItemSelectedIndicator",a),layoutId:"checklist-step-selected",style:{backgroundColor:a.theme.colorPrimary,borderRadius:0,height:"100%",top:"0%",width:"2px"}}),$.createElement(Bn,{selected:F,className:l(`checklistStepListStepName${F?"Selected":""}`,a)},m.stepName),$.createElement(En,null,$.createElement(Ye,{value:m.complete,type:"round",primaryColor:a.theme.colorPrimary,progress:m.progress,appearance:a}),$.createElement(Nn,null,$.createElement(zt,{style:{marginLeft:"10px"},color:a.theme.colorBackgroundSecondary}))))})),$.createElement(A,null))),g&&g.length>0&&$.createElement(lo,{steps:g,title:d,primaryColor:a.theme.colorPrimary,style:{border:"none",boxShadow:"none"},appearance:a,onButtonClick:m=>(x&&x(m),!0)}))))):$.createElement($.Fragment,null)},Cr=sd;import Fe,{useEffect as os,useState as ld}from"react";import xe from"react";import et from"styled-components";var Hn=et.div`
1062
1062
  background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
1063
1063
  border: 1px solid;
1064
1064
  border-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
@@ -1070,41 +1070,41 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1070
1070
  display: flex;
1071
1071
  flex-direction: column;
1072
1072
  transition: max-height 0.25s;
1073
- `,jn=et.div`
1073
+ `,Vn=et.div`
1074
1074
  display: flex;
1075
1075
  margin-bottom: 20px;
1076
- `,Gn=et.img`
1076
+ `,jn=et.img`
1077
1077
  border-radius: 4px;
1078
1078
  max-height: 260px;
1079
1079
  min-height: 200px;
1080
- `,Kn=et.div`
1080
+ `,Gn=et.div`
1081
1081
  display: flex;
1082
1082
  flex-direction: row;
1083
1083
  justify-content: space-between;
1084
1084
  align-items: center;
1085
- `,qn=et.p`
1085
+ `,Kn=et.p`
1086
1086
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
1087
1087
  font-style: normal;
1088
1088
  font-weight: 500;
1089
1089
  font-size: 16px;
1090
1090
  line-height: 18px;
1091
1091
  margin-left: 8px;
1092
- `,Yn=et.div`
1092
+ `,qn=et.div`
1093
1093
  cursor: pointer;
1094
1094
  :hover {
1095
1095
  opacity: 0.8;
1096
1096
  }
1097
- `,zC=et.div``,Xn=et.p`
1097
+ `,MC=et.div``,Yn=et.p`
1098
1098
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
1099
1099
  font-weight: 400;
1100
1100
  font-size: 14px;
1101
1101
  line-height: 22px;
1102
- `,Jn=et.div`
1102
+ `,Xn=et.div`
1103
1103
  display: flex;
1104
1104
  flex-direction: row;
1105
1105
  justify-content: flex-start;
1106
1106
  align-items: center;
1107
- `;var Qn=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:r,onSecondaryButtonClick:i,appearance:n,customStepTypes:s})=>{var d,h;let p=t?{}:{transform:"rotate(90deg)"},c=t?{overflow:"hidden",maxHeight:"0px",transition:"max-height 0.2s ease-out"}:{overflow:"hidden",maxHeight:"1000px",transition:"max-height 0.15s ease-in"};function a(){return xe.createElement(xe.Fragment,null,e.imageUri||e.videoUri?xe.createElement(jn,{className:l("stepMediaContainer",n)},e.imageUri?xe.createElement(Gn,{className:l("stepImage",n),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?xe.createElement(lt,{appearance:n,videoUri:e.videoUri}):null):null,xe.createElement(Xn,{className:l("stepSubtitle",n),appearance:n,dangerouslySetInnerHTML:me(e.subtitle)}),xe.createElement(To,{className:l("checklistCTAContainer",n)},e.secondaryButtonTitle?xe.createElement(re,{secondary:!0,title:e.secondaryButtonTitle,onClick:()=>i(),appearance:n}):null,xe.createElement(re,{title:e.primaryButtonTitle??"Continue",onClick:()=>r(),appearance:n})))}function x(){if(!s)return null;let y=s[e.type];return y?y(e,n):null}return xe.createElement(Vn,{"data-testid":`step-${e.id}`,className:l("checklistStepContainer",n),appearance:n},xe.createElement(Kn,{className:l("stepHeader",n)},xe.createElement(Jn,null,xe.createElement(No,{value:e.complete,style:{width:"auto",borderTop:0},primaryColor:(d=n==null?void 0:n.theme)==null?void 0:d.colorPrimary,appearance:n}),xe.createElement(qn,{appearance:n,className:l("stepTitle",n),dangerouslySetInnerHTML:me(e.title),onClick:()=>o()})),xe.createElement(Yn,{className:l("stepChevronContainer",n),onClick:()=>o()},xe.createElement(_t,{style:{...p,transition:"transform 0.1s ease-in-out"},color:(h=n==null?void 0:n.theme)==null?void 0:h.colorTextSecondary}))),xe.createElement("div",{key:e.id,style:{...c}},x()??a()))};import Wt from"styled-components";var ZC=Wt.div`
1107
+ `;var Jn=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:r,onSecondaryButtonClick:i,appearance:n,customStepTypes:s})=>{var d,x;let p=t?{}:{transform:"rotate(90deg)"},c=t?{overflow:"hidden",maxHeight:"0px",transition:"max-height 0.2s ease-out"}:{overflow:"hidden",maxHeight:"1000px",transition:"max-height 0.15s ease-in"};function a(){return xe.createElement(xe.Fragment,null,e.imageUri||e.videoUri?xe.createElement(Vn,{className:l("stepMediaContainer",n)},e.imageUri?xe.createElement(jn,{className:l("stepImage",n),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?xe.createElement(lt,{appearance:n,videoUri:e.videoUri}):null):null,xe.createElement(Yn,{className:l("stepSubtitle",n),appearance:n,dangerouslySetInnerHTML:me(e.subtitle)}),xe.createElement(Fo,{className:l("checklistCTAContainer",n)},e.secondaryButtonTitle?xe.createElement(oe,{secondary:!0,title:e.secondaryButtonTitle,onClick:()=>i(),appearance:n}):null,xe.createElement(oe,{title:e.primaryButtonTitle??"Continue",onClick:()=>r(),appearance:n})))}function g(){if(!s)return null;let y=s[e.type];return y?y(e,n):null}return xe.createElement(Hn,{"data-testid":`step-${e.id}`,className:l("checklistStepContainer",n),appearance:n},xe.createElement(Gn,{className:l("stepHeader",n)},xe.createElement(Xn,null,xe.createElement(Oo,{value:e.complete,style:{width:"auto",borderTop:0},primaryColor:(d=n==null?void 0:n.theme)==null?void 0:d.colorPrimary,appearance:n}),xe.createElement(Kn,{appearance:n,className:l("stepTitle",n),dangerouslySetInnerHTML:me(e.title),onClick:()=>o()})),xe.createElement(qn,{className:l("stepChevronContainer",n),onClick:()=>o()},xe.createElement(zt,{style:{...p,transition:"transform 0.1s ease-in-out"},color:(x=n==null?void 0:n.theme)==null?void 0:x.colorTextSecondary}))),xe.createElement("div",{key:e.id,style:{...c}},g()??a()))};import _t from"styled-components";var JC=_t.div`
1108
1108
  background: #ffffff;
1109
1109
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
1110
1110
  border-radius: 6px;
@@ -1118,32 +1118,32 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1118
1118
 
1119
1119
  max-width: 800px;
1120
1120
  min-width: 350px;
1121
- `,Zn=Wt.div`
1121
+ `,Qn=_t.div`
1122
1122
  display: flex;
1123
1123
  flex-direction: column;
1124
- `,Rn=Wt.h1`
1124
+ `,Zn=_t.h1`
1125
1125
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
1126
1126
  font-style: normal;
1127
1127
  font-weight: 700;
1128
1128
  font-size: 20px;
1129
1129
  line-height: 24px;
1130
1130
  margin-bottom: 8px;
1131
- `,es=Wt.h2`
1131
+ `,Rn=_t.h2`
1132
1132
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
1133
1133
  font-weight: 400;
1134
1134
  font-size: 14px;
1135
1135
  line-height: 23px;
1136
1136
  margin: 2px 0 0 0;
1137
- `,ts=Wt.div`
1137
+ `,es=_t.div`
1138
1138
  display: block;
1139
1139
  width: 100%;
1140
- `,os=Wt.div`
1140
+ `,ts=_t.div`
1141
1141
  display: flex;
1142
1142
  width: 100%;
1143
1143
  flex-direction: column;
1144
1144
  justify-content: space-between;
1145
1145
  background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
1146
- `;var dd=({title:e,subtitle:t,steps:o,onClose:r,visible:i,autoExpandFirstIncompleteStep:n=!0,autoCollapse:s=!0,autoExpandNextStep:p=!0,selectedStep:c,setSelectedStep:a,appearance:x,type:d,className:h,customStepTypes:y,style:w})=>{let v=o.filter(C=>C.complete).length,[f,E]=pd(Array(o.length).fill(!0));rs(()=>{let C=[...f];if(n){for(let m=0;m<o.length;m++)if(!o[m].complete){C[m]=!1;break}E(C)}},[]),rs(()=>{b(c)},[c]);let b=C=>{let m=[...f];if(s)for(let B=0;B<f.length;++B)B!==C&&(m[B]=!0);m[C]=!m[C],E(m)};if(!i&&d=="modal")return Fe.createElement(Fe.Fragment,null);let S=Fe.createElement(Fe.Fragment,null,Fe.createElement(Zn,null,Fe.createElement(Rn,{appearance:x,className:l("checklistTitle",x),dangerouslySetInnerHTML:me(e)}),Fe.createElement(es,{appearance:x,className:l("checklistSubtitle",x),dangerouslySetInnerHTML:me(t)})),Fe.createElement(Le,{display:"percent",count:v,total:o.length,style:{margin:"14px 0px 8px 0px"},appearance:x})),A=Fe.createElement(ts,{className:be(l("checklistContainer",x),h)},o.map((C,m)=>{let B=f[m];return Fe.createElement(Qn,{appearance:x,stepData:C,collapsed:B,key:`modal-checklist-${C.id??m}`,onClick:()=>{if(c===m){b(m);return}a(m)},onPrimaryButtonClick:()=>{C.handlePrimaryButtonClick&&C.handlePrimaryButtonClick(),p&&!C.completionCriteria&&m<f.length-1&&f[m+1]&&a(m+1)},onSecondaryButtonClick:()=>{C.handleSecondaryButtonClick&&C.handleSecondaryButtonClick()},customStepTypes:y})}));return d==="inline"?Fe.createElement(os,{appearance:x,className:be(l("checklistInlineContainer",x),h),style:w},S,A):Fe.createElement(Fe.Fragment,null,Fe.createElement(rt,{onClose:r,visible:i,appearance:x,style:{maxWidth:"600px"},headerContent:S},A))},br=dd;import se,{useEffect as wr,useRef as xd,useState as kt}from"react";import Ht from"react";import ae,{css as is,keyframes as ns}from"styled-components";var ss=is`
1146
+ `;var ad=({title:e,subtitle:t,steps:o,onClose:r,visible:i,autoExpandFirstIncompleteStep:n=!0,autoCollapse:s=!0,autoExpandNextStep:p=!0,selectedStep:c,setSelectedStep:a,appearance:g,type:d,className:x,customStepTypes:y,style:w})=>{let P=o.filter(C=>C.complete).length,[f,E]=ld(Array(o.length).fill(!0));os(()=>{let C=[...f];if(n){for(let m=0;m<o.length;m++)if(!o[m].complete){C[m]=!1;break}E(C)}},[]),os(()=>{b(c)},[c]);let b=C=>{let m=[...f];if(s)for(let B=0;B<f.length;++B)B!==C&&(m[B]=!0);m[C]=!m[C],E(m)};if(!i&&d=="modal")return Fe.createElement(Fe.Fragment,null);let S=Fe.createElement(Fe.Fragment,null,Fe.createElement(Qn,null,Fe.createElement(Zn,{appearance:g,className:l("checklistTitle",g),dangerouslySetInnerHTML:me(e)}),Fe.createElement(Rn,{appearance:g,className:l("checklistSubtitle",g),dangerouslySetInnerHTML:me(t)})),Fe.createElement(Le,{display:"percent",count:P,total:o.length,style:{margin:"14px 0px 8px 0px"},appearance:g})),A=Fe.createElement(es,{className:be(l("checklistContainer",g),x)},o.map((C,m)=>{let B=f[m];return Fe.createElement(Jn,{appearance:g,stepData:C,collapsed:B,key:`modal-checklist-${C.id??m}`,onClick:()=>{if(c===m){b(m);return}a(m)},onPrimaryButtonClick:()=>{C.handlePrimaryButtonClick&&C.handlePrimaryButtonClick(),p&&!C.completionCriteria&&m<f.length-1&&f[m+1]&&a(m+1)},onSecondaryButtonClick:()=>{C.handleSecondaryButtonClick&&C.handleSecondaryButtonClick()},customStepTypes:y})}));return d==="inline"?Fe.createElement(ts,{appearance:g,className:be(l("checklistInlineContainer",g),x),style:w},S,A):Fe.createElement(Fe.Fragment,null,Fe.createElement(rt,{onClose:r,visible:i,appearance:g,style:{maxWidth:"600px"},headerContent:S},A))},Sr=ad;import se,{useEffect as yr,useRef as xd,useState as Ft}from"react";import{useEffect as pd,useState as dd}from"react";var rs=()=>{let e={isSmall:"(max-width: 480px)",isMedium:"(min-width: 481px) AND (max-width: 1023px)",isLarge:"(min-width: 1025px)"},t=Object.fromEntries(Object.entries(e).map(([p])=>[p,!1])),[o,r]=dd(t),i=null,n=()=>{i!==null?clearTimeout(i):s(),i=setTimeout(()=>{s()},16)},s=()=>{let p=Object.fromEntries(Object.entries(e).map(([c,a])=>{if(!window)return[c,!1];let g=window.matchMedia(a);return g.addEventListener("change",n),[c,g.matches]}));r(p)};return pd(()=>{s()},[]),o};import Wt from"react";import pe,{css as is,keyframes as ns}from"styled-components";var ss=is`
1147
1147
  border: 1px solid ${({theme:e})=>e.colorBorder};
1148
1148
  `,cd=is`
1149
1149
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.06);
@@ -1159,7 +1159,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1159
1159
  } to {
1160
1160
  opacity: 0;
1161
1161
  }
1162
- `,ls=ae.div`
1162
+ `,ls=pe.div`
1163
1163
  margin: 0 -20px;
1164
1164
  overflow-x: auto;
1165
1165
  padding-left: 20px;
@@ -1176,13 +1176,13 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1176
1176
  ::-webkit-scrollbar {
1177
1177
  display: none;
1178
1178
  }
1179
- `,as=ae.div`
1179
+ `,as=pe.div`
1180
1180
  display: flex;
1181
1181
  flex-flow: row nowrap;
1182
1182
  gap: 0 16px;
1183
1183
  scroll-snap-align: center;
1184
1184
  scroll-snap-stop: always;
1185
- `,ps=ae.div`
1185
+ `,ps=pe.div`
1186
1186
  animation: ${e=>e.reversed?ud:md} 0.25s ease-out;
1187
1187
  background: linear-gradient(
1188
1188
  to right,
@@ -1192,7 +1192,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1192
1192
  position: absolute;
1193
1193
  width: 64px;
1194
1194
  z-index: 10;
1195
- `,ds=ae.button`
1195
+ `,ds=pe.button`
1196
1196
  ${ss}
1197
1197
  box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.1);
1198
1198
  align-items: center;
@@ -1204,10 +1204,10 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1204
1204
  justify-content: center;
1205
1205
  position: absolute;
1206
1206
  width: 48px;
1207
- `,cs=ae.div`
1207
+ `,cs=pe.div`
1208
1208
  border-radius: ${({theme:e})=>e.borderRadius}px;
1209
1209
  padding: 20px;
1210
- `,ms=ae(cs)`
1210
+ `,ms=pe(cs)`
1211
1211
  ${ss}
1212
1212
  background: ${({theme:e})=>e.colorBackground};
1213
1213
  position: relative;
@@ -1220,72 +1220,72 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1220
1220
  ${e=>e.blocked?"":`border: 1px solid ${e.theme.colorPrimary};`}
1221
1221
  ${e=>e.blocked?"cursor: default":"cursor: pointer"}
1222
1222
  }
1223
- `,us=ae.img`
1223
+ `,us=pe.img`
1224
1224
  border-radius: 50%;
1225
1225
  height: 40px;
1226
1226
  margin-bottom: 12px;
1227
1227
  width: 40px;
1228
- `,fs=ae(cs)`
1229
- ${e=>P(e)} {
1228
+ `,fs=pe(cs)`
1229
+ ${e=>k(e)} {
1230
1230
  ${cd}
1231
1231
 
1232
1232
  background: ${({theme:e})=>e.colorBackground};
1233
1233
  }
1234
- `,u0=ae.div`
1234
+ `,u0=pe.div`
1235
1235
  color: ${({theme:e})=>e.colorPrimary};
1236
1236
  display: flex;
1237
1237
  flex-flow: row nowrap;
1238
1238
  align-items: center;
1239
- `,f0=ae.div`
1239
+ `,f0=pe.div`
1240
1240
  white-space: nowrap;
1241
- `,gs=ae.div`
1241
+ `,gs=pe.div`
1242
1242
  background: #d8fed8;
1243
1243
  border-radius: 6px;
1244
1244
  float: right;
1245
1245
  margin-bottom: 12px;
1246
1246
  padding: 4px 10px;
1247
- `,fd=ae.p`
1247
+ `,fd=pe.p`
1248
1248
  font-weight: bold;
1249
1249
  font-size: 18px;
1250
1250
  line-height: 22px;
1251
1251
  letter-spacing: calc(18px * -0.01);
1252
1252
  margin: 0;
1253
- `,xs=ae(fd)`
1253
+ `,xs=pe(fd)`
1254
1254
  margin-bottom: 4px;
1255
- `,hs=ae.div`
1255
+ `,hs=pe.div`
1256
1256
  display: flex;
1257
1257
  flex-flow: row nowrap;
1258
1258
  align-items: center;
1259
1259
  min-width: 50%;
1260
- `,gd=ae.p`
1260
+ `,gd=pe.p`
1261
1261
  font-weight: bold;
1262
1262
  font-size: 16px;
1263
1263
  line-height: 20px;
1264
1264
  letter-spacing: calc(16px * -0.01);
1265
1265
  margin: 0;
1266
- `,Cs=ae(gd)`
1266
+ `,Cs=pe(gd)`
1267
1267
  margin-bottom: 4px;
1268
1268
  ${e=>e.blocked||e.complete?"opacity: 0.4;":`
1269
1269
  `}
1270
- `,dt=ae.p`
1270
+ `,dt=pe.p`
1271
1271
  color: ${({theme:e})=>e.colorText};
1272
1272
  font-weight: normal;
1273
1273
  font-size: 14px;
1274
1274
  line-height: 22px;
1275
1275
  margin: 0;
1276
- `,Ss=ae.p`
1276
+ `,Ss=pe.p`
1277
1277
  color: ${({theme:e})=>e.colorText};
1278
1278
  font-weight: 600;
1279
1279
  font-size: 12px;
1280
1280
  line-height: 16px;
1281
1281
  margin: 0;
1282
- `;dt.Loud=ae(dt)`
1282
+ `;dt.Loud=pe(dt)`
1283
1283
  font-weight: 600;
1284
- `;dt.Quiet=ae(dt)`
1284
+ `;dt.Quiet=pe(dt)`
1285
1285
  color: ${({theme:e})=>e.colorTextSecondary};
1286
1286
  ${e=>e.blocked||e.complete?"opacity: 0.4;":`
1287
1287
  `}
1288
- `;var ys=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:r}=R(),{primaryCTAClickSideEffects:i}=le();o=r(o);let{imageUri:n=null,subtitle:s=null,title:p=null,complete:c=!1,blocked:a=!1}=e,x=e.primaryButtonTitle||e.secondaryButtonTitle,d=()=>{i(e)};return Ht.createElement(ms,{className:l("carouselCard",o),onClick:a?null:d,style:t,blocked:a,complete:c},n&&Ht.createElement(us,{className:l("carouselCardImage",o),src:n,alt:p,style:{opacity:c||a?.4:1}}),c&&Ht.createElement(gs,{className:l("carouselCompletedPill",o)},Ht.createElement(Ss,{style:{color:"#108E0B"}},"Complete")),p&&Ht.createElement(Cs,{blocked:a,complete:c,className:l("carouselCardTitle",o)},p),s&&Ht.createElement(dt.Quiet,{blocked:a,complete:c,className:l("carouselCardSubtitle",o)},s))};var hd=()=>se.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se.createElement("path",{d:"M14 6L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),se.createElement("path",{d:"M14 18L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),se.createElement("path",{d:"M4 12H20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})),bs=({side:e="left",show:t=!1,onClick:o=()=>{}})=>{let[r,i]=kt(!1),[n,s]=kt(!1);wr(()=>{t===!0&&r===!1?i(!0):t===!1&&r===!0&&s(!0)},[t]);let p=()=>{i(!1),s(!1)},c=e=="left"?{top:0,bottom:0,left:-20,transform:"rotate(180deg)"}:{top:0,bottom:0,right:-20};return r?se.createElement(ps,{style:c,reversed:n,onAnimationEnd:n?p:null},se.createElement(ds,{onClick:()=>o(),style:{right:16,top:"calc(50% - 24px)"}},se.createElement(hd,null))):null},ws=({flowId:e,appearance:t,customVariables:o,className:r})=>{let i=xd(null),[n,s]=kt(!1),[p,c]=kt(!1),[a,x]=kt(null),[d,h]=kt([]),[y,w]=kt(0),{isSmall:v}=Uo(),f=v?1:3,{getFlowMetadata:E,getFlowSteps:b,getNumberOfStepsCompleted:S,updateCustomVariables:A,isLoading:C}=Z();wr(()=>{A(o)},[o,C]),wr(()=>{if(C)return;let I=E(e),U=S(e),$=b(e);x(I),I.data!==null&&(h($.sort((L,ee)=>Number(L.complete)-Number(ee.complete))),c($.length>f),w(U))},[C]);let m=[];for(let I=0;I<d.length;I+=f)m.push(d.slice(I,I+f));let B=I=>{let U=I.target,$=U.scrollWidth-U.clientWidth,L=Math.ceil(U.scrollLeft);L>0&&n===!1&&s(!0),L===0&&n===!0&&s(!1),L<$&&p===!1&&c(!0),L===$&&p===!0&&c(!1)},k=(I=!0)=>{let U=I?1:-1;i.current!==null&&i.current.scrollBy({left:i.current.clientWidth*U,behavior:"smooth"})},T=null,N=I=>{T!==null?clearTimeout(T):B(I),T=setTimeout(()=>{B(I)},16)};return C?null:se.createElement(fs,{className:be(l("carouselContainer",t),r)},se.createElement("div",{style:{display:"flex",justifyContent:v?"center":"space-between",marginBottom:20,flexWrap:v?"wrap":"nowrap",gap:v?16:20}},se.createElement("div",null,se.createElement(xs,{className:l("carouselTitle",t)},a==null?void 0:a.title),se.createElement(dt.Quiet,{className:l("carouselSubtitle",t)},a==null?void 0:a.subtitle)),se.createElement(hs,{className:l("progressWrapper",t)},se.createElement(Le,{count:y,total:d.length,appearance:t}))),se.createElement("div",{style:{position:"relative"}},se.createElement(bs,{show:n,onClick:()=>k(!1)}),se.createElement(bs,{side:"right",show:p,onClick:k}),se.createElement(ls,{ref:i,onScroll:N},m.map((I,U)=>se.createElement(as,{key:U,style:{flex:`0 0 calc(100% - ${d.length>f?36:0}px)`}},I.map(($,L)=>se.createElement(ys,{key:L,stepData:$,style:{flex:d.length>f?`0 1 calc(100% / ${f} - 16px * 2 / ${f})`:1},appearance:t})))))),se.createElement(ie,{appearance:t}))};var Tr=({flowId:e,title:t,subtitle:o,style:r,initialSelectedStep:i,className:n,type:s="inline",onDismiss:p,visible:c,customVariables:a,onStepCompletion:x,onButtonClick:d,appearance:h,hideOnFlowCompletion:y,setVisible:w,customStepTypes:v,checklistStyle:f="default",autoExpandFirstIncompleteStep:E,autoExpandNextStep:b,...S})=>{let{getFlow:A,getFlowSteps:C,markStepCompleted:m,getStepStatus:B,getNumberOfStepsCompleted:k,isLoading:T,targetingLogicShouldHideFlow:N,updateCustomVariables:I,getFlowMetadata:U,isStepBlocked:$,getFlowStatus:L,hasActiveFullPageFlow:ee,setHasActiveFullPageFlow:z}=Z(),{primaryCTAClickSideEffects:J,secondaryCTAClickSideEffects:fe}=le(),{getOpenFlowState:q,setOpenFlowState:H}=Pe(),[V,he]=Fs(i||0),[Ie,ye]=Fs(!1),de=c===void 0?q(e):c,Y=s==="modal",{mergeAppearanceWithDefault:ge}=R(),{isLarge:te}=Uo();if(h=ge(h),Ts(()=>{I(a)},[a,T]),Ts(()=>{c!==void 0&&(Y&&c===!0?z(!0):Y&&c===!1&&z(!1))},[c,w,ee]),T)return null;let O=A(e);if(!O||N(O))return null;let G=C(e);if(!G||y===!0&&L(e)===Q)return null;let D=U(e);if(D!=null&&D.title&&(t=D.title),D!=null&&D.subtitle&&(o=D.subtitle),!Ie&&i===void 0&&k(e)>0){let u=G.findIndex(F=>F.complete===!1);he(u>-1?u:G.length-1),ye(!0)}function ne(){if(V+1>=G.length){Y&&H(e,!1);return}$(e,G[V+1].id)||he(V+1)}function oe(u,F,_){let ce=V+1<G.length?G[V+1]:null;d&&d(u,V,F,ce)===!0&&Y&&j(),x&&x(u,_,ce),!x&&!d&&(u.primaryButtonUri||u.secondaryButtonUri)&&Y&&j()}function Ce(){return G.map((u,F)=>({...u,handleSecondaryButtonClick:()=>{ne(),fe(u),u.skippable===!0&&m(e,u.id,{skipped:!0}),oe(u,"secondary",F)},handlePrimaryButtonClick:()=>{(!u.completionCriteria&&(u.autoMarkCompleted||u.autoMarkCompleted===void 0)||u.completionCriteria&&u.autoMarkCompleted===!0)&&(m(e,u.id),ne()),oe(u,"primary",F),J(u),B(e,u.id)===Me&&ne()}}))}function De(){return pe.createElement(ie,{appearance:h})}let Ge={steps:Ce(),title:t,subtitle:o,primaryColor:h.theme.colorPrimary,appearance:h,customStepTypes:v,type:s,className:n,autoExpandFirstIncompleteStep:E,autoExpandNextStep:b};function j(){H(e,!1),p&&p(),w&&w(!1)}function ke(){return pe.createElement(pe.Fragment,null,pe.createElement(De,null),pe.createElement(ws,{flowId:e,appearance:h,customVariables:a,className:n}))}function ft(){return pe.createElement(pe.Fragment,null,pe.createElement(De,null),pe.createElement(br,{visible:de,onClose:()=>{j()},selectedStep:V,setSelectedStep:he,autoExpandNextStep:!0,appearance:h,...Ge}))}function jo(){if(!te)return ft();let u=S.guideFlowId,F;return u&&A(u)&&(F=C(u)),pe.createElement(pe.Fragment,null,pe.createElement(De,null),pe.createElement(yr,{visible:de,stepsTitle:D.stepsTitle?D.stepsTitle:"Your quick start guide",onClose:()=>{j()},selectedStep:V,setSelectedStep:he,guideData:F,guideTitle:S.guideTitle??"Guide",appearance:h,title:t,subtitle:o,onGuideButtonClick:_=>{oe(_,"link",0)},customStepTypes:v,...Ge}))}function g(){if(!te)return ft();let u=pe.createElement(Cr,{flowId:e,style:r,selectedStep:V,setSelectedStep:he,appearance:h,type:s,...Ge});return Y?pe.createElement(rt,{onClose:()=>{j()},visible:de,appearance:h,style:{paddingTop:"0px",padding:"12px",paddingLeft:0}},pe.createElement(De,null),u):pe.createElement(pe.Fragment,null,pe.createElement(De,null),u)}switch(f){case"condensed":return ft();case"with-guide":return jo();case"default":return g();case"carousel":return ke();default:return g()}};var Sd=e=>Cd.createElement(Tr,{type:"inline",...e});import mt,{useEffect as yd}from"react";import Ve from"react";import zo from"styled-components";var ks=zo.div`
1288
+ `;var ys=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:r}=R(),{primaryCTAClickSideEffects:i}=ae();o=r(o);let{imageUri:n=null,subtitle:s=null,title:p=null,complete:c=!1,blocked:a=!1}=e,g=e.primaryButtonTitle||e.secondaryButtonTitle,d=()=>{i(e)};return Wt.createElement(ms,{className:l("carouselCard",o),onClick:a?null:d,style:t,blocked:a,complete:c},n&&Wt.createElement(us,{className:l("carouselCardImage",o),src:n,alt:p,style:{opacity:c||a?.4:1}}),c&&Wt.createElement(gs,{className:l("carouselCompletedPill",o)},Wt.createElement(Ss,{style:{color:"#108E0B"}},"Complete")),p&&Wt.createElement(Cs,{blocked:a,complete:c,className:l("carouselCardTitle",o)},p),s&&Wt.createElement(dt.Quiet,{blocked:a,complete:c,className:l("carouselCardSubtitle",o)},s))};var hd=()=>se.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se.createElement("path",{d:"M14 6L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),se.createElement("path",{d:"M14 18L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),se.createElement("path",{d:"M4 12H20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})),bs=({side:e="left",show:t=!1,onClick:o=()=>{}})=>{let[r,i]=Ft(!1),[n,s]=Ft(!1);yr(()=>{t===!0&&r===!1?i(!0):t===!1&&r===!0&&s(!0)},[t]);let p=()=>{i(!1),s(!1)},c=e=="left"?{top:0,bottom:0,left:-20,transform:"rotate(180deg)"}:{top:0,bottom:0,right:-20};return r?se.createElement(ps,{style:c,reversed:n,onAnimationEnd:n?p:null},se.createElement(ds,{onClick:()=>o(),style:{right:16,top:"calc(50% - 24px)"}},se.createElement(hd,null))):null},ws=({flowId:e,appearance:t,customVariables:o,className:r})=>{let i=xd(null),[n,s]=Ft(!1),[p,c]=Ft(!1),[a,g]=Ft(null),[d,x]=Ft([]),[y,w]=Ft(0),{isSmall:P}=rs(),f=P?1:3,{getFlowMetadata:E,getFlowSteps:b,getNumberOfStepsCompleted:S,updateCustomVariables:A,isLoading:C}=Z();yr(()=>{A(o)},[o,C]),yr(()=>{if(C)return;let I=E(e),M=S(e),D=b(e);g(I),I.data!==null&&(x(D.sort((L,ee)=>Number(L.complete)-Number(ee.complete))),c(D.length>f),w(M))},[C]);let m=[];for(let I=0;I<d.length;I+=f)m.push(d.slice(I,I+f));let B=I=>{let M=I.target,D=M.scrollWidth-M.clientWidth,L=Math.ceil(M.scrollLeft);L>0&&n===!1&&s(!0),L===0&&n===!0&&s(!1),L<D&&p===!1&&c(!0),L===D&&p===!0&&c(!1)},F=(I=!0)=>{let M=I?1:-1;i.current!==null&&i.current.scrollBy({left:i.current.clientWidth*M,behavior:"smooth"})},T=null,O=I=>{T!==null?clearTimeout(T):B(I),T=setTimeout(()=>{B(I)},16)};return C?null:se.createElement(fs,{className:be(l("carouselContainer",t),r)},se.createElement("div",{style:{display:"flex",justifyContent:P?"center":"space-between",marginBottom:20,flexWrap:P?"wrap":"nowrap",gap:P?16:20}},se.createElement("div",null,se.createElement(xs,{className:l("carouselTitle",t)},a==null?void 0:a.title),se.createElement(dt.Quiet,{className:l("carouselSubtitle",t)},a==null?void 0:a.subtitle)),se.createElement(hs,{className:l("progressWrapper",t)},se.createElement(Le,{count:y,total:d.length,appearance:t}))),se.createElement("div",{style:{position:"relative"}},se.createElement(bs,{show:n,onClick:()=>F(!1)}),se.createElement(bs,{side:"right",show:p,onClick:F}),se.createElement(ls,{ref:i,onScroll:O},m.map((I,M)=>se.createElement(as,{key:M,style:{flex:`0 0 calc(100% - ${d.length>f?36:0}px)`}},I.map((D,L)=>se.createElement(ys,{key:L,stepData:D,style:{flex:d.length>f?`0 1 calc(100% / ${f} - 16px * 2 / ${f})`:1},appearance:t})))))),se.createElement(re,{appearance:t}))};var br=({flowId:e,title:t,subtitle:o,style:r,initialSelectedStep:i,className:n,type:s="inline",onDismiss:p,visible:c,customVariables:a,onStepCompletion:g,onButtonClick:d,appearance:x,hideOnFlowCompletion:y,setVisible:w,customStepTypes:P,checklistStyle:f="default",autoExpandFirstIncompleteStep:E,autoExpandNextStep:b,...S})=>{let{getFlow:A,getFlowSteps:C,markStepCompleted:m,getStepStatus:B,getNumberOfStepsCompleted:F,isLoading:T,targetingLogicShouldHideFlow:O,updateCustomVariables:I,getFlowMetadata:M,isStepBlocked:D,getFlowStatus:L,hasActiveFullPageFlow:ee,setHasActiveFullPageFlow:U}=Z(),{primaryCTAClickSideEffects:J,secondaryCTAClickSideEffects:fe}=ae(),{getOpenFlowState:q,setOpenFlowState:W}=Pe(),[H,he]=Fs(i||0),[Ie,ye]=Fs(!1),ce=c===void 0?q(e):c,Y=s==="modal",{mergeAppearanceWithDefault:ge}=R();if(x=ge(x),Ts(()=>{I(a)},[a,T]),Ts(()=>{c!==void 0&&(Y&&c===!0?U(!0):Y&&c===!1&&U(!1))},[c,w,ee]),T)return null;let te=A(e);if(!te||O(te))return null;let N=C(e);if(!N||y===!0&&L(e)===Q)return null;let V=M(e);if(V!=null&&V.title&&(t=V.title),V!=null&&V.subtitle&&(o=V.subtitle),!Ie&&i===void 0&&F(e)>0){let u=N.findIndex(h=>h.complete===!1);he(u>-1?u:N.length-1),ye(!0)}function j(){if(H+1>=N.length){Y&&W(e,!1);return}D(e,N[H+1].id)||he(H+1)}function ie(u,h,v){let _=H+1<N.length?N[H+1]:null;d&&d(u,H,h,_)===!0&&Y&&De(),g&&g(u,v,_),!g&&!d&&(u.primaryButtonUri||u.secondaryButtonUri)&&Y&&De()}function ne(){return N.map((u,h)=>({...u,handleSecondaryButtonClick:()=>{j(),fe(u),u.skippable===!0&&m(e,u.id,{skipped:!0}),ie(u,"secondary",h)},handlePrimaryButtonClick:()=>{(!u.completionCriteria&&(u.autoMarkCompleted||u.autoMarkCompleted===void 0)||u.completionCriteria&&u.autoMarkCompleted===!0)&&(m(e,u.id),j()),ie(u,"primary",h),J(u),B(e,u.id)===Me&&j()}}))}function le(){return de.createElement(re,{appearance:x})}let Ge={steps:ne(),title:t,subtitle:o,primaryColor:x.theme.colorPrimary,appearance:x,customStepTypes:P,type:s,className:n,autoExpandFirstIncompleteStep:E,autoExpandNextStep:b};function De(){W(e,!1),p&&p(),w&&w(!1)}function G(){return de.createElement(de.Fragment,null,de.createElement(le,null),de.createElement(ws,{flowId:e,appearance:x,customVariables:a,className:n}))}function ke(){return de.createElement(de.Fragment,null,de.createElement(le,null),de.createElement(Sr,{visible:ce,onClose:()=>{De()},selectedStep:H,setSelectedStep:he,autoExpandNextStep:!0,appearance:x,...Ge}))}function jt(){let u=S.guideFlowId,h;return u&&A(u)&&(h=C(u)),de.createElement(de.Fragment,null,de.createElement(le,null),de.createElement(Cr,{visible:ce,stepsTitle:V.stepsTitle?V.stepsTitle:"Your quick start guide",onClose:()=>{De()},selectedStep:H,setSelectedStep:he,guideData:h,guideTitle:S.guideTitle??"Guide",appearance:x,title:t,subtitle:o,onGuideButtonClick:v=>{ie(v,"link",0)},customStepTypes:P,...Ge}))}function mo(){let u=de.createElement(xr,{flowId:e,style:r,selectedStep:H,setSelectedStep:he,appearance:x,type:s,...Ge});return Y?de.createElement(rt,{onClose:()=>{De()},visible:ce,appearance:x,style:{paddingTop:"0px",padding:"12px",paddingLeft:0}},de.createElement(le,null),u):de.createElement(de.Fragment,null,de.createElement(le,null),u)}switch(f){case"condensed":return ke();case"with-guide":return jt();case"default":return mo();case"carousel":return G();default:return mo()}};var Sd=e=>Cd.createElement(br,{type:"inline",...e});import mt,{useEffect as yd}from"react";import Ve from"react";import zo from"styled-components";var ks=zo.div`
1289
1289
  border: 1px solid ${e=>e.appearance.theme.colorBorder};
1290
1290
  border-radius: 8px;
1291
1291
  padding: 6px 10px 6px 10px;
@@ -1313,7 +1313,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1313
1313
  display: flex;
1314
1314
  height: 100%;
1315
1315
  align-items: center;
1316
- `;var Es=({title:e,count:t,total:o,onClick:r,style:i={},className:n,appearance:s,type:p="default"})=>Ve.createElement(Ve.Fragment,null,Ve.createElement(ie,{appearance:s}),Ve.createElement(ks,{onClick:()=>r!==void 0&&r(),style:{...p=="condensed"?{display:"flex",justifyContent:"space-between"}:{},...i},className:be(n??"",l("progressRingContainer",s)),appearance:s},p=="condensed"&&o&&o!==0&&Ve.createElement(Bs,{className:l("progressRingContainer",s)},Ve.createElement(Nt,{size:19,percentage:t/o,fillColor:s.theme.colorPrimary,bgColor:s.theme.colorBackgroundSecondary})),Ve.createElement(Ps,{type:p,className:l("badgeTitleContainer",s)},Ve.createElement(vs,{type:p,appearance:s,className:l("badgeTitle",s)},e),r!==void 0&&Ve.createElement(_t,{className:l("badgeChevron",s),color:s.theme.colorPrimary})),p=="default"&&o&&o!==0&&Ve.createElement(Le,{display:"compact",count:t,total:o,bgColor:s.theme.colorBackgroundSecondary,style:{width:"100%"},appearance:s})));import ct from"react";import ao from"styled-components";var As=ao.div`
1316
+ `;var Es=({title:e,count:t,total:o,onClick:r,style:i={},className:n,appearance:s,type:p="default"})=>Ve.createElement(Ve.Fragment,null,Ve.createElement(re,{appearance:s}),Ve.createElement(ks,{onClick:()=>r!==void 0&&r(),style:{...p=="condensed"?{display:"flex",justifyContent:"space-between"}:{},...i},className:be(n??"",l("progressRingContainer",s)),appearance:s},p=="condensed"&&o&&o!==0&&Ve.createElement(Bs,{className:l("progressRingContainer",s)},Ve.createElement(It,{size:19,percentage:t/o,fillColor:s.theme.colorPrimary,bgColor:s.theme.colorBackgroundSecondary})),Ve.createElement(Ps,{type:p,className:l("badgeTitleContainer",s)},Ve.createElement(vs,{type:p,appearance:s,className:l("badgeTitle",s)},e),r!==void 0&&Ve.createElement(zt,{className:l("badgeChevron",s),color:s.theme.colorPrimary})),p=="default"&&o&&o!==0&&Ve.createElement(Le,{display:"compact",count:t,total:o,bgColor:s.theme.colorBackgroundSecondary,style:{width:"100%"},appearance:s})));import ct from"react";import ao from"styled-components";var As=ao.div`
1317
1317
  display: flex;
1318
1318
  flex-direction: row;
1319
1319
  width: 100%;
@@ -1325,7 +1325,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1325
1325
  border-color: ${e=>e.appearance.theme.colorPrimary};
1326
1326
  border-radius: 12px;
1327
1327
  `,Is=ao.div`
1328
- ${e=>P(e)} {
1328
+ ${e=>k(e)} {
1329
1329
  display: flex;
1330
1330
  justify-content: center;
1331
1331
  align-items: center;
@@ -1342,7 +1342,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1342
1342
  justify-content: center;
1343
1343
  margin-left: 16px;
1344
1344
  min-width: 200px;
1345
- `,mS=ao.div`
1345
+ `,cS=ao.div`
1346
1346
  display: flex;
1347
1347
  justify-content: center;
1348
1348
  align-items: flex-end;
@@ -1351,7 +1351,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1351
1351
  :hover {
1352
1352
  opacity: 0.8;
1353
1353
  }
1354
- `;var Ls=({title:e,subtitle:t,icon:o,appearance:r,count:i,total:n,className:s,style:p})=>ct.createElement(ct.Fragment,null,ct.createElement(As,{appearance:r,className:be(l("fullWidthProgressBadgeContainer",r),s??""),style:p},o&&ct.createElement(Is,{className:l("fullWidthProgressBadgeIcon",r)},o),ct.createElement(Ns,null,ct.createElement(we,{size:"small",appearance:r,title:e,subtitle:t})),ct.createElement(Os,{className:l("fullWidthProgressBadgeProgressContainer",r)},ct.createElement(Le,{count:i,total:n,display:"percent",textLocation:"top"}))));var bd=({flowId:e,title:t,subtitle:o,icon:r,style:i,onClick:n,className:s,customVariables:p,hideOnFlowCompletion:c,appearance:a,type:x="default"})=>{let{getFlow:d,getFlowSteps:h,getFlowStatus:y,getNumberOfStepsCompleted:w,isLoading:v,targetingLogicShouldHideFlow:f,updateCustomVariables:E}=Z(),{mergeAppearanceWithDefault:b}=R();a=b(a);let{setOpenFlowState:S,getOpenFlowState:A}=Pe();if(yd(()=>{E(p)},[p,v]),v)return null;let C=d(e);if(!C||f(C)||c===!0&&y(e)===Q)return null;let m=h(e),B=w(e);return x==="full-width"?mt.createElement(mt.Fragment,null,mt.createElement(ie,{appearance:a}),mt.createElement(Ls,{title:t,subtitle:o,count:B,total:m.length,style:i,className:s,appearance:a,icon:r,onClick:()=>{}})):mt.createElement(mt.Fragment,null,mt.createElement(ie,{appearance:a}),mt.createElement(Es,{count:B,total:m.length,title:t,style:i,onClick:()=>{S(e,!0),n&&n()},type:x,className:s,appearance:a}))};import wd from"react";var Td=({flowId:e,style:t,appearance:o,...r})=>{let{getFlow:i,targetingLogicShouldHideFlow:n,getFlowSteps:s}=Z(),{mergeAppearanceWithDefault:p}=R();o=p(o);let c=i(e);if(!c||n(c))return null;let a=s(e);return wd.createElement(lo,{steps:a,style:t,appearance:o,...r})};import ut,{useContext as Ld,useEffect as Dd}from"react";import W,{useEffect as _o,useLayoutEffect as $s,useRef as vd,useState as po}from"react";import co from"styled-components";import{useCallback as Fd,useEffect as kd,useState as Pd}from"react";var Fr=(e,t,o,r={x:20,y:20},i)=>{let n=i=="fixed"?0:window.scrollY,s=i=="fixed"?0:window.scrollX;return t==="left"?{x:e.left-o+r.x+s,y:e.top-r.y+n}:t==="right"?{x:e.left+e.width+r.x+s,y:e.top-r.y+n}:{x:0,y:0}};function Ds(e,t){let o="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[r,i]=Pd(o),n=Fd(()=>{e&&i(e.getBoundingClientRect())},[e]);return kd(()=>(n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[e,t]),r}var Ms=300,Us=100,Bd=500,Vt=12,Ed=co.div`
1354
+ `;var Ls=({title:e,subtitle:t,icon:o,appearance:r,count:i,total:n,className:s,style:p})=>ct.createElement(ct.Fragment,null,ct.createElement(As,{appearance:r,className:be(l("fullWidthProgressBadgeContainer",r),s??""),style:p},o&&ct.createElement(Is,{className:l("fullWidthProgressBadgeIcon",r)},o),ct.createElement(Ns,null,ct.createElement(we,{size:"small",appearance:r,title:e,subtitle:t})),ct.createElement(Os,{className:l("fullWidthProgressBadgeProgressContainer",r)},ct.createElement(Le,{count:i,total:n,display:"percent",textLocation:"top"}))));var bd=({flowId:e,title:t,subtitle:o,icon:r,style:i,onClick:n,className:s,customVariables:p,hideOnFlowCompletion:c,appearance:a,type:g="default"})=>{let{getFlow:d,getFlowSteps:x,getFlowStatus:y,getNumberOfStepsCompleted:w,isLoading:P,targetingLogicShouldHideFlow:f,updateCustomVariables:E}=Z(),{mergeAppearanceWithDefault:b}=R();a=b(a);let{setOpenFlowState:S,getOpenFlowState:A}=Pe();if(yd(()=>{E(p)},[p,P]),P)return null;let C=d(e);if(!C||f(C)||c===!0&&y(e)===Q)return null;let m=x(e),B=w(e);return g==="full-width"?mt.createElement(mt.Fragment,null,mt.createElement(re,{appearance:a}),mt.createElement(Ls,{title:t,subtitle:o,count:B,total:m.length,style:i,className:s,appearance:a,icon:r,onClick:()=>{}})):mt.createElement(mt.Fragment,null,mt.createElement(re,{appearance:a}),mt.createElement(Es,{count:B,total:m.length,title:t,style:i,onClick:()=>{S(e,!0),n&&n()},type:g,className:s,appearance:a}))};import wd from"react";var Td=({flowId:e,style:t,appearance:o,...r})=>{let{getFlow:i,targetingLogicShouldHideFlow:n,getFlowSteps:s}=Z(),{mergeAppearanceWithDefault:p}=R();o=p(o);let c=i(e);if(!c||n(c))return null;let a=s(e);return wd.createElement(lo,{steps:a,style:t,appearance:o,...r})};import ut,{useContext as Ld,useEffect as Dd}from"react";import z,{useEffect as _o,useLayoutEffect as $s,useRef as vd,useState as po}from"react";import co from"styled-components";import{useCallback as Fd,useEffect as kd,useState as Pd}from"react";var wr=(e,t,o,r={x:20,y:20},i)=>{let n=i=="fixed"?0:window.scrollY,s=i=="fixed"?0:window.scrollX;return t==="left"?{x:e.left-o+r.x+s,y:e.top-r.y+n}:t==="right"?{x:e.left+e.width+r.x+s,y:e.top-r.y+n}:{x:0,y:0}};function Ds(e,t){let o="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[r,i]=Pd(o),n=Fd(()=>{e&&i(e.getBoundingClientRect())},[e]);return kd(()=>(n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[e,t]),r}var Ms=300,Us=100,Bd=500,Ht=12,Ed=co.div`
1355
1355
  width: 100%;
1356
1356
  height: 100%;
1357
1357
  border-radius: 9999px;
@@ -1375,8 +1375,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1375
1375
  }
1376
1376
  }
1377
1377
  `,Ad=co.div`
1378
- width: ${Vt}px;
1379
- height: ${Vt}px;
1378
+ width: ${Ht}px;
1379
+ height: ${Ht}px;
1380
1380
  border-radius: 100px;
1381
1381
  background-color: ${e=>e.primaryColor};
1382
1382
  z-index: 20;
@@ -1390,10 +1390,10 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1390
1390
  align-items: center;
1391
1391
  z-index: ${e=>e.zIndex?e.zIndex:90};
1392
1392
  `,Nd=co(zs)`
1393
- width: ${Vt+12}px;
1394
- height: ${Vt+12}px;
1395
- `,Od=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:r="auto",showHighlight:i=!0,primaryColor:n="#000000",offset:s={x:0,y:0},visible:p=!0,containerStyle:c={},selectedStep:a=0,customStepTypes:x,appearance:d,dismissible:h=!1,showHighlightOnly:y,showStepCount:w=!0,completedStepsCount:v=0,showFrigadeBranding:f=!1,cssPosition:E="absolute"})=>{var oe,Ce,De,Ge;let[b,S]=po(),[A,C]=po(new Date),m=vd(null),[B,k]=po(document.querySelector(e[a].selector)),T=Ds(B,A),[N,I]=po(),[U,$]=po(!y),L=(Ce=(oe=e[a])==null?void 0:oe.props)!=null&&Ce.position?e[a].props.position:E,ee=((Ge=(De=e[a])==null?void 0:De.props)==null?void 0:Ge.zIndex)??90,z=(b==null?void 0:b.width)??Ms,J=(b==null?void 0:b.height)??Us,fe=window.location.pathname.split("/").pop();$s(()=>{m.current&&S({width:m.current.clientWidth,height:m.current.clientHeight})},[a,A,L]),_o(()=>{y||$(!0)},[a]);let q=()=>{let j=document.querySelector(e[a].selector);if(!j){I(void 0),k(null);return}N&&N===JSON.stringify(j==null?void 0:j.getBoundingClientRect())||(k(j),C(new Date),j&&I(JSON.stringify(j.getBoundingClientRect())))};if(_o(()=>{let j=new MutationObserver(q);return j.observe(document.body,{subtree:!0,childList:!0}),()=>j.disconnect()},[q]),_o(()=>{let j=new MutationObserver(q);return j.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","class"]}),()=>j.disconnect()},[q]),_o(()=>{let j=setInterval(()=>{q()},10);return()=>clearInterval(j)},[q]),$s(()=>{setTimeout(()=>{q()},Bd),q()},[a,fe]),B===null||!p||T.height===0&&T.width===0&&L!=="fixed")return null;let H=r==="auto"?"right":r,V=Fr(T,H,z,s,L),he=T.right+z>(window.innerWidth||document.documentElement.clientWidth),Ie=T.bottom+Us>(window.innerHeight||document.documentElement.clientHeight);he&&r==="auto"&&(V=Fr(T,"left",z,s,L),H="left");let ye=()=>{let j=()=>{if(e[a].handlePrimaryButtonClick&&(e[a].handlePrimaryButtonClick(),$(!1),setTimeout(()=>{q()},30)),v===e.length-1)return o()},ke=()=>{e[a].handleSecondaryButtonClick&&(e[a].handleSecondaryButtonClick(),y&&!e[a].secondaryButtonUri&&$(!1))};return W.createElement(W.Fragment,null,w&&e.length>1&&W.createElement(Vr,null,W.createElement(Gr,{className:l("tooltipStepCounter",d)},a+1," of ",e.length)),W.createElement(jr,{showStepCount:w,className:l("tooltipCTAContainer",d)},e[a].secondaryButtonTitle&&W.createElement(re,{title:e[a].secondaryButtonTitle,appearance:d,onClick:ke,size:"small",withMargin:!1,secondary:!0}),e[a].primaryButtonTitle&&W.createElement(re,{title:e[a].primaryButtonTitle,appearance:d,onClick:j,withMargin:!1,size:"small"})))},de=()=>W.createElement(W.Fragment,null,h&&W.createElement(zr,{"data-testid":"tooltip-dismiss",onClick:()=>{t&&t()},className:l("tooltipClose",d)},W.createElement(Be,null)),e[a].imageUri&&W.createElement(_r,{dismissible:h,appearance:d,src:e[a].imageUri,className:l("tooltipImageContainer",d)}),e[a].videoUri&&!e[a].imageUri&&W.createElement(Wr,{dismissible:h,appearance:d,className:l("tooltipVideoContainer",d)},W.createElement(lt,{appearance:d,videoUri:e[a].videoUri})),W.createElement(we,{appearance:d,title:e[a].title,subtitle:e[a].subtitle,size:"small"}),W.createElement(Hr,{className:l("tooltipFooter",d)},W.createElement(ye,null))),ge={...{default:j=>{var ke;if((ke=e[a])!=null&&ke.StepContent){let ft=e[a].StepContent;return W.createElement("div",null,ft)}return W.createElement(de,null)}},...x},te=()=>{var j;return e?!((j=e[a])!=null&&j.type)||!ge[e[a].type]?ge.default(e[a]):ge[e[a].type]({stepData:e[a],primaryColor:n}):W.createElement(W.Fragment,null)};if(y&&e[a].complete===!0)return null;let O={top:(V==null?void 0:V.y)-Vt,left:(H=="left"?T.x+s.x:(V==null?void 0:V.x)-Vt)??0,cursor:y?"pointer":"default",position:L},G=()=>{let ke=O.left+(H=="left"?-z:24);return Math.min(Math.max(ke,20),window.innerWidth-z-20)},D=()=>{if(L==="fixed")return O.top;let j=O.top+J,ke=20;return j>window.innerHeight-ke?O.top+-J:O.top},ne=()=>{y&&(C(new Date),$(!U))};return W.createElement(Id,null,W.createElement(Nd,{style:O,zIndex:ee,className:l("tourHighlightContainer",d)},i&&e[a].showHighlight!==!1&&W.createElement(W.Fragment,null,W.createElement(Ad,{style:{position:L},onClick:ne,primaryColor:d.theme.colorPrimary,className:l("tourHighlightInnerCircle",d)}),W.createElement(Ed,{style:{position:"absolute"},onClick:ne,primaryColor:d.theme.colorPrimary,className:l("tourHighlightOuterCircle",d)}))),W.createElement(zs,{style:{...O,left:G(),top:D()},zIndex:ee+1,className:l("tooltipContainerWrapper",d)},U&&W.createElement(W.Fragment,null,W.createElement(fo,{ref:m,layoutId:"tooltip-container",style:{position:"relative",width:"max-content",right:0,top:12,...c},appearance:d,className:l("tooltipContainer",d),maxWidth:Ms,zIndex:ee+10},W.createElement(te,null)),f&&W.createElement(qr,{className:l("poweredByFrigadeTooltipRibbon",d),appearance:d,zIndex:ee+10},W.createElement(go,{appearance:d})))))},Wo=Od;import{Portal as $d}from"react-portal";var Md=({flowId:e,customVariables:t,appearance:o,onStepCompletion:r,onButtonClick:i,showTooltipsSimultaneously:n=!1,onDismiss:s,dismissible:p,tooltipPosition:c="auto",showHighlightOnly:a=!1,dismissBehavior:x="complete-flow",onComplete:d,skipIfNotFound:h=!1,cssPosition:y="absolute",...w})=>{let{getFlow:v,getFlowSteps:f,isLoading:E,targetingLogicShouldHideFlow:b,markStepCompleted:S,markStepStarted:A,markFlowCompleted:C,updateCustomVariables:m,getCurrentStepIndex:B,getStepStatus:k,isStepBlocked:T,getFlowStatus:N,getNumberOfStepsCompleted:I}=Z(),{isLoadingUserFlowStateData:U}=ve(),{primaryCTAClickSideEffects:$,secondaryCTAClickSideEffects:L}=le(),{hasOpenModals:ee}=Pe(),z=B(e),{openFlowStates:J}=Ld(K),{mergeAppearanceWithDefault:fe}=R();if(o=fe(o),Dd(()=>{m(t)},[t,E]),U)return null;let q=v(e);if(!q||b(q)||N(e)==Q||ee())return null;let H=f(e);if(Object.keys(J).length>0){let O=Object.keys(J).find(G=>J[G]===!0);if(O!==void 0&&O!==e)return ut.createElement(ut.Fragment,null)}async function V(O){if(await S(e,O.id),H.map(G=>k(e,G.id)).every(G=>G===Me)){await C(e);return}if(!a&&z+1<H.length){if(T(e,H[z+1].id))return;await A(e,H[z+1].id)}}function he(O,G,D){let ne=z+1<H.length?H[z+1]:null;i&&i(O,z,G,ne),r&&r(O,D,ne)}function Ie(){return H.map(O=>({...O,handleSecondaryButtonClick:async()=>{L(O),O.skippable===!0&&await S(e,O.id,{skipped:!0}),he(O,"secondary",z)},handlePrimaryButtonClick:async()=>{(!O.completionCriteria&&(O.autoMarkCompleted||O.autoMarkCompleted===void 0)||O.completionCriteria&&O.autoMarkCompleted===!0)&&await V(O),he(O,"primary",z),$(O)}}))}async function ye(O){s&&s(),x==="complete-flow"?await C(e):await S(e,O.id)}function de(){d&&d()}let Y=!document.querySelector(H[z].selector);function ge(){let O=H.findIndex(G=>!!document.querySelector(G.selector));return H.map((G,D)=>Y&&!n&&D!==O&&h?null:ut.createElement(Wo,{key:G.id,appearance:o,steps:Ie(),selectedStep:D,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>ye(G),tooltipPosition:c,showHighlightOnly:a,completedStepsCount:I(e),onComplete:de,cssPosition:y,...w}))}function te(){return ut.createElement(ut.Fragment,null,ut.createElement(ie,{appearance:o}),n||Y&&h?ge():ut.createElement(Wo,{appearance:o,steps:Ie(),selectedStep:z,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>ye(H[z]),tooltipPosition:c,completedStepsCount:I(e),showHighlightOnly:a,onComplete:de,cssPosition:y,...w}))}return y==="relative"?te():ut.createElement($d,null,te())};import Ae,{useEffect as Ud,useRef as zd,useState as _d}from"react";import{Portal as Wd}from"react-portal";import Pt from"styled-components";var _s=Pt.button`
1396
- ${e=>P(e)} {
1393
+ width: ${Ht+12}px;
1394
+ height: ${Ht+12}px;
1395
+ `,Od=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:r="auto",showHighlight:i=!0,primaryColor:n="#000000",offset:s={x:0,y:0},visible:p=!0,containerStyle:c={},selectedStep:a=0,customStepTypes:g,appearance:d,dismissible:x=!1,showHighlightOnly:y,showStepCount:w=!0,completedStepsCount:P=0,showFrigadeBranding:f=!1,cssPosition:E="absolute"})=>{var ne,le,Ge,De;let[b,S]=po(),[A,C]=po(new Date),m=vd(null),[B,F]=po(document.querySelector(e[a].selector)),T=Ds(B,A),[O,I]=po(),[M,D]=po(!y),L=(le=(ne=e[a])==null?void 0:ne.props)!=null&&le.position?e[a].props.position:E,ee=((De=(Ge=e[a])==null?void 0:Ge.props)==null?void 0:De.zIndex)??90,U=(b==null?void 0:b.width)??Ms,J=(b==null?void 0:b.height)??Us,fe=window.location.pathname.split("/").pop();$s(()=>{m.current&&S({width:m.current.clientWidth,height:m.current.clientHeight})},[a,A,L]),_o(()=>{y||D(!0)},[a]);let q=()=>{let G=document.querySelector(e[a].selector);if(!G){I(void 0),F(null);return}O&&O===JSON.stringify(G==null?void 0:G.getBoundingClientRect())||(F(G),C(new Date),G&&I(JSON.stringify(G.getBoundingClientRect())))};if(_o(()=>{let G=new MutationObserver(q);return G.observe(document.body,{subtree:!0,childList:!0}),()=>G.disconnect()},[q]),_o(()=>{let G=new MutationObserver(q);return G.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","class"]}),()=>G.disconnect()},[q]),_o(()=>{let G=setInterval(()=>{q()},10);return()=>clearInterval(G)},[q]),$s(()=>{setTimeout(()=>{q()},Bd),q()},[a,fe]),B===null||!p||T.height===0&&T.width===0&&L!=="fixed")return null;let W=r==="auto"?"right":r,H=wr(T,W,U,s,L),he=T.right+U>(window.innerWidth||document.documentElement.clientWidth),Ie=T.bottom+Us>(window.innerHeight||document.documentElement.clientHeight);he&&r==="auto"&&(H=wr(T,"left",U,s,L),W="left");let ye=()=>{let G=()=>{if(e[a].handlePrimaryButtonClick&&(e[a].handlePrimaryButtonClick(),D(!1),setTimeout(()=>{q()},30)),P===e.length-1)return o()},ke=()=>{e[a].handleSecondaryButtonClick&&(e[a].handleSecondaryButtonClick(),y&&!e[a].secondaryButtonUri&&D(!1))};return z.createElement(z.Fragment,null,w&&e.length>1&&z.createElement(Hr,null,z.createElement(jr,{className:l("tooltipStepCounter",d)},a+1," of ",e.length)),z.createElement(Vr,{showStepCount:w,className:l("tooltipCTAContainer",d)},e[a].secondaryButtonTitle&&z.createElement(oe,{title:e[a].secondaryButtonTitle,appearance:d,onClick:ke,size:"small",withMargin:!1,secondary:!0}),e[a].primaryButtonTitle&&z.createElement(oe,{title:e[a].primaryButtonTitle,appearance:d,onClick:G,withMargin:!1,size:"small"})))},ce=()=>z.createElement(z.Fragment,null,x&&z.createElement(Ur,{"data-testid":"tooltip-dismiss",onClick:()=>{t&&t()},className:l("tooltipClose",d)},z.createElement(Be,null)),e[a].imageUri&&z.createElement(zr,{dismissible:x,appearance:d,src:e[a].imageUri,className:l("tooltipImageContainer",d)}),e[a].videoUri&&!e[a].imageUri&&z.createElement(_r,{dismissible:x,appearance:d,className:l("tooltipVideoContainer",d)},z.createElement(lt,{appearance:d,videoUri:e[a].videoUri})),z.createElement(we,{appearance:d,title:e[a].title,subtitle:e[a].subtitle,size:"small"}),z.createElement(Wr,{className:l("tooltipFooter",d)},z.createElement(ye,null))),ge={...{default:G=>{var ke;if((ke=e[a])!=null&&ke.StepContent){let jt=e[a].StepContent;return z.createElement("div",null,jt)}return z.createElement(ce,null)}},...g},te=()=>{var G;return e?!((G=e[a])!=null&&G.type)||!ge[e[a].type]?ge.default(e[a]):ge[e[a].type]({stepData:e[a],primaryColor:n}):z.createElement(z.Fragment,null)};if(y&&e[a].complete===!0)return null;let N={top:(H==null?void 0:H.y)-Ht,left:(W=="left"?T.x+s.x:(H==null?void 0:H.x)-Ht)??0,cursor:y?"pointer":"default",position:L},V=()=>{let ke=N.left+(W=="left"?-U:24);return Math.min(Math.max(ke,20),window.innerWidth-U-20)},j=()=>{if(L==="fixed")return N.top;let G=N.top+J,ke=20;return G>window.innerHeight-ke?N.top+-J:N.top},ie=()=>{y&&(C(new Date),D(!M))};return z.createElement(Id,null,z.createElement(Nd,{style:N,zIndex:ee,className:l("tourHighlightContainer",d)},i&&e[a].showHighlight!==!1&&z.createElement(z.Fragment,null,z.createElement(Ad,{style:{position:L},onClick:ie,primaryColor:d.theme.colorPrimary,className:l("tourHighlightInnerCircle",d)}),z.createElement(Ed,{style:{position:"absolute"},onClick:ie,primaryColor:d.theme.colorPrimary,className:l("tourHighlightOuterCircle",d)}))),z.createElement(zs,{style:{...N,left:V(),top:j()},zIndex:ee+1,className:l("tooltipContainerWrapper",d)},M&&z.createElement(z.Fragment,null,z.createElement(go,{ref:m,layoutId:"tooltip-container",style:{position:"relative",width:"max-content",right:0,top:12,...c},appearance:d,className:l("tooltipContainer",d),maxWidth:Ms,zIndex:ee+10},z.createElement(te,null)),f&&z.createElement(Kr,{className:l("poweredByFrigadeTooltipRibbon",d),appearance:d,zIndex:ee+10},z.createElement(xo,{appearance:d})))))},Wo=Od;import{Portal as $d}from"react-portal";var Md=({flowId:e,customVariables:t,appearance:o,onStepCompletion:r,onButtonClick:i,showTooltipsSimultaneously:n=!1,onDismiss:s,dismissible:p,tooltipPosition:c="auto",showHighlightOnly:a=!1,dismissBehavior:g="complete-flow",onComplete:d,skipIfNotFound:x=!1,cssPosition:y="absolute",...w})=>{let{getFlow:P,getFlowSteps:f,isLoading:E,targetingLogicShouldHideFlow:b,markStepCompleted:S,markStepStarted:A,markFlowCompleted:C,updateCustomVariables:m,getCurrentStepIndex:B,getStepStatus:F,isStepBlocked:T,getFlowStatus:O,getNumberOfStepsCompleted:I}=Z(),{isLoadingUserFlowStateData:M}=ve(),{primaryCTAClickSideEffects:D,secondaryCTAClickSideEffects:L}=ae(),{hasOpenModals:ee}=Pe(),U=B(e),{openFlowStates:J}=Ld(K),{mergeAppearanceWithDefault:fe}=R();if(o=fe(o),Dd(()=>{m(t)},[t,E]),M)return null;let q=P(e);if(!q||b(q)||O(e)==Q||ee())return null;let W=f(e);if(Object.keys(J).length>0){let N=Object.keys(J).find(V=>J[V]===!0);if(N!==void 0&&N!==e)return ut.createElement(ut.Fragment,null)}async function H(N){if(await S(e,N.id),W.map(V=>F(e,V.id)).every(V=>V===Me)){await C(e);return}if(!a&&U+1<W.length){if(T(e,W[U+1].id))return;await A(e,W[U+1].id)}}function he(N,V,j){let ie=U+1<W.length?W[U+1]:null;i&&i(N,U,V,ie),r&&r(N,j,ie)}function Ie(){return W.map(N=>({...N,handleSecondaryButtonClick:async()=>{L(N),N.skippable===!0&&await S(e,N.id,{skipped:!0}),he(N,"secondary",U)},handlePrimaryButtonClick:async()=>{(!N.completionCriteria&&(N.autoMarkCompleted||N.autoMarkCompleted===void 0)||N.completionCriteria&&N.autoMarkCompleted===!0)&&await H(N),he(N,"primary",U),D(N)}}))}async function ye(N){s&&s(),g==="complete-flow"?await C(e):await S(e,N.id)}function ce(){d&&d()}let Y=!document.querySelector(W[U].selector);function ge(){let N=W.findIndex(V=>!!document.querySelector(V.selector));return W.map((V,j)=>Y&&!n&&j!==N&&x?null:ut.createElement(Wo,{key:V.id,appearance:o,steps:Ie(),selectedStep:j,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>ye(V),tooltipPosition:c,showHighlightOnly:a,completedStepsCount:I(e),onComplete:ce,cssPosition:y,...w}))}function te(){return ut.createElement(ut.Fragment,null,ut.createElement(re,{appearance:o}),n||Y&&x?ge():ut.createElement(Wo,{appearance:o,steps:Ie(),selectedStep:U,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>ye(W[U]),tooltipPosition:c,completedStepsCount:I(e),showHighlightOnly:a,onComplete:ce,cssPosition:y,...w}))}return y==="relative"?te():ut.createElement($d,null,te())};import Ae,{useEffect as Ud,useRef as zd,useState as _d}from"react";import{Portal as Wd}from"react-portal";import kt from"styled-components";var _s=kt.button`
1396
+ ${e=>k(e)} {
1397
1397
  // Anything inside this block will be ignored if the user provides a custom class
1398
1398
 
1399
1399
  display: flex;
@@ -1410,17 +1410,17 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1410
1410
  opacity: 0.8;
1411
1411
  }
1412
1412
  }
1413
- `,Ws=Pt.span`
1414
- ${e=>P(e)} {
1413
+ `,Ws=kt.span`
1414
+ ${e=>k(e)} {
1415
1415
  font-size: 12px;
1416
1416
  display: inline-block;
1417
1417
  }
1418
- `,Hs=Pt.span`
1419
- ${e=>P(e)} {
1418
+ `,Hs=kt.span`
1419
+ ${e=>k(e)} {
1420
1420
  font-size: 12px;
1421
1421
  display: inline-block;
1422
1422
  }
1423
- `,Vs=Pt.div`
1423
+ `,Vs=kt.div`
1424
1424
  position: fixed;
1425
1425
  right: 0;
1426
1426
  bottom: 0;
@@ -1430,8 +1430,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1430
1430
  flex-direction: column;
1431
1431
  align-items: flex-end;
1432
1432
  z-index: 50;
1433
- `,js=Pt.button`
1434
- ${e=>P(e)} {
1433
+ `,js=kt.button`
1434
+ ${e=>k(e)} {
1435
1435
  // Anything inside this block will be ignored if the user provides a custom class
1436
1436
  background-color: #ffffff;
1437
1437
  border: 1px solid #f5f5f5;
@@ -1446,8 +1446,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1446
1446
  0px 3px 6px -4px rgba(0, 0, 0, 0.12);
1447
1447
  border-radius: 45px;
1448
1448
  cursor: pointer;
1449
- `,Gs=Pt.div`
1450
- ${e=>P(e)} {
1449
+ `,Gs=kt.div`
1450
+ ${e=>k(e)} {
1451
1451
  // Anything inside this block will be ignored if the user provides a custom class
1452
1452
  background: #ffffff;
1453
1453
  }
@@ -1463,8 +1463,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1463
1463
  position: ${e=>e.type=="inline"?"absolute":"relative"};
1464
1464
  top: ${e=>e.type=="inline"?"68px":0};
1465
1465
  margin-left: ${e=>e.type=="inline"?"-127px":0};
1466
- `,Ks=Pt.button`
1467
- ${e=>P(e)} {
1466
+ `,Ks=kt.button`
1467
+ ${e=>k(e)} {
1468
1468
  // Anything inside this block will be ignored if the user provides a custom class
1469
1469
  color: #434343;
1470
1470
  :hover {
@@ -1480,8 +1480,8 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1480
1480
  font-size: 14px;
1481
1481
 
1482
1482
  padding: 8px 12px;
1483
- `;import qs from"react";var Ys=({style:e,className:t})=>qs.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},qs.createElement("path",{fill:"currentColor",d:"M13.43 4.938a4.494 4.494 0 00-1.043-1.435A4.955 4.955 0 009 2.197c-1.276 0-2.48.464-3.387 1.305A4.502 4.502 0 004.57 4.938a4.242 4.242 0 00-.386 1.773v.475c0 .109.087.197.196.197h.95a.197.197 0 00.197-.197V6.71c0-1.749 1.557-3.17 3.473-3.17s3.473 1.421 3.473 3.17c0 .718-.254 1.393-.738 1.955a3.537 3.537 0 01-1.9 1.125 1.928 1.928 0 00-1.085.682c-.271.343-.42.768-.42 1.206v.552c0 .109.088.197.197.197h.95a.197.197 0 00.196-.197v-.552c0-.276.192-.519.457-.578a4.904 4.904 0 002.625-1.56c.335-.392.597-.828.778-1.3a4.256 4.256 0 00-.103-3.303zM9 13.834a.985.985 0 10.001 1.97.985.985 0 00-.001-1.97z"}));import Xs from"react";var Js=({style:e,className:t})=>Xs.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"},Xs.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"}));var Hd=({flowId:e,style:t,onStepCompletion:o,visible:r=!0,type:i="inline",title:n="Help",appearance:s})=>{let{getFlow:p,getFlowSteps:c,markStepCompleted:a,getStepStatus:x,getNumberOfStepsCompleted:d,isLoading:h,targetingLogicShouldHideFlow:y}=Z(),{primaryCTAClickSideEffects:w}=le(),v=zd(null),[f,E]=_d(!1),{mergeAppearanceWithDefault:b}=R();s=b(s),Ud(()=>(document.addEventListener("click",S,!1),()=>{document.removeEventListener("click",S,!1)}),[]);let S=k=>{v.current&&!v.current.contains(k.target)&&E(!1)};if(h)return null;let A=p(e);if(!A||y(A))return null;let C=c(e);if(!C||!r)return null;function m(k,T){!k.completionCriteria&&(k.autoMarkCompleted||k.autoMarkCompleted===void 0)&&a(e,k.id),w(k),o&&o(k,T),E(!1)}function B(){return f&&Ae.createElement(Gs,{className:l("floatingWidgetMenu",s),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},type:i},C.map((k,T)=>Ae.createElement(Ks,{className:l("floatingWidgetMenuItem",s),key:T,onClick:()=>m(k,T)},k.title)))}return i=="inline"?Ae.createElement("span",{ref:v},Ae.createElement(_s,{style:t,onClick:()=>{E(!f)},className:l("supportButton",s)},Ae.createElement(Hs,{className:l("supportIconContainer",s)},Ae.createElement(Js,{className:l("supportIcon",s),style:{width:"18px",height:"18px"}})),Ae.createElement(Ws,{className:l("supportButtonTitle",s)},n)),Ae.createElement(B,null)):Ae.createElement(Wd,null,Ae.createElement(Vs,{style:t,ref:v},Ae.createElement(B,null),Ae.createElement(js,{onClick:()=>{E(!f)},whileHover:{scale:1.1},className:l("floatingWidgetButton",s)},Ae.createElement(Ys,{className:l("floatingWidgetButtonIcon",s),style:{display:"flex",width:"20px",height:"20px"}}))))};import je,{useEffect as Vd}from"react";import Ho from"styled-components";var Qs=Ho.div`
1484
- ${e=>P(e)} {
1483
+ `;import qs from"react";var Ys=({style:e,className:t})=>qs.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},qs.createElement("path",{fill:"currentColor",d:"M13.43 4.938a4.494 4.494 0 00-1.043-1.435A4.955 4.955 0 009 2.197c-1.276 0-2.48.464-3.387 1.305A4.502 4.502 0 004.57 4.938a4.242 4.242 0 00-.386 1.773v.475c0 .109.087.197.196.197h.95a.197.197 0 00.197-.197V6.71c0-1.749 1.557-3.17 3.473-3.17s3.473 1.421 3.473 3.17c0 .718-.254 1.393-.738 1.955a3.537 3.537 0 01-1.9 1.125 1.928 1.928 0 00-1.085.682c-.271.343-.42.768-.42 1.206v.552c0 .109.088.197.197.197h.95a.197.197 0 00.196-.197v-.552c0-.276.192-.519.457-.578a4.904 4.904 0 002.625-1.56c.335-.392.597-.828.778-1.3a4.256 4.256 0 00-.103-3.303zM9 13.834a.985.985 0 10.001 1.97.985.985 0 00-.001-1.97z"}));import Xs from"react";var Js=({style:e,className:t})=>Xs.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"},Xs.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"}));var Hd=({flowId:e,style:t,onStepCompletion:o,visible:r=!0,type:i="inline",title:n="Help",appearance:s})=>{let{getFlow:p,getFlowSteps:c,markStepCompleted:a,getStepStatus:g,getNumberOfStepsCompleted:d,isLoading:x,targetingLogicShouldHideFlow:y}=Z(),{primaryCTAClickSideEffects:w}=ae(),P=zd(null),[f,E]=_d(!1),{mergeAppearanceWithDefault:b}=R();s=b(s),Ud(()=>(document.addEventListener("click",S,!1),()=>{document.removeEventListener("click",S,!1)}),[]);let S=F=>{P.current&&!P.current.contains(F.target)&&E(!1)};if(x)return null;let A=p(e);if(!A||y(A))return null;let C=c(e);if(!C||!r)return null;function m(F,T){!F.completionCriteria&&(F.autoMarkCompleted||F.autoMarkCompleted===void 0)&&a(e,F.id),w(F),o&&o(F,T),E(!1)}function B(){return f&&Ae.createElement(Gs,{className:l("floatingWidgetMenu",s),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},type:i},C.map((F,T)=>Ae.createElement(Ks,{className:l("floatingWidgetMenuItem",s),key:T,onClick:()=>m(F,T)},F.title)))}return i=="inline"?Ae.createElement("span",{ref:P},Ae.createElement(_s,{style:t,onClick:()=>{E(!f)},className:l("supportButton",s)},Ae.createElement(Hs,{className:l("supportIconContainer",s)},Ae.createElement(Js,{className:l("supportIcon",s),style:{width:"18px",height:"18px"}})),Ae.createElement(Ws,{className:l("supportButtonTitle",s)},n)),Ae.createElement(B,null)):Ae.createElement(Wd,null,Ae.createElement(Vs,{style:t,ref:P},Ae.createElement(B,null),Ae.createElement(js,{onClick:()=>{E(!f)},whileHover:{scale:1.1},className:l("floatingWidgetButton",s)},Ae.createElement(Ys,{className:l("floatingWidgetButtonIcon",s),style:{display:"flex",width:"20px",height:"20px"}}))))};import je,{useEffect as Vd}from"react";import Ho from"styled-components";var Qs=Ho.div`
1484
+ ${e=>k(e)} {
1485
1485
  display: flex;
1486
1486
  flex-direction: column;
1487
1487
  width: 100%;
@@ -1506,7 +1506,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1506
1506
  align-items: flex-start;
1507
1507
  margin-top: 16px;
1508
1508
  `,el=Ho.div`
1509
- ${e=>P(e)} {
1509
+ ${e=>k(e)} {
1510
1510
  position: absolute;
1511
1511
  top: 16px;
1512
1512
  right: 16px;
@@ -1516,9 +1516,9 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1516
1516
  opacity: 0.8;
1517
1517
  }
1518
1518
  }
1519
- `;var jd=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:r,appearance:i,className:n,style:s,dismissible:p})=>{let{getFlow:c,markFlowCompleted:a,markStepCompleted:x,isLoading:d,targetingLogicShouldHideFlow:h,updateCustomVariables:y,getFlowSteps:w,getFlowStatus:v,getCurrentStepIndex:f}=Z(),{primaryCTAClickSideEffects:E}=le(),{mergeAppearanceWithDefault:b}=R();if(i=b(i),Vd(()=>{y(o)},[o,d]),d)return null;let S=c(e);if(!S||h(S)||v(e)===Q)return null;let C=w(e)[f(e)];return je.createElement(je.Fragment,null,je.createElement(ie,{appearance:i}),je.createElement(Qs,{appearance:i,className:be(l("embeddedTipContainer",i),n),style:s},(p===!0||C.dismissible)&&je.createElement(el,{onClick:async()=>{await a(e),t&&t()},className:l("embeddedTipDismissButton",i)},je.createElement(Be,null)),je.createElement(Zs,null,je.createElement(we,{size:"small",appearance:i,title:C.title,subtitle:C.subtitle})),C.primaryButtonTitle&&je.createElement(Rs,{className:l("embeddedTipCallToActionContainer",i)},je.createElement(re,{classPrefix:"embeddedTip",title:C.primaryButtonTitle,appearance:i,withMargin:!1,size:"small",type:"inline",onClick:async()=>{C.handlePrimaryButtonClick(),E(C),!(r&&r(C,f(e),"primary")===!1)&&(await x(e,C.id),await a(e))}}))))};import Se,{useEffect as Gd}from"react";import jt from"styled-components";var tl=jt.div`
1519
+ `;var jd=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:r,appearance:i,className:n,style:s,dismissible:p})=>{let{getFlow:c,markFlowCompleted:a,markStepCompleted:g,isLoading:d,targetingLogicShouldHideFlow:x,updateCustomVariables:y,getFlowSteps:w,getFlowStatus:P,getCurrentStepIndex:f}=Z(),{primaryCTAClickSideEffects:E}=ae(),{mergeAppearanceWithDefault:b}=R();if(i=b(i),Vd(()=>{y(o)},[o,d]),d)return null;let S=c(e);if(!S||x(S)||P(e)===Q)return null;let C=w(e)[f(e)];return je.createElement(je.Fragment,null,je.createElement(re,{appearance:i}),je.createElement(Qs,{appearance:i,className:be(l("embeddedTipContainer",i),n),style:s},(p===!0||C.dismissible)&&je.createElement(el,{onClick:async()=>{await a(e),t&&t()},className:l("embeddedTipDismissButton",i)},je.createElement(Be,null)),je.createElement(Zs,null,je.createElement(we,{size:"small",appearance:i,title:C.title,subtitle:C.subtitle})),C.primaryButtonTitle&&je.createElement(Rs,{className:l("embeddedTipCallToActionContainer",i)},je.createElement(oe,{classPrefix:"embeddedTip",title:C.primaryButtonTitle,appearance:i,withMargin:!1,size:"small",type:"inline",onClick:async()=>{C.handlePrimaryButtonClick(),E(C),!(r&&r(C,f(e),"primary")===!1)&&(await g(e,C.id),await a(e))}}))))};import Se,{useEffect as Gd}from"react";import Vt from"styled-components";var tl=Vt.div`
1520
1520
  // use the :not annotation
1521
- ${e=>P(e)} {
1521
+ ${e=>k(e)} {
1522
1522
  display: flex;
1523
1523
  flex-direction: ${e=>e.type==="square"?"column":"row"};
1524
1524
  width: 100%;
@@ -1530,24 +1530,24 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1530
1530
  border-color: ${e=>e.appearance.theme.colorPrimary};
1531
1531
  border-radius: 12px;
1532
1532
  }
1533
- `,ol=jt.div`
1534
- ${e=>P(e)} {
1533
+ `,ol=Vt.div`
1534
+ ${e=>k(e)} {
1535
1535
  display: flex;
1536
1536
  width: 36px;
1537
1537
  height: 36px;
1538
1538
  }
1539
- `,rl=jt.div`
1539
+ `,rl=Vt.div`
1540
1540
  display: flex;
1541
1541
  flex-direction: column;
1542
1542
  flex: 1;
1543
1543
  margin-left: ${e=>e.type==="square"?"0px":"16px"};
1544
1544
  margin-top: ${e=>e.type==="square"?"12px":"0"};
1545
- `,il=jt.div`
1545
+ `,il=Vt.div`
1546
1546
  display: flex;
1547
1547
  flex-direction: column;
1548
1548
  justify-content: center;
1549
1549
  margin-left: ${e=>e.type==="square"?"0px":"16px"};
1550
- `,kr=jt.div`
1550
+ `,Tr=Vt.div`
1551
1551
  display: flex;
1552
1552
  justify-content: ${e=>e.type==="square"?"flex-end":"center"};
1553
1553
  align-items: flex-end;
@@ -1556,13 +1556,13 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1556
1556
  :hover {
1557
1557
  opacity: 0.8;
1558
1558
  }
1559
- `,Pr=jt.div`
1559
+ `,Fr=Vt.div`
1560
1560
  display: flex;
1561
1561
  justify-content: ${e=>e.type==="square"?"flex-end":"center"};
1562
1562
  align-items: flex-end;
1563
1563
  margin-left: ${e=>e.type==="square"?"0px":"16px"};
1564
- `;import nl from"react";var sl=({style:e,className:t})=>nl.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor"},nl.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}));var Kd=({flowId:e,title:t,subtitle:o,onDismiss:r,customVariables:i,onButtonClick:n,appearance:s,type:p="full-width",icon:c})=>{let{getFlow:a,markFlowCompleted:x,isLoading:d,targetingLogicShouldHideFlow:h,updateCustomVariables:y,getFlowMetadata:w,getFlowStatus:v,getFlowSteps:f,getCurrentStepIndex:E}=Z(),{primaryCTAClickSideEffects:b}=le(),{mergeAppearanceWithDefault:S}=R();if(s=S(s),Gd(()=>{y(i)},[i,d]),d)return null;let A=a(e);if(!A||h(A)||v(e)===Q)return null;let C=f(e),m=C.length>0?C[E(e)]:w(e);return m!=null&&m.title&&(t=m.title),m!=null&&m.subtitle&&(o=m.subtitle),Se.createElement(Se.Fragment,null,Se.createElement(ie,{appearance:s}),Se.createElement(tl,{type:p,appearance:s,className:l("bannerContainer",s)},p!="square"&&Se.createElement(ol,{className:l("bannerIconContainer",s)},c||Se.createElement(sl,null)),p==="square"&&m.dismissible&&Se.createElement(Pr,{type:p,className:l("bannerDismissButtonContainer",s)},Se.createElement(kr,{type:p,onClick:async()=>{await x(e),r&&r()},className:l("bannerDismissButton",s)},Se.createElement(Be,null))),Se.createElement(rl,{type:p},Se.createElement(we,{appearance:s,title:t,subtitle:o,classPrefix:"banner"})),Se.createElement(il,{type:p,className:l("bannerCallToActionContainer",s)},Se.createElement(re,{title:(m==null?void 0:m.primaryButtonTitle)??"Get started",appearance:s,onClick:()=>{b(m),n&&n(m,0,"primary")},classPrefix:"banner"})),p!=="square"&&m.dismissible&&Se.createElement(Pr,{type:p,className:l("bannerDismissButtonContainer",s)},Se.createElement(kr,{type:p,onClick:async()=>{await x(e),r&&r()},className:l("bannerDismissButton",s)},Se.createElement(Be,null)))))};import X,{useEffect as qd}from"react";import{Portal as Yd}from"react-portal";import tt from"styled-components";var ll=tt.div`
1565
- ${e=>P(e)} {
1564
+ `;import nl from"react";var sl=({style:e,className:t})=>nl.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor"},nl.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}));var Kd=({flowId:e,title:t,subtitle:o,onDismiss:r,customVariables:i,onButtonClick:n,appearance:s,type:p="full-width",icon:c})=>{let{getFlow:a,markFlowCompleted:g,isLoading:d,targetingLogicShouldHideFlow:x,updateCustomVariables:y,getFlowMetadata:w,getFlowStatus:P,getFlowSteps:f,getCurrentStepIndex:E}=Z(),{primaryCTAClickSideEffects:b}=ae(),{mergeAppearanceWithDefault:S}=R();if(s=S(s),Gd(()=>{y(i)},[i,d]),d)return null;let A=a(e);if(!A||x(A)||P(e)===Q)return null;let C=f(e),m=C.length>0?C[E(e)]:w(e);return m!=null&&m.title&&(t=m.title),m!=null&&m.subtitle&&(o=m.subtitle),Se.createElement(Se.Fragment,null,Se.createElement(re,{appearance:s}),Se.createElement(tl,{type:p,appearance:s,className:l("bannerContainer",s)},p!="square"&&Se.createElement(ol,{className:l("bannerIconContainer",s)},c||Se.createElement(sl,null)),p==="square"&&m.dismissible&&Se.createElement(Fr,{type:p,className:l("bannerDismissButtonContainer",s)},Se.createElement(Tr,{type:p,onClick:async()=>{await g(e),r&&r()},className:l("bannerDismissButton",s)},Se.createElement(Be,null))),Se.createElement(rl,{type:p},Se.createElement(we,{appearance:s,title:t,subtitle:o,classPrefix:"banner"})),Se.createElement(il,{type:p,className:l("bannerCallToActionContainer",s)},Se.createElement(oe,{title:(m==null?void 0:m.primaryButtonTitle)??"Get started",appearance:s,onClick:()=>{b(m),n&&n(m,0,"primary")},classPrefix:"banner"})),p!=="square"&&m.dismissible&&Se.createElement(Fr,{type:p,className:l("bannerDismissButtonContainer",s)},Se.createElement(Tr,{type:p,onClick:async()=>{await g(e),r&&r()},className:l("bannerDismissButton",s)},Se.createElement(Be,null)))))};import X,{useEffect as qd}from"react";import{Portal as Yd}from"react-portal";import tt from"styled-components";var ll=tt.div`
1565
+ ${e=>k(e)} {
1566
1566
  display: flex;
1567
1567
  flex-direction: column;
1568
1568
  width: 100%;
@@ -1603,7 +1603,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1603
1603
  display: flex;
1604
1604
  justify-content: center;
1605
1605
  align-items: center;
1606
- `,vr=tt.div`
1606
+ `,kr=tt.div`
1607
1607
  display: flex;
1608
1608
  justify-content: flex-end;
1609
1609
  margin-top: 16px;
@@ -1612,22 +1612,22 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1612
1612
  display: flex;
1613
1613
  justify-content: space-between;
1614
1614
  margin-top: 8px;
1615
- `,Br=tt.div`
1615
+ `,Pr=tt.div`
1616
1616
  font-size: 12px;
1617
1617
  line-height: 16px;
1618
1618
  color: ${e=>e.appearance.theme.colorTextDisabled};
1619
- `,Er=tt.div`
1619
+ `,vr=tt.div`
1620
1620
  display: flex;
1621
1621
  flex-direction: column;
1622
1622
  flex: 1;
1623
- `,wb=tt.div`
1623
+ `,bb=tt.div`
1624
1624
  display: flex;
1625
1625
  flex-direction: column;
1626
1626
  justify-content: center;
1627
1627
  align-items: flex-start;
1628
1628
  margin-top: 16px;
1629
1629
  `,dl=tt.textarea`
1630
- ${e=>P(e)} {
1630
+ ${e=>k(e)} {
1631
1631
  margin-top: 16px;
1632
1632
  border: 1px solid ${e=>e.appearance.theme.colorBorder};
1633
1633
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
@@ -1638,7 +1638,7 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1638
1638
  height: 100px;
1639
1639
  }
1640
1640
  `,cl=tt.div`
1641
- ${e=>P(e)} {
1641
+ ${e=>k(e)} {
1642
1642
  position: absolute;
1643
1643
  top: 16px;
1644
1644
  right: 16px;
@@ -1648,5 +1648,5 @@ ${r=>r.inlineStyles.map(([i,n])=>`.${qt}${i}.${qt}${i} { ${Object.entries(n).map
1648
1648
  opacity: 0.8;
1649
1649
  }
1650
1650
  }
1651
- `;var Xd=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:r,appearance:i,className:n,style:s,type:p="modal"})=>{let{getFlow:c,markFlowCompleted:a,markStepCompleted:x,getNumberOfStepsCompleted:d,isLoading:h,targetingLogicShouldHideFlow:y,updateCustomVariables:w,getFlowSteps:v,getFlowStatus:f,getCurrentStepIndex:E}=Z(),{primaryCTAClickSideEffects:b}=le(),{mergeAppearanceWithDefault:S}=R(),[A,C]=X.useState(null),[m,B]=X.useState(""),{hasOpenModals:k,setKeepCompletedFlowOpenDuringSession:T,shouldKeepCompletedFlowOpenDuringSession:N}=Pe();if(i=S(i),qd(()=>{w(o)},[o,h]),h)return null;let I=c(e);if(!I||y(I)||f(e)===Q||d(e)===1&&!N(e)||k())return null;let $=v(e)[E(e)];function L(){return X.createElement(X.Fragment,null,X.createElement(Er,null,X.createElement(we,{size:"large",appearance:i,title:$.title,subtitle:$.subtitle})),X.createElement(vr,{className:l("npsNumberButtonContainer",i),appearance:i},Array.from(Array(10).keys()).map(J=>X.createElement(al,{className:l("npsNumberButton",i),selected:A===J+1,key:J,onClick:async()=>{T(e),C(J+1),await x(e,$.id,{score:J+1})},appearance:i},J+1))),X.createElement(pl,{appearance:i},X.createElement(Br,{appearance:i},"Not likely at all"),X.createElement(Br,{appearance:i},"Extremely likely")))}function ee(){return X.createElement(X.Fragment,null,X.createElement(Er,null,X.createElement(we,{appearance:i,title:"Why did you choose this score?",size:"large"})),X.createElement(dl,{appearance:i,value:m,onChange:J=>{B(J.target.value)},placeHolder:"Add your optional fedback here..."}),X.createElement(vr,{appearance:i,className:l("npsNumberButtonContainer",i)},X.createElement(re,{size:"large",withMargin:!1,onClick:async()=>{await a(e),r&&r($,1,"primary")},appearance:i,title:$.secondaryButtonTitle||"Skip",secondary:!0}),X.createElement(re,{size:"large",withMargin:!1,onClick:async()=>{await x(e,$.id,{feedbackText:m}),await a(e),r&&r($,1,"primary")},appearance:i,title:$.primaryButtonTitle||"Submit"})))}function z(){return X.createElement(X.Fragment,null,X.createElement(ie,{appearance:i}),X.createElement(ll,{appearance:i,className:be(l("npsSurveyContainer",i),n),style:s,type:p},X.createElement(cl,{onClick:async()=>{await a(e),t&&t()},className:l("npsSurveyDismissButton",i)},X.createElement(Be,null)),d(e)==0&&L(),d(e)==1&&ee()))}return p==="inline"?z():X.createElement(Yd,null,z())};import*as Vo from"react";import ml from"react";var ul=({as:e="span",children:t,variant:o="Body1",...r})=>ml.createElement(Gi,{color:"neutral.foreground",fontFamily:"default",forwardedAs:e,variant:o,...r},t),Jd=Object.fromEntries(Object.keys(Ao).map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():void 0,o=r=>ml.createElement(ul,{as:t,...r,variant:e},r.children);return o.displayName=`Text.${e}`,[e,o]})),Ar=Object.assign(ul,Jd);var fl=({as:e="button",className:t,size:o="md",title:r,variant:i="Primary",...n})=>{var s;return Vo.createElement(ji,{className:`fr-button-${i.toLowerCase()}${t?` ${t}`:""}`,forwardedAs:e,variant:i,size:o,borderRadius:"md",...n},Vo.createElement(Ar,{color:(s=io[i])==null?void 0:s.color,fontWeight:"semibold"},r))},Qd=Object.fromEntries(Object.keys(io).map(e=>{let t=o=>Vo.createElement(fl,{...o,variant:e});return t.displayName=`Button.${e}`,[e,t]})),Zd=Object.assign(fl,Qd);export{ro as Box,Zd as Button,Ye as CheckBox,nt as FormLabel,tr as FormTextField,Kd as FrigadeBanner,Tr as FrigadeChecklist,qe as FrigadeDefaultAppearance,jd as FrigadeEmbeddedTip,Di as FrigadeForm,Td as FrigadeGuide,Sd as FrigadeHeroChecklist,Xd as FrigadeNPSSurvey,bd as FrigadeProgressBadge,Ep as FrigadeProvider,Hd as FrigadeSupportWidget,Md as FrigadeTour,Nt as ProgressRing,Ar as Text,fr as tokens,Pe as useFlowOpens,Gt as useFlowResponses,Z as useFlows,cr as useOrganization,Kt as useUser,ve as useUserFlowStates};
1651
+ `;var Xd=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:r,appearance:i,className:n,style:s,type:p="modal"})=>{let{getFlow:c,markFlowCompleted:a,markStepCompleted:g,getNumberOfStepsCompleted:d,isLoading:x,targetingLogicShouldHideFlow:y,updateCustomVariables:w,getFlowSteps:P,getFlowStatus:f,getCurrentStepIndex:E}=Z(),{primaryCTAClickSideEffects:b}=ae(),{mergeAppearanceWithDefault:S}=R(),[A,C]=X.useState(null),[m,B]=X.useState(""),{hasOpenModals:F,setKeepCompletedFlowOpenDuringSession:T,shouldKeepCompletedFlowOpenDuringSession:O}=Pe();if(i=S(i),qd(()=>{w(o)},[o,x]),x)return null;let I=c(e);if(!I||y(I)||f(e)===Q||d(e)===1&&!O(e)||F())return null;let D=P(e)[E(e)];function L(){return X.createElement(X.Fragment,null,X.createElement(vr,null,X.createElement(we,{size:"large",appearance:i,title:D.title,subtitle:D.subtitle})),X.createElement(kr,{className:l("npsNumberButtonContainer",i),appearance:i},Array.from(Array(10).keys()).map(J=>X.createElement(al,{className:l("npsNumberButton",i),selected:A===J+1,key:J,onClick:async()=>{T(e),C(J+1),await g(e,D.id,{score:J+1})},appearance:i},J+1))),X.createElement(pl,{appearance:i},X.createElement(Pr,{appearance:i},"Not likely at all"),X.createElement(Pr,{appearance:i},"Extremely likely")))}function ee(){return X.createElement(X.Fragment,null,X.createElement(vr,null,X.createElement(we,{appearance:i,title:"Why did you choose this score?",size:"large"})),X.createElement(dl,{appearance:i,value:m,onChange:J=>{B(J.target.value)},placeHolder:"Add your optional fedback here..."}),X.createElement(kr,{appearance:i,className:l("npsNumberButtonContainer",i)},X.createElement(oe,{size:"large",withMargin:!1,onClick:async()=>{await a(e),r&&r(D,1,"primary")},appearance:i,title:D.secondaryButtonTitle||"Skip",secondary:!0}),X.createElement(oe,{size:"large",withMargin:!1,onClick:async()=>{await g(e,D.id,{feedbackText:m}),await a(e),r&&r(D,1,"primary")},appearance:i,title:D.primaryButtonTitle||"Submit"})))}function U(){return X.createElement(X.Fragment,null,X.createElement(re,{appearance:i}),X.createElement(ll,{appearance:i,className:be(l("npsSurveyContainer",i),n),style:s,type:p},X.createElement(cl,{onClick:async()=>{await a(e),t&&t()},className:l("npsSurveyDismissButton",i)},X.createElement(Be,null)),d(e)==0&&L(),d(e)==1&&ee()))}return p==="inline"?U():X.createElement(Yd,null,U())};import*as Vo from"react";import ml from"react";var ul=({as:e="span",children:t,variant:o="Body1",...r})=>ml.createElement(ji,{color:"neutral.foreground",fontFamily:"default",forwardedAs:e,variant:o,...r},t),Jd=Object.fromEntries(Object.keys(Io).map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():void 0,o=r=>ml.createElement(ul,{as:t,...r,variant:e},r.children);return o.displayName=`Text.${e}`,[e,o]})),Br=Object.assign(ul,Jd);var fl=({as:e="button",className:t,size:o="md",title:r,variant:i="Primary",...n})=>{var s;return Vo.createElement(Vi,{className:`fr-button-${i.toLowerCase()}${t?` ${t}`:""}`,forwardedAs:e,variant:i,size:o,borderRadius:"md",...n},Vo.createElement(Br,{color:(s=io[i])==null?void 0:s.color,fontWeight:"semibold"},r))},Qd=Object.fromEntries(Object.keys(io).map(e=>{let t=o=>Vo.createElement(fl,{...o,variant:e});return t.displayName=`Button.${e}`,[e,t]})),Zd=Object.assign(fl,Qd);export{ro as Box,Zd as Button,Ye as CheckBox,nt as FormLabel,Ro as FormTextField,Kd as FrigadeBanner,br as FrigadeChecklist,qe as FrigadeDefaultAppearance,jd as FrigadeEmbeddedTip,Li as FrigadeForm,Td as FrigadeGuide,Sd as FrigadeHeroChecklist,Xd as FrigadeNPSSurvey,bd as FrigadeProgressBadge,Ep as FrigadeProvider,Hd as FrigadeSupportWidget,Md as FrigadeTour,It as ProgressRing,Br as Text,mr as tokens,Pe as useFlowOpens,Gt as useFlowResponses,Z as useFlows,pr as useOrganization,Kt as useUser,ve as useUserFlowStates};
1652
1652
  //# sourceMappingURL=index.mjs.map