@frigade/react 2.5.26 → 2.5.28
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 +53 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1246,16 +1246,17 @@ interface ImageProps extends BoxProps {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
declare function Image({ part, src, ...props }: ImageProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1248
1248
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1249
|
+
declare const VIDEO_PROP_NAMES: readonly ["autoPlay", "controls", "controlsList", "crossOrigin", "disablePictureInPicture", "disableRemotePlayback", "loop", "muted", "playsInline", "poster", "preload", "src"];
|
|
1250
|
+
type VideoPropName = (typeof VIDEO_PROP_NAMES)[number];
|
|
1251
|
+
|
|
1252
|
+
interface VideoProps extends BoxProps, Pick<React$1.VideoHTMLAttributes<HTMLVideoElement>, VideoPropName> {
|
|
1252
1253
|
}
|
|
1253
|
-
declare function
|
|
1254
|
+
declare function Video({ autoPlay, controls, controlsList, crossOrigin, disablePictureInPicture, disableRemotePlayback, loop, muted, playsInline, poster, preload, part, src, ...props }: VideoProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1254
1255
|
|
|
1255
|
-
interface
|
|
1256
|
-
|
|
1256
|
+
interface MediaProps extends VideoProps {
|
|
1257
|
+
type?: 'image' | 'video';
|
|
1257
1258
|
}
|
|
1258
|
-
declare function
|
|
1259
|
+
declare function Media({ src, type, ...props }: MediaProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1259
1260
|
|
|
1260
1261
|
interface TextProps extends BoxProps {
|
|
1261
1262
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
import { keyframes, Global, ThemeProvider } from '@emotion/react';
|
|
3
3
|
import * as X from '@radix-ui/react-dialog';
|
|
4
4
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
5
|
-
import * as
|
|
5
|
+
import * as Oo from 'react';
|
|
6
6
|
import { createContext, useContext, useCallback, useState, useEffect, useLayoutEffect, useRef, useMemo, useSyncExternalStore, Fragment as Fragment$1 } from 'react';
|
|
7
7
|
import { clsx } from 'clsx';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import fn from 'known-css-properties';
|
|
9
|
+
import wn from 'dompurify';
|
|
10
10
|
import { FlowType, Frigade } from '@frigade/js';
|
|
11
11
|
import * as js from '@frigade/js';
|
|
12
12
|
export { js as FrigadeJS };
|
|
13
|
-
import
|
|
14
|
-
import * as
|
|
13
|
+
import mi from 'embla-carousel-react';
|
|
14
|
+
import * as Ie from '@radix-ui/react-collapsible';
|
|
15
15
|
import { useForm, FormProvider, useFormContext, useController } from 'react-hook-form';
|
|
16
16
|
import * as $e from '@radix-ui/react-radio-group';
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
17
|
+
import * as _ from '@radix-ui/react-select';
|
|
18
|
+
import * as lo from '@radix-ui/react-checkbox';
|
|
19
19
|
import { createPortal } from 'react-dom';
|
|
20
20
|
import { RemoveScroll } from 'react-remove-scroll';
|
|
21
21
|
import { useFloating, autoUpdate, offset, flip, shift, useClick, useDismiss, useRole, useTransitionStatus, useInteractions } from '@floating-ui/react';
|
|
22
22
|
import * as ae from '@radix-ui/react-popover';
|
|
23
23
|
|
|
24
|
-
var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnPropertyDescriptors;var Je=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var it=(e,o,t)=>o in e?at(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))st.call(o,t)&&it(e,t,o[t]);if(Je)for(var t of Je(o))lt.call(o,t)&&it(e,t,o[t]);return e},p=(e,o)=>an(e,sn(o));var ln=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var n in e)st.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Je)for(var n of Je(e))o.indexOf(n)<0&<.call(e,n)&&(t[n]=e[n]);return t};var pe=(e,o)=>{for(var t in o)at(e,t,{get:o[t],enumerable:!0});};var W=(e,o,t)=>new Promise((n,r)=>{var i=d=>{try{l(t.next(d));}catch(u){r(u);}},s=d=>{try{l(t.throw(d));}catch(u){r(u);}},l=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,s);l((t=t.apply(e,o)).next());});function Be(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}))}var dt={borderWidths:{md:"1px"}};var qe=[5,10,20,35,50,65,80,95,98],ct=[...qe],Fo=[...qe];ct[4]=40;Fo[4]=60;var pn={blue:{h:213,s:100,l:qe},gray:{h:220,s:10,l:qe},green:{h:141,s:90,l:ct},red:{h:9,s:90,l:Fo},yellow:{h:50,s:90,l:Fo}};var V={};for(let[e,{h:o,s:t,l:n}]of Object.entries(pn))V[e]=Object.fromEntries(n.map((r,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var ut=p(a({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},V),{gray100:V.gray[100],gray200:V.gray[200],gray300:V.gray[300],gray400:V.gray[400],gray500:V.gray[500],gray600:V.gray[600],gray700:V.gray[700],gray800:V.gray[800],gray900:V.gray[900],blue400:V.blue[400],blue500:V.blue[500],blue800:V.blue[800],blue900:V.blue[900],green400:V.blue[400],green500:V.green[500],green800:V.green[800],red500:V.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var mt={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,ft={negative:{100:c("red-100"),200:c("red-200"),300:c("red-300"),400:c("red-400"),500:c("red-500"),600:c("red-600"),700:c("red-700"),800:c("red-800"),900:c("red-900"),background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500"),active:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")},focus:{background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500")},hover:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")}},neutral:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700"),active:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},focus:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},hover:{background:c("neutral-900"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700")}},positive:{100:c("green-100"),200:c("green-200"),300:c("green-300"),400:c("green-400"),500:c("green-500"),600:c("green-600"),700:c("green-700"),800:c("green-800"),900:c("green-900"),background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500"),active:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")},focus:{background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500")},hover:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")}},primary:{100:c("blue-100"),200:c("blue-200"),300:c("blue-300"),400:c("blue-400"),500:c("blue-500"),600:c("blue-600"),700:c("blue-700"),800:c("blue-800"),900:c("blue-900"),background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500"),active:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")},focus:{background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500")},hover:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")}},secondary:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900"),active:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")},focus:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900")},hover:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")}}};var gt={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var dn="px",cn=e=>typeof e=="number"?`${4*e}${dn}`:e,un=[-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"],yt=Object.fromEntries(un.map(e=>[e,cn(e)]));var xt={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 Ze=p(a(p(a({},dt),{colors:a(a({},ut),ft)}),xt),{radii:mt,shadows:gt,space:yt});function Ve(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let s=`${o.length?`${o}${t}`:""}${r}`,l=e[r];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(n,Ve(l,s,t)):n[s]=l,n},{})}function vo(e){let o=Ve(e,"--fr","-");for(let[t,n]of Object.entries(o))if(t.indexOf(".")>-1){let r=t.replace(/\./g,"-");o[r]=n,delete o[t];}return o}function ht(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],i=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=ht(r,`${o}-${n}`):t[n]=`var(${o}-${i})`;}),t}var Ro=vo(Ze),E=ht(Ze);var fn=new Set(["alt","size","src"]),gn=mn.all.filter(e=>e.indexOf("-")!=0&&!fn.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),yn=Object.fromEntries(gn),Ye=Ve(E.colors),xn={color:Ye,backgroundColor:Ye,borderColor:Ye,border:a(a({},E.borderWidths),Ye),borderRadius:E.radii,borderWidth:E.borderWidths,boxShadow:E.shadows,fontFamily:E.fontFamilies,fontSize:E.fontSizes,fontWeight:E.fontWeights,gap:E.space,lineHeight:E.lineHeights,margin:E.space,marginBottom:E.space,marginLeft:E.space,marginRight:E.space,marginTop:E.space,padding:E.space,paddingBottom:E.space,paddingLeft:E.space,paddingRight:E.space,paddingTop:E.space},bt=a(a({},yn),xn),Pt={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"]},Ct=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function hn(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var St=new Map(Object.entries(bt).map(([e,o])=>[e,hn(o)])),bn=new Map(Object.entries(Pt).map(([e,o])=>[e,new Set(o)])),Pn=new Set(["height","width"]),Cn=new Set(["canvas","embed","iframe","img","input","object","video"]);function wt(e){let[o,t]=e.split(":");return [o,Ct.has(t)?t:null]}function Ft(e,o="div"){let t=Object.assign({},e),n={};function r(i){if(i==null)return n;let l=`&:${i.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[l]==null&&(n[l]={}),n[l]}return Object.entries(t).forEach(([i,s])=>{let[l,d]=wt(i),u=bn.get(l);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=s;}),delete t[i]);}),Object.entries(t).forEach(([i,s])=>{let[l,d]=wt(i),u=St.get(l);if(u!=null){if(s==null)delete t[i];else if(typeof s=="string"&&s.indexOf(" ")>-1){let m=s.split(" ");r(d)[l]=m.map(g=>{var b;return (b=u.get(g.toString()))!=null?b:g}).join(" ");}else u.has(s.toString())?r(d)[l]=u.get(s.toString()):r(d)[l]=s;(typeof o!="string"||!Cn.has(o)||!Pn.has(l))&&delete t[i];}}),Object.keys(t).forEach(i=>{let s=i.substring(1);i.indexOf("_")===0&&St.has(s)&&(t[s]=t[i],delete t[i]);}),{cssFromProps:n,unmatchedProps:t}}function wn(){if(typeof window=="undefined"){let{JSDOM:e}=ln("jsdom");return new e("<!DOCTYPE html>").window}return window}function vt(e){return e?{__html:Sn(wn()).sanitize(e,{ALLOWED_TAGS:["b","strong","i","em","a","span","div","p","pre","s","u","br","img","code","li","ol","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video","p","style"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function vn(e){return e&&`fr-${e}`}function Bt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Bt(o)).join(" "):vn(e))}function Rn(l,s){var d=l,{as:e,children:o,className:t,css:n={},part:r}=d,i=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=Ft(i,u),b=Bt(r),h=t||b?clsx(t,b):void 0,P=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsx(u,p(a({className:h,css:P},g),{ref:s,dangerouslySetInnerHTML:vt(o)})):jsx(u,p(a({className:h,css:P},g),{ref:s,children:o}))}var y=Eo.forwardRef(Rn);var H={};pe(H,{Link:()=>oi,Plain:()=>ti,Primary:()=>Qn,Secondary:()=>ei});var v={};pe(v,{Body1:()=>_n,Body2:()=>Un,Caption:()=>Gn,Display1:()=>Mn,Display2:()=>Wn,H1:()=>Vn,H2:()=>Ln,H3:()=>Nn,H4:()=>zn});var To={};pe(To,{Body1:()=>In,Body2:()=>Hn,Caption:()=>$n,Display1:()=>Tn,Display2:()=>Bn,H1:()=>kn,H2:()=>En,H3:()=>On,H4:()=>Dn});var de={color:"neutral.foreground",fontFamily:"default",margin:"0"},Tn=p(a({},de),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Bn=p(a({},de),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),kn=p(a({},de),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),En=p(a({},de),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),On=p(a({},de),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Dn=p(a({},de),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),In=p(a({},de),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Hn=p(a({},de),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),$n=p(a({},de),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var An=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],ce=Object.fromEntries(An.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Eo.forwardRef((l,s)=>{var d=l,{as:n=o,children:r}=d,i=f(d,["as","children"]);return jsx(y,p(a(a({as:n},To[e]),i),{ref:s,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),Mn=ce.Display1,Wn=ce.Display2,Vn=ce.H1,Ln=ce.H2,Nn=ce.H3,zn=ce.H4,_n=ce.Body1,Un=ce.Body2,Gn=ce.Caption;var ko={};pe(ko,{Link:()=>qn,Plain:()=>Zn,Primary:()=>Xn,Secondary:()=>Jn,loadingCSSStyle:()=>Bo});var Qe={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},Xn=p(a({},Qe),{backgroundColor:"primary.surface",borderColor:"primary.border",color:"primary.foreground","backgroundColor:disabled":"primary.surface","backgroundColor:hover":"primary.hover.surface","opacity:disabled":"0.6","pointerEvents:disabled":"none"}),Jn=p(a({},Qe),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),qn=p(a({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Zn=p(a({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Yn=keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),Bo={position:"relative",color:"transparent","&:after":{content:'""',position:"absolute",width:"16px",height:"16px",top:0,left:0,right:0,bottom:0,margin:"auto",border:"4px solid transparent",borderTopColor:"var(--fr-colors-primary-foreground)",borderRadius:"50%",animation:Yn+" 1s ease infinite"}};function eo(s){var l=s,{as:e,children:o,part:t,title:n,variant:r="Primary"}=l,i=f(l,["as","children","part","title","variant"]);var u;let d=r.toLocaleLowerCase();return jsxs(y,p(a(p(a({as:e!=null?e:"button",part:[`button-${d}`,t]},ko[r]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?Bo:{})}),i),{loading:void 0,children:[o,n&&jsx(v.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function Qn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsx(eo,p(a({},o),{variant:"Primary",children:e}))}function ei(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsx(eo,p(a({},o),{variant:"Secondary",children:e}))}function oi(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsx(eo,p(a({},o),{variant:"Link",children:e}))}function ti(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsx(eo,p(a({},o),{variant:"Plain",children:e}))}var C={};pe(C,{Column:()=>ii,Row:()=>ni});var ni=Eo.forwardRef((e,o)=>jsx(y,p(a({display:"flex",flexDirection:"row"},e),{ref:o}))),ii=Eo.forwardRef((e,o)=>jsx(y,p(a({display:"flex",flexDirection:"column"},e),{ref:o})));function Oo(r){var i=r,{dismissible:e,flowId:o,part:t}=i,n=f(i,["dismissible","flowId","part"]);return jsx(U,p(a({as:null,flowId:o},n),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var R,B,F,S,T;let g=(R=m.props)!=null?R:{},b=(F=(B=m.primaryButton)==null?void 0:B.title)!=null?F:m.primaryButtonTitle,h=(T=(S=m.secondaryButton)==null?void 0:S.title)!=null?T:m.secondaryButtonTitle,P=m.$state.blocked;return jsxs(x,p(a(a({alignItems:"center","aria-label":"Banner",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t],role:"complementary"},u),g),{children:[m.imageUri&&jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxs(C.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsx(x.Title,{part:"title",children:m.title}),jsx(x.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsx(x.Secondary,{disabled:P,title:h,onClick:d}),jsx(x.Primary,{disabled:P,title:b,onClick:l}),e&&jsx(x.Dismiss,{onClick:s})]}))}}))}var no={};pe(no,{Carousel:()=>Xt,Collapsible:()=>ro,CollapsibleStep:()=>ze});var Ce={};pe(Ce,{Bar:()=>ke,Dots:()=>Ht,Fraction:()=>Ee,Segments:()=>oo});function ke(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsx(y,p(a({"aria-description":"Progress represented as a bar","aria-label":"Progress Bar","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,backgroundColor:"neutral.800",borderRadius:"md",height:"10px",part:"progress-bar",role:"meter"},t),{children:jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function Ht(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,l)=>jsx(y,{as:"circle",cx:4+16*l,cy:"4px",fill:e-1===l?E.colors.blue500:E.colors.blue800,part:["progress-dot",e-1===l?"progress-dot-filled":null],r:4},l));return jsx(y,p(a({"aria-description":"Progress represented as dots","aria-label":"Progress Dots","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,as:"svg",height:"8px",part:"progress-dots",role:"meter",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function Ee(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsx(v.Body2,p(a({"aria-description":"Progress represented as a fraction of a total","aria-label":"Progress Fraction","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,part:"progress-fraction",role:"meter"},t),{children:`${e}/${o}`}))}function oo(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=[...Array(o)].map((s,l)=>jsx(y,{backgroundColor:e-1>=l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===l?"progress-segment-filled":null]},l));return jsx(C.Row,p(a({"aria-description":"Progress represented as a segmented bar","aria-label":"Progress Segments","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,gap:1,height:"10px",part:"progress-segments",role:"meter"},t),{children:i}))}function Mt(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}))}function si(){return jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Wt(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsx(y,p(a({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsx(si,{})})}))}function ue(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=useContext(L),r={"flow.back":(...i)=>e.flow.back(...i),"flow.complete":(...i)=>e.flow.complete(...i),"flow.forward":(...i)=>e.flow.forward(...i),"flow.restart":()=>e.flow.restart(),"flow.skip":(...i)=>e.flow.skip(...i),"flow.start":(...i)=>e.flow.start(...i),"step.complete":(...i)=>e.complete(...i),"step.skip":(...i)=>e.skip(...i),"step.reset":()=>e.reset(),"step.start":(...i)=>e.start(...i)};return {handlePrimary:useCallback((i,s,l=!0)=>W(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:r[e.primaryButton.action];typeof u=="function"?yield u(s,l):u!==!1&&(yield e.complete(s,l)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,l),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:useCallback((i,s)=>W(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let d=e.secondaryButton.action===!1?!1:r[e.secondaryButton.action];typeof d=="function"?d():d!==!1&&e.complete(s),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Lt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:n,handleSecondary:r}=ue(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:s,skipped:l}=t.$state,d=s||l||!i?jsx(Wt,{checked:s||l,marginLeft:"auto"}):jsx(y,{as:Mt,height:"22px",marginLeft:"auto",width:"22px"});return jsxs(x,{borderWidth:1,containerType:"inline-size",css:{"@container (max-width: 600px)":{flexBasis:"85%"},"@container (min-width: 601px) and (max-width: 900px)":{flexBasis:"45%"},"@container (min-width: 1200px)":{flexBasis:"25%"}},flex:"0 0 30%",gap:"2",p:"4",part:"carousel-step",userSelect:"none",disabled:i,opacity:i?.5:1,children:[jsxs(C.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsx(x.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsx(x.Title,{children:t.title}),jsx(x.Subtitle,{children:t.subtitle}),jsxs(C.Row,{css:{"@container (max-width: 200px)":{"& > button":{flexBasis:"50%",flexGrow:1},flexDirection:"column-reverse"}},gap:"2",marginTop:"auto",paddingTop:"3",part:"carousel-step-footer",children:[jsx(x.Secondary,{disabled:i,onClick:r,title:(u=t.secondaryButton)==null?void 0:u.title}),jsx(x.Primary,{disabled:i,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function zt(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",clipRule:"evenodd"})}))}function Ut(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"})}))}var Gt=keyframes`
|
|
24
|
+
var st=Object.defineProperty,sn=Object.defineProperties;var ln=Object.getOwnPropertyDescriptors;var qe=Object.getOwnPropertySymbols;var lt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var at=(e,o,t)=>o in e?st(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))lt.call(o,t)&&at(e,t,o[t]);if(qe)for(var t of qe(o))pt.call(o,t)&&at(e,t,o[t]);return e},p=(e,o)=>sn(e,ln(o));var pn=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var r in e)lt.call(e,r)&&o.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&qe)for(var r of qe(e))o.indexOf(r)<0&&pt.call(e,r)&&(t[r]=e[r]);return t};var ce=(e,o)=>{for(var t in o)st(e,t,{get:o[t],enumerable:!0});};var M=(e,o,t)=>new Promise((r,n)=>{var i=d=>{try{l(t.next(d));}catch(u){n(u);}},s=d=>{try{l(t.throw(d));}catch(u){n(u);}},l=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,s);l((t=t.apply(e,o)).next());});function ke(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}))}var ct={borderWidths:{md:"1px"}};var Ze=[5,10,20,35,50,65,80,95,98],ut=[...Ze],Fo=[...Ze];ut[4]=40;Fo[4]=60;var dn={blue:{h:213,s:100,l:Ze},gray:{h:220,s:10,l:Ze},green:{h:141,s:90,l:ut},red:{h:9,s:90,l:Fo},yellow:{h:50,s:90,l:Fo}};var W={};for(let[e,{h:o,s:t,l:r}]of Object.entries(dn))W[e]=Object.fromEntries(r.map((n,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${n}%)`]));var mt=p(a({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},W),{gray100:W.gray[100],gray200:W.gray[200],gray300:W.gray[300],gray400:W.gray[400],gray500:W.gray[500],gray600:W.gray[600],gray700:W.gray[700],gray800:W.gray[800],gray900:W.gray[900],blue400:W.blue[400],blue500:W.blue[500],blue800:W.blue[800],blue900:W.blue[900],green400:W.blue[400],green500:W.green[500],green800:W.green[800],red500:W.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var ft={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,gt={negative:{100:c("red-100"),200:c("red-200"),300:c("red-300"),400:c("red-400"),500:c("red-500"),600:c("red-600"),700:c("red-700"),800:c("red-800"),900:c("red-900"),background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500"),active:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")},focus:{background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500")},hover:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")}},neutral:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700"),active:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},focus:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},hover:{background:c("neutral-900"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700")}},positive:{100:c("green-100"),200:c("green-200"),300:c("green-300"),400:c("green-400"),500:c("green-500"),600:c("green-600"),700:c("green-700"),800:c("green-800"),900:c("green-900"),background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500"),active:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")},focus:{background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500")},hover:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")}},primary:{100:c("blue-100"),200:c("blue-200"),300:c("blue-300"),400:c("blue-400"),500:c("blue-500"),600:c("blue-600"),700:c("blue-700"),800:c("blue-800"),900:c("blue-900"),background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500"),active:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")},focus:{background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500")},hover:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")}},secondary:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900"),active:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")},focus:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900")},hover:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")}}};var yt={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var cn="px",un=e=>typeof e=="number"?`${4*e}${cn}`:e,mn=[-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"],xt=Object.fromEntries(mn.map(e=>[e,un(e)]));var bt={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 Ye=p(a(p(a({},ct),{colors:a(a({},mt),gt)}),bt),{radii:ft,shadows:yt,space:xt});function Le(e,o="",t="."){return Object.keys(e).reduce((r,n)=>{let s=`${o.length?`${o}${t}`:""}${n}`,l=e[n];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(r,Le(l,s,t)):r[s]=l,r},{})}function Ro(e){let o=Le(e,"--fr","-");for(let[t,r]of Object.entries(o))if(t.indexOf(".")>-1){let n=t.replace(/\./g,"-");o[n]=r,delete o[t];}return o}function ht(e,o="--fr"){let t={};return Object.keys(e).forEach(r=>{let n=e[r],i=r.replace(/\./g,"-");typeof n=="object"&&n!==null&&!Array.isArray(n)?t[r]=ht(n,`${o}-${r}`):t[r]=`var(${o}-${i})`;}),t}var To=Ro(Ye),E=ht(Ye);var gn=new Set(["alt","size","src"]),yn=fn.all.filter(e=>e.indexOf("-")!=0&&!gn.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),xn=Object.fromEntries(yn),Qe=Le(E.colors),bn={color:Qe,backgroundColor:Qe,borderColor:Qe,border:a(a({},E.borderWidths),Qe),borderRadius:E.radii,borderWidth:E.borderWidths,boxShadow:E.shadows,fontFamily:E.fontFamilies,fontSize:E.fontSizes,fontWeight:E.fontWeights,gap:E.space,lineHeight:E.lineHeights,margin:E.space,marginBottom:E.space,marginLeft:E.space,marginRight:E.space,marginTop:E.space,padding:E.space,paddingBottom:E.space,paddingLeft:E.space,paddingRight:E.space,paddingTop:E.space},Pt=a(a({},xn),bn),Ct={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"]},St=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function hn(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var wt=new Map(Object.entries(Pt).map(([e,o])=>[e,hn(o)])),Pn=new Map(Object.entries(Ct).map(([e,o])=>[e,new Set(o)])),Cn=new Set(["height","width"]),Sn=new Set(["canvas","embed","iframe","img","input","object","video"]);function vt(e){let[o,t]=e.split(":");return [o,St.has(t)?t:null]}function Ft(e,o="div"){let t=Object.assign({},e),r={};function n(i){if(i==null)return r;let l=`&:${i.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return r[l]==null&&(r[l]={}),r[l]}return Object.entries(t).forEach(([i,s])=>{let[l,d]=vt(i),u=Pn.get(l);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=s;}),delete t[i]);}),Object.entries(t).forEach(([i,s])=>{let[l,d]=vt(i),u=wt.get(l);if(u!=null){if(s==null)delete t[i];else if(typeof s=="string"&&s.indexOf(" ")>-1){let m=s.split(" ");n(d)[l]=m.map(g=>{var x;return (x=u.get(g.toString()))!=null?x:g}).join(" ");}else u.has(s.toString())?n(d)[l]=u.get(s.toString()):n(d)[l]=s;(typeof o!="string"||!Sn.has(o)||!Cn.has(l))&&delete t[i];}}),Object.keys(t).forEach(i=>{let s=i.substring(1);i.indexOf("_")===0&&wt.has(s)&&(t[s]=t[i],delete t[i]);}),{cssFromProps:r,unmatchedProps:t}}function vn(){if(typeof window=="undefined"){let{JSDOM:e}=pn("jsdom");return new e("<!DOCTYPE html>").window}return window}function Rt(e){return e?{__html:wn(vn()).sanitize(e,{ALLOWED_TAGS:["b","strong","i","em","a","span","div","p","pre","s","u","br","img","code","li","ol","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video","p","style"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function Rn(e){return e&&`fr-${e}`}function kt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>kt(o)).join(" "):Rn(e))}function Tn(l,s){var d=l,{as:e,children:o,className:t,css:r={},part:n}=d,i=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=Ft(i,u),x=kt(n),b=t||x?clsx(t,x):void 0,P=[{boxSizing:"border-box"},m,r];return typeof o=="string"?jsx(u,p(a({className:b,css:P},g),{ref:s,dangerouslySetInnerHTML:Rt(o)})):jsx(u,p(a({className:b,css:P},g),{ref:s,children:o}))}var y=Oo.forwardRef(Tn);var H={};ce(H,{Link:()=>ti,Plain:()=>ri,Primary:()=>ei,Secondary:()=>oi});var T={};ce(T,{Body1:()=>Un,Body2:()=>Gn,Caption:()=>Kn,Display1:()=>Mn,Display2:()=>Wn,H1:()=>Ln,H2:()=>Nn,H3:()=>_n,H4:()=>zn});var Bo={};ce(Bo,{Body1:()=>Hn,Body2:()=>An,Caption:()=>$n,Display1:()=>Bn,Display2:()=>kn,H1:()=>En,H2:()=>On,H3:()=>Dn,H4:()=>In});var ue={color:"neutral.foreground",fontFamily:"default",margin:"0"},Bn=p(a({},ue),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),kn=p(a({},ue),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),En=p(a({},ue),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),On=p(a({},ue),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),Dn=p(a({},ue),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),In=p(a({},ue),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Hn=p(a({},ue),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),An=p(a({},ue),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),$n=p(a({},ue),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Vn=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],me=Object.fromEntries(Vn.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Oo.forwardRef((l,s)=>{var d=l,{as:r=o,children:n}=d,i=f(d,["as","children"]);return jsx(y,p(a(a({as:r},Bo[e]),i),{ref:s,children:n}))});return t.displayName=`Text.${e}`,[e,t]})),Mn=me.Display1,Wn=me.Display2,Ln=me.H1,Nn=me.H2,_n=me.H3,zn=me.H4,Un=me.Body1,Gn=me.Body2,Kn=me.Caption;var Eo={};ce(Eo,{Link:()=>Zn,Plain:()=>Yn,Primary:()=>Jn,Secondary:()=>qn,loadingCSSStyle:()=>ko});var eo={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},Jn=p(a({},eo),{backgroundColor:"primary.surface",borderColor:"primary.border",color:"primary.foreground","backgroundColor:disabled":"primary.surface","backgroundColor:hover":"primary.hover.surface","opacity:disabled":"0.6","pointerEvents:disabled":"none"}),qn=p(a({},eo),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Zn=p(a({},eo),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Yn=p(a({},eo),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Qn=keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),ko={position:"relative",color:"transparent","&:after":{content:'""',position:"absolute",width:"16px",height:"16px",top:0,left:0,right:0,bottom:0,margin:"auto",border:"4px solid transparent",borderTopColor:"var(--fr-colors-primary-foreground)",borderRadius:"50%",animation:Qn+" 1s ease infinite"}};function oo(s){var l=s,{as:e,children:o,part:t,title:r,variant:n="Primary"}=l,i=f(l,["as","children","part","title","variant"]);var u;let d=n.toLocaleLowerCase();return jsxs(y,p(a(p(a({as:e!=null?e:"button",part:[`button-${d}`,t]},Eo[n]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?ko:{})}),i),{loading:void 0,children:[o,r&&jsx(T.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:r})]}))}function ei(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsx(oo,p(a({},o),{variant:"Primary",children:e}))}function oi(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsx(oo,p(a({},o),{variant:"Secondary",children:e}))}function ti(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsx(oo,p(a({},o),{variant:"Link",children:e}))}function ri(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsx(oo,p(a({},o),{variant:"Plain",children:e}))}var v={};ce(v,{Column:()=>ai,Row:()=>ii});var ii=Oo.forwardRef((e,o)=>jsx(y,p(a({display:"flex",flexDirection:"row"},e),{ref:o}))),ai=Oo.forwardRef((e,o)=>jsx(y,p(a({display:"flex",flexDirection:"column"},e),{ref:o})));function Do(n){var i=n,{dismissible:e,flowId:o,part:t}=i,r=f(i,["dismissible","flowId","part"]);return jsx(U,p(a({as:null,flowId:o},r),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var C,R,w,F,B;let g=(C=m.props)!=null?C:{},x=(w=(R=m.primaryButton)==null?void 0:R.title)!=null?w:m.primaryButtonTitle,b=(B=(F=m.secondaryButton)==null?void 0:F.title)!=null?B:m.secondaryButtonTitle,P=m.$state.blocked;return jsxs(h,p(a(a({alignItems:"center","aria-label":"Banner",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t],role:"complementary"},u),g),{children:[m.imageUri&&jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxs(v.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsx(h.Title,{part:"title",children:m.title}),jsx(h.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsx(h.Secondary,{disabled:P,title:b,onClick:d}),jsx(h.Primary,{disabled:P,title:x,onClick:l}),e&&jsx(h.Dismiss,{onClick:s})]}))}}))}var io={};ce(io,{Carousel:()=>Jt,Collapsible:()=>no,CollapsibleStep:()=>ze});var ve={};ce(ve,{Bar:()=>Ee,Dots:()=>At,Fraction:()=>Oe,Segments:()=>to});function Ee(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsx(y,p(a({"aria-description":"Progress represented as a bar","aria-label":"Progress Bar","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,backgroundColor:"neutral.800",borderRadius:"md",height:"10px",part:"progress-bar",role:"meter"},t),{children:jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function At(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,l)=>jsx(y,{as:"circle",cx:4+16*l,cy:"4px",fill:e-1===l?E.colors.blue500:E.colors.blue800,part:["progress-dot",e-1===l?"progress-dot-filled":null],r:4},l));return jsx(y,p(a({"aria-description":"Progress represented as dots","aria-label":"Progress Dots","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,as:"svg",height:"8px",part:"progress-dots",role:"meter",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function Oe(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);return jsx(T.Body2,p(a({"aria-description":"Progress represented as a fraction of a total","aria-label":"Progress Fraction","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,part:"progress-fraction",role:"meter"},t),{children:`${e}/${o}`}))}function to(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let i=[...Array(o)].map((s,l)=>jsx(y,{backgroundColor:e-1>=l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===l?"progress-segment-filled":null]},l));return jsx(v.Row,p(a({"aria-description":"Progress represented as a segmented bar","aria-label":"Progress Segments","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,gap:1,height:"10px",part:"progress-segments",role:"meter"},t),{children:i}))}function Mt(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}))}function li(){return jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Wt(t){var r=t,{checked:e=!1}=r,o=f(r,["checked"]);return jsx(y,p(a({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsx(li,{})})}))}function fe(e,{onPrimary:o,onSecondary:t}={}){let{navigate:r}=useContext(L),n={"flow.back":(...i)=>e.flow.back(...i),"flow.complete":(...i)=>e.flow.complete(...i),"flow.forward":(...i)=>e.flow.forward(...i),"flow.restart":()=>e.flow.restart(),"flow.skip":(...i)=>e.flow.skip(...i),"flow.start":(...i)=>e.flow.start(...i),"step.complete":(...i)=>e.complete(...i),"step.skip":(...i)=>e.skip(...i),"step.reset":()=>e.reset(),"step.start":(...i)=>e.start(...i)};return {handlePrimary:useCallback((i,s,l=!0)=>M(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:n[e.primaryButton.action];typeof u=="function"?yield u(s,l):u!==!1&&(yield e.complete(s,l)),e.primaryButton.uri!=null&&r(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,l),e.primaryButtonUri!=null&&r(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:useCallback((i,s)=>M(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let d=e.secondaryButton.action===!1?!1:n[e.secondaryButton.action];typeof d=="function"?d():d!==!1&&e.complete(s),e.secondaryButton.uri!=null&&r(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&r(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Nt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:r,handleSecondary:n}=fe(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:s,skipped:l}=t.$state,d=s||l||!i?jsx(Wt,{checked:s||l,marginLeft:"auto"}):jsx(y,{as:Mt,height:"22px",marginLeft:"auto",width:"22px"});return jsxs(h,{borderWidth:1,containerType:"inline-size",css:{"@container (max-width: 600px)":{flexBasis:"85%"},"@container (min-width: 601px) and (max-width: 900px)":{flexBasis:"45%"},"@container (min-width: 1200px)":{flexBasis:"25%"}},flex:"0 0 30%",gap:"2",p:"4",part:"carousel-step",userSelect:"none",disabled:i,opacity:i?.5:1,children:[jsxs(v.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsx(h.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsx(h.Title,{children:t.title}),jsx(h.Subtitle,{children:t.subtitle}),jsxs(v.Row,{css:{"@container (max-width: 200px)":{"& > button":{flexBasis:"50%",flexGrow:1},flexDirection:"column-reverse"}},gap:"2",marginTop:"auto",paddingTop:"3",part:"carousel-step-footer",children:[jsx(h.Secondary,{disabled:i,onClick:n,title:(u=t.secondaryButton)==null?void 0:u.title}),jsx(h.Primary,{disabled:i,onClick:r,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function zt(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",clipRule:"evenodd"})}))}function Gt(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"})}))}var Kt=keyframes`
|
|
25
25
|
from {
|
|
26
26
|
opacity: 0;
|
|
27
27
|
}
|
|
28
28
|
to {
|
|
29
29
|
opacity: 1;
|
|
30
30
|
}
|
|
31
|
-
`;function
|
|
31
|
+
`;function jt({flow:e,sort:o,onPrimary:t,onSecondary:r}){var C,R;let[n,i]=useState(),[s]=useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(R=(C=Array.from(e.steps.values()).find(w=>!w.$state.completed&&!w.$state.skipped))==null?void 0:C.order)!=null?R:0}),[l,d]=mi(s),[u,m]=useState(),[g,x]=useState();useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&x(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),x(d.canScrollPrev());}));},[d]),useEffect(()=>{if(!n){let w=Array.from(e.steps.values()),F=w.filter(S=>S.$state.completed||S.$state.skipped).sort((S,O)=>S.order-O.order),B=w.filter(S=>!S.$state.completed&&!S.$state.skipped).sort((S,O)=>S.order-O.order);i(o==="completed-last"?[...B,...F].map(S=>S.id):w.map(S=>S.id));}},[]);let b=e.getNumberOfCompletedSteps(),P=e.getNumberOfAvailableSteps();return n?jsxs(Fragment,{children:[jsxs(v.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:E.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxs(v.Column,{part:"carousel-header-content",children:[jsx(T.H3,{children:e.title}),jsx(T.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxs(v.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxs(T.Body2,{fontWeight:"demibold",part:"progress-text",children:[b,"/",P]}),jsx(Ee,{current:b,total:P,minWidth:"200px"})]})]}),jsxs(y,{margin:`0 ${E.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsx(v.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(w=>w.$state.visible).sort((w,F)=>n.indexOf(w.id)-n.indexOf(F.id)).map(w=>jsx(Nt,{onPrimary:t,onSecondary:r,step:w},w.id))}),g&&jsx(v.Column,{animation:`${Kt} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsx(H.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsx(Gt,{height:"24px",width:"24px"})})}),u&&jsx(v.Column,{animation:`${Kt} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsx(H.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsx(zt,{height:"24px",width:"24px"})})})]})]}):null}function Jt(o){var e=f(o,[]);return jsx(U,p(a({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsx(jt,a(a({},e),t))}))}var ze={};ce(ze,{Content:()=>Ao,Root:()=>$o,Trigger:()=>Vo});function Zt(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6"},e),{children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var gi=keyframes`
|
|
32
32
|
from {
|
|
33
33
|
height: 0;
|
|
34
34
|
opacity: 0;
|
|
@@ -37,7 +37,7 @@ var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
|
|
|
37
37
|
height: var(--radix-collapsible-content-height);
|
|
38
38
|
opacity: 1;
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,yi=keyframes`
|
|
41
41
|
from {
|
|
42
42
|
height: var(--radix-collapsible-content-height);
|
|
43
43
|
opacity: 1;
|
|
@@ -46,14 +46,14 @@ var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
|
|
|
46
46
|
height: 0;
|
|
47
47
|
opacity: 0;
|
|
48
48
|
}
|
|
49
|
-
`,yi=()=>jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function xi({checked:e=!1}){return jsx(y,{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&&jsx(y,{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:jsx(yi,{})})})}function Ho({children:e}){return jsx(De.Content,{asChild:!0,children:jsxs(C.Column,{css:{'&[data-state="open"]':{animation:`${fi} 300ms ease-out`},'&[data-state="closed"]':{animation:`${gi} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsx(y,{}),e]})})}function $o(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=s,r=f(s,["children","disabled","onOpenChange","open"]);return jsx(De.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsx(x,p(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Ao({isCompleted:e,isBlocked:o,title:t}){return jsx(De.Trigger,{asChild:!0,children:jsxs(C.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxs(C.Row,{alignItems:"center",gap:2,children:[jsx(xi,{checked:e}),jsx(v.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsx(y,{as:qt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Yt=createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Qt({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var P,R,B,F,S,T;let{$state:{blocked:i,completed:s,skipped:l},subtitle:d,title:u}=r,m=(R=(P=r.primaryButton)==null?void 0:P.title)!=null?R:r.primaryButtonTitle,g=(F=(B=r.secondaryButton)==null?void 0:B.title)!=null?F:r.secondaryButtonTitle,b=(S=r.props)!=null?S:{},h=!!i;return jsxs($o,p(a({open:t,onOpenChange:n},b),{children:[jsx(Ao,{isBlocked:r.$state.blocked,isCompleted:s||l,title:u}),jsxs(Ho,{children:[jsx(x.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(T=r.videoUri)!=null?T:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsx(x.Subtitle,{color:"neutral.400",children:d}),jsxs(C.Row,{gap:3,part:"collapsible-footer",children:[jsx(x.Secondary,{title:g,onClick:o}),jsx(x.Primary,{disabled:h,title:m,onClick:e})]})]})]}))}var Ci={default:Qt};function Si(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var R;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:d,stepTypes:u}=useContext(Yt),{handlePrimary:m,handleSecondary:g}=ue(o,{onPrimary:i,onSecondary:s}),b=(l!=null?l:e.getCurrentStep().id)===o.id,h=(R=u[o.type])!=null?R:Qt;function P(B){return W(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsx(h,p(a({flow:e,onOpenChange:P,open:b,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function ro(l){var d=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:i={}}=d,s=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=useState(null),g=a(a({},Ci),i);return jsx(Yt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsx(U,p(a({as:x,borderWidth:"md",flowId:o,part:["checklist",r]},s),{children:R=>{var B=R,{flow:b,handleDismiss:h}=B,P=f(B,["flow","handleDismiss"]);let S=Array.from(b.steps.entries()).filter(([,O])=>O.$state.visible===!0).map(([,O])=>jsx(Si,p(a({flow:b,handleDismiss:h},P),{step:O}),O.id)),T=b.getNumberOfCompletedSteps(),w=b.getNumberOfAvailableSteps();return jsxs(Fragment,{children:[jsxs(C.Column,{gap:2,children:[jsx(x.Header,{dismissible:e,handleDismiss:h,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxs(v.Body2,{fontWeight:"demibold",children:[T,"/",w]}),jsx(ke,{current:T,total:w,flexGrow:1})]})]}),S]})}}))})}var Oi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Di({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(t).filter(([l])=>Oi.has(l))),s=useController({name:t.id,control:o,rules:i});return jsx(e,p(a({},s),{fieldData:t,formContext:r,submit:n}))}function or({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:i}){var T,w,O,D,M;let{__readOnly:s}=useContext(L),l=useMemo(()=>{var k,I;return (I=(k=i.fields)==null?void 0:k.filter(A=>e[A.type]!=null&&A.id))!=null?I:[]},[i.fields,e]),d=useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,I)=>{var A;return k[I.id]=(A=I.value)!=null?A:"",k},{})});useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,I)=>{var A;return k[I.id]=(A=I.value)!=null?A:"",k},{}));},[l]),useEffect(()=>{Object.keys(d.formState.dirtyFields).some(k=>l.some(I=>I.id===k))&&d.trigger();},[i.id]);let[u,m]=useState(!1),g=[],{control:b,handleSubmit:h}=d,P=(T=i.props)!=null?T:{};function R(k,I){m(!0),t(I,k,s===!0).then(()=>m(!1));}l.forEach(k=>{e[k.type]!=null&&g.push(jsx(Di,{control:b,fieldComponent:e[k.type],fieldData:k,submit:h(R)},`${i.flow.id}-${k.id}`));});let B=(O=(w=i.primaryButton)==null?void 0:w.title)!=null?O:i.primaryButtonTitle,F=(M=(D=i.secondaryButton)==null?void 0:D.title)!=null?M:i.secondaryButtonTitle,S=!!(i.$state.blocked||!d.formState.isValid);return useEffect(()=>{d.clearErrors();},[i]),jsxs(C.Column,p(a({gap:5,part:"form-step"},P),{children:[jsx(x.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsx(FormProvider,p(a({},d),{children:g})),jsxs(C.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[F&&jsx(H.Secondary,{onClick:n,title:F}),jsx(H.Primary,{disabled:S||u,onClick:h(R),title:B!=null?B:"Submit",loading:u})]},`form-footer-${i.id}`)]}))}function tr({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsx(v.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Wo({children:e,id:o,required:t=!1}){return jsxs(v.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Vo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},_e=p(a({},Vo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),io={alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",color:"primary.foreground"};function te({children:e,field:o,fieldData:t,fieldState:n}){var m;let{id:r,label:i,placeholder:s,props:l}=t,{error:d}=n,u=a(p(a(a(a({id:r},o),s?{placeholder:s}:{}),_e),{"aria-invalid":!!d,value:(m=o.value)!=null?m:""}),l);return jsxs(y,{part:"field",children:[jsx(Wo,{id:r,required:!!t.required,children:i}),e(u),jsx(tr,{error:d})]})}function He(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}))}var Mi=Eo.forwardRef(({label:e,value:o},t)=>jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsx(v.Body2,{part:"field-radio-label",children:e}),jsx($e.Item,{id:o,value:o,ref:t,asChild:!0,children:jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsx(y,p(a({as:$e.Indicator},io),{children:jsx(He,{height:"14",width:"14"})}))})})]}));function Lo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:i,value:s})=>jsx(Mi,{value:s,label:i},s));return jsx(te,p(a({},e),{children:()=>jsx($e.Root,{value:t,onValueChange:o,asChild:!0,children:jsx(C.Column,{gap:2,part:"field-radio-group",children:r})})}))}function ao(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}function lr(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,i]=Eo.useState([]);function s(l){let d=[];r.includes(l)?d=[...r.filter(u=>u!==l)]:d=[...r,l],i(d),o(d);}return jsx(te,p(a({},e),{children:()=>jsx(C.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsx(so.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>s(d),asChild:!0,children:jsxs(y,{as:"button",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsx(v.Body2,{part:"field-check-label",children:l}),jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",id:d,padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsx(so.Indicator,{asChild:!0,children:jsx(y,p(a({},io),{children:jsx(He,{height:"14",width:"14"})}))})})]})},d))})}))}var Li=Eo.forwardRef(({label:e,value:o},t)=>jsx(z.Item,{value:o,ref:t,asChild:!0,children:jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsx(z.ItemText,{asChild:!0,children:jsx(v.Body2,{part:"field-select-option-label",children:e})})})}));function No(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,i=n.map(({label:s,value:l})=>jsx(Li,{value:l,label:s},l));return e.fieldData.multiple?jsx(lr,a({},e)):jsx(te,p(a({},e),{children:()=>jsxs(z.Root,{value:t,onValueChange:o,children:[jsx(z.Trigger,{asChild:!0,children:jsxs(v.Body2,p(a({},_e),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsx(z.Value,{placeholder:r!=null?r:"Select one"}),jsx(z.Icon,{children:jsx(y,{as:ao,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsx(z.Portal,{children:jsx(z.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsx(y,p(a({},_e),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsx(z.Viewport,{children:i})}))})})]})}))}function zo(e){return jsx(te,p(a({},e),{children:o=>jsx(v.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function _o(e){return jsx(te,p(a({},e),{children:o=>jsx(v.Body2,a({as:"textarea",part:"field-textarea"},o))}))}function mr(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:i=[]}}=e;return jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsx(so.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsx(y,p(a({},Vo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:i,children:jsx(so.Indicator,{asChild:!0,children:jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsx(He,{height:"14",fill:"currentColor"})})})}))}),jsx(v.Body2,{part:"field-checkbox-label",as:"label",htmlFor:i,children:r})]})}var zi={checkbox:mr,radio:Lo,select:No,text:zo,textarea:_o};function Me(r){var i=r,{fieldTypes:e={},flowId:o,part:t}=i,n=f(i,["fieldTypes","flowId","part"]);let s=Object.assign({},zi,e);return jsx(U,p(a({flowId:o,part:["form",t]},n),{children:l=>jsx(or,a({fieldTypes:s},l))}))}var co={};pe(co,{NPS:()=>Ge});function yr({field:e,fieldData:o,submit:t}){var r,i;let n=[...Array(11)].map((s,l)=>{let d=e.value===l?H.Primary:H.Secondary;return jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxs(C.Column,{gap:2,children:[jsx(C.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxs(C.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsx(v.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsx(v.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function Ge(i){var s=i,{as:e=$,flowId:o,fieldTypes:t,part:n}=s,r=f(s,["as","flowId","fieldTypes","part"]);var d;let{flow:l}=Fe(o);return jsx(Me,p(a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:yr},t),modal:!1,onEscapeKeyDown:u=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(u),u.defaultPrevented||l.skip();},part:["nps",n]},r),{css:a({},a(p(a({},!l||l.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}}),(d=r.css)!=null?d:{}))}))}function xr(e,o,t){let[n,r]=useState(!1),i=useRef();return useEffect(()=>{i.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?createPortal(e,i.current,t):null}function hr({children:e,container:o="body"}){return e!=null?xr(e,o):null}function qi(i,r){var s=i,{children:e,part:o,opacity:t=.5}=s,n=f(s,["children","part","opacity"]);let l=keyframes`
|
|
49
|
+
`,xi=()=>jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function bi({checked:e=!1}){return jsx(y,{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&&jsx(y,{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:jsx(xi,{})})})}function Ao({children:e}){return jsx(Ie.Content,{asChild:!0,children:jsxs(v.Column,{css:{'&[data-state="open"]':{animation:`${gi} 300ms ease-out`},'&[data-state="closed"]':{animation:`${yi} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsx(y,{}),e]})})}function $o(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:r=!1}=s,n=f(s,["children","disabled","onOpenChange","open"]);return jsx(Ie.Root,{asChild:!0,disabled:o,open:r,onOpenChange:t,children:jsx(h,p(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},n),{children:e}))})}function Vo({isCompleted:e,isBlocked:o,title:t}){return jsx(Ie.Trigger,{asChild:!0,children:jsxs(v.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxs(v.Row,{alignItems:"center",gap:2,children:[jsx(bi,{checked:e}),jsx(T.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsx(y,{as:Zt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var hi=["autoPlay","controls","controlsList","crossOrigin","disablePictureInPicture","disableRemotePlayback","loop","muted","playsInline","poster","preload","src"];function he(e){let o={},t={};for(let[r,n]of Object.entries(e))hi.some(i=>i===r)?o[r]=n:t[r]=n;return {otherProps:t,videoProps:o}}var Qt=createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function er({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:r,step:n}){var C,R,w,F,B,S;let{$state:{blocked:i,completed:s,skipped:l},subtitle:d,title:u}=n,m=(R=(C=n.primaryButton)==null?void 0:C.title)!=null?R:n.primaryButtonTitle,g=(F=(w=n.secondaryButton)==null?void 0:w.title)!=null?F:n.secondaryButtonTitle,x=(B=n.props)!=null?B:{},b=!!i,{videoProps:P}=he(x);return jsxs($o,p(a({open:t,onOpenChange:r},x),{children:[jsx(Vo,{isBlocked:n.$state.blocked,isCompleted:s||l,title:u}),jsxs(Ao,{children:[jsx(h.Media,a({aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(S=n.videoUri)!=null?S:n.imageUri,transform:"translate3d(0, 0, 1px)",type:n.videoUri?"video":"image"},P)),jsx(h.Subtitle,{color:"neutral.400",children:d}),jsxs(v.Row,{gap:3,part:"collapsible-footer",children:[jsx(h.Secondary,{title:g,onClick:o}),jsx(h.Primary,{disabled:b,title:m,onClick:e})]})]})]}))}var wi={default:er};function vi(r){var n=r,{flow:e,step:o}=n,t=f(n,["flow","step"]);var C;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:d,stepTypes:u}=useContext(Qt),{handlePrimary:m,handleSecondary:g}=fe(o,{onPrimary:i,onSecondary:s}),x=(l!=null?l:e.getCurrentStep().id)===o.id,b=(C=u[o.type])!=null?C:er;function P(R){return M(this,null,function*(){d(R?o.id:""),R&&!o.$state.completed&&(yield o.start(),d(null));})}return jsx(b,p(a({flow:e,onOpenChange:P,open:x,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function no(l){var d=l,{dismissible:e,flowId:o,onPrimary:t,onSecondary:r,part:n,stepTypes:i={}}=d,s=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=useState(null),g=a(a({},wi),i);return jsx(Qt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:r,stepTypes:g},children:jsx(U,p(a({as:h,borderWidth:"md",flowId:o,part:["checklist",n]},s),{children:C=>{var R=C,{flow:x,handleDismiss:b}=R,P=f(R,["flow","handleDismiss"]);let F=Array.from(x.steps.entries()).filter(([,O])=>O.$state.visible===!0).map(([,O])=>jsx(vi,p(a({flow:x,handleDismiss:b},P),{step:O}),O.id)),B=x.getNumberOfCompletedSteps(),S=x.getNumberOfAvailableSteps();return jsxs(Fragment,{children:[jsxs(v.Column,{gap:2,children:[jsx(h.Header,{dismissible:e,handleDismiss:b,part:"checklist-header",subtitle:x.subtitle,title:x.title}),jsxs(v.Row,{alignItems:"center",gap:2,children:[jsxs(T.Body2,{fontWeight:"demibold",children:[B,"/",S]}),jsx(Ee,{current:B,total:S,flexGrow:1})]})]}),F]})}}))})}var Ii=new Set(["required","min","max","minLength","maxLength","pattern"]);function Hi({fieldComponent:e,control:o,fieldData:t,submit:r}){let n=useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let i=Object.fromEntries(Object.entries(t).filter(([l])=>Ii.has(l))),s=useController({name:t.id,control:o,rules:i});return jsx(e,p(a({},s),{fieldData:t,formContext:n,submit:r}))}function tr({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:r,parentProps:{dismissible:n},step:i}){var B,S,O,I,V;let{__readOnly:s}=useContext(L),l=useMemo(()=>{var k,D;return (D=(k=i.fields)==null?void 0:k.filter($=>e[$.type]!=null&&$.id))!=null?D:[]},[i.fields,e]),d=useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,D)=>{var $;return k[D.id]=($=D.value)!=null?$:"",k},{})});useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,D)=>{var $;return k[D.id]=($=D.value)!=null?$:"",k},{}));},[l]),useEffect(()=>{Object.keys(d.formState.dirtyFields).some(k=>l.some(D=>D.id===k))&&d.trigger();},[i.id]);let[u,m]=useState(!1),g=[],{control:x,handleSubmit:b}=d,P=(B=i.props)!=null?B:{};function C(k,D){m(!0),t(D,k,s===!0).then(()=>m(!1));}l.forEach(k=>{e[k.type]!=null&&g.push(jsx(Hi,{control:x,fieldComponent:e[k.type],fieldData:k,submit:b(C)},`${i.flow.id}-${k.id}`));});let R=(O=(S=i.primaryButton)==null?void 0:S.title)!=null?O:i.primaryButtonTitle,w=(V=(I=i.secondaryButton)==null?void 0:I.title)!=null?V:i.secondaryButtonTitle,F=!!(i.$state.blocked||!d.formState.isValid);return useEffect(()=>{d.clearErrors();},[i]),jsxs(v.Column,p(a({gap:5,part:"form-step"},P),{children:[jsx(h.Header,{dismissible:n,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsx(FormProvider,p(a({},d),{children:g})),jsxs(v.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsx(H.Secondary,{onClick:r,title:w}),jsx(H.Primary,{disabled:F||u,onClick:b(C),title:R!=null?R:"Submit",loading:u})]},`form-footer-${i.id}`)]}))}function rr({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsx(T.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Wo({children:e,id:o,required:t=!1}){return jsxs(T.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Lo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Ue=p(a({},Lo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),ao={alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",color:"primary.foreground"};function te({children:e,field:o,fieldData:t,fieldState:r}){var m;let{id:n,label:i,placeholder:s,props:l}=t,{error:d}=r,u=a(p(a(a(a({id:n},o),s?{placeholder:s}:{}),Ue),{"aria-invalid":!!d,value:(m=o.value)!=null?m:""}),l);return jsxs(y,{part:"field",children:[jsx(Wo,{id:n,required:!!t.required,children:i}),e(u),jsx(rr,{error:d})]})}function Ae(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}))}var Wi=Oo.forwardRef(({label:e,value:o},t)=>jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsx(T.Body2,{part:"field-radio-label",children:e}),jsx($e.Item,{id:o,value:o,ref:t,asChild:!0,children:jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsx(y,p(a({as:$e.Indicator},ao),{children:jsx(Ae,{height:"14",width:"14"})}))})})]}));function No(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,n=r.map(({label:i,value:s})=>jsx(Wi,{value:s,label:i},s));return jsx(te,p(a({},e),{children:()=>jsx($e.Root,{value:t,onValueChange:o,asChild:!0,children:jsx(v.Column,{gap:2,part:"field-radio-group",children:n})})}))}function so(e){return jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}function pr(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,[n,i]=Oo.useState([]);function s(l){let d=[];n.includes(l)?d=[...n.filter(u=>u!==l)]:d=[...n,l],i(d),o(d);}return jsx(te,p(a({},e),{children:()=>jsx(v.Column,{gap:2,part:"field-select-multiple",children:r.map(({label:l,value:d})=>jsx(lo.Root,{value:n.includes(d)?d:void 0,onCheckedChange:()=>s(d),asChild:!0,children:jsxs(y,{as:"button",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsx(T.Body2,{part:"field-check-label",children:l}),jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",id:d,padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsx(lo.Indicator,{asChild:!0,children:jsx(y,p(a({},ao),{children:jsx(Ae,{height:"14",width:"14"})}))})})]})},d))})}))}var _i=Oo.forwardRef(({label:e,value:o},t)=>jsx(_.Item,{value:o,ref:t,asChild:!0,children:jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsx(_.ItemText,{asChild:!0,children:jsx(T.Body2,{part:"field-select-option-label",children:e})})})}));function _o(e){let{field:{onChange:o,value:t},fieldData:{options:r=[],placeholder:n}}=e,i=r.map(({label:s,value:l})=>jsx(_i,{value:l,label:s},l));return e.fieldData.multiple?jsx(pr,a({},e)):jsx(te,p(a({},e),{children:()=>jsxs(_.Root,{value:t,onValueChange:o,children:[jsx(_.Trigger,{asChild:!0,children:jsxs(T.Body2,p(a({},Ue),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsx(_.Value,{placeholder:n!=null?n:"Select one"}),jsx(_.Icon,{children:jsx(y,{as:so,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsx(_.Portal,{children:jsx(_.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsx(y,p(a({},Ue),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsx(_.Viewport,{children:i})}))})})]})}))}function zo(e){return jsx(te,p(a({},e),{children:o=>jsx(T.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function Uo(e){return jsx(te,p(a({},e),{children:o=>jsx(T.Body2,a({as:"textarea",part:"field-textarea"},o))}))}function fr(e){let{field:{onChange:o,value:t},fieldData:{options:r,label:n,id:i=[]}}=e;return jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsx(lo.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsx(y,p(a({},Lo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:i,children:jsx(lo.Indicator,{asChild:!0,children:jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsx(Ae,{height:"14",fill:"currentColor"})})})}))}),jsx(T.Body2,{part:"field-checkbox-label",as:"label",htmlFor:i,children:n})]})}var Ui={checkbox:fr,radio:No,select:_o,text:zo,textarea:Uo};function Me(n){var i=n,{fieldTypes:e={},flowId:o,part:t}=i,r=f(i,["fieldTypes","flowId","part"]);let s=Object.assign({},Ui,e);return jsx(U,p(a({flowId:o,part:["form",t]},r),{children:l=>jsx(tr,a({fieldTypes:s},l))}))}var uo={};ce(uo,{NPS:()=>Ke});function xr({field:e,fieldData:o,submit:t}){var n,i;let r=[...Array(11)].map((s,l)=>{let d=e.value===l?H.Primary:H.Secondary;return jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxs(v.Column,{gap:2,children:[jsx(v.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:r}),jsxs(v.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsx(T.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(n=o.negativeLabel)!=null?n:"Not likely at all"}),jsx(T.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function Ke(i){var s=i,{as:e=A,flowId:o,fieldTypes:t,part:r}=s,n=f(s,["as","flowId","fieldTypes","part"]);var d;let{flow:l}=Te(o);return jsx(Me,p(a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:xr},t),modal:!1,onEscapeKeyDown:u=>{typeof n.onEscapeKeyDown=="function"&&n.onEscapeKeyDown(u),u.defaultPrevented||l.skip();},part:["nps",r]},n),{css:a({},a(p(a({},!l||l.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}}),(d=n.css)!=null?d:{}))}))}function br(e,o,t){let[r,n]=useState(!1),i=useRef();return useEffect(()=>{i.current=typeof o=="string"?document.querySelector(o):o,n(!0);},[]),r?createPortal(e,i.current,t):null}function hr({children:e,container:o="body"}){return e!=null?br(e,o):null}function Yi(i,n){var s=i,{children:e,part:o,opacity:t=.5}=s,r=f(s,["children","part","opacity"]);let l=keyframes`
|
|
50
50
|
from {
|
|
51
51
|
opacity: 0;
|
|
52
52
|
}
|
|
53
53
|
to {
|
|
54
54
|
opacity: ${t}
|
|
55
55
|
}
|
|
56
|
-
`;return jsx(RemoveScroll,{forwardProps:!0,ref:
|
|
56
|
+
`;return jsx(RemoveScroll,{forwardProps:!0,ref:n,children:jsx(y,p(a({animation:`${l} 300ms ease-out`,backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"fixed"},r),{children:e}))})}var mo=Oo.forwardRef(Yi);var ta=keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function wr(n){var i=n,{clickable:e=!1,part:o="",style:t={}}=i,r=f(i,["clickable","part","style"]);let[s,l]=useState(!1);return useEffect(()=>{l(!0);},[]),jsxs(y,p(a({borderRadius:"24px",height:"24px",part:`ping-wrapper ${o}`,position:"relative",width:"24px",cursor:e?"pointer":void 0,style:a({opacity:s?1:0},t),transition:"opacity 0.2s ease-out"},r),{children:[jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${ta}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsx(y,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px","backgroundColor:hover":e?"primary.hover.surface":void 0})]}))}function la({maxX:e,maxY:o,radius:t,x1:r,x2:n,y1:i,y2:s}){return t>0?`path("${[`M${r+t},${i}`,`H${n-t}`,`A${t} ${t} 0,0,1 ${n} ${i+t}`,`V${s-t}`,`A${t} ${t} 0,0,1 ${n-t} ${s}`,`H${r+t}`,`A${t} ${t} 0,0,1 ${r} ${s-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${r}`,`V${i+t}`,`A${t} ${t} 0,0,1 ${r+t} ${i}`,"Z"].join(" ")}")`:`path("M${r},${i} H${n} V${s} H${r} V${o} H${e} V0 H0 V${o} H${r} Z")`}function pa(e){if(!window||!("nodeType"in e))return 0;let o=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(o)?0:o}function Go(n){var i=n,{anchor:e,part:o,style:t={}}=i,r=f(i,["anchor","part","style"]);let[s,l]=useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:m}){return l({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:pa(u.reference),x1:m.reference.x,x2:m.reference.x+m.reference.width,y1:m.reference.y,y2:m.reference.y+m.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:autoUpdate});return useEffect(()=>{try{let u=document.querySelector(e);u!=null?d.setReference(u):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);}catch(u){}},[e]),jsx(mo,a({part:["spotlight",o],ref:d.setFloating,style:a({clipPath:la(s)},t)},r))}function vr({align:e,side:o}){let t={},r="-12px",n={top:"bottom",right:"left",bottom:"top",left:"right"};return t[n[o]]=r,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=r:t.bottom=r:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=r:t.top=r:["top","bottom"].includes(o)?t.left=`calc(50% + ${r})`:t.top=`calc(50% + ${r})`,t}function Rr(e,o){try{if(e.matches(o)&&Tr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&Tr(t[0]))return t[0]}catch(t){return null}}function Tr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Br(e){let[o,t]=useState(null);return useEffect(()=>{try{let r=document.querySelector(e);r!=null&&t(r);}catch(r){}},[e]),useEffect(()=>{let r=new MutationObserver(n=>{for(let i of n)if(i.type==="childList"){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let l=Rr(s,e);if(l!=null){t(l);break}}for(let s of i.removedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;if(Rr(s,e)!=null){t(null);break}}}});return r.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),{anchorElement:o}}function wa(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function kr({align:e,alignOffset:o,anchor:t,onOpenChange:r=()=>{},open:n,side:i,sideOffset:s}){let l=`${i}-${wa(e)}`;function d({rects:O}){let I={alignmentAxis:o,mainAxis:s};return ["after","before"].includes(e)&&(["bottom","top"].includes(i)?I.alignmentAxis=o-O.floating.width:I.alignmentAxis=o-O.floating.height),I}let{context:u,floatingStyles:m,placement:g,refs:x}=useFloating({middleware:[offset(d,[e,o,i,s]),flip(),shift()],onOpenChange:r,open:n,placement:l,whileElementsMounted:autoUpdate}),b=useClick(u),P=useDismiss(u,{outsidePress:!1}),C=useRole(u),R=useTransitionStatus(u),{getFloatingProps:w,getReferenceProps:F}=useInteractions([b,P,C]),{anchorElement:B}=Br(t);useEffect(()=>{B!=null?x.setReference(B):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[B]);let S=g.split("-");return e==="before"?S[1]=S[1]==="end"?"after":"before":e==="after"&&(S[1]=S[1]==="start"?"before":"after"),{context:u,getFloatingProps:w,getReferenceProps:F,floatingStyles:m,placement:S.join("-"),refs:x,status:R}}var Ko={height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}};function fo(){let e="DOMRect"in globalThis?new DOMRect:Ko,[o,t]=useState(e),[r,n]=useState(null),i=useCallback(s=>{n(s);},[]);return useLayoutEffect(()=>{if(!r)return;let s=()=>{let l=r.getBoundingClientRect();t(l);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[r]),{node:r,rect:o,ref:i}}function Dr(e){let[o,t]=useState(!1),[r,n]=useState(Ko),i=r.height>0&&r.width>0;return useEffect(()=>{if(e==null)return;let s=new IntersectionObserver(l=>{let d=l[0];n(d.boundingClientRect),t(d.isIntersecting);},{root:null});return s.observe(e),()=>{s.disconnect();}},[e]),{isVisible:o&&i}}function Xo(R){var w=R,{align:e="center",alignOffset:o=0,anchor:t,autoScroll:r=!1,children:n,css:i={},defaultOpen:s=!0,modal:l=!1,onOpenChange:d=()=>{},open:u,part:m,side:g="bottom",sideOffset:x=0,spotlight:b=!1,style:P={}}=w,C=f(w,["align","alignOffset","anchor","autoScroll","children","css","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[F,B]=useState(s),[S,O]=useState(!1),I=u!=null?u:F,{getFloatingProps:V,getReferenceProps:k,floatingStyles:D,placement:$,refs:J,status:se}=kr({align:e,alignOffset:o,anchor:t,onOpenChange:Y=>{d(Y),u==null&&B(Y);},open:I,side:g,sideOffset:x}),[le,j]=$.split("-"),re=k(),{isVisible:pe}=Dr(J.reference.current);return useEffect(()=>{if(!S&&r&&J.reference.current instanceof Element){let Y=typeof r!="boolean"?r:{behavior:"smooth",block:"center"},N;window.addEventListener("scroll",function Q(){clearTimeout(N),N=setTimeout(()=>{window.removeEventListener("scroll",Q),O(!0);},100);},!0),J.reference.current.scrollIntoView(Y);}else r||O(!0);},[r,J.reference.current]),J.reference.current==null||!S||!pe?null:jsxs(Fragment,{children:[b&&I&&jsx(Go,{anchor:t}),l&&!b&&I&&jsx(mo,{lockScroll:!0}),jsxs(y,p(a(a({css:a({'&[data-status="open"]':{transition:"transform 0.2s ease-out"}},i),"data-placement":$,"data-status":se.status,part:["hint",m],ref:J.setFloating,style:a(a({},D),P)},V()),C),{children:[I&&n,jsx(wr,p(a({},re),{position:"absolute",style:vr({align:j,side:le}),clickable:s===!1}))]}))]})}var Ea=keyframes`
|
|
57
57
|
from {
|
|
58
58
|
opacity: 0;
|
|
59
59
|
}
|
|
@@ -63,7 +63,7 @@ var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
|
|
|
63
63
|
to {
|
|
64
64
|
opacity: 1;
|
|
65
65
|
}
|
|
66
|
-
`;function fo(B){var F=B,{align:e,alignOffset:o,autoScroll:t,defaultOpen:n,dismissible:r,flow:i,handleDismiss:s,modal:l,onPrimary:d,onSecondary:u,part:m,side:g,sideOffset:b,spotlight:h,step:P}=F,R=f(F,["align","alignOffset","autoScroll","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var M,k,I,A,J;let{handlePrimary:S,handleSecondary:T}=ue(P,{onPrimary:d,onSecondary:u}),w=(k=(M=P.primaryButton)==null?void 0:M.title)!=null?k:P.primaryButtonTitle,O=(A=(I=P.secondaryButton)==null?void 0:I.title)!=null?A:P.secondaryButtonTitle,D=!!P.$state.blocked;return jsx(jo,p(a({align:e,alignOffset:o,anchor:P.selector,autoScroll:t,"data-step-id":P.id,defaultOpen:n,modal:l,part:m,side:g,sideOffset:b,spotlight:h},R),{children:jsxs(x,{animation:`${Ba} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsx(x.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(J=P.videoUri)!=null?J:P.imageUri,transform:"translate3d(0, 0, 1px)",type:P.videoUri?"video":"image"}),jsx(x.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:r,handleDismiss:s,subtitle:P.subtitle,title:P.title}),jsxs(x.Footer,{children:[i.getNumberOfAvailableSteps()>1&&jsx(Ee,{current:i.getCurrentStepOrder()+1,marginRight:"auto",total:i.getNumberOfAvailableSteps()}),jsx(x.Secondary,{disabled:D,onClick:T,title:O}),jsx(x.Primary,{disabled:D,onClick:S,title:w})]})]})}))}function $r(r){var i=r,{children:e,container:o,flowId:t}=i,n=f(i,["children","container","flowId"]);return jsx(hr,{container:o,children:jsx(y,p(a({"data-flow-id":t,part:"tour"},n),{children:e}))})}function go(n){var r=n,{as:e,flowId:o}=r,t=f(r,["as","flowId"]);let{onDismiss:i,onPrimary:s,onSecondary:l}=t;return jsx(U,p(a({as:null,flowId:o},t),{children:({flow:d,handleDismiss:u,parentProps:m,step:g})=>{var Te;let Re=m.containerProps,{align:b="after",alignOffset:h=0,autoScroll:P=!1,container:R="body",defaultOpen:B,modal:F,part:S,sequential:T=!0,side:w="bottom",sideOffset:O=0,spotlight:D,zIndex:M=9999}=Re,k=f(Re,["align","alignOffset","autoScroll","container","defaultOpen","modal","part","sequential","side","sideOffset","spotlight","zIndex"]),{dismissible:I}=m,A=a({align:b,alignOffset:h,autoScroll:P,dismissible:I,flow:d,handleDismiss:u,modal:F,onPrimary:s,onSecondary:l,part:S,side:w,sideOffset:O,spotlight:D,step:g,zIndex:M},(Te=g.props)!=null?Te:{});if(T)return jsx($r,p(a({as:e,container:R,flowId:o,part:"tour",zIndex:M},k),{children:jsx(fo,a({defaultOpen:B!=null?B:!0},A),g.id)}));let J=Array.from(d.steps.values()).filter(j=>{let{blocked:re,completed:se,skipped:Y,visible:N}=j.$state;return !re&&!se&&!Y&&N}).map(j=>{var Q,le,ne,ye;function re(ie){return W(this,null,function*(){return (yield i==null?void 0:i(d,ie))===!1?(ie.preventDefault(),!1):(j.skip(),!0)})}let se=D&&j.id===g.id,Y=(le=(Q=j.props)==null?void 0:Q.zIndex)!=null?le:M,N=a({align:b,alignOffset:h,dismissible:I,flow:d,handleDismiss:re,onPrimary:s,onSecondary:l,part:S,side:w,sideOffset:O,spotlight:D,zIndex:Y},(ne=j.props)!=null?ne:{});return jsx(fo,a({css:{"&:has([aria-expanded=true])":{zIndex:Number(Y)+2},".fr-overlay":{zIndex:Number(Y)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(ye=B||se)!=null?ye:!1,step:j},N),`${j.id}-${se}`)});return jsx($r,p(a({as:e,container:R,flowId:o,part:"tour",zIndex:M},k),{children:J}))}}))}function yo(){let{frigade:e}=useContext(L),[,o]=useState(!1),t,n=useCallback(s=>{e==null||e.getCollections().then(()=>{s();});let l=()=>{clearTimeout(t),t=setTimeout(()=>{o(d=>!d),s();},0);};return e==null||e.onStateChange(l),()=>{e==null||e.removeStateChangeHandler(l);}},[]),r=()=>{let s;try{s=e==null?void 0:e.getCollectionsSync();}catch(l){}return s};return {collections:useSyncExternalStore(n,r,r)}}function xo(e){var l,d,u,m;let{frigade:o}=useContext(L),{collections:t}=yo(),n=t==null?void 0:t.get(e),i=(m=((u=(d=(l=t==null?void 0:t.get(e))==null?void 0:l.flows)==null?void 0:d.filter(g=>g.visible).map(g=>p(a({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:s}=Fe(i);return useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:s}}function Xo(r){var i=r,{collectionId:e,part:o,variables:t={}}=i,n=f(i,["collectionId","part","variables"]);var u,m,g;let s={ANNOUNCEMENT:Jo,BANNER:Oo,CARD:x,CHECKLIST:ro,EMBEDDED_TIP:x,FORM:Me,NPS_SURVEY:Ge,SURVEY:Ge,TOUR:go},{currentFlow:l}=xo(e),d=(m=s[(u=l==null?void 0:l.rawData)==null?void 0:u.flowType])!=null?m:null;return l==null||d==null?null:((g=l==null?void 0:l.rawData)==null?void 0:g.flowType)===FlowType.FORM?jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsx(Me,{flowId:l.id,as:$,variables:t},l.id)})):jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsx(d,{flowId:l.id,variables:t},l.id)}))}function Ar(){var t,n;let{collections:e}=yo(),o=(n=Array.from((t=e==null?void 0:e.entries())!=null?t:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return xo(o),o==null?null:jsx(Xo,{as:null,collectionId:o})}var L=createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function qo(){let{frigade:e}=useContext(L);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Mr(){let{frigade:e}=qo();return useEffect(()=>{W(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var Wr="2.5.26";function zr(s){var l=s,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=l,i=f(l,["children","css","defaultCollection","navigate","theme"]);let d=r?vo(r):{},u=useRef(new Map),m=useRef(),[g,b]=useState(!1),h=useMemo(()=>(b(!1),m.current=void 0,new Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,userProperties:i.userProperties,groupProperties:i.groupProperties,generateGuestId:i.generateGuestId,syncOnWindowUpdates:i.syncOnWindowUpdates,__readOnly:i.__readOnly,__flowStateOverrides:i.__flowStateOverrides,__platformVersion:Wr,__platformName:"React"})),[i.userId,i.groupId,i.apiKey]);useEffect(()=>{if(i.__flowStateOverrides){let S=h.getConfig();S.__flowStateOverrides=i.__flowStateOverrides,h.reload(S);}},[i.__flowStateOverrides]);function P(){let S=[...u.current.entries()].map(([T,w])=>[T,w.callback]);h.batchRegister(S),b(!0);}function R(S,T){if(m.current&&clearTimeout(m.current),g){u.current.has(S)?h.getFlow(S).then(w=>T(w.isVisible)):(h.getFlow(S).then(w=>w.register(T)),u.current.set(S,{callback:T}));return}u.current.has(S)||u.current.set(S,{callback:T}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(),0);}function B(S){u.current.has(S)&&h.getFlow(S).then(T=>{u.current.delete(S),T==null||T.unregister();});}let F=n!=null?n:(S,T="_self")=>{window.open(S,T);};return useEffect(()=>()=>{h.destroy();},[]),jsxs(L.Provider,{value:p(a({navigate:F},i),{frigade:h,registerComponent:R,unregisterComponent:B,hasInitialized:g,variables:i.variables||{}}),children:[jsx(Global,{styles:{":root":a(a(a({},Ro),d),o)}}),jsxs(ThemeProvider,{theme:E,children:[t&&jsx(Ar,{}),e]}),i.preloadImages!==!1&&jsx(Mr,{})]})}function Fe(e,o){let{frigade:t,variables:n}=useContext(L),[,r]=useState(!1),i=useCallback(l=>{t==null||t.getFlow(e).then(()=>{l();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),l();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),s=useSyncExternalStore(i,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return useEffect(()=>{s==null||s.applyVariables(a(a({},n),o==null?void 0:o.variables));},[o==null?void 0:o.variables,e,n]),{flow:s,isLoading:t!=null&&t.hasFailedToLoad()?!1:!s}}function Yo(e,{onComplete:o,onDismiss:t}={}){let n=useRef(null);return useEffect(()=>{if(e==null)return;function r(){return W(this,null,function*(){e.isCompleted&&n.current===!1&&(n.current=!0,yield o==null?void 0:o(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:useCallback(r=>W(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var fe=new Set;function Qo(e,o=!0){let t=useCallback(()=>{fe.has(e==null?void 0:e.id)&&fe.delete(e==null?void 0:e.id);},[fe,o]),n=useCallback(()=>{o&&(e!=null&&e.isVisible)&&!fe.has(e.id)&&fe.add(e.id);},[fe,o]);useEffect(()=>()=>{t();},[]),useEffect(()=>{n();let i=()=>{t();};return window.addEventListener("popstate",i),window.addEventListener("beforeunload",i),()=>{t(),window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",i);}},[n,t]),e!=null&&e.isVisible?n():t();let r=fe.size>0?fe.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||fe.size==0:!0}}function U(u){var m=u,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:i,onSecondary:s,variables:l}=m,d=f(m,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var k,A;let{flow:g}=Fe(t,{variables:l}),I=a(a({},d),(k=g==null?void 0:g.props)!=null?k:{}),{dismissible:b=!1,forceMount:h=!1}=I,P=f(I,["dismissible","forceMount"]),R=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=Yo(g,{onComplete:n,onDismiss:r}),{handlePrimary:F,handleSecondary:S}=ue(R,{onPrimary:i,onSecondary:s}),T=(P==null?void 0:P.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[FlowType.ANNOUNCEMENT,FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:w}=Qo(g,T),O=h&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!O||!O&&!w)return null;(O||!g.isCompleted&&!g.isSkipped)&&(R==null||R.start());let D=e===null?Fragment$1:e!=null?e:y,M=p(a({},P),{"data-flow-id":g.id});return jsx(D,p(a({},e===null?{}:M),{children:o({flow:g,handleDismiss:B,handlePrimary:F,handleSecondary:S,parentProps:{dismissible:b,flowId:t,variables:l,containerProps:M},step:R})}))}function jr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsx(U,p(a({as:x,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:i,handleSecondary:s,parentProps:{dismissible:l},step:d})=>{var g,b,h,P;let u=(b=(g=d.primaryButton)==null?void 0:g.title)!=null?b:d.primaryButtonTitle,m=(P=(h=d.secondaryButton)==null?void 0:h.title)!=null?P:d.secondaryButtonTitle;return jsxs(Fragment,{children:[jsx(x.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsx(x.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxs(C.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsx(x.Secondary,{title:m,onClick:s}),jsx(x.Primary,{title:u,onClick:i})]})]})}}))}function bo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function rs(e){var o,t,n,r,i;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(n=e.split("vimeo.com/")[1])==null?void 0:n.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(r=e.split("wistia.com/medias/")[1])==null?void 0:r.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(i=e.split("loom.com/share/")[1])==null?void 0:i.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function Po(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let i=rs(o);return i?jsx(y,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsx(y,a({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function he(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsx(o==="video"?Po:bo,a({src:e},t))}var x=Eo.forwardRef((i,r)=>{var s=i,{children:e,flowId:o,part:t}=s,n=f(s,["children","flowId","part"]);var d;if(o!=null)return jsx(jr,a({flowId:o},n));let l=(d=n.as)!=null?d:C.Column;return jsx(l,p(a({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",t]},n),{ref:r,children:e}))});x.Dismiss=e=>jsx(H.Plain,p(a({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsx(Be,{height:"20",fill:"currentColor"})}));x.Footer=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return jsx(C.Row,p(a({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};x.Header=s=>{var l=s,{dismissible:e,handleDismiss:o,part:t,subtitle:n,title:r}=l,i=f(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxs(C.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},i),{children:[jsx(x.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsx(x.Dismiss,{onClick:o,marginLeft:"auto"}),jsx(x.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};x.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsx(he,a({borderRadius:"md",src:e},o))};x.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(H.Primary,a({title:o,onClick:e},t))};x.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(H.Secondary,a({title:o,onClick:e},t))};x.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsx(v.Body2,p(a({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};x.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsx(v.H4,p(a({display:"block",part:["title",o]},t),{children:e}))};var Co={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function qr(e){let o=Object.fromEntries(Co.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(Co.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!Co.content.some(i=>i===r)&&!Co.root.some(i=>i===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var ss=keyframes`
|
|
66
|
+
`;function go(R){var w=R,{align:e,alignOffset:o,autoScroll:t,defaultOpen:r,dismissible:n,flow:i,handleDismiss:s,modal:l,onPrimary:d,onSecondary:u,part:m,side:g,sideOffset:x,spotlight:b,step:P}=w,C=f(w,["align","alignOffset","autoScroll","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var D,$,J,se,le;let{handlePrimary:F,handleSecondary:B}=fe(P,{onPrimary:d,onSecondary:u}),{videoProps:S,otherProps:O}=he(C),I=($=(D=P.primaryButton)==null?void 0:D.title)!=null?$:P.primaryButtonTitle,V=(se=(J=P.secondaryButton)==null?void 0:J.title)!=null?se:P.secondaryButtonTitle,k=!!P.$state.blocked;return jsx(Xo,p(a({align:e,alignOffset:o,anchor:P.selector,autoScroll:t,"data-step-id":P.id,defaultOpen:r,modal:l,part:m,side:g,sideOffset:x,spotlight:b},O),{children:jsxs(h,{animation:`${Ea} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsx(h.Media,a({aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(le=P.videoUri)!=null?le:P.imageUri,transform:"translate3d(0, 0, 1px)",type:P.videoUri?"video":"image"},S)),jsx(h.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:n,handleDismiss:s,subtitle:P.subtitle,title:P.title}),jsxs(h.Footer,{children:[i.getNumberOfAvailableSteps()>1&&jsx(Oe,{current:i.getCurrentStepOrder()+1,marginRight:"auto",total:i.getNumberOfAvailableSteps()}),jsx(h.Secondary,{disabled:k,onClick:B,title:V}),jsx(h.Primary,{disabled:k,onClick:F,title:I})]})]})}))}function $r(n){var i=n,{children:e,container:o,flowId:t}=i,r=f(i,["children","container","flowId"]);return jsx(hr,{container:o,children:jsx(y,p(a({"data-flow-id":t,part:"tour"},r),{children:e}))})}function yo(r){var n=r,{as:e,flowId:o}=n,t=f(n,["as","flowId"]);let{onDismiss:i,onPrimary:s,onSecondary:l}=t;return jsx(U,p(a({as:null,flowId:o},t),{children:({flow:d,handleDismiss:u,parentProps:m,step:g})=>{var le;let se=m.containerProps,{align:x="after",alignOffset:b=0,autoScroll:P=!1,container:C="body",defaultOpen:R,modal:w,part:F,sequential:B=!0,side:S="bottom",sideOffset:O=0,spotlight:I,zIndex:V=9999}=se,k=f(se,["align","alignOffset","autoScroll","container","defaultOpen","modal","part","sequential","side","sideOffset","spotlight","zIndex"]),{dismissible:D}=m,$=a({align:x,alignOffset:b,autoScroll:P,dismissible:D,flow:d,handleDismiss:u,modal:w,onPrimary:s,onSecondary:l,part:F,side:S,sideOffset:O,spotlight:I,step:g,zIndex:V},(le=g.props)!=null?le:{});if(B)return jsx($r,p(a({as:e,container:C,flowId:o,part:"tour",zIndex:V},k),{children:jsx(go,a({defaultOpen:R!=null?R:!0},$),g.id)}));let J=Array.from(d.steps.values()).filter(j=>{let{blocked:re,completed:pe,skipped:Y,visible:N}=j.$state;return !re&&!pe&&!Y&&N}).map(j=>{var Q,de,ne,be;function re(ie){return M(this,null,function*(){return (yield i==null?void 0:i(d,ie))===!1?(ie.preventDefault(),!1):(j.skip(),!0)})}let pe=I&&j.id===g.id,Y=(de=(Q=j.props)==null?void 0:Q.zIndex)!=null?de:V,N=a({align:x,alignOffset:b,dismissible:D,flow:d,handleDismiss:re,onPrimary:s,onSecondary:l,part:F,side:S,sideOffset:O,spotlight:I,zIndex:Y},(ne=j.props)!=null?ne:{});return jsx(go,a({css:{"&:has([aria-expanded=true])":{zIndex:Number(Y)+2},".fr-overlay":{zIndex:Number(Y)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(be=R||pe)!=null?be:!1,step:j},N),`${j.id}-${pe}`)});return jsx($r,p(a({as:e,container:C,flowId:o,part:"tour",zIndex:V},k),{children:J}))}}))}function xo(){let{frigade:e}=useContext(L),[,o]=useState(!1),t,r=useCallback(s=>{e==null||e.getCollections().then(()=>{s();});let l=()=>{clearTimeout(t),t=setTimeout(()=>{o(d=>!d),s();},0);};return e==null||e.onStateChange(l),()=>{e==null||e.removeStateChangeHandler(l);}},[]),n=()=>{let s;try{s=e==null?void 0:e.getCollectionsSync();}catch(l){}return s};return {collections:useSyncExternalStore(r,n,n)}}function bo(e){var l,d,u,m;let{frigade:o}=useContext(L),{collections:t}=xo(),r=t==null?void 0:t.get(e),i=(m=((u=(d=(l=t==null?void 0:t.get(e))==null?void 0:l.flows)==null?void 0:d.filter(g=>g.visible).map(g=>p(a({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:s}=Te(i);return useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:r,currentFlow:s}}function Jo(n){var i=n,{collectionId:e,part:o,variables:t={}}=i,r=f(i,["collectionId","part","variables"]);var u,m,g;let s={ANNOUNCEMENT:qo,BANNER:Do,CARD:h,CHECKLIST:no,EMBEDDED_TIP:h,FORM:Me,NPS_SURVEY:Ke,SURVEY:Ke,TOUR:yo},{currentFlow:l}=bo(e),d=(m=s[(u=l==null?void 0:l.rawData)==null?void 0:u.flowType])!=null?m:null;return l==null||d==null?null:((g=l==null?void 0:l.rawData)==null?void 0:g.flowType)===FlowType.FORM?jsx(y,p(a({part:["collection",o],"data-collection-id":e},r),{children:jsx(Me,{flowId:l.id,as:A,variables:t},l.id)})):jsx(y,p(a({part:["collection",o],"data-collection-id":e},r),{children:jsx(d,{flowId:l.id,variables:t},l.id)}))}function Vr(){var t,r;let{collections:e}=xo(),o=(r=Array.from((t=e==null?void 0:e.entries())!=null?t:[]).find(n=>n[1].collectionType==="DEFAULT"))==null?void 0:r[0];return bo(o),o==null?null:jsx(Jo,{as:null,collectionId:o})}var L=createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Zo(){let{frigade:e}=useContext(L);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Mr(){let{frigade:e}=Zo();return useEffect(()=>{M(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(r=>{if(r.imageUri){let n=new Image;n.src=r.imageUri;}});});});},[]),null}var Wr="2.5.28";function zr(s){var l=s,{children:e,css:o={},defaultCollection:t=!0,navigate:r,theme:n}=l,i=f(l,["children","css","defaultCollection","navigate","theme"]);let d=n?Ro(n):{},u=useRef(new Map),m=useRef(),[g,x]=useState(!1),b=useMemo(()=>(x(!1),m.current=void 0,new Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,userProperties:i.userProperties,groupProperties:i.groupProperties,generateGuestId:i.generateGuestId,syncOnWindowUpdates:i.syncOnWindowUpdates,__readOnly:i.__readOnly,__flowStateOverrides:i.__flowStateOverrides,__platformVersion:Wr,__platformName:"React"})),[i.userId,i.groupId,i.apiKey]);useEffect(()=>{if(i.__flowStateOverrides){let F=b.getConfig();F.__flowStateOverrides=i.__flowStateOverrides,b.reload(F);}},[i.__flowStateOverrides]);function P(){let F=[...u.current.entries()].map(([B,S])=>[B,S.callback]);b.batchRegister(F),x(!0);}function C(F,B){if(m.current&&clearTimeout(m.current),g){u.current.has(F)?b.getFlow(F).then(S=>B(S.isVisible)):(b.getFlow(F).then(S=>S.register(B)),u.current.set(F,{callback:B}));return}u.current.has(F)||u.current.set(F,{callback:B}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(),0);}function R(F){u.current.has(F)&&b.getFlow(F).then(B=>{u.current.delete(F),B==null||B.unregister();});}let w=r!=null?r:(F,B="_self")=>{window.open(F,B);};return useEffect(()=>()=>{b.destroy();},[]),jsxs(L.Provider,{value:p(a({navigate:w},i),{frigade:b,registerComponent:C,unregisterComponent:R,hasInitialized:g,variables:i.variables||{}}),children:[jsx(Global,{styles:{":root":a(a(a({},To),d),o)}}),jsxs(ThemeProvider,{theme:E,children:[t&&jsx(Vr,{}),e]}),i.preloadImages!==!1&&jsx(Mr,{})]})}function Te(e,o){let{frigade:t,variables:r}=useContext(L),[,n]=useState(!1),i=useCallback(l=>{t==null||t.getFlow(e).then(()=>{l();});let d=u=>{u.id===e&&setTimeout(()=>{n(m=>!m),l();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),s=useSyncExternalStore(i,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return useEffect(()=>{s==null||s.applyVariables(a(a({},r),o==null?void 0:o.variables));},[o==null?void 0:o.variables,e,r]),{flow:s,isLoading:t!=null&&t.hasFailedToLoad()?!1:!s}}function Qo(e,{onComplete:o,onDismiss:t}={}){let r=useRef(null);return useEffect(()=>{if(e==null)return;function n(){return M(this,null,function*(){e.isCompleted&&r.current===!1&&(r.current=!0,yield o==null?void 0:o(e));})}return n(),r.current=e==null?void 0:e.isCompleted,()=>{n();}},[e==null?void 0:e.isCompleted]),{handleDismiss:useCallback(n=>M(this,null,function*(){if((yield t==null?void 0:t(e,n))===!1)return n.preventDefault(),!1;e.skip();}),[e])}}var ye=new Set;function et(e,o=!0){let t=useCallback(()=>{ye.has(e==null?void 0:e.id)&&ye.delete(e==null?void 0:e.id);},[ye,o]),r=useCallback(()=>{o&&(e!=null&&e.isVisible)&&!ye.has(e.id)&&ye.add(e.id);},[ye,o]);useEffect(()=>()=>{t();},[]),useEffect(()=>{r();let i=()=>{t();};return window.addEventListener("popstate",i),window.addEventListener("beforeunload",i),()=>{t(),window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",i);}},[r,t]),e!=null&&e.isVisible?r():t();let n=ye.size>0?ye.values().next().value:null;return {isCurrentModal:o?n===(e==null?void 0:e.id)||ye.size==0:!0}}function U(u){var m=u,{as:e,children:o,flowId:t,onComplete:r,onDismiss:n,onPrimary:i,onSecondary:s,variables:l}=m,d=f(m,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var k,$;let{flow:g}=Te(t,{variables:l}),D=a(a({},d),(k=g==null?void 0:g.props)!=null?k:{}),{dismissible:x=!1,forceMount:b=!1}=D,P=f(D,["dismissible","forceMount"]),C=g==null?void 0:g.getCurrentStep(),{handleDismiss:R}=Qo(g,{onComplete:r,onDismiss:n}),{handlePrimary:w,handleSecondary:F}=fe(C,{onPrimary:i,onSecondary:s}),B=(P==null?void 0:P.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[FlowType.ANNOUNCEMENT,FlowType.TOUR].includes(($=g==null?void 0:g.rawData)==null?void 0:$.flowType),{isCurrentModal:S}=et(g,B),O=b&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!O||!O&&!S)return null;(O||!g.isCompleted&&!g.isSkipped)&&(C==null||C.start());let I=e===null?Fragment$1:e!=null?e:y,V=p(a({},P),{"data-flow-id":g.id});return jsx(I,p(a({},e===null?{}:V),{children:o({flow:g,handleDismiss:R,handlePrimary:w,handleSecondary:F,parentProps:{dismissible:x,flowId:t,variables:l,containerProps:V},step:C})}))}function Xr(t){var r=t,{part:e}=r,o=f(r,["part"]);return jsx(U,p(a({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:n,handlePrimary:i,handleSecondary:s,parentProps:{dismissible:l},step:d})=>{var x,b,P,C,R,w;let u=(b=(x=d.primaryButton)==null?void 0:x.title)!=null?b:d.primaryButtonTitle,m=(C=(P=d.secondaryButton)==null?void 0:P.title)!=null?C:d.secondaryButtonTitle,{videoProps:g}=he((R=d.props)!=null?R:{});return jsxs(Fragment,{children:[jsx(h.Header,{dismissible:l,handleDismiss:n,subtitle:d.subtitle,title:d.title}),jsx(h.Media,a({src:(w=d.videoUri)!=null?w:d.imageUri,type:d.videoUri?"video":"image",css:{objectFit:"contain",width:"100%"}},g)),jsxs(v.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsx(h.Secondary,{title:m,onClick:s}),jsx(h.Primary,{title:u,onClick:i})]})]})}}))}function Po(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);return jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function is(e){var o,t,r,n,i;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(r=e.split("vimeo.com/")[1])==null?void 0:r.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(n=e.split("wistia.com/medias/")[1])==null?void 0:n.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(i=e.split("loom.com/share/")[1])==null?void 0:i.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function Co(P){var C=P,{autoPlay:e,controls:o,controlsList:t,crossOrigin:r,disablePictureInPicture:n,disableRemotePlayback:i,loop:s,muted:l,playsInline:d,poster:u,preload:m,part:g,src:x}=C,b=f(C,["autoPlay","controls","controlsList","crossOrigin","disablePictureInPicture","disableRemotePlayback","loop","muted","playsInline","poster","preload","part","src"]);let R=is(x);return R?jsx(y,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",g],src:R},b)):x!=null&&x.endsWith(".mp4")?jsx(y,a({as:"video",part:["video",g],src:x,autoPlay:e,controls:o!=null?o:!0,controlsList:t,crossOrigin:r,disablePictureInPicture:n,disableRemotePlayback:i,loop:s,muted:l!=null?l:e,playsInline:d,poster:u,preload:m},b)):(console.error(`Could not map videoUri ${x} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function Ce(r){var n=r,{src:e,type:o}=n,t=f(n,["src","type"]);return jsx(o==="video"?Co:Po,a({src:e},t))}var h=Oo.forwardRef((i,n)=>{var s=i,{children:e,flowId:o,part:t}=s,r=f(s,["children","flowId","part"]);var d;if(o!=null)return jsx(Xr,a({flowId:o},r));let l=(d=r.as)!=null?d:v.Column;return jsx(l,p(a({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",t]},r),{ref:n,children:e}))});h.Dismiss=e=>jsx(H.Plain,p(a({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsx(ke,{height:"20",fill:"currentColor"})}));h.Footer=r=>{var n=r,{children:e,part:o}=n,t=f(n,["children","part"]);return jsx(v.Row,p(a({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};h.Header=s=>{var l=s,{dismissible:e,handleDismiss:o,part:t,subtitle:r,title:n}=l,i=f(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxs(v.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},i),{children:[jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:n}),e&&jsx(h.Dismiss,{onClick:o,marginLeft:"auto"}),jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:r})]}))};h.Media=t=>{var r=t,{src:e}=r,o=f(r,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsx(Ce,a({borderRadius:"md",src:e},o))};h.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(H.Primary,a({title:o,onClick:e},t))};h.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(H.Secondary,a({title:o,onClick:e},t))};h.Subtitle=r=>{var n=r,{children:e,part:o}=n,t=f(n,["children","part"]);return e==null?null:jsx(T.Body2,p(a({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};h.Title=r=>{var n=r,{children:e,part:o}=n,t=f(n,["children","part"]);return e==null?null:jsx(T.H4,p(a({display:"block",part:["title",o]},t),{children:e}))};var So={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Zr(e){let o=Object.fromEntries(So.content.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),t=Object.fromEntries(So.root.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),r={};for(let n of Object.keys(e))!So.content.some(i=>i===n)&&!So.root.some(i=>i===n)&&(r[n]=e[n]);return {contentProps:o,otherProps:r,rootProps:t}}var ps=keyframes`
|
|
67
67
|
from {
|
|
68
68
|
opacity: 0;
|
|
69
69
|
}
|
|
@@ -73,7 +73,7 @@ var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
|
|
|
73
73
|
to {
|
|
74
74
|
opacity: 1;
|
|
75
75
|
}
|
|
76
|
-
`;function
|
|
76
|
+
`;function A(n){var i=n,{children:e,className:o,modal:t=!0}=i,r=f(i,["children","className","modal"]);let{rootProps:s,contentProps:l,otherProps:m}=Zr(r),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsx(X.Root,p(a({defaultOpen:!0,modal:t},s),{children:jsx(X.Portal,{children:jsxs(y,{animation:`${ps} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[t&&jsx(X.Overlay,{asChild:!0,children:jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsx(X.Content,p(a({asChild:!0,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault()},l),{children:jsx(h,p(a({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}A.Dismiss=e=>jsx(X.Close,{"aria-label":"Close",asChild:!0,children:jsx(H.Plain,p(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsx(ke,{height:"20",fill:"currentColor"})}))});A.Subtitle=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return jsx(X.Description,{asChild:!0,children:jsx(T.Body2,p(a({part:"subtitle"},o),{children:e}))})};A.Media=t=>{var r=t,{src:e}=r,o=f(r,["src"]);return e==null?null:jsx(Ce,a({borderRadius:"md",src:e},o))};A.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsx(H.Primary,a({title:o,onClick:e},t))};A.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((r,n)=>jsx(y,{as:"circle",r:4,cx:4+16*n,cy:"4px",fill:e===n?E.colors.primary.surface:E.colors.neutral[700],part:e===n?"progress-dot-selected":"progress-dot"},n));return jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};A.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsx(H.Secondary,a({title:o,onClick:e},t))};A.Title=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return jsx(X.Title,{asChild:!0,children:jsx(T.H4,p(a({part:"title"},o),{children:e}))})};A.displayName="Dialog";var Yr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function qo(r){var n=r,{flowId:e,part:o}=n,t=f(n,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([l])=>Yr.some(d=>l===d))),s=Object.fromEntries(Object.entries(t).filter(([l])=>Yr.indexOf(l)===-1));return jsx(U,p(a({as:null,flowId:e},i),{children:({flow:l,handleDismiss:d,handlePrimary:u,handleSecondary:m,parentProps:{containerProps:g,dismissible:x},step:b})=>{var B,S,O,I,V,k;let P=(B=b.props)!=null?B:{},C=(O=(S=b.primaryButton)==null?void 0:S.title)!=null?O:b.primaryButtonTitle,R=(V=(I=b.secondaryButton)==null?void 0:I.title)!=null?V:b.secondaryButtonTitle,w=b.$state.blocked,{videoProps:F}=he(P);return jsx(A,p(a(a({part:["announcement",o],textAlign:"center"},g),s),{onEscapeKeyDown:D=>{if(t.dismissible===!1){D.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(D),D.defaultPrevented||d(D);},children:jsxs(v.Column,p(a({gap:5,part:"announcement-step"},P),{children:[x&&jsx(A.Dismiss,{onClick:d}),jsxs(v.Column,{gap:1,part:"announcement-header",children:[jsx(A.Title,{children:b.title}),jsx(A.Subtitle,{children:b.subtitle})]}),jsx(A.Media,a({aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(k=b.videoUri)!=null?k:b.imageUri,transform:"translate3d(0, 0, 1px)",type:b.videoUri?"video":"image",width:"100%"},F)),jsx(A.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxs(v.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[R&&jsx(A.Secondary,{disabled:w,onClick:m,title:R}),C&&jsx(A.Primary,{disabled:w,onClick:u,title:C})]})]}))}))}}))}function tt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function wo(...e){let o=e.shift(),t=e.length===1?e[0]:wo(...e);if(!tt(o)||!tt(t))throw new Error("deepmerge can only merge Objects");let r=structuredClone(o);return Object.entries(t).forEach(([n,i])=>{tt(i)?r[n]!==void 0?Object.assign(r,{[n]:wo(r[n],structuredClone(i))}):Object.assign(r,{[n]:structuredClone(i)}):Array.isArray(i)?r[n]!==void 0?Object.assign(r,{[n]:[...r[n],...structuredClone(i)]}):Object.assign(r,{[n]:structuredClone(i)}):Object.assign(r,{[n]:i});}),r}function cs(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function us(t){var r=t,{title:e}=r,o=f(r,["title"]);return jsx(U,p(a({as:null},o),{children:({flow:n,parentProps:{containerProps:i},step:s})=>{var g,x,b;let l=cs(e,n.title,s.title),d=(g=n==null?void 0:n.getNumberOfCompletedSteps())!=null?g:0,u=(x=n==null?void 0:n.getNumberOfAvailableSteps())!=null?x:1,m=i.onClick!=null;return m&&(i.css=wo({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(b=i.css)!=null?b:{})),jsxs(h,p(a({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"1",p:"3",part:"progress-badge",role:"complementary"},i),{children:[jsxs(v.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsx(h.Title,{fontSize:"sm",lineHeight:"sm",children:l}),jsx(y,{as:so,height:"20px",marginLeft:"auto",marginRight:"-1",transform:"rotate(-90deg)",width:"20px"})]}),jsxs(v.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsx(Oe,{current:d,fontSize:"xs",fontWeight:"medium",lineHeight:"xs",total:u}),jsx(to,{current:d,flexGrow:"1",total:u})]})]}))}}))}var fs=keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function en(r){var n=r,{style:e={},part:o=""}=n,t=f(n,["style","part"]);return jsxs(y,p(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${fs}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function on({props:e,alignAttr:o,sideAttr:t}){let r=t!=null?t:"bottom",n={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};n[l[r]]=s;let d=i();return ["before","end"].includes(d)?["top","bottom"].includes(r)?n.right=s:n.bottom=s:["after","start"].includes(d)?["top","bottom"].includes(r)?n.left=s:n.top=s:["top","bottom"].includes(r)?n.left=`calc(50% + ${s})`:n.top=`calc(50% + ${s})`,n}var vo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function tn(e,o){var i,s,l,d,u;let t=Object.fromEntries(vo.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r=Object.fromEntries(vo.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n={};for(let m of Object.keys(e))!vo.content.includes(m)&&!vo.root.includes(m)&&(n[m]=e[m]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let m={after:"end",before:"start"},g=(w,F)=>["top","bottom"].includes(F)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",x=(l=t.alignOffset)!=null?l:0,b=(d=t.style)!=null?d:{},P=(u=t.side)!=null?u:"bottom",C=t.align;t.style=p(a({},b),{[g(C,P)]:x});let R=["top","bottom"].includes(P)?o.width:o.height;t.alignOffset=(R+x)*-1,t.align=m[C];}return {contentProps:t,otherProps:n,rootProps:r}}var rn=keyframes`
|
|
77
77
|
from {
|
|
78
78
|
opacity: 0;
|
|
79
79
|
}
|
|
@@ -83,8 +83,8 @@ var at=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnProp
|
|
|
83
83
|
to {
|
|
84
84
|
opacity: 1;
|
|
85
85
|
}
|
|
86
|
-
`;function
|
|
86
|
+
`;function nn(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Se(u){var m=u,{anchor:e,children:o,className:t,defaultOpen:r=!0,open:n,part:i,spotlight:s=!1,style:l={}}=m,d=f(m,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:x,ref:b}=fo(),{node:P,rect:C,ref:R}=fo(),{contentProps:w,otherProps:F,rootProps:B}=tn(d,x),[S,O]=useState(r),[I,V]=useState(w.align),[k,D]=useState(w.side),[$,J]=useState(0),[se,le]=useState(0);function j(){return n!=null?(console.log("OVERRIDE: ",n),n):(console.log("INTERNAL: ",S),S)}if(g!==null){let N=g.getAttribute("data-align"),Q=g.getAttribute("data-side");I!==N&&V(N),k!==Q&&D(Q);}let re=useRef(null);if(useEffect(()=>{let N=document.querySelector(e);N!=null?(R(N),re.current=N):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),useEffect(()=>{function N(de){if(de.matches(e))return nn(de)?de:null;let ne=de.querySelectorAll(e);return ne.length>0&&nn(ne[0])?ne[0]:null}let Q=new MutationObserver(de=>{for(let ne of de)if(ne.type==="childList"){for(let be of ne.addedNodes){if(be.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(be);if(ie!=null){R(ie),re.current=ie,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",ie);break}}for(let be of ne.removedNodes){if(be.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(be);if(ie!=null){R(null),re.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",ie);break}}}});return Q.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>Q.disconnect()},[]),useEffect(()=>{let{scrollX:N,scrollY:Q}=window;J(C.left+N),le(C.top+Q);},[C.left,C.top]),P==null)return null;let pe="0";typeof window!="undefined"&&(pe=window.getComputedStyle(P).borderRadius);let Y=on({props:d,alignAttr:I,sideAttr:k});return jsxs(ae.Root,p(a({defaultOpen:!0},B),{children:[jsx(ae.Anchor,{virtualRef:re}),jsx(ae.Portal,{children:jsxs(Fragment,{children:[s&&jsx(y,a({animation:`${rn} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:pe,height:C.height,left:$,top:se,width:C.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsx(ae.Content,p(a({},w),{ref:b,children:jsxs(Fragment,{children:[j()&&jsx(h,p(a({animation:`${rn} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",i],style:l},F),{children:o})),jsx(en,{onClick:()=>{O(()=>(typeof B.onOpenChange=="function"&&B.onOpenChange(!j()),!j()));},style:Y})]})}),S)]})})]}))}Se.Close=e=>jsx(ae.Close,{"aria-label":"Close",asChild:!0,children:jsx(H.Plain,p(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsx(ke,{height:"20",fill:"currentColor"})}))});Se.Media=t=>{var r=t,{src:e}=r,o=f(r,["src"]);return e==null?null:jsx(Ce,a({aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:e,transform:"translate3d(0, 0, 1px)"},o))};Se.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsx(H.Primary,a({title:o,onClick:e},t))};Se.Progress=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsx(T.Body2,p(a({part:"progress"},o),{children:e}))};Se.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsx(H.Secondary,a({title:o,onClick:e},t))};Se.Subtitle=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsx(T.Body2,p(a({part:"subtitle"},o),{children:e}))};Se.Title=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsx(T.H4,p(a({part:"title"},o),{children:e}))};function hs(){let{userId:e,frigade:o}=useContext(L);function t(n){return M(this,null,function*(){yield o.identify(e,n);})}function r(n,i){return M(this,null,function*(){yield o.track(n,i);})}return {userId:e,addProperties:t,track:r}}function Cs(){var n;let{frigade:e}=useContext(L);function o(i){return M(this,null,function*(){if(!e.config.groupId){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}yield e.group(e.config.groupId,i);})}function t(i,s){return M(this,null,function*(){yield e.track(i,s);})}function r(i,s){return M(this,null,function*(){yield e.group(i,s);})}return {groupId:(n=e==null?void 0:e.config)==null?void 0:n.groupId,setGroupId:r,addProperties:o,track:t}}
|
|
87
87
|
|
|
88
|
-
export {
|
|
88
|
+
export { qo as Announcement, Do as Banner, te as BaseField, y as Box, H as Button, h as Card, io as Checklist, Jo as Collection, A as Dialog, v as Flex, U as Flow, Me as Form, Xo as Hint, Po as Image, Wo as Label, Ce as Media, ve as Progress, us as ProgressBadge, zr as Provider, No as RadioField, _o as SelectField, Go as Spotlight, uo as Survey, T as Text, zo as TextField, Uo as TextareaField, Se as Tooltip, yo as Tour, Co as Video, To as themeVariables, Ye as tokens, fo as useBoundingClientRect, Te as useFlow, Qo as useFlowHandlers, Zo as useFrigade, Cs as useGroup, et as useModal, fe as useStepHandlers, hs as useUser };
|
|
89
89
|
//# sourceMappingURL=out.js.map
|
|
90
90
|
//# sourceMappingURL=index.js.map
|