@frigade/react 2.0.4 → 2.0.6
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/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -10,12 +10,12 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
|
10
10
|
var react = require('@emotion/react');
|
|
11
11
|
var js = require('@frigade/js');
|
|
12
12
|
var solid$1 = require('@heroicons/react/16/solid');
|
|
13
|
-
var
|
|
13
|
+
var X = require('@radix-ui/react-collapsible');
|
|
14
14
|
var reactHookForm = require('react-hook-form');
|
|
15
|
-
var
|
|
15
|
+
var q = require('@radix-ui/react-radio-group');
|
|
16
16
|
var C = require('@radix-ui/react-select');
|
|
17
17
|
var outline = require('@heroicons/react/24/outline');
|
|
18
|
-
var
|
|
18
|
+
var M = require('@radix-ui/react-popover');
|
|
19
19
|
|
|
20
20
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
21
|
|
|
@@ -41,12 +41,12 @@ var T__namespace = /*#__PURE__*/_interopNamespace(T);
|
|
|
41
41
|
var ye__namespace = /*#__PURE__*/_interopNamespace(ye);
|
|
42
42
|
var jt__default = /*#__PURE__*/_interopDefault(jt);
|
|
43
43
|
var Qt__default = /*#__PURE__*/_interopDefault(Qt);
|
|
44
|
-
var J__namespace = /*#__PURE__*/_interopNamespace(J);
|
|
45
44
|
var X__namespace = /*#__PURE__*/_interopNamespace(X);
|
|
45
|
+
var q__namespace = /*#__PURE__*/_interopNamespace(q);
|
|
46
46
|
var C__namespace = /*#__PURE__*/_interopNamespace(C);
|
|
47
|
-
var
|
|
47
|
+
var M__namespace = /*#__PURE__*/_interopNamespace(M);
|
|
48
48
|
|
|
49
|
-
var Lt=Object.defineProperty;var Vt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var G=(e,t)=>{for(var o in t)Lt(e,o,{get:t[o],enumerable:!0});};var Ee={borders:{md:"1px solid"},borderWidths:{0:"0",md:"1px"}};var De={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",inherit:"inherit",red500:"#c00000"};var Oe={md:"10px",lg:"20px",round:"50%"};var l=e=>`var(--fr-colors-${e})`,Me={neutral:{background:l("white"),border:l("gray800"),foreground:l("black"),surface:l("gray700"),active:{background:l("white"),border:l("gray900"),foreground:l("black"),surface:l("gray700")},focus:{background:l("white"),border:l("gray900"),foreground:l("black"),surface:l("gray700")},hover:{background:l("white"),border:l("gray900"),foreground:l("black"),surface:l("gray700")}},primary:{background:l("blue500"),border:l("blue500"),foreground:l("white"),surface:l("blue500"),active:{background:l("blue400"),border:l("blue400"),foreground:l("white"),surface:l("blue400")},focus:{background:l("blue500"),border:l("blue500"),foreground:l("white"),surface:l("blue500")},hover:{background:l("blue400"),border:l("blue400"),foreground:l("white"),surface:l("blue400")}},secondary:{background:l("white"),border:l("gray800"),foreground:l("black"),surface:l("gray900"),active:{background:l("gray900"),border:l("gray800"),foreground:l("black"),surface:l("gray800")},focus:{background:l("gray900"),border:l("gray800"),foreground:l("black"),surface:l("gray900")},hover:{background:l("gray900"),border:l("gray800"),foreground:l("black"),surface:l("gray800")}}};var He={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var $t="px",_t=e=>typeof e=="number"?`${4*e}${$t}`:e,zt=[-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,-.5,0,.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"auto"],Ie=Object.fromEntries(zt.map(e=>[e,_t(e)]));var We={fontFamilies:{default:"inherit"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",demibold:"600",bold:"700",extrabold:"800",black:"900"},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"}};var ce={...Ee,colors:{...De,...Me},...We,radii:Oe,shadows:He,space:Ie};function q(e,t="",o="."){return Object.keys(e).reduce((i,r)=>{let s=`${t.length?`${t}${o}`:""}${r}`,a=e[r];return typeof a=="object"&&a!==null&&!Array.isArray(a)?Object.assign(i,q(a,s,o)):i[s]=a,i},{})}function me(e){return q(e,"--fr","-")}function Ae(e,t="--fr"){let o={};return Object.keys(e).forEach(i=>{let r=e[i];typeof r=="object"&&r!==null&&!Array.isArray(r)?o[i]=Ae(r,`${t}-${i}`):o[i]=`var(${t}-${i})`;}),o}var ue=me(ce),y=Ae(ce);var Kt=new Set(["alt","size","src"]),Nt=jt__default.default.all.filter(e=>e.indexOf("-")!=0&&!Kt.has(e)).map(e=>[e.replace(/-([a-z])/g,(t,o)=>o.toUpperCase()),null]),Ut=Object.fromEntries(Nt),fe=q(y.colors),Gt={color:fe,backgroundColor:fe,borderColor:fe,border:y.borders,borderRadius:y.radii,borderWidth:y.borderWidths,boxShadow:y.shadows,fontFamily:y.fontFamilies,fontSize:y.fontSizes,fontWeight:y.fontWeights,gap:y.space,lineHeight:y.lineHeights,margin:y.space,marginBottom:y.space,marginLeft:y.space,marginRight:y.space,marginTop:y.space,padding:y.space,paddingBottom:y.space,paddingLeft:y.space,paddingRight:y.space,paddingTop:y.space},Le={...Ut,...Gt},Ve={bg:["backgroundColor"],m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"]},$e=new Set(["active","focus","focusVisible","focusWithin","hover"]);function Jt(e){return Array.isArray(e)?new Map(e.map(t=>[t,t])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var _e=new Map(Object.entries(Le).map(([e,t])=>[e,Jt(t)])),Xt=new Map(Object.entries(Ve).map(([e,t])=>[e,new Set(t)])),qt=new Set(["height","width"]),Yt=new Set(["canvas","embed","iframe","img","input","object","video"]);function ze(e){let[t,o]=e.split(":");return [t,$e.has(o)?o:null]}function je(e,t="div"){let o=Object.assign({},e),i={};function r(n){if(n==null)return i;let a=`&:${n.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return i[a]==null&&(i[a]={}),i[a]}return Object.entries(o).forEach(([n,s])=>{let[a,d]=ze(n),u=Xt.get(a);u!=null&&(u.forEach(x=>{let m=`${x}${d?":"+d:""}`;o[m]=s;}),delete o[n]);}),Object.entries(o).forEach(([n,s])=>{let[a,d]=ze(n),u=_e.get(a);if(u!=null){if(typeof s=="string"&&s.indexOf(" ")>-1){let x=s.split(" ");r(d)[a]=x.map(m=>u.get(m.toString())??m).join(" ");}else u.has(s.toString())?r(d)[a]=u.get(s.toString()):r(d)[a]=s;(typeof t!="string"||!Yt.has(t)||!qt.has(a))&&delete o[n];}}),Object.keys(o).forEach(n=>{let s=n.substring(1);n.indexOf("_")===0&&_e.has(s)&&(o[s]=o[n],delete o[n]);}),{cssFromProps:i,unmatchedProps:o}}function Zt(){if(typeof window>"u"){let{JSDOM:e}=Vt("jsdom");return new e("<!DOCTYPE html>").window}return window}function Ke(e){return e?{__html:Qt__default.default(Zt()).sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img","code","li","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted"]})}:{__html:""}}function to(e){return e&&`fr-${e}`}function Ge(e){return e&&(Array.isArray(e)?e.map(t=>Ge(t)).join(" "):to(e))}function oo({as:e,children:t,className:o,css:i={},part:r,...n},s){let a=e??"div",{cssFromProps:d,unmatchedProps:u}=je(n,a),x=Ge(r),m=o||x?clsx.clsx(o,x):void 0,h=[{boxSizing:"border-box"},d,i];return typeof t=="string"?jsxRuntime.jsx(a,{className:m,css:h,...u,ref:s,dangerouslySetInnerHTML:Ke(t)}):jsxRuntime.jsx(a,{className:m,css:h,...u,ref:s,children:t})}var p=ye__namespace.forwardRef(oo);var f={};G(f,{Body1:()=>Po,Body2:()=>Co,Caption:()=>So,Display1:()=>fo,Display2:()=>go,H1:()=>xo,H2:()=>yo,H3:()=>ho,H4:()=>bo});var ge={};G(ge,{Body1:()=>po,Body2:()=>co,Caption:()=>mo,Display1:()=>ro,Display2:()=>no,H1:()=>io,H2:()=>ao,H3:()=>so,H4:()=>lo});var M={color:"neutral.foreground",fontFamily:"default",margin:"0"},ro={...M,fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"},no={...M,fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"},io={...M,fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"},ao={...M,fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"},so={...M,fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"},lo={...M,fontSize:"md",fontWeight:"demibold",lineHeight:"md"},po={...M,fontSize:"md",fontWeight:"regular",lineHeight:"md"},co={...M,fontSize:"sm",fontWeight:"regular",lineHeight:"sm"},mo={...M,fontSize:"xs",fontWeight:"regular",lineHeight:"xs"};var uo=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],H=Object.fromEntries(uo.map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",o=ye__namespace.forwardRef(({as:i=t,children:r,...n},s)=>jsxRuntime.jsx(p,{as:i,...ge[e],...n,ref:s,children:r}));return o.displayName=`Text.${e}`,[e,o]})),fo=H.Display1,go=H.Display2,xo=H.H1,yo=H.H2,ho=H.H3,bo=H.H4,Po=H.Body1,Co=H.Body2,So=H.Caption;var xe={};G(xe,{Link:()=>Ro,Plain:()=>Bo,Primary:()=>To,Secondary:()=>wo});var ne={borderWidth:"0",borderRadius:"md",display:"flex",gap:"2",padding:"2 4"},To={...ne,backgroundColor:"primary.surface",color:"primary.foreground","backgroundColor:hover":"primary.hover.surface"},wo={...ne,backgroundColor:"secondary.background",borderColor:"secondary.border",borderStyle:"solid",borderWidth:"1px",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background"},Ro={...ne,backgroundColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"},Bo={...ne,backgroundColor:"transparent",color:"neutral.foreground"};function Xe({as:e,children:t,part:o,title:i,variant:r="Primary",...n}){let s=r.toLocaleLowerCase();return jsxRuntime.jsxs(p,{as:e??"button",part:[`button-${s}`,o],...xe[r],...n,children:[t,i&&jsxRuntime.jsx(f.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"demibold",part:"button-title",children:i})]})}var vo=["Primary","Secondary","Link","Plain"],ko=Object.fromEntries(vo.map(e=>{let t=o=>jsxRuntime.jsx(Xe,{...o,variant:e,children:o.children});return t.displayName=`Button.${e}`,[e,t]})),b=Object.assign(Xe,ko);var g={};G(g,{Column:()=>Oo,Row:()=>Do});var Do=ye__namespace.forwardRef((e,t)=>jsxRuntime.jsx(p,{display:"flex",flexDirection:"row",...e,ref:t})),Oo=ye__namespace.forwardRef((e,t)=>jsxRuntime.jsx(p,{display:"flex",flexDirection:"column",...e,ref:t}));var B=ye.createContext({apiKey:"",modals:new Set,setModals:()=>{},currentModal:null,navigate:()=>{}});function $o({children:e,navigate:t,theme:o,...i}){let r=o?me(o):{},[n,s]=ye.useState(new Set),a=ye.useMemo(()=>new js.Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,__readOnly:i.__readOnly,__flowConfigOverrides:i.__flowConfigOverrides}),[i.userId,i.groupId,i.apiKey]),d=t??((x,m="_self")=>{window.open(x,m);});ye.useEffect(()=>()=>{a.destroy();},[]);let u=n.size>0?n.values().next().value:null;return jsxRuntime.jsxs(B.Provider,{value:{modals:n,setModals:s,currentModal:u,navigate:d,...i,frigade:a},children:[jsxRuntime.jsx(react.Global,{styles:{":root":{...ue,...r}}}),jsxRuntime.jsx(react.ThemeProvider,{theme:y,children:e})]})}function Y(e,t){let[o,i]=ye.useState(),[,r]=ye.useState(""),{frigade:n}=ye.useContext(B),s=a=>{a.id===e&&(t!=null&&t.variables&&a.applyVariables(t.variables),i(a),r(Math.random().toString()));};return ye.useEffect(()=>((async()=>{let a=await n.getFlow(e);if(!a||n.hasFailedToLoad()){i(void 0);return}t!=null&&t.variables&&a.applyVariables(t.variables),i(a);})(),n.onStateChange(s),()=>{n.removeStateChangeHandler(s);}),[]),{flow:o}}function $(e,{onComplete:t,onDismiss:o}={}){let i=ye.useRef(null);return ye.useEffect(()=>{e!=null&&(e.isCompleted&&i.current===!1&&(async()=>await(t==null?void 0:t(e)))(),i.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:ye.useCallback(async r=>{if(await(o==null?void 0:o(e,r))===!1)return r.preventDefault(),!1;await e.skip();},[e])}}function Q(e,{onPrimary:t,onSecondary:o}={}){let{navigate:i}=ye.useContext(B);return {handlePrimary:ye.useCallback(async(r,n)=>await(t==null?void 0:t(e,r))===!1?(r.preventDefault(),!1):(await e.complete(n),e.primaryButtonUri!=null&&i(e.primaryButtonUri,e.primaryButtonUriTarget),!0),[e]),handleSecondary:ye.useCallback(async(r,n)=>await(o==null?void 0:o(e,r))===!1?(r.preventDefault(),!1):(await e.complete(n),e.secondaryButtonUri!=null&&i(e.secondaryButtonUri,e.secondaryButtonUriTarget),!0),[e])}}function Z(e){let{currentModal:t,modals:o,setModals:i}=ye.useContext(B),[r,n]=ye.useState(!1);ye.useEffect(()=>{e!=null&&e.isVisible&&e&&!o.has(e.id)&&i(a=>new Set(a).add(e.id));},[e==null?void 0:e.id,e==null?void 0:e.isVisible]),ye.useEffect(()=>{let a=t===(e==null?void 0:e.id);(e==null?void 0:e.id)!=null&&a!==r&&n(a);},[e==null?void 0:e.id,t]);function s(){o.has(e==null?void 0:e.id)&&i(a=>{let d=new Set(a);return d.delete(e==null?void 0:e.id),d});}return {isCurrentModal:r,removeModal:s}}function E({as:e,children:t,container:o,dismissible:i=!1,flowId:r,onComplete:n,onDismiss:s,onPrimary:a,onSecondary:d,variables:u,...x}){let{flow:m}=Y(r,{variables:u}),h=m==null?void 0:m.getCurrentStep(),{handleDismiss:V}=$(m,{onComplete:n,onDismiss:s}),{handlePrimary:oe,handleSecondary:pe}=Q(h,{onPrimary:a,onSecondary:d}),{isCurrentModal:U,removeModal:de}=Z(m);return ye.useEffect(()=>{!(m!=null&&m.isVisible)&&U&&de();},[m==null?void 0:m.isVisible,U]),m==null||!m.isVisible||!U?null:(m.start(),h.start(),jsxRuntime.jsx(e??p,{position:"relative",...x,children:t({flow:m,handleDismiss:V,handlePrimary:oe,handleSecondary:pe,parentProps:{container:o,dismissible:i,flowId:r,variables:u,...x},step:h})}))}function ot(e){return jsxRuntime.jsx(E,{as:c,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:"card",...e,children:({handleDismiss:t,handlePrimary:o,handleSecondary:i,parentProps:{dismissible:r},step:n})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(g.Row,{alignItems:"center",flexWrap:"wrap",gap:1,justifyContent:"space-between",part:"card-header",children:[jsxRuntime.jsx(c.Title,{children:n.title}),r&&jsxRuntime.jsx(c.Dismiss,{onClick:t}),jsxRuntime.jsx(c.Subtitle,{flexBasis:"100%",children:n.subtitle})]}),jsxRuntime.jsx(c.Media,{src:n.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(g.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(c.Secondary,{title:n.secondaryButtonTitle,onClick:i}),jsxRuntime.jsx(c.Primary,{title:n.primaryButtonTitle??"Continue",onClick:o})]})]})})}function rt({part:e,src:t,...o}){return jsxRuntime.jsx(p,{as:"img",part:["image",e],src:t,...o})}function er(e){var t,o,i,r;return e.includes("youtube")?`https://www.youtube.com/embed/${(t=e.split("v=")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(o=e.split("vimeo.com/")[1])==null?void 0:o.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(i=e.split("wistia.com/medias/")[1])==null?void 0:i.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(r=e.split("loom.com/share/")[1])==null?void 0:r.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function it({part:e,src:t,...o}){let i=er(t);return i?jsxRuntime.jsx(p,{allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"gray100",borderWidth:0,part:["video",e],src:i,...o}):t!=null&&t.endsWith(".mp4")?jsxRuntime.jsx(p,{as:"video",controls:!0,part:["video",e],src:t,...o}):(console.error(`Could not map videoUri ${t} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function z({src:e,type:t,...o}){return jsxRuntime.jsx(t==="video"?it:rt,{src:e,...o})}var c=ye__namespace.forwardRef(({children:e,flowId:t,...o},i)=>{if(t!=null)return jsxRuntime.jsx(ot,{flowId:t,...o});let r=o.as??g.Column;return jsxRuntime.jsx(r,{backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,...o,ref:i,children:e})});c.Dismiss=e=>jsxRuntime.jsx(b.Plain,{part:"dismiss",padding:0,...e,children:jsxRuntime.jsx(solid.XMarkIcon,{height:"24",fill:"currentColor"})});c.Media=({src:e,...t})=>e==null?null:jsxRuntime.jsx(z,{borderRadius:"md",src:e,...t});c.Primary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Primary,{title:t,onClick:e,...o});c.Secondary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Secondary,{title:t,onClick:e,...o});c.Subtitle=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.Body2,{display:"block",part:"subtitle",...t,children:e});c.Title=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.Body1,{display:"block",fontWeight:"bold",part:"title",...t,children:e});function F({children:e,...t}){return jsxRuntime.jsx(T__namespace.Root,{defaultOpen:!0,modal:!0,children:jsxRuntime.jsx(T__namespace.Portal,{children:jsxRuntime.jsxs(p,{inset:"0",position:"fixed",zIndex:"9999",children:[jsxRuntime.jsx(T__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(p,{background:"rgb(0 0 0 / 0.5)",part:"dialog-overlay",position:"fixed",inset:"0"})}),jsxRuntime.jsx(T__namespace.Content,{asChild:!0,onOpenAutoFocus:o=>o.preventDefault(),onPointerDownOutside:o=>o.preventDefault(),children:jsxRuntime.jsx(c,{boxShadow:"md",left:"50%",maxWidth:"430px",p:8,part:"dialog",position:"fixed",textAlign:"center",top:"50%",transform:"translate(-50%, -50%)",...t,children:e})})]})})})}F.Dismiss=e=>jsxRuntime.jsx(T__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(b.Plain,{part:"close",position:"absolute",right:"-4px",top:"4px",...e,children:jsxRuntime.jsx(solid.XMarkIcon,{height:"24",fill:"currentColor"})})});F.Subtitle=({children:e,...t})=>jsxRuntime.jsx(T__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(f.Body2,{part:"subtitle",...t,children:e})});F.Media=({src:e,...t})=>e==null?null:jsxRuntime.jsx(z,{borderRadius:"md",src:e,...t});F.Primary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Primary,{title:t,onClick:e,...o});F.ProgressDots=({current:e,total:t})=>{if(t==1)return null;let o=[...Array(t)].map((i,r)=>jsxRuntime.jsx("circle",{r:4,cx:4+16*r,cy:"4px",fill:e===r?y.colors.blue500:y.colors.blue800},r));return jsxRuntime.jsx(p,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*t-8} 8`,width:16*t-8,children:o})};F.Secondary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Secondary,{title:t,onClick:e,...o});F.Title=({children:e,...t})=>jsxRuntime.jsx(T__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(f.H3,{part:"title",...t,children:e})});function ir({flowId:e,...t}){return jsxRuntime.jsx(E,{as:F,dismissible:!0,flowId:e,...t,children:({flow:o,handleDismiss:i,handlePrimary:r,handleSecondary:n,parentProps:{dismissible:s},step:a})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(F.Dismiss,{onClick:i}),jsxRuntime.jsxs(g.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(F.Title,{children:a.title}),jsxRuntime.jsx(F.Subtitle,{children:a.subtitle})]}),jsxRuntime.jsx(F.Media,{src:a.videoUri??a.imageUri,type:a.videoUri?"video":"image",css:{aspectRatio:"1.5",objectFit:"cover",width:"100%"}}),jsxRuntime.jsx(F.ProgressDots,{current:o.getNumberOfCompletedSteps(),total:o.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(g.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[a.secondaryButtonTitle&&jsxRuntime.jsx(F.Secondary,{onClick:n,title:a.secondaryButtonTitle}),a.primaryButtonTitle&&jsxRuntime.jsx(F.Primary,{onClick:r,title:a.primaryButtonTitle??"Continue"})]})]})})}function sr({flowId:e,...t}){return jsxRuntime.jsx(E,{as:c,borderWidth:"md",display:"flex",flexDirection:"row",flowId:e,gap:3,justifyContent:"space-between",part:"banner",...t,children:({handleDismiss:o,handlePrimary:i,handleSecondary:r,step:n})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(g.Row,{gap:3,children:[n.imageUri&&jsxRuntime.jsx("img",{src:n.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(g.Column,{children:[jsxRuntime.jsx(f.H4,{mb:1,children:n.title}),jsxRuntime.jsx(f.Body2,{color:"gray500",children:n.subtitle})]})]}),jsxRuntime.jsxs(g.Row,{alignItems:"center",gap:3,justifyContent:"center",children:[n.secondaryButtonTitle&&jsxRuntime.jsx(b.Secondary,{title:n.secondaryButtonTitle,onClick:r}),jsxRuntime.jsx(b.Primary,{title:n.primaryButtonTitle,onClick:i}),t.dismissible&&jsxRuntime.jsx(c.Dismiss,{onClick:o})]})]})})}var dt={};G(dt,{Collapsible:()=>pt,CollapsibleStep:()=>ae});var ae={};G(ae,{Content:()=>Ce,Root:()=>Se,Trigger:()=>Fe});var dr=react.keyframes`
|
|
49
|
+
var Lt=Object.defineProperty;var Vt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var J=(e,t)=>{for(var o in t)Lt(e,o,{get:t[o],enumerable:!0});};var Ee={borders:{md:"1px solid"},borderWidths:{0:"0",md:"1px"}};var De={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",inherit:"inherit",red500:"#c00000"};var Oe={md:"10px",lg:"20px",round:"50%"};var l=e=>`var(--fr-colors-${e})`,Me={neutral:{background:l("white"),border:l("gray800"),foreground:l("black"),surface:l("gray700"),active:{background:l("white"),border:l("gray900"),foreground:l("black"),surface:l("gray700")},focus:{background:l("white"),border:l("gray900"),foreground:l("black"),surface:l("gray700")},hover:{background:l("white"),border:l("gray900"),foreground:l("black"),surface:l("gray700")}},primary:{background:l("blue500"),border:l("blue500"),foreground:l("white"),surface:l("blue500"),active:{background:l("blue400"),border:l("blue400"),foreground:l("white"),surface:l("blue400")},focus:{background:l("blue500"),border:l("blue500"),foreground:l("white"),surface:l("blue500")},hover:{background:l("blue400"),border:l("blue400"),foreground:l("white"),surface:l("blue400")}},secondary:{background:l("white"),border:l("gray800"),foreground:l("black"),surface:l("gray900"),active:{background:l("gray900"),border:l("gray800"),foreground:l("black"),surface:l("gray800")},focus:{background:l("gray900"),border:l("gray800"),foreground:l("black"),surface:l("gray900")},hover:{background:l("gray900"),border:l("gray800"),foreground:l("black"),surface:l("gray800")}}};var He={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var $t="px",_t=e=>typeof e=="number"?`${4*e}${$t}`:e,zt=[-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,-.5,0,.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"auto"],Ie=Object.fromEntries(zt.map(e=>[e,_t(e)]));var We={fontFamilies:{default:"inherit"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",demibold:"600",bold:"700",extrabold:"800",black:"900"},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"}};var ce={...Ee,colors:{...De,...Me},...We,radii:Oe,shadows:He,space:Ie};function Y(e,t="",o="."){return Object.keys(e).reduce((i,r)=>{let s=`${t.length?`${t}${o}`:""}${r}`,a=e[r];return typeof a=="object"&&a!==null&&!Array.isArray(a)?Object.assign(i,Y(a,s,o)):i[s]=a,i},{})}function me(e){return Y(e,"--fr","-")}function Ae(e,t="--fr"){let o={};return Object.keys(e).forEach(i=>{let r=e[i];typeof r=="object"&&r!==null&&!Array.isArray(r)?o[i]=Ae(r,`${t}-${i}`):o[i]=`var(${t}-${i})`;}),o}var ue=me(ce),y=Ae(ce);var Kt=new Set(["alt","size","src"]),Nt=jt__default.default.all.filter(e=>e.indexOf("-")!=0&&!Kt.has(e)).map(e=>[e.replace(/-([a-z])/g,(t,o)=>o.toUpperCase()),null]),Ut=Object.fromEntries(Nt),fe=Y(y.colors),Gt={color:fe,backgroundColor:fe,borderColor:fe,border:y.borders,borderRadius:y.radii,borderWidth:y.borderWidths,boxShadow:y.shadows,fontFamily:y.fontFamilies,fontSize:y.fontSizes,fontWeight:y.fontWeights,gap:y.space,lineHeight:y.lineHeights,margin:y.space,marginBottom:y.space,marginLeft:y.space,marginRight:y.space,marginTop:y.space,padding:y.space,paddingBottom:y.space,paddingLeft:y.space,paddingRight:y.space,paddingTop:y.space},Le={...Ut,...Gt},Ve={bg:["backgroundColor"],m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"]},$e=new Set(["active","focus","focusVisible","focusWithin","hover"]);function Jt(e){return Array.isArray(e)?new Map(e.map(t=>[t,t])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var _e=new Map(Object.entries(Le).map(([e,t])=>[e,Jt(t)])),Xt=new Map(Object.entries(Ve).map(([e,t])=>[e,new Set(t)])),qt=new Set(["height","width"]),Yt=new Set(["canvas","embed","iframe","img","input","object","video"]);function ze(e){let[t,o]=e.split(":");return [t,$e.has(o)?o:null]}function je(e,t="div"){let o=Object.assign({},e),i={};function r(n){if(n==null)return i;let a=`&:${n.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return i[a]==null&&(i[a]={}),i[a]}return Object.entries(o).forEach(([n,s])=>{let[a,d]=ze(n),u=Xt.get(a);u!=null&&(u.forEach(x=>{let m=`${x}${d?":"+d:""}`;o[m]=s;}),delete o[n]);}),Object.entries(o).forEach(([n,s])=>{let[a,d]=ze(n),u=_e.get(a);if(u!=null){if(typeof s=="string"&&s.indexOf(" ")>-1){let x=s.split(" ");r(d)[a]=x.map(m=>u.get(m.toString())??m).join(" ");}else u.has(s.toString())?r(d)[a]=u.get(s.toString()):r(d)[a]=s;(typeof t!="string"||!Yt.has(t)||!qt.has(a))&&delete o[n];}}),Object.keys(o).forEach(n=>{let s=n.substring(1);n.indexOf("_")===0&&_e.has(s)&&(o[s]=o[n],delete o[n]);}),{cssFromProps:i,unmatchedProps:o}}function Zt(){if(typeof window>"u"){let{JSDOM:e}=Vt("jsdom");return new e("<!DOCTYPE html>").window}return window}function Ke(e){return e?{__html:Qt__default.default(Zt()).sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img","code","li","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted"]})}:{__html:""}}function to(e){return e&&`fr-${e}`}function Ge(e){return e&&(Array.isArray(e)?e.map(t=>Ge(t)).join(" "):to(e))}function oo({as:e,children:t,className:o,css:i={},part:r,...n},s){let a=e??"div",{cssFromProps:d,unmatchedProps:u}=je(n,a),x=Ge(r),m=o||x?clsx.clsx(o,x):void 0,h=[{boxSizing:"border-box"},d,i];return typeof t=="string"?jsxRuntime.jsx(a,{className:m,css:h,...u,ref:s,dangerouslySetInnerHTML:Ke(t)}):jsxRuntime.jsx(a,{className:m,css:h,...u,ref:s,children:t})}var p=ye__namespace.forwardRef(oo);var f={};J(f,{Body1:()=>Po,Body2:()=>Co,Caption:()=>So,Display1:()=>fo,Display2:()=>go,H1:()=>xo,H2:()=>yo,H3:()=>ho,H4:()=>bo});var ge={};J(ge,{Body1:()=>po,Body2:()=>co,Caption:()=>mo,Display1:()=>ro,Display2:()=>no,H1:()=>io,H2:()=>ao,H3:()=>so,H4:()=>lo});var H={color:"neutral.foreground",fontFamily:"default",margin:"0"},ro={...H,fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"},no={...H,fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"},io={...H,fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"},ao={...H,fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"},so={...H,fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"},lo={...H,fontSize:"md",fontWeight:"demibold",lineHeight:"md"},po={...H,fontSize:"md",fontWeight:"regular",lineHeight:"md"},co={...H,fontSize:"sm",fontWeight:"regular",lineHeight:"sm"},mo={...H,fontSize:"xs",fontWeight:"regular",lineHeight:"xs"};var uo=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],I=Object.fromEntries(uo.map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",o=ye__namespace.forwardRef(({as:i=t,children:r,...n},s)=>jsxRuntime.jsx(p,{as:i,...ge[e],...n,ref:s,children:r}));return o.displayName=`Text.${e}`,[e,o]})),fo=I.Display1,go=I.Display2,xo=I.H1,yo=I.H2,ho=I.H3,bo=I.H4,Po=I.Body1,Co=I.Body2,So=I.Caption;var xe={};J(xe,{Link:()=>Ro,Plain:()=>Bo,Primary:()=>To,Secondary:()=>wo});var ne={borderWidth:"0",borderRadius:"md",display:"flex",gap:"2",padding:"2 4"},To={...ne,backgroundColor:"primary.surface",color:"primary.foreground","backgroundColor:hover":"primary.hover.surface"},wo={...ne,backgroundColor:"secondary.background",borderColor:"secondary.border",borderStyle:"solid",borderWidth:"1px",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background"},Ro={...ne,backgroundColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"},Bo={...ne,backgroundColor:"transparent",color:"neutral.foreground"};function Xe({as:e,children:t,part:o,title:i,variant:r="Primary",...n}){let s=r.toLocaleLowerCase();return jsxRuntime.jsxs(p,{as:e??"button",part:[`button-${s}`,o],...xe[r],...n,children:[t,i&&jsxRuntime.jsx(f.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"demibold",part:"button-title",children:i})]})}var vo=["Primary","Secondary","Link","Plain"],ko=Object.fromEntries(vo.map(e=>{let t=o=>jsxRuntime.jsx(Xe,{...o,variant:e,children:o.children});return t.displayName=`Button.${e}`,[e,t]})),b=Object.assign(Xe,ko);var g={};J(g,{Column:()=>Oo,Row:()=>Do});var Do=ye__namespace.forwardRef((e,t)=>jsxRuntime.jsx(p,{display:"flex",flexDirection:"row",...e,ref:t})),Oo=ye__namespace.forwardRef((e,t)=>jsxRuntime.jsx(p,{display:"flex",flexDirection:"column",...e,ref:t}));var B=ye.createContext({apiKey:"",modals:new Set,setModals:()=>{},currentModal:null,navigate:()=>{}});function $o({children:e,navigate:t,theme:o,...i}){let r=o?me(o):{},[n,s]=ye.useState(new Set),a=ye.useMemo(()=>new js.Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,__readOnly:i.__readOnly,__flowConfigOverrides:i.__flowConfigOverrides}),[i.userId,i.groupId,i.apiKey]),d=t??((x,m="_self")=>{window.open(x,m);});ye.useEffect(()=>()=>{a.destroy();},[]);let u=n.size>0?n.values().next().value:null;return jsxRuntime.jsxs(B.Provider,{value:{modals:n,setModals:s,currentModal:u,navigate:d,...i,frigade:a},children:[jsxRuntime.jsx(react.Global,{styles:{":root":{...ue,...r}}}),jsxRuntime.jsx(react.ThemeProvider,{theme:y,children:e})]})}function Q(e,t){let[o,i]=ye.useState(),[,r]=ye.useState(""),{frigade:n}=ye.useContext(B),s=a=>{a.id===e&&(t!=null&&t.variables&&a.applyVariables(t.variables),i(a),r(Math.random().toString()));};return ye.useEffect(()=>((async()=>{let a=await n.getFlow(e);if(!a||n.hasFailedToLoad()){i(void 0);return}t!=null&&t.variables&&a.applyVariables(t.variables),i(a);})(),n.onStateChange(s),()=>{n.removeStateChangeHandler(s);}),[]),{flow:o}}function _(e,{onComplete:t,onDismiss:o}={}){let i=ye.useRef(null);return ye.useEffect(()=>{e!=null&&(e.isCompleted&&i.current===!1&&(async()=>await(t==null?void 0:t(e)))(),i.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:ye.useCallback(async r=>{if(await(o==null?void 0:o(e,r))===!1)return r.preventDefault(),!1;await e.skip();},[e])}}function Z(e,{onPrimary:t,onSecondary:o}={}){let{navigate:i}=ye.useContext(B);return {handlePrimary:ye.useCallback(async(r,n)=>await(t==null?void 0:t(e,r))===!1?(r.preventDefault(),!1):(await e.complete(n),e.primaryButtonUri!=null&&i(e.primaryButtonUri,e.primaryButtonUriTarget),!0),[e]),handleSecondary:ye.useCallback(async(r,n)=>await(o==null?void 0:o(e,r))===!1?(r.preventDefault(),!1):(await e.complete(n),e.secondaryButtonUri!=null&&i(e.secondaryButtonUri,e.secondaryButtonUriTarget),!0),[e])}}function ee(e){let{currentModal:t,modals:o,setModals:i}=ye.useContext(B),[r,n]=ye.useState(!1);ye.useEffect(()=>{e!=null&&e.isVisible&&e&&!o.has(e.id)&&i(a=>new Set(a).add(e.id));},[e==null?void 0:e.id,e==null?void 0:e.isVisible]),ye.useEffect(()=>{let a=t===(e==null?void 0:e.id);(e==null?void 0:e.id)!=null&&a!==r&&n(a);},[e==null?void 0:e.id,t]);function s(){o.has(e==null?void 0:e.id)&&i(a=>{let d=new Set(a);return d.delete(e==null?void 0:e.id),d});}return {isCurrentModal:r,removeModal:s}}function D({as:e,children:t,container:o,dismissible:i=!1,flowId:r,onComplete:n,onDismiss:s,onPrimary:a,onSecondary:d,variables:u,...x}){let{flow:m}=Q(r,{variables:u}),h=m==null?void 0:m.getCurrentStep(),{handleDismiss:E}=_(m,{onComplete:n,onDismiss:s}),{handlePrimary:$,handleSecondary:pe}=Z(h,{onPrimary:a,onSecondary:d}),{isCurrentModal:G,removeModal:de}=ee(m);return ye.useEffect(()=>{!(m!=null&&m.isVisible)&&G&&de();},[m==null?void 0:m.isVisible,G]),m==null||!m.isVisible||!G?null:(m.start(),h.start(),jsxRuntime.jsx(e??p,{position:"relative",...x,children:t({flow:m,handleDismiss:E,handlePrimary:$,handleSecondary:pe,parentProps:{container:o,dismissible:i,flowId:r,variables:u,...x},step:h})}))}function ot(e){return jsxRuntime.jsx(D,{as:c,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:"card",...e,children:({handleDismiss:t,handlePrimary:o,handleSecondary:i,parentProps:{dismissible:r},step:n})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(g.Row,{alignItems:"center",flexWrap:"wrap",gap:1,justifyContent:"space-between",part:"card-header",children:[jsxRuntime.jsx(c.Title,{children:n.title}),r&&jsxRuntime.jsx(c.Dismiss,{onClick:t}),jsxRuntime.jsx(c.Subtitle,{flexBasis:"100%",children:n.subtitle})]}),jsxRuntime.jsx(c.Media,{src:n.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(g.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(c.Secondary,{title:n.secondaryButtonTitle,onClick:i}),jsxRuntime.jsx(c.Primary,{title:n.primaryButtonTitle??"Continue",onClick:o})]})]})})}function rt({part:e,src:t,...o}){return jsxRuntime.jsx(p,{as:"img",part:["image",e],src:t,...o})}function er(e){var t,o,i,r;return e.includes("youtube")?`https://www.youtube.com/embed/${(t=e.split("v=")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(o=e.split("vimeo.com/")[1])==null?void 0:o.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(i=e.split("wistia.com/medias/")[1])==null?void 0:i.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(r=e.split("loom.com/share/")[1])==null?void 0:r.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function it({part:e,src:t,...o}){let i=er(t);return i?jsxRuntime.jsx(p,{allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"gray100",borderWidth:0,part:["video",e],src:i,...o}):t!=null&&t.endsWith(".mp4")?jsxRuntime.jsx(p,{as:"video",controls:!0,part:["video",e],src:t,...o}):(console.error(`Could not map videoUri ${t} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function j({src:e,type:t,...o}){return jsxRuntime.jsx(t==="video"?it:rt,{src:e,...o})}var c=ye__namespace.forwardRef(({children:e,flowId:t,...o},i)=>{if(t!=null)return jsxRuntime.jsx(ot,{flowId:t,...o});let r=o.as??g.Column;return jsxRuntime.jsx(r,{backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,...o,ref:i,children:e})});c.Dismiss=e=>jsxRuntime.jsx(b.Plain,{part:"dismiss",padding:0,...e,children:jsxRuntime.jsx(solid.XMarkIcon,{height:"24",fill:"currentColor"})});c.Media=({src:e,...t})=>e==null?null:jsxRuntime.jsx(j,{borderRadius:"md",src:e,...t});c.Primary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Primary,{title:t,onClick:e,...o});c.Secondary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Secondary,{title:t,onClick:e,...o});c.Subtitle=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.Body2,{display:"block",part:"subtitle",...t,children:e});c.Title=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.Body1,{display:"block",fontWeight:"bold",part:"title",...t,children:e});function F({children:e,...t}){return jsxRuntime.jsx(T__namespace.Root,{defaultOpen:!0,modal:!0,children:jsxRuntime.jsx(T__namespace.Portal,{children:jsxRuntime.jsxs(p,{inset:"0",position:"fixed",zIndex:"9999",children:[jsxRuntime.jsx(T__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(p,{background:"rgb(0 0 0 / 0.5)",part:"dialog-overlay",position:"fixed",inset:"0"})}),jsxRuntime.jsx(T__namespace.Content,{asChild:!0,onOpenAutoFocus:o=>o.preventDefault(),onPointerDownOutside:o=>o.preventDefault(),children:jsxRuntime.jsx(c,{boxShadow:"md",left:"50%",maxWidth:"430px",p:8,part:"dialog",position:"fixed",textAlign:"center",top:"50%",transform:"translate(-50%, -50%)",...t,children:e})})]})})})}F.Dismiss=e=>jsxRuntime.jsx(T__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(b.Plain,{part:"close",position:"absolute",right:"-4px",top:"4px",...e,children:jsxRuntime.jsx(solid.XMarkIcon,{height:"24",fill:"currentColor"})})});F.Subtitle=({children:e,...t})=>jsxRuntime.jsx(T__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(f.Body2,{part:"subtitle",...t,children:e})});F.Media=({src:e,...t})=>e==null?null:jsxRuntime.jsx(j,{borderRadius:"md",src:e,...t});F.Primary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Primary,{title:t,onClick:e,...o});F.ProgressDots=({current:e,total:t})=>{if(t==1)return null;let o=[...Array(t)].map((i,r)=>jsxRuntime.jsx("circle",{r:4,cx:4+16*r,cy:"4px",fill:e===r?y.colors.blue500:y.colors.blue800},r));return jsxRuntime.jsx(p,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*t-8} 8`,width:16*t-8,children:o})};F.Secondary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Secondary,{title:t,onClick:e,...o});F.Title=({children:e,...t})=>jsxRuntime.jsx(T__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(f.H3,{part:"title",...t,children:e})});function ir({flowId:e,...t}){return jsxRuntime.jsx(D,{as:F,dismissible:!0,flowId:e,...t,children:({flow:o,handleDismiss:i,handlePrimary:r,handleSecondary:n,parentProps:{dismissible:s},step:a})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(F.Dismiss,{onClick:i}),jsxRuntime.jsxs(g.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(F.Title,{children:a.title}),jsxRuntime.jsx(F.Subtitle,{children:a.subtitle})]}),jsxRuntime.jsx(F.Media,{src:a.videoUri??a.imageUri,type:a.videoUri?"video":"image",css:{aspectRatio:"1.5",objectFit:"cover",width:"100%"}}),jsxRuntime.jsx(F.ProgressDots,{current:o.getNumberOfCompletedSteps(),total:o.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(g.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[a.secondaryButtonTitle&&jsxRuntime.jsx(F.Secondary,{onClick:n,title:a.secondaryButtonTitle}),a.primaryButtonTitle&&jsxRuntime.jsx(F.Primary,{onClick:r,title:a.primaryButtonTitle??"Continue"})]})]})})}function sr({flowId:e,...t}){return jsxRuntime.jsx(D,{as:c,borderWidth:"md",display:"flex",flexDirection:"row",flowId:e,gap:3,justifyContent:"space-between",part:"banner",...t,children:({handleDismiss:o,handlePrimary:i,handleSecondary:r,step:n})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(g.Row,{gap:3,children:[n.imageUri&&jsxRuntime.jsx("img",{src:n.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(g.Column,{children:[jsxRuntime.jsx(f.H4,{mb:1,children:n.title}),jsxRuntime.jsx(f.Body2,{color:"gray500",children:n.subtitle})]})]}),jsxRuntime.jsxs(g.Row,{alignItems:"center",gap:3,justifyContent:"center",children:[n.secondaryButtonTitle&&jsxRuntime.jsx(b.Secondary,{title:n.secondaryButtonTitle,onClick:r}),jsxRuntime.jsx(b.Primary,{title:n.primaryButtonTitle,onClick:i}),t.dismissible&&jsxRuntime.jsx(c.Dismiss,{onClick:o})]})]})})}var dt={};J(dt,{Collapsible:()=>pt,CollapsibleStep:()=>ae});var ae={};J(ae,{Content:()=>Ce,Root:()=>Se,Trigger:()=>Fe});var dr=react.keyframes`
|
|
50
50
|
from {
|
|
51
51
|
height: 0;
|
|
52
52
|
opacity: 0;
|
|
@@ -64,7 +64,7 @@ var Lt=Object.defineProperty;var Vt=(e=>typeof require<"u"?require:typeof Proxy<
|
|
|
64
64
|
height: 0;
|
|
65
65
|
opacity: 0;
|
|
66
66
|
}
|
|
67
|
-
`,mr=()=>jsxRuntime.jsx(p,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function ur({checked:e=!1}){return jsxRuntime.jsx(p,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(p,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(mr,{})})})}function Ce({children:e}){return jsxRuntime.jsx(J__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(g.Column,{css:{'&[data-state="open"]':{animation:`${dr} 300ms ease-out`},'&[data-state="closed"]':{animation:`${cr} 300ms ease-out`},overflow:"hidden"},gap:5,children:[jsxRuntime.jsx(p,{}),e]})})}function Se({children:e,open:t=!1,onOpenChange:o=()=>{}}){return jsxRuntime.jsx(J__namespace.Root,{asChild:!0,open:t,onOpenChange:o,children:jsxRuntime.jsx(c,{borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,children:e})})}function Fe({isCompleted:e,title:t}){return jsxRuntime.jsx(J__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(g.Row,{alignItems:"center",justifyContent:"space-between",children:[jsxRuntime.jsxs(g.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(ur,{checked:e}),jsxRuntime.jsx(f.Body2,{fontWeight:"demibold",children:t})]}),jsxRuntime.jsx(p,{as:solid$1.ChevronDownIcon,color:"gray100",display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}function lt({handlePrimary:e,handleSecondary:t,open:o,onOpenChange:i,step:r}){let{isCompleted:n,primaryButtonTitle:s,secondaryButtonTitle:a,subtitle:d,title:u}=r;return jsxRuntime.jsxs(Se,{open:o,onOpenChange:i,children:[jsxRuntime.jsx(Fe,{isCompleted:n,title:u}),jsxRuntime.jsxs(Ce,{children:[jsxRuntime.jsx(c.Media,{aspectRatio:2.5,objectFit:"cover",src:r.imageUri}),jsxRuntime.jsx(c.Subtitle,{color:"gray500",children:d}),jsxRuntime.jsxs(g.Row,{gap:3,children:[jsxRuntime.jsx(c.Secondary,{title:a,onClick:t}),jsxRuntime.jsx(c.Primary,{title:s,onClick:e})]})]})]})}var xr={default:lt};function yr({flow:e,step:t,stepTypes:o,...i}){var d;let[r,n]=ye.useState(t.id);ye.useEffect(()=>{n(t.id);},[t.id]);let s={...xr,...o},a=Array.from((d=e.steps)==null?void 0:d.entries()).map(([,u])=>{let x=s[u.type]??lt;function m(h){n(h?u.id:null);}return jsxRuntime.jsx(x,{flow:e,onOpenChange:m,open:u.id===r,step:u,...i},u.id)});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(g.Column,{gap:2,children:[jsxRuntime.jsx(c.Title,{children:e.title}),jsxRuntime.jsx(c.Subtitle,{color:"gray500",children:e.subtitle})]}),a]})}function pt({flowId:e,stepTypes:t={},...o}){return jsxRuntime.jsx(E,{as:c,borderWidth:"md",flowId:e,part:"checklist",...o,children:i=>jsxRuntime.jsx(yr,{stepTypes:t,...i})})}var Cr=new Set(["required","min","max","minLength","maxLength","pattern"]);function Sr({fieldComponent:e,control:t,fieldData:o}){o.pattern!=null&&(typeof o.pattern=="string"?o.pattern=new RegExp(o.pattern.replace(/^\/|\/$/g,"")):typeof o.pattern=="object"&&typeof o.pattern.value=="string"&&(o.pattern.value=new RegExp(o.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(o).filter(([n])=>Cr.has(n))),r=reactHookForm.useController({name:o.id,control:t,rules:i});return jsxRuntime.jsx(e,{...r,fieldData:o})}function ct({fieldTypes:e,handleDismiss:t,handlePrimary:o,handleSecondary:i,parentProps:{dismissible:r},step:n}){var m;let{control:s,handleSubmit:a}=reactHookForm.useForm({delayError:2e3,mode:"onChange"}),d=[];function u(h,V){o(V,h);}function x(h,V){i(V,h);}return (m=n.fields)==null||m.forEach(h=>{e[h.type]!=null&&d.push(jsxRuntime.jsx(Sr,{control:s,fieldComponent:e[h.type],fieldData:h},h.id));}),jsxRuntime.jsxs(g.Column,{gap:5,part:"form-step",children:[jsxRuntime.jsxs(g.Row,{alignItems:"center",flexWrap:"wrap",gap:1,justifyContent:"space-between",part:"form-step-header",children:[jsxRuntime.jsx(c.Title,{children:n.title}),r&&jsxRuntime.jsx(c.Dismiss,{onClick:t}),jsxRuntime.jsx(c.Subtitle,{flexBasis:"100%",children:n.subtitle})]}),d,jsxRuntime.jsxs(g.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[n.secondaryButtonTitle&&jsxRuntime.jsx(b.Secondary,{title:n.secondaryButtonTitle,onClick:a(x)}),jsxRuntime.jsx(b.Primary,{title:n.primaryButtonTitle??"Submit",onClick:a(u)})]},"form-footer")]})}function mt({error:e}){var t;return (t=e==null?void 0:e.message)!=null&&t.length?jsxRuntime.jsx(f.Caption,{color:"red500",display:"block",part:"field-error",textAlign:"end",children:e==null?void 0:e.message}):null}function ut({children:e,id:t,required:o=!1}){return jsxRuntime.jsxs(f.H4,{as:"label",htmlFor:t,part:"field-label",children:[e,o&&" *"]})}var te={px:"4",py:"2",backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md",display:"block",outline:"none",width:"100%"};function L({children:e,field:t,fieldData:o,fieldState:i}){let{id:r,label:n,placeholder:s}=o,{error:a}=i,d={id:r,...t,...s?{placeholder:s}:{},...te,"aria-invalid":!!a,value:t.value??""};return jsxRuntime.jsxs(p,{part:"field",children:[jsxRuntime.jsx(ut,{id:r,required:!!o.required,children:n}),e(d),jsxRuntime.jsx(mt,{error:a})]})}var Rr=()=>jsxRuntime.jsx(p,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Br=ye__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsxs(p,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:t,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(f.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(X__namespace.Item,{id:t,value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(p,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(p,{as:X__namespace.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(Rr,{})})})})]}));function yt(e){let{field:{onChange:t,value:o},fieldData:{options:i=[]}}=e,r=i.map(({label:n,value:s})=>jsxRuntime.jsx(Br,{value:s,label:n},s));return jsxRuntime.jsx(L,{...e,children:()=>jsxRuntime.jsx(X__namespace.Root,{value:o,onValueChange:t,asChild:!0,children:jsxRuntime.jsx(g.Column,{gap:2,part:"field-radio-group",children:r})})})}var Er=ye__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsx(C__namespace.Item,{value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(p,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(C__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(f.Body2,{part:"field-select-option-label",children:e})})})}));function Pt(e){let{field:{onChange:t,value:o},fieldData:{options:i=[],placeholder:r}}=e,n=i.map(({label:s,value:a})=>jsxRuntime.jsx(Er,{value:a,label:s},a));return jsxRuntime.jsx(L,{...e,children:()=>jsxRuntime.jsxs(C__namespace.Root,{value:o,onValueChange:t,children:[jsxRuntime.jsx(C__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(f.Body2,{...te,alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(C__namespace.Value,{placeholder:r??"Select one"}),jsxRuntime.jsx(C__namespace.Icon,{children:jsxRuntime.jsx(p,{as:outline.ChevronDownIcon,color:"gray100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]})}),jsxRuntime.jsx(C__namespace.Portal,{children:jsxRuntime.jsx(C__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(p,{...te,p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",children:jsxRuntime.jsx(C__namespace.Viewport,{children:n})})})})]})})}function St(e){return jsxRuntime.jsx(L,{...e,children:t=>jsxRuntime.jsx(f.Body2,{as:"input",part:"field-text",type:"text",...t})})}function Tt(e){return jsxRuntime.jsx(L,{...e,children:t=>jsxRuntime.jsx(f.Body2,{as:"textarea",part:"field-textarea",...t})})}var Dr={radio:yt,select:Pt,text:St,textarea:Tt};function Or({fieldTypes:e={},flowId:t,...o}){let i=Object.assign({},Dr,e);return jsxRuntime.jsx(E,{flowId:t,part:"form",...o,children:r=>jsxRuntime.jsx(ct,{fieldTypes:i,...r})})}function se(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[t,o]=ye.useState(e),[i,r]=ye.useState(null),n=ye.useCallback(s=>{r(s);},[]);return ye.useLayoutEffect(()=>{if(!i)return;let s=()=>{let a=i.getBoundingClientRect();o(a);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[i]),{node:i,rect:t,ref:n}}var Wr=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function vt({style:e={},part:t="",...o}){return jsxRuntime.jsxs(p,{part:`dot-wrapper ${t}`,style:{height:"48px",position:"absolute",width:"48px",...e},...o,children:[jsxRuntime.jsx(p,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${Wr}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(p,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]})}function kt({props:e,alignAttr:t,sideAttr:o}){let i=o??"bottom",r={},n=()=>{if(["after","before"].includes(e.align)){if(t=="start")return "before";if(t=="end")return "after"}return e.align??"after"},s="-24px",a={top:"bottom",right:"left",bottom:"top",left:"right"};r[a[i]]=s;let d=n();return ["before","end"].includes(d)?["top","bottom"].includes(i)?r.right=s:r.bottom=s:["after","start"].includes(d)?["top","bottom"].includes(i)?r.left=s:r.top=s:["top","bottom"].includes(i)?r.left=`calc(50% + ${s})`:r.top=`calc(50% + ${s})`,r}var Et={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function Dt(e,t){let o=Object.fromEntries(Et.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),i=Object.fromEntries(Et.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0));if(o.align=o.align??"after",o.side=o.side??"bottom",["before","after"].includes(o.align)){let r={after:"end",before:"start"},n=(m,h)=>["top","bottom"].includes(h)?m=="after"?"marginLeft":"marginRight":m=="after"?"marginTop":"marginBottom",s=o.alignOffset??0,a=o.style??{},d=o.side??"bottom",u=o.align;o.style={...a,[n(u,d)]:s};let x=["top","bottom"].includes(d)?t.width:t.height;o.alignOffset=(x+s)*-1,o.align=r[u];}return {contentProps:o,rootProps:i}}function S({anchor:e,children:t,className:o,spotlight:i=!1,style:r,...n}){let{node:s,rect:a,ref:d}=se(),{node:u,rect:x,ref:m}=se(),{contentProps:h,rootProps:V}=Dt(n,a),[oe,pe]=ye.useState(h.align),[U,de]=ye.useState(h.side),[Be,Ht]=ye.useState(0),[It,Wt]=ye.useState(0);if(s!==null){let W=s.getAttribute("data-align"),re=s.getAttribute("data-side");oe!==W&&pe(W),U!==re&&de(re);}let ve=ye.useRef(null);if(ye.useEffect(()=>{let W=document.querySelector(e);W!=null&&(m(W),ve.current=W);},[e]),ye.useEffect(()=>{let{scrollX:W,scrollY:re}=window;Ht(x.left+W),Wt(x.top+re);},[x.left,x.top]),u==null)return null;let ke="0";typeof window<"u"&&(ke=window.getComputedStyle(u).borderRadius);let At=kt({props:n,alignAttr:oe,sideAttr:U});return jsxRuntime.jsxs(O__namespace.Root,{defaultOpen:!0,...V,children:[jsxRuntime.jsx(O__namespace.Anchor,{virtualRef:ve}),jsxRuntime.jsx(O__namespace.Portal,{children:jsxRuntime.jsxs("div",{className:o,css:{bottom:0,left:0,position:"absolute",right:0,top:0,zIndex:9999,pointerEvents:"none"},children:[i&&jsxRuntime.jsx(p,{part:"tooltip-spotlight",position:"absolute",style:{borderRadius:ke,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",height:x.height,left:Be,top:It,width:x.width}}),jsxRuntime.jsx(O__namespace.Content,{asChild:!0,...h,ref:d,children:jsxRuntime.jsxs(c,{boxShadow:"md",part:"tooltip",position:"relative",css:{maxWidth:"360px",pointerEvents:"auto",...r},children:[jsxRuntime.jsx(vt,{style:At}),t]})})]})})]})}S.Close=e=>jsxRuntime.jsx(O__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(b.Plain,{css:{top:"12px",right:"4px"},part:"close",position:"absolute",...e,children:jsxRuntime.jsx(solid.XMarkIcon,{height:"24",fill:"currentColor"})})});S.Media=({src:e,...t})=>e==null?null:jsxRuntime.jsx(z,{borderRadius:"md md 0 0",borderWidth:"0",css:{aspectRatio:"2",objectFit:"cover"},margin:"-5 -5 0",src:e,...t});S.Primary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Primary,{title:t,onClick:e,...o});S.Progress=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.H4,{part:"progress",...t,children:e});S.Secondary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Secondary,{title:t,onClick:e,...o});S.Subtitle=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.Body2,{part:"subtitle",...t,children:e});S.Title=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.H4,{part:"title",...t,children:e});function Mt({dismissible:e=!0,flow:t,onDismiss:o,onPrimary:i,onSecondary:r,step:n,...s}){let{handleDismiss:a}=$(t,{onDismiss:o}),{handlePrimary:d,handleSecondary:u}=Q(n,{onPrimary:i,onSecondary:r});return jsxRuntime.jsxs(S,{anchor:n.selector,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault(),...s,children:[e&&jsxRuntime.jsx(S.Close,{onClick:a}),jsxRuntime.jsx(S.Media,{src:n.videoUri??n.imageUri,type:n.videoUri?"video":"image"}),jsxRuntime.jsxs(g.Column,{gap:1,part:"tooltip-header",children:[jsxRuntime.jsx(S.Title,{children:n.title}),jsxRuntime.jsx(S.Subtitle,{color:"gray500",children:n.subtitle})]}),jsxRuntime.jsxs(g.Row,{alignItems:"center",gap:3,justifyContent:"flex-end",part:"tooltip-footer",children:[jsxRuntime.jsx(S.Progress,{marginRight:"auto",transform:"translateY(1px)",children:`${t.getNumberOfCompletedSteps()+1}/${t.getNumberOfAvailableSteps()}`}),jsxRuntime.jsx(S.Secondary,{title:n.secondaryButtonTitle,onClick:u}),jsxRuntime.jsx(S.Primary,{title:n.primaryButtonTitle,onClick:d})]})]},n.id)}function _r({flowId:e,onComplete:t,variables:o,...i}){let{flow:r}=Y(e,{variables:o});$(r,{onComplete:t});let{isCurrentModal:n,removeModal:s}=Z(r);if(ye.useEffect(()=>{!(r!=null&&r.isVisible)&&n&&s();},[r==null?void 0:r.isVisible,n]),r==null||r.isVisible===!1||!n)return null;r.start();let a=r.getCurrentStep();return a==null||a.start(),jsxRuntime.jsx(Mt,{step:a,flow:r,...i})}function Kr(){let{frigade:e}=ye.useContext(B);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Ur(){let{userId:e,frigade:t}=ye.useContext(B);async function o(r){await t.identify(e,r);}async function i(r,n){await t.track(r,n);}return {userId:e,addProperties:o,track:i}}function Jr(){let{groupId:e,frigade:t}=ye.useContext(B);async function o(r){if(!e){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}await t.group(e,r);}async function i(r,n){await t.track(r,n);}return {groupId:e,addProperties:o,track:i}}
|
|
67
|
+
`,mr=()=>jsxRuntime.jsx(p,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function ur({checked:e=!1}){return jsxRuntime.jsx(p,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(p,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(mr,{})})})}function Ce({children:e}){return jsxRuntime.jsx(X__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(g.Column,{css:{'&[data-state="open"]':{animation:`${dr} 300ms ease-out`},'&[data-state="closed"]':{animation:`${cr} 300ms ease-out`},overflow:"hidden"},gap:5,children:[jsxRuntime.jsx(p,{}),e]})})}function Se({children:e,open:t=!1,onOpenChange:o=()=>{}}){return jsxRuntime.jsx(X__namespace.Root,{asChild:!0,open:t,onOpenChange:o,children:jsxRuntime.jsx(c,{borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,children:e})})}function Fe({isCompleted:e,title:t}){return jsxRuntime.jsx(X__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(g.Row,{alignItems:"center",justifyContent:"space-between",children:[jsxRuntime.jsxs(g.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(ur,{checked:e}),jsxRuntime.jsx(f.Body2,{fontWeight:"demibold",children:t})]}),jsxRuntime.jsx(p,{as:solid$1.ChevronDownIcon,color:"gray100",display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}function lt({handlePrimary:e,handleSecondary:t,open:o,onOpenChange:i,step:r}){let{isCompleted:n,primaryButtonTitle:s,secondaryButtonTitle:a,subtitle:d,title:u}=r;return jsxRuntime.jsxs(Se,{open:o,onOpenChange:i,children:[jsxRuntime.jsx(Fe,{isCompleted:n,title:u}),jsxRuntime.jsxs(Ce,{children:[jsxRuntime.jsx(c.Media,{aspectRatio:2.5,objectFit:"cover",src:r.imageUri}),jsxRuntime.jsx(c.Subtitle,{color:"gray500",children:d}),jsxRuntime.jsxs(g.Row,{gap:3,children:[jsxRuntime.jsx(c.Secondary,{title:a,onClick:t}),jsxRuntime.jsx(c.Primary,{title:s,onClick:e})]})]})]})}var xr={default:lt};function yr({flow:e,step:t,stepTypes:o,...i}){var d;let[r,n]=ye.useState(t.id);ye.useEffect(()=>{n(t.id);},[t.id]);let s={...xr,...o},a=Array.from((d=e.steps)==null?void 0:d.entries()).map(([,u])=>{let x=s[u.type]??lt;function m(h){var E,$;n(h?u.id:null),($=(E=e.steps)==null?void 0:E.get(u.id))==null||$.start();}return jsxRuntime.jsx(x,{flow:e,onOpenChange:m,open:u.id===r,step:u,...i},u.id)});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(g.Column,{gap:2,children:[jsxRuntime.jsx(c.Title,{children:e.title}),jsxRuntime.jsx(c.Subtitle,{color:"gray500",children:e.subtitle})]}),a]})}function pt({flowId:e,stepTypes:t={},...o}){return jsxRuntime.jsx(D,{as:c,borderWidth:"md",flowId:e,part:"checklist",...o,children:i=>jsxRuntime.jsx(yr,{stepTypes:t,...i})})}var Cr=new Set(["required","min","max","minLength","maxLength","pattern"]);function Sr({fieldComponent:e,control:t,fieldData:o}){o.pattern!=null&&(typeof o.pattern=="string"?o.pattern=new RegExp(o.pattern.replace(/^\/|\/$/g,"")):typeof o.pattern=="object"&&typeof o.pattern.value=="string"&&(o.pattern.value=new RegExp(o.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(o).filter(([n])=>Cr.has(n))),r=reactHookForm.useController({name:o.id,control:t,rules:i});return jsxRuntime.jsx(e,{...r,fieldData:o})}function ct({fieldTypes:e,handleDismiss:t,handlePrimary:o,handleSecondary:i,parentProps:{dismissible:r},step:n}){var m;let{control:s,handleSubmit:a}=reactHookForm.useForm({delayError:2e3,mode:"onChange"}),d=[];function u(h,E){o(E,h);}function x(h,E){i(E,h);}return (m=n.fields)==null||m.forEach(h=>{e[h.type]!=null&&d.push(jsxRuntime.jsx(Sr,{control:s,fieldComponent:e[h.type],fieldData:h},h.id));}),jsxRuntime.jsxs(g.Column,{gap:5,part:"form-step",children:[jsxRuntime.jsxs(g.Row,{alignItems:"center",flexWrap:"wrap",gap:1,justifyContent:"space-between",part:"form-step-header",children:[jsxRuntime.jsx(c.Title,{children:n.title}),r&&jsxRuntime.jsx(c.Dismiss,{onClick:t}),jsxRuntime.jsx(c.Subtitle,{flexBasis:"100%",children:n.subtitle})]}),d,jsxRuntime.jsxs(g.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[n.secondaryButtonTitle&&jsxRuntime.jsx(b.Secondary,{title:n.secondaryButtonTitle,onClick:a(x)}),jsxRuntime.jsx(b.Primary,{title:n.primaryButtonTitle??"Submit",onClick:a(u)})]},"form-footer")]})}function mt({error:e}){var t;return (t=e==null?void 0:e.message)!=null&&t.length?jsxRuntime.jsx(f.Caption,{color:"red500",display:"block",part:"field-error",textAlign:"end",children:e==null?void 0:e.message}):null}function ut({children:e,id:t,required:o=!1}){return jsxRuntime.jsxs(f.H4,{as:"label",htmlFor:t,part:"field-label",children:[e,o&&" *"]})}var oe={px:"4",py:"2",backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md",display:"block",outline:"none",width:"100%"};function V({children:e,field:t,fieldData:o,fieldState:i}){let{id:r,label:n,placeholder:s}=o,{error:a}=i,d={id:r,...t,...s?{placeholder:s}:{},...oe,"aria-invalid":!!a,value:t.value??""};return jsxRuntime.jsxs(p,{part:"field",children:[jsxRuntime.jsx(ut,{id:r,required:!!o.required,children:n}),e(d),jsxRuntime.jsx(mt,{error:a})]})}var Rr=()=>jsxRuntime.jsx(p,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Br=ye__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsxs(p,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:t,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(f.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(q__namespace.Item,{id:t,value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(p,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(p,{as:q__namespace.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(Rr,{})})})})]}));function yt(e){let{field:{onChange:t,value:o},fieldData:{options:i=[]}}=e,r=i.map(({label:n,value:s})=>jsxRuntime.jsx(Br,{value:s,label:n},s));return jsxRuntime.jsx(V,{...e,children:()=>jsxRuntime.jsx(q__namespace.Root,{value:o,onValueChange:t,asChild:!0,children:jsxRuntime.jsx(g.Column,{gap:2,part:"field-radio-group",children:r})})})}var Er=ye__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsx(C__namespace.Item,{value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(p,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(C__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(f.Body2,{part:"field-select-option-label",children:e})})})}));function Pt(e){let{field:{onChange:t,value:o},fieldData:{options:i=[],placeholder:r}}=e,n=i.map(({label:s,value:a})=>jsxRuntime.jsx(Er,{value:a,label:s},a));return jsxRuntime.jsx(V,{...e,children:()=>jsxRuntime.jsxs(C__namespace.Root,{value:o,onValueChange:t,children:[jsxRuntime.jsx(C__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(f.Body2,{...oe,alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(C__namespace.Value,{placeholder:r??"Select one"}),jsxRuntime.jsx(C__namespace.Icon,{children:jsxRuntime.jsx(p,{as:outline.ChevronDownIcon,color:"gray100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]})}),jsxRuntime.jsx(C__namespace.Portal,{children:jsxRuntime.jsx(C__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(p,{...oe,p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",children:jsxRuntime.jsx(C__namespace.Viewport,{children:n})})})})]})})}function St(e){return jsxRuntime.jsx(V,{...e,children:t=>jsxRuntime.jsx(f.Body2,{as:"input",part:"field-text",type:"text",...t})})}function Tt(e){return jsxRuntime.jsx(V,{...e,children:t=>jsxRuntime.jsx(f.Body2,{as:"textarea",part:"field-textarea",...t})})}var Dr={radio:yt,select:Pt,text:St,textarea:Tt};function Or({fieldTypes:e={},flowId:t,...o}){let i=Object.assign({},Dr,e);return jsxRuntime.jsx(D,{flowId:t,part:"form",...o,children:r=>jsxRuntime.jsx(ct,{fieldTypes:i,...r})})}function se(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[t,o]=ye.useState(e),[i,r]=ye.useState(null),n=ye.useCallback(s=>{r(s);},[]);return ye.useLayoutEffect(()=>{if(!i)return;let s=()=>{let a=i.getBoundingClientRect();o(a);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[i]),{node:i,rect:t,ref:n}}var Wr=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function vt({style:e={},part:t="",...o}){return jsxRuntime.jsxs(p,{part:`dot-wrapper ${t}`,style:{height:"48px",position:"absolute",width:"48px",...e},...o,children:[jsxRuntime.jsx(p,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${Wr}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(p,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]})}function kt({props:e,alignAttr:t,sideAttr:o}){let i=o??"bottom",r={},n=()=>{if(["after","before"].includes(e.align)){if(t=="start")return "before";if(t=="end")return "after"}return e.align??"after"},s="-24px",a={top:"bottom",right:"left",bottom:"top",left:"right"};r[a[i]]=s;let d=n();return ["before","end"].includes(d)?["top","bottom"].includes(i)?r.right=s:r.bottom=s:["after","start"].includes(d)?["top","bottom"].includes(i)?r.left=s:r.top=s:["top","bottom"].includes(i)?r.left=`calc(50% + ${s})`:r.top=`calc(50% + ${s})`,r}var Et={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function Dt(e,t){let o=Object.fromEntries(Et.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),i=Object.fromEntries(Et.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0));if(o.align=o.align??"after",o.side=o.side??"bottom",["before","after"].includes(o.align)){let r={after:"end",before:"start"},n=(m,h)=>["top","bottom"].includes(h)?m=="after"?"marginLeft":"marginRight":m=="after"?"marginTop":"marginBottom",s=o.alignOffset??0,a=o.style??{},d=o.side??"bottom",u=o.align;o.style={...a,[n(u,d)]:s};let x=["top","bottom"].includes(d)?t.width:t.height;o.alignOffset=(x+s)*-1,o.align=r[u];}return {contentProps:o,rootProps:i}}function S({anchor:e,children:t,className:o,spotlight:i=!1,style:r,...n}){let{node:s,rect:a,ref:d}=se(),{node:u,rect:x,ref:m}=se(),{contentProps:h,rootProps:E}=Dt(n,a),[$,pe]=ye.useState(h.align),[G,de]=ye.useState(h.side),[Be,Ht]=ye.useState(0),[It,Wt]=ye.useState(0);if(s!==null){let A=s.getAttribute("data-align"),re=s.getAttribute("data-side");$!==A&&pe(A),G!==re&&de(re);}let ve=ye.useRef(null);if(ye.useEffect(()=>{let A=document.querySelector(e);A!=null&&(m(A),ve.current=A);},[e]),ye.useEffect(()=>{let{scrollX:A,scrollY:re}=window;Ht(x.left+A),Wt(x.top+re);},[x.left,x.top]),u==null)return null;let ke="0";typeof window<"u"&&(ke=window.getComputedStyle(u).borderRadius);let At=kt({props:n,alignAttr:$,sideAttr:G});return jsxRuntime.jsxs(M__namespace.Root,{defaultOpen:!0,...E,children:[jsxRuntime.jsx(M__namespace.Anchor,{virtualRef:ve}),jsxRuntime.jsx(M__namespace.Portal,{children:jsxRuntime.jsxs("div",{className:o,css:{bottom:0,left:0,position:"absolute",right:0,top:0,zIndex:9999,pointerEvents:"none"},children:[i&&jsxRuntime.jsx(p,{part:"tooltip-spotlight",position:"absolute",style:{borderRadius:ke,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",height:x.height,left:Be,top:It,width:x.width}}),jsxRuntime.jsx(M__namespace.Content,{asChild:!0,...h,ref:d,children:jsxRuntime.jsxs(c,{boxShadow:"md",part:"tooltip",position:"relative",css:{maxWidth:"360px",pointerEvents:"auto",...r},children:[jsxRuntime.jsx(vt,{style:At}),t]})})]})})]})}S.Close=e=>jsxRuntime.jsx(M__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(b.Plain,{css:{top:"12px",right:"4px"},part:"close",position:"absolute",...e,children:jsxRuntime.jsx(solid.XMarkIcon,{height:"24",fill:"currentColor"})})});S.Media=({src:e,...t})=>e==null?null:jsxRuntime.jsx(j,{borderRadius:"md md 0 0",borderWidth:"0",css:{aspectRatio:"2",objectFit:"cover"},margin:"-5 -5 0",src:e,...t});S.Primary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Primary,{title:t,onClick:e,...o});S.Progress=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.H4,{part:"progress",...t,children:e});S.Secondary=({onClick:e,title:t,...o})=>t==null?null:jsxRuntime.jsx(b.Secondary,{title:t,onClick:e,...o});S.Subtitle=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.Body2,{part:"subtitle",...t,children:e});S.Title=({children:e,...t})=>e==null?null:jsxRuntime.jsx(f.H4,{part:"title",...t,children:e});function Mt({dismissible:e=!0,flow:t,onDismiss:o,onPrimary:i,onSecondary:r,step:n,...s}){let{handleDismiss:a}=_(t,{onDismiss:o}),{handlePrimary:d,handleSecondary:u}=Z(n,{onPrimary:i,onSecondary:r});return jsxRuntime.jsxs(S,{anchor:n.selector,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault(),...s,children:[e&&jsxRuntime.jsx(S.Close,{onClick:a}),jsxRuntime.jsx(S.Media,{src:n.videoUri??n.imageUri,type:n.videoUri?"video":"image"}),jsxRuntime.jsxs(g.Column,{gap:1,part:"tooltip-header",children:[jsxRuntime.jsx(S.Title,{children:n.title}),jsxRuntime.jsx(S.Subtitle,{color:"gray500",children:n.subtitle})]}),jsxRuntime.jsxs(g.Row,{alignItems:"center",gap:3,justifyContent:"flex-end",part:"tooltip-footer",children:[jsxRuntime.jsx(S.Progress,{marginRight:"auto",transform:"translateY(1px)",children:`${t.getNumberOfCompletedSteps()+1}/${t.getNumberOfAvailableSteps()}`}),jsxRuntime.jsx(S.Secondary,{title:n.secondaryButtonTitle,onClick:u}),jsxRuntime.jsx(S.Primary,{title:n.primaryButtonTitle,onClick:d})]})]},n.id)}function _r({flowId:e,onComplete:t,variables:o,...i}){let{flow:r}=Q(e,{variables:o});_(r,{onComplete:t});let{isCurrentModal:n,removeModal:s}=ee(r);if(ye.useEffect(()=>{!(r!=null&&r.isVisible)&&n&&s();},[r==null?void 0:r.isVisible,n]),r==null||r.isVisible===!1||!n)return null;r.start();let a=r.getCurrentStep();return a==null||a.start(),jsxRuntime.jsx(Mt,{step:a,flow:r,...i})}function Kr(){let{frigade:e}=ye.useContext(B);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Ur(){let{userId:e,frigade:t}=ye.useContext(B);async function o(r){await t.identify(e,r);}async function i(r,n){await t.track(r,n);}return {userId:e,addProperties:o,track:i}}function Jr(){let{groupId:e,frigade:t}=ye.useContext(B);async function o(r){if(!e){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}await t.group(e,r);}async function i(r,n){await t.track(r,n);}return {groupId:e,addProperties:o,track:i}}
|
|
68
68
|
|
|
69
69
|
Object.defineProperty(exports, 'Flow', {
|
|
70
70
|
enumerable: true,
|
|
@@ -88,12 +88,12 @@ exports.Tooltip = S;
|
|
|
88
88
|
exports.Tour = _r;
|
|
89
89
|
exports.themeVariables = ue;
|
|
90
90
|
exports.useBoundingClientRect = se;
|
|
91
|
-
exports.useFlow =
|
|
92
|
-
exports.useFlowHandlers =
|
|
91
|
+
exports.useFlow = Q;
|
|
92
|
+
exports.useFlowHandlers = _;
|
|
93
93
|
exports.useFrigade = Kr;
|
|
94
94
|
exports.useGroup = Jr;
|
|
95
|
-
exports.useModal =
|
|
96
|
-
exports.useStepHandlers =
|
|
95
|
+
exports.useModal = ee;
|
|
96
|
+
exports.useStepHandlers = Z;
|
|
97
97
|
exports.useUser = Ur;
|
|
98
98
|
//# sourceMappingURL=out.js.map
|
|
99
99
|
//# sourceMappingURL=index.cjs.map
|