@frigade/react 1.35.34 → 1.35.36

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 ed,useEffect as zo,useState as ze}from"react";import{ThemeProvider as td}from"styled-components";import St,{useContext as Ep,useEffect as po,useState as Mo}from"react";import{useCallback as ht,useContext as oa,useEffect as ra}from"react";import Jo,{useMemo as qr}from"react";var Kr="1.35.34 ";var Ue="NOT_STARTED_STEP",q="COMPLETED_FLOW",yo="ABORTED_FLOW",xt="STARTED_FLOW",Ne="NOT_STARTED_FLOW",We="COMPLETED_STEP",So="STARTED_STEP";function je(){let{publicApiKey:e,userId:t,apiUrl:o}=Jo.useContext(G);return{config:qr(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":Kr,"X-Frigade-SDK-Platform":"React"}}),[e,t]),apiUrl:qr(()=>`${o}/v1/public/`,[o])}}var Vl="frigade-last-call-at-",Gl="frigade-last-call-data-";function Nt(){let{shouldGracefullyDegrade:e,readonly:t}=Jo.useContext(G);return async(o,i)=>{if(t&&(i.method==="POST"||i.method==="PUT"||i.method==="DELETE"))return It();if(e)return console.log(`Skipping ${o} call to Frigade due to error`),It();let r=Vl+o,n=Gl+o;if(window&&window.localStorage&&i&&i.body&&i.method==="POST"){let p=window.localStorage.getItem(r),c=window.localStorage.getItem(n);if(p&&c&&c==i.body){let l=new Date(p);if(new Date().getTime()-l.getTime()<1e3)return It()}window.localStorage.setItem(r,new Date().toISOString()),window.localStorage.setItem(n,i.body)}let s;try{s=await fetch(o,i)}catch(p){return It(p)}return s?s.ok?s:It(s.statusText):It()}}function It(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function Ot(){let{publicApiKey:e,shouldGracefullyDegrade:t}=Jo.useContext(G);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 Rl,useState as Yr}from"react";import{useContext as ql,useEffect as Yl,useState as Xl}from"react";import Jl from"swr";import{useContext as Kl}from"react";function Fe(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o,setCompletedFlowsToKeepOpenDuringSession:i,completedFlowsToKeepOpenDuringSession:r}=Kl(G);function n(d,x=!1){return e[d]??x}function s(d,x){t(k=>({...k,[d]:x}))}function p(d){t(x=>{let{[d]:k,...S}=x;return{...S}})}function c(d){r.includes(d)||i(x=>[...x,d])}function l(d){return r.includes(d)}function g(d){return Object.entries(e).some(([x,k])=>k&&x!=d)||o}return{getOpenFlowState:n,setOpenFlowState:s,resetOpenFlowState:p,hasOpenModals:g,setKeepCompletedFlowOpenDuringSession:c,shouldKeepCompletedFlowOpenDuringSession:l}}import Ql from"swr/immutable";import Zt from"core-js-pure/actual/structured-clone";function Qo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fe(...e){let t=e.shift(),o=e.length===1?e[0]:fe(...e);if(!Qo(t)||!Qo(o))throw new Error("deepmerge can only merge Objects");let i=Zt(t);return Object.entries(o).forEach(([r,n])=>{Qo(n)?i[r]!==void 0?Object.assign(i,{[r]:fe(i[r],Zt(n))}):Object.assign(i,{[r]:Zt(n)}):Array.isArray(n)?i[r]!==void 0?Object.assign(i,{[r]:[...i[r],...Zt(n)]}):Object.assign(i,{[r]:Zt(n)}):Object.assign(i,{[r]:n})}),i}var Zl="unknown";function Oe(){let{config:e,apiUrl:t}=je(),{publicApiKey:o,userId:i,organizationId:r,flows:n,setShouldGracefullyDegrade:s,readonly:p}=ql(G),{resetOpenFlowState:c}=Fe(),[l,g]=Xl(!1),d={data:n.map(f=>({flowId:f.id,flowState:q,lastStepId:null,userId:i,foreignUserId:i,stepStates:{},shouldTrigger:!1}))},x=f=>fetch(f,e).then(F=>{if(F.ok)return F.json();throw new Error("Failed to fetch user flow states")}).catch(F=>(console.log(`Error fetching ${f}: ${F}. Will gracefully degrade and hide Frigade`),s(!0),d)),k=o&&n&&i?`${t}userFlowStates?foreignUserId=${encodeURIComponent(i)}${r?`&foreignUserGroupId=${encodeURIComponent(r)}`:""}`:null,{data:S,isLoading:b,mutate:u,error:v}=p?Ql(k,x):Jl(k,x,{revalidateOnFocus:!0,revalidateIfStale:!0,keepPreviousData:!0,revalidateOnMount:!0,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>d,onLoadingSlow:()=>d}),T=S==null?void 0:S.data;Yl(()=>{!l&&!b&&T&&g(!0)},[T,l,b]);async function C(f){if(T&&!p){let F=T.find(I=>I.flowId===f);F&&F.flowState!==q&&(F.flowState=q),await u(Promise.resolve(fe(S,{data:T})),{optimisticData:fe(S,{data:T}),revalidate:!1,rollbackOnError:!1})}}async function N(f,F,I){if(T){let O=T.find(E=>E.flowId===f);O&&(O.stepStates[F]=I,O.flowState=xt),await u(Promise.resolve(fe(S,{data:T})),{optimisticData:fe(S,{data:T}),revalidate:!1,rollbackOnError:!1})}}async function A(f,F,I){if(T){let O=T.find(E=>E.flowId===f);O&&(O.lastStepId=F,O.stepStates[F]=I,O.flowState=xt),await u(fe(S,{data:T}),{optimisticData:fe(S,{data:T}),revalidate:!1,rollbackOnError:!1})}}async function h(f){if(T){let F=T.find(I=>I.flowId===f);F&&F.flowState!==Ne&&(F.flowState=Ne,F.lastStepId=Zl,Object.keys(F.stepStates).forEach(I=>{F.stepStates[I].actionType=Ue,F.stepStates[I].createdAt=new Date().toISOString()}),await u(fe(S,{data:T}),{optimisticData:fe(S,{data:T}),revalidate:!1,rollbackOnError:!1}),c(f))}}async function w(f,F){if(T){let I=T.find(O=>O.flowId===f);I&&I.stepStates[F]!==Ue&&(I.stepStates[F]=Ue),await u(fe(S,{data:T}),{optimisticData:fe(S,{data:T}),revalidate:!1,rollbackOnError:!1})}}return{userFlowStatesData:T,isLoadingUserFlowStateData:!l,mutateUserFlowState:u,optimisticallyMarkFlowCompleted:C,optimisticallyMarkFlowNotStarted:h,optimisticallyMarkStepCompleted:N,optimisticallyMarkStepNotStarted:w,optimisticallyMarkStepStarted:A,error:v}}function Rt(){let{config:e,apiUrl:t}=je(),{userFlowStatesData:o,mutateUserFlowState:i}=Oe(),{failedFlowResponses:r,setFailedFlowResponses:n,flowResponses:s,setFlowResponses:p}=Rl(G),[c,l]=Yr(new Set),[g,d]=Yr(new Set),x=Nt();function k(u){let v=JSON.stringify(u);if(c.has(v))return null;c.add(v),l(c),g.add(u),d(g);let T=s==null?void 0:s.find(C=>C.flowSlug===u.flowSlug&&C.stepId===u.stepId&&C.actionType===u.actionType&&C.createdAt===u.createdAt);return x(`${t}flowResponses`,{...e,method:"POST",body:v}).then(C=>{C.status!==200&&C.status!==201?(console.log("Failed to send flow response for step "+u.stepId+". Will retry again later."),n([...r,u])):T||p(N=>[...N??[],u])})}async function S(u){u.foreignUserId&&(u.actionType===xt||u.actionType===Ne?await k(u):u.actionType===q?await k(u):u.actionType===So?await k(u):u.actionType===We?await k(u):u.actionType===yo?await k(u):u.actionType===Ue&&await k(u))}function b(){let u=[];return o==null||o.forEach(v=>{if(v&&v.stepStates&&Object.keys(v.stepStates).length!==0)for(let T in v.stepStates){let C=v.stepStates[T];u.push({foreignUserId:v.foreignUserId,flowSlug:v.flowId,stepId:C.stepId,actionType:C.actionType,data:{},createdAt:new Date(C.createdAt),blocked:C.blocked,hidden:C.hidden})}}),[...u,...s]}return{addResponse:S,setFlowResponses:p,getFlowResponses:b}}import ia from"swr";var ea=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,Xr=e=>{let t=ea.exec(e);if(t===null)return null;let o=null;return t.forEach((i,r)=>{let n=ta(i,"'","");n.startsWith("flow_")&&(o=n)}),o},ta=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function Zo(e){try{return JSON.parse(e)}catch(t){return console.error("Failed to parse Frigade config.yml to JSON",t),null}}var Ro=(l=>(l.CHECKLIST="CHECKLIST",l.FORM="FORM",l.TOUR="TOUR",l.SUPPORT="SUPPORT",l.CUSTOM="CUSTOM",l.BANNER="BANNER",l.EMBEDDED_TIP="EMBEDDED_TIP",l.NPS_SURVEY="NPS_SURVEY",l.ANNOUNCEMENT="ANNOUNCEMENT",l))(Ro||{});function J(){let{config:e,apiUrl:t}=je(),{flows:o,setFlows:i,userId:r,publicApiKey:n,customVariables:s,setCustomVariables:p,hasActiveFullPageFlow:c,setHasActiveFullPageFlow:l,setFlowResponses:g,setShouldGracefullyDegrade:d,readonly:x}=oa(G),k={data:[]},{verifySDKInitiated:S}=Ot(),{addResponse:b,getFlowResponses:u}=Rt(),v=m=>fetch(m,e).then(y=>y.ok?y.json():(console.log(`Error fetching ${m} (${y.status}): ${y.statusText}. .Will gracefully degrade and hide Frigade`),d(!0),k)).catch(y=>(console.log(`Error fetching ${m}: ${y}. Will gracefully degrade and hide Frigade`),d(!0),k)),{mutateUserFlowState:T,userFlowStatesData:C,isLoadingUserFlowStateData:N,optimisticallyMarkFlowCompleted:A,optimisticallyMarkFlowNotStarted:h,optimisticallyMarkStepCompleted:w,optimisticallyMarkStepNotStarted:f,optimisticallyMarkStepStarted:F}=Oe(),{data:I,error:O,isLoading:E}=ia(n?`${t}flows${x?"?readonly=true":""}`:null,v,{keepPreviousData:!0});ra(()=>{if(O){console.error(O);return}I&&I.data&&i(I.data)},[I,O]);function D(m){if(E)return null;let y=o.find(B=>B.slug===m);return!y&&o.length>0&&!N&&!E?(console.log(`Flow with id ${m} not found`),null):(y==null?void 0:y.active)===!1&&!x?null:y}function $(m){var z;if(!D(m))return[];let y=D(m).data;return y?(y=V(y),(((z=Zo(y))==null?void 0:z.data)??[]).map(ue=>{let Qt=H(ue);return{handleSecondaryButtonClick:()=>{ue.skippable===!0&&te(m,ue.id,{skipped:!0})},...ue,complete:ne(m,ue.id)===We||Qt>=1,blocked:Te(m,ue.id),hidden:L(m,ue.id),handlePrimaryButtonClick:()=>{(!ue.completionCriteria&&(ue.autoMarkCompleted||ue.autoMarkCompleted===void 0)||ue.completionCriteria&&ue.autoMarkCompleted===!0)&&te(m,ue.id)},progress:Qt}}).filter(ue=>ue.hidden!==!0)):[]}function V(m){return m.replaceAll(/\${(.*?)}/g,(y,B)=>s[B]===void 0?"":String(s[B]).replace(/[\u00A0-\u9999<>\&]/g,function(z){return"&#"+z.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 j(m){if(!D(m))return[];let y=D(m).data;return y?(y=V(y),JSON.parse(y)??{}):[]}function Y(m,y){p(B=>({...B,[m]:y}))}function de(m){!N&&!E&&m&&JSON.stringify(s)!=JSON.stringify({...s,...m})&&Object.keys(m).forEach(y=>{Y(y,m[y])})}let he=ht(async(m,y,B)=>{if(!S())return;let z={foreignUserId:r,flowSlug:m,stepId:y,actionType:So,data:B??{},createdAt:new Date,blocked:!1,hidden:!1};re(z)&&(await F(m,y,z),b(z))},[r,C]),K=ht(async(m,y,B)=>{if(!S())return;let z={foreignUserId:r,flowSlug:m,stepId:y,actionType:Ue,data:B??{},createdAt:new Date,blocked:!1,hidden:!1};re(z)&&(await f(m,y),b(z))},[r,C]),te=ht(async(m,y,B)=>{if(!S())return;let z={foreignUserId:r,flowSlug:m,stepId:y,actionType:We,data:B??{},createdAt:new Date,blocked:!1,hidden:!1};re(z)&&(await w(m,y,z),b(z))},[r,C]),Q=ht(async(m,y)=>{if(!S()||se(m)===Ne)return;let B={foreignUserId:r,flowSlug:m,stepId:"unknown",actionType:Ne,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};await h(m),re(B)&&b(B)},[r,C]),Se=ht(async(m,y)=>{if(!S())return;let B={foreignUserId:r,flowSlug:m,stepId:"unknown",actionType:xt,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};re(B)&&b(B)},[r,C]),me=ht(async(m,y)=>{if(!S())return;let B={foreignUserId:r,flowSlug:m,stepId:"unknown",actionType:q,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};re(B)&&(await A(m),b(B))},[r,C]),Ee=ht(async(m,y)=>{if(!S())return;let B={foreignUserId:r,flowSlug:m,stepId:"unknown",actionType:yo,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};re(B)&&(await A(m),b(B))},[r,C]);function re(m){var y;if(!C&&m.actionType===Ue)return!1;if(C){let B=C.find(z=>z.flowId===m.flowSlug);if(m.actionType===Ue&&(!(B!=null&&B.stepStates[m.stepId])||B.stepStates[m.stepId].actionType===Ue)||B&&((y=B.stepStates[m.stepId])==null?void 0:y.actionType)===m.actionType||B&&B.flowState===q&&m.actionType===q)return!1}return!0}function ne(m,y){let B=U(m,y);return N?null:B?B.actionType:Ue}function Te(m,y){let B=U(m,y);return B?B.blocked:!1}function L(m,y){let B=U(m,y);return B?B.hidden:!1}function U(m,y){if(N)return null;let B=C==null?void 0:C.find(z=>z.flowId===m);return!B||!B.stepStates[y]?null:B.stepStates[y]??null}function _(m){var B;if(N||!C)return null;if(se(m)===Ne)return $(m)[0]??null;let y=(B=C.find(z=>z.flowId===m))==null?void 0:B.lastStepId;return y?$(m).find(z=>z.id===y):null}function X(m){let y=_(m);if(!y)return 0;let B=$(m).findIndex(z=>z.id===y.id)??0;return ne(m,y.id)===We&&B<$(m).length-1?B+1:B}function H(m){if(!m.completionCriteria)return;let y=Xr(m.completionCriteria);if(y===null)return;let B=Ae(y),z=Ie(y);return z===0?void 0:B/z}function se(m){let y=C==null?void 0:C.find(B=>B.flowId===m);return y?y.flowState:null}function Ae(m){let y=$(m);return y.length===0?0:y.filter(z=>ne(m,z.id)===We).length}function Ie(m){return $(m).length}function Et(m){let y=o.find(B=>B.slug===m);return y?Zo(y.data):null}function ft(m){if(x)return!1;if(N)return!0;if(m!=null&&m.targetingLogic&&C){let y=C.find(B=>B.flowId===m.slug);if(y)return y.shouldTrigger===!1}return!!(m!=null&&m.targetingLogic&&r&&r.startsWith("guest_"))}function At(m){return!ft(D(m))}function gt(){r&&T()}return{getFlow:D,getFlowData:Et,isLoading:N||E,getStepStatus:ne,getFlowSteps:$,getCurrentStepIndex:X,markStepStarted:he,markStepCompleted:te,markFlowNotStarted:Q,markFlowStarted:Se,markFlowCompleted:me,markFlowAborted:Ee,markStepNotStarted:K,getFlowStatus:se,getNumberOfStepsCompleted:Ae,getNumberOfSteps:Ie,targetingLogicShouldHideFlow:ft,setCustomVariable:Y,updateCustomVariables:de,customVariables:s,getStepOptionalProgress:H,getFlowMetadata:j,isStepBlocked:Te,isStepHidden:L,hasActiveFullPageFlow:c,setHasActiveFullPageFlow:l,isFlowAvailableToUser:At,refresh:gt}}import{useCallback as er,useContext as na,useEffect as sa}from"react";var Lt="guest_";function eo(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:i,shouldGracefullyDegrade:r}=na(G),{config:n,apiUrl:s}=je(),{mutateUserFlowState:p}=Oe(),c=Nt(),{verifySDKInitiated:l}=Ot();function g(S){return`frigade-user-registered-${S}`}sa(()=>{if(e&&!t){if(e.startsWith(Lt))return;let S=g(e);localStorage.getItem(S)||(c(`${s}users`,{...n,method:"POST",body:JSON.stringify({foreignId:e})}),localStorage.setItem(S,"true"))}},[e,r,t]);let d=er(async S=>{if(!l())return;let b={foreignId:e,properties:S};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(b)}),i(u=>({...u,...S})),p()},[e,n,r,p]),x=er(async(S,b)=>{if(!l())return;let v={foreignId:e,events:[{event:S,properties:b}]};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(v)}),p()},[e,n,p]),k=er(async(S,b)=>{if(l())if(b){let u=g(S);localStorage.setItem(u,"true"),o(S);let v={foreignId:S,properties:b};await c(`${s}users`,{...n,method:"POST",body:JSON.stringify(v)}),i(T=>({...T,...b})),p()}else o(S)},[n,r,p]);return{userId:e,setUserId:o,setUserIdWithProperties:k,addPropertiesToUser:d,trackEventForUser:x}}import{v4 as Ap}from"uuid";import qe,{useEffect as br,useState as Zi}from"react";import _e,{useEffect as ir,useState as ga}from"react";import Fo from"styled-components";import la from"react";import aa from"styled-components";var Jr="fr-",to="cfr-";function a(e,t){let o=`${Jr}${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+" "+to+e}return o}function P(e){if(!e.className||e.className.indexOf(to)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(Jr)?"":`:not(${o.map(i=>`.${i}`).join(", ")})`}function bo(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function ve(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${bo(t)}: ${e.styleOverrides[t]};`).join(" "):""}function Ce(...e){return e.filter(Boolean).join(" ")}function oo(e){return e.charAt(0).toUpperCase()+e.slice(1)}var pa=aa.div`
2
+ var ia=Object.defineProperty,na=Object.defineProperties;var sa=Object.getOwnPropertyDescriptors;var ko=Object.getOwnPropertySymbols;var ri=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable;var oi=(e,t,o)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,T=(e,t)=>{for(var o in t||(t={}))ri.call(t,o)&&oi(e,o,t[o]);if(ko)for(var o of ko(t))ii.call(t,o)&&oi(e,o,t[o]);return e},H=(e,t)=>na(e,sa(t));var ni=e=>typeof e=="symbol"?e:e+"",Ie=(e,t)=>{var o={};for(var n in e)ri.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&ko)for(var n of ko(e))t.indexOf(n)<0&&ii.call(e,n)&&(o[n]=e[n]);return o};var $=(e,t,o)=>new Promise((n,i)=>{var r=d=>{try{p(o.next(d))}catch(s){i(s)}},l=d=>{try{p(o.throw(d))}catch(s){i(s)}},p=d=>d.done?n(d.value):Promise.resolve(d.value).then(r,l);p((o=o.apply(e,t)).next())});import vt,{createContext as hd,useEffect as Ko,useState as je}from"react";import{ThemeProvider as Cd}from"styled-components";import Pt,{useContext as Kp,useEffect as xo,useState as Vo}from"react";import{useCallback as Tt,useContext as ya,useEffect as Sa}from"react";import rr,{useMemo as li}from"react";var si="1.35.36 ";var He="NOT_STARTED_STEP",Q="COMPLETED_FLOW",Po="ABORTED_FLOW",wt="STARTED_FLOW",$e="NOT_STARTED_FLOW",Ge="COMPLETED_STEP",vo="STARTED_STEP";function Xe(){let{publicApiKey:e,userId:t,apiUrl:o}=rr.useContext(X);return{config:li(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":si,"X-Frigade-SDK-Platform":"React"}}),[e,t]),apiUrl:li(()=>`${o}/v1/public/`,[o])}}var la="frigade-last-call-at-",aa="frigade-last-call-data-";function Ut(){let{shouldGracefullyDegrade:e,readonly:t}=rr.useContext(X);return(o,n)=>$(this,null,function*(){if(t&&(n.method==="POST"||n.method==="PUT"||n.method==="DELETE"))return Mt();if(e)return console.log(`Skipping ${o} call to Frigade due to error`),Mt();let i=la+o,r=aa+o;if(window&&window.localStorage&&n&&n.body&&n.method==="POST"){let p=window.localStorage.getItem(i),d=window.localStorage.getItem(r);if(p&&d&&d==n.body){let s=new Date(p);if(new Date().getTime()-s.getTime()<1e3)return Mt()}window.localStorage.setItem(i,new Date().toISOString()),window.localStorage.setItem(r,n.body)}let l;try{l=yield fetch(o,n)}catch(p){return Mt(p)}return l?l.ok?l:Mt(l.statusText):Mt()})}function Mt(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function Wt(){let{publicApiKey:e,shouldGracefullyDegrade:t}=rr.useContext(X);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 xa,useState as ai}from"react";import{useContext as da,useEffect as ca,useState as ma}from"react";import ua from"swr";import{useContext as pa}from"react";function ve(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o,setCompletedFlowsToKeepOpenDuringSession:n,completedFlowsToKeepOpenDuringSession:i}=pa(X);function r(c,x=!1){var S;return(S=e[c])!=null?S:x}function l(c,x){t(S=>H(T({},S),{[c]:x}))}function p(c){t(x=>{let b=x,{[c]:S}=b,F=Ie(b,[ni(c)]);return T({},F)})}function d(c){i.includes(c)||n(x=>[...x,c])}function s(c){return i.includes(c)}function m(c){return Object.entries(e).some(([x,S])=>S&&x!=c)||o}return{getOpenFlowState:r,setOpenFlowState:l,resetOpenFlowState:p,hasOpenModals:m,setKeepCompletedFlowOpenDuringSession:d,shouldKeepCompletedFlowOpenDuringSession:s}}import fa from"swr/immutable";import io from"core-js-pure/actual/structured-clone";function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ge(...e){let t=e.shift(),o=e.length===1?e[0]:ge(...e);if(!ir(t)||!ir(o))throw new Error("deepmerge can only merge Objects");let n=io(t);return Object.entries(o).forEach(([i,r])=>{ir(r)?n[i]!==void 0?Object.assign(n,{[i]:ge(n[i],io(r))}):Object.assign(n,{[i]:io(r)}):Array.isArray(r)?n[i]!==void 0?Object.assign(n,{[i]:[...n[i],...io(r)]}):Object.assign(n,{[i]:io(r)}):Object.assign(n,{[i]:r})}),n}var ga="unknown";function Me(){let{config:e,apiUrl:t}=Xe(),{publicApiKey:o,userId:n,organizationId:i,flows:r,setShouldGracefullyDegrade:l,readonly:p}=da(X),{resetOpenFlowState:d}=ve(),[s,m]=ma(!1),c={data:r.map(f=>({flowId:f.id,flowState:Q,lastStepId:null,userId:n,foreignUserId:n,stepStates:{},shouldTrigger:!1}))},x=f=>fetch(f,e).then(P=>{if(P.ok)return P.json();throw new Error("Failed to fetch user flow states")}).catch(P=>(console.log(`Error fetching ${f}: ${P}. Will gracefully degrade and hide Frigade`),l(!0),c)),S=o&&r&&n?`${t}userFlowStates?foreignUserId=${n}${i?`&foreignUserGroupId=${i}`:""}`:null,{data:F,isLoading:b,mutate:g,error:B}=p?fa(S,x):ua(S,x,{revalidateOnFocus:!0,revalidateIfStale:!0,keepPreviousData:!0,revalidateOnMount:!0,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>c,onLoadingSlow:()=>c}),y=F==null?void 0:F.data;ca(()=>{!s&&!b&&y&&m(!0)},[y,s,b]);function E(f){return $(this,null,function*(){if(y&&!p){let P=y.find(N=>N.flowId===f);P&&P.flowState!==Q&&(P.flowState=Q),yield g(Promise.resolve(ge(F,{data:y})),{optimisticData:ge(F,{data:y}),revalidate:!1,rollbackOnError:!1})}})}function A(f,P,N){return $(this,null,function*(){if(y){let L=y.find(O=>O.flowId===f);L&&(L.stepStates[P]=N,L.flowState=wt),yield g(Promise.resolve(ge(F,{data:y})),{optimisticData:ge(F,{data:y}),revalidate:!1,rollbackOnError:!1})}})}function I(f,P,N){return $(this,null,function*(){if(y){let L=y.find(O=>O.flowId===f);L&&(L.lastStepId=P,L.stepStates[P]=N,L.flowState=wt),yield g(ge(F,{data:y}),{optimisticData:ge(F,{data:y}),revalidate:!1,rollbackOnError:!1})}})}function h(f){return $(this,null,function*(){if(y){let P=y.find(N=>N.flowId===f);P&&P.flowState!==$e&&(P.flowState=$e,P.lastStepId=ga,Object.keys(P.stepStates).forEach(N=>{P.stepStates[N].actionType=He,P.stepStates[N].createdAt=new Date().toISOString()}),yield g(ge(F,{data:y}),{optimisticData:ge(F,{data:y}),revalidate:!1,rollbackOnError:!1}),d(f))}})}function w(f,P){return $(this,null,function*(){if(y){let N=y.find(L=>L.flowId===f);N&&N.stepStates[P]!==He&&(N.stepStates[P]=He),yield g(ge(F,{data:y}),{optimisticData:ge(F,{data:y}),revalidate:!1,rollbackOnError:!1})}})}return{userFlowStatesData:y,isLoadingUserFlowStateData:!s,mutateUserFlowState:g,optimisticallyMarkFlowCompleted:E,optimisticallyMarkFlowNotStarted:h,optimisticallyMarkStepCompleted:A,optimisticallyMarkStepNotStarted:w,optimisticallyMarkStepStarted:I,error:B}}function no(){let{config:e,apiUrl:t}=Xe(),{userFlowStatesData:o,mutateUserFlowState:n}=Me(),{failedFlowResponses:i,setFailedFlowResponses:r,flowResponses:l,setFlowResponses:p}=xa(X),[d,s]=ai(new Set),[m,c]=ai(new Set),x=Ut();function S(g){let B=JSON.stringify(g);if(d.has(B))return null;d.add(B),s(d),m.add(g),c(m);let y=l==null?void 0:l.find(E=>E.flowSlug===g.flowSlug&&E.stepId===g.stepId&&E.actionType===g.actionType&&E.createdAt===g.createdAt);return x(`${t}flowResponses`,H(T({},e),{method:"POST",body:B})).then(E=>{E.status!==200&&E.status!==201?(console.log("Failed to send flow response for step "+g.stepId+". Will retry again later."),r([...i,g])):y||p(A=>[...A!=null?A:[],g])})}function F(g){return $(this,null,function*(){g.foreignUserId&&(g.actionType===wt||g.actionType===$e?yield S(g):g.actionType===Q?yield S(g):g.actionType===vo?yield S(g):g.actionType===Ge?yield S(g):g.actionType===Po?yield S(g):g.actionType===He&&(yield S(g)))})}function b(){let g=[];return o==null||o.forEach(B=>{if(B&&B.stepStates&&Object.keys(B.stepStates).length!==0)for(let y in B.stepStates){let E=B.stepStates[y];g.push({foreignUserId:B.foreignUserId,flowSlug:B.flowId,stepId:E.stepId,actionType:E.actionType,data:{},createdAt:new Date(E.createdAt),blocked:E.blocked,hidden:E.hidden})}}),[...g,...l]}return{addResponse:F,setFlowResponses:p,getFlowResponses:b}}import ba from"swr";var ha=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,pi=e=>{let t=ha.exec(e);if(t===null)return null;let o=null;return t.forEach((n,i)=>{let r=Ca(n,"'","");r.startsWith("flow_")&&(o=r)}),o},Ca=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function nr(e){try{return JSON.parse(e)}catch(t){return console.error("Failed to parse Frigade config.yml to JSON",t),null}}var sr=(s=>(s.CHECKLIST="CHECKLIST",s.FORM="FORM",s.TOUR="TOUR",s.SUPPORT="SUPPORT",s.CUSTOM="CUSTOM",s.BANNER="BANNER",s.EMBEDDED_TIP="EMBEDDED_TIP",s.NPS_SURVEY="NPS_SURVEY",s.ANNOUNCEMENT="ANNOUNCEMENT",s))(sr||{});function ee(){let{config:e,apiUrl:t}=Xe(),{flows:o,setFlows:n,userId:i,organizationId:r,publicApiKey:l,customVariables:p,setCustomVariables:d,hasActiveFullPageFlow:s,setHasActiveFullPageFlow:m,setFlowResponses:c,setShouldGracefullyDegrade:x,readonly:S}=ya(X),F={data:[]},{verifySDKInitiated:b}=Wt(),{addResponse:g,getFlowResponses:B}=no(),y=C=>fetch(C,e).then(u=>u.ok?u.json():(console.log(`Error fetching ${C} (${u.status}): ${u.statusText}. Will gracefully degrade and hide Frigade`),x(!0),F)).catch(u=>(console.log(`Error fetching ${C}: ${u}. Will gracefully degrade and hide Frigade`),x(!0),F)),{mutateUserFlowState:E,userFlowStatesData:A,isLoadingUserFlowStateData:I,optimisticallyMarkFlowCompleted:h,optimisticallyMarkFlowNotStarted:w,optimisticallyMarkStepCompleted:f,optimisticallyMarkStepNotStarted:P,optimisticallyMarkStepStarted:N}=Me(),{data:L,error:O,isLoading:U}=ba(l?`${t}flows${S?"?readonly=true":""}`:null,y,{keepPreviousData:!0});Sa(()=>{if(O){console.error(O);return}L&&L.data&&n(L.data)},[L,O]);function W(C){if(U)return null;let u=o.find(k=>k.slug===C);return!u&&o.length>0&&!I&&!U?(console.log(`Flow with id ${C} not found`),null):(u==null?void 0:u.active)===!1&&!S?null:u}function V(C){var z,ue;if(!W(C))return[];let u=W(C).data;return u?(u=le(u),((ue=(z=nr(u))==null?void 0:z.data)!=null?ue:[]).map(fe=>{let ro=J(fe);return H(T({handleSecondaryButtonClick:()=>{fe.skippable===!0&&G(C,fe.id,{skipped:!0})}},fe),{complete:ce(C,fe.id)===Ge||ro>=1,blocked:Ae(C,fe.id),hidden:be(C,fe.id),handlePrimaryButtonClick:()=>{(!fe.completionCriteria&&(fe.autoMarkCompleted||fe.autoMarkCompleted===void 0)||fe.completionCriteria&&fe.autoMarkCompleted===!0)&&G(C,fe.id)},progress:ro})}).filter(fe=>fe.hidden!==!0)):[]}function le(C){return C.replaceAll(/\${(.*?)}/g,(u,k)=>p[k]===void 0?"":String(p[k]).replace(/[\u00A0-\u9999<>\&]/g,function(z){return"&#"+z.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(C){var k;if(!W(C))return[];let u=W(C).data;return u?(u=le(u),(k=JSON.parse(u))!=null?k:{}):[]}function q(C,u){d(k=>H(T({},k),{[C]:u}))}function he(C){!I&&!U&&C&&JSON.stringify(p)!=JSON.stringify(T(T({},p),C))&&Object.keys(C).forEach(u=>{q(u,C[u])})}let Pe=Tt((C,u,k)=>$(this,null,function*(){if(!b())return;let z={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:u,actionType:vo,data:k!=null?k:{},createdAt:new Date,blocked:!1,hidden:!1};R(z)&&(yield N(C,u,z),g(z))}),[i,r,A]),Se=Tt((C,u,k)=>$(this,null,function*(){if(!b())return;let z={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:u,actionType:He,data:k!=null?k:{},createdAt:new Date,blocked:!1,hidden:!1};R(z)&&(yield P(C,u),g(z))}),[i,r,A]),G=Tt((C,u,k)=>$(this,null,function*(){if(!b())return;let z={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:u,actionType:Ge,data:k!=null?k:{},createdAt:new Date,blocked:!1,hidden:!1};R(z)&&(yield f(C,u,z),g(z))}),[i,r,A]),Y=Tt((C,u)=>$(this,null,function*(){if(!b()||Ce(C)===$e)return;let k={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:"unknown",actionType:$e,data:u!=null?u:{},createdAt:new Date,blocked:!1,hidden:!1};yield w(C),R(k)&&g(k)}),[i,r,A]),te=Tt((C,u)=>$(this,null,function*(){if(!b())return;let k={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:"unknown",actionType:wt,data:u!=null?u:{},createdAt:new Date,blocked:!1,hidden:!1};R(k)&&g(k)}),[i,r,A]),Ve=Tt((C,u)=>$(this,null,function*(){if(!b())return;let k={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:"unknown",actionType:Q,data:u!=null?u:{},createdAt:new Date,blocked:!1,hidden:!1};R(k)&&(yield h(C),g(k))}),[i,r,A]),Le=Tt((C,u)=>$(this,null,function*(){if(!b())return;let k={foreignUserId:i,foreignUserGroupId:r!=null?r:null,flowSlug:C,stepId:"unknown",actionType:Po,data:u!=null?u:{},createdAt:new Date,blocked:!1,hidden:!1};R(k)&&(yield h(C),g(k))}),[i,r,A]);function R(C){var u;if(!A&&C.actionType===He)return!1;if(A){let k=A.find(z=>z.flowId===C.flowSlug);if(C.actionType===He&&(!(k!=null&&k.stepStates[C.stepId])||k.stepStates[C.stepId].actionType===He)||k&&((u=k.stepStates[C.stepId])==null?void 0:u.actionType)===C.actionType||k&&k.flowState===Q&&C.actionType===Q)return!1}return!0}function ce(C,u){let k=M(C,u);return I?null:k?k.actionType:He}function Ae(C,u){let k=M(C,u);return k?k.blocked:!1}function be(C,u){let k=M(C,u);return k?k.hidden:!1}function M(C,u){var z;if(I)return null;let k=A==null?void 0:A.find(ue=>ue.flowId===C);return!k||!k.stepStates[u]?null:(z=k.stepStates[u])!=null?z:null}function D(C){var k,z;if(I||!A)return null;if(Ce(C)===$e)return(k=V(C)[0])!=null?k:null;let u=(z=A.find(ue=>ue.flowId===C))==null?void 0:z.lastStepId;return u?V(C).find(ue=>ue.id===u):null}function _(C){var z;let u=D(C);if(!u)return 0;let k=(z=V(C).findIndex(ue=>ue.id===u.id))!=null?z:0;return ce(C,u.id)===Ge&&k<V(C).length-1?k+1:k}function J(C){if(!C.completionCriteria)return;let u=pi(C.completionCriteria);if(u===null)return;let k=De(u),z=ot(u);return z===0?void 0:k/z}function Ce(C){let u=A==null?void 0:A.find(k=>k.flowId===C);return u?u.flowState:null}function De(C){let u=V(C);return u.length===0?0:u.filter(z=>ce(C,z.id)===Ge).length}function ot(C){return V(C).length}function Ye(C){let u=o.find(k=>k.slug===C);return u?nr(u.data):null}function bt(C){if(S)return!1;if(I)return!0;if(C!=null&&C.targetingLogic&&A){let u=A.find(k=>k.flowId===C.slug);if(u)return u.shouldTrigger===!1}return!!(C!=null&&C.targetingLogic&&i&&i.startsWith("guest_"))}function Dt(C){return!bt(W(C))}function $t(){i&&E()}return{getFlow:W,getFlowData:Ye,isLoading:I||U,getStepStatus:ce,getFlowSteps:V,getCurrentStepIndex:_,markStepStarted:Pe,markStepCompleted:G,markFlowNotStarted:Y,markFlowStarted:te,markFlowCompleted:Ve,markFlowAborted:Le,markStepNotStarted:Se,getFlowStatus:Ce,getNumberOfStepsCompleted:De,getNumberOfSteps:ot,targetingLogicShouldHideFlow:bt,setCustomVariable:q,updateCustomVariables:he,customVariables:p,getStepOptionalProgress:J,getFlowMetadata:Z,isStepBlocked:Ae,isStepHidden:be,hasActiveFullPageFlow:s,setHasActiveFullPageFlow:m,isFlowAvailableToUser:Dt,refresh:$t}}import{useCallback as lr,useContext as wa,useEffect as Ta}from"react";var zt="guest_";function so(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:n,shouldGracefullyDegrade:i}=wa(X),{config:r,apiUrl:l}=Xe(),{mutateUserFlowState:p}=Me(),d=Ut(),{verifySDKInitiated:s}=Wt();function m(F){return`frigade-user-registered-${F}`}Ta(()=>{if(e&&!t){if(e.startsWith(zt))return;let F=m(e);localStorage.getItem(F)||(d(`${l}users`,H(T({},r),{method:"POST",body:JSON.stringify({foreignId:e})})),localStorage.setItem(F,"true"))}},[e,i,t]);let c=lr(F=>$(this,null,function*(){if(!s())return;let b={foreignId:e,properties:F};yield d(`${l}users`,H(T({},r),{method:"POST",body:JSON.stringify(b)})),n(g=>T(T({},g),F)),p()}),[e,r,i,p]),x=lr((F,b)=>$(this,null,function*(){if(!s())return;let B={foreignId:e,events:[{event:F,properties:b}]};yield d(`${l}users`,H(T({},r),{method:"POST",body:JSON.stringify(B)})),p()}),[e,r,p]),S=lr((F,b)=>$(this,null,function*(){if(s())if(b){let g=m(F);localStorage.setItem(g,"true"),o(F);let B={foreignId:F,properties:b};yield d(`${l}users`,H(T({},r),{method:"POST",body:JSON.stringify(B)})),n(y=>T(T({},y),b)),p()}else o(F)}),[r,i,p]);return{userId:e,setUserId:o,setUserIdWithProperties:S,addPropertiesToUser:c,trackEventForUser:x}}import{v4 as qp}from"uuid";import Re,{useEffect as Br,useState as un}from"react";import Ke,{useEffect as cr,useState as Oa}from"react";import Io from"styled-components";import Fa from"react";import ka from"styled-components";var di="fr-",lo="cfr-";function a(e,t){let o=`${di}${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+" "+lo+e}return o}function v(e){if(!e.className||e.className.indexOf(lo)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(di)?"":`:not(${o.map(n=>`.${n}`).join(", ")})`}function Bo(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function Oe(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${Bo(t)}: ${e.styleOverrides[t]};`).join(" "):""}function we(...e){return e.filter(Boolean).join(" ")}function ao(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Pa=ka.div`
3
3
  display: flex;
4
4
  justify-content: center;
5
5
  position: fixed;
@@ -7,7 +7,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
7
7
  left: 0;
8
8
  bottom: 0;
9
9
  right: 0;
10
- ${e=>P(e)} {
10
+ ${e=>v(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 ed,useEffect as zo,useState as ze}from"react";import
23
23
  opacity: 1;
24
24
  }
25
25
  }
26
- `,Qr=({onClose:e,appearance:t})=>la.createElement(pa,{className:a("modalBackground",t),onClick:()=>e()});import tr from"react";import da from"styled-components";var ca=da.div`
26
+ `,ci=({onClose:e,appearance:t})=>Fa.createElement(Pa,{className:a("modalBackground",t),onClick:()=>e()});import ar from"react";import va from"styled-components";var Ba=va.div`
27
27
  :hover {
28
28
  opacity: 0.8;
29
29
  }
30
- `,ke=()=>tr.createElement(ca,null,tr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},tr.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5 15L15 5M5 5l10 10"})));import{Portal as xa}from"react-portal";import di from"react";import or from"react";function ma({style:e,className:t}){return or.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"54",height:"14",fill:"none",viewBox:"0 0 54 14",style:e,className:t},or.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"}),or.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 Zr=ma;import rr from"styled-components";import Je from"styled-components";var wo=Je.div`
31
- ${e=>P(e)} {
30
+ `,Be=()=>ar.createElement(Ba,null,ar.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},ar.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5 15L15 5M5 5l10 10"})));import{Portal as Na}from"react-portal";import Fi from"react";import pr from"react";function Ea({style:e,className:t}){return pr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"54",height:"14",fill:"none",viewBox:"0 0 54 14",style:e,className:t},pr.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"}),pr.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 mi=Ea;import dr from"styled-components";import rt from"styled-components";var Eo=rt.div`
31
+ ${e=>v(e)} {
32
32
  background: ${e=>e.appearance.theme.colorBackground};
33
33
  }
34
34
 
@@ -38,7 +38,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
38
38
  min-width: 300px;
39
39
  z-index: ${e=>e.zIndex};
40
40
  overflow: hidden;
41
- `,ua=`
41
+ `,Aa=`
42
42
  display: block;
43
43
  cursor: pointer;
44
44
  position: absolute;
@@ -51,58 +51,58 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
51
51
  box-sizing: border-box;
52
52
  :hover {
53
53
  opacity: 0.8;
54
- }`,fa=`
54
+ }`,Ia=`
55
55
  display: block;
56
56
  cursor: pointer;
57
57
  position: absolute;
58
58
  top: 12px;
59
59
  right: 12px;
60
- `,Rr=Je.div`
61
- ${e=>P(e)} {
62
- ${e=>e.hasImage?ua:fa};
60
+ `,ui=rt.div`
61
+ ${e=>v(e)} {
62
+ ${e=>e.hasImage?Aa:Ia};
63
63
  }
64
- `,ei=Je.img`
65
- ${e=>P(e)} {
64
+ `,fi=rt.img`
65
+ ${e=>v(e)} {
66
66
  display: block;
67
67
  width: 100%;
68
68
  height: auto;
69
69
  min-height: 200px;
70
70
  object-fit: cover;
71
71
  }
72
- `,ti=Je.div`
73
- ${e=>P(e)} {
72
+ `,gi=rt.div`
73
+ ${e=>v(e)} {
74
74
  display: block;
75
75
  width: 100%;
76
76
  height: auto;
77
77
  margin-top: ${e=>e.dismissible?"24px":"0px"};
78
78
  object-fit: cover;
79
79
  }
80
- `,oi=Je.div`
80
+ `,xi=rt.div`
81
81
  display: flex;
82
82
  flex-direction: row;
83
83
  justify-content: space-between;
84
84
  align-content: center;
85
- `,ri=Je.div`
85
+ `,hi=rt.div`
86
86
  padding: 22px 22px 12px;
87
- `,ii=Je.div`
87
+ `,Ci=rt.div`
88
88
  display: flex;
89
89
  flex: 1;
90
90
  flex-direction: column;
91
91
  justify-content: center;
92
- `,ni=Je.div`
92
+ `,yi=rt.div`
93
93
  display: flex;
94
94
  flex: 2;
95
95
  flex-shrink: 1;
96
96
  gap: 8px;
97
97
  height: 64px;
98
- ${e=>P(e)} {
98
+ ${e=>v(e)} {
99
99
  flex-direction: row;
100
100
  justify-content: ${e=>e.showStepCount?"flex-end":"flex-start"};
101
101
  align-content: center;
102
102
  align-items: center;
103
103
  }
104
- `,si=Je.p`
105
- ${e=>P(e)} {
104
+ `,Si=rt.p`
105
+ ${e=>v(e)} {
106
106
  font-style: normal;
107
107
  font-weight: 600;
108
108
  font-size: 15px;
@@ -110,7 +110,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
110
110
  color: #808080;
111
111
  }
112
112
  margin: 0;
113
- `;var li=rr.div`
113
+ `;var bi=dr.div`
114
114
  background-color: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
115
115
  position: absolute;
116
116
  bottom: -47px;
@@ -121,7 +121,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
121
121
  align-items: center;
122
122
  justify-content: center;
123
123
  border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
124
- `,ai=rr(wo)`
124
+ `,wi=dr(Eo)`
125
125
  background-color: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
126
126
  position: absolute;
127
127
  bottom: -60px;
@@ -134,7 +134,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
134
134
  border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
135
135
  padding: 0;
136
136
  z-index: ${e=>e.zIndex};
137
- `,pi=rr.div`
137
+ `,Ti=dr.div`
138
138
  display: flex;
139
139
  justify-content: center;
140
140
  align-items: center;
@@ -143,8 +143,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
143
143
  font-size: 12px;
144
144
  line-height: 18px;
145
145
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
146
- `;function To({appearance:e}){return di.createElement(pi,{className:a("poweredByFrigadeContainer",e),appearance:e},"Powered by \xA0",di.createElement(Zr,null))}var ha=Fo.div`
147
- ${e=>P(e)} {
146
+ `;function Ao({appearance:e}){return Fi.createElement(Ti,{className:a("poweredByFrigadeContainer",e),appearance:e},"Powered by \xA0",Fi.createElement(mi,null))}var La=Io.div`
147
+ ${e=>v(e)} {
148
148
  // Anything inside this block will be ignored if the user provides a custom class
149
149
  background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
150
150
  /* Mobile */
@@ -155,10 +155,10 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
155
155
  left: 50%;
156
156
  }
157
157
 
158
- width: ${e=>e.width??"1000px"};
158
+ width: ${e=>{var t;return(t=e.width)!=null?t:"1000px"}};
159
159
  z-index: 1500;
160
- border-radius: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius)??8}}px;
161
- ${e=>ve(e)}
160
+ border-radius: ${e=>{var t,o,n;return(n=(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius)!=null?n:8}}px;
161
+ ${e=>Oe(e)}
162
162
  }
163
163
 
164
164
  padding: 32px;
@@ -185,27 +185,27 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
185
185
  opacity: 1;
186
186
  }
187
187
  }
188
- `,Ca=Fo.div`
188
+ `,Da=Io.div`
189
189
  position: relative;
190
190
  flex: 0 1 auto;
191
- `,ya=Fo.div`
191
+ `,$a=Io.div`
192
192
  position: absolute;
193
193
  top: 16px;
194
194
  right: 16px;
195
195
  cursor: pointer;
196
196
  z-index: 1501;
197
- ${e=>P(e)} {
197
+ ${e=>v(e)} {
198
198
  // Anything inside this block will be ignored if the user provides a custom class
199
199
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
200
200
  }
201
- `,Sa=Fo.div`
201
+ `,Ma=Io.div`
202
202
  overflow: scroll;
203
203
  flex: 1 1;
204
204
  display: flex;
205
205
  ::-webkit-scrollbar {
206
206
  display: none;
207
207
  }
208
- `,Ve=({onClose:e,visible:t,headerContent:o=null,style:i=null,children:r,appearance:n,dismissible:s=!0,showFrigadeBranding:p=!1})=>{let[c,l]=ga("");return ir(()=>{let g=getComputedStyle(document.body).getPropertyValue("overflow");l(g)},[]),ir(()=>{let g=d=>{d.key==="Escape"&&e()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[e]),ir(()=>{let g=document.body.style;return t?g.setProperty("overflow","hidden"):g.setProperty("overflow",c),()=>{g.setProperty("overflow",c)}},[t]),t?_e.createElement(xa,null,_e.createElement(Qr,{appearance:n,onClose:()=>{s&&e()}}),_e.createElement(ha,{appearance:n,className:a("modalContainer",n),styleOverrides:i},s&&_e.createElement(ya,{className:a("modalClose",n),onClick:()=>e(),appearance:n},_e.createElement(ke,null)),o&&_e.createElement(Ca,null,o),_e.createElement(Sa,null,r),p&&_e.createElement(li,{appearance:n,className:a("poweredByFrigadeRibbon",n)},_e.createElement(To,{appearance:n})))):_e.createElement(_e.Fragment,null)};import lt,{useEffect as nr,useState as ba}from"react";import ko from"styled-components";import{Portal as wa}from"react-portal";function Ta(e){switch(e){case"top-left":return`
208
+ `,Je=({onClose:e,visible:t,headerContent:o=null,style:n=null,children:i,appearance:r,dismissible:l=!0,showFrigadeBranding:p=!1})=>{let[d,s]=Oa("");return cr(()=>{let m=getComputedStyle(document.body).getPropertyValue("overflow");s(m)},[]),cr(()=>{let m=c=>{c.key==="Escape"&&e()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e]),cr(()=>{let m=document.body.style;return t?m.setProperty("overflow","hidden"):m.setProperty("overflow",d),()=>{m.setProperty("overflow",d)}},[t]),t?Ke.createElement(Na,null,Ke.createElement(ci,{appearance:r,onClose:()=>{l&&e()}}),Ke.createElement(La,{appearance:r,className:a("modalContainer",r),styleOverrides:n},l&&Ke.createElement($a,{className:a("modalClose",r),onClick:()=>e(),appearance:r},Ke.createElement(Be,null)),o&&Ke.createElement(Da,null,o),Ke.createElement(Ma,null,i),p&&Ke.createElement(bi,{appearance:r,className:a("poweredByFrigadeRibbon",r)},Ke.createElement(Ao,{appearance:r})))):Ke.createElement(Ke.Fragment,null)};import ft,{useEffect as mr,useState as Ua}from"react";import Oo from"styled-components";import{Portal as Wa}from"react-portal";function za(e){switch(e){case"top-left":return`
209
209
  top: 0;
210
210
  left: 0;
211
211
  `;case"top-right":return`
@@ -214,8 +214,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
214
214
  `;case"bottom-left":return`
215
215
  bottom: 0;
216
216
  left: 0;
217
- `}return"right: 0; bottom: 0;"}var Fa=ko.div`
218
- ${e=>P(e)} {
217
+ `}return"right: 0; bottom: 0;"}var _a=Oo.div`
218
+ ${e=>v(e)} {
219
219
  // Anything inside this block will be ignored if the user provides a custom class
220
220
  background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
221
221
  position: fixed;
@@ -228,29 +228,29 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
228
228
  width: 350px;
229
229
  padding: 24px;
230
230
  }
231
- ${e=>Ta(e.modalPosition)}
231
+ ${e=>za(e.modalPosition)}
232
232
  margin: 28px;
233
- `,ka=ko.div`
233
+ `,Ha=Oo.div`
234
234
  position: relative;
235
235
  flex: 1;
236
- `,Pa=ko.div`
236
+ `,ja=Oo.div`
237
237
  position: absolute;
238
238
  top: 16px;
239
239
  right: 16px;
240
240
  cursor: pointer;
241
241
  z-index: 1501;
242
- ${e=>P(e)} {
242
+ ${e=>v(e)} {
243
243
  // Anything inside this block will be ignored if the user provides a custom class
244
244
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
245
245
  }
246
- `,va=ko.div`
246
+ `,Va=Oo.div`
247
247
  overflow: scroll;
248
248
  flex: 5;
249
249
  ::-webkit-scrollbar {
250
250
  display: none;
251
251
  }
252
- `,Po=({onClose:e,visible:t,headerContent:o=null,children:i,appearance:r,modalPosition:n="bottom-right",dismissible:s=!0})=>{let[p,c]=ba("");return nr(()=>{let l=getComputedStyle(document.body).getPropertyValue("overflow");c(l)},[]),nr(()=>{let l=g=>{g.key==="Escape"&&e()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[e]),nr(()=>{let l=document.body.style;return t?l.setProperty("overflow","hidden"):l.setProperty("overflow",p),()=>{l.setProperty("overflow",p)}},[t]),t?lt.createElement(wa,null,lt.createElement(Fa,{appearance:r,className:a("cornerModalContainer",r),modalPosition:n},s&&lt.createElement(Pa,{className:a("cornerModalClose",r),onClick:()=>e()},lt.createElement(ke,null)),o&&lt.createElement(ka,null,o),lt.createElement(va,null,i))):lt.createElement(lt.Fragment,null)};import{useContext as Ba}from"react";function Z(){let{defaultAppearance:e}=Ba(G);function t(o){let i=JSON.parse(JSON.stringify(e));return o?{styleOverrides:Object.assign(i.styleOverrides??{},o.styleOverrides??{}),theme:Object.assign(i.theme,o.theme??{})}:i}return{mergeAppearanceWithDefault:t}}import Ct,{useContext as Ja,useEffect as vi,useState as gr}from"react";import Io from"styled-components";import Eo,{useEffect as xi,useState as ar}from"react";import pr from"styled-components";import vo from"styled-components";var ci=vo.label`
253
- ${e=>P(e)} {
252
+ `,No=({onClose:e,visible:t,headerContent:o=null,children:n,appearance:i,modalPosition:r="bottom-right",dismissible:l=!0})=>{let[p,d]=Ua("");return mr(()=>{let s=getComputedStyle(document.body).getPropertyValue("overflow");d(s)},[]),mr(()=>{let s=m=>{m.key==="Escape"&&e()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e]),mr(()=>{let s=document.body.style;return t?s.setProperty("overflow","hidden"):s.setProperty("overflow",p),()=>{s.setProperty("overflow",p)}},[t]),t?ft.createElement(Wa,null,ft.createElement(_a,{appearance:i,className:a("cornerModalContainer",i),modalPosition:r},l&&ft.createElement(ja,{className:a("cornerModalClose",i),onClick:()=>e()},ft.createElement(Be,null)),o&&ft.createElement(Ha,null,o),ft.createElement(Va,null,n))):ft.createElement(ft.Fragment,null)};import{useContext as Ga}from"react";function oe(){let{defaultAppearance:e}=Ga(X);function t(o){var i,r,l;let n=JSON.parse(JSON.stringify(e));return o?{styleOverrides:Object.assign((i=n.styleOverrides)!=null?i:{},(r=o.styleOverrides)!=null?r:{}),theme:Object.assign(n.theme,(l=o.theme)!=null?l:{})}:n}return{mergeAppearanceWithDefault:t}}import Ft,{useContext as up,useEffect as _i,useState as wr}from"react";import Uo from"styled-components";import $o,{useEffect as Ai,useState as gr}from"react";import xr from"styled-components";import Lo from"styled-components";var ki=Lo.label`
253
+ ${e=>v(e)} {
254
254
  font-size: 12px;
255
255
  line-height: 18px;
256
256
  margin-bottom: 5px;
@@ -260,14 +260,14 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
260
260
  letter-spacing: 0.24px;
261
261
  }
262
262
  display: flex;
263
- `,mi=vo.label`
264
- ${e=>P(e)} {
263
+ `,Pi=Lo.label`
264
+ ${e=>v(e)} {
265
265
  font-size: 12px;
266
266
  line-height: 20px;
267
267
  margin-bottom: 5px;
268
268
  }
269
269
  display: flex;
270
- `,ui=vo.span`
270
+ `,vi=Lo.span`
271
271
  font-weight: 400;
272
272
  font-size: 14px;
273
273
  line-height: 22px;
@@ -275,17 +275,17 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
275
275
  display: flex;
276
276
  margin-right: 5px;
277
277
  margin-top: 10px;
278
- `,Bo=vo.div`
278
+ `,Do=Lo.div`
279
279
  display: flex;
280
280
  align-items: flex-start;
281
281
  justify-content: left;
282
282
  margin-bottom: 10px;
283
- `;import sr from"react";var Qe={theme:{colorPrimary:"#0171F8",colorSecondary:"#2E343D",colorText:"#0F1114",colorBackground:"#ffffff",colorBackgroundSecondary:"#d2d2d2",colorTextOnPrimaryBackground:"#ffffff",colorTextSecondary:"#2E343D",colorTextDisabled:"#5A6472",colorBorder:"#E5E5E5",colorTextError:"#c00000",colorTextSuccess:"#00D149",borderRadius:10}};function at({title:e,required:t,appearance:o=Qe}){return e?sr.createElement(Bo,{className:a("formLabelWrapper",o)},t?sr.createElement(ui,{className:a("formLabelRequired",o),appearance:o},"*"):null,sr.createElement(ci,{className:a("formLabel",o)},e)):null}import fi from"react";function Dt({title:e,appearance:t}){return e?fi.createElement(Bo,null,fi.createElement(mi,{className:a("formSubLabel",t)},e)):null}import{z as lr}from"zod";function gi(e,t){try{if(t){if(t.type=="number"){let o=lr.number();if(t.props)for(let i of t.props)i.requirement=="min"?o=o.min(Number(i.value),i.message??"Value is too small"):i.requirement=="max"?o=o.max(Number(i.value),i.message??"Value is too large"):i.requirement=="positive"?o=o.positive(i.message??"Value must be positive"):i.requirement=="negative"&&(o=o.nonpositive(i.message??"Value must be negative"));o.parse(Number(e))}if(t.type=="string"){let o=lr.string();if(t.props)for(let i of t.props)i.requirement=="min"?o=o.min(Number(i.value),i.message??"Value is too short"):i.requirement=="max"?o=o.max(Number(i.value),i.message??"Value is too long"):i.requirement=="regex"&&(o=o.regex(new RegExp(String(i.value)),i.message??"Value does not match requirements"));o.parse(e)}return}}catch(o){if(o instanceof lr.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 Ea=pr.div`
283
+ `;import ur from"react";var it={theme:{colorPrimary:"#0171F8",colorSecondary:"#2E343D",colorText:"#0F1114",colorBackground:"#ffffff",colorBackgroundSecondary:"#d2d2d2",colorTextOnPrimaryBackground:"#ffffff",colorTextSecondary:"#2E343D",colorTextDisabled:"#5A6472",colorBorder:"#E5E5E5",colorTextError:"#c00000",colorTextSuccess:"#00D149",borderRadius:10}};function gt({title:e,required:t,appearance:o=it}){return e?ur.createElement(Do,{className:a("formLabelWrapper",o)},t?ur.createElement(vi,{className:a("formLabelRequired",o),appearance:o},"*"):null,ur.createElement(ki,{className:a("formLabel",o)},e)):null}import Bi from"react";function _t({title:e,appearance:t}){return e?Bi.createElement(Do,null,Bi.createElement(Pi,{className:a("formSubLabel",t)},e)):null}import{z as fr}from"zod";function Ei(e,t){var o,n,i,r,l,p,d;try{if(t){if(t.type=="number"){let s=fr.number();if(t.props)for(let m of t.props)m.requirement=="min"?s=s.min(Number(m.value),(o=m.message)!=null?o:"Value is too small"):m.requirement=="max"?s=s.max(Number(m.value),(n=m.message)!=null?n:"Value is too large"):m.requirement=="positive"?s=s.positive((i=m.message)!=null?i:"Value must be positive"):m.requirement=="negative"&&(s=s.nonpositive((r=m.message)!=null?r:"Value must be negative"));s.parse(Number(e))}if(t.type=="string"){let s=fr.string();if(t.props)for(let m of t.props)m.requirement=="min"?s=s.min(Number(m.value),(l=m.message)!=null?l:"Value is too short"):m.requirement=="max"?s=s.max(Number(m.value),(p=m.message)!=null?p:"Value is too long"):m.requirement=="regex"&&(s=s.regex(new RegExp(String(m.value)),(d=m.message)!=null?d:"Value does not match requirements"));s.parse(e)}return}}catch(s){if(s instanceof fr.ZodError)return s.issues&&s.issues.length>0?s.issues[0].message:null;console.error("Frigade Form validation failed for rule ",t,s)}return null}var Ka=xr.div`
284
284
  display: flex;
285
285
  flex-direction: column;
286
286
  width: 100%;
287
- `,dr=pr.input`
288
- ${e=>P(e)} {
287
+ `,hr=xr.input`
288
+ ${e=>v(e)} {
289
289
  // Anything inside this block will be ignored if the user provides a custom class
290
290
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
291
291
  font-size: 14px;
@@ -300,8 +300,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
300
300
  box-sizing: border-box;
301
301
  padding: 0 10px;
302
302
  margin-bottom: 10px;
303
- `,Aa=pr.textarea`
304
- ${e=>P(e)} {
303
+ `,qa=xr.textarea`
304
+ ${e=>v(e)} {
305
305
  // Anything inside this block will be ignored if the user provides a custom class
306
306
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
307
307
  font-size: 14px;
@@ -316,14 +316,14 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
316
316
  min-height: 70px;
317
317
  box-sizing: border-box;
318
318
  margin-bottom: 10px;
319
- `;function cr({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:i,inputData:r}){let n=e,[s,p]=ar((r==null?void 0:r.text)||""),[c,l]=ar(!1),[g,d]=ar(!1),x=dr;xi(()=>{s===""&&!c&&(l(!0),k(""))},[]),xi(()=>{if(g){k(s);return}},[g]);function k(b){if(p(b),o({text:b}),n.required===!0&&b.trim()===""){i([{id:n.id,message:`${n.title??"Field"} is required`,hidden:!g}]);return}let u=gi(b,n.validation);if(u&&(b.trim()!==""||n.required===!0)){i([{id:n.id,message:u,hidden:!g}]);return}i([])}n.multiline&&(x=Aa);function S(){var b;switch((b=n==null?void 0:n.validation)==null?void 0:b.type){case"email":return"email";case"number":return"number";case"password":return"password"}return null}return Eo.createElement(Ea,null,Eo.createElement(at,{title:n.title,required:n.required,appearance:t.appearance}),Eo.createElement(x,{className:a("inputComponent",t.appearance),value:s,onChange:b=>{k(b.target.value)},appearance:t.appearance,placeholder:n.placeholder,type:S(),onBlur:()=>{d(!0)}}),Eo.createElement(Dt,{title:n.subtitle,appearance:t.appearance}))}import Ge,{useEffect as hi,useState as Ci}from"react";import yi from"styled-components";var mr="",Ia=yi.div`
319
+ `;function Cr({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:n,inputData:i}){let r=e,[l,p]=gr((i==null?void 0:i.text)||""),[d,s]=gr(!1),[m,c]=gr(!1),x=hr;Ai(()=>{l===""&&!d&&(s(!0),S(""))},[]),Ai(()=>{if(m){S(l);return}},[m]);function S(b){var B;if(p(b),o({text:b}),r.required===!0&&b.trim()===""){n([{id:r.id,message:`${(B=r.title)!=null?B:"Field"} is required`,hidden:!m}]);return}let g=Ei(b,r.validation);if(g&&(b.trim()!==""||r.required===!0)){n([{id:r.id,message:g,hidden:!m}]);return}n([])}r.multiline&&(x=qa);function F(){var b;switch((b=r==null?void 0:r.validation)==null?void 0:b.type){case"email":return"email";case"number":return"number";case"password":return"password"}return null}return $o.createElement(Ka,null,$o.createElement(gt,{title:r.title,required:r.required,appearance:t.appearance}),$o.createElement(x,{className:a("inputComponent",t.appearance),value:l,onChange:b=>{S(b.target.value)},appearance:t.appearance,placeholder:r.placeholder,type:F(),onBlur:()=>{c(!0)}}),$o.createElement(_t,{title:r.subtitle,appearance:t.appearance}))}import Qe,{useEffect as Ii,useState as Oi}from"react";import Ni from"styled-components";var yr="",Ya=Ni.div`
320
320
  display: flex;
321
321
  flex-direction: column;
322
322
  width: 100%;
323
323
  -webkit-appearance: none;
324
324
  appearance: none;
325
- `,Na=yi.select`
326
- ${e=>P(e)} {
325
+ `,Xa=Ni.select`
326
+ ${e=>v(e)} {
327
327
  // Anything inside this block will be ignored if the user provides a custom class
328
328
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
329
329
  font-size: 14px;
@@ -335,7 +335,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
335
335
 
336
336
  padding: 0 10px;
337
337
  margin-bottom: 10px;
338
- color: ${e=>{var t,o,i,r;return e.value==""?(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextDisabled:(r=(i=e.appearance)==null?void 0:i.theme)==null?void 0:r.colorText}};
338
+ color: ${e=>{var t,o,n,i;return e.value==""?(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextDisabled:(i=(n=e.appearance)==null?void 0:n.theme)==null?void 0:i.colorText}};
339
339
 
340
340
  appearance: none;
341
341
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'><path stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/></svg>");
@@ -343,16 +343,16 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
343
343
  background-repeat: no-repeat;
344
344
  background-size: 1.5em 1.5em;
345
345
  -webkit-print-color-adjust: exact;
346
- `;function Si({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:i,setFormValidationErrors:r}){var g,d,x,k,S,b;let n=e,[s,p]=Ci(((g=i==null?void 0:i.choice)==null?void 0:g[0])||""),[c,l]=Ci(!1);return hi(()=>{var u,v,T,C;if(s===""&&!c){if(l(!0),n.requireSelection){p(mr);return}if(n.defaultValue&&((u=n.props.options)!=null&&u.find(N=>N.id===n.defaultValue))){let N=(v=n.props.options)==null?void 0:v.find(A=>A.id===n.defaultValue);p(N.id),o({choice:[N.id]})}else p(((T=n.props.options)==null?void 0:T[0].id)||""),o({choice:[((C=n.props.options)==null?void 0:C[0].id)||""]})}},[]),hi(()=>{n.requireSelection&&s===mr?r([{message:"Please select an option",id:n.id}]):r([])},[s]),Ge.createElement(Ia,null,Ge.createElement(at,{title:n.title,required:!1,appearance:t.appearance}),Ge.createElement(Na,{value:s,onChange:u=>{p(u.target.value),o({choice:[u.target.value]})},placeholder:n.placeholder,appearance:t.appearance,className:a("multipleChoiceSelect",t.appearance)},n.requireSelection&&Ge.createElement("option",{key:"null-value",value:mr,disabled:!0},n.placeholder??"Select an option"),(d=n.props.options)==null?void 0:d.map(u=>Ge.createElement("option",{key:u.id,value:u.id},u.title))),((k=(x=n.props.options)==null?void 0:x.find(u=>u.id===s))==null?void 0:k.isOpenEnded)&&Ge.createElement(Ge.Fragment,null,Ge.createElement(at,{title:((b=(S=n.props.options)==null?void 0:S.find(u=>u.id===s))==null?void 0:b.openEndedLabel)??"Please specify",required:!1,appearance:t.appearance}),Ge.createElement(dr,{type:"text",placeholder:"Enter your answer here",onChange:u=>{o({choice:[u.target.value]})},appearance:t.appearance})),Ge.createElement(Dt,{title:n.subtitle,appearance:t.appearance}))}import no,{useEffect as ur,useState as wi}from"react";import Ti from"styled-components";import io from"react";import ro from"react";var bi=({color:e,percentage:t,size:o})=>{let i=o*.5-2,r=2*Math.PI*i,n=(1-t)*r;return ro.createElement("circle",{r:i,cx:o*.5,cy:o*.5,fill:"transparent",stroke:n!==r?e:"",strokeWidth:"3px",strokeDasharray:r,strokeDashoffset:t?n:0})},Oa=({fillColor:e,size:t,percentage:o,children:i,bgColor:r="#D9D9D9",className:n,style:s})=>ro.createElement("svg",{style:s,className:n,width:t,height:t,overflow:"visible"},ro.createElement("g",{transform:`rotate(-90 ${`${t*.5} ${t*.5}`})`},ro.createElement(bi,{color:r,size:t}),ro.createElement(bi,{color:e,percentage:o,size:t})),i),$t=Oa;import La from"styled-components";var Da=({color:e="#FFFFFF"})=>io.createElement("svg",{width:10,height:8,viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},io.createElement("path",{d:"M1 4.34815L3.4618 7L3.4459 6.98287L9 1",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),$a={width:"22px",height:"22px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center"},Ma={width:"22px",height:"22px",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center"},Ua={border:"1px solid #000000",color:"#FFFFFF"},za={border:"1px solid #C5CBD3"},Wa={color:"#FFFFFF"},_a={border:"1px solid #C5CBD3"},Ha=e=>e==="square"?$a:Ma,ja=(e,t)=>e==="square"?t?Ua:za:t?Wa:_a,Va=La.div`
347
- ${e=>ve(e)}
348
- `,Ze=({value:e,type:t="round",primaryColor:o="#000000",progress:i,appearance:r=Qe,style:n,className:s})=>{let p=Ha(t),c=ja(t,e);return e===!0?p={...p,...c,backgroundColor:r.theme.colorTextSuccess,borderColor:t==="square"?o:"none"}:p={...p,...c},e!==!0&&t==="round"&&i!==void 0&&i!==1?io.createElement($t,{fillColor:o,percentage:i,size:22}):io.createElement(Va,{styleOverrides:p,style:n,role:"checkbox",className:Ce(a("checkIconContainer",r),a(e?"checkIconContainerChecked":"checkIconContainerUnchecked",r),e?"checkIconContainerChecked":"checkIconContainerUnchecked",s)},e&&io.createElement(Da,{color:"#FFFFFF"}))};var Ga=Ti.div`
346
+ `;function Li({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:n,setFormValidationErrors:i}){var m,c,x,S,F,b,g,B;let r=e,[l,p]=Oi(((m=n==null?void 0:n.choice)==null?void 0:m[0])||""),[d,s]=Oi(!1);return Ii(()=>{var y,E,A,I;if(l===""&&!d){if(s(!0),r.requireSelection){p(yr);return}if(r.defaultValue&&((y=r.props.options)!=null&&y.find(h=>h.id===r.defaultValue))){let h=(E=r.props.options)==null?void 0:E.find(w=>w.id===r.defaultValue);p(h.id),o({choice:[h.id]})}else p(((A=r.props.options)==null?void 0:A[0].id)||""),o({choice:[((I=r.props.options)==null?void 0:I[0].id)||""]})}},[]),Ii(()=>{r.requireSelection&&l===yr?i([{message:"Please select an option",id:r.id}]):i([])},[l]),Qe.createElement(Ya,null,Qe.createElement(gt,{title:r.title,required:!1,appearance:t.appearance}),Qe.createElement(Xa,{value:l,onChange:y=>{p(y.target.value),o({choice:[y.target.value]})},placeholder:r.placeholder,appearance:t.appearance,className:a("multipleChoiceSelect",t.appearance)},r.requireSelection&&Qe.createElement("option",{key:"null-value",value:yr,disabled:!0},(c=r.placeholder)!=null?c:"Select an option"),(x=r.props.options)==null?void 0:x.map(y=>Qe.createElement("option",{key:y.id,value:y.id},y.title))),((F=(S=r.props.options)==null?void 0:S.find(y=>y.id===l))==null?void 0:F.isOpenEnded)&&Qe.createElement(Qe.Fragment,null,Qe.createElement(gt,{title:(B=(g=(b=r.props.options)==null?void 0:b.find(y=>y.id===l))==null?void 0:g.openEndedLabel)!=null?B:"Please specify",required:!1,appearance:t.appearance}),Qe.createElement(hr,{type:"text",placeholder:"Enter your answer here",onChange:y=>{o({choice:[y.target.value]})},appearance:t.appearance})),Qe.createElement(_t,{title:r.subtitle,appearance:t.appearance}))}import mo,{useEffect as Sr,useState as $i}from"react";import Mi from"styled-components";import co from"react";import po from"react";var Di=({color:e,percentage:t,size:o})=>{let n=o*.5-2,i=2*Math.PI*n,r=(1-t)*i;return po.createElement("circle",{r:n,cx:o*.5,cy:o*.5,fill:"transparent",stroke:r!==i?e:"",strokeWidth:"3px",strokeDasharray:i,strokeDashoffset:t?r:0})},Ja=({fillColor:e,size:t,percentage:o,children:n,bgColor:i="#D9D9D9",className:r,style:l})=>po.createElement("svg",{style:l,className:r,width:t,height:t,overflow:"visible"},po.createElement("g",{transform:`rotate(-90 ${`${t*.5} ${t*.5}`})`},po.createElement(Di,{color:i,size:t}),po.createElement(Di,{color:e,percentage:o,size:t})),n),Ht=Ja;import Qa from"styled-components";var Za=({color:e="#FFFFFF"})=>co.createElement("svg",{width:10,height:8,viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},co.createElement("path",{d:"M1 4.34815L3.4618 7L3.4459 6.98287L9 1",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Ra={width:"22px",height:"22px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center"},ep={width:"22px",height:"22px",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center"},tp={border:"1px solid #000000",color:"#FFFFFF"},op={border:"1px solid #C5CBD3"},rp={color:"#FFFFFF"},ip={border:"1px solid #C5CBD3"},np=e=>e==="square"?Ra:ep,sp=(e,t)=>e==="square"?t?tp:op:t?rp:ip,lp=Qa.div`
347
+ ${e=>Oe(e)}
348
+ `,nt=({value:e,type:t="round",primaryColor:o="#000000",progress:n,appearance:i=it,style:r,className:l})=>{let p=np(t),d=sp(t,e);return e===!0?p=H(T(T({},p),d),{backgroundColor:i.theme.colorTextSuccess,borderColor:t==="square"?o:"none"}):p=T(T({},p),d),e!==!0&&t==="round"&&n!==void 0&&n!==1?co.createElement(Ht,{fillColor:o,percentage:n,size:22}):co.createElement(lp,{styleOverrides:p,style:r,role:"checkbox",className:we(a("checkIconContainer",i),a(e?"checkIconContainerChecked":"checkIconContainerUnchecked",i),e?"checkIconContainerChecked":"checkIconContainerUnchecked",l)},e&&co.createElement(Za,{color:"#FFFFFF"}))};var ap=Mi.div`
349
349
  display: flex;
350
350
  flex-direction: column;
351
351
  width: 100%;
352
352
  -webkit-appearance: none;
353
353
  appearance: none;
354
- `,Ka=Ti.button`
355
- ${e=>P(e)} {
354
+ `,pp=Mi.button`
355
+ ${e=>v(e)} {
356
356
  // Anything inside this block will be ignored if the user provides a custom class
357
357
  border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
358
358
  font-size: 14px;
@@ -376,8 +376,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
376
376
  height: 48px;
377
377
  padding: 0 18px;
378
378
  margin-bottom: 10px;
379
- `;function Fi({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:i,setFormValidationErrors:r}){var g;let n=e,[s,p]=wi((i==null?void 0:i.choice)||[]),[c,l]=wi(!1);return ur(()=>{s.length==0&&!c&&(l(!0),o({choice:[]}))},[]),ur(()=>{o({choice:s})},[s]),ur(()=>{n.required&&(s.length<n.props.minChoices||s.length>n.props.maxChoices)?r([{message:"",id:n.id}]):r([])},[s]),no.createElement(Ga,null,no.createElement(at,{title:n.title,required:n.required,appearance:t.appearance}),(g=n.props.options)==null?void 0:g.map(d=>no.createElement(Ka,{appearance:t.appearance,className:a(s.includes(d.id)?"multipleChoiceListItemSelected":"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,no.createElement(Ze,{type:"round",primaryColor:t.appearance.theme.colorPrimary,value:s.includes(d.id),appearance:t.appearance}))),no.createElement(Dt,{title:n.subtitle,appearance:t.appearance}))}import Ao from"react";import ki from"styled-components";import qa from"dompurify";function ae(e){return{__html:qa.sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img"],ALLOWED_ATTR:["style","class","target","id","href","alt","src"]})}}var Ya=ki.h1`
380
- ${e=>P(e)} {
379
+ `;function Ui({formInput:e,customFormTypeProps:t,onSaveInputData:o,inputData:n,setFormValidationErrors:i}){var m;let r=e,[l,p]=$i((n==null?void 0:n.choice)||[]),[d,s]=$i(!1);return Sr(()=>{l.length==0&&!d&&(s(!0),o({choice:[]}))},[]),Sr(()=>{o({choice:l})},[l]),Sr(()=>{r.required&&(l.length<r.props.minChoices||l.length>r.props.maxChoices)?i([{message:"",id:r.id}]):i([])},[l]),mo.createElement(ap,null,mo.createElement(gt,{title:r.title,required:r.required,appearance:t.appearance}),(m=r.props.options)==null?void 0:m.map(c=>mo.createElement(pp,{appearance:t.appearance,className:a(l.includes(c.id)?"multipleChoiceListItemSelected":"multipleChoiceListItem",t.appearance),key:c.id,value:c.id,"data-selected":l.includes(c.id),onClick:()=>{if(l.includes(c.id)){p(l.filter(x=>x!==c.id));return}l.length<r.props.maxChoices?p([...l,c.id]):l.length==1&&r.props.maxChoices==1&&p([c.id])}},c.title,mo.createElement(nt,{type:"round",primaryColor:t.appearance.theme.colorPrimary,value:l.includes(c.id),appearance:t.appearance}))),mo.createElement(_t,{title:r.subtitle,appearance:t.appearance}))}import Mo from"react";import Wi from"styled-components";import dp from"dompurify";function pe(e){return{__html:dp.sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img"],ALLOWED_ATTR:["style","class","target","id","href","alt","src"]})}}var cp=Wi.h1`
380
+ ${e=>v(e)} {
381
381
  font-style: normal;
382
382
  font-weight: 700;
383
383
  font-size: ${e=>e.size=="small"?"15px":"18px"};
@@ -388,8 +388,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
388
388
  margin-bottom: 4px;
389
389
  color: ${e=>e.appearance.theme.colorText};
390
390
  }
391
- `,Xa=ki.h2`
392
- ${e=>P(e)} {
391
+ `,mp=Wi.h2`
392
+ ${e=>v(e)} {
393
393
  font-style: normal;
394
394
  font-weight: 400;
395
395
  font-size: 14px;
@@ -397,38 +397,38 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
397
397
  letter-spacing: 0.28px;
398
398
  color: ${e=>e.appearance.theme.colorTextSecondary};
399
399
  }
400
- `;function Pe({appearance:e,title:t,subtitle:o,size:i="medium",classPrefix:r=""}){return Ao.createElement(Ao.Fragment,null,Ao.createElement(Ya,{appearance:e,className:a(`${r}${r?oo(i):i}Title`,e),dangerouslySetInnerHTML:ae(t),size:i}),o&&Ao.createElement(Xa,{appearance:e,className:a(`${r}${r?oo(i):i}Subtitle`,e),dangerouslySetInnerHTML:ae(o),size:i}))}import*as fr from"react";var Pi=e=>fr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:12,"aria-hidden":"true",viewBox:"0 0 16 16",...e},fr.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 Qa=Io.div`
400
+ `;function Ee({appearance:e,title:t,subtitle:o,size:n="medium",classPrefix:i=""}){return Mo.createElement(Mo.Fragment,null,Mo.createElement(cp,{appearance:e,className:a(`${i}${i?ao(n):n}Title`,e),dangerouslySetInnerHTML:pe(t),size:n}),o&&Mo.createElement(mp,{appearance:e,className:a(`${i}${i?ao(n):n}Subtitle`,e),dangerouslySetInnerHTML:pe(o),size:n}))}import*as br from"react";var zi=e=>br.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,"aria-hidden":"true",viewBox:"0 0 16 16"},e),br.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 fp=Uo.div`
401
401
  display: flex;
402
402
  flex-direction: column;
403
403
  justify-content: flex-end;
404
404
  overflow: visible;
405
405
  padding-top: 14px;
406
- `,Za=Io.div`
406
+ `,gp=Uo.div`
407
407
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextError}};
408
408
  font-size: 12px;
409
409
  margin-bottom: 12px;
410
410
  display: flex;
411
411
  align-items: center;
412
- `,Ra=Io.div`
412
+ `,xp=Uo.div`
413
413
  margin-right: 4px;
414
414
  display: inline-flex;
415
- `,ep=Io.div`
415
+ `,hp=Uo.div`
416
416
  padding-left: 1px;
417
417
  padding-right: 1px;
418
- `,tp={text:cr,multipleChoice:Si,multipleChoiceList:Fi},xr="frigade-multiInputStepTypeData";function Bi({flowId:e,stepData:t,canContinue:o,setCanContinue:i,onSaveData:r,appearance:n,customFormElements:s,prefillData:p}){var A;let c=t.props,[l,g]=gr([]),[d,x]=gr([]),{userId:k}=eo(),[S,b]=gr(C()||(p?p[t.id]:null)||{}),{readonly:u}=Ja(G),v={...tp,...s};vi(()=>{i(l.length===0)},[l,i]),vi(()=>{r(S)},[S]);function T(h,w){b(f=>{let F={...f,[h.id]:w};return window&&window.localStorage&&!u&&window.localStorage.setItem(N(),JSON.stringify(F)),F})}function C(){if(window&&window.localStorage){let h=window.localStorage.getItem(N());if(h)return JSON.parse(h)}return null}function N(){return`${xr}-${e}-${t.id}-${k}`}return Ct.createElement(ep,{className:a("multiInput",n)},Ct.createElement(Pe,{appearance:n,title:t.title,subtitle:t.subtitle}),Ct.createElement(Qa,{className:a("multiInputContainer",n)},(A=c.data)==null?void 0:A.map(h=>{let w=l.reverse().find(f=>f.id===h.id);return v[h.type]?Ct.createElement("span",{key:h.id,"data-field-id":h.id,className:a("multiInputField",n)},v[h.type]({formInput:h,customFormTypeProps:{flowId:e,stepData:t,canContinue:o,setCanContinue:i,onSaveData:r,appearance:n},onSaveInputData:f=>{!d.includes(h.id)&&f&&(f==null?void 0:f.text)!==""&&x(F=>[...F,h.id]),T(h,f)},inputData:S[h.id],setFormValidationErrors:f=>{g(F=>f.length===0?F.filter(I=>I.id!==h.id):[...F,...f])}}),w&&w.message&&d.includes(h.id)&&w.hidden!==!0&&Ct.createElement(Za,{key:h.id,style:{overflow:"hidden"},appearance:n,className:a("multiInputValidationError",n)},Ct.createElement(Ra,{appearance:n,className:a("multiInputValidationErrorIcon",n)},Ct.createElement(Pi,null)),w.message)):null})))}import Mt from"styled-components";var Ei=Mt.div`
418
+ `,Cp={text:Cr,multipleChoice:Li,multipleChoiceList:Ui},Tr="frigade-multiInputStepTypeData";function Hi({flowId:e,stepData:t,canContinue:o,setCanContinue:n,onSaveData:i,appearance:r,customFormElements:l,prefillData:p}){var I;let d=t.props,[s,m]=wr([]),[c,x]=wr([]),{userId:S}=so(),[F,b]=wr(E()||(p?p[t.id]:null)||{}),{readonly:g}=up(X),B=T(T({},Cp),l);_i(()=>{n(s.length===0)},[s,n]),_i(()=>{i(F)},[F]);function y(h,w){b(f=>{let P=H(T({},f),{[h.id]:w});return window&&window.localStorage&&!g&&window.localStorage.setItem(A(),JSON.stringify(P)),P})}function E(){if(window&&window.localStorage){let h=window.localStorage.getItem(A());if(h)return JSON.parse(h)}return null}function A(){return`${Tr}-${e}-${t.id}-${S}`}return Ft.createElement(hp,{className:a("multiInput",r)},Ft.createElement(Ee,{appearance:r,title:t.title,subtitle:t.subtitle}),Ft.createElement(fp,{className:a("multiInputContainer",r)},(I=d.data)==null?void 0:I.map(h=>{let w=s.reverse().find(f=>f.id===h.id);return B[h.type]?Ft.createElement("span",{key:h.id,"data-field-id":h.id,className:a("multiInputField",r)},B[h.type]({formInput:h,customFormTypeProps:{flowId:e,stepData:t,canContinue:o,setCanContinue:n,onSaveData:i,appearance:r},onSaveInputData:f=>{!c.includes(h.id)&&f&&(f==null?void 0:f.text)!==""&&x(P=>[...P,h.id]),y(h,f)},inputData:F[h.id],setFormValidationErrors:f=>{m(P=>f.length===0?P.filter(N=>N.id!==h.id):[...P,...f])}}),w&&w.message&&c.includes(h.id)&&w.hidden!==!0&&Ft.createElement(gp,{key:h.id,style:{overflow:"hidden"},appearance:r,className:a("multiInputValidationError",r)},Ft.createElement(xp,{appearance:r,className:a("multiInputValidationErrorIcon",r)},Ft.createElement(zi,null)),w.message)):null})))}import jt from"styled-components";var ji=jt.div`
419
419
  align-items: center;
420
420
  display: flex;
421
421
  justify-content: ${e=>e.showBackButton?"space-between":"flex-end"};
422
422
  padding-top: 14px;
423
- `,Ai=Mt.div`
423
+ `,Vi=jt.div`
424
424
  color: ${e=>e.appearance.theme.colorTextError};
425
425
  font-size: 12px;
426
- `,Ii=Mt.div`
426
+ `,Gi=jt.div`
427
427
  display: flex;
428
428
  gap: 12px;
429
429
  width: 100%;
430
430
  justify-content: flex-end;
431
- `,Ni=Mt.div`
431
+ `,Ki=jt.div`
432
432
  display: flex;
433
433
  // If type is set to large-modal, use padding 60px horizontal, 80px vertical
434
434
  // Otherwise, use 4px padding
@@ -436,11 +436,11 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
436
436
  flex-grow: 1;
437
437
  flex-basis: 0;
438
438
  position: relative;
439
- `,Oi=Mt.div`
439
+ `,qi=jt.div`
440
440
  padding: ${e=>e.type==="large-modal"?"50px":"0px"};
441
441
  position: relative;
442
442
  overflow-y: auto;
443
- `,Li=Mt.div`
443
+ `,Yi=jt.div`
444
444
  display: flex;
445
445
  align-self: stretch;
446
446
  flex-grow: 1;
@@ -452,7 +452,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
452
452
  background-position: center;
453
453
  border-top-right-radius: ${e=>e.appearance.theme.borderRadius}px;
454
454
  border-bottom-right-radius: ${e=>e.appearance.theme.borderRadius}px;
455
- `;import pt from"react";import $i from"react";import Mi from"styled-components";import op from"styled-components";var Di=op.div`
455
+ `;import xt from"react";import Ji from"react";import Qi from"styled-components";import yp from"styled-components";var Xi=yp.div`
456
456
  width: 24px;
457
457
  height: 24px;
458
458
  border: 3px solid rgba(255, 255, 255, 0.25);
@@ -470,10 +470,11 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
470
470
  transform: rotate(360deg);
471
471
  }
472
472
  }
473
- `;var rp=Mi.button`
473
+ `;var Sp=Qi.button`
474
474
  justify-content: center;
475
475
  align-content: center;
476
- ${e=>P(e)} {
476
+ align-items: center;
477
+ ${e=>v(e)} {
477
478
  display: flex;
478
479
  // Anything inside this block will be ignored if the user provides a custom class
479
480
  width: ${e=>e.type==="full-width"?"100%":"auto"};
@@ -481,14 +482,14 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
481
482
  ${e=>e.withMargin?"margin: 16px 0px 16px 0px;":""}
482
483
 
483
484
  border: 1px solid ${e=>{var t,o;return e.secondary?"#C5CBD3":(o=(t=e==null?void 0:e.appearance)==null?void 0:t.theme)==null?void 0:o.colorPrimary}};
484
- color: ${e=>{var t,o,i,r;return e.secondary?(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText:(r=(i=e.appearance)==null?void 0:i.theme)==null?void 0:r.colorTextOnPrimaryBackground}};
485
- background-color: ${e=>{var t,o,i,r;return e.secondary?(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground:(r=(i=e==null?void 0:e.appearance)==null?void 0:i.theme)==null?void 0:r.colorPrimary}};
485
+ color: ${e=>{var t,o,n,i;return e.secondary?(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText:(i=(n=e.appearance)==null?void 0:n.theme)==null?void 0:i.colorTextOnPrimaryBackground}};
486
+ background-color: ${e=>{var t,o,n,i;return e.secondary?(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground:(i=(n=e==null?void 0:e.appearance)==null?void 0:n.theme)==null?void 0:i.colorPrimary}};
486
487
  border-radius: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius}}px;
487
488
  padding: ${e=>e.size=="small"?"6px 14px 6px 14px":"8px 20px 8px 20px"};
488
489
  font-size: ${e=>e.size=="small"?"14px":"15px"};
489
490
  line-height: 20px;
490
491
  font-weight: 500;
491
- ${e=>ve(e)}
492
+ ${e=>Oe(e)}
492
493
  }
493
494
 
494
495
  font-family: inherit;
@@ -502,8 +503,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
502
503
  opacity: ${e=>e.loading=="true"?"1.0":"0.3"};
503
504
  cursor: not-allowed;
504
505
  }
505
- `,No=Mi.div`
506
- ${e=>P(e)} {
506
+ `,Wo=Qi.div`
507
+ ${e=>v(e)} {
507
508
  display: flex;
508
509
  flex-direction: row;
509
510
  justify-content: flex-start;
@@ -513,14 +514,14 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
513
514
  margin-right: 8px;
514
515
  }
515
516
  }
516
- `,R=({onClick:e,title:t,style:o,disabled:i,type:r="inline",size:n="medium",secondary:s=!1,appearance:p,withMargin:c=!0,classPrefix:l="",loading:g=!1})=>{function d(){let x=s?"buttonSecondary":"button";return l===""?x:`${l}${oo(x)}`}return $i.createElement(rp,{secondary:s,appearance:p,disabled:i||g,loading:(g==null?void 0:g.toString())??"",onClick:e,styleOverrides:o,type:r,withMargin:c,size:n,className:a(d(),p)},g?$i.createElement(Di,{className:a("buttonLoader",p)}):t??"Continue")};var Ui=({step:e,canContinue:t,appearance:o,onPrimaryClick:i,onSecondaryClick:r,selectedStep:n,steps:s,onBack:p,allowBackNavigation:c,errorMessage:l,isSaving:g})=>{let d=s.length>1&&n!=0&&c,x=e.primaryButtonTitle&&e.secondaryButtonTitle||d?"inline":"full-width";return pt.createElement(pt.Fragment,null,l!==null&&l!=null&&pt.createElement(Ai,{appearance:o,className:a("formCTAError",o)},l),pt.createElement(Ei,{showBackButton:d,className:a("formCTAContainer",o)},d&&pt.createElement(R,{title:e.backButtonTitle??"Back",onClick:p,secondary:!0,withMargin:!1,type:x,appearance:o,style:{width:"90px",maxWidth:"90px"},classPrefix:"back"}),pt.createElement(Ii,{className:a("ctaWrapper",o)},e.secondaryButtonTitle?pt.createElement(R,{title:e.secondaryButtonTitle,onClick:r,secondary:!0,withMargin:!1,type:x,appearance:o,disabled:g}):null," ",e.primaryButtonTitle?pt.createElement(R,{disabled:!t,withMargin:!1,title:e.primaryButtonTitle,onClick:i,type:x,appearance:o,loading:g}):null)))};import hr from"react";import ip from"styled-components";var np=ip.div`
517
+ `,re=({onClick:e,title:t,style:o,disabled:n,type:i="inline",size:r="medium",secondary:l=!1,appearance:p,withMargin:d=!0,classPrefix:s="",loading:m=!1})=>{var x;function c(){let S=l?"buttonSecondary":"button";return s===""?S:`${s}${ao(S)}`}return Ji.createElement(Sp,{secondary:l,appearance:p,disabled:n||m,loading:(x=m==null?void 0:m.toString())!=null?x:"",onClick:e,styleOverrides:o,type:i,withMargin:d,size:r,className:a(c(),p)},m?Ji.createElement(Xi,{className:a("buttonLoader",p)}):t!=null?t:"Continue")};var Zi=({step:e,canContinue:t,appearance:o,onPrimaryClick:n,onSecondaryClick:i,selectedStep:r,steps:l,onBack:p,allowBackNavigation:d,errorMessage:s,isSaving:m})=>{var S;let c=l.length>1&&r!=0&&d,x=e.primaryButtonTitle&&e.secondaryButtonTitle||c?"inline":"full-width";return xt.createElement(xt.Fragment,null,s!==null&&s!=null&&xt.createElement(Vi,{appearance:o,className:a("formCTAError",o)},s),xt.createElement(ji,{showBackButton:c,className:a("formCTAContainer",o)},c&&xt.createElement(re,{title:(S=e.backButtonTitle)!=null?S:"Back",onClick:p,secondary:!0,withMargin:!1,type:x,appearance:o,style:{width:"90px",maxWidth:"90px"},classPrefix:"back"}),xt.createElement(Gi,{className:a("ctaWrapper",o)},e.secondaryButtonTitle?xt.createElement(re,{title:e.secondaryButtonTitle,onClick:i,secondary:!0,withMargin:!1,type:x,appearance:o,disabled:m}):null," ",e.primaryButtonTitle?xt.createElement(re,{disabled:!t,withMargin:!1,title:e.primaryButtonTitle,onClick:n,type:x,appearance:o,loading:m}):null)))};import Fr from"react";import bp from"styled-components";var wp=bp.div`
517
518
  text-align: center;
518
- `,zi=({stepCount:e=0,currentStep:t=0,className:o,appearance:i})=>{let{theme:r}=Z().mergeAppearanceWithDefault(i);return hr.createElement(np,{className:o},hr.createElement("svg",{width:16*e-8,height:8,viewBox:`0 0 ${16*e-8} 8`,fill:"none"},Array(e).fill(null).map((n,s)=>hr.createElement("rect",{key:s,x:16*s,y:0,width:8,height:8,rx:4,fill:t===s?r.colorPrimary:"#E6E6E6"}))))};import yt from"react";import Ut from"styled-components";import{useContext as sp}from"react";function le(){let e=sp(G);function t(r){i(r.primaryButtonUri,r.primaryButtonUriTarget)}function o(r){i(r.secondaryButtonUri,r.secondaryButtonUriTarget)}function i(r,n){if(!r)return;let s=r.startsWith("http")?"_blank":"_self";n&&n!=="_blank"&&(s="_self"),e.navigate(r,s)}return{primaryCTAClickSideEffects:t,secondaryCTAClickSideEffects:o,handleUrl:i}}var lp=Ut.div`
519
+ `,Ri=({stepCount:e=0,currentStep:t=0,className:o,appearance:n})=>{let{theme:i}=oe().mergeAppearanceWithDefault(n);return Fr.createElement(wp,{className:o},Fr.createElement("svg",{width:16*e-8,height:8,viewBox:`0 0 ${16*e-8} 8`,fill:"none"},Array(e).fill(null).map((r,l)=>Fr.createElement("rect",{key:l,x:16*l,y:0,width:8,height:8,rx:4,fill:t===l?i.colorPrimary:"#E6E6E6"}))))};import kt from"react";import Vt from"styled-components";import{useContext as Tp}from"react";function ae(){let e=Tp(X);function t(i){n(i.primaryButtonUri,i.primaryButtonUriTarget)}function o(i){n(i.secondaryButtonUri,i.secondaryButtonUriTarget)}function n(i,r){if(!i)return;let l=i.startsWith("http")?"_blank":"_self";r&&r!=="_blank"&&(l="_self"),e.navigate(i,l)}return{primaryCTAClickSideEffects:t,secondaryCTAClickSideEffects:o,handleUrl:n}}var Fp=Vt.div`
519
520
  display: flex;
520
521
  flex-wrap: wrap;
521
522
  align-content: center;
522
523
  justify-content: center;
523
- `,ap=Ut.div`
524
+ `,kp=Vt.div`
524
525
  align-content: center;
525
526
  align-items: center;
526
527
  display: flex;
@@ -534,10 +535,10 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
534
535
  flex-basis: 255px;
535
536
  flex-grow: 0;
536
537
  flex-shrink: 0;
537
- `,pp=Ut.img`
538
+ `,Pp=Vt.img`
538
539
  width: 78px;
539
540
  height: auto;
540
- `,dp=Ut.button`
541
+ `,vp=Vt.button`
541
542
  font-style: normal;
542
543
  font-weight: 600;
543
544
  font-size: 13px;
@@ -550,11 +551,11 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
550
551
  border-radius: 100px;
551
552
  padding: 8px 12px;
552
553
  margin-top: 16px;
553
- `,cp=Ut.h1`
554
+ `,Bp=Vt.h1`
554
555
  font-weight: 700;
555
556
  font-size: 28px;
556
557
  line-height: 34px;
557
- `,mp=Ut.h2`
558
+ `,Ep=Vt.h2`
558
559
  font-style: normal;
559
560
  font-weight: 400;
560
561
  font-size: 16px;
@@ -563,7 +564,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
563
564
  margin-top: 12px;
564
565
  margin-bottom: 16px;
565
566
  max-width: 70%;
566
- `;function Wi({stepData:e,appearance:t}){var i,r;let{handleUrl:o}=le();return yt.createElement("div",null,yt.createElement(cp,null,e.title),yt.createElement(mp,null,e.subtitle),yt.createElement(lp,null,(r=(i=e.props)==null?void 0:i.links)==null?void 0:r.map(n=>yt.createElement(ap,{key:n.title},yt.createElement(pp,{src:n.imageUri}),yt.createElement(dp,{style:{borderColor:t.theme.colorPrimary,color:t.theme.colorPrimary},onClick:()=>{n.uri&&o(n.uri,n.uriTarget??"_blank")}},n.title)))))}import zt,{useEffect as yp}from"react";import Do from"styled-components";import Cr from"react";var Oo=({style:e,className:t})=>Cr.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},Cr.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),Cr.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 so,{useRef as up,useState as fp}from"react";import Lo from"styled-components";var gp=Lo.div`
567
+ `;function en({stepData:e,appearance:t}){var n,i;let{handleUrl:o}=ae();return kt.createElement("div",null,kt.createElement(Bp,null,e.title),kt.createElement(Ep,null,e.subtitle),kt.createElement(Fp,null,(i=(n=e.props)==null?void 0:n.links)==null?void 0:i.map(r=>kt.createElement(kp,{key:r.title},kt.createElement(Pp,{src:r.imageUri}),kt.createElement(vp,{style:{borderColor:t.theme.colorPrimary,color:t.theme.colorPrimary},onClick:()=>{var l;r.uri&&o(r.uri,(l=r.uriTarget)!=null?l:"_blank")}},r.title)))))}import Gt,{useEffect as $p}from"react";import Ho from"styled-components";import kr from"react";var zo=({style:e,className:t})=>kr.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},kr.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),kr.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 uo,{useRef as Ap,useState as Ip}from"react";import _o from"styled-components";var Op=_o.div`
567
568
  display: flex;
568
569
  align-items: center;
569
570
  justify-content: flex-start;
@@ -571,7 +572,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
571
572
  width: 100%;
572
573
  height: 100%;
573
574
  position: relative;
574
- `,xp=Lo.div`
575
+ `,Np=_o.div`
575
576
  position: absolute;
576
577
  display: flex;
577
578
  align-items: center;
@@ -590,56 +591,56 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
590
591
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
591
592
  border-radius: 50%;
592
593
  }
593
- `,hp=Lo.video`
594
+ `,Lp=_o.video`
594
595
  width: 100%;
595
596
  height: 100%;
596
597
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
597
- `,Cp=Lo.iframe`
598
+ `,Dp=_o.iframe`
598
599
  width: 100%;
599
600
  height: 100%;
600
601
  min-height: 260px;
601
602
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
602
- `;function Ke({appearance:e,videoUri:t}){let o=up(),[i,r]=fp(!1);if(t.includes("youtube")){let n=t.split("v=")[1],s=n.indexOf("&");return s!==-1&&(n=n.substring(0,s)),so.createElement(Cp,{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 so.createElement(gp,{className:a("videoPlayerWrapper",e),appearance:e},!i&&so.createElement(xp,{onClick:()=>{r(!0),o.current.play()},appearance:e},so.createElement(Oo,null)),so.createElement(hp,{appearance:e,controls:i,ref:o,play:i,src:t}))}var Sp=Do.div`
603
- ${e=>P(e)} {
603
+ `;function Ze({appearance:e,videoUri:t}){let o=Ap(),[n,i]=Ip(!1);if(t.includes("youtube")){let r=t.split("v=")[1],l=r.indexOf("&");return l!==-1&&(r=r.substring(0,l)),uo.createElement(Dp,{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${r}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,appearance:e})}return uo.createElement(Op,{className:a("videoPlayerWrapper",e),appearance:e},!n&&uo.createElement(Np,{onClick:()=>{i(!0),o.current.play()},appearance:e},uo.createElement(zo,null)),uo.createElement(Lp,{appearance:e,controls:n,ref:o,play:n,src:t}))}var Mp=Ho.div`
604
+ ${e=>v(e)} {
604
605
  display: flex;
605
606
  flex-direction: column;
606
607
  justify-content: center;
607
608
  }
608
- `,bp=Do.img`
609
- ${e=>P(e)} {
609
+ `,Up=Ho.img`
610
+ ${e=>v(e)} {
610
611
  width: 100%;
611
612
  height: auto;
612
613
  max-height: 250px;
613
614
  margin-bottom: 24px;
614
615
  }
615
- `,wp=Do.div`
616
- ${e=>P(e)} {
616
+ `,Wp=Ho.div`
617
+ ${e=>v(e)} {
617
618
  margin-bottom: 24px;
618
619
  }
619
- `,Tp=Do.div`
620
- ${e=>P(e)} {
620
+ `,zp=Ho.div`
621
+ ${e=>v(e)} {
621
622
  width: 100%;
622
623
  height: auto;
623
624
  max-height: 250px;
624
625
  margin-bottom: 24px;
625
626
  }
626
- `;function _i({stepData:e,appearance:t,setCanContinue:o}){return yp(()=>{o(!0)},[]),zt.createElement(Sp,{className:a("callToActionContainer",t)},zt.createElement(wp,{className:a("callToActionTextContainer",t)},zt.createElement(Pe,{appearance:t,title:e.title,subtitle:e.subtitle})),e.imageUri&&zt.createElement(bp,{className:a("callToActionImage",t),src:e.imageUri}),!e.imageUri&&e.videoUri&&zt.createElement(Tp,{appearance:t,className:a("callToActionVideo",t)},zt.createElement(Ke,{appearance:t,videoUri:e.videoUri})))}import Re,{useEffect as yr,useState as Sr}from"react";import dt from"styled-components";var Hi=dt.div`
627
+ `;function tn({stepData:e,appearance:t,setCanContinue:o}){return $p(()=>{o(!0)},[]),Gt.createElement(Mp,{className:a("callToActionContainer",t)},Gt.createElement(Wp,{className:a("callToActionTextContainer",t)},Gt.createElement(Ee,{appearance:t,title:e.title,subtitle:e.subtitle})),e.imageUri&&Gt.createElement(Up,{className:a("callToActionImage",t),src:e.imageUri}),!e.imageUri&&e.videoUri&&Gt.createElement(zp,{appearance:t,className:a("callToActionVideo",t)},Gt.createElement(Ze,{appearance:t,videoUri:e.videoUri})))}import st,{useEffect as Pr,useState as vr}from"react";import ht from"styled-components";var on=ht.div`
627
628
  width: auto;
628
629
  display: flex;
629
630
  flex-direction: column;
630
631
  justify-content: center;
631
632
  align-items: center;
632
633
  padding: 4px;
633
- `,ji=dt.div`
634
+ `,rn=ht.div`
634
635
  width: 100%;
635
636
  text-align: left;
636
- `,Vi=dt.h1`
637
+ `,nn=ht.h1`
637
638
  font-style: normal;
638
639
  font-weight: 700;
639
640
  font-size: 32px;
640
641
  line-height: 38px;
641
642
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
642
- `,Gi=dt.h1`
643
+ `,sn=ht.h1`
643
644
  font-style: normal;
644
645
  font-weight: 400;
645
646
  font-size: 16px;
@@ -647,7 +648,7 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
647
648
  margin-top: 16px;
648
649
  margin-bottom: 16px;
649
650
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
650
- `,Ki=dt.div`
651
+ `,ln=ht.div`
651
652
  padding-top: 12px;
652
653
  padding-bottom: 12px;
653
654
  flex-direction: row;
@@ -658,17 +659,17 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
658
659
  cursor: pointer;
659
660
  border-bottom: ${e=>e.hideBottomBorder?"none":"1px solid #D8D8D8"};
660
661
  width: 100%;
661
- `,qi=dt.div`
662
+ `,an=ht.div`
662
663
  padding-top: 10px;
663
664
  padding-bottom: 10px;
664
665
  flex-direction: row;
665
666
  display: flex;
666
667
  justify-content: flex-start;
667
- `,Yi=dt.img`
668
+ `,pn=ht.img`
668
669
  width: 42px;
669
670
  height: 42px;
670
671
  margin-right: 12px;
671
- `,Xi=dt.p`
672
+ `,dn=ht.p`
672
673
  font-style: normal;
673
674
  font-weight: 500;
674
675
  font-size: 17px;
@@ -676,8 +677,8 @@ import bt,{createContext as ed,useEffect as zo,useState as ze}from"react";import
676
677
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
677
678
  display: flex;
678
679
  align-self: center;
679
- `;var Ji=({stepData:e,setCanContinue:t,onSaveData:o,appearance:i})=>{let r=e.props,[n,s]=Sr([]),[p,c]=Sr(!1),[l,g]=Sr(e.id);return yr(()=>{n.length==0&&!p&&(c(!0),o({choice:[]}))},[p]),yr(()=>{l!==e.id&&(g(e.id),s([]))},[e]),yr(()=>{o({choice:n}),n.length>=r.minChoices?t(!0):t(!1)},[n]),Re.createElement(Hi,{className:a("selectListContainer",i)},Re.createElement(ji,null,Re.createElement(Vi,{className:a("selectListTitle",i)},e.title),Re.createElement(Gi,{appearance:i,className:a("selectListSubtitle",i)},e.subtitle)),r.options.map((d,x)=>{let k=n.includes(d.id);return Re.createElement(Ki,{key:`select-item-${x}`,onClick:()=>{if(n.includes(d.id)){s(n.filter(S=>S!==d.id));return}n.length<r.maxChoices?s([...n,d.id]):n.length==1&&r.maxChoices==1&&s([d.id])},hideBottomBorder:x===r.options.length-1,className:a("selectListSelectItem",i)},Re.createElement(qi,{className:a("selectListItemImage",i)},d.imageUri&&Re.createElement(Yi,{src:d.imageUri,alt:`select-icon-${x}`}),Re.createElement(Xi,{appearance:i,className:a("selectListSelectItemText",i)},d.title)),Re.createElement(Ze,{appearance:i,value:k,primaryColor:i.theme.colorPrimary}))}))};import Le,{useEffect as Qi,useState as lo}from"react";var Fp=({children:e,id:t,shouldWrap:o=!1})=>Le.createElement(Le.Fragment,null,o?Le.createElement("div",{key:t,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,overflowY:"auto"}},e):e),$o=({appearance:e,steps:t,selectedStep:o,customStepTypes:i,customVariables:r,onButtonClick:n,onStepCompletion:s,flowId:p,type:c,hideOnFlowCompletion:l,onComplete:g,setVisible:d,setShowModal:x,onDismiss:k,showPagination:S=!1,customFormElements:b,allowBackNavigation:u,validationHandler:v,onFormDataChange:T,showFooter:C,prefillData:N,updateUrlOnPageChange:A})=>{let w={...{linkCollection:Wi,multiInput:Bi,callToAction:_i,selectList:Ji},...i},{primaryCTAClickSideEffects:f,secondaryCTAClickSideEffects:F}=le(),[I,O]=lo(!1),[E,D]=lo({}),[$,V]=lo(!1),[j,Y]=lo(!1),[de,he]=lo(null),K=t[o]??null,{markStepCompleted:te,markStepStarted:Q,isLoading:Se,updateCustomVariables:me,markFlowCompleted:Ee}=J();Qi(()=>{me(r)},[r,Se]),Qi(()=>{T&&T(E,re(),t[o],o)},[E]);function re(){return{data:E[t[o].id]??{},stepId:t[o].id,customVariables:r}}function ne(_,X,H){let se=o+1<t.length?t[o+1]:null;return s&&s(_,H,se,E,re()),n?n(_,o,X,se):!0}function Te(_,X){D(H=>{let se={};return se[_.id]=X,{...H,...se}})}function L(_){return _.selectedStep.imageUri?Le.createElement(Li,{image:_.selectedStep.imageUri,appearance:e,className:a("formContainerSidebarImage",e)}):null}let U=C&&Le.createElement(Ui,{step:t[o],canContinue:I&&!$,formType:c,selectedStep:o,appearance:e,onPrimaryClick:async()=>{if(V(!0),v){let H=await v(t[o],o,t[o+1],E,re());if(H!==!0){he(typeof H=="string"?H:null),V(!1);return}else he(null)}let _={...re()};await te(p,t[o].id,_),o+1<t.length&&await Q(p,t[o+1].id);let X=ne(t[o],"primary",o);if(o+1>=t.length&&(g&&g(),k&&k(),l&&X&&(d&&d(!1),x(!1)),await Ee(p)),f(t[o]),V(!1),window&&u&&o+1<t.length&&(window.location.hash=t[o+1].id),window&&!u&&A&&o+1<t.length){let H=new URL(window.location.href);H.searchParams.set("p",t[o+1].id),window.history.pushState({},"",H.toString())}},onSecondaryClick:()=>{ne(t[o],"secondary",o),F(t[o])},onBack:async()=>{o-1>=0&&(V(!0),await Q(p,t[o-1].id),V(!1))},steps:t,allowBackNavigation:u,errorMessage:de,isSaving:$});return Le.createElement(Le.Fragment,null,Le.createElement(Ni,{className:a("formContainer",e)},Le.createElement(Fp,{id:o,shouldWrap:c==="large-modal"},Le.createElement(Oi,{key:K.id,type:c,className:a("formContent",e)},t.map(_=>{let X=w[_.type];return K.id!==_.id?null:Le.createElement(X,{key:_.id,stepData:_,canContinue:I,setCanContinue:O,onSaveData:H=>{Te(_,H)},appearance:e,customFormElements:b,flowId:p,prefillData:N})}),S&&Le.createElement(zi,{className:a("formPagination",e),appearance:e,stepCount:t.length,currentStep:o}),U)),c=="large-modal"&&Le.createElement(L,{selectedStep:t[o]})))};import ao from"react";import{createGlobalStyle as kp}from"styled-components";var Pp=kp`
680
- ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map(([i,r])=>typeof r=="object"?`${i} { ${Object.entries(r).map(([s,p])=>`${bo(s)}: ${p};`).join(" ")} }`:`${bo(i)}: ${r};`).join(" ")} }`).join(" ")}`;function oe({appearance:e}){if(!e||!e.styleOverrides)return ao.createElement(ao.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([o,i])=>typeof i=="object");return t.length===0?ao.createElement(ao.Fragment,null):ao.createElement(Pp,{inlineStyles:t})}var Ri=({flowId:e,customStepTypes:t={},type:o="inline",visible:i,setVisible:r,customVariables:n,customFormElements:s,onComplete:p,appearance:c,hideOnFlowCompletion:l=!0,onStepCompletion:g,onButtonClick:d,dismissible:x=!0,endFlowOnDismiss:k=!1,modalPosition:S="center",repeatable:b=!1,onDismiss:u,showPagination:v=!1,allowBackNavigation:T=!1,validationHandler:C,showFrigadeBranding:N=!1,onFormDataChange:A,showFooter:h=!0,prefillData:w={},updateUrlOnPageChange:f=!1})=>{var X;let{getFlow:F,getFlowSteps:I,isLoading:O,targetingLogicShouldHideFlow:E,getFlowStatus:D,getCurrentStepIndex:$,markFlowCompleted:V,markFlowNotStarted:j,markStepStarted:Y}=J(),de=$(e),{mergeAppearanceWithDefault:he}=Z(),[K,te]=Zi(!1),[Q,Se]=Zi(!1),{setOpenFlowState:me,getOpenFlowState:Ee,hasOpenModals:re}=Fe(),ne=I(e);c=he(c);let[Te,L]=i!==void 0&&r!==void 0?[i,r]:[Ee(e,!0),H=>me(e,H)];if(br(()=>{!K&&!O&&(te(!0),(D(e)===q&&b||D(e)===Ne)&&(D(e)===q&&b&&j(e),window&&window.localStorage&&Object.keys(window.localStorage).forEach(se=>{se.startsWith(xr)&&window.localStorage.removeItem(se)})),te(!0))},[K,te,O]),br(()=>{window&&T&&!Q&&(window.location.hash=ne[de].id,Se(!0))},[T,Q,Se]),br(()=>{var H;if(window&&((H=window==null?void 0:window.location)!=null&&H.hash)&&window.location.hash.replace("#","")!==ne[de].id){let se=window.location.hash.replace("#",""),Ae=ne.findIndex(Ie=>Ie.id===se);Ae!==-1&&Ae!==de&&Y(e,ne[Ae].id)}},[(X=window==null?void 0:window.location)==null?void 0:X.hash]),O)return null;let U=F(e);if(!U||E(U)||!ne||i!==void 0&&i===!1||D(e)===q&&l||(o=="modal"||o=="corner-modal")&&re(e))return null;let _=()=>{L(!1),u&&u(),k===!0&&V(e)};if(S=="center"&&o==="modal"||o==="large-modal"){let H={padding:"24px"};return o==="large-modal"?(H.width="85%",H.height="90%",H.maxHeight="800px",H.minHeight="500px",H.padding="0"):H.width="400px",qe.createElement(Ve,{appearance:c,onClose:_,visible:Te,style:H,dismissible:x,showFrigadeBranding:N},qe.createElement(oe,{appearance:c}),qe.createElement($o,{appearance:c,steps:ne,selectedStep:de,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:g,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:r,setShowModal:L,onDismiss:u,showPagination:v,customFormElements:s,allowBackNavigation:T,validationHandler:C,onFormDataChange:A,showFooter:h,prefillData:w,updateUrlOnPageChange:f}))}return o==="modal"&&S!=="center"?qe.createElement(Po,{appearance:c,onClose:_,visible:Te,modalPosition:S},qe.createElement(oe,{appearance:c}),qe.createElement($o,{appearance:c,steps:ne,selectedStep:de,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:g,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:r,setShowModal:L,onDismiss:u,showPagination:v,customFormElements:s,allowBackNavigation:T,validationHandler:C,onFormDataChange:A,showFooter:h,prefillData:w,updateUrlOnPageChange:f})):qe.createElement(qe.Fragment,null,qe.createElement(oe,{appearance:c}),qe.createElement($o,{appearance:c,steps:ne,selectedStep:de,customStepTypes:t,customVariables:n,onButtonClick:d,onStepCompletion:g,flowId:e,type:o,hideOnFlowCompletion:l,onComplete:p,setVisible:r,setShowModal:L,onDismiss:u,showPagination:v,customFormElements:s,allowBackNavigation:T,validationHandler:C,onFormDataChange:A,showFooter:h,prefillData:w,updateUrlOnPageChange:f}))},en=Ri;import{useCallback as wr,useContext as vp,useEffect as Bp}from"react";function Tr(){let{organizationId:e,userId:t,setOrganizationId:o}=vp(G),{mutateUserFlowState:i}=Oe(),{config:r,apiUrl:n}=je(),s=Nt(),{verifySDKInitiated:p}=Ot();function c(x,k){return`frigade-user-group-registered-${x}-${k}`}Bp(()=>{if(t&&e){if(t.startsWith(Lt))return;let x=c(t,e);localStorage.getItem(x)||(s(`${n}userGroups`,{...r,method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})}),localStorage.setItem(x,"true"))}},[t,e]);let l=wr(async x=>{if(!p())return;if(!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let k={foreignUserId:t,foreignUserGroupId:e,properties:x};await s(`${n}userGroups`,{...r,method:"POST",body:JSON.stringify(k)}),i()},[e,t,r,i]),g=wr(async(x,k)=>{if(!p())return;if(!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let b={foreignUserId:t,foreignUserGroupId:e,events:[{event:x,properties:k}]};await s(`${n}userGroups`,{...r,method:"POST",body:JSON.stringify(b)}),i()},[e,t,r,i]),d=wr(async(x,k)=>{if(p())if(k){let S=c(t,x);localStorage.setItem(S,"true"),o(x);let b={foreignUserId:t,foreignUserGroupId:x,properties:k};await s(`${n}userGroups`,{...r,method:"POST",body:JSON.stringify(b)}),i()}else o(x)},[t,r,i]);return{organizationId:e,setOrganizationId:o,setOrganizationIdWithProperties:d,addPropertiesToOrganization:l,trackEventForOrganization:g}}var tn="frigade-xFrigade_guestUserId",co="frigade-xFrigade_userId",on=({})=>{let{setFlowResponses:e}=Rt(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:i}=Oe(),{userId:r,setUserId:n}=eo(),[s,p]=Mo(r),{getFlowStatus:c}=J(),{flows:l,userProperties:g,setIsNewGuestUser:d,flowResponses:x}=Ep(G),[k,S]=Mo([]),[b,u]=Mo([]),{organizationId:v}=Tr(),[T,C]=Mo(v);po(()=>{if(!o&&t)for(let w=0;w<t.length;w++){let f=t[w],F=l.find(I=>I.slug===(f==null?void 0:f.flowId));if(F&&f&&f.shouldTrigger===!0&&F.type=="FORM"&&F.triggerType==="AUTOMATIC"&&!b.includes(F.slug)){setTimeout(()=>{N(f.flowId)},500);break}}},[o,t]),po(()=>{x.length>0&&i()},[x]);function N(w){let f=l.find(F=>F.slug===w);f&&f.triggerType==="AUTOMATIC"&&!b.includes(f.slug)&&(u([...b,f.slug]),S([f]))}function A(){if(!r){let w=localStorage.getItem(co);if(w){n(w);return}let f=localStorage.getItem(tn);if(f){n(f);return}d(!0);let F=Lt+Ap();try{localStorage.setItem(tn,F)}catch(I){console.log("Failed to save guest user id locally: Local storage unavailable",I)}n(I=>I||F)}}po(()=>{try{if(l){let w=[];l.forEach(f=>{if(f.data){let F=f.data.match(/"imageUri":"(.*?)"/g);F&&F.forEach(I=>{let O=I.replace('"imageUri":"',"").replace('"',"");if(w.includes(O))return;let E=new Image;E.src=O,w.push(O)})}})}}catch{}},[l]),po(()=>{if(r!==s&&(e([]),i()),p(r),r&&!r.startsWith(Lt))try{localStorage.setItem(co,r)}catch(w){console.log("Failed to save user id locally: Local storage available",w)}r===null&&setTimeout(()=>{r===null&&A()},50)},[r,l,g]),po(()=>{v!=T&&(C(v),e([]),i())},[v,T,C]);function h(){return St.createElement(St.Fragment,null,k.map(w=>c(w.slug)!==Ne?null:St.createElement("span",{key:w.slug},St.createElement(en,{flowId:w.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return St.createElement(St.Fragment,null,St.createElement(h,null))};import{ErrorBoundary as od}from"react-error-boundary";var rn={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 Ip(e){if(!e)return;let t={};return Object.entries(e).forEach(([o,i])=>{if(rn[o]){let r=rn[o].split("."),n=t;r.forEach((s,p)=>{n[s]||(n[s]=p===r.length-1?i:{}),n=n[s]})}}),t}function Np(e){if(!e)return;let t=fe({},e),o={};return Object.keys(t).forEach(i=>{let r=`.fr-${i}`;o[r]=t[i]}),o}function nn(e){let{theme:t,styleOverrides:o}=e,i=Ip(t),r=Np(o);return{overrides:i,css:r}}import Kp from"styled-components";import{compose as qp,variant as ln}from"styled-system";import sn from"react";import Op,{ThemeProvider as Lp,useTheme as Dp}from"styled-components";import{border as $p,color as Mp,compose as Up,get as zp,shadow as Wp,space as _p,system as Hp,typography as jp}from"styled-system";var Vp={width:{property:"width",scale:"sizes",transform:(e,t)=>zp(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},Gp=Op("div")(({css:e})=>e,Up($p,Mp,Wp,_p,jp,Hp(Vp))),mo=({as:e,children:t,overrides:o,...i})=>{let r=Dp(),n={border:"none",boxSizing:"border-box",m:0,p:0},s=()=>sn.createElement(Gp,{as:e,...n,...i},t);if(o!==void 0){let p=fe(r,o);return sn.createElement(Lp,{theme:p},s())}return s()};var uo={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"}},Yp={sm:{paddingX:4,paddingY:1},md:{paddingX:6,paddingY:2}},an=Kp(mo)(()=>({whiteSpace:"nowrap"}),qp(ln({scale:"components.Button",variants:"components.Button"}),ln({prop:"size",variants:Yp})));import Xp from"styled-components";import{variant as Jp,system as Qp}from"styled-system";var Uo={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 pn=Xp(mo)(Jp({scale:"components.Text",variants:"components.Text"}),Qp({fontWeight:{property:"fontWeight",scale:"fontWeights"}}));var dn=4,cn="px",Zp=20,Rp=Object.fromEntries(Array.from(Array(Zp+1),(e,t)=>t===0?[.5,`${.5*dn}${cn}`]:[t,`${t*dn}${cn}`])),Wt={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:{...Wt,neutral:{foreground:Wt.gray300},primary:{background:Wt.blue500,foreground:Wt.white,inverted:Wt.blue500},negative:{foreground:Wt.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:Rp,components:{Button:uo,Text:Uo}};var mn="https://api.frigade.com",G=ed({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:mn,readonly:!1,debug:!1});function rd(){Object.keys(localStorage).forEach(e=>{e.startsWith("frigade-")&&localStorage.removeItem(e)})}var id=({publicApiKey:e,userId:t,organizationId:o,config:i,children:r})=>{var de,he;let[n,s]=ze(t||null),[p,c]=ze(o||null),[l,g]=ze([]),[d,x]=ze([]),[k,S]=ze([]),[b,u]=ze({}),[v,T]=ze({}),[C,N]=ze([]),[A,h]=ze({}),[w,f]=ze(!1),[F,I]=ze(!1),[O,E]=ze(!V(e)),D=(K,te)=>{if(te==="_blank"){window.open(K,"_blank");return}setTimeout(()=>{window.location.href=K},50)},$={theme:{...Qe.theme,...((de=i==null?void 0:i.defaultAppearance)==null?void 0:de.theme)??{}},styleOverrides:{...Qe.styleOverrides,...((he=i==null?void 0:i.defaultAppearance)==null?void 0:he.styleOverrides)??{}}};function V(K){return!!(K&&K.length>10&&K.substring(0,10)==="api_public")}zo(()=>{t&&s(t)},[t]),zo(()=>{n&&window&&window.localStorage&&window.localStorage.getItem(co)&&window.localStorage.getItem(co)!==n&&rd()},[n]),zo(()=>{o&&c(o)},[o]),zo(()=>{if(V(e))E(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),E(!0);return}},[e,E]);let j={publicApiKey:e,userId:n,setUserId:s,setFlows:g,flows:l,failedFlowResponses:d,setFailedFlowResponses:x,flowResponses:k,setFlowResponses:S,userProperties:b,setUserProperties:u,openFlowStates:v,setOpenFlowStates:T,completedFlowsToKeepOpenDuringSession:C,setCompletedFlowsToKeepOpenDuringSession:N,customVariables:A,setCustomVariables:h,isNewGuestUser:w,setIsNewGuestUser:f,hasActiveFullPageFlow:F,setHasActiveFullPageFlow:I,organizationId:p,setOrganizationId:c,navigate:i&&i.navigate?i.navigate:D,defaultAppearance:$,shouldGracefullyDegrade:O,setShouldGracefullyDegrade:E,apiUrl:i&&i.apiUrl?i.apiUrl:mn,readonly:i&&i.readonly?i.readonly:!1,debug:i&&i.debug?i.debug:!1};if(O)return bt.createElement(G.Provider,{value:j},r);let{overrides:Y}=nn($);return bt.createElement(od,{fallback:bt.createElement(bt.Fragment,null,r)},bt.createElement(G.Provider,{value:j},bt.createElement(td,{theme:fe($.theme,Fr,Y??{},(i==null?void 0:i.theme)??{})},r,bt.createElement(on,null))))};import Kd from"react";import ge,{useEffect as Hs,useState as js}from"react";import He,{useState as wd}from"react";import Ft from"styled-components";import Ho from"react";import wt from"react";import fn from"styled-components";var un=fn.span`
680
+ `;var cn=({stepData:e,setCanContinue:t,onSaveData:o,appearance:n})=>{let i=e.props,[r,l]=vr([]),[p,d]=vr(!1),[s,m]=vr(e.id);return Pr(()=>{r.length==0&&!p&&(d(!0),o({choice:[]}))},[p]),Pr(()=>{s!==e.id&&(m(e.id),l([]))},[e]),Pr(()=>{o({choice:r}),r.length>=i.minChoices?t(!0):t(!1)},[r]),st.createElement(on,{className:a("selectListContainer",n)},st.createElement(rn,null,st.createElement(nn,{className:a("selectListTitle",n)},e.title),st.createElement(sn,{appearance:n,className:a("selectListSubtitle",n)},e.subtitle)),i.options.map((c,x)=>{let S=r.includes(c.id);return st.createElement(ln,{key:`select-item-${x}`,onClick:()=>{if(r.includes(c.id)){l(r.filter(F=>F!==c.id));return}r.length<i.maxChoices?l([...r,c.id]):r.length==1&&i.maxChoices==1&&l([c.id])},hideBottomBorder:x===i.options.length-1,className:a("selectListSelectItem",n)},st.createElement(an,{className:a("selectListItemImage",n)},c.imageUri&&st.createElement(pn,{src:c.imageUri,alt:`select-icon-${x}`}),st.createElement(dn,{appearance:n,className:a("selectListSelectItemText",n)},c.title)),st.createElement(nt,{appearance:n,value:S,primaryColor:n.theme.colorPrimary}))}))};import Ue,{useEffect as mn,useState as fo}from"react";var _p=({children:e,id:t,shouldWrap:o=!1})=>Ue.createElement(Ue.Fragment,null,o?Ue.createElement("div",{key:t,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,overflowY:"auto"}},e):e),jo=({appearance:e,steps:t,selectedStep:o,customStepTypes:n,customVariables:i,onButtonClick:r,onStepCompletion:l,flowId:p,type:d,hideOnFlowCompletion:s,onComplete:m,setVisible:c,setShowModal:x,onDismiss:S,showPagination:F=!1,customFormElements:b,allowBackNavigation:g,validationHandler:B,onFormDataChange:y,showFooter:E,prefillData:A,updateUrlOnPageChange:I})=>{var M;let w=T(T({},{linkCollection:en,multiInput:Hi,callToAction:tn,selectList:cn}),n),{primaryCTAClickSideEffects:f,secondaryCTAClickSideEffects:P}=ae(),[N,L]=fo(!1),[O,U]=fo({}),[W,V]=fo(!1),[le,Z]=fo(!1),[q,he]=fo(null),Pe=(M=t[o])!=null?M:null,{markStepCompleted:Se,markStepStarted:G,isLoading:Y,updateCustomVariables:te,markFlowCompleted:Ve}=ee();mn(()=>{te(i)},[i,Y]),mn(()=>{y&&y(O,Le(),t[o],o)},[O]);function Le(){var _;return{data:(_=O[t[o].id])!=null?_:{},stepId:t[o].id,customVariables:i}}function R(D,_,J){let Ce=o+1<t.length?t[o+1]:null;return l&&l(D,J,Ce,O,Le()),r?r(D,o,_,Ce):!0}function ce(D,_){U(J=>{let Ce={};return Ce[D.id]=_,T(T({},J),Ce)})}function Ae(D){return D.selectedStep.imageUri?Ue.createElement(Yi,{image:D.selectedStep.imageUri,appearance:e,className:a("formContainerSidebarImage",e)}):null}let be=E&&Ue.createElement(Zi,{step:t[o],canContinue:N&&!W,formType:d,selectedStep:o,appearance:e,onPrimaryClick:()=>$(void 0,null,function*(){if(V(!0),B){let J=yield B(t[o],o,t[o+1],O,Le());if(J!==!0){he(typeof J=="string"?J:null),V(!1);return}else he(null)}let D=T({},Le());yield Se(p,t[o].id,D),o+1<t.length&&(yield G(p,t[o+1].id));let _=R(t[o],"primary",o);if(o+1>=t.length&&(m&&m(),S&&S(),s&&_&&(c&&c(!1),x(!1)),yield Ve(p)),f(t[o]),V(!1),window&&g&&o+1<t.length&&(window.location.hash=t[o+1].id),window&&!g&&I&&o+1<t.length){let J=new URL(window.location.href);J.searchParams.set("p",t[o+1].id),window.history.pushState({},"",J.toString())}}),onSecondaryClick:()=>{R(t[o],"secondary",o),P(t[o])},onBack:()=>$(void 0,null,function*(){o-1>=0&&(V(!0),yield G(p,t[o-1].id),V(!1))}),steps:t,allowBackNavigation:g,errorMessage:q,isSaving:W});return Ue.createElement(Ue.Fragment,null,Ue.createElement(Ki,{className:a("formContainer",e)},Ue.createElement(_p,{id:o,shouldWrap:d==="large-modal"},Ue.createElement(qi,{key:Pe.id,type:d,className:a("formContent",e)},t.map(D=>{let _=w[D.type];return Pe.id!==D.id?null:Ue.createElement(_,{key:D.id,stepData:D,canContinue:N,setCanContinue:L,onSaveData:J=>{ce(D,J)},appearance:e,customFormElements:b,flowId:p,prefillData:A})}),F&&Ue.createElement(Ri,{className:a("formPagination",e),appearance:e,stepCount:t.length,currentStep:o}),be)),d=="large-modal"&&Ue.createElement(Ae,{selectedStep:t[o]})))};import go from"react";import{createGlobalStyle as Hp}from"styled-components";var jp=Hp`
681
+ ${e=>e.inlineStyles.map(([t,o])=>`.${lo}${t}.${lo}${t} { ${Object.entries(o).map(([n,i])=>typeof i=="object"?`${n} { ${Object.entries(i).map(([l,p])=>`${Bo(l)}: ${p};`).join(" ")} }`:`${Bo(n)}: ${i};`).join(" ")} }`).join(" ")}`;function ne({appearance:e}){if(!e||!e.styleOverrides)return go.createElement(go.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([o,n])=>typeof n=="object");return t.length===0?go.createElement(go.Fragment,null):go.createElement(jp,{inlineStyles:t})}var fn=({flowId:e,customStepTypes:t={},type:o="inline",visible:n,setVisible:i,customVariables:r,customFormElements:l,onComplete:p,appearance:d,hideOnFlowCompletion:s=!0,onStepCompletion:m,onButtonClick:c,dismissible:x=!0,endFlowOnDismiss:S=!1,modalPosition:F="center",repeatable:b=!1,onDismiss:g,showPagination:B=!1,allowBackNavigation:y=!1,validationHandler:E,showFrigadeBranding:A=!1,onFormDataChange:I,showFooter:h=!0,prefillData:w={},updateUrlOnPageChange:f=!1})=>{var D;let{getFlow:P,getFlowSteps:N,isLoading:L,targetingLogicShouldHideFlow:O,getFlowStatus:U,getCurrentStepIndex:W,markFlowCompleted:V,markFlowNotStarted:le,markStepStarted:Z}=ee(),q=W(e),{mergeAppearanceWithDefault:he}=oe(),[Pe,Se]=un(!1),[G,Y]=un(!1),{setOpenFlowState:te,getOpenFlowState:Ve,hasOpenModals:Le}=ve(),R=N(e);d=he(d);let[ce,Ae]=n!==void 0&&i!==void 0?[n,i]:[Ve(e,!0),_=>te(e,_)];if(Br(()=>{!Pe&&!L&&(Se(!0),(U(e)===Q&&b||U(e)===$e)&&(U(e)===Q&&b&&le(e),window&&window.localStorage&&Object.keys(window.localStorage).forEach(J=>{J.startsWith(Tr)&&window.localStorage.removeItem(J)})),Se(!0))},[Pe,Se,L]),Br(()=>{window&&y&&!G&&(window.location.hash=R[q].id,Y(!0))},[y,G,Y]),Br(()=>{var _;if(window&&((_=window==null?void 0:window.location)!=null&&_.hash)&&window.location.hash.replace("#","")!==R[q].id){let J=window.location.hash.replace("#",""),Ce=R.findIndex(De=>De.id===J);Ce!==-1&&Ce!==q&&Z(e,R[Ce].id)}},[(D=window==null?void 0:window.location)==null?void 0:D.hash]),L)return null;let be=P(e);if(!be||O(be)||!R||n!==void 0&&n===!1||U(e)===Q&&s||(o=="modal"||o=="corner-modal")&&Le(e))return null;let M=()=>{Ae(!1),g&&g(),S===!0&&V(e)};if(F=="center"&&o==="modal"||o==="large-modal"){let _={padding:"24px"};return o==="large-modal"?(_.width="85%",_.height="90%",_.maxHeight="800px",_.minHeight="500px",_.padding="0"):_.width="400px",Re.createElement(Je,{appearance:d,onClose:M,visible:ce,style:_,dismissible:x,showFrigadeBranding:A},Re.createElement(ne,{appearance:d}),Re.createElement(jo,{appearance:d,steps:R,selectedStep:q,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:s,onComplete:p,setVisible:i,setShowModal:Ae,onDismiss:g,showPagination:B,customFormElements:l,allowBackNavigation:y,validationHandler:E,onFormDataChange:I,showFooter:h,prefillData:w,updateUrlOnPageChange:f}))}return o==="modal"&&F!=="center"?Re.createElement(No,{appearance:d,onClose:M,visible:ce,modalPosition:F},Re.createElement(ne,{appearance:d}),Re.createElement(jo,{appearance:d,steps:R,selectedStep:q,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:s,onComplete:p,setVisible:i,setShowModal:Ae,onDismiss:g,showPagination:B,customFormElements:l,allowBackNavigation:y,validationHandler:E,onFormDataChange:I,showFooter:h,prefillData:w,updateUrlOnPageChange:f})):Re.createElement(Re.Fragment,null,Re.createElement(ne,{appearance:d}),Re.createElement(jo,{appearance:d,steps:R,selectedStep:q,customStepTypes:t,customVariables:r,onButtonClick:c,onStepCompletion:m,flowId:e,type:o,hideOnFlowCompletion:s,onComplete:p,setVisible:i,setShowModal:Ae,onDismiss:g,showPagination:B,customFormElements:l,allowBackNavigation:y,validationHandler:E,onFormDataChange:I,showFooter:h,prefillData:w,updateUrlOnPageChange:f}))},gn=fn;import{useCallback as Er,useContext as Vp,useEffect as Gp}from"react";function Ar(){let{organizationId:e,userId:t,setOrganizationId:o}=Vp(X),{mutateUserFlowState:n}=Me(),{config:i,apiUrl:r}=Xe(),l=Ut(),{verifySDKInitiated:p}=Wt();function d(x,S){return`frigade-user-group-registered-${x}-${S}`}Gp(()=>{if(t&&e){if(t.startsWith(zt))return;let x=d(t,e);localStorage.getItem(x)||(l(`${r}userGroups`,H(T({},i),{method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})})),localStorage.setItem(x,"true"))}},[t,e]);let s=Er(x=>$(this,null,function*(){if(!p())return;if(!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let S={foreignUserId:t,foreignUserGroupId:e,properties:x};yield l(`${r}userGroups`,H(T({},i),{method:"POST",body:JSON.stringify(S)})),n()}),[e,t,i,n]),m=Er((x,S)=>$(this,null,function*(){if(!p())return;if(!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationIdInternal:e,userId:t});return}let b={foreignUserId:t,foreignUserGroupId:e,events:[{event:x,properties:S}]};yield l(`${r}userGroups`,H(T({},i),{method:"POST",body:JSON.stringify(b)})),n()}),[e,t,i,n]),c=Er((x,S)=>$(this,null,function*(){if(p())if(S){let F=d(t,x);localStorage.setItem(F,"true"),o(x);let b={foreignUserId:t,foreignUserGroupId:x,properties:S};yield l(`${r}userGroups`,H(T({},i),{method:"POST",body:JSON.stringify(b)})),n()}else o(x)}),[t,i,n]);return{organizationId:e,setOrganizationId:o,setOrganizationIdWithProperties:c,addPropertiesToOrganization:s,trackEventForOrganization:m}}var xn="frigade-xFrigade_guestUserId",ho="frigade-xFrigade_userId",hn=({})=>{let{setFlowResponses:e}=no(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:n}=Me(),{userId:i,setUserId:r}=so(),[l,p]=Vo(i),{getFlowStatus:d}=ee(),{flows:s,userProperties:m,setIsNewGuestUser:c,flowResponses:x}=Kp(X),[S,F]=Vo([]),[b,g]=Vo([]),{organizationId:B}=Ar(),[y,E]=Vo(B);xo(()=>{if(!o&&t)for(let w=0;w<t.length;w++){let f=t[w],P=s.find(N=>N.slug===(f==null?void 0:f.flowId));if(P&&f&&f.shouldTrigger===!0&&P.type=="FORM"&&P.triggerType==="AUTOMATIC"&&!b.includes(P.slug)){setTimeout(()=>{A(f.flowId)},500);break}}},[o,t]),xo(()=>{x.length>0&&n()},[x]);function A(w){let f=s.find(P=>P.slug===w);f&&f.triggerType==="AUTOMATIC"&&!b.includes(f.slug)&&(g([...b,f.slug]),F([f]))}function I(){if(!i){let w=localStorage.getItem(ho);if(w){r(w);return}let f=localStorage.getItem(xn);if(f){r(f);return}c(!0);let P=zt+qp();try{localStorage.setItem(xn,P)}catch(N){console.log("Failed to save guest user id locally: Local storage unavailable",N)}r(N=>N||P)}}xo(()=>{try{if(s){let w=[];s.forEach(f=>{if(f.data){let P=f.data.match(/"imageUri":"(.*?)"/g);P&&P.forEach(N=>{let L=N.replace('"imageUri":"',"").replace('"',"");if(w.includes(L))return;let O=new Image;O.src=L,w.push(L)})}})}}catch(w){}},[s]),xo(()=>{if(i!==l&&(e([]),n()),p(i),i&&!i.startsWith(zt))try{localStorage.setItem(ho,i)}catch(w){console.log("Failed to save user id locally: Local storage available",w)}i===null&&setTimeout(()=>{i===null&&I()},50)},[i,s,m]),xo(()=>{B!=y&&(E(B),e([]),n())},[B,y,E]);function h(){return Pt.createElement(Pt.Fragment,null,S.map(w=>d(w.slug)!==$e?null:Pt.createElement("span",{key:w.slug},Pt.createElement(gn,{flowId:w.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return Pt.createElement(Pt.Fragment,null,Pt.createElement(h,null))};import{ErrorBoundary as yd}from"react-error-boundary";var Cn={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 Yp(e){if(!e)return;let t={};return Object.entries(e).forEach(([o,n])=>{if(Cn[o]){let i=Cn[o].split("."),r=t;i.forEach((l,p)=>{r[l]||(r[l]=p===i.length-1?n:{}),r=r[l]})}}),t}function Xp(e){if(!e)return;let t=ge({},e),o={};return Object.keys(t).forEach(n=>{let i=`.fr-${n}`;o[i]=t[n]}),o}function yn(e){let{theme:t,styleOverrides:o}=e,n=Yp(t),i=Xp(o);return{overrides:n,css:i}}import pd from"styled-components";import{compose as dd,variant as bn}from"styled-system";import Sn from"react";import Jp,{ThemeProvider as Qp,useTheme as Zp}from"styled-components";import{border as Rp,color as ed,compose as td,get as od,shadow as rd,space as id,system as nd,typography as sd}from"styled-system";var ld={width:{property:"width",scale:"sizes",transform:(e,t)=>od(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},ad=Jp("div")(({css:e})=>e,td(Rp,ed,rd,id,sd,nd(ld))),Co=i=>{var r=i,{as:e,children:t,overrides:o}=r,n=Ie(r,["as","children","overrides"]);let l=Zp(),p={border:"none",boxSizing:"border-box",m:0,p:0},d=()=>Sn.createElement(ad,T(T({as:e},p),n),t);if(o!==void 0){let s=ge(l,o);return Sn.createElement(Qp,{theme:s},d())}return d()};var yo={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"}},cd={sm:{paddingX:4,paddingY:1},md:{paddingX:6,paddingY:2}},wn=pd(Co)(()=>({whiteSpace:"nowrap"}),dd(bn({scale:"components.Button",variants:"components.Button"}),bn({prop:"size",variants:cd})));import md from"styled-components";import{variant as ud,system as fd}from"styled-system";var Go={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 Tn=md(Co)(ud({scale:"components.Text",variants:"components.Text"}),fd({fontWeight:{property:"fontWeight",scale:"fontWeights"}}));var Fn=4,kn="px",gd=20,xd=Object.fromEntries(Array.from(Array(gd+1),(e,t)=>t===0?[.5,`${.5*Fn}${kn}`]:[t,`${t*Fn}${kn}`])),Kt={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"},Ir={colors:H(T({},Kt),{neutral:{foreground:Kt.gray300},primary:{background:Kt.blue500,foreground:Kt.white,inverted:Kt.blue500},negative:{foreground:Kt.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:xd,components:{Button:yo,Text:Go}};var Pn="https://api.frigade.com",X=hd({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:it,shouldGracefullyDegrade:!1,setShouldGracefullyDegrade:()=>{},apiUrl:Pn,readonly:!1,debug:!1});function Sd(){Object.keys(localStorage).forEach(e=>{e.startsWith("frigade-")&&localStorage.removeItem(e)})}var bd=({publicApiKey:e,userId:t,organizationId:o,config:n,children:i})=>{var q,he,Pe,Se,G;let[r,l]=je(t||null),[p,d]=je(o||null),[s,m]=je([]),[c,x]=je([]),[S,F]=je([]),[b,g]=je({}),[B,y]=je({}),[E,A]=je([]),[I,h]=je({}),[w,f]=je(!1),[P,N]=je(!1),[L,O]=je(!V(e)),U=(Y,te)=>{if(te==="_blank"){window.open(Y,"_blank");return}setTimeout(()=>{window.location.href=Y},50)},W={theme:T(T({},it.theme),(he=(q=n==null?void 0:n.defaultAppearance)==null?void 0:q.theme)!=null?he:{}),styleOverrides:T(T({},it.styleOverrides),(Se=(Pe=n==null?void 0:n.defaultAppearance)==null?void 0:Pe.styleOverrides)!=null?Se:{})};function V(Y){return!!(Y&&Y.length>10&&Y.substring(0,10)==="api_public")}Ko(()=>{t&&l(t)},[t]),Ko(()=>{r&&window&&window.localStorage&&window.localStorage.getItem(ho)&&window.localStorage.getItem(ho)!==r&&Sd()},[r]),Ko(()=>{o&&d(o)},[o]),Ko(()=>{if(V(e))O(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),O(!0);return}},[e,O]);let le={publicApiKey:e,userId:r,setUserId:l,setFlows:m,flows:s,failedFlowResponses:c,setFailedFlowResponses:x,flowResponses:S,setFlowResponses:F,userProperties:b,setUserProperties:g,openFlowStates:B,setOpenFlowStates:y,completedFlowsToKeepOpenDuringSession:E,setCompletedFlowsToKeepOpenDuringSession:A,customVariables:I,setCustomVariables:h,isNewGuestUser:w,setIsNewGuestUser:f,hasActiveFullPageFlow:P,setHasActiveFullPageFlow:N,organizationId:p,setOrganizationId:d,navigate:n&&n.navigate?n.navigate:U,defaultAppearance:W,shouldGracefullyDegrade:L,setShouldGracefullyDegrade:O,apiUrl:n&&n.apiUrl?n.apiUrl:Pn,readonly:n&&n.readonly?n.readonly:!1,debug:n&&n.debug?n.debug:!1};if(L)return vt.createElement(X.Provider,{value:le},i);let{overrides:Z}=yn(W);return vt.createElement(yd,{fallback:vt.createElement(vt.Fragment,null,i)},vt.createElement(X.Provider,{value:le},vt.createElement(Cd,{theme:ge(W.theme,Ir,Z!=null?Z:{},(G=n==null?void 0:n.theme)!=null?G:{})},i,vt.createElement(hn,null))))};import pc from"react";import xe,{useEffect as ol,useState as rl}from"react";import qe,{useState as Wd}from"react";import At from"styled-components";import Xo from"react";import Bt from"react";import Bn from"styled-components";var vn=Bn.span`
681
682
  font-weight: 600;
682
683
  font-size: 14px;
683
684
  font-style: normal;
@@ -688,8 +689,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
688
689
  vertical-align: middle;
689
690
  margin-left: 32px;
690
691
  padding-right: 12px;
691
- ${e=>ve(e)}
692
- `,nd=fn.div`
692
+ ${e=>Oe(e)}
693
+ `,wd=Bn.div`
693
694
  flex-direction: row;
694
695
  justify-content: space-between;
695
696
  display: flex;
@@ -697,12 +698,12 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
697
698
  padding-bottom: 20px;
698
699
  padding-right: 8px;
699
700
  width: 100%;
700
- ${e=>ve(e)}
701
- `,Wo=({label:e,value:t,labelStyle:o={},labelPosition:i="right",style:r,primaryColor:n="#000000",checkBoxType:s="round",appearance:p})=>wt.createElement(wt.Fragment,null,wt.createElement(nd,{className:a("checklistStepsContainer",p),appearance:p,styleOverrides:{...r}},i==="left"&&e&&wt.createElement(un,{className:a("checklistStepLabel",p),styleOverrides:o,appearnace:p},e),wt.createElement(Ze,{appearance:p,value:t,type:s,primaryColor:n}),i==="right"&&e&&wt.createElement(un,{className:a("checklistStepLabel",p),styleOverrides:o,appearance:p},e)),wt.createElement(oe,{appearance:p}));import fo from"styled-components";var gn=fo.div`
701
+ ${e=>Oe(e)}
702
+ `,qo=({label:e,value:t,labelStyle:o={},labelPosition:n="right",style:i,primaryColor:r="#000000",checkBoxType:l="round",appearance:p})=>Bt.createElement(Bt.Fragment,null,Bt.createElement(wd,{className:a("checklistStepsContainer",p),appearance:p,styleOverrides:T({},i)},n==="left"&&e&&Bt.createElement(vn,{className:a("checklistStepLabel",p),styleOverrides:o,appearnace:p},e),Bt.createElement(nt,{appearance:p,value:t,type:l,primaryColor:r}),n==="right"&&e&&Bt.createElement(vn,{className:a("checklistStepLabel",p),styleOverrides:o,appearance:p},e)),Bt.createElement(ne,{appearance:p}));import So from"styled-components";var En=So.div`
702
703
  font-weight: 700;
703
704
  font-size: 18px;
704
705
  line-height: 22px;
705
- `,xn=fo.p`
706
+ `,An=So.p`
706
707
  font-weight: 600;
707
708
  font-size: 16px;
708
709
  line-height: 24px;
@@ -710,7 +711,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
710
711
  letter-spacing: 0.32px;
711
712
  font-style: normal;
712
713
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
713
- `,hn=fo.p`
714
+ `,In=So.p`
714
715
  font-weight: 400;
715
716
  font-size: 14px;
716
717
  font-style: normal;
@@ -719,45 +720,45 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
719
720
  letter-spacing: 0.28px;
720
721
  margin: 8px 0px 0px 0px;
721
722
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
722
- `,_o=fo.div`
723
+ `,Yo=So.div`
723
724
  width: 6px;
724
725
  position: absolute;
725
726
  left: 0;
726
727
  height: 100%;
727
728
  border-top-right-radius: 4px;
728
729
  border-bottom-right-radius: 4px;
729
- `,Cn=fo.div`
730
+ `,On=So.div`
730
731
  flex-direction: row;
731
732
  justify-content: flex-start;
732
733
  border-bottom: 1px solid ${e=>e.theme.colorBorder};
733
734
  padding-right: 16px;
734
- `;var yn=({data:e,index:t,isSelected:o,primaryColor:i,style:r,onClick:n,appearance:s})=>{var p,c;return Ho.createElement("div",{style:{position:"relative",paddingLeft:"0px"},onClick:()=>{n()}},o&&Ho.createElement(_o,{className:a("checklistStepItemSelectedIndicator",s),layoutId:"checklis-step-selected",style:{backgroundColor:((p=s==null?void 0:s.theme)==null?void 0:p.colorPrimary)??i}}),Ho.createElement(Cn,{className:a("checklistStepItem",s),key:`hero-checklist-step-${t}`,appearance:s,role:"listitem"},Ho.createElement(Wo,{value:e.complete,labelPosition:"left",label:e.stepName??e.title,style:r,primaryColor:((c=s==null?void 0:s.theme)==null?void 0:c.colorPrimary)??i,appearance:s})))};import Tt from"react";import kr from"styled-components";import et from"styled-components";var Th=et.div`
735
+ `;var Nn=({data:e,index:t,isSelected:o,primaryColor:n,style:i,onClick:r,appearance:l})=>{var p,d,s,m,c;return Xo.createElement("div",{style:{position:"relative",paddingLeft:"0px"},onClick:()=>{r()}},o&&Xo.createElement(Yo,{className:a("checklistStepItemSelectedIndicator",l),layoutId:"checklis-step-selected",style:{backgroundColor:(d=(p=l==null?void 0:l.theme)==null?void 0:p.colorPrimary)!=null?d:n}}),Xo.createElement(On,{className:a("checklistStepItem",l),key:`hero-checklist-step-${t}`,appearance:l,role:"listitem"},Xo.createElement(qo,{value:e.complete,labelPosition:"left",label:(s=e.stepName)!=null?s:e.title,style:i,primaryColor:(c=(m=l==null?void 0:l.theme)==null?void 0:m.colorPrimary)!=null?c:n,appearance:l})))};import Et from"react";import Or from"styled-components";import lt from"styled-components";var oC=lt.div`
735
736
  background: #ffffff;
736
737
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
737
738
  border-radius: 20px;
738
739
  width: 385px;
739
740
  padding: 24px 16px 16px 16px;
740
- `,Fh=et.div`
741
+ `,rC=lt.div`
741
742
  /* Border bottom only on collapsable */
742
- `,kh=et.div`
743
+ `,iC=lt.div`
743
744
  display: flex;
744
745
  flex-direction: row;
745
746
  justify-content: space-between;
746
747
  align-content: flex-start;
747
- `,Ph=et.h1`
748
+ `,nC=lt.h1`
748
749
  display: flex;
749
750
  margin: 0;
750
751
  font-size: 18px;
751
- `,vh=et.h2`
752
+ `,sC=lt.h2`
752
753
  font-size: 15px;
753
754
  color: #4d4d4d;
754
- `,Bh=et.ul`
755
+ `,lC=lt.ul`
755
756
  list-style: none;
756
- `,Eh=et.li`
757
+ `,aC=lt.li`
757
758
  display: flex;
758
759
  justify-content: flex-start;
759
760
  flex-direction: row;
760
- `,Sn=et.div`
761
+ `,Ln=lt.div`
761
762
  position: absolute;
762
763
  left: 0;
763
764
  top: 0;
@@ -765,7 +766,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
765
766
  width: ${e=>e.fgWidth};
766
767
  border-radius: 20px;
767
768
  background-color: ${e=>e.theme.colorPrimary};
768
- `,bn=et.div`
769
+ `,Dn=lt.div`
769
770
  position: relative;
770
771
  left: 0;
771
772
  top: 0;
@@ -775,33 +776,33 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
775
776
  border-radius: 20px;
776
777
  background-color: ${e=>e.theme.colorPrimary};
777
778
  opacity: 0.12;
778
- `;var sd=kr.div`
779
+ `;var Td=Or.div`
779
780
  display: flex;
780
781
  flex-direction: ${e=>e.textLocation=="top"?"column":"row"};
781
782
  justify-content: flex-start;
782
783
  align-items: ${e=>e.textLocation=="top"?"flex-end":"center"};
783
784
  width: 100%;
784
785
 
785
- ${e=>ve(e)}
786
- `,ld=kr.div`
786
+ ${e=>Oe(e)}
787
+ `,Fd=Or.div`
787
788
  flex-grow: 1;
788
789
  position: relative;
789
790
  ${e=>e.textLocation=="top"?"width: 100%;":""}
790
- `,ad=kr.span`
791
+ `,kd=Or.span`
791
792
  font-weight: 600;
792
793
  font-size: 14px;
793
794
  line-height: 18px;
794
795
  padding-right: ${e=>e.padding};
795
796
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
796
797
  margin-bottom: ${e=>e.textLocation=="top"?"8px":"0px"};
797
- ${e=>ve(e)}
798
- `;var De=({count:e,total:t,display:o="count",textLocation:i="left",style:r={},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",l=Math.round(e/t*100),g=o==="compact"?"5px":"14px",d;return o==="count"?d=`${e}/${t}`:o==="compact"?d=`${l}%`:o==="percent"&&(d=`${l}% complete`),i==="top"&&(g="0px"),Tt.createElement(sd,{className:a("progressBarContainer",s),textLocation:i,styleOverrides:r},Tt.createElement(ad,{className:a("progressBarStepText",s),style:{...n,fontSize:o==="compact"?12:14,fontWeight:o==="compact"?400:600},appearance:s,padding:g,textLocation:i},d),Tt.createElement(ld,{textLocation:i,className:a("progressBar",s)},Tt.createElement(Sn,{style:{zIndex:o=="compact"?1:5},fgWidth:p,barHeight:c,appearance:s,className:a("progressBarFill",s)}),Tt.createElement(bn,{className:a("progressBarBackground",s),barHeight:c,appearance:s})))};import go from"react";import dd from"styled-components";import Vo from"react";import jo from"react";var _t=({stepData:e,appearance:t})=>jo.createElement(jo.Fragment,null,jo.createElement(xn,{appearance:t,className:a("checklistStepTitle",t),dangerouslySetInnerHTML:ae(e.title)}),jo.createElement(hn,{appearance:t,className:a("checklistStepSubtitle",t),dangerouslySetInnerHTML:ae(e.subtitle)}));import Pr from"react";var Ht=({stepData:e,appearance:t})=>{let o=()=>{e.handlePrimaryButtonClick&&e.handlePrimaryButtonClick()},i=()=>{e.handleSecondaryButtonClick&&e.handleSecondaryButtonClick()};return Pr.createElement(No,{className:a("ctaContainer",t)},Pr.createElement(R,{appearance:t,title:e.primaryButtonTitle,onClick:o}),e.secondaryButtonTitle&&Pr.createElement(R,{appearance:t,secondary:!0,title:e.secondaryButtonTitle,onClick:i,style:{width:"auto",marginRight:"12px"}}))};var jt=({stepData:e,appearance:t})=>Vo.createElement(Vo.Fragment,null,Vo.createElement(_t,{stepData:e,appearance:t}),Vo.createElement(Ht,{stepData:e,appearance:t}));import pd from"react";function wn(e){return pd.createElement(Ke,{appearance:e.appearance,videoUri:e.videoUri})}var vr="default",cd=dd.img`
798
+ ${e=>Oe(e)}
799
+ `;var We=({count:e,total:t,display:o="count",textLocation:n="left",style:i={},textStyle:r={},appearance:l})=>{if(t===0)return Et.createElement(Et.Fragment,null);let p=e===0?"10px":`${e/t*100}%`,d=o==="compact"?"5px":"10px",s=Math.round(e/t*100),m=o==="compact"?"5px":"14px",c;return o==="count"?c=`${e}/${t}`:o==="compact"?c=`${s}%`:o==="percent"&&(c=`${s}% complete`),n==="top"&&(m="0px"),Et.createElement(Td,{className:a("progressBarContainer",l),textLocation:n,styleOverrides:i},Et.createElement(kd,{className:a("progressBarStepText",l),style:H(T({},r),{fontSize:o==="compact"?12:14,fontWeight:o==="compact"?400:600}),appearance:l,padding:m,textLocation:n},c),Et.createElement(Fd,{textLocation:n,className:a("progressBar",l)},Et.createElement(Ln,{style:{zIndex:o=="compact"?1:5},fgWidth:p,barHeight:d,appearance:l,className:a("progressBarFill",l)}),Et.createElement(Dn,{className:a("progressBarBackground",l),barHeight:d,appearance:l})))};import bo from"react";import vd from"styled-components";import Qo from"react";import Jo from"react";var qt=({stepData:e,appearance:t})=>Jo.createElement(Jo.Fragment,null,Jo.createElement(An,{appearance:t,className:a("checklistStepTitle",t),dangerouslySetInnerHTML:pe(e.title)}),Jo.createElement(In,{appearance:t,className:a("checklistStepSubtitle",t),dangerouslySetInnerHTML:pe(e.subtitle)}));import Nr from"react";var Yt=({stepData:e,appearance:t})=>{let o=()=>{e.handlePrimaryButtonClick&&e.handlePrimaryButtonClick()},n=()=>{e.handleSecondaryButtonClick&&e.handleSecondaryButtonClick()};return Nr.createElement(Wo,{className:a("ctaContainer",t)},Nr.createElement(re,{appearance:t,title:e.primaryButtonTitle,onClick:o}),e.secondaryButtonTitle&&Nr.createElement(re,{appearance:t,secondary:!0,title:e.secondaryButtonTitle,onClick:n,style:{width:"auto",marginRight:"12px"}}))};var Xt=({stepData:e,appearance:t})=>Qo.createElement(Qo.Fragment,null,Qo.createElement(qt,{stepData:e,appearance:t}),Qo.createElement(Yt,{stepData:e,appearance:t}));import Pd from"react";function $n(e){return Pd.createElement(Ze,{appearance:e.appearance,videoUri:e.videoUri})}var Lr="default",Bd=vd.img`
799
800
  border-radius: 4px;
800
801
  max-height: 260px;
801
802
  min-height: 200px;
802
- `,Tn=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return go.createElement("div",null,o)}return go.createElement(gn,{className:a("checklistStepContent",t)},e.imageUri?go.createElement(cd,{className:a("checklistStepImage",t),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?go.createElement(wn,{videoUri:e.videoUri,appearance:t}):null,go.createElement(jt,{stepData:e,appearance:t}))};import $e,{useRef as md,useState as ud}from"react";import Vt from"styled-components";var Fn=Vt.div`
803
+ `,Mn=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return bo.createElement("div",null,o)}return bo.createElement(En,{className:a("checklistStepContent",t)},e.imageUri?bo.createElement(Bd,{className:a("checklistStepImage",t),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?bo.createElement($n,{videoUri:e.videoUri,appearance:t}):null,bo.createElement(Xt,{stepData:e,appearance:t}))};import ze,{useRef as Ed,useState as Ad}from"react";import Jt from"styled-components";var Un=Jt.div`
803
804
  display: block;
804
- `,fd=Vt.div`
805
+ `,Id=Jt.div`
805
806
  display: flex;
806
807
  flex-direction: row;
807
808
  flex-wrap: wrap;
@@ -811,20 +812,20 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
811
812
  align-content: center;
812
813
  margin-top: 24px;
813
814
  margin-bottom: 24px;
814
- `,gd=Vt.div`
815
+ `,Od=Jt.div`
815
816
  display: flex;
816
817
  align-items: center;
817
818
  justify-content: flex-start;
818
819
  flex-direction: column;
819
820
  margin-right: 16px;
820
- `,xd=Vt.video`
821
+ `,Nd=Jt.video`
821
822
  width: 200px;
822
823
  height: 120px;
823
- `,hd=Vt.div`
824
+ `,Ld=Jt.div`
824
825
  font-size: 14px;
825
826
  line-height: 20px;
826
827
  text-align: center;
827
- `,Cd=Vt.div`
828
+ `,Dd=Jt.div`
828
829
  position: absolute;
829
830
  width: 200px;
830
831
  height: 120px;
@@ -844,9 +845,9 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
844
845
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
845
846
  border-radius: 50%;
846
847
  }
847
- `,kn="videoCarousel",Pn=({stepData:e,appearance:t})=>{var r;if(!((r=e.props)!=null&&r.videos))return $e.createElement(Fn,null,$e.createElement(jt,{stepData:e,appearance:t}));function o({video:n}){let s=md(),[p,c]=ud(!1);return $e.createElement(gd,null,!p&&$e.createElement(Cd,{onClick:()=>{c(!0),s.current.play()},appearance:t},$e.createElement(Oo,null)),$e.createElement(xd,{controls:p,ref:s,play:p,src:n.uri}),$e.createElement(hd,null,n.title))}let i=e.props;return i.videos?$e.createElement(Fn,null,$e.createElement(_t,{stepData:e,appearance:t}),$e.createElement(fd,null,i.videos.map((n,s)=>$e.createElement("span",{key:`${n.uri}-${s}`},$e.createElement(o,{video:n})))),$e.createElement(Ht,{stepData:e,appearance:t})):null};import tt from"react";import Go from"styled-components";var vn=Go.div`
848
+ `,Wn="videoCarousel",zn=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.videos))return ze.createElement(Un,null,ze.createElement(Xt,{stepData:e,appearance:t}));function o({video:r}){let l=Ed(),[p,d]=Ad(!1);return ze.createElement(Od,null,!p&&ze.createElement(Dd,{onClick:()=>{d(!0),l.current.play()},appearance:t},ze.createElement(zo,null)),ze.createElement(Nd,{controls:p,ref:l,play:p,src:r.uri}),ze.createElement(Ld,null,r.title))}let n=e.props;return n.videos?ze.createElement(Un,null,ze.createElement(qt,{stepData:e,appearance:t}),ze.createElement(Id,null,n.videos.map((r,l)=>ze.createElement("span",{key:`${r.uri}-${l}`},ze.createElement(o,{video:r})))),ze.createElement(Yt,{stepData:e,appearance:t})):null};import at from"react";import Zo from"styled-components";var _n=Zo.div`
848
849
  display: block;
849
- `,yd=Go.pre`
850
+ `,$d=Zo.pre`
850
851
  display: block;
851
852
  background-color: #2a2a2a;
852
853
  color: #f8f8f8;
@@ -862,29 +863,29 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
862
863
  white-space: -o-pre-wrap; /* Opera 7 */
863
864
  word-wrap: break-word; /* Internet Explorer 5.5+ */
864
865
  margin-bottom: 24px;
865
- `,Sd=Go.div`
866
+ `,Md=Zo.div`
866
867
  font-size: 15px;
867
868
  line-height: 20px;
868
869
  margin-bottom: 12px;
869
870
  margin-top: 12px;
870
- `,bd=Go.div`
871
+ `,Ud=Zo.div`
871
872
  margin-top: 24px;
872
- `,Bn="codeSnippet",En=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.codeSnippets))return tt.createElement(vn,null,tt.createElement(jt,{stepData:e,appearance:t}));let o=e.props;return o.codeSnippets?tt.createElement(vn,null,tt.createElement(_t,{stepData:e,appearance:t}),tt.createElement(bd,null,o.codeSnippets.map((r,n)=>tt.createElement("div",{key:n},r.title?tt.createElement(Sd,null,r.title):null,r.code?tt.createElement(yd,null,r.code):null))),tt.createElement(Ht,{stepData:e,appearance:t})):null};var Td=Ft.div`
873
+ `,Hn="codeSnippet",jn=({stepData:e,appearance:t})=>{var n;if(!((n=e.props)!=null&&n.codeSnippets))return at.createElement(_n,null,at.createElement(Xt,{stepData:e,appearance:t}));let o=e.props;return o.codeSnippets?at.createElement(_n,null,at.createElement(qt,{stepData:e,appearance:t}),at.createElement(Ud,null,o.codeSnippets.map((i,r)=>at.createElement("div",{key:r},i.title?at.createElement(Md,null,i.title):null,i.code?at.createElement($d,null,i.code):null))),at.createElement(Yt,{stepData:e,appearance:t})):null};var zd=At.div`
873
874
  display: flex;
874
875
  flex-direction: row;
875
876
  overflow: hidden;
876
877
  min-width: ${e=>e.type!="modal"?"600px":"100%"};
877
878
  background: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
878
879
  border-radius: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.borderRadius}}px;
879
- ${e=>ve(e)}
880
- `,Fd=Ft.h1`
880
+ ${e=>Oe(e)}
881
+ `,_d=At.h1`
881
882
  font-size: 18px;
882
883
  font-style: normal;
883
884
  font-weight: 700;
884
885
  line-height: 24px;
885
886
  letter-spacing: 0.36px;
886
887
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
887
- `,kd=Ft.h2`
888
+ `,Hd=At.h2`
888
889
  font-size: 14px;
889
890
  font-style: normal;
890
891
  font-weight: 400;
@@ -892,44 +893,44 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
892
893
  letter-spacing: 0.28px;
893
894
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
894
895
  margin: 10px 0px 0px 0px;
895
- `,An=Ft.div``,Pd=Ft.div`
896
+ `,Vn=At.div``,jd=At.div`
896
897
  list-style: none;
897
898
  padding: 0;
898
899
  margin: 0;
899
900
  cursor: pointer;
900
901
  width: 300px;
901
- `,vd=Ft.div`
902
+ `,Vd=At.div`
902
903
  width: 1px;
903
904
  margin-right: 40px;
904
905
  background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
905
- `,Bd=Ft.div`
906
+ `,Gd=At.div`
906
907
  flex: 2;
907
908
  padding: 2rem 2rem 2rem 0rem;
908
- `,Ed=({title:e,subtitle:t,steps:o=[],style:i={},selectedStep:r,setSelectedStep:n,className:s="",customStepTypes:p=new Map,appearance:c,type:l})=>{let{mergeAppearanceWithDefault:g}=Z();c=g(c);let x={...{[vr]:Tn,[kn]:Pn,[Bn]:En},...p},[k,S]=wd(0),b=r??k,u=n??S,v=o.filter(C=>C.complete===!0).length,T=()=>{var C;return!((C=o[b])!=null&&C.type)||!x[o[b].type]?x[vr]({stepData:o[b],appearance:c}):x[o[b].type]({stepData:o[b],appearance:c})};return He.createElement(Td,{type:l,styleOverrides:i,className:s,appearance:c},He.createElement(An,{style:{flex:1}},He.createElement(An,{style:{padding:"28px 0px 28px 28px",borderBottom:"1px solid #E5E5E5"}},He.createElement(Fd,{className:a("checklistTitle",c),appearance:c},e),He.createElement(kd,{className:a("checklistSubtitle",c),appearance:c},t),He.createElement(De,{total:o.length,count:v,style:{marginTop:"24px",paddingRight:"40px"},appearance:c})),He.createElement(Pd,{className:a("checklistStepsContainer",c)},o.map((C,N)=>He.createElement(yn,{data:C,index:N,key:N,listLength:o.length,isSelected:N===b,primaryColor:c.theme.colorPrimary,style:{justifyContent:"space-between"},onClick:()=>{u(N)},appearance:c})))),He.createElement(vd,{appearance:c,className:a("checklistDivider",c)}),He.createElement(Bd,null,He.createElement(T,null)))},Br=Ed;import M,{useState as Ld}from"react";import In from"react";import Ad from"styled-components";var Id=Ad.svg`
909
+ `,Kd=({title:e,subtitle:t,steps:o=[],style:n={},selectedStep:i,setSelectedStep:r,className:l="",customStepTypes:p=new Map,appearance:d,type:s})=>{let{mergeAppearanceWithDefault:m}=oe();d=m(d);let c={[Lr]:Mn,[Wn]:zn,[Hn]:jn},x=T(T({},c),p),[S,F]=Wd(0),b=i!=null?i:S,g=r!=null?r:F,B=o.filter(E=>E.complete===!0).length,y=()=>{var E;return!((E=o[b])!=null&&E.type)||!x[o[b].type]?x[Lr]({stepData:o[b],appearance:d}):x[o[b].type]({stepData:o[b],appearance:d})};return qe.createElement(zd,{type:s,styleOverrides:n,className:l,appearance:d},qe.createElement(Vn,{style:{flex:1}},qe.createElement(Vn,{style:{padding:"28px 0px 28px 28px",borderBottom:"1px solid #E5E5E5"}},qe.createElement(_d,{className:a("checklistTitle",d),appearance:d},e),qe.createElement(Hd,{className:a("checklistSubtitle",d),appearance:d},t),qe.createElement(We,{total:o.length,count:B,style:{marginTop:"24px",paddingRight:"40px"},appearance:d})),qe.createElement(jd,{className:a("checklistStepsContainer",d)},o.map((E,A)=>qe.createElement(Nn,{data:E,index:A,key:A,listLength:o.length,isSelected:A===b,primaryColor:d.theme.colorPrimary,style:{justifyContent:"space-between"},onClick:()=>{g(A)},appearance:d})))),qe.createElement(Vd,{appearance:d,className:a("checklistDivider",d)}),qe.createElement(Gd,null,qe.createElement(y,null)))},Dr=Kd;import j,{useState as Qd}from"react";import Gn from"react";import qd from"styled-components";var Yd=qd.svg`
909
910
  transition: 'transform 0.35s ease-in-out';
910
- `,Gt=({style:e,className:t})=>In.createElement(Id,{width:"7",height:"10",viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e,className:t},In.createElement("path",{d:"M1 13L7.5 7L0.999999 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));import xe from"styled-components";var Er={boxShadow:"0px 6px 25px rgba(0, 0, 0, 0.06)",padding:"32px",maxHeight:"700px",msOverflowStyle:"none",scrollbarWidth:"none",paddingBottom:"12px",minHeight:"610px"},Nn=xe.div`
911
+ `,Qt=({style:e,className:t})=>Gn.createElement(Yd,{width:"7",height:"10",viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e,className:t},Gn.createElement("path",{d:"M1 13L7.5 7L0.999999 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));import ye from"styled-components";var $r={boxShadow:"0px 6px 25px rgba(0, 0, 0, 0.06)",padding:"32px",maxHeight:"700px",msOverflowStyle:"none",scrollbarWidth:"none",paddingBottom:"12px",minHeight:"610px"},Kn=ye.div`
911
912
  max-height: 350px;
912
913
  padding-bottom: 40px;
913
- `,On=xe.div`
914
+ `,qn=ye.div`
914
915
  display: flex;
915
916
  flex-direction: column;
916
917
  margin-top: 20px;
917
- `,Ln=xe.h1`
918
+ `,Yn=ye.h1`
918
919
  font-style: normal;
919
920
  font-weight: 600;
920
921
  font-size: 30px;
921
922
  line-height: 36px;
922
923
  margin-bottom: 16px;
923
924
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
924
- `,Dn=xe.h2`
925
+ `,Xn=ye.h2`
925
926
  font-weight: 400;
926
927
  font-size: 16px;
927
928
  line-height: 20px;
928
929
  margin-bottom: 16px;
929
930
  padding-left: 1px;
930
931
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
931
- `,$n=xe.div`
932
- ${e=>P(e)} {
932
+ `,Jn=ye.div`
933
+ ${e=>v(e)} {
933
934
  border: 1px solid #fafafa;
934
935
  }
935
936
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
@@ -938,12 +939,12 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
938
939
  flex-direction: column;
939
940
  min-height: 240px;
940
941
  overflow: hidden;
941
- `,Mn=xe.div`
942
+ `,Qn=ye.div`
942
943
  display: flex;
943
944
  flex-direction: row;
944
945
  justify-content: space-between;
945
- `,Un=xe.p`
946
- ${e=>P(e)} {
946
+ `,Zn=ye.p`
947
+ ${e=>v(e)} {
947
948
  font-weight: 400;
948
949
  font-size: 10px;
949
950
  line-height: 12px;
@@ -951,13 +952,13 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
951
952
  color: #8c8c8c;
952
953
  margin: 20px;
953
954
  }
954
- `,zn=xe.div`
955
+ `,Rn=ye.div`
955
956
  display: flex;
956
957
  flex-direction: row;
957
- `,Wn=xe.div`
958
+ `,es=ye.div`
958
959
  flex: 1;
959
- `,_n=xe.div`
960
- ${e=>P(e)} {
960
+ `,ts=ye.div`
961
+ ${e=>v(e)} {
961
962
  display: flex;
962
963
  justify-content: center;
963
964
  align-content: center;
@@ -966,8 +967,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
966
967
  padding-left: 8px;
967
968
  padding-right: 8px;
968
969
  }
969
- `,Hn=xe.p`
970
- ${e=>P(e)} {
970
+ `,os=ye.p`
971
+ ${e=>v(e)} {
971
972
  font-style: normal;
972
973
  font-weight: 600;
973
974
  font-size: 22px;
@@ -978,8 +979,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
978
979
  margin-top: 20px;
979
980
  margin-bottom: 16px;
980
981
  }
981
- `,jn=xe.p`
982
- ${e=>P(e)} {
982
+ `,rs=ye.p`
983
+ ${e=>v(e)} {
983
984
  font-weight: 400;
984
985
  font-size: 14px;
985
986
  line-height: 18px;
@@ -987,15 +988,15 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
987
988
  color: ${e=>e.appearance.theme.colorTextSecondary};
988
989
  margin-bottom: 8px;
989
990
  }
990
- `,Vn=xe.div`
991
- ${e=>P(e)} {
991
+ `,is=ye.div`
992
+ ${e=>v(e)} {
992
993
  display: flex;
993
994
  flex-direction: row;
994
995
  justify-content: center;
995
996
  gap: 8px;
996
997
  }
997
- `,Gn=xe.div`
998
- ${e=>P(e)} {
998
+ `,ns=ye.div`
999
+ ${e=>v(e)} {
999
1000
  // Anything inside this block will be ignored if the user provides a custom class
1000
1001
  background-color: ${e=>e.selected?"#FAFAFA":"#FFFFFF"};
1001
1002
  :hover {
@@ -1014,8 +1015,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1014
1015
  justify-content: space-between;
1015
1016
  position: relative;
1016
1017
  cursor: pointer;
1017
- `,Kn=xe.p`
1018
- ${e=>P(e)} {
1018
+ `,ss=ye.p`
1019
+ ${e=>v(e)} {
1019
1020
  // Anything inside this block will be ignored if the user provides a custom class
1020
1021
  color: ${e=>e.selected?"#434343":"#BFBFBF"};
1021
1022
  }
@@ -1023,12 +1024,12 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1023
1024
  font-size: 14px;
1024
1025
  line-height: 22px;
1025
1026
  margin: 0;
1026
- `,qn=xe.div`
1027
+ `,ls=ye.div`
1027
1028
  display: flex;
1028
1029
  flex-direction: row;
1029
1030
  justify-content: flex-end;
1030
1031
  align-content: center;
1031
- `,Yn=xe.div`
1032
+ `,as=ye.div`
1032
1033
  display: flex;
1033
1034
  flex: 1;
1034
1035
  flex-direction: row;
@@ -1036,14 +1037,14 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1036
1037
  align-content: center;
1037
1038
  align-items: center;
1038
1039
  margin-right: 20px;
1039
- `,Xn=xe.div`
1040
+ `,ps=ye.div`
1040
1041
  display: block;
1041
1042
  width: 100%;
1042
- `;import Nd from"styled-components";var Jn=Nd.div`
1043
+ `;import Xd from"styled-components";var ds=Xd.div`
1043
1044
  flex-direction: column;
1044
1045
  justify-content: center;
1045
1046
  display: flex;
1046
- `;import rt from"react";import ot from"styled-components";var Qn=ot.div`
1047
+ `;import dt from"react";import pt from"styled-components";var cs=pt.div`
1047
1048
  border: 1px solid #fafafa;
1048
1049
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
1049
1050
  border-radius: 14px;
@@ -1051,14 +1052,14 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1051
1052
  display: flex;
1052
1053
  flex-direction: column;
1053
1054
  overflow: hidden;
1054
- `,Zn=ot.div`
1055
+ `,ms=pt.div`
1055
1056
  display: flex;
1056
1057
  flex-wrap: wrap;
1057
1058
  justify-content: space-between;
1058
1059
  overflow: hidden;
1059
1060
  row-gap: 10px;
1060
- `,Rn=ot.div`
1061
- ${e=>P(e)} {
1061
+ `,us=pt.div`
1062
+ ${e=>v(e)} {
1062
1063
  color: #595959;
1063
1064
  }
1064
1065
  text-transform: uppercase;
@@ -1067,8 +1068,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1067
1068
  line-height: 12px;
1068
1069
  letter-spacing: 0.09em;
1069
1070
  margin-bottom: 12px;
1070
- `,es=ot.div`
1071
- ${e=>P(e)} {
1071
+ `,fs=pt.div`
1072
+ ${e=>v(e)} {
1072
1073
  // Anything inside this block will be ignored if the user provides a custom class
1073
1074
  background: #ffffff;
1074
1075
  border: 1px solid #fafafa;
@@ -1080,8 +1081,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1080
1081
 
1081
1082
  max-width: 150px;
1082
1083
  min-width: 200px;
1083
- `,ts=ot.div`
1084
- ${e=>P(e)} {
1084
+ `,gs=pt.div`
1085
+ ${e=>v(e)} {
1085
1086
  background: radial-gradient(50% 50% at 50% 50%, #ffffff 0%, #f7f7f7 100%);
1086
1087
  }
1087
1088
  width: 40px;
@@ -1092,14 +1093,14 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1092
1093
  justify-content: center;
1093
1094
  align-content: center;
1094
1095
  align-items: center;
1095
- `,os=ot.div`
1096
+ `,xs=pt.div`
1096
1097
  font-weight: 600;
1097
1098
  font-size: 20px;
1098
1099
  line-height: 24px;
1099
1100
  width: 20px;
1100
1101
  height: 20px;
1101
- `,rs=ot.div`
1102
- ${e=>P(e)} {
1102
+ `,hs=pt.div`
1103
+ ${e=>v(e)} {
1103
1104
  color: #434343;
1104
1105
  }
1105
1106
  font-weight: 600;
@@ -1107,20 +1108,20 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1107
1108
  line-height: 17px;
1108
1109
  margin-top: 12px;
1109
1110
  margin-bottom: 8px;
1110
- `,is=ot.div`
1111
- ${e=>P(e)} {
1111
+ `,Cs=pt.div`
1112
+ ${e=>v(e)} {
1112
1113
  color: #8c8c8c;
1113
1114
  }
1114
1115
  font-weight: 400;
1115
1116
  font-size: 12px;
1116
1117
  line-height: 14px;
1117
- `,ns=ot.a`
1118
+ `,ys=pt.a`
1118
1119
  color: ${e=>e.color};
1119
1120
  font-size: 12px;
1120
1121
  line-height: 14px;
1121
1122
  font-weight: 400;
1122
1123
  cursor: pointer;
1123
- `;var Od=({steps:e,style:t,title:o,primaryColor:i,appearance:r,onButtonClick:n})=>{let{primaryCTAClickSideEffects:s}=le();return rt.createElement(Qn,{style:t,className:a("guideContainer",r)},rt.createElement(Rn,{className:a("guideTitle",r)},o),rt.createElement(Zn,{className:a("guideItemContainer",r)},e.map((p,c)=>rt.createElement(es,{key:`guide-${p.id??c}`,className:a("guideItem",r)},p.icon&&rt.createElement(ts,{className:a("guideIcon",r)},rt.createElement(os,null,p.icon)),rt.createElement(rs,{className:a("guideItemTitle",r),dangerouslySetInnerHTML:ae(p.title)}),rt.createElement(is,{className:a("guideItemSubtitle",r),dangerouslySetInnerHTML:ae(p.subtitle)}),rt.createElement(ns,{className:a("guideItemLink",r),color:i,onClick:()=>{p.primaryButtonUri&&s(p),n&&n(p)}},p.primaryButtonTitle)))))},xo=Od;var Dd=({steps:e,title:t,subtitle:o,stepsTitle:i,visible:r,onClose:n,selectedStep:s,setSelectedStep:p,customStepTypes:c,appearance:l,guideData:g,guideTitle:d,onGuideButtonClick:x})=>{let k=({stepData:h,handleSecondaryCTAClick:w,handleCTAClick:f})=>h?M.createElement(_n,{className:a("checklistStepContainer",l),"data-testid":"checklistStepContainer"},M.createElement(Hn,{appearance:l,className:a("checklistStepTitle",l),dangerouslySetInnerHTML:ae(h.title)}),M.createElement(jn,{appearance:l,className:a("checklistStepSubtitle",l),dangerouslySetInnerHTML:ae(h.subtitle)}),M.createElement(Vn,{className:a("checklistCTAContainer",l)},h.secondaryButtonTitle&&M.createElement(R,{title:h.secondaryButtonTitle,onClick:w,appearance:l,secondary:!0}),M.createElement(R,{title:h.primaryButtonTitle,onClick:f,appearance:l}))):M.createElement(M.Fragment,null),b={...{default:h=>{var I;if((I=e[T])!=null&&I.StepContent){let O=e[T].StepContent;return M.createElement("div",null,O)}let w=e[T];return M.createElement(k,{stepData:h,handleCTAClick:()=>{w.handlePrimaryButtonClick&&w.handlePrimaryButtonClick()},handleSecondaryCTAClick:()=>{w.handleSecondaryButtonClick&&w.handleSecondaryButtonClick()}})}},...c},[u,v]=Ld(0),T=s??u,C=p??v,N=()=>{var h;return e?!((h=e[T])!=null&&h.type)||!b[e[T].type]?b.default(e[T]):b[e[T].type]({stepData:e[T],primaryColor:l.theme.colorPrimary}):M.createElement(M.Fragment,null)},A=e.filter(h=>h.complete).length;return r?(l.theme.modalContainer||(l.theme.borderRadius&&(Er.borderRadius=l.theme.borderRadius+"px"),l.theme.modalContainer=Er),M.createElement(Ve,{onClose:n,visible:r,appearance:l},M.createElement(Xn,null,M.createElement(On,null,M.createElement(Ln,{appearance:l,className:a("checklistTitle",l)},t),M.createElement(Dn,{appearance:l,className:a("checklistSubtitle",l)},o)),M.createElement(Nn,null,e&&e.length>0&&M.createElement($n,{className:a("stepsContainer",l)},M.createElement(Mn,null,M.createElement("div",{style:{flex:3}},M.createElement(Un,{className:a("stepsTitle",l)},i)),M.createElement(Yn,null,M.createElement(De,{style:{width:"100%"},count:A,total:e.length,appearance:l}))),M.createElement(zn,null,M.createElement(Wn,{className:a("checklistStepListContainer",l),appearance:l},e.map((h,w)=>{let f=T===w;return M.createElement(Gn,{selected:f,className:a(`checklistStepListItem${f?"Selected":""}`,l),key:`checklist-guide-step-${h.id??w}`,disabled:h.blocked,onClick:()=>{h.blocked||C(w)},title:h.blocked?"Finish remaining steps to continue":void 0},f&&M.createElement(_o,{className:a("checklistStepItemSelectedIndicator",l),layoutId:"checklist-step-selected",style:{backgroundColor:l.theme.colorPrimary,borderRadius:0,height:"100%",top:"0%",width:"2px"}}),M.createElement(Kn,{selected:f,className:a(`checklistStepListStepName${f?"Selected":""}`,l)},h.stepName),M.createElement(qn,null,M.createElement(Ze,{value:h.complete,type:"round",primaryColor:l.theme.colorPrimary,progress:h.progress,appearance:l}),M.createElement(Jn,null,M.createElement(Gt,{style:{marginLeft:"10px"},color:l.theme.colorBackgroundSecondary}))))})),M.createElement(N,null))),g&&g.length>0&&M.createElement(xo,{steps:g,title:d,primaryColor:l.theme.colorPrimary,style:{border:"none",boxShadow:"none"},appearance:l,onButtonClick:h=>(x&&x(h),!0)}))))):M.createElement(M.Fragment,null)},Ar=Dd;import Be,{useEffect as Ss,useState as bs}from"react";import ye from"react";import it from"styled-components";var ss=it.div`
1124
+ `;var Jd=({steps:e,style:t,title:o,primaryColor:n,appearance:i,onButtonClick:r})=>{let{primaryCTAClickSideEffects:l}=ae();return dt.createElement(cs,{style:t,className:a("guideContainer",i)},dt.createElement(us,{className:a("guideTitle",i)},o),dt.createElement(ms,{className:a("guideItemContainer",i)},e.map((p,d)=>{var s;return dt.createElement(fs,{key:`guide-${(s=p.id)!=null?s:d}`,className:a("guideItem",i)},p.icon&&dt.createElement(gs,{className:a("guideIcon",i)},dt.createElement(xs,null,p.icon)),dt.createElement(hs,{className:a("guideItemTitle",i),dangerouslySetInnerHTML:pe(p.title)}),dt.createElement(Cs,{className:a("guideItemSubtitle",i),dangerouslySetInnerHTML:pe(p.subtitle)}),dt.createElement(ys,{className:a("guideItemLink",i),color:n,onClick:()=>{p.primaryButtonUri&&l(p),r&&r(p)}},p.primaryButtonTitle))})))},wo=Jd;var Zd=({steps:e,title:t,subtitle:o,stepsTitle:n,visible:i,onClose:r,selectedStep:l,setSelectedStep:p,customStepTypes:d,appearance:s,guideData:m,guideTitle:c,onGuideButtonClick:x})=>{let S=({stepData:h,handleSecondaryCTAClick:w,handleCTAClick:f})=>h?j.createElement(ts,{className:a("checklistStepContainer",s),"data-testid":"checklistStepContainer"},j.createElement(os,{appearance:s,className:a("checklistStepTitle",s),dangerouslySetInnerHTML:pe(h.title)}),j.createElement(rs,{appearance:s,className:a("checklistStepSubtitle",s),dangerouslySetInnerHTML:pe(h.subtitle)}),j.createElement(is,{className:a("checklistCTAContainer",s)},h.secondaryButtonTitle&&j.createElement(re,{title:h.secondaryButtonTitle,onClick:w,appearance:s,secondary:!0}),j.createElement(re,{title:h.primaryButtonTitle,onClick:f,appearance:s}))):j.createElement(j.Fragment,null),b=T(T({},{default:h=>{var N;if((N=e[y])!=null&&N.StepContent){let L=e[y].StepContent;return j.createElement("div",null,L)}let w=e[y];return j.createElement(S,{stepData:h,handleCTAClick:()=>{w.handlePrimaryButtonClick&&w.handlePrimaryButtonClick()},handleSecondaryCTAClick:()=>{w.handleSecondaryButtonClick&&w.handleSecondaryButtonClick()}})}}),d),[g,B]=Qd(0),y=l!=null?l:g,E=p!=null?p:B,A=()=>{var h;return e?!((h=e[y])!=null&&h.type)||!b[e[y].type]?b.default(e[y]):b[e[y].type]({stepData:e[y],primaryColor:s.theme.colorPrimary}):j.createElement(j.Fragment,null)},I=e.filter(h=>h.complete).length;return i?(s.theme.modalContainer||(s.theme.borderRadius&&($r.borderRadius=s.theme.borderRadius+"px"),s.theme.modalContainer=$r),j.createElement(Je,{onClose:r,visible:i,appearance:s},j.createElement(ps,null,j.createElement(qn,null,j.createElement(Yn,{appearance:s,className:a("checklistTitle",s)},t),j.createElement(Xn,{appearance:s,className:a("checklistSubtitle",s)},o)),j.createElement(Kn,null,e&&e.length>0&&j.createElement(Jn,{className:a("stepsContainer",s)},j.createElement(Qn,null,j.createElement("div",{style:{flex:3}},j.createElement(Zn,{className:a("stepsTitle",s)},n)),j.createElement(as,null,j.createElement(We,{style:{width:"100%"},count:I,total:e.length,appearance:s}))),j.createElement(Rn,null,j.createElement(es,{className:a("checklistStepListContainer",s),appearance:s},e.map((h,w)=>{var P;let f=y===w;return j.createElement(ns,{selected:f,className:a(`checklistStepListItem${f?"Selected":""}`,s),key:`checklist-guide-step-${(P=h.id)!=null?P:w}`,disabled:h.blocked,onClick:()=>{h.blocked||E(w)},title:h.blocked?"Finish remaining steps to continue":void 0},f&&j.createElement(Yo,{className:a("checklistStepItemSelectedIndicator",s),layoutId:"checklist-step-selected",style:{backgroundColor:s.theme.colorPrimary,borderRadius:0,height:"100%",top:"0%",width:"2px"}}),j.createElement(ss,{selected:f,className:a(`checklistStepListStepName${f?"Selected":""}`,s)},h.stepName),j.createElement(ls,null,j.createElement(nt,{value:h.complete,type:"round",primaryColor:s.theme.colorPrimary,progress:h.progress,appearance:s}),j.createElement(ds,null,j.createElement(Qt,{style:{marginLeft:"10px"},color:s.theme.colorBackgroundSecondary}))))})),j.createElement(A,null))),m&&m.length>0&&j.createElement(wo,{steps:m,title:c,primaryColor:s.theme.colorPrimary,style:{border:"none",boxShadow:"none"},appearance:s,onButtonClick:h=>(x&&x(h),!0)}))))):j.createElement(j.Fragment,null)},Mr=Zd;import Ne,{useEffect as Ls,useState as Ds}from"react";import Te from"react";import ct from"styled-components";var Ss=ct.div`
1124
1125
  background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
1125
1126
  border: 1px solid;
1126
1127
  border-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
@@ -1132,19 +1133,19 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1132
1133
  display: flex;
1133
1134
  flex-direction: column;
1134
1135
  transition: max-height 0.25s;
1135
- `,ls=it.div`
1136
+ `,bs=ct.div`
1136
1137
  display: flex;
1137
1138
  margin-bottom: 20px;
1138
- `,as=it.img`
1139
+ `,ws=ct.img`
1139
1140
  border-radius: 4px;
1140
1141
  max-height: 260px;
1141
1142
  min-height: 200px;
1142
- `,ps=it.div`
1143
+ `,Ts=ct.div`
1143
1144
  display: flex;
1144
1145
  flex-direction: row;
1145
1146
  justify-content: space-between;
1146
1147
  align-items: center;
1147
- `,ds=it.p`
1148
+ `,Fs=ct.p`
1148
1149
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
1149
1150
  font-style: normal;
1150
1151
  font-weight: 500;
@@ -1155,23 +1156,23 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1155
1156
  :hover {
1156
1157
  opacity: 0.8;
1157
1158
  }
1158
- `,cs=it.div`
1159
+ `,ks=ct.div`
1159
1160
  cursor: pointer;
1160
1161
  color: ${e=>e.appearance.theme.colorTextSecondary};
1161
1162
  :hover {
1162
1163
  opacity: 0.8;
1163
1164
  }
1164
- `,wy=it.div``,ms=it.p`
1165
+ `,i0=ct.div``,Ps=ct.p`
1165
1166
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
1166
1167
  font-weight: 400;
1167
1168
  font-size: 14px;
1168
1169
  line-height: 22px;
1169
- `,us=it.div`
1170
+ `,vs=ct.div`
1170
1171
  display: flex;
1171
1172
  flex-direction: row;
1172
1173
  justify-content: flex-start;
1173
1174
  align-items: center;
1174
- `;var fs=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:i,onSecondaryButtonClick:r,appearance:n,customStepTypes:s})=>{var d;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 l(){return ye.createElement(ye.Fragment,null,e.imageUri||e.videoUri?ye.createElement(ls,{className:a("stepMediaContainer",n)},e.imageUri?ye.createElement(as,{className:a("stepImage",n),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?ye.createElement(Ke,{appearance:n,videoUri:e.videoUri}):null):null,ye.createElement(ms,{className:a("stepSubtitle",n),appearance:n,dangerouslySetInnerHTML:ae(e.subtitle)}),ye.createElement(No,{className:a("checklistCTAContainer",n)},e.secondaryButtonTitle?ye.createElement(R,{secondary:!0,title:e.secondaryButtonTitle,onClick:()=>r(),appearance:n}):null,ye.createElement(R,{title:e.primaryButtonTitle??"Continue",onClick:()=>i(),appearance:n})))}function g(){if(!s)return null;let x=s[e.type];return x?x(e,n):null}return ye.createElement(ss,{"data-testid":`step-${e.id}`,className:a("checklistStepContainer",n),appearance:n},ye.createElement(ps,{className:a("stepHeader",n)},ye.createElement(us,null,ye.createElement(Wo,{value:e.complete,style:{width:"auto",borderTop:0},primaryColor:(d=n==null?void 0:n.theme)==null?void 0:d.colorPrimary,appearance:n}),ye.createElement(ds,{appearance:n,className:a("stepTitle",n),dangerouslySetInnerHTML:ae(e.title),onClick:()=>o()})),ye.createElement(cs,{className:a("stepChevronContainer",n),onClick:()=>o(),appearance:n},ye.createElement(Gt,{style:{...p,transition:"transform 0.2s ease-in-out"}}))),ye.createElement("div",{key:e.id,style:{...c}},g()??l()))};import Kt from"styled-components";var Dy=Kt.div`
1175
+ `;var Bs=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:n,onSecondaryButtonClick:i,appearance:r,customStepTypes:l})=>{var c,x;let p=t?{}:{transform:"rotate(90deg)"},d=t?{overflow:"hidden",maxHeight:"0px",transition:"max-height 0.2s ease-out"}:{overflow:"hidden",maxHeight:"1000px",transition:"max-height 0.15s ease-in"};function s(){var S;return Te.createElement(Te.Fragment,null,e.imageUri||e.videoUri?Te.createElement(bs,{className:a("stepMediaContainer",r)},e.imageUri?Te.createElement(ws,{className:a("stepImage",r),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?Te.createElement(Ze,{appearance:r,videoUri:e.videoUri}):null):null,Te.createElement(Ps,{className:a("stepSubtitle",r),appearance:r,dangerouslySetInnerHTML:pe(e.subtitle)}),Te.createElement(Wo,{className:a("checklistCTAContainer",r)},e.secondaryButtonTitle?Te.createElement(re,{secondary:!0,title:e.secondaryButtonTitle,onClick:()=>i(),appearance:r}):null,Te.createElement(re,{title:(S=e.primaryButtonTitle)!=null?S:"Continue",onClick:()=>n(),appearance:r})))}function m(){if(!l)return null;let S=l[e.type];return S?S(e,r):null}return Te.createElement(Ss,{"data-testid":`step-${e.id}`,className:a("checklistStepContainer",r),appearance:r},Te.createElement(Ts,{className:a("stepHeader",r)},Te.createElement(vs,null,Te.createElement(qo,{value:e.complete,style:{width:"auto",borderTop:0},primaryColor:(c=r==null?void 0:r.theme)==null?void 0:c.colorPrimary,appearance:r}),Te.createElement(Fs,{appearance:r,className:a("stepTitle",r),dangerouslySetInnerHTML:pe(e.title),onClick:()=>o()})),Te.createElement(ks,{className:a("stepChevronContainer",r),onClick:()=>o(),appearance:r},Te.createElement(Qt,{style:H(T({},p),{transition:"transform 0.2s ease-in-out"})}))),Te.createElement("div",{key:e.id,style:T({},d)},(x=m())!=null?x:s()))};import Zt from"styled-components";var C0=Zt.div`
1175
1176
  background: #ffffff;
1176
1177
  box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
1177
1178
  border-radius: 6px;
@@ -1185,26 +1186,26 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1185
1186
 
1186
1187
  max-width: 800px;
1187
1188
  min-width: 350px;
1188
- `,gs=Kt.div`
1189
+ `,Es=Zt.div`
1189
1190
  display: flex;
1190
1191
  flex-direction: column;
1191
- `,xs=Kt.h1`
1192
+ `,As=Zt.h1`
1192
1193
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
1193
1194
  font-style: normal;
1194
1195
  font-weight: 700;
1195
1196
  font-size: 20px;
1196
1197
  line-height: 24px;
1197
1198
  margin-bottom: 8px;
1198
- `,hs=Kt.h2`
1199
+ `,Is=Zt.h2`
1199
1200
  color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
1200
1201
  font-weight: 400;
1201
1202
  font-size: 14px;
1202
1203
  line-height: 23px;
1203
1204
  margin: 2px 0 0 0;
1204
- `,Cs=Kt.div`
1205
+ `,Os=Zt.div`
1205
1206
  display: block;
1206
1207
  width: 100%;
1207
- `,ys=Kt.div`
1208
+ `,Ns=Zt.div`
1208
1209
  display: flex;
1209
1210
  width: 100%;
1210
1211
  flex-direction: column;
@@ -1212,23 +1213,23 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1212
1213
  padding: 24px;
1213
1214
  border-radius: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius}}px;
1214
1215
  background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
1215
- `;var $d=({title:e,subtitle:t,steps:o,onClose:i,visible:r,autoExpandFirstIncompleteStep:n=!0,autoCollapse:s=!0,autoExpandNextStep:p=!0,selectedStep:c,setSelectedStep:l,appearance:g,type:d,className:x,customStepTypes:k,style:S})=>{let b=o.filter(w=>w.complete).length,[u,v]=bs(Array(o.length).fill(!0)),[T,C]=bs(!1);Ss(()=>{let w=[...u];if(n){for(let f=0;f<o.length;f++)if(!o[f].complete){w[f]=!1;break}v(w)}},[]),Ss(()=>{if(!T&&!n){C(!0);return}N(c)},[c]);let N=w=>{let f=[...u];if(s)for(let F=0;F<u.length;++F)F!==w&&(f[F]=!0);f[w]=!f[w],v(f)};if(!r&&d=="modal")return Be.createElement(Be.Fragment,null);let A=Be.createElement(Be.Fragment,null,Be.createElement(gs,null,Be.createElement(xs,{appearance:g,className:a("checklistTitle",g),dangerouslySetInnerHTML:ae(e)}),Be.createElement(hs,{appearance:g,className:a("checklistSubtitle",g),dangerouslySetInnerHTML:ae(t)})),Be.createElement(De,{display:"percent",count:b,total:o.length,style:{margin:"14px 0px 8px 0px"},appearance:g})),h=Be.createElement(Cs,{className:Ce(a("checklistContainer",g),x)},o.map((w,f)=>{let F=u[f];return Be.createElement(fs,{appearance:g,stepData:w,collapsed:F,key:`modal-checklist-${w.id??f}`,onClick:()=>{if(c===f){N(f);return}l(f)},onPrimaryButtonClick:()=>{w.handlePrimaryButtonClick&&w.handlePrimaryButtonClick(),p&&!w.completionCriteria&&f<u.length-1&&u[f+1]&&l(f+1)},onSecondaryButtonClick:()=>{w.handleSecondaryButtonClick&&w.handleSecondaryButtonClick()},customStepTypes:k})}));return d==="inline"?Be.createElement(ys,{appearance:g,className:Ce(a("checklistInlineContainer",g),x),style:S},A,h):Be.createElement(Be.Fragment,null,Be.createElement(Ve,{onClose:i,visible:r,appearance:g,style:{maxWidth:"600px"},headerContent:A},h))},Ir=$d;import pe,{useEffect as Nr,useRef as Vd,useState as kt}from"react";import{useEffect as Md,useState as Ud}from"react";var ws=()=>{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,i]=Ud(t),r=null,n=()=>{r!==null?clearTimeout(r):s(),r=setTimeout(()=>{s()},16)},s=()=>{let p=Object.fromEntries(Object.entries(e).map(([c,l])=>{if(!window)return[c,!1];let g=window.matchMedia(l);return g.addEventListener("change",n),[c,g.matches]}));i(p)};return Md(()=>{s()},[]),o};import qt from"react";import ce,{css as Ts,keyframes as Fs}from"styled-components";var ks=Ts`
1216
+ `;var Rd=({title:e,subtitle:t,steps:o,onClose:n,visible:i,autoExpandFirstIncompleteStep:r=!0,autoCollapse:l=!0,autoExpandNextStep:p=!0,selectedStep:d,setSelectedStep:s,appearance:m,type:c,className:x,customStepTypes:S,style:F})=>{let b=o.filter(w=>w.complete).length,[g,B]=Ds(Array(o.length).fill(!0)),[y,E]=Ds(!1);Ls(()=>{let w=[...g];if(r){for(let f=0;f<o.length;f++)if(!o[f].complete){w[f]=!1;break}B(w)}},[]),Ls(()=>{if(!y&&!r){E(!0);return}A(d)},[d]);let A=w=>{let f=[...g];if(l)for(let P=0;P<g.length;++P)P!==w&&(f[P]=!0);f[w]=!f[w],B(f)};if(!i&&c=="modal")return Ne.createElement(Ne.Fragment,null);let I=Ne.createElement(Ne.Fragment,null,Ne.createElement(Es,null,Ne.createElement(As,{appearance:m,className:a("checklistTitle",m),dangerouslySetInnerHTML:pe(e)}),Ne.createElement(Is,{appearance:m,className:a("checklistSubtitle",m),dangerouslySetInnerHTML:pe(t)})),Ne.createElement(We,{display:"percent",count:b,total:o.length,style:{margin:"14px 0px 8px 0px"},appearance:m})),h=Ne.createElement(Os,{className:we(a("checklistContainer",m),x)},o.map((w,f)=>{var N;let P=g[f];return Ne.createElement(Bs,{appearance:m,stepData:w,collapsed:P,key:`modal-checklist-${(N=w.id)!=null?N:f}`,onClick:()=>{if(d===f){A(f);return}s(f)},onPrimaryButtonClick:()=>{w.handlePrimaryButtonClick&&w.handlePrimaryButtonClick(),p&&!w.completionCriteria&&f<g.length-1&&g[f+1]&&s(f+1)},onSecondaryButtonClick:()=>{w.handleSecondaryButtonClick&&w.handleSecondaryButtonClick()},customStepTypes:S})}));return c==="inline"?Ne.createElement(Ns,{appearance:m,className:we(a("checklistInlineContainer",m),x),style:F},I,h):Ne.createElement(Ne.Fragment,null,Ne.createElement(Je,{onClose:n,visible:i,appearance:m,style:{maxWidth:"600px"},headerContent:I},h))},Ur=Rd;import de,{useEffect as Wr,useRef as lc,useState as It}from"react";import{useEffect as ec,useState as tc}from"react";var $s=()=>{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,n]=tc(t),i=null,r=()=>{i!==null?clearTimeout(i):l(),i=setTimeout(()=>{l()},16)},l=()=>{let p=Object.fromEntries(Object.entries(e).map(([d,s])=>{if(!window)return[d,!1];let m=window.matchMedia(s);return m.addEventListener("change",r),[d,m.matches]}));n(p)};return ec(()=>{l()},[]),o};import Rt from"react";import me,{css as Ms,keyframes as Us}from"styled-components";var Ws=Ms`
1216
1217
  border: 1px solid ${({theme:e})=>e.colorBorder};
1217
- `,zd=Ts`
1218
+ `,oc=Ms`
1218
1219
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.06);
1219
- `,Wd=Fs`
1220
+ `,rc=Us`
1220
1221
  from {
1221
1222
  opacity: 0;
1222
1223
  } to {
1223
1224
  opacity: 1;
1224
1225
  }
1225
- `,_d=Fs`
1226
+ `,ic=Us`
1226
1227
  from {
1227
1228
  opacity: 1;
1228
1229
  } to {
1229
1230
  opacity: 0;
1230
1231
  }
1231
- `,Ps=ce.div`
1232
+ `,zs=me.div`
1232
1233
  margin: 0 -20px;
1233
1234
  overflow-x: auto;
1234
1235
  padding-left: 20px;
@@ -1245,14 +1246,14 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1245
1246
  ::-webkit-scrollbar {
1246
1247
  display: none;
1247
1248
  }
1248
- `,vs=ce.div`
1249
+ `,_s=me.div`
1249
1250
  display: flex;
1250
1251
  flex-flow: row nowrap;
1251
1252
  gap: 0 16px;
1252
1253
  scroll-snap-align: center;
1253
1254
  scroll-snap-stop: always;
1254
- `,Bs=ce.div`
1255
- animation: ${e=>e.reversed?_d:Wd} 0.25s ease-out;
1255
+ `,Hs=me.div`
1256
+ animation: ${e=>e.reversed?ic:rc} 0.25s ease-out;
1256
1257
  background: linear-gradient(
1257
1258
  to right,
1258
1259
  ${({theme:e})=>e.colorBackground}00,
@@ -1261,8 +1262,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1261
1262
  position: absolute;
1262
1263
  width: 64px;
1263
1264
  z-index: 10;
1264
- `,Es=ce.button`
1265
- ${ks}
1265
+ `,js=me.button`
1266
+ ${Ws}
1266
1267
  box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.1);
1267
1268
  align-items: center;
1268
1269
  border-radius: 50%;
@@ -1273,11 +1274,11 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1273
1274
  justify-content: center;
1274
1275
  position: absolute;
1275
1276
  width: 48px;
1276
- `,As=ce.div`
1277
+ `,Vs=me.div`
1277
1278
  border-radius: ${({theme:e})=>e.borderRadius}px;
1278
1279
  padding: 20px;
1279
- `,Is=ce(As)`
1280
- ${ks}
1280
+ `,Gs=me(Vs)`
1281
+ ${Ws}
1281
1282
  background: ${({theme:e})=>e.colorBackground};
1282
1283
  position: relative;
1283
1284
 
@@ -1289,86 +1290,86 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1289
1290
  ${e=>e.blocked?"":`border: 1px solid ${e.theme.colorPrimary};`}
1290
1291
  ${e=>e.blocked?"cursor: default":"cursor: pointer"}
1291
1292
  }
1292
- `,Ns=ce.img`
1293
+ `,Ks=me.img`
1293
1294
  border-radius: 50%;
1294
1295
  height: 40px;
1295
1296
  margin-bottom: 12px;
1296
1297
  width: 40px;
1297
- `,Os=ce(As)`
1298
- ${e=>P(e)} {
1299
- ${zd}
1298
+ `,qs=me(Vs)`
1299
+ ${e=>v(e)} {
1300
+ ${oc}
1300
1301
 
1301
1302
  background: ${({theme:e})=>e.colorBackground};
1302
1303
  }
1303
- `,Zy=ce.div`
1304
+ `,D0=me.div`
1304
1305
  color: ${({theme:e})=>e.colorPrimary};
1305
1306
  display: flex;
1306
1307
  flex-flow: row nowrap;
1307
1308
  align-items: center;
1308
- `,Ry=ce.div`
1309
+ `,$0=me.div`
1309
1310
  white-space: nowrap;
1310
- `,Ls=ce.div`
1311
+ `,Ys=me.div`
1311
1312
  background: #d8fed8;
1312
1313
  border-radius: 6px;
1313
1314
  float: right;
1314
1315
  margin-bottom: 12px;
1315
1316
  padding: 4px 10px;
1316
- `,Hd=ce.p`
1317
+ `,nc=me.p`
1317
1318
  font-weight: bold;
1318
1319
  font-size: 18px;
1319
1320
  line-height: 22px;
1320
1321
  letter-spacing: calc(18px * -0.01);
1321
1322
  margin: 0;
1322
- `,Ds=ce(Hd)`
1323
+ `,Xs=me(nc)`
1323
1324
  margin-bottom: 4px;
1324
- `,$s=ce.div`
1325
+ `,Js=me.div`
1325
1326
  display: flex;
1326
1327
  flex-flow: row nowrap;
1327
1328
  align-items: center;
1328
1329
  min-width: 50%;
1329
- `,jd=ce.p`
1330
+ `,sc=me.p`
1330
1331
  font-weight: bold;
1331
1332
  font-size: 16px;
1332
1333
  line-height: 20px;
1333
1334
  letter-spacing: calc(16px * -0.01);
1334
1335
  margin: 0;
1335
- `,Ms=ce(jd)`
1336
+ `,Qs=me(sc)`
1336
1337
  margin-bottom: 4px;
1337
1338
  ${e=>e.blocked||e.complete?"opacity: 0.4;":`
1338
1339
  `}
1339
- `,ct=ce.p`
1340
+ `,Ct=me.p`
1340
1341
  color: ${({theme:e})=>e.colorText};
1341
1342
  font-weight: normal;
1342
1343
  font-size: 14px;
1343
1344
  line-height: 22px;
1344
1345
  margin: 0;
1345
- `,Us=ce.p`
1346
+ `,Zs=me.p`
1346
1347
  color: ${({theme:e})=>e.colorText};
1347
1348
  font-weight: 600;
1348
1349
  font-size: 12px;
1349
1350
  line-height: 16px;
1350
1351
  margin: 0;
1351
- `;ct.Loud=ce(ct)`
1352
+ `;Ct.Loud=me(Ct)`
1352
1353
  font-weight: 600;
1353
- `;ct.Quiet=ce(ct)`
1354
+ `;Ct.Quiet=me(Ct)`
1354
1355
  color: ${({theme:e})=>e.colorTextSecondary};
1355
1356
  ${e=>e.blocked||e.complete?"opacity: 0.4;":`
1356
1357
  `}
1357
- `;var zs=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:i}=Z(),{primaryCTAClickSideEffects:r}=le();o=i(o);let{imageUri:n=null,subtitle:s=null,title:p=null,complete:c=!1,blocked:l=!1}=e,g=e.primaryButtonTitle||e.secondaryButtonTitle,d=()=>{r(e)};return qt.createElement(Is,{className:a("carouselCard",o),onClick:l?null:d,style:t,blocked:l,complete:c},n&&qt.createElement(Ns,{className:a("carouselCardImage",o),src:n,alt:p,style:{opacity:c||l?.4:1}}),c&&qt.createElement(Ls,{className:a("carouselCompletedPill",o)},qt.createElement(Us,{style:{color:"#108E0B"}},"Complete")),p&&qt.createElement(Ms,{blocked:l,complete:c,className:a("carouselCardTitle",o)},p),s&&qt.createElement(ct.Quiet,{blocked:l,complete:c,className:a("carouselCardSubtitle",o)},s))};var Gd=()=>pe.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pe.createElement("path",{d:"M14 6L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),pe.createElement("path",{d:"M14 18L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),pe.createElement("path",{d:"M4 12H20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})),Ws=({side:e="left",show:t=!1,onClick:o=()=>{}})=>{let[i,r]=kt(!1),[n,s]=kt(!1);Nr(()=>{t===!0&&i===!1?r(!0):t===!1&&i===!0&&s(!0)},[t]);let p=()=>{r(!1),s(!1)},c=e=="left"?{top:0,bottom:0,left:-20,transform:"rotate(180deg)"}:{top:0,bottom:0,right:-20};return i?pe.createElement(Bs,{style:c,reversed:n,onAnimationEnd:n?p:null},pe.createElement(Es,{onClick:()=>o(),style:{right:16,top:"calc(50% - 24px)"}},pe.createElement(Gd,null))):null},_s=({flowId:e,appearance:t,customVariables:o,className:i})=>{let r=Vd(null),[n,s]=kt(!1),[p,c]=kt(!1),[l,g]=kt(null),[d,x]=kt([]),[k,S]=kt(0),{isSmall:b}=ws(),u=b?1:3,{getFlowMetadata:v,getFlowSteps:T,getNumberOfStepsCompleted:C,updateCustomVariables:N,isLoading:A}=J();Nr(()=>{N(o)},[o,A]),Nr(()=>{if(A)return;let O=v(e),E=C(e),D=T(e);g(O),O.data!==null&&(x(D.sort(($,V)=>Number($.complete)-Number(V.complete))),c(D.length>u),S(E))},[A]);let h=[];for(let O=0;O<d.length;O+=u)h.push(d.slice(O,O+u));let w=O=>{let E=O.target,D=E.scrollWidth-E.clientWidth,$=Math.ceil(E.scrollLeft);$>0&&n===!1&&s(!0),$===0&&n===!0&&s(!1),$<D&&p===!1&&c(!0),$===D&&p===!0&&c(!1)},f=(O=!0)=>{let E=O?1:-1;r.current!==null&&r.current.scrollBy({left:r.current.clientWidth*E,behavior:"smooth"})},F=null,I=O=>{F!==null?clearTimeout(F):w(O),F=setTimeout(()=>{w(O)},16)};return A?null:pe.createElement(Os,{className:Ce(a("carouselContainer",t),i)},pe.createElement("div",{style:{display:"flex",justifyContent:b?"center":"space-between",marginBottom:20,flexWrap:b?"wrap":"nowrap",gap:b?16:20}},pe.createElement("div",null,pe.createElement(Ds,{className:a("carouselTitle",t)},l==null?void 0:l.title),pe.createElement(ct.Quiet,{className:a("carouselSubtitle",t)},l==null?void 0:l.subtitle)),pe.createElement($s,{className:a("progressWrapper",t)},pe.createElement(De,{count:k,total:d.length,appearance:t}))),pe.createElement("div",{style:{position:"relative"}},pe.createElement(Ws,{show:n,onClick:()=>f(!1)}),pe.createElement(Ws,{side:"right",show:p,onClick:f}),pe.createElement(Ps,{ref:r,onScroll:I},h.map((O,E)=>pe.createElement(vs,{key:E,style:{flex:`0 0 calc(100% - ${d.length>u?36:0}px)`}},O.map((D,$)=>pe.createElement(zs,{key:$,stepData:D,style:{flex:d.length>u?`0 1 calc(100% / ${u} - 16px * 2 / ${u})`:1},appearance:t})))))),pe.createElement(oe,{appearance:t}))};var Or=({flowId:e,title:t,subtitle:o,style:i,initialSelectedStep:r,className:n,type:s="inline",onDismiss:p,visible:c,customVariables:l,onStepCompletion:g,onButtonClick:d,appearance:x,hideOnFlowCompletion:k,setVisible:S,customStepTypes:b,checklistStyle:u="default",autoExpandFirstIncompleteStep:v,autoExpandNextStep:T,...C})=>{let{getFlow:N,getFlowSteps:A,markStepCompleted:h,getStepStatus:w,getNumberOfStepsCompleted:f,isLoading:F,targetingLogicShouldHideFlow:I,updateCustomVariables:O,getFlowMetadata:E,isStepBlocked:D,getFlowStatus:$,hasActiveFullPageFlow:V,setHasActiveFullPageFlow:j}=J(),{primaryCTAClickSideEffects:Y,secondaryCTAClickSideEffects:de}=le(),{getOpenFlowState:he,setOpenFlowState:K}=Fe(),[te,Q]=js(r||0),[Se,me]=js(!1),Ee=c===void 0?he(e):c,re=s==="modal",{mergeAppearanceWithDefault:ne}=Z();if(x=ne(x),Hs(()=>{O(l)},[l,F]),Hs(()=>{c!==void 0&&(re&&c===!0?j(!0):re&&c===!1&&j(!1))},[c,S,V]),F)return null;let Te=N(e);if(!Te||I(Te))return null;let L=A(e);if(!L||k===!0&&$(e)===q)return null;let U=E(e);if(U!=null&&U.title&&(t=U.title),U!=null&&U.subtitle&&(o=U.subtitle),!Se&&r===void 0&&f(e)>0){let m=L.findIndex(y=>y.complete===!1);Q(m>-1?m:L.length-1),me(!0)}function _(){if(te+1>=L.length){re&&K(e,!1);return}D(e,L[te+1].id)||Q(te+1)}function X(m,y,B){let z=te+1<L.length?L[te+1]:null;d&&d(m,te,y,z)===!0&&re&&Ie(),g&&g(m,B,z),!g&&!d&&(m.primaryButtonUri||m.secondaryButtonUri)&&re&&Ie()}function H(){return L.map((m,y)=>({...m,handleSecondaryButtonClick:()=>{_(),de(m),m.skippable===!0&&h(e,m.id,{skipped:!0}),X(m,"secondary",y)},handlePrimaryButtonClick:()=>{(!m.completionCriteria&&(m.autoMarkCompleted||m.autoMarkCompleted===void 0)||m.completionCriteria&&m.autoMarkCompleted===!0)&&(h(e,m.id),_()),X(m,"primary",y),Y(m),w(e,m.id)===We&&_()}}))}function se(){return ge.createElement(oe,{appearance:x})}let Ae={steps:H(),title:t,subtitle:o,primaryColor:x.theme.colorPrimary,appearance:x,customStepTypes:b,type:s,className:n,autoExpandFirstIncompleteStep:v,autoExpandNextStep:T};function Ie(){K(e,!1),p&&p(),S&&S(!1)}function Et(){return ge.createElement(ge.Fragment,null,ge.createElement(se,null),ge.createElement(_s,{flowId:e,appearance:x,customVariables:l,className:n}))}function ft(){return ge.createElement(ge.Fragment,null,ge.createElement(se,null),ge.createElement(Ir,{visible:Ee,onClose:()=>{Ie()},selectedStep:te,setSelectedStep:Q,autoExpandNextStep:!0,appearance:x,...Ae}))}function At(){let m=C.guideFlowId,y;return m&&N(m)&&(y=A(m)),ge.createElement(ge.Fragment,null,ge.createElement(se,null),ge.createElement(Ar,{visible:Ee,stepsTitle:U.stepsTitle?U.stepsTitle:"Your quick start guide",onClose:()=>{Ie()},selectedStep:te,setSelectedStep:Q,guideData:y,guideTitle:C.guideTitle??"Guide",appearance:x,title:t,subtitle:o,onGuideButtonClick:B=>{X(B,"link",0)},customStepTypes:b,...Ae}))}function gt(){let m=ge.createElement(Br,{flowId:e,style:i,selectedStep:te,setSelectedStep:Q,appearance:x,type:s,...Ae});return re?ge.createElement(Ve,{onClose:()=>{Ie()},visible:Ee,appearance:x,style:{paddingTop:"0px",padding:"12px",paddingLeft:0}},ge.createElement(se,null),m):ge.createElement(ge.Fragment,null,ge.createElement(se,null),m)}switch(u){case"condensed":return ft();case"with-guide":return At();case"default":return gt();case"carousel":return Et();default:return gt()}};var qd=e=>Kd.createElement(Or,{type:"inline",...e});import ut,{useEffect as Yd}from"react";import Ye from"react";import Ko from"styled-components";var Vs=Ko.div`
1358
+ `;var Rs=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:n}=oe(),{primaryCTAClickSideEffects:i}=ae();o=n(o);let{imageUri:r=null,subtitle:l=null,title:p=null,complete:d=!1,blocked:s=!1}=e,m=e.primaryButtonTitle||e.secondaryButtonTitle,c=()=>{i(e)};return Rt.createElement(Gs,{className:a("carouselCard",o),onClick:s?null:c,style:t,blocked:s,complete:d},r&&Rt.createElement(Ks,{className:a("carouselCardImage",o),src:r,alt:p,style:{opacity:d||s?.4:1}}),d&&Rt.createElement(Ys,{className:a("carouselCompletedPill",o)},Rt.createElement(Zs,{style:{color:"#108E0B"}},"Complete")),p&&Rt.createElement(Qs,{blocked:s,complete:d,className:a("carouselCardTitle",o)},p),l&&Rt.createElement(Ct.Quiet,{blocked:s,complete:d,className:a("carouselCardSubtitle",o)},l))};var ac=()=>de.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},de.createElement("path",{d:"M14 6L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),de.createElement("path",{d:"M14 18L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),de.createElement("path",{d:"M4 12H20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})),el=({side:e="left",show:t=!1,onClick:o=()=>{}})=>{let[n,i]=It(!1),[r,l]=It(!1);Wr(()=>{t===!0&&n===!1?i(!0):t===!1&&n===!0&&l(!0)},[t]);let p=()=>{i(!1),l(!1)},d=e=="left"?{top:0,bottom:0,left:-20,transform:"rotate(180deg)"}:{top:0,bottom:0,right:-20};return n?de.createElement(Hs,{style:d,reversed:r,onAnimationEnd:r?p:null},de.createElement(js,{onClick:()=>o(),style:{right:16,top:"calc(50% - 24px)"}},de.createElement(ac,null))):null},tl=({flowId:e,appearance:t,customVariables:o,className:n})=>{let i=lc(null),[r,l]=It(!1),[p,d]=It(!1),[s,m]=It(null),[c,x]=It([]),[S,F]=It(0),{isSmall:b}=$s(),g=b?1:3,{getFlowMetadata:B,getFlowSteps:y,getNumberOfStepsCompleted:E,updateCustomVariables:A,isLoading:I}=ee();Wr(()=>{A(o)},[o,I]),Wr(()=>{if(I)return;let L=B(e),O=E(e),U=y(e);m(L),L.data!==null&&(x(U.sort((W,V)=>Number(W.complete)-Number(V.complete))),d(U.length>g),F(O))},[I]);let h=[];for(let L=0;L<c.length;L+=g)h.push(c.slice(L,L+g));let w=L=>{let O=L.target,U=O.scrollWidth-O.clientWidth,W=Math.ceil(O.scrollLeft);W>0&&r===!1&&l(!0),W===0&&r===!0&&l(!1),W<U&&p===!1&&d(!0),W===U&&p===!0&&d(!1)},f=(L=!0)=>{let O=L?1:-1;i.current!==null&&i.current.scrollBy({left:i.current.clientWidth*O,behavior:"smooth"})},P=null,N=L=>{P!==null?clearTimeout(P):w(L),P=setTimeout(()=>{w(L)},16)};return I?null:de.createElement(qs,{className:we(a("carouselContainer",t),n)},de.createElement("div",{style:{display:"flex",justifyContent:b?"center":"space-between",marginBottom:20,flexWrap:b?"wrap":"nowrap",gap:b?16:20}},de.createElement("div",null,de.createElement(Xs,{className:a("carouselTitle",t)},s==null?void 0:s.title),de.createElement(Ct.Quiet,{className:a("carouselSubtitle",t)},s==null?void 0:s.subtitle)),de.createElement(Js,{className:a("progressWrapper",t)},de.createElement(We,{count:S,total:c.length,appearance:t}))),de.createElement("div",{style:{position:"relative"}},de.createElement(el,{show:r,onClick:()=>f(!1)}),de.createElement(el,{side:"right",show:p,onClick:f}),de.createElement(zs,{ref:i,onScroll:N},h.map((L,O)=>de.createElement(_s,{key:O,style:{flex:`0 0 calc(100% - ${c.length>g?36:0}px)`}},L.map((U,W)=>de.createElement(Rs,{key:W,stepData:U,style:{flex:c.length>g?`0 1 calc(100% / ${g} - 16px * 2 / ${g})`:1},appearance:t})))))),de.createElement(ne,{appearance:t}))};var zr=A=>{var I=A,{flowId:e,title:t,subtitle:o,style:n,initialSelectedStep:i,className:r,type:l="inline",onDismiss:p,visible:d,customVariables:s,onStepCompletion:m,onButtonClick:c,appearance:x,hideOnFlowCompletion:S,setVisible:F,customStepTypes:b,checklistStyle:g="default",autoExpandFirstIncompleteStep:B,autoExpandNextStep:y}=I,E=Ie(I,["flowId","title","subtitle","style","initialSelectedStep","className","type","onDismiss","visible","customVariables","onStepCompletion","onButtonClick","appearance","hideOnFlowCompletion","setVisible","customStepTypes","checklistStyle","autoExpandFirstIncompleteStep","autoExpandNextStep"]);let{getFlow:h,getFlowSteps:w,markStepCompleted:f,getStepStatus:P,getNumberOfStepsCompleted:N,isLoading:L,targetingLogicShouldHideFlow:O,updateCustomVariables:U,getFlowMetadata:W,isStepBlocked:V,getFlowStatus:le,hasActiveFullPageFlow:Z,setHasActiveFullPageFlow:q}=ee(),{primaryCTAClickSideEffects:he,secondaryCTAClickSideEffects:Pe}=ae(),{getOpenFlowState:Se,setOpenFlowState:G}=ve(),[Y,te]=rl(i||0),[Ve,Le]=rl(!1),R=d===void 0?Se(e):d,ce=l==="modal",{mergeAppearanceWithDefault:Ae}=oe();if(x=Ae(x),ol(()=>{U(s)},[s,L]),ol(()=>{d!==void 0&&(ce&&d===!0?q(!0):ce&&d===!1&&q(!1))},[d,F,Z]),L)return null;let be=h(e);if(!be||O(be))return null;let M=w(e);if(!M||S===!0&&le(e)===Q)return null;let D=W(e);if(D!=null&&D.title&&(t=D.title),D!=null&&D.subtitle&&(o=D.subtitle),!Ve&&i===void 0&&N(e)>0){let u=M.findIndex(k=>k.complete===!1);te(u>-1?u:M.length-1),Le(!0)}function _(){if(Y+1>=M.length){ce&&G(e,!1);return}V(e,M[Y+1].id)||te(Y+1)}function J(u,k,z){let ue=Y+1<M.length?M[Y+1]:null;c&&c(u,Y,k,ue)===!0&&ce&&Ye(),m&&m(u,z,ue),!m&&!c&&(u.primaryButtonUri||u.secondaryButtonUri)&&ce&&Ye()}function Ce(){return M.map((u,k)=>H(T({},u),{handleSecondaryButtonClick:()=>{_(),Pe(u),u.skippable===!0&&f(e,u.id,{skipped:!0}),J(u,"secondary",k)},handlePrimaryButtonClick:()=>{(!u.completionCriteria&&(u.autoMarkCompleted||u.autoMarkCompleted===void 0)||u.completionCriteria&&u.autoMarkCompleted===!0)&&(f(e,u.id),_()),J(u,"primary",k),he(u),P(e,u.id)===Ge&&_()}}))}function De(){return xe.createElement(ne,{appearance:x})}let ot={steps:Ce(),title:t,subtitle:o,primaryColor:x.theme.colorPrimary,appearance:x,customStepTypes:b,type:l,className:r,autoExpandFirstIncompleteStep:B,autoExpandNextStep:y};function Ye(){G(e,!1),p&&p(),F&&F(!1)}function bt(){return xe.createElement(xe.Fragment,null,xe.createElement(De,null),xe.createElement(tl,{flowId:e,appearance:x,customVariables:s,className:r}))}function Dt(){return xe.createElement(xe.Fragment,null,xe.createElement(De,null),xe.createElement(Ur,T({visible:R,onClose:()=>{Ye()},selectedStep:Y,setSelectedStep:te,autoExpandNextStep:!0,appearance:x},ot)))}function $t(){var z;let u=E.guideFlowId,k;return u&&h(u)&&(k=w(u)),xe.createElement(xe.Fragment,null,xe.createElement(De,null),xe.createElement(Mr,T({visible:R,stepsTitle:D.stepsTitle?D.stepsTitle:"Your quick start guide",onClose:()=>{Ye()},selectedStep:Y,setSelectedStep:te,guideData:k,guideTitle:(z=E.guideTitle)!=null?z:"Guide",appearance:x,title:t,subtitle:o,onGuideButtonClick:ue=>{J(ue,"link",0)},customStepTypes:b},ot)))}function C(){let u=xe.createElement(Dr,T({flowId:e,style:n,selectedStep:Y,setSelectedStep:te,appearance:x,type:l},ot));return ce?xe.createElement(Je,{onClose:()=>{Ye()},visible:R,appearance:x,style:{paddingTop:"0px",padding:"12px",paddingLeft:0}},xe.createElement(De,null),u):xe.createElement(xe.Fragment,null,xe.createElement(De,null),u)}switch(g){case"condensed":return Dt();case"with-guide":return $t();case"default":return C();case"carousel":return bt();default:return C()}};var dc=e=>pc.createElement(zr,T({type:"inline"},e));import St,{useEffect as cc}from"react";import et from"react";import Ro from"styled-components";var il=Ro.div`
1358
1359
  border: 1px solid ${e=>e.appearance.theme.colorBorder};
1359
1360
  border-radius: 8px;
1360
1361
  padding: 6px 10px 6px 10px;
1361
1362
  min-width: 160px;
1362
1363
  cursor: pointer;
1363
1364
  background-color: ${e=>e.appearance.theme.colorBackground}};
1364
- `,Gs=Ko.div`
1365
+ `,nl=Ro.div`
1365
1366
  display: flex;
1366
1367
  flex-direction: row;
1367
1368
  justify-content: space-between;
1368
1369
  align-items: center;
1369
1370
  margin-bottom: 2px;
1370
1371
  flex-grow: 2;
1371
- `,Ks=Ko.div`
1372
+ `,sl=Ro.div`
1372
1373
  text-overflow: ellipsis;
1373
1374
  font-weight: 600;
1374
1375
  font-size: 12px;
@@ -1376,13 +1377,13 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1376
1377
  margin-right: ${e=>e.type==="condensed"?"8px":"0"};
1377
1378
  text-align: ${e=>e.type==="condensed"?"left":"right"};
1378
1379
  color: ${e=>e.appearance.theme.colorPrimary};
1379
- `,qs=Ko.div`
1380
+ `,ll=Ro.div`
1380
1381
  width: 20px;
1381
1382
  margin-right: 8px;
1382
1383
  display: flex;
1383
1384
  height: 100%;
1384
1385
  align-items: center;
1385
- `;var Ys=({title:e,count:t,total:o,onClick:i,style:r={},className:n,appearance:s,type:p="default"})=>Ye.createElement(Ye.Fragment,null,Ye.createElement(oe,{appearance:s}),Ye.createElement(Vs,{onClick:()=>i!==void 0&&i(),style:{...p=="condensed"?{display:"flex",justifyContent:"space-between"}:{},...r},className:Ce(n??"",a("progressRingContainer",s)),appearance:s},p=="condensed"&&o&&o!==0&&Ye.createElement(qs,{className:a("progressRingContainer",s)},Ye.createElement($t,{size:19,percentage:t/o,fillColor:s.theme.colorPrimary,bgColor:s.theme.colorBackgroundSecondary})),Ye.createElement(Gs,{type:p,className:a("badgeTitleContainer",s)},Ye.createElement(Ks,{type:p,appearance:s,className:a("badgeTitle",s)},e),i!==void 0&&Ye.createElement(Gt,{className:a("badgeChevron",s),color:s.theme.colorPrimary})),p=="default"&&o&&o!==0&&Ye.createElement(De,{display:"compact",count:t,total:o,bgColor:s.theme.colorBackgroundSecondary,style:{width:"100%"},appearance:s})));import mt from"react";import ho from"styled-components";var Xs=ho.div`
1386
+ `;var al=({title:e,count:t,total:o,onClick:n,style:i={},className:r,appearance:l,type:p="default"})=>et.createElement(et.Fragment,null,et.createElement(ne,{appearance:l}),et.createElement(il,{onClick:()=>n!==void 0&&n(),style:T(T({},p=="condensed"?{display:"flex",justifyContent:"space-between"}:{}),i),className:we(r!=null?r:"",a("progressRingContainer",l)),appearance:l},p=="condensed"&&o&&o!==0&&et.createElement(ll,{className:a("progressRingContainer",l)},et.createElement(Ht,{size:19,percentage:t/o,fillColor:l.theme.colorPrimary,bgColor:l.theme.colorBackgroundSecondary})),et.createElement(nl,{type:p,className:a("badgeTitleContainer",l)},et.createElement(sl,{type:p,appearance:l,className:a("badgeTitle",l)},e),n!==void 0&&et.createElement(Qt,{className:a("badgeChevron",l),color:l.theme.colorPrimary})),p=="default"&&o&&o!==0&&et.createElement(We,{display:"compact",count:t,total:o,bgColor:l.theme.colorBackgroundSecondary,style:{width:"100%"},appearance:l})));import yt from"react";import To from"styled-components";var pl=To.div`
1386
1387
  display: flex;
1387
1388
  flex-direction: row;
1388
1389
  width: 100%;
@@ -1393,25 +1394,25 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1393
1394
  border-width: 1px;
1394
1395
  border-color: ${e=>e.appearance.theme.colorPrimary};
1395
1396
  border-radius: 12px;
1396
- `,Js=ho.div`
1397
- ${e=>P(e)} {
1397
+ `,dl=To.div`
1398
+ ${e=>v(e)} {
1398
1399
  display: flex;
1399
1400
  justify-content: center;
1400
1401
  align-items: center;
1401
1402
  margin-right: 16px;
1402
1403
  }
1403
- `,Qs=ho.div`
1404
+ `,cl=To.div`
1404
1405
  display: flex;
1405
1406
  flex-direction: column;
1406
1407
  flex: 1;
1407
1408
  margin-top: 0;
1408
- `,Zs=ho.div`
1409
+ `,ml=To.div`
1409
1410
  display: flex;
1410
1411
  flex-direction: column;
1411
1412
  justify-content: center;
1412
1413
  margin-left: 16px;
1413
1414
  min-width: 200px;
1414
- `,J0=ho.div`
1415
+ `,$S=To.div`
1415
1416
  display: flex;
1416
1417
  justify-content: center;
1417
1418
  align-items: flex-end;
@@ -1420,7 +1421,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1420
1421
  :hover {
1421
1422
  opacity: 0.8;
1422
1423
  }
1423
- `;var Rs=({title:e,subtitle:t,icon:o,appearance:i,count:r,total:n,className:s,style:p})=>mt.createElement(mt.Fragment,null,mt.createElement(Xs,{appearance:i,className:Ce(a("fullWidthProgressBadgeContainer",i),s??""),style:p},o&&mt.createElement(Js,{className:a("fullWidthProgressBadgeIcon",i)},o),mt.createElement(Qs,null,mt.createElement(Pe,{size:"small",appearance:i,title:e,subtitle:t})),mt.createElement(Zs,{className:a("fullWidthProgressBadgeProgressContainer",i)},mt.createElement(De,{count:r,total:n,display:"percent",textLocation:"top"}))));var Xd=({flowId:e,title:t,subtitle:o,icon:i,style:r,onClick:n,className:s,customVariables:p,hideOnFlowCompletion:c,appearance:l,type:g="default"})=>{let{getFlow:d,getFlowSteps:x,getFlowStatus:k,getNumberOfStepsCompleted:S,isLoading:b,targetingLogicShouldHideFlow:u,updateCustomVariables:v}=J(),{mergeAppearanceWithDefault:T}=Z();l=T(l);let{setOpenFlowState:C,getOpenFlowState:N}=Fe();if(Yd(()=>{v(p)},[p,b]),b)return null;let A=d(e);if(!A||u(A)||c===!0&&k(e)===q)return null;let h=x(e),w=S(e);return g==="full-width"?ut.createElement(ut.Fragment,null,ut.createElement(oe,{appearance:l}),ut.createElement(Rs,{title:t,subtitle:o,count:w,total:h.length,style:r,className:s,appearance:l,icon:i,onClick:()=>{}})):ut.createElement(ut.Fragment,null,ut.createElement(oe,{appearance:l}),ut.createElement(Ys,{count:w,total:h.length,title:t,style:r,onClick:()=>{C(e,!0),n&&n()},type:g,className:s,appearance:l}))};import Jd from"react";var Qd=({flowId:e,style:t,appearance:o,...i})=>{let{getFlow:r,targetingLogicShouldHideFlow:n,getFlowSteps:s}=J(),{mergeAppearanceWithDefault:p}=Z();o=p(o);let c=r(e);if(!c||n(c))return null;let l=s(e);return Jd.createElement(xo,{steps:l,style:t,appearance:o,...i})};import Pt,{useContext as dc,useEffect as cc}from"react";import W,{useEffect as qo,useLayoutEffect as ol,useRef as rc,useState as Yt}from"react";import Co from"styled-components";import{useCallback as Zd,useEffect as Rd,useState as ec}from"react";var Lr=(e,t,o,i={x:20,y:20},r)=>{let n=r=="fixed"?0:window.scrollY,s=r=="fixed"?0:window.scrollX;return t==="left"?{x:e.left-o+i.x+s,y:e.top-i.y+n}:t==="right"?{x:e.left+e.width+i.x+s,y:e.top-i.y+n}:{x:0,y:0}};function el(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:()=>{}},[i,r]=ec(o),n=Zd(()=>{e&&r(e.getBoundingClientRect())},[e]);return Rd(()=>(n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[e,t]),i}import{useContext as tc,useState as oc}from"react";function tl(){let{debug:e}=tc(G),[t,o]=oc([]);function i(n){e&&(t.find(s=>s===n)||(o([...t,n]),console.log(n)))}function r(n){e&&(t.find(s=>s===n)||(o([...t,n]),console.warn(n)))}return{logIfDebugMode:i,logErrorIfDebugMode:r}}var rl=300,il=100,ic=500,Xt=12,nc=Co.div`
1424
+ `;var ul=({title:e,subtitle:t,icon:o,appearance:n,count:i,total:r,className:l,style:p})=>yt.createElement(yt.Fragment,null,yt.createElement(pl,{appearance:n,className:we(a("fullWidthProgressBadgeContainer",n),l!=null?l:""),style:p},o&&yt.createElement(dl,{className:a("fullWidthProgressBadgeIcon",n)},o),yt.createElement(cl,null,yt.createElement(Ee,{size:"small",appearance:n,title:e,subtitle:t})),yt.createElement(ml,{className:a("fullWidthProgressBadgeProgressContainer",n)},yt.createElement(We,{count:i,total:r,display:"percent",textLocation:"top"}))));var mc=({flowId:e,title:t,subtitle:o,icon:n,style:i,onClick:r,className:l,customVariables:p,hideOnFlowCompletion:d,appearance:s,type:m="default"})=>{let{getFlow:c,getFlowSteps:x,getFlowStatus:S,getNumberOfStepsCompleted:F,isLoading:b,targetingLogicShouldHideFlow:g,updateCustomVariables:B}=ee(),{mergeAppearanceWithDefault:y}=oe();s=y(s);let{setOpenFlowState:E,getOpenFlowState:A}=ve();if(cc(()=>{B(p)},[p,b]),b)return null;let I=c(e);if(!I||g(I)||d===!0&&S(e)===Q)return null;let h=x(e),w=F(e);return m==="full-width"?St.createElement(St.Fragment,null,St.createElement(ne,{appearance:s}),St.createElement(ul,{title:t,subtitle:o,count:w,total:h.length,style:i,className:l,appearance:s,icon:n,onClick:()=>{}})):St.createElement(St.Fragment,null,St.createElement(ne,{appearance:s}),St.createElement(al,{count:w,total:h.length,title:t,style:i,onClick:()=>{E(e,!0),r&&r()},type:m,className:l,appearance:s}))};import uc from"react";var fc=i=>{var r=i,{flowId:e,style:t,appearance:o}=r,n=Ie(r,["flowId","style","appearance"]);let{getFlow:l,targetingLogicShouldHideFlow:p,getFlowSteps:d}=ee(),{mergeAppearanceWithDefault:s}=oe();o=s(o);let m=l(e);if(!m||p(m))return null;let c=d(e);return uc.createElement(wo,T({steps:c,style:t,appearance:o},n))};import Ot,{useContext as vc,useEffect as Bc}from"react";import K,{useEffect as er,useLayoutEffect as xl,useRef as Sc,useState as eo}from"react";import Fo from"styled-components";import{useCallback as gc,useEffect as xc,useState as hc}from"react";var _r=(e,t,o,n={x:20,y:20},i)=>{let r=i=="fixed"?0:window.scrollY,l=i=="fixed"?0:window.scrollX;return t==="left"?{x:e.left-o+n.x+l,y:e.top-n.y+r}:t==="right"?{x:e.left+e.width+n.x+l,y:e.top-n.y+r}:{x:0,y:0}};function fl(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:()=>{}},[n,i]=hc(o),r=gc(()=>{e&&i(e.getBoundingClientRect())},[e]);return xc(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[e,t]),n}import{useContext as Cc,useState as yc}from"react";function gl(){let{debug:e}=Cc(X),[t,o]=yc([]);function n(r){e&&(t.find(l=>l===r)||(o([...t,r]),console.log(r)))}function i(r){e&&(t.find(l=>l===r)||(o([...t,r]),console.warn(r)))}return{logIfDebugMode:n,logErrorIfDebugMode:i}}var hl=300,Cl=100,bc=500,to=12,wc=Fo.div`
1424
1425
  width: 100%;
1425
1426
  height: 100%;
1426
1427
  border-radius: 9999px;
@@ -1443,26 +1444,26 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1443
1444
  opacity: 0;
1444
1445
  }
1445
1446
  }
1446
- `,sc=Co.div`
1447
- width: ${Xt}px;
1448
- height: ${Xt}px;
1447
+ `,Tc=Fo.div`
1448
+ width: ${to}px;
1449
+ height: ${to}px;
1449
1450
  border-radius: 100px;
1450
1451
  background-color: ${e=>e.primaryColor};
1451
1452
  z-index: 20;
1452
1453
  opacity: 1;
1453
- `,lc=Co.div`
1454
+ `,Fc=Fo.div`
1454
1455
  pointer-events: all;
1455
- `,nl=Co.div`
1456
+ `,yl=Fo.div`
1456
1457
  display: flex;
1457
1458
  align-content: center;
1458
1459
  justify-content: center;
1459
1460
  align-items: center;
1460
1461
  z-index: ${e=>e.zIndex?e.zIndex:90};
1461
- `,ac=Co(nl)`
1462
- width: ${Xt+12}px;
1463
- height: ${Xt+12}px;
1464
- `,pc=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:i="auto",showHighlight:r=!0,primaryColor:n="#000000",offset:s={x:0,y:0},visible:p=!0,containerStyle:c={},selectedStep:l=0,customStepTypes:g,appearance:d,dismissible:x=!1,showHighlightOnly:k,showStepCount:S=!0,completedStepsCount:b=0,showFrigadeBranding:u=!1,cssPosition:v="absolute"})=>{var Ie,Et,ft,At,gt,m,y,B,z,ue,Qt,jr,Vr,Gr;let{logErrorIfDebugMode:T}=tl(),[C,N]=Yt(),[A,h]=Yt(new Date),w=rc(null),[f,F]=Yt(document.querySelector(e[l].selector)),I=el(f,A),[O,E]=Yt(),[D,$]=Yt(!k),V=(Et=(Ie=e[l])==null?void 0:Ie.props)!=null&&Et.position?e[l].props.position:v,j=((At=(ft=e[l])==null?void 0:ft.props)==null?void 0:At.zIndex)??90,Y=(C==null?void 0:C.width)??rl,de=(C==null?void 0:C.height)??il,[he,K]=Yt(new Date().getTime());s=((m=(gt=e[l])==null?void 0:gt.props)==null?void 0:m.offset)??s;let te=window.location.pathname.split("/").pop();ol(()=>{w.current&&N({width:w.current.clientWidth,height:w.current.clientHeight})},[l,A,V]),qo(()=>{k||$(!0)},[l]);let Q=()=>{let ie=document.querySelector(e[l].selector);if(!ie){E(void 0),F(null),T(`FrigadeTour: Could not find element with selector "${e[l].selector}" for step ${e[l].id}`);return}O&&O===JSON.stringify(ie==null?void 0:ie.getBoundingClientRect())||(F(ie),h(new Date),ie&&E(JSON.stringify(ie.getBoundingClientRect())))};if(qo(()=>{let ie=new MutationObserver(Q);return ie.observe(document.body,{subtree:!0,childList:!0}),()=>ie.disconnect()},[Q]),qo(()=>{let ie=new MutationObserver(Q);return ie.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","class"]}),()=>ie.disconnect()},[Q]),qo(()=>{let ie=setInterval(()=>{Q()},10);return()=>clearInterval(ie)},[Q]),ol(()=>{setTimeout(()=>{Q()},ic),Q()},[l,te]),f===null||!p||I.height===0&&I.width===0&&V!=="fixed"&&v!=="static")return null;let Se=i==="auto"?"right":i,me=Lr(I,Se,Y,s,V),Ee=I.right+Y>(window.innerWidth||document.documentElement.clientWidth),re=I.bottom+il>(window.innerHeight||document.documentElement.clientHeight);Ee&&i==="auto"&&(me=Lr(I,"left",Y,s,V),Se="left"),(B=(y=e[l])==null?void 0:y.props)!=null&&B.tooltipPosition&&((ue=(z=e[l])==null?void 0:z.props)==null?void 0:ue.tooltipPosition)!=="auto"&&(((jr=(Qt=e[l])==null?void 0:Qt.props)==null?void 0:jr.tooltipPosition)==="left"||((Gr=(Vr=e[l])==null?void 0:Vr.props)==null?void 0:Gr.tooltipPosition)==="right")&&(Se=e[l].props.tooltipPosition);let ne=()=>{let ie=()=>{if(e[l].handlePrimaryButtonClick&&(e[l].handlePrimaryButtonClick(),$(!1),setTimeout(()=>{Q()},30)),b===e.length-1)return o()},st=()=>{e[l].handleSecondaryButtonClick&&(e[l].handleSecondaryButtonClick(),k&&!e[l].secondaryButtonUri&&$(!1))};return W.createElement(W.Fragment,null,S&&e.length>1&&W.createElement(ii,null,W.createElement(si,{className:a("tooltipStepCounter",d)},l+1," of ",e.length)),(e[l].primaryButtonTitle||e[l].secondaryButtonTitle)&&W.createElement(ni,{showStepCount:S,className:a("tooltipCTAContainer",d)},e[l].secondaryButtonTitle&&W.createElement(R,{title:e[l].secondaryButtonTitle,appearance:d,onClick:st,size:"small",withMargin:!1,secondary:!0}),e[l].primaryButtonTitle&&W.createElement(R,{title:e[l].primaryButtonTitle,appearance:d,onClick:ie,withMargin:!1,size:"small"})))},Te=()=>W.createElement(W.Fragment,null,x&&W.createElement(Rr,{"data-testid":"tooltip-dismiss",onClick:()=>{t&&t()},className:a("tooltipClose",d),hasImage:!!e[l].imageUri||!!e[l].videoUri},W.createElement(ke,null)),e[l].imageUri&&W.createElement(ei,{dismissible:x,appearance:d,src:e[l].imageUri,className:a("tooltipImageContainer",d)}),e[l].videoUri&&!e[l].imageUri&&W.createElement(ti,{dismissible:x,appearance:d,className:a("tooltipVideoContainer",d)},W.createElement(Ke,{appearance:d,videoUri:e[l].videoUri})),W.createElement(ri,{className:a("tooltipContentContainer",d)},W.createElement(Pe,{appearance:d,title:e[l].title,subtitle:e[l].subtitle,size:"small"}),W.createElement(oi,{className:a("tooltipFooter",d)},W.createElement(ne,null)))),U={...{default:ie=>{var st;if((st=e[l])!=null&&st.StepContent){let jl=e[l].StepContent;return W.createElement("div",null,jl)}return W.createElement(Te,null)}},...g},_=()=>{var ie;return e?!((ie=e[l])!=null&&ie.type)||!U[e[l].type]?U.default(e[l]):U[e[l].type]({stepData:e[l],primaryColor:n}):W.createElement(W.Fragment,null)};if(e[l].complete===!0||me.x==0&&me.y==0&&new Date().getTime()-he<100)return null;let X={top:(me==null?void 0:me.y)-Xt,left:(Se=="left"?I.x+s.x:(me==null?void 0:me.x)-Xt)??0,cursor:k?"pointer":"default",position:V},H=()=>{let st=X.left+(Se=="left"?-Y:24);return Math.min(Math.max(st,20),window.innerWidth-Y-20)},se=()=>{if(V==="fixed")return X.top;let ie=X.top+de,st=20;return ie>window.innerHeight-st?X.top+-de:X.top},Ae=()=>{k&&(h(new Date),$(!D))};return W.createElement(lc,null,W.createElement(ac,{style:X,zIndex:j,className:a("tourHighlightContainer",d)},r&&e[l].showHighlight!==!1&&v!=="static"&&W.createElement(W.Fragment,null,W.createElement(sc,{style:{position:V},onClick:Ae,primaryColor:d.theme.colorPrimary,className:a("tourHighlightInnerCircle",d)}),W.createElement(nc,{style:{position:"absolute"},onClick:Ae,primaryColor:d.theme.colorPrimary,className:a("tourHighlightOuterCircle",d)}))),W.createElement(nl,{style:{...X,left:H(),top:se()},zIndex:j+1,className:a("tooltipContainerWrapper",d)},D&&W.createElement(W.Fragment,null,W.createElement(wo,{ref:w,layoutId:"tooltip-container",style:{position:"relative",width:"max-content",right:0,top:v!=="static"?12:0,...c},appearance:d,className:a("tooltipContainer",d),maxWidth:rl,zIndex:j+10},W.createElement(_,null)),u&&W.createElement(ai,{className:a("poweredByFrigadeTooltipRibbon",d),appearance:d,zIndex:j+10},W.createElement(To,{appearance:d})))))},Dr=pc;import{Portal as mc}from"react-portal";var uc=({flowId:e,customVariables:t,appearance:o,onStepCompletion:i,onButtonClick:r,showTooltipsSimultaneously:n=!1,onDismiss:s,dismissible:p,tooltipPosition:c="auto",showHighlightOnly:l=!1,dismissBehavior:g="complete-flow",onComplete:d,skipIfNotFound:x=!1,cssPosition:k="absolute",...S})=>{let{getFlow:b,getFlowSteps:u,isLoading:v,targetingLogicShouldHideFlow:T,markStepCompleted:C,markStepStarted:N,markFlowCompleted:A,updateCustomVariables:h,getCurrentStepIndex:w,getStepStatus:f,isStepBlocked:F,getFlowStatus:I,getNumberOfStepsCompleted:O}=J(),{isLoadingUserFlowStateData:E}=Oe(),{primaryCTAClickSideEffects:D,secondaryCTAClickSideEffects:$}=le(),{hasOpenModals:V}=Fe(),j=w(e),{openFlowStates:Y}=dc(G),{mergeAppearanceWithDefault:de}=Z();if(o=de(o),cc(()=>{h(t)},[t,v]),E)return null;let he=b(e);if(!he||T(he)||I(e)==q||V())return null;let K=u(e);if(Object.keys(Y).length>0){let L=Object.keys(Y).find(U=>Y[U]===!0);if(L!==void 0&&L!==e)return Pt.createElement(Pt.Fragment,null)}async function te(L){if(await C(e,L.id),K.map(U=>f(e,U.id)).every(U=>U===We)){await A(e);return}if(!l&&j+1<K.length&&!n){if(F(e,K[j+1].id))return;await N(e,K[j+1].id)}}function Q(L,U,_){let X=j+1<K.length?K[j+1]:null;r&&r(L,j,U,X),i&&i(L,_,X)}function Se(){return K.map(L=>({...L,handleSecondaryButtonClick:async()=>{$(L),L.skippable===!0&&await C(e,L.id,{skipped:!0}),Q(L,"secondary",j)},handlePrimaryButtonClick:async()=>{(!L.completionCriteria&&(L.autoMarkCompleted||L.autoMarkCompleted===void 0)||L.completionCriteria&&L.autoMarkCompleted===!0)&&await te(L),Q(L,"primary",j),D(L)}}))}async function me(L){s&&s(),g==="complete-flow"?await A(e):await C(e,L.id)}function Ee(){d&&d()}let re=!document.querySelector(K[j].selector);function ne(){let L=K.findIndex(U=>!!document.querySelector(U.selector));return K.map((U,_)=>re&&!n&&_!==L&&x||!n&&_!==j?null:Pt.createElement(Dr,{key:U.id,appearance:o,steps:Se(),selectedStep:_,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>me(U),tooltipPosition:c,showHighlightOnly:l,completedStepsCount:O(e),onComplete:Ee,cssPosition:k,...S}))}function Te(){return Pt.createElement(Pt.Fragment,null,Pt.createElement(oe,{appearance:o}),ne())}return k==="static"?Te():Pt.createElement(mc,null,Te())};import Me,{useEffect as fc,useRef as gc,useState as xc}from"react";import{Portal as hc}from"react-portal";import vt from"styled-components";var sl=vt.button`
1465
- ${e=>P(e)} {
1462
+ `,kc=Fo(yl)`
1463
+ width: ${to+12}px;
1464
+ height: ${to+12}px;
1465
+ `,Pc=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:n="auto",showHighlight:i=!0,primaryColor:r="#000000",offset:l={x:0,y:0},visible:p=!0,containerStyle:d={},selectedStep:s=0,customStepTypes:m,appearance:c,dismissible:x=!1,showHighlightOnly:S,showStepCount:F=!0,completedStepsCount:b=0,showFrigadeBranding:g=!1,cssPosition:B="absolute"})=>{var De,ot,Ye,bt,Dt,$t,C,u,k,z,ue,fe,ro,Jr,Qr,Zr,Rr,ei,ti;let{logErrorIfDebugMode:y}=gl(),[E,A]=eo(),[I,h]=eo(new Date),w=Sc(null),[f,P]=eo(document.querySelector(e[s].selector)),N=fl(f,I),[L,O]=eo(),[U,W]=eo(!S),V=(ot=(De=e[s])==null?void 0:De.props)!=null&&ot.position?e[s].props.position:B,le=(Dt=(bt=(Ye=e[s])==null?void 0:Ye.props)==null?void 0:bt.zIndex)!=null?Dt:90,Z=($t=E==null?void 0:E.width)!=null?$t:hl,q=(C=E==null?void 0:E.height)!=null?C:Cl,[he,Pe]=eo(new Date().getTime());l=(z=(k=(u=e[s])==null?void 0:u.props)==null?void 0:k.offset)!=null?z:l;let Se=window.location.pathname.split("/").pop();xl(()=>{w.current&&A({width:w.current.clientWidth,height:w.current.clientHeight})},[s,I,V]),er(()=>{S||W(!0)},[s]);let G=()=>{let se=document.querySelector(e[s].selector);if(!se){O(void 0),P(null),y(`FrigadeTour: Could not find element with selector "${e[s].selector}" for step ${e[s].id}`);return}L&&L===JSON.stringify(se==null?void 0:se.getBoundingClientRect())||(P(se),h(new Date),se&&O(JSON.stringify(se.getBoundingClientRect())))};if(er(()=>{let se=new MutationObserver(G);return se.observe(document.body,{subtree:!0,childList:!0}),()=>se.disconnect()},[G]),er(()=>{let se=new MutationObserver(G);return se.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","class"]}),()=>se.disconnect()},[G]),er(()=>{let se=setInterval(()=>{G()},10);return()=>clearInterval(se)},[G]),xl(()=>{setTimeout(()=>{G()},bc),G()},[s,Se]),f===null||!p||N.height===0&&N.width===0&&V!=="fixed"&&B!=="static")return null;let Y=n==="auto"?"right":n,te=_r(N,Y,Z,l,V),Ve=N.right+Z>(window.innerWidth||document.documentElement.clientWidth),Le=N.bottom+Cl>(window.innerHeight||document.documentElement.clientHeight);Ve&&n==="auto"&&(te=_r(N,"left",Z,l,V),Y="left"),(fe=(ue=e[s])==null?void 0:ue.props)!=null&&fe.tooltipPosition&&((Jr=(ro=e[s])==null?void 0:ro.props)==null?void 0:Jr.tooltipPosition)!=="auto"&&(((Zr=(Qr=e[s])==null?void 0:Qr.props)==null?void 0:Zr.tooltipPosition)==="left"||((ei=(Rr=e[s])==null?void 0:Rr.props)==null?void 0:ei.tooltipPosition)==="right")&&(Y=e[s].props.tooltipPosition);let R=()=>{let se=()=>{if(e[s].handlePrimaryButtonClick&&(e[s].handlePrimaryButtonClick(),W(!1),setTimeout(()=>{G()},30)),b===e.length-1)return o()},ut=()=>{e[s].handleSecondaryButtonClick&&(e[s].handleSecondaryButtonClick(),S&&!e[s].secondaryButtonUri&&W(!1))};return K.createElement(K.Fragment,null,F&&e.length>1&&K.createElement(Ci,null,K.createElement(Si,{className:a("tooltipStepCounter",c)},s+1," of ",e.length)),(e[s].primaryButtonTitle||e[s].secondaryButtonTitle)&&K.createElement(yi,{showStepCount:F,className:a("tooltipCTAContainer",c)},e[s].secondaryButtonTitle&&K.createElement(re,{title:e[s].secondaryButtonTitle,appearance:c,onClick:ut,size:"small",withMargin:!1,secondary:!0}),e[s].primaryButtonTitle&&K.createElement(re,{title:e[s].primaryButtonTitle,appearance:c,onClick:se,withMargin:!1,size:"small"})))},ce=()=>K.createElement(K.Fragment,null,x&&K.createElement(ui,{"data-testid":"tooltip-dismiss",onClick:()=>{t&&t()},className:a("tooltipClose",c),hasImage:!!e[s].imageUri||!!e[s].videoUri},K.createElement(Be,null)),e[s].imageUri&&K.createElement(fi,{dismissible:x,appearance:c,src:e[s].imageUri,className:a("tooltipImageContainer",c)}),e[s].videoUri&&!e[s].imageUri&&K.createElement(gi,{dismissible:x,appearance:c,className:a("tooltipVideoContainer",c)},K.createElement(Ze,{appearance:c,videoUri:e[s].videoUri})),K.createElement(hi,{className:a("tooltipContentContainer",c)},K.createElement(Ee,{appearance:c,title:e[s].title,subtitle:e[s].subtitle,size:"small"}),K.createElement(xi,{className:a("tooltipFooter",c)},K.createElement(R,null)))),be=T(T({},{default:se=>{var ut;if((ut=e[s])!=null&&ut.StepContent){let ra=e[s].StepContent;return K.createElement("div",null,ra)}return K.createElement(ce,null)}}),m),M=()=>{var se;return e?!((se=e[s])!=null&&se.type)||!be[e[s].type]?be.default(e[s]):be[e[s].type]({stepData:e[s],primaryColor:r}):K.createElement(K.Fragment,null)};if(e[s].complete===!0||te.x==0&&te.y==0&&new Date().getTime()-he<100)return null;let D={top:(te==null?void 0:te.y)-to,left:(ti=Y=="left"?N.x+l.x:(te==null?void 0:te.x)-to)!=null?ti:0,cursor:S?"pointer":"default",position:V},_=()=>{let ut=D.left+(Y=="left"?-Z:24);return Math.min(Math.max(ut,20),window.innerWidth-Z-20)},J=()=>{if(V==="fixed")return D.top;let se=D.top+q,ut=20;return se>window.innerHeight-ut?D.top+-q:D.top},Ce=()=>{S&&(h(new Date),W(!U))};return K.createElement(Fc,null,K.createElement(kc,{style:D,zIndex:le,className:a("tourHighlightContainer",c)},i&&e[s].showHighlight!==!1&&B!=="static"&&K.createElement(K.Fragment,null,K.createElement(Tc,{style:{position:V},onClick:Ce,primaryColor:c.theme.colorPrimary,className:a("tourHighlightInnerCircle",c)}),K.createElement(wc,{style:{position:"absolute"},onClick:Ce,primaryColor:c.theme.colorPrimary,className:a("tourHighlightOuterCircle",c)}))),K.createElement(yl,{style:H(T({},D),{left:_(),top:J()}),zIndex:le+1,className:a("tooltipContainerWrapper",c)},U&&K.createElement(K.Fragment,null,K.createElement(Eo,{ref:w,layoutId:"tooltip-container",style:T({position:"relative",width:"max-content",right:0,top:B!=="static"?12:0},d),appearance:c,className:a("tooltipContainer",c),maxWidth:hl,zIndex:le+10},K.createElement(M,null)),g&&K.createElement(wi,{className:a("poweredByFrigadeTooltipRibbon",c),appearance:c,zIndex:le+10},K.createElement(Ao,{appearance:c})))))},Hr=Pc;import{Portal as Ec}from"react-portal";var Ac=b=>{var g=b,{flowId:e,customVariables:t,appearance:o,onStepCompletion:n,onButtonClick:i,showTooltipsSimultaneously:r=!1,onDismiss:l,dismissible:p,tooltipPosition:d="auto",showHighlightOnly:s=!1,dismissBehavior:m="complete-flow",onComplete:c,skipIfNotFound:x=!1,cssPosition:S="absolute"}=g,F=Ie(g,["flowId","customVariables","appearance","onStepCompletion","onButtonClick","showTooltipsSimultaneously","onDismiss","dismissible","tooltipPosition","showHighlightOnly","dismissBehavior","onComplete","skipIfNotFound","cssPosition"]);let{getFlow:B,getFlowSteps:y,isLoading:E,targetingLogicShouldHideFlow:A,markStepCompleted:I,markStepStarted:h,markFlowCompleted:w,updateCustomVariables:f,getCurrentStepIndex:P,getStepStatus:N,isStepBlocked:L,getFlowStatus:O,getNumberOfStepsCompleted:U}=ee(),{isLoadingUserFlowStateData:W}=Me(),{primaryCTAClickSideEffects:V,secondaryCTAClickSideEffects:le}=ae(),{hasOpenModals:Z}=ve(),q=P(e),{openFlowStates:he}=vc(X),{mergeAppearanceWithDefault:Pe}=oe();if(o=Pe(o),Bc(()=>{f(t)},[t,E]),W)return null;let Se=B(e);if(!Se||A(Se)||O(e)==Q||Z())return null;let G=y(e);if(Object.keys(he).length>0){let M=Object.keys(he).find(D=>he[D]===!0);if(M!==void 0&&M!==e)return Ot.createElement(Ot.Fragment,null)}function Y(M){return $(this,null,function*(){if(yield I(e,M.id),G.map(D=>N(e,D.id)).every(D=>D===Ge)){yield w(e);return}if(!s&&q+1<G.length&&!r){if(L(e,G[q+1].id))return;yield h(e,G[q+1].id)}})}function te(M,D,_){let J=q+1<G.length?G[q+1]:null;i&&i(M,q,D,J),n&&n(M,_,J)}function Ve(){return G.map(M=>H(T({},M),{handleSecondaryButtonClick:()=>$(this,null,function*(){le(M),M.skippable===!0&&(yield I(e,M.id,{skipped:!0})),te(M,"secondary",q)}),handlePrimaryButtonClick:()=>$(this,null,function*(){(!M.completionCriteria&&(M.autoMarkCompleted||M.autoMarkCompleted===void 0)||M.completionCriteria&&M.autoMarkCompleted===!0)&&(yield Y(M)),te(M,"primary",q),V(M)})}))}function Le(M){return $(this,null,function*(){l&&l(),m==="complete-flow"?yield w(e):yield I(e,M.id)})}function R(){c&&c()}let ce=!document.querySelector(G[q].selector);function Ae(){let M=G.findIndex(D=>!!document.querySelector(D.selector));return G.map((D,_)=>ce&&!r&&_!==M&&x||!r&&_!==q?null:Ot.createElement(Hr,T({key:D.id,appearance:o,steps:Ve(),selectedStep:_,showTooltipsSimultaneously:r,dismissible:p,onDismiss:()=>Le(D),tooltipPosition:d,showHighlightOnly:s,completedStepsCount:U(e),onComplete:R,cssPosition:S},F)))}function be(){return Ot.createElement(Ot.Fragment,null,Ot.createElement(ne,{appearance:o}),Ae())}return S==="static"?be():Ot.createElement(Ec,null,be())};import _e,{useEffect as Ic,useRef as Oc,useState as Nc}from"react";import{Portal as Lc}from"react-portal";import Nt from"styled-components";var Sl=Nt.button`
1466
+ ${e=>v(e)} {
1466
1467
  // Anything inside this block will be ignored if the user provides a custom class
1467
1468
 
1468
1469
  display: flex;
@@ -1479,17 +1480,17 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1479
1480
  opacity: 0.8;
1480
1481
  }
1481
1482
  }
1482
- `,ll=vt.span`
1483
- ${e=>P(e)} {
1483
+ `,bl=Nt.span`
1484
+ ${e=>v(e)} {
1484
1485
  font-size: 12px;
1485
1486
  display: inline-block;
1486
1487
  }
1487
- `,al=vt.span`
1488
- ${e=>P(e)} {
1488
+ `,wl=Nt.span`
1489
+ ${e=>v(e)} {
1489
1490
  font-size: 12px;
1490
1491
  display: inline-block;
1491
1492
  }
1492
- `,pl=vt.div`
1493
+ `,Tl=Nt.div`
1493
1494
  position: fixed;
1494
1495
  right: 0;
1495
1496
  bottom: 0;
@@ -1499,8 +1500,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1499
1500
  flex-direction: column;
1500
1501
  align-items: flex-end;
1501
1502
  z-index: 50;
1502
- `,dl=vt.button`
1503
- ${e=>P(e)} {
1503
+ `,Fl=Nt.button`
1504
+ ${e=>v(e)} {
1504
1505
  // Anything inside this block will be ignored if the user provides a custom class
1505
1506
  background-color: #ffffff;
1506
1507
  border: 1px solid #f5f5f5;
@@ -1515,8 +1516,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1515
1516
  0px 3px 6px -4px rgba(0, 0, 0, 0.12);
1516
1517
  border-radius: 45px;
1517
1518
  cursor: pointer;
1518
- `,cl=vt.div`
1519
- ${e=>P(e)} {
1519
+ `,kl=Nt.div`
1520
+ ${e=>v(e)} {
1520
1521
  // Anything inside this block will be ignored if the user provides a custom class
1521
1522
  background: #ffffff;
1522
1523
  }
@@ -1532,8 +1533,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1532
1533
  position: ${e=>e.type=="inline"?"absolute":"relative"};
1533
1534
  top: ${e=>e.type=="inline"?"68px":0};
1534
1535
  margin-left: ${e=>e.type=="inline"?"-127px":0};
1535
- `,ml=vt.button`
1536
- ${e=>P(e)} {
1536
+ `,Pl=Nt.button`
1537
+ ${e=>v(e)} {
1537
1538
  // Anything inside this block will be ignored if the user provides a custom class
1538
1539
  color: #434343;
1539
1540
  :hover {
@@ -1549,8 +1550,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1549
1550
  font-size: 14px;
1550
1551
 
1551
1552
  padding: 8px 12px;
1552
- `;import ul from"react";var fl=({style:e,className:t})=>ul.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},ul.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 gl from"react";var xl=({style:e,className:t})=>gl.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"},gl.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 Cc=({flowId:e,style:t,onStepCompletion:o,visible:i=!0,type:r="inline",title:n="Help",appearance:s})=>{let{getFlow:p,getFlowSteps:c,markStepCompleted:l,getStepStatus:g,getNumberOfStepsCompleted:d,isLoading:x,targetingLogicShouldHideFlow:k}=J(),{primaryCTAClickSideEffects:S}=le(),b=gc(null),[u,v]=xc(!1),{mergeAppearanceWithDefault:T}=Z();s=T(s),fc(()=>(document.addEventListener("click",C,!1),()=>{document.removeEventListener("click",C,!1)}),[]);let C=f=>{b.current&&!b.current.contains(f.target)&&v(!1)};if(x)return null;let N=p(e);if(!N||k(N))return null;let A=c(e);if(!A||!i)return null;function h(f,F){!f.completionCriteria&&(f.autoMarkCompleted||f.autoMarkCompleted===void 0)&&l(e,f.id),S(f),o&&o(f,F),v(!1)}function w(){return u&&Me.createElement(cl,{className:a("floatingWidgetMenu",s),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},type:r},A.map((f,F)=>Me.createElement(ml,{className:a("floatingWidgetMenuItem",s),key:F,onClick:()=>h(f,F)},f.title)))}return r=="inline"?Me.createElement("span",{ref:b},Me.createElement(sl,{style:t,onClick:()=>{v(!u)},className:a("supportButton",s)},Me.createElement(al,{className:a("supportIconContainer",s)},Me.createElement(xl,{className:a("supportIcon",s),style:{width:"18px",height:"18px"}})),Me.createElement(ll,{className:a("supportButtonTitle",s)},n)),Me.createElement(w,null)):Me.createElement(hc,null,Me.createElement(pl,{style:t,ref:b},Me.createElement(w,null),Me.createElement(dl,{onClick:()=>{v(!u)},whileHover:{scale:1.1},className:a("floatingWidgetButton",s)},Me.createElement(fl,{className:a("floatingWidgetButtonIcon",s),style:{display:"flex",width:"20px",height:"20px"}}))))};import Xe,{useEffect as yc}from"react";import Yo from"styled-components";var hl=Yo.div`
1553
- ${e=>P(e)} {
1553
+ `;import vl from"react";var Bl=({style:e,className:t})=>vl.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},vl.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 El from"react";var Al=({style:e,className:t})=>El.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"},El.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 Dc=({flowId:e,style:t,onStepCompletion:o,visible:n=!0,type:i="inline",title:r="Help",appearance:l})=>{let{getFlow:p,getFlowSteps:d,markStepCompleted:s,getStepStatus:m,getNumberOfStepsCompleted:c,isLoading:x,targetingLogicShouldHideFlow:S}=ee(),{primaryCTAClickSideEffects:F}=ae(),b=Oc(null),[g,B]=Nc(!1),{mergeAppearanceWithDefault:y}=oe();l=y(l),Ic(()=>(document.addEventListener("click",E,!1),()=>{document.removeEventListener("click",E,!1)}),[]);let E=f=>{b.current&&!b.current.contains(f.target)&&B(!1)};if(x)return null;let A=p(e);if(!A||S(A))return null;let I=d(e);if(!I||!n)return null;function h(f,P){!f.completionCriteria&&(f.autoMarkCompleted||f.autoMarkCompleted===void 0)&&s(e,f.id),F(f),o&&o(f,P),B(!1)}function w(){return g&&_e.createElement(kl,{className:a("floatingWidgetMenu",l),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},type:i},I.map((f,P)=>_e.createElement(Pl,{className:a("floatingWidgetMenuItem",l),key:P,onClick:()=>h(f,P)},f.title)))}return i=="inline"?_e.createElement("span",{ref:b},_e.createElement(Sl,{style:t,onClick:()=>{B(!g)},className:a("supportButton",l)},_e.createElement(wl,{className:a("supportIconContainer",l)},_e.createElement(Al,{className:a("supportIcon",l),style:{width:"18px",height:"18px"}})),_e.createElement(bl,{className:a("supportButtonTitle",l)},r)),_e.createElement(w,null)):_e.createElement(Lc,null,_e.createElement(Tl,{style:t,ref:b},_e.createElement(w,null),_e.createElement(Fl,{onClick:()=>{B(!g)},whileHover:{scale:1.1},className:a("floatingWidgetButton",l)},_e.createElement(Bl,{className:a("floatingWidgetButtonIcon",l),style:{display:"flex",width:"20px",height:"20px"}}))))};import tt,{useEffect as $c}from"react";import tr from"styled-components";var Il=tr.div`
1554
+ ${e=>v(e)} {
1554
1555
  display: flex;
1555
1556
  flex-direction: column;
1556
1557
  width: 100%;
@@ -1564,18 +1565,18 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1564
1565
  border-radius: 12px;
1565
1566
  position: relative;
1566
1567
  }
1567
- `,Cl=Yo.div`
1568
+ `,Ol=tr.div`
1568
1569
  display: flex;
1569
1570
  flex-direction: column;
1570
1571
  flex: 1;
1571
- `,yl=Yo.div`
1572
+ `,Nl=tr.div`
1572
1573
  display: flex;
1573
1574
  flex-direction: column;
1574
1575
  justify-content: center;
1575
1576
  align-items: flex-start;
1576
1577
  margin-top: 16px;
1577
- `,Sl=Yo.div`
1578
- ${e=>P(e)} {
1578
+ `,Ll=tr.div`
1579
+ ${e=>v(e)} {
1579
1580
  position: absolute;
1580
1581
  top: 16px;
1581
1582
  right: 16px;
@@ -1585,9 +1586,9 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1585
1586
  opacity: 0.8;
1586
1587
  }
1587
1588
  }
1588
- `;var Sc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:r,className:n,style:s,dismissible:p})=>{let{getFlow:c,markFlowCompleted:l,markStepCompleted:g,isLoading:d,targetingLogicShouldHideFlow:x,updateCustomVariables:k,getFlowSteps:S,getFlowStatus:b,getCurrentStepIndex:u}=J(),{primaryCTAClickSideEffects:v}=le(),{mergeAppearanceWithDefault:T}=Z();if(r=T(r),yc(()=>{k(o)},[o,d]),d)return null;let C=c(e);if(!C||x(C)||b(e)===q)return null;let A=S(e)[u(e)];return Xe.createElement(Xe.Fragment,null,Xe.createElement(oe,{appearance:r}),Xe.createElement(hl,{appearance:r,className:Ce(a("embeddedTipContainer",r),n),style:s},(p===!0||A.dismissible)&&Xe.createElement(Sl,{onClick:async()=>{await l(e),t&&t()},className:a("embeddedTipDismissButton",r)},Xe.createElement(ke,null)),Xe.createElement(Cl,null,Xe.createElement(Pe,{size:"small",appearance:r,title:A.title,subtitle:A.subtitle})),A.primaryButtonTitle&&Xe.createElement(yl,{className:a("embeddedTipCallToActionContainer",r)},Xe.createElement(R,{classPrefix:"embeddedTip",title:A.primaryButtonTitle,appearance:r,withMargin:!1,size:"medium",type:"inline",onClick:async()=>{A.handlePrimaryButtonClick(),v(A),!(i&&i(A,u(e),"primary")===!1)&&(await g(e,A.id),await l(e))}}))))};import be,{useEffect as bc}from"react";import Jt from"styled-components";var bl=Jt.div`
1589
+ `;var Mc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:n,appearance:i,className:r,style:l,dismissible:p})=>{let{getFlow:d,markFlowCompleted:s,markStepCompleted:m,isLoading:c,targetingLogicShouldHideFlow:x,updateCustomVariables:S,getFlowSteps:F,getFlowStatus:b,getCurrentStepIndex:g}=ee(),{primaryCTAClickSideEffects:B}=ae(),{mergeAppearanceWithDefault:y}=oe();if(i=y(i),$c(()=>{S(o)},[o,c]),c)return null;let E=d(e);if(!E||x(E)||b(e)===Q)return null;let I=F(e)[g(e)];return tt.createElement(tt.Fragment,null,tt.createElement(ne,{appearance:i}),tt.createElement(Il,{appearance:i,className:we(a("embeddedTipContainer",i),r),style:l},(p===!0||I.dismissible)&&tt.createElement(Ll,{onClick:()=>$(void 0,null,function*(){yield s(e),t&&t()}),className:a("embeddedTipDismissButton",i)},tt.createElement(Be,null)),tt.createElement(Ol,null,tt.createElement(Ee,{size:"small",appearance:i,title:I.title,subtitle:I.subtitle})),I.primaryButtonTitle&&tt.createElement(Nl,{className:a("embeddedTipCallToActionContainer",i)},tt.createElement(re,{classPrefix:"embeddedTip",title:I.primaryButtonTitle,appearance:i,withMargin:!1,size:"medium",type:"inline",onClick:()=>$(void 0,null,function*(){I.handlePrimaryButtonClick(),B(I),!(n&&n(I,g(e),"primary")===!1)&&(yield m(e,I.id),yield s(e))})}))))};import Fe,{useEffect as Uc}from"react";import oo from"styled-components";var Dl=oo.div`
1589
1590
  // use the :not annotation
1590
- ${e=>P(e)} {
1591
+ ${e=>v(e)} {
1591
1592
  display: flex;
1592
1593
  flex-direction: ${e=>e.type==="square"?"column":"row"};
1593
1594
  width: 100%;
@@ -1597,24 +1598,24 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1597
1598
  background-color: ${e=>e.appearance.theme.colorBackground};
1598
1599
  border-radius: 12px;
1599
1600
  }
1600
- `,wl=Jt.div`
1601
- ${e=>P(e)} {
1601
+ `,$l=oo.div`
1602
+ ${e=>v(e)} {
1602
1603
  display: flex;
1603
1604
  width: 46px;
1604
1605
  height: 46px;
1605
1606
  }
1606
- `,Tl=Jt.div`
1607
+ `,Ml=oo.div`
1607
1608
  display: flex;
1608
1609
  flex-direction: column;
1609
1610
  flex: 1;
1610
1611
  margin-left: ${e=>e.type==="square"?"0px":"16px"};
1611
1612
  margin-top: ${e=>e.type==="square"?"12px":"0"};
1612
- `,Fl=Jt.div`
1613
+ `,Ul=oo.div`
1613
1614
  display: flex;
1614
1615
  flex-direction: column;
1615
1616
  justify-content: center;
1616
1617
  margin-left: ${e=>e.type==="square"?"0px":"16px"};
1617
- `,$r=Jt.div`
1618
+ `,jr=oo.div`
1618
1619
  display: flex;
1619
1620
  justify-content: ${e=>e.type==="square"?"flex-end":"center"};
1620
1621
  align-items: flex-end;
@@ -1622,12 +1623,12 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1622
1623
  :hover {
1623
1624
  opacity: 0.8;
1624
1625
  }
1625
- `,Mr=Jt.div`
1626
+ `,Vr=oo.div`
1626
1627
  display: flex;
1627
1628
  justify-content: ${e=>e.type==="square"?"flex-end":"center"};
1628
1629
  align-items: flex-end;
1629
1630
  margin-left: ${e=>e.type==="square"?"0px":"16px"};
1630
- `;import Ur from"react";var kl=({style:e,className:t})=>Ur.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"46",height:"46",fill:"none",viewBox:"0 0 46 46",style:e,className:t},Ur.createElement("circle",{cx:"23",cy:"23",r:"23",fill:"#E6F1FF"}),Ur.createElement("path",{stroke:"#0171F8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M32 18.5l-2.25-1.313M32 18.5v2.25m0-2.25l-2.25 1.313M14 18.5l2.25-1.313M14 18.5l2.25 1.313M14 18.5v2.25m9 3l2.25-1.313M23 23.75l-2.25-1.313M23 23.75V26m0 6.75l2.25-1.313M23 32.75V30.5m0 2.25l-2.25-1.313m0-16.875L23 13.25l2.25 1.313M32 25.25v2.25l-2.25 1.313m-13.5 0L14 27.5v-2.25"}));var wc=({flowId:e,title:t,subtitle:o,onDismiss:i,customVariables:r,onButtonClick:n,appearance:s,type:p="full-width",icon:c})=>{let{getFlow:l,markFlowCompleted:g,isLoading:d,targetingLogicShouldHideFlow:x,updateCustomVariables:k,getFlowMetadata:S,getFlowStatus:b,getFlowSteps:u,getCurrentStepIndex:v}=J(),{primaryCTAClickSideEffects:T}=le(),{mergeAppearanceWithDefault:C}=Z();if(s=C(s),bc(()=>{k(r)},[r,d]),d)return null;let N=l(e);if(!N||x(N)||b(e)===q)return null;let A=u(e),h=A.length>0?A[v(e)]:S(e);return h!=null&&h.title&&(t=h.title),h!=null&&h.subtitle&&(o=h.subtitle),be.createElement(be.Fragment,null,be.createElement(oe,{appearance:s}),be.createElement(bl,{type:p,appearance:s,className:a("bannerContainer",s)},p!="square"&&be.createElement(wl,{className:a("bannerIconContainer",s)},c||be.createElement(kl,null)),p==="square"&&h.dismissible&&be.createElement(Mr,{type:p,className:a("bannerDismissButtonContainer",s)},be.createElement($r,{type:p,onClick:async()=>{await g(e),i&&i()},className:a("bannerDismissButton",s)},be.createElement(ke,null))),be.createElement(Tl,{type:p},be.createElement(Pe,{appearance:s,title:t,subtitle:o,classPrefix:"banner"})),(h==null?void 0:h.primaryButtonTitle)&&be.createElement(Fl,{type:p,className:a("bannerCallToActionContainer",s)},be.createElement(R,{title:h==null?void 0:h.primaryButtonTitle,appearance:s,onClick:()=>{T(h),n&&n(h,0,"primary")},classPrefix:"banner"})),p!=="square"&&h.dismissible&&be.createElement(Mr,{type:p,className:a("bannerDismissButtonContainer",s)},be.createElement($r,{type:p,onClick:async()=>{await g(e),i&&i()},className:a("bannerDismissButton",s)},be.createElement(ke,null)))))};import ee,{useEffect as Tc}from"react";import{Portal as Fc}from"react-portal";import nt from"styled-components";var Pl=nt.div`
1631
+ `;import Gr from"react";var Wl=({style:e,className:t})=>Gr.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"46",height:"46",fill:"none",viewBox:"0 0 46 46",style:e,className:t},Gr.createElement("circle",{cx:"23",cy:"23",r:"23",fill:"#E6F1FF"}),Gr.createElement("path",{stroke:"#0171F8",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M32 18.5l-2.25-1.313M32 18.5v2.25m0-2.25l-2.25 1.313M14 18.5l2.25-1.313M14 18.5l2.25 1.313M14 18.5v2.25m9 3l2.25-1.313M23 23.75l-2.25-1.313M23 23.75V26m0 6.75l2.25-1.313M23 32.75V30.5m0 2.25l-2.25-1.313m0-16.875L23 13.25l2.25 1.313M32 25.25v2.25l-2.25 1.313m-13.5 0L14 27.5v-2.25"}));var Wc=({flowId:e,title:t,subtitle:o,onDismiss:n,customVariables:i,onButtonClick:r,appearance:l,type:p="full-width",icon:d})=>{let{getFlow:s,markFlowCompleted:m,isLoading:c,targetingLogicShouldHideFlow:x,updateCustomVariables:S,getFlowMetadata:F,getFlowStatus:b,getFlowSteps:g,getCurrentStepIndex:B}=ee(),{primaryCTAClickSideEffects:y}=ae(),{mergeAppearanceWithDefault:E}=oe();if(l=E(l),Uc(()=>{S(i)},[i,c]),c)return null;let A=s(e);if(!A||x(A)||b(e)===Q)return null;let I=g(e),h=I.length>0?I[B(e)]:F(e);return h!=null&&h.title&&(t=h.title),h!=null&&h.subtitle&&(o=h.subtitle),Fe.createElement(Fe.Fragment,null,Fe.createElement(ne,{appearance:l}),Fe.createElement(Dl,{type:p,appearance:l,className:a("bannerContainer",l)},p!="square"&&Fe.createElement($l,{className:a("bannerIconContainer",l)},d||Fe.createElement(Wl,null)),p==="square"&&h.dismissible&&Fe.createElement(Vr,{type:p,className:a("bannerDismissButtonContainer",l)},Fe.createElement(jr,{type:p,onClick:()=>$(void 0,null,function*(){yield m(e),n&&n()}),className:a("bannerDismissButton",l)},Fe.createElement(Be,null))),Fe.createElement(Ml,{type:p},Fe.createElement(Ee,{appearance:l,title:t,subtitle:o,classPrefix:"banner"})),(h==null?void 0:h.primaryButtonTitle)&&Fe.createElement(Ul,{type:p,className:a("bannerCallToActionContainer",l)},Fe.createElement(re,{title:h==null?void 0:h.primaryButtonTitle,appearance:l,onClick:()=>{y(h),r&&r(h,0,"primary")},classPrefix:"banner"})),p!=="square"&&h.dismissible&&Fe.createElement(Vr,{type:p,className:a("bannerDismissButtonContainer",l)},Fe.createElement(jr,{type:p,onClick:()=>$(void 0,null,function*(){yield m(e),n&&n()}),className:a("bannerDismissButton",l)},Fe.createElement(Be,null)))))};import ie,{useEffect as zc}from"react";import{Portal as _c}from"react-portal";import mt from"styled-components";var zl=mt.div`
1631
1632
  display: flex;
1632
1633
  flex-direction: column;
1633
1634
  width: 100%;
@@ -1646,7 +1647,7 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1646
1647
  z-index: 1000;
1647
1648
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
1648
1649
  min-width: 550px;
1649
- `,vl=nt.button`
1650
+ `,_l=mt.button`
1650
1651
  border: 1px solid ${e=>e.appearance.theme.colorBorder};
1651
1652
  border-radius: 8px;
1652
1653
  // If selected make border color primary and text color color priamry
@@ -1667,34 +1668,34 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1667
1668
  display: flex;
1668
1669
  justify-content: center;
1669
1670
  align-items: center;
1670
- `,zr=nt.div`
1671
+ `,Kr=mt.div`
1671
1672
  display: flex;
1672
1673
  justify-content: space-between;
1673
1674
  margin-top: 16px;
1674
1675
  gap: 8px;
1675
- `,Bl=nt.div`
1676
+ `,Hl=mt.div`
1676
1677
  display: flex;
1677
1678
  justify-content: space-between;
1678
1679
  margin-top: 8px;
1679
- `,Wr=nt.div`
1680
+ `,qr=mt.div`
1680
1681
  font-size: 12px;
1681
1682
  line-height: 18px;
1682
1683
  color: ${e=>e.appearance.theme.colorTextDisabled};
1683
1684
  font-style: normal;
1684
1685
  font-weight: 400;
1685
1686
  letter-spacing: 0.24px;
1686
- `,_r=nt.div`
1687
+ `,Yr=mt.div`
1687
1688
  display: flex;
1688
1689
  flex-direction: column;
1689
1690
  flex: 1;
1690
- `,d1=nt.div`
1691
+ `,tw=mt.div`
1691
1692
  display: flex;
1692
1693
  flex-direction: column;
1693
1694
  justify-content: center;
1694
1695
  align-items: flex-start;
1695
1696
  margin-top: 16px;
1696
- `,El=nt.textarea`
1697
- ${e=>P(e)} {
1697
+ `,jl=mt.textarea`
1698
+ ${e=>v(e)} {
1698
1699
  margin-top: 16px;
1699
1700
  border: 1px solid ${e=>e.appearance.theme.colorBorder};
1700
1701
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
@@ -1704,8 +1705,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1704
1705
  width: 100%;
1705
1706
  height: 100px;
1706
1707
  }
1707
- `,Al=nt.div`
1708
- ${e=>P(e)} {
1708
+ `,Vl=mt.div`
1709
+ ${e=>v(e)} {
1709
1710
  position: absolute;
1710
1711
  top: 16px;
1711
1712
  right: 16px;
@@ -1715,8 +1716,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1715
1716
  opacity: 0.8;
1716
1717
  }
1717
1718
  }
1718
- `;var kc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:r,className:n,style:s,type:p="modal"})=>{let{getFlow:c,markFlowCompleted:l,markStepCompleted:g,getNumberOfStepsCompleted:d,isLoading:x,targetingLogicShouldHideFlow:k,updateCustomVariables:S,getFlowSteps:b,getFlowStatus:u,getCurrentStepIndex:v}=J(),{primaryCTAClickSideEffects:T}=le(),{mergeAppearanceWithDefault:C}=Z(),[N,A]=ee.useState(null),[h,w]=ee.useState(""),{hasOpenModals:f,setKeepCompletedFlowOpenDuringSession:F,shouldKeepCompletedFlowOpenDuringSession:I}=Fe();if(r=C(r),Tc(()=>{S(o)},[o,x]),x)return null;let O=c(e);if(!O||k(O)||u(e)===q||d(e)===1&&!I(e)||f())return null;let D=b(e)[d(e)];function $(){return ee.createElement(ee.Fragment,null,ee.createElement(_r,null,ee.createElement(Pe,{size:"large",appearance:r,title:D.title,subtitle:D.subtitle})),ee.createElement(zr,{className:a("npsNumberButtonContainer",r),appearance:r},Array.from(Array(10).keys()).map(Y=>ee.createElement(vl,{className:a("npsNumberButton",r),selected:N===Y+1,key:Y,onClick:async()=>{F(e),A(Y+1),await g(e,D.id,{score:Y+1})},appearance:r},Y+1))),ee.createElement(Bl,{appearance:r},ee.createElement(Wr,{appearance:r},"Not likely at all"),ee.createElement(Wr,{appearance:r},"Extremely likely")))}function V(){return ee.createElement(ee.Fragment,null,ee.createElement(_r,null,ee.createElement(Pe,{appearance:r,title:D.title??"Why did you choose this score?",size:"large"})),ee.createElement(El,{appearance:r,value:h,onChange:Y=>{w(Y.target.value)},placeHolder:"Add your optional fedback here..."}),ee.createElement(zr,{appearance:r,className:a("npsNumberButtonContainer",r)},ee.createElement(R,{size:"large",withMargin:!1,onClick:async()=>{await l(e),i&&i(D,1,"primary")},appearance:r,title:D.secondaryButtonTitle||"Skip",secondary:!0}),ee.createElement(R,{size:"large",withMargin:!1,onClick:async()=>{await g(e,D.id,{feedbackText:h}),await l(e),i&&i(D,1,"primary")},appearance:r,title:D.primaryButtonTitle||"Submit"})))}function j(){return d(e)>=2?null:ee.createElement(ee.Fragment,null,ee.createElement(oe,{appearance:r}),ee.createElement(Pl,{appearance:r,className:Ce(a("npsSurveyContainer",r),n),style:s,type:p},ee.createElement(Al,{onClick:async()=>{await l(e),t&&t()},className:a("npsSurveyDismissButton",r)},ee.createElement(ke,null)),d(e)==0&&$(),d(e)==1&&V()))}return p==="inline"?j():ee.createElement(Fc,null,j())};import we,{useEffect as Bc}from"react";import Bt from"styled-components";var Il=Bt.div`
1719
- ${e=>P(e)} {
1719
+ `;var Hc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:n,appearance:i,className:r,style:l,type:p="modal"})=>{let{getFlow:d,markFlowCompleted:s,markStepCompleted:m,getNumberOfStepsCompleted:c,isLoading:x,targetingLogicShouldHideFlow:S,updateCustomVariables:F,getFlowSteps:b,getFlowStatus:g,getCurrentStepIndex:B}=ee(),{primaryCTAClickSideEffects:y}=ae(),{mergeAppearanceWithDefault:E}=oe(),[A,I]=ie.useState(null),[h,w]=ie.useState(""),{hasOpenModals:f,setKeepCompletedFlowOpenDuringSession:P,shouldKeepCompletedFlowOpenDuringSession:N}=ve();if(i=E(i),zc(()=>{F(o)},[o,x]),x)return null;let L=d(e);if(!L||S(L)||g(e)===Q||c(e)===1&&!N(e)||f())return null;let U=b(e)[c(e)];function W(){return ie.createElement(ie.Fragment,null,ie.createElement(Yr,null,ie.createElement(Ee,{size:"large",appearance:i,title:U.title,subtitle:U.subtitle})),ie.createElement(Kr,{className:a("npsNumberButtonContainer",i),appearance:i},Array.from(Array(10).keys()).map(Z=>ie.createElement(_l,{className:a("npsNumberButton",i),selected:A===Z+1,key:Z,onClick:()=>$(this,null,function*(){P(e),I(Z+1),yield m(e,U.id,{score:Z+1})}),appearance:i},Z+1))),ie.createElement(Hl,{appearance:i},ie.createElement(qr,{appearance:i},"Not likely at all"),ie.createElement(qr,{appearance:i},"Extremely likely")))}function V(){var Z;return ie.createElement(ie.Fragment,null,ie.createElement(Yr,null,ie.createElement(Ee,{appearance:i,title:(Z=U.title)!=null?Z:"Why did you choose this score?",size:"large"})),ie.createElement(jl,{appearance:i,value:h,onChange:q=>{w(q.target.value)},placeHolder:"Add your optional fedback here..."}),ie.createElement(Kr,{appearance:i,className:a("npsNumberButtonContainer",i)},ie.createElement(re,{size:"large",withMargin:!1,onClick:()=>$(this,null,function*(){yield s(e),n&&n(U,1,"primary")}),appearance:i,title:U.secondaryButtonTitle||"Skip",secondary:!0}),ie.createElement(re,{size:"large",withMargin:!1,onClick:()=>$(this,null,function*(){yield m(e,U.id,{feedbackText:h}),yield s(e),n&&n(U,1,"primary")}),appearance:i,title:U.primaryButtonTitle||"Submit"})))}function le(){return c(e)>=2?null:ie.createElement(ie.Fragment,null,ie.createElement(ne,{appearance:i}),ie.createElement(zl,{appearance:i,className:we(a("npsSurveyContainer",i),r),style:l,type:p},ie.createElement(Vl,{onClick:()=>$(this,null,function*(){yield s(e),t&&t()}),className:a("npsSurveyDismissButton",i)},ie.createElement(Be,null)),c(e)==0&&W(),c(e)==1&&V()))}return p==="inline"?le():ie.createElement(_c,null,le())};import ke,{useEffect as Gc}from"react";import Lt from"styled-components";var Gl=Lt.div`
1720
+ ${e=>v(e)} {
1720
1721
  display: flex;
1721
1722
  flex-direction: column;
1722
1723
  width: 100%;
@@ -1726,22 +1727,22 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1726
1727
  background-color: ${e=>e.appearance.theme.colorBackground};
1727
1728
  position: relative;
1728
1729
  }
1729
- `,Nl=Bt.div`
1730
+ `,Kl=Lt.div`
1730
1731
  display: flex;
1731
1732
  flex-direction: column;
1732
1733
  flex: 1;
1733
- `,Ol=Bt.div`
1734
+ `,ql=Lt.div`
1734
1735
  display: flex;
1735
1736
  flex-direction: row;
1736
1737
  justify-content: center;
1737
1738
  align-items: stretch;
1738
1739
  gap: 16px;
1739
1740
  margin-top: 8px;
1740
- `,Ll=Bt.div`
1741
+ `,Yl=Lt.div`
1741
1742
  margin-top: 16px;
1742
1743
  margin-bottom: 16px;
1743
- `,Dl=Bt.div`
1744
- ${e=>P(e)} {
1744
+ `,Xl=Lt.div`
1745
+ ${e=>v(e)} {
1745
1746
  position: absolute;
1746
1747
  top: -16px;
1747
1748
  right: -16px;
@@ -1751,8 +1752,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1751
1752
  opacity: 0.8;
1752
1753
  }
1753
1754
  }
1754
- `,$l=Bt.h1`
1755
- ${e=>P(e)} {
1755
+ `,Jl=Lt.h1`
1756
+ ${e=>v(e)} {
1756
1757
  font-style: normal;
1757
1758
  justify-content: center;
1758
1759
  text-align: center;
@@ -1765,8 +1766,8 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1765
1766
  color: ${e=>e.appearance.theme.colorText};
1766
1767
  margin-bottom: 8px;
1767
1768
  }
1768
- `,Ml=Bt.h2`
1769
- ${e=>P(e)} {
1769
+ `,Ql=Lt.h2`
1770
+ ${e=>v(e)} {
1770
1771
  font-style: normal;
1771
1772
  justify-content: center;
1772
1773
  text-align: center;
@@ -1777,10 +1778,10 @@ ${e=>e.inlineStyles.map(([t,o])=>`.${to}${t}.${to}${t} { ${Object.entries(o).map
1777
1778
  letter-spacing: 0.28px;
1778
1779
  margin-bottom: 8px;
1779
1780
  }
1780
- `;import Ul from"react";import Pc from"styled-components";var vc=Pc.img`
1781
+ `;import Zl from"react";import jc from"styled-components";var Vc=jc.img`
1781
1782
  width: 100%;
1782
1783
  height: 100%;
1783
1784
  min-height: 200px;
1784
1785
  border-radius: ${e=>e.appearance.theme.borderRadius}px;
1785
- `;function zl({stepData:e,appearance:t,classPrefix:o=""}){return e.videoUri?Ul.createElement(Ke,{appearance:t,videoUri:e.videoUri}):e.imageUri?Ul.createElement(vc,{className:a(`${o}image`,t),appearance:t,src:e.imageUri}):null}var Ec=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:r,className:n,style:s,dismissible:p=!0,modalPosition:c})=>{let{getFlow:l,markFlowCompleted:g,markStepCompleted:d,isLoading:x,targetingLogicShouldHideFlow:k,updateCustomVariables:S,getFlowSteps:b,getFlowStatus:u,getCurrentStepIndex:v}=J(),{primaryCTAClickSideEffects:T,secondaryCTAClickSideEffects:C}=le(),{mergeAppearanceWithDefault:N}=Z(),{setOpenFlowState:A,getOpenFlowState:h,hasOpenModals:w}=Fe(),[f,F]=[h(e,!0),j=>A(e,j)];if(r=N(r),Bc(()=>{S(o)},[o,x]),x)return null;let I=l(e);if(!I||k(I)||u(e)===q||w())return null;let E=b(e)[v(e)],D=()=>{F(!1),t&&t(),g(e)};function $(){return we.createElement(we.Fragment,null,we.createElement(oe,{appearance:r}),we.createElement(Il,{appearance:r,className:Ce(a("announcementContainer",r),n),style:s},(p===!0||E.dismissible)&&c=="inline"&&we.createElement(Dl,{onClick:async()=>{await g(e),t&&t()},className:a("announcementDismissButton",r)},we.createElement(ke,null)),we.createElement(Nl,null,we.createElement($l,{appearance:r,className:a("announcementTitle",r),dangerouslySetInnerHTML:ae(E.title)}),E.subtitle&&we.createElement(Ml,{appearance:r,className:a("announcementSubtitle",r),dangerouslySetInnerHTML:ae(E.subtitle)})),(E.imageUri||E.videoUri)&&we.createElement(Ll,{className:a("announcementMediaContainer",r)},we.createElement(zl,{appearance:r,stepData:E})),(E.primaryButtonTitle||E.secondaryButtonTitle)&&we.createElement(Ol,{className:a("announcementCTAContainer",r)},E.secondaryButtonTitle&&we.createElement(R,{classPrefix:"announcement",title:E.secondaryButtonTitle,appearance:r,withMargin:!1,size:"small",type:"full-width",onClick:async()=>{E.handleSecondaryButtonClick(),C(E),i&&i(E,v(e),"secondary")},secondary:!0}),E.primaryButtonTitle&&we.createElement(R,{classPrefix:"announcement",title:E.primaryButtonTitle,appearance:r,withMargin:!1,size:"small",type:"full-width",onClick:async()=>{E.handlePrimaryButtonClick(),T(E),!(i&&i(E,v(e),"primary")===!1)&&(await d(e,E.id),await g(e))}}))))}let V={padding:"24px",maxWidth:"400px"};return c==="inline"?$():c!=="center"?we.createElement(Po,{modalPosition:c,onClose:D,visible:f,dismissible:p,appearance:r},$()):we.createElement(Ve,{appearance:r,onClose:D,visible:f,style:V,dismissible:p},$())};import*as Xo from"react";import Wl from"react";var _l=({as:e="span",children:t,variant:o="Body1",...i})=>Wl.createElement(pn,{color:"neutral.foreground",fontFamily:"default",forwardedAs:e,variant:o,...i},t),Ac=Object.fromEntries(Object.keys(Uo).map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():void 0,o=i=>Wl.createElement(_l,{as:t,...i,variant:e},i.children);return o.displayName=`Text.${e}`,[e,o]})),Hr=Object.assign(_l,Ac);var Hl=({as:e="button",className:t,size:o="md",title:i,variant:r="Primary",...n})=>{var s;return Xo.createElement(an,{className:`fr-button-${r.toLowerCase()}${t?` ${t}`:""}`,forwardedAs:e,variant:r,size:o,borderRadius:"md",...n},Xo.createElement(Hr,{color:(s=uo[r])==null?void 0:s.color,fontWeight:"semibold"},i))},Ic=Object.fromEntries(Object.keys(uo).map(e=>{let t=o=>Xo.createElement(Hl,{...o,variant:e});return t.displayName=`Button.${e}`,[e,t]})),Nc=Object.assign(Hl,Ic);export{mo as Box,Nc as Button,Ze as CheckBox,Ro as FlowType,at as FormLabel,cr as FormTextField,Ec as FrigadeAnnouncement,wc as FrigadeBanner,Or as FrigadeChecklist,Qe as FrigadeDefaultAppearance,Sc as FrigadeEmbeddedTip,Ri as FrigadeForm,Qd as FrigadeGuide,qd as FrigadeHeroChecklist,kc as FrigadeNPSSurvey,Xd as FrigadeProgressBadge,id as FrigadeProvider,Cc as FrigadeSupportWidget,uc as FrigadeTour,De as ProgressBar,$t as ProgressRing,Hr as Text,Fr as tokens,Fe as useFlowOpens,Rt as useFlowResponses,J as useFlows,Tr as useOrganization,eo as useUser,Oe as useUserFlowStates};
1786
+ `;function Rl({stepData:e,appearance:t,classPrefix:o=""}){return e.videoUri?Zl.createElement(Ze,{appearance:t,videoUri:e.videoUri}):e.imageUri?Zl.createElement(Vc,{className:a(`${o}image`,t),appearance:t,src:e.imageUri}):null}var Kc=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:n,appearance:i,className:r,style:l,dismissible:p=!0,modalPosition:d="center"})=>{let{getFlow:s,markFlowCompleted:m,markStepCompleted:c,isLoading:x,targetingLogicShouldHideFlow:S,updateCustomVariables:F,getFlowSteps:b,getFlowStatus:g,getCurrentStepIndex:B}=ee(),{primaryCTAClickSideEffects:y,secondaryCTAClickSideEffects:E}=ae(),{mergeAppearanceWithDefault:A}=oe(),{setOpenFlowState:I,getOpenFlowState:h,hasOpenModals:w}=ve(),[f,P]=[h(e,!0),le=>I(e,le)];if(i=A(i),Gc(()=>{F(o)},[o,x]),x)return null;let N=s(e);if(!N||S(N)||g(e)===Q||w())return null;let O=b(e)[B(e)],U=()=>{P(!1),t&&t(),m(e)};function W(){return ke.createElement(ke.Fragment,null,ke.createElement(ne,{appearance:i}),ke.createElement(Gl,{appearance:i,className:we(a("announcementContainer",i),r),style:l},(p===!0||O.dismissible)&&d=="inline"&&ke.createElement(Xl,{onClick:()=>$(this,null,function*(){yield m(e),t&&t()}),className:a("announcementDismissButton",i)},ke.createElement(Be,null)),ke.createElement(Kl,null,ke.createElement(Jl,{appearance:i,className:a("announcementTitle",i),dangerouslySetInnerHTML:pe(O.title)}),O.subtitle&&ke.createElement(Ql,{appearance:i,className:a("announcementSubtitle",i),dangerouslySetInnerHTML:pe(O.subtitle)})),(O.imageUri||O.videoUri)&&ke.createElement(Yl,{className:a("announcementMediaContainer",i)},ke.createElement(Rl,{appearance:i,stepData:O})),(O.primaryButtonTitle||O.secondaryButtonTitle)&&ke.createElement(ql,{className:a("announcementCTAContainer",i)},O.secondaryButtonTitle&&ke.createElement(re,{classPrefix:"announcement",title:O.secondaryButtonTitle,appearance:i,withMargin:!1,size:"small",type:"full-width",onClick:()=>$(this,null,function*(){O.handleSecondaryButtonClick(),E(O),n&&n(O,B(e),"secondary")}),secondary:!0}),O.primaryButtonTitle&&ke.createElement(re,{classPrefix:"announcement",title:O.primaryButtonTitle,appearance:i,withMargin:!1,size:"small",type:"full-width",onClick:()=>$(this,null,function*(){O.handlePrimaryButtonClick(),y(O),!(n&&n(O,B(e),"primary")===!1)&&(yield c(e,O.id),yield m(e))})}))))}let V={padding:"24px",maxWidth:"400px"};return d==="inline"?W():d!=="center"?ke.createElement(No,{modalPosition:d,onClose:U,visible:f,dismissible:p,appearance:i},W()):ke.createElement(Je,{appearance:i,onClose:U,visible:f,style:V,dismissible:p},W())};import*as or from"react";import ea from"react";var ta=i=>{var r=i,{as:e="span",children:t,variant:o="Body1"}=r,n=Ie(r,["as","children","variant"]);return ea.createElement(Tn,T({color:"neutral.foreground",fontFamily:"default",forwardedAs:e,variant:o},n),t)},qc=Object.fromEntries(Object.keys(Go).map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():void 0,o=n=>ea.createElement(ta,H(T({as:t},n),{variant:e}),n.children);return o.displayName=`Text.${e}`,[e,o]})),Xr=Object.assign(ta,qc);var oa=l=>{var p=l,{as:e="button",className:t,size:o="md",title:n,variant:i="Primary"}=p,r=Ie(p,["as","className","size","title","variant"]);var d;return or.createElement(wn,T({className:`fr-button-${i.toLowerCase()}${t?` ${t}`:""}`,forwardedAs:e,variant:i,size:o,borderRadius:"md"},r),or.createElement(Xr,{color:(d=yo[i])==null?void 0:d.color,fontWeight:"semibold"},n))},Yc=Object.fromEntries(Object.keys(yo).map(e=>{let t=o=>or.createElement(oa,H(T({},o),{variant:e}));return t.displayName=`Button.${e}`,[e,t]})),Xc=Object.assign(oa,Yc);export{Co as Box,Xc as Button,nt as CheckBox,sr as FlowType,gt as FormLabel,Cr as FormTextField,Kc as FrigadeAnnouncement,Wc as FrigadeBanner,zr as FrigadeChecklist,it as FrigadeDefaultAppearance,Mc as FrigadeEmbeddedTip,fn as FrigadeForm,fc as FrigadeGuide,dc as FrigadeHeroChecklist,Hc as FrigadeNPSSurvey,mc as FrigadeProgressBadge,bd as FrigadeProvider,Dc as FrigadeSupportWidget,Ac as FrigadeTour,We as ProgressBar,Ht as ProgressRing,Xr as Text,Ir as tokens,ve as useFlowOpens,no as useFlowResponses,ee as useFlows,Ar as useOrganization,so as useUser,Me as useUserFlowStates};
1786
1787
  //# sourceMappingURL=index.mjs.map