@frigade/react 2.5.18 → 2.5.20

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 CHANGED
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  var react = require('@emotion/react');
4
- var j = require('@radix-ui/react-dialog');
4
+ var X = require('@radix-ui/react-dialog');
5
5
  var jsxRuntime = require('@emotion/react/jsx-runtime');
6
- var ko = require('react');
6
+ var Eo = require('react');
7
7
  var clsx = require('clsx');
8
- var sn = require('known-css-properties');
9
- var yn = require('dompurify');
8
+ var mn = require('known-css-properties');
9
+ var Sn = require('dompurify');
10
10
  var js = require('@frigade/js');
11
- var ai = require('embla-carousel-react');
12
- var ke = require('@radix-ui/react-collapsible');
11
+ var ui = require('embla-carousel-react');
12
+ var De = require('@radix-ui/react-collapsible');
13
13
  var reactHookForm = require('react-hook-form');
14
- var De = require('@radix-ui/react-radio-group');
15
- var N = require('@radix-ui/react-select');
16
- var ao = require('@radix-ui/react-checkbox');
14
+ var $e = require('@radix-ui/react-radio-group');
15
+ var z = require('@radix-ui/react-select');
16
+ var so = require('@radix-ui/react-checkbox');
17
+ var reactDom = require('react-dom');
17
18
  var reactRemoveScroll = require('react-remove-scroll');
18
19
  var react$1 = require('@floating-ui/react');
19
- var reactDom = require('react-dom');
20
- var re = require('@radix-ui/react-popover');
20
+ var ae = require('@radix-ui/react-popover');
21
21
 
22
22
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
23
23
 
@@ -39,26 +39,26 @@ function _interopNamespace(e) {
39
39
  return Object.freeze(n);
40
40
  }
41
41
 
42
- var j__namespace = /*#__PURE__*/_interopNamespace(j);
43
- var ko__namespace = /*#__PURE__*/_interopNamespace(ko);
44
- var sn__default = /*#__PURE__*/_interopDefault(sn);
45
- var yn__default = /*#__PURE__*/_interopDefault(yn);
42
+ var X__namespace = /*#__PURE__*/_interopNamespace(X);
43
+ var Eo__namespace = /*#__PURE__*/_interopNamespace(Eo);
44
+ var mn__default = /*#__PURE__*/_interopDefault(mn);
45
+ var Sn__default = /*#__PURE__*/_interopDefault(Sn);
46
46
  var js__namespace = /*#__PURE__*/_interopNamespace(js);
47
- var ai__default = /*#__PURE__*/_interopDefault(ai);
48
- var ke__namespace = /*#__PURE__*/_interopNamespace(ke);
47
+ var ui__default = /*#__PURE__*/_interopDefault(ui);
49
48
  var De__namespace = /*#__PURE__*/_interopNamespace(De);
50
- var N__namespace = /*#__PURE__*/_interopNamespace(N);
51
- var ao__namespace = /*#__PURE__*/_interopNamespace(ao);
52
- var re__namespace = /*#__PURE__*/_interopNamespace(re);
49
+ var $e__namespace = /*#__PURE__*/_interopNamespace($e);
50
+ var z__namespace = /*#__PURE__*/_interopNamespace(z);
51
+ var so__namespace = /*#__PURE__*/_interopNamespace(so);
52
+ var ae__namespace = /*#__PURE__*/_interopNamespace(ae);
53
53
 
54
- var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnPropertyDescriptors;var Xe=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable;var rt=(e,o,t)=>o in e?nt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))it.call(o,t)&&rt(e,t,o[t]);if(Xe)for(var t of Xe(o))at.call(o,t)&&rt(e,t,o[t]);return e},l=(e,o)=>Qr(e,en(o));var on=(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)it.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Xe)for(var n of Xe(e))o.indexOf(n)<0&&at.call(e,n)&&(t[n]=e[n]);return t};var ie=(e,o)=>{for(var t in o)nt(e,t,{get:o[t],enumerable:!0});};var M=(e,o,t)=>new Promise((n,r)=>{var i=d=>{try{s(t.next(d));}catch(u){r(u);}},p=d=>{try{s(t.throw(d));}catch(u){r(u);}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,p);s((t=t.apply(e,o)).next());});function ve(e){return jsxRuntime.jsx("svg",l(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 lt={borderWidths:{md:"1px"}};var Je=[5,10,20,35,50,65,80,95,98],pt=[...Je],wo=[...Je];pt[4]=40;wo[4]=60;var tn={blue:{h:213,s:100,l:Je},gray:{h:220,s:10,l:Je},green:{h:141,s:90,l:pt},red:{h:9,s:90,l:wo},yellow:{h:50,s:90,l:wo}};var W={};for(let[e,{h:o,s:t,l:n}]of Object.entries(tn))W[e]=Object.fromEntries(n.map((r,i)=>[`${(i+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var dt=l(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 ct={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,ut={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 mt={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var rn="px",nn=e=>typeof e=="number"?`${4*e}${rn}`:e,an=[-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"],ft=Object.fromEntries(an.map(e=>[e,nn(e)]));var gt={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 qe=l(a(l(a({},lt),{colors:a(a({},dt),ut)}),gt),{radii:ct,shadows:mt,space:ft});function Me(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let p=`${o.length?`${o}${t}`:""}${r}`,s=e[r];return typeof s=="object"&&s!==null&&!Array.isArray(s)?Object.assign(n,Me(s,p,t)):n[p]=s,n},{})}function Fo(e){let o=Me(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 yt(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]=yt(r,`${o}-${n}`):t[n]=`var(${o}-${i})`;}),t}var vo=Fo(qe),O=yt(qe);var ln=new Set(["alt","size","src"]),pn=sn__default.default.all.filter(e=>e.indexOf("-")!=0&&!ln.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),dn=Object.fromEntries(pn),Ze=Me(O.colors),cn={color:Ze,backgroundColor:Ze,borderColor:Ze,border:a(a({},O.borderWidths),Ze),borderRadius:O.radii,borderWidth:O.borderWidths,boxShadow:O.shadows,fontFamily:O.fontFamilies,fontSize:O.fontSizes,fontWeight:O.fontWeights,gap:O.space,lineHeight:O.lineHeights,margin:O.space,marginBottom:O.space,marginLeft:O.space,marginRight:O.space,marginTop:O.space,padding:O.space,paddingBottom:O.space,paddingLeft:O.space,paddingRight:O.space,paddingTop:O.space},xt=a(a({},dn),cn),ht={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"]},bt=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function un(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 Pt=new Map(Object.entries(xt).map(([e,o])=>[e,un(o)])),mn=new Map(Object.entries(ht).map(([e,o])=>[e,new Set(o)])),fn=new Set(["height","width"]),gn=new Set(["canvas","embed","iframe","img","input","object","video"]);function Ct(e){let[o,t]=e.split(":");return [o,bt.has(t)?t:null]}function St(e,o="div"){let t=Object.assign({},e),n={};function r(i){if(i==null)return n;let s=`&:${i.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[s]==null&&(n[s]={}),n[s]}return Object.entries(t).forEach(([i,p])=>{let[s,d]=Ct(i),u=mn.get(s);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=p;}),delete t[i]);}),Object.entries(t).forEach(([i,p])=>{let[s,d]=Ct(i),u=Pt.get(s);if(u!=null){if(p==null)delete t[i];else if(typeof p=="string"&&p.indexOf(" ")>-1){let m=p.split(" ");r(d)[s]=m.map(g=>{var b;return (b=u.get(g.toString()))!=null?b:g}).join(" ");}else u.has(p.toString())?r(d)[s]=u.get(p.toString()):r(d)[s]=p;(typeof o!="string"||!gn.has(o)||!fn.has(s))&&delete t[i];}}),Object.keys(t).forEach(i=>{let p=i.substring(1);i.indexOf("_")===0&&Pt.has(p)&&(t[p]=t[i],delete t[i]);}),{cssFromProps:n,unmatchedProps:t}}function xn(){if(typeof window=="undefined"){let{JSDOM:e}=on("jsdom");return new e("<!DOCTYPE html>").window}return window}function wt(e){return e?{__html:yn__default.default(xn()).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 bn(e){return e&&`fr-${e}`}function Rt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Rt(o)).join(" "):bn(e))}function Pn(s,p){var d=s,{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}=St(i,u),b=Rt(r),x=t||b?clsx.clsx(t,b):void 0,T=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsxRuntime.jsx(u,l(a({className:x,css:T},g),{ref:p,dangerouslySetInnerHTML:wt(o)})):jsxRuntime.jsx(u,l(a({className:x,css:T},g),{ref:p,children:o}))}var y=ko__namespace.forwardRef(Pn);var D={};ie(D,{Link:()=>Jn,Plain:()=>qn,Primary:()=>jn,Secondary:()=>Xn});var F={};ie(F,{Body1:()=>Mn,Body2:()=>Wn,Caption:()=>Vn,Display1:()=>On,Display2:()=>Dn,H1:()=>In,H2:()=>Hn,H3:()=>$n,H4:()=>An});var Ro={};ie(Ro,{Body1:()=>Bn,Body2:()=>Tn,Caption:()=>kn,Display1:()=>Cn,Display2:()=>Sn,H1:()=>wn,H2:()=>Fn,H3:()=>vn,H4:()=>Rn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},Cn=l(a({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Sn=l(a({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),wn=l(a({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Fn=l(a({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),vn=l(a({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Rn=l(a({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Bn=l(a({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Tn=l(a({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),kn=l(a({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var En=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(En.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=ko__namespace.forwardRef((s,p)=>{var d=s,{as:n=o,children:r}=d,i=f(d,["as","children"]);return jsxRuntime.jsx(y,l(a(a({as:n},Ro[e]),i),{ref:p,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),On=se.Display1,Dn=se.Display2,In=se.H1,Hn=se.H2,$n=se.H3,An=se.H4,Mn=se.Body1,Wn=se.Body2,Vn=se.Caption;var To={};ie(To,{Link:()=>Un,Plain:()=>Gn,Primary:()=>zn,Secondary:()=>_n,loadingCSSStyle:()=>Bo});var Ye={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},zn=l(a({},Ye),{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"}),_n=l(a({},Ye),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Un=l(a({},Ye),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Gn=l(a({},Ye),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Kn=react.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:Kn+" 1s ease infinite"}};function Qe(p){var s=p,{as:e,children:o,part:t,title:n,variant:r="Primary"}=s,i=f(s,["as","children","part","title","variant"]);var u;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(y,l(a(l(a({as:e!=null?e:"button",part:[`button-${d}`,t]},To[r]),{css:a(a({},(u=i.css)!=null?u:{}),i.loading?Bo:{})}),i),{loading:void 0,children:[o,n&&jsxRuntime.jsx(F.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function jn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(a({},o),{variant:"Primary",children:e}))}function Xn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(a({},o),{variant:"Secondary",children:e}))}function Jn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(a({},o),{variant:"Link",children:e}))}function qn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(a({},o),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>Qn,Row:()=>Yn});var Yn=ko__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(a({display:"flex",flexDirection:"row"},e),{ref:o}))),Qn=ko__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(a({display:"flex",flexDirection:"column"},e),{ref:o})));function Eo(r){var i=r,{dismissible:e,flowId:o,part:t}=i,n=f(i,["dismissible","flowId","part"]);return jsxRuntime.jsx(_,l(a({as:null,flowId:o},n),{children:({handleDismiss:p,handlePrimary:s,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var v,B,w,P,C;let g=(v=m.props)!=null?v:{},b=(w=(B=m.primaryButton)==null?void 0:B.title)!=null?w:m.primaryButtonTitle,x=(C=(P=m.secondaryButton)==null?void 0:P.title)!=null?C:m.secondaryButtonTitle,T=m.$state.blocked;return jsxRuntime.jsxs(h,l(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&&jsxRuntime.jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(S.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(h.Title,{part:"title",children:m.title}),jsxRuntime.jsx(h.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsxRuntime.jsx(h.Secondary,{disabled:T,title:x,onClick:d}),jsxRuntime.jsx(h.Primary,{disabled:T,title:b,onClick:s}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:p})]}))}}))}var ro={};ie(ro,{Carousel:()=>Kt,Collapsible:()=>to,CollapsibleStep:()=>Le});var Pe={};ie(Pe,{Bar:()=>Re,Dots:()=>Dt,Fraction:()=>Be,Segments:()=>eo});function Re(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=o>0?Math.min(e/o,1):0,p=i===0?"10px":`${100*i}%`;return jsxRuntime.jsx(y,l(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:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function Dt(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((p,s)=>jsxRuntime.jsx(y,{as:"circle",cx:4+16*s,cy:"4px",fill:e-1===s?O.colors.blue500:O.colors.blue800,part:["progress-dot",e-1===s?"progress-dot-filled":null],r:4},s));return jsxRuntime.jsx(y,l(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 Be(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsxRuntime.jsx(F.Body2,l(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 eo(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let i=[...Array(o)].map((p,s)=>jsxRuntime.jsx(y,{backgroundColor:e-1>=s?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===s?"progress-segment-filled":null]},s));return jsxRuntime.jsx(S.Row,l(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 $t(e){return jsxRuntime.jsx("svg",l(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsxRuntime.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 oi(){return jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function At(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsxRuntime.jsx(y,l(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&&jsxRuntime.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:jsxRuntime.jsx(oi,{})})}))}function le(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=ko.useContext(V),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:ko.useCallback((i,p,s=!0)=>M(this,null,function*(){if((yield o==null?void 0:o(e,i,p))===!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(p,s):u!==!1&&(yield e.complete(p,s)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(p,s),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:ko.useCallback((i,p)=>M(this,null,function*(){if((yield t==null?void 0:t(e,i,p))===!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(p),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(p),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Wt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:n,handleSecondary:r}=le(t,{onPrimary:e,onSecondary:o}),{blocked:i,completed:p,skipped:s}=t.$state,d=p||s||!i?jsxRuntime.jsx(At,{checked:p||s,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:$t,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.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:[jsxRuntime.jsxs(S.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(h.Title,{children:t.title}),jsxRuntime.jsx(h.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(S.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:[jsxRuntime.jsx(h.Secondary,{disabled:i,onClick:r,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(h.Primary,{disabled:i,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function Lt(e){return jsxRuntime.jsx("svg",l(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 zt(e){return jsxRuntime.jsx("svg",l(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 _t=react.keyframes`
54
+ var it=Object.defineProperty,an=Object.defineProperties;var sn=Object.getOwnPropertyDescriptors;var Je=Object.getOwnPropertySymbols;var at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var nt=(e,o,t)=>o in e?it(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,a=(e,o)=>{for(var t in o||(o={}))at.call(o,t)&&nt(e,t,o[t]);if(Je)for(var t of Je(o))st.call(o,t)&&nt(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)at.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&&st.call(e,n)&&(t[n]=e[n]);return t};var pe=(e,o)=>{for(var t in o)it(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 jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 pt={borderWidths:{md:"1px"}};var qe=[5,10,20,35,50,65,80,95,98],dt=[...qe],Fo=[...qe];dt[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:dt},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 ct=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 ut={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,mt={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 ft={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"],gt=Object.fromEntries(un.map(e=>[e,cn(e)]));var yt={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({},pt),{colors:a(a({},ct),mt)}),yt),{radii:ut,shadows:ft,space:gt});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 xt(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]=xt(r,`${o}-${n}`):t[n]=`var(${o}-${i})`;}),t}var Ro=vo(Ze),E=xt(Ze);var fn=new Set(["alt","size","src"]),gn=mn__default.default.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},ht=a(a({},yn),xn),bt={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"]},Pt=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 Ct=new Map(Object.entries(ht).map(([e,o])=>[e,hn(o)])),bn=new Map(Object.entries(bt).map(([e,o])=>[e,new Set(o)])),Pn=new Set(["height","width"]),Cn=new Set(["canvas","embed","iframe","img","input","object","video"]);function St(e){let[o,t]=e.split(":");return [o,Pt.has(t)?t:null]}function wt(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]=St(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]=St(i),u=Ct.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&&Ct.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 Ft(e){return e?{__html:Sn__default.default(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 Tt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Tt(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}=wt(i,u),b=Tt(r),h=t||b?clsx.clsx(t,b):void 0,P=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsxRuntime.jsx(u,p(a({className:h,css:P},g),{ref:s,dangerouslySetInnerHTML:Ft(o)})):jsxRuntime.jsx(u,p(a({className:h,css:P},g),{ref:s,children:o}))}var y=Eo__namespace.forwardRef(Rn);var I={};pe(I,{Link:()=>oi,Plain:()=>ti,Primary:()=>Qn,Secondary:()=>ei});var R={};pe(R,{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__namespace.forwardRef((l,s)=>{var d=l,{as:n=o,children:r}=d,i=f(d,["as","children"]);return jsxRuntime.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=react.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 jsxRuntime.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&&jsxRuntime.jsx(R.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 jsxRuntime.jsx(eo,p(a({},o),{variant:"Primary",children:e}))}function ei(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Secondary",children:e}))}function oi(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Link",children:e}))}function ti(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,p(a({},o),{variant:"Plain",children:e}))}var C={};pe(C,{Column:()=>ii,Row:()=>ni});var ni=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,p(a({display:"flex",flexDirection:"row"},e),{ref:o}))),ii=Eo__namespace.forwardRef((e,o)=>jsxRuntime.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 jsxRuntime.jsx(U,p(a({as:null,flowId:o},n),{children:({handleDismiss:s,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var T,B,S,w,v;let g=(T=m.props)!=null?T:{},b=(S=(B=m.primaryButton)==null?void 0:B.title)!=null?S:m.primaryButtonTitle,h=(v=(w=m.secondaryButton)==null?void 0:w.title)!=null?v:m.secondaryButtonTitle,P=m.$state.blocked;return jsxRuntime.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&&jsxRuntime.jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(C.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(x.Title,{part:"title",children:m.title}),jsxRuntime.jsx(x.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsxRuntime.jsx(x.Secondary,{disabled:P,title:h,onClick:d}),jsxRuntime.jsx(x.Primary,{disabled:P,title:b,onClick:l}),e&&jsxRuntime.jsx(x.Dismiss,{onClick:s})]}))}}))}var no={};pe(no,{Carousel:()=>jt,Collapsible:()=>ro,CollapsibleStep:()=>ze});var Ce={};pe(Ce,{Bar:()=>ke,Dots:()=>It,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 jsxRuntime.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:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function It(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)=>jsxRuntime.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 jsxRuntime.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 jsxRuntime.jsx(R.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)=>jsxRuntime.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 jsxRuntime.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 At(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsxRuntime.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 jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Mt(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsxRuntime.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&&jsxRuntime.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:jsxRuntime.jsx(si,{})})}))}function ue(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=Eo.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:Eo.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:Eo.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 Vt({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?jsxRuntime.jsx(Mt,{checked:s||l,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:At,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.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:[jsxRuntime.jsxs(C.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(x.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(x.Title,{children:t.title}),jsxRuntime.jsx(x.Subtitle,{children:t.subtitle}),jsxRuntime.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:[jsxRuntime.jsx(x.Secondary,{disabled:i,onClick:r,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(x.Primary,{disabled:i,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function Nt(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 _t(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 Ut=react.keyframes`
55
55
  from {
56
56
  opacity: 0;
57
57
  }
58
58
  to {
59
59
  opacity: 1;
60
60
  }
61
- `;function Ut({flow:e,sort:o,onPrimary:t,onSecondary:n}){var v,B;let[r,i]=ko.useState(),[p]=ko.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(B=(v=Array.from(e.steps.values()).find(w=>!w.$state.completed&&!w.$state.skipped))==null?void 0:v.order)!=null?B:0}),[s,d]=ai__default.default(p),[u,m]=ko.useState(),[g,b]=ko.useState();ko.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),ko.useEffect(()=>{if(!r){let w=Array.from(e.steps.values()),P=w.filter(R=>R.$state.completed||R.$state.skipped).sort((R,k)=>R.order-k.order),C=w.filter(R=>!R.$state.completed&&!R.$state.skipped).sort((R,k)=>R.order-k.order);i(o==="completed-last"?[...C,...P].map(R=>R.id):w.map(R=>R.id));}},[]);let x=e.getNumberOfCompletedSteps(),T=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:O.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(S.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(F.H3,{children:e.title}),jsxRuntime.jsx(F.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",part:"progress-text",children:[x,"/",T]}),jsxRuntime.jsx(Re,{current:x,total:T,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${O.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:s,children:[jsxRuntime.jsx(S.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(w=>w.$state.visible).sort((w,P)=>r.indexOf(w.id)-r.indexOf(P.id)).map(w=>jsxRuntime.jsx(Wt,{onPrimary:t,onSecondary:n,step:w},w.id))}),g&&jsxRuntime.jsx(S.Column,{animation:`${_t} 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:jsxRuntime.jsx(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(zt,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(S.Column,{animation:`${_t} 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:jsxRuntime.jsx(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Lt,{height:"24px",width:"24px"})})})]})]}):null}function Kt(o){var e=f(o,[]);return jsxRuntime.jsx(_,l(a({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(Ut,a(a({},e),t))}))}var Le={};ie(Le,{Content:()=>Io,Root:()=>Ho,Trigger:()=>$o});function Xt(e){return jsxRuntime.jsx("svg",l(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:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var li=react.keyframes`
61
+ `;function Gt({flow:e,sort:o,onPrimary:t,onSecondary:n}){var T,B;let[r,i]=Eo.useState(),[s]=Eo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(B=(T=Array.from(e.steps.values()).find(S=>!S.$state.completed&&!S.$state.skipped))==null?void 0:T.order)!=null?B:0}),[l,d]=ui__default.default(s),[u,m]=Eo.useState(),[g,b]=Eo.useState();Eo.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),Eo.useEffect(()=>{if(!r){let S=Array.from(e.steps.values()),w=S.filter(F=>F.$state.completed||F.$state.skipped).sort((F,O)=>F.order-O.order),v=S.filter(F=>!F.$state.completed&&!F.$state.skipped).sort((F,O)=>F.order-O.order);i(o==="completed-last"?[...v,...w].map(F=>F.id):S.map(F=>F.id));}},[]);let h=e.getNumberOfCompletedSteps(),P=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:E.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(C.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(R.H3,{children:e.title}),jsxRuntime.jsx(R.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(R.Body2,{fontWeight:"demibold",part:"progress-text",children:[h,"/",P]}),jsxRuntime.jsx(ke,{current:h,total:P,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${E.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsxRuntime.jsx(C.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(S=>S.$state.visible).sort((S,w)=>r.indexOf(S.id)-r.indexOf(w.id)).map(S=>jsxRuntime.jsx(Vt,{onPrimary:t,onSecondary:n,step:S},S.id))}),g&&jsxRuntime.jsx(C.Column,{animation:`${Ut} 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:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(_t,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(C.Column,{animation:`${Ut} 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:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Nt,{height:"24px",width:"24px"})})})]})]}):null}function jt(o){var e=f(o,[]);return jsxRuntime.jsx(U,p(a({as:x,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(Gt,a(a({},e),t))}))}var ze={};pe(ze,{Content:()=>Ho,Root:()=>$o,Trigger:()=>Ao});function Jt(e){return jsxRuntime.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:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var fi=react.keyframes`
62
62
  from {
63
63
  height: 0;
64
64
  opacity: 0;
@@ -67,7 +67,7 @@ var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnProp
67
67
  height: var(--radix-collapsible-content-height);
68
68
  opacity: 1;
69
69
  }
70
- `,pi=react.keyframes`
70
+ `,gi=react.keyframes`
71
71
  from {
72
72
  height: var(--radix-collapsible-content-height);
73
73
  opacity: 1;
@@ -76,7 +76,14 @@ var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnProp
76
76
  height: 0;
77
77
  opacity: 0;
78
78
  }
79
- `,di=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function ci({checked:e=!1}){return jsxRuntime.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&&jsxRuntime.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:jsxRuntime.jsx(di,{})})})}function Io({children:e}){return jsxRuntime.jsx(ke__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${li} 300ms ease-out`},'&[data-state="closed"]':{animation:`${pi} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function Ho(i){var p=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=p,r=f(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(ke__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(h,l(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function $o({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(ke__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(S.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:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(ci,{checked:e}),jsxRuntime.jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:Xt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var qt=ko.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Zt({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var T,v,B,w,P,C;let{$state:{blocked:i,completed:p,skipped:s},subtitle:d,title:u}=r,m=(v=(T=r.primaryButton)==null?void 0:T.title)!=null?v:r.primaryButtonTitle,g=(w=(B=r.secondaryButton)==null?void 0:B.title)!=null?w:r.secondaryButtonTitle,b=(P=r.props)!=null?P:{},x=!!i;return jsxRuntime.jsxs(Ho,l(a({open:t,onOpenChange:n},b),{children:[jsxRuntime.jsx($o,{isBlocked:r.$state.blocked,isCompleted:p||s,title:u}),jsxRuntime.jsxs(Io,{children:[jsxRuntime.jsx(h.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(C=r.videoUri)!=null?C:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(S.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(h.Secondary,{title:g,onClick:o}),jsxRuntime.jsx(h.Primary,{disabled:x,title:m,onClick:e})]})]})]}))}var gi={default:Zt};function yi(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var v;let{onPrimary:i,onSecondary:p,openStepId:s,setOpenStepId:d,stepTypes:u}=ko.useContext(qt),{handlePrimary:m,handleSecondary:g}=le(o,{onPrimary:i,onSecondary:p}),b=(s!=null?s:e.getCurrentStep().id)===o.id,x=(v=u[o.type])!=null?v:Zt;function T(B){return M(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(x,l(a({flow:e,onOpenChange:T,open:b,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function to(s){var d=s,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:i={}}=d,p=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=ko.useState(null),g=a(a({},gi),i);return jsxRuntime.jsx(qt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(_,l(a({as:h,borderWidth:"md",flowId:o,part:["checklist",r]},p),{children:v=>{var B=v,{flow:b,handleDismiss:x}=B,T=f(B,["flow","handleDismiss"]);let P=Array.from(b.steps.entries()).filter(([,k])=>k.$state.visible===!0).map(([,k])=>jsxRuntime.jsx(yi,l(a({flow:b,handleDismiss:x},T),{step:k}),k.id)),C=b.getNumberOfCompletedSteps(),R=b.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(h.Header,{dismissible:e,handleDismiss:x,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",children:[C,"/",R]}),jsxRuntime.jsx(Re,{current:C,total:R,flexGrow:1})]})]}),P]})}}))})}var vi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Ri({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.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(([s])=>vi.has(s))),p=reactHookForm.useController({name:t.id,control:o,rules:i});return jsxRuntime.jsx(e,l(a({},p),{fieldData:t,formContext:r,submit:n}))}function er({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:i}){var C,R,k,$,L;let{__readOnly:p}=ko.useContext(V),s=ko.useMemo(()=>{var E,I;return (I=(E=i.fields)==null?void 0:E.filter(A=>e[A.type]!=null&&A.id))!=null?I:[]},[i.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:s.reduce((E,I)=>{var A;return E[I.id]=(A=I.value)!=null?A:"",E},{})});ko.useEffect(()=>{d.formState.isDirty||d.reset(s.reduce((E,I)=>{var A;return E[I.id]=(A=I.value)!=null?A:"",E},{}));},[s]);let[u,m]=ko.useState(!1),g=[],{control:b,handleSubmit:x}=d,T=(C=i.props)!=null?C:{};function v(E,I){m(!0),t(I,E,p===!0).then(()=>m(!1));}s.forEach(E=>{e[E.type]!=null&&g.push(jsxRuntime.jsx(Ri,{control:b,fieldComponent:e[E.type],fieldData:E,submit:x(v)},`${i.flow.id}-${E.id}`));});let B=(k=(R=i.primaryButton)==null?void 0:R.title)!=null?k:i.primaryButtonTitle,w=(L=($=i.secondaryButton)==null?void 0:$.title)!=null?L:i.secondaryButtonTitle,P=!!(i.$state.blocked||!d.formState.isValid);return ko.useEffect(()=>{d.clearErrors();},[i]),jsxRuntime.jsxs(S.Column,l(a({gap:5,part:"form-step"},T),{children:[jsxRuntime.jsx(h.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsxRuntime.jsx(reactHookForm.FormProvider,l(a({},d),{children:g})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsxRuntime.jsx(D.Secondary,{onClick:n,title:w}),jsxRuntime.jsx(D.Primary,{disabled:P||u,onClick:x(v),title:B!=null?B:"Submit",loading:u})]},`form-footer-${i.id}`)]}))}function or({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(F.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Ao({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Mo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Ne=l(a({},Mo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),no={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 Y({children:e,field:o,fieldData:t,fieldState:n}){var m;let{id:r,label:i,placeholder:p,props:s}=t,{error:d}=n,u=a(l(a(a(a({id:r},o),p?{placeholder:p}:{}),Ne),{"aria-invalid":!!d,value:(m=o.value)!=null?m:""}),s);return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Ao,{id:r,required:!!t.required,children:i}),e(u),jsxRuntime.jsx(or,{error:d})]})}function Oe(e){return jsxRuntime.jsx("svg",l(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 Oi=ko__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.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:[jsxRuntime.jsx(F.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(De__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.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:jsxRuntime.jsx(y,l(a({as:De__namespace.Indicator},no),{children:jsxRuntime.jsx(Oe,{height:"14",width:"14"})}))})})]}));function Wo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:i,value:p})=>jsxRuntime.jsx(Oi,{value:p,label:i},p));return jsxRuntime.jsx(Y,l(a({},e),{children:()=>jsxRuntime.jsx(De__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function io(e){return jsxRuntime.jsx("svg",l(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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 sr(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,i]=ko__namespace.useState([]);function p(s){let d=[];r.includes(s)?d=[...r.filter(u=>u!==s)]:d=[...r,s],i(d),o(d);}return jsxRuntime.jsx(Y,l(a({},e),{children:()=>jsxRuntime.jsx(S.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:s,value:d})=>jsxRuntime.jsx(ao__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>p(d),asChild:!0,children:jsxRuntime.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:[jsxRuntime.jsx(F.Body2,{part:"field-check-label",children:s}),jsxRuntime.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:jsxRuntime.jsx(ao__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,l(a({},no),{children:jsxRuntime.jsx(Oe,{height:"14",width:"14"})}))})})]})},d))})}))}var Hi=ko__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(N__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(N__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(F.Body2,{part:"field-select-option-label",children:e})})})}));function Vo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,i=n.map(({label:p,value:s})=>jsxRuntime.jsx(Hi,{value:s,label:p},s));return e.fieldData.multiple?jsxRuntime.jsx(sr,a({},e)):jsxRuntime.jsx(Y,l(a({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(F.Body2,l(a({},Ne),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(N__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(N__namespace.Icon,{children:jsxRuntime.jsx(y,{as:io,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(N__namespace.Portal,{children:jsxRuntime.jsx(N__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,l(a({},Ne),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsxRuntime.jsx(N__namespace.Viewport,{children:i})}))})})]})}))}function Lo(e){return jsxRuntime.jsx(Y,l(a({},e),{children:o=>jsxRuntime.jsx(F.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function No(e){return jsxRuntime.jsx(Y,l(a({},e),{children:o=>jsxRuntime.jsx(F.Body2,a({as:"textarea",part:"field-textarea"},o))}))}function ur(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:i=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(ao__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,l(a({},Mo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:i,children:jsxRuntime.jsx(ao__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(Oe,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(F.Body2,{part:"field-checkbox-label",as:"label",htmlFor:i,children:r})]})}var Ai={checkbox:ur,radio:Wo,select:Vo,text:Lo,textarea:No};function He(r){var i=r,{fieldTypes:e={},flowId:o,part:t}=i,n=f(i,["fieldTypes","flowId","part"]);let p=Object.assign({},Ai,e);return jsxRuntime.jsx(_,l(a({flowId:o,part:["form",t]},n),{children:s=>jsxRuntime.jsx(er,a({fieldTypes:p},s))}))}var po={};ie(po,{NPS:()=>_e});function gr({field:e,fieldData:o,submit:t}){var r,i;let n=[...Array(11)].map((p,s)=>{let d=e.value===s?D.Primary:D.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(s),t();},title:`${s}`,css:{".fr-button-title":{fontSize:"15px"}}},s)});return jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(F.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(i=o.positiveLabel)!=null?i:"Extremely likely"})]})]})}function _e(i){var p=i,{as:e=H,flowId:o,fieldTypes:t,part:n}=p,r=f(p,["as","flowId","fieldTypes","part"]);var d;let{flow:s}=we(o);return jsxRuntime.jsx(He,l(a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:gr},t),modal:!1,onEscapeKeyDown:u=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(u),u.defaultPrevented||s.skip();},part:["nps",n]},r),{css:a({},a(l(a({},!s||s.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 Vi(r,n){var i=r,{children:e,part:o}=i,t=f(i,["children","part"]);return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:n,children:jsxRuntime.jsx(y,l(a({backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"absolute"},t),{children:e}))})}var co=ko__namespace.forwardRef(Vi);var Ni=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function br(n){var r=n,{clickable:e=!1,part:o=""}=r,t=f(r,["clickable","part"]);return jsxRuntime.jsxs(y,l(a({borderRadius:"24px",height:"24px",part:`ping-wrapper ${o}`,position:"relative",width:"24px",cursor:e?"pointer":void 0},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${Ni}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.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 ji({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:i,y2:p}){return t>0?`path("${[`M${n+t},${i}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${i+t}`,`V${p-t}`,`A${t} ${t} 0,0,1 ${r-t} ${p}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${p-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${i+t}`,`A${t} ${t} 0,0,1 ${n+t} ${i}`,"Z"].join(" ")}")`:`path("M${n},${i} H${r} V${p} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function Xi(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 zo(r){var i=r,{anchor:e,part:o,style:t={}}=i,n=f(i,["anchor","part","style"]);let[p,s]=ko.useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=react$1.useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:m}){return s({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:Xi(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:react$1.autoUpdate});return ko.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]),jsxRuntime.jsx(co,a({part:["spotlight",o],ref:d.setFloating,style:a({clipPath:ji(p)},t)},n))}function Pr({align:e,side:o}){let t={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return t[r[o]]=n,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=n:t.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=n:t.top=n:["top","bottom"].includes(o)?t.left=`calc(50% + ${n})`:t.top=`calc(50% + ${n})`,t}function Sr(e,o){try{if(e.matches(o)&&wr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&wr(t[0]))return t[0]}catch(t){return null}}function wr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Fr(e){let[o,t]=ko.useState(null);return ko.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&t(n);}catch(n){}},[e]),ko.useEffect(()=>{let n=new MutationObserver(r=>{for(let i of r)if(i.type==="childList"){for(let p of i.addedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;let s=Sr(p,e);if(s!=null){t(s);break}}for(let p of i.removedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;if(Sr(p,e)!=null){t(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:o}}function sa(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function vr({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:i,sideOffset:p}){let s=`${i}-${sa(e)}`;function d({rects:R}){let k={alignmentAxis:o,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(i)?k.alignmentAxis=o-R.floating.width:k.alignmentAxis=o-R.floating.height),k}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,o,i,p]),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:s,whileElementsMounted:react$1.autoUpdate}),x=react$1.useClick(u),T=react$1.useDismiss(u,{outsidePress:!1}),v=react$1.useRole(u),{getFloatingProps:B,getReferenceProps:w}=react$1.useInteractions([x,T,v]),{anchorElement:P}=Fr(t);ko.useEffect(()=>{P!=null?b.setReference(P):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[P]);let C=g.split("-");return e==="before"?C[1]=C[1]==="end"?"after":"before":e==="after"&&(C[1]=C[1]==="start"?"before":"after"),{context:u,getFloatingProps:B,getReferenceProps:w,floatingStyles:m,placement:C.join("-"),refs:b}}function Uo(T){var v=T,{align:e="center",alignOffset:o=0,anchor:t,children:n,defaultOpen:r=!0,modal:i=!1,onOpenChange:p=()=>{},open:s,part:d,side:u="bottom",sideOffset:m=0,spotlight:g=!1,style:b={}}=v,x=f(v,["align","alignOffset","anchor","children","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[B,w]=ko.useState(r),P=s!=null?s:B,{getFloatingProps:C,getReferenceProps:R,floatingStyles:k,placement:$,refs:L}=vr({align:e,alignOffset:o,anchor:t,onOpenChange:he=>{p(he),s==null&&w(he);},open:P,side:u,sideOffset:m}),[E,I]=$.split("-"),A=R();return L.reference.current==null?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&P&&jsxRuntime.jsx(zo,{anchor:t}),i&&!g&&P&&jsxRuntime.jsx(co,{lockScroll:!0}),jsxRuntime.jsxs(y,l(a(a({part:["hint",d],ref:L.setFloating,style:a(a({},k),b)},C()),x),{children:[P&&n,jsxRuntime.jsx(br,l(a({},A),{position:"absolute",style:Pr({align:I,side:E}),clickable:r===!1}))]}))]})}var ca=react.keyframes`
79
+ `,yi=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function xi({checked:e=!1}){return jsxRuntime.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&&jsxRuntime.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:jsxRuntime.jsx(yi,{})})})}function Ho({children:e}){return jsxRuntime.jsx(De__namespace.Content,{asChild:!0,children:jsxRuntime.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:[jsxRuntime.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 jsxRuntime.jsx(De__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.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 jsxRuntime.jsx(De__namespace.Trigger,{asChild:!0,children:jsxRuntime.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:[jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(xi,{checked:e}),jsxRuntime.jsx(R.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:Jt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Zt=Eo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Yt({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var P,T,B,S,w,v;let{$state:{blocked:i,completed:s,skipped:l},subtitle:d,title:u}=r,m=(T=(P=r.primaryButton)==null?void 0:P.title)!=null?T:r.primaryButtonTitle,g=(S=(B=r.secondaryButton)==null?void 0:B.title)!=null?S:r.secondaryButtonTitle,b=(w=r.props)!=null?w:{},h=!!i;return jsxRuntime.jsxs($o,p(a({open:t,onOpenChange:n},b),{children:[jsxRuntime.jsx(Ao,{isBlocked:r.$state.blocked,isCompleted:s||l,title:u}),jsxRuntime.jsxs(Ho,{children:[jsxRuntime.jsx(x.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(v=r.videoUri)!=null?v:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(x.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(C.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(x.Secondary,{title:g,onClick:o}),jsxRuntime.jsx(x.Primary,{disabled:h,title:m,onClick:e})]})]})]}))}var Ci={default:Yt};function Si(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var T;let{onPrimary:i,onSecondary:s,openStepId:l,setOpenStepId:d,stepTypes:u}=Eo.useContext(Zt),{handlePrimary:m,handleSecondary:g}=ue(o,{onPrimary:i,onSecondary:s}),b=(l!=null?l:e.getCurrentStep().id)===o.id,h=(T=u[o.type])!=null?T:Yt;function P(B){return W(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.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]=Eo.useState(null),g=a(a({},Ci),i);return jsxRuntime.jsx(Zt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(U,p(a({as:x,borderWidth:"md",flowId:o,part:["checklist",r]},s),{children:T=>{var B=T,{flow:b,handleDismiss:h}=B,P=f(B,["flow","handleDismiss"]);let w=Array.from(b.steps.entries()).filter(([,O])=>O.$state.visible===!0).map(([,O])=>jsxRuntime.jsx(Si,p(a({flow:b,handleDismiss:h},P),{step:O}),O.id)),v=b.getNumberOfCompletedSteps(),F=b.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Column,{gap:2,children:[jsxRuntime.jsx(x.Header,{dismissible:e,handleDismiss:h,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(R.Body2,{fontWeight:"demibold",children:[v,"/",F]}),jsxRuntime.jsx(ke,{current:v,total:F,flexGrow:1})]})]}),w]})}}))})}var Oi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Di({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.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=reactHookForm.useController({name:t.id,control:o,rules:i});return jsxRuntime.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 v,F,O,D,M;let{__readOnly:s}=Eo.useContext(L),l=Eo.useMemo(()=>{var k,H;return (H=(k=i.fields)==null?void 0:k.filter(A=>e[A.type]!=null&&A.id))!=null?H:[]},[i.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((k,H)=>{var A;return k[H.id]=(A=H.value)!=null?A:"",k},{})});Eo.useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((k,H)=>{var A;return k[H.id]=(A=H.value)!=null?A:"",k},{}));},[l]);let[u,m]=Eo.useState(!1),g=[],{control:b,handleSubmit:h}=d,P=(v=i.props)!=null?v:{};function T(k,H){m(!0),t(H,k,s===!0).then(()=>m(!1));}l.forEach(k=>{e[k.type]!=null&&g.push(jsxRuntime.jsx(Di,{control:b,fieldComponent:e[k.type],fieldData:k,submit:h(T)},`${i.flow.id}-${k.id}`));});let B=(O=(F=i.primaryButton)==null?void 0:F.title)!=null?O:i.primaryButtonTitle,S=(M=(D=i.secondaryButton)==null?void 0:D.title)!=null?M:i.secondaryButtonTitle,w=!!(i.$state.blocked||!d.formState.isValid);return Eo.useEffect(()=>{d.clearErrors();},[i]),jsxRuntime.jsxs(C.Column,p(a({gap:5,part:"form-step"},P),{children:[jsxRuntime.jsx(x.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsxRuntime.jsx(reactHookForm.FormProvider,p(a({},d),{children:g})),jsxRuntime.jsxs(C.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[S&&jsxRuntime.jsx(I.Secondary,{onClick:n,title:S}),jsxRuntime.jsx(I.Primary,{disabled:w||u,onClick:h(T),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?jsxRuntime.jsx(R.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Mo({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(R.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Wo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},_e=p(a({},Wo),{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 jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Mo,{id:r,required:!!t.required,children:i}),e(u),jsxRuntime.jsx(tr,{error:d})]})}function He(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.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:[jsxRuntime.jsx(R.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx($e__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.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:jsxRuntime.jsx(y,p(a({as:$e__namespace.Indicator},io),{children:jsxRuntime.jsx(He,{height:"14",width:"14"})}))})})]}));function Vo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:i,value:s})=>jsxRuntime.jsx(Mi,{value:s,label:i},s));return jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsx($e__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(C.Column,{gap:2,part:"field-radio-group",children:r})})}))}function ao(e){return jsxRuntime.jsx("svg",p(a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.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__namespace.useState([]);function s(l){let d=[];r.includes(l)?d=[...r.filter(u=>u!==l)]:d=[...r,l],i(d),o(d);}return jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsx(C.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsxRuntime.jsx(so__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>s(d),asChild:!0,children:jsxRuntime.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:[jsxRuntime.jsx(R.Body2,{part:"field-check-label",children:l}),jsxRuntime.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:jsxRuntime.jsx(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,p(a({},io),{children:jsxRuntime.jsx(He,{height:"14",width:"14"})}))})})]})},d))})}))}var Li=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(z__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(z__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(R.Body2,{part:"field-select-option-label",children:e})})})}));function Lo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,i=n.map(({label:s,value:l})=>jsxRuntime.jsx(Li,{value:l,label:s},l));return e.fieldData.multiple?jsxRuntime.jsx(lr,a({},e)):jsxRuntime.jsx(te,p(a({},e),{children:()=>jsxRuntime.jsxs(z__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(z__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(R.Body2,p(a({},_e),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(z__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(z__namespace.Icon,{children:jsxRuntime.jsx(y,{as:ao,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(z__namespace.Portal,{children:jsxRuntime.jsx(z__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.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:jsxRuntime.jsx(z__namespace.Viewport,{children:i})}))})})]})}))}function No(e){return jsxRuntime.jsx(te,p(a({},e),{children:o=>jsxRuntime.jsx(R.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function zo(e){return jsxRuntime.jsx(te,p(a({},e),{children:o=>jsxRuntime.jsx(R.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 jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(so__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,p(a({},Wo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:i,children:jsxRuntime.jsx(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(He,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(R.Body2,{part:"field-checkbox-label",as:"label",htmlFor:i,children:r})]})}var zi={checkbox:mr,radio:Vo,select:Lo,text:No,textarea:zo};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 jsxRuntime.jsx(U,p(a({flowId:o,part:["form",t]},n),{children:l=>jsxRuntime.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?I.Primary:I.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),t();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(C.Column,{gap:2,children:[jsxRuntime.jsx(C.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(C.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(R.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(R.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 jsxRuntime.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]=Eo.useState(!1),i=Eo.useRef();return Eo.useEffect(()=>{i.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.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=react.keyframes`
80
+ from {
81
+ opacity: 0;
82
+ }
83
+ to {
84
+ opacity: ${t}
85
+ }
86
+ `;return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:r,children:jsxRuntime.jsx(y,p(a({animation:`${l} 300ms ease-out`,backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",o],position:"fixed"},n),{children:e}))})}var uo=Eo__namespace.forwardRef(qi);var ea=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Sr(r){var i=r,{clickable:e=!1,part:o="",style:t={}}=i,n=f(i,["clickable","part","style"]);let[s,l]=Eo.useState(!1);return Eo.useEffect(()=>{l(!0);},[]),jsxRuntime.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"},n),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${ea}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.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 aa({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:i,y2:s}){return t>0?`path("${[`M${n+t},${i}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${i+t}`,`V${s-t}`,`A${t} ${t} 0,0,1 ${r-t} ${s}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${s-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${i+t}`,`A${t} ${t} 0,0,1 ${n+t} ${i}`,"Z"].join(" ")}")`:`path("M${n},${i} H${r} V${s} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function sa(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 _o(r){var i=r,{anchor:e,part:o,style:t={}}=i,n=f(i,["anchor","part","style"]);let[s,l]=Eo.useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=react$1.useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:m}){return l({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:sa(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:react$1.autoUpdate});return Eo.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]),jsxRuntime.jsx(uo,a({part:["spotlight",o],ref:d.setFloating,style:a({clipPath:aa(s)},t)},n))}function wr({align:e,side:o}){let t={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return t[r[o]]=n,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=n:t.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=n:t.top=n:["top","bottom"].includes(o)?t.left=`calc(50% + ${n})`:t.top=`calc(50% + ${n})`,t}function vr(e,o){try{if(e.matches(o)&&Rr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&Rr(t[0]))return t[0]}catch(t){return null}}function Rr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Tr(e){let[o,t]=Eo.useState(null);return Eo.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&t(n);}catch(n){}},[e]),Eo.useEffect(()=>{let n=new MutationObserver(r=>{for(let i of r)if(i.type==="childList"){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let l=vr(s,e);if(l!=null){t(l);break}}for(let s of i.removedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;if(vr(s,e)!=null){t(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:o}}function Ca(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function Br({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:i,sideOffset:s}){let l=`${i}-${Ca(e)}`;function d({rects:O}){let D={alignmentAxis:o,mainAxis:s};return ["after","before"].includes(e)&&(["bottom","top"].includes(i)?D.alignmentAxis=o-O.floating.width:D.alignmentAxis=o-O.floating.height),D}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,o,i,s]),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:l,whileElementsMounted:react$1.autoUpdate}),h=react$1.useClick(u),P=react$1.useDismiss(u,{outsidePress:!1}),T=react$1.useRole(u),B=react$1.useTransitionStatus(u),{getFloatingProps:S,getReferenceProps:w}=react$1.useInteractions([h,P,T]),{anchorElement:v}=Tr(t);Eo.useEffect(()=>{v!=null?b.setReference(v):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[v]);let F=g.split("-");return e==="before"?F[1]=F[1]==="end"?"after":"before":e==="after"&&(F[1]=F[1]==="start"?"before":"after"),{context:u,getFloatingProps:S,getReferenceProps:w,floatingStyles:m,placement:F.join("-"),refs:b,status:B}}var Uo={height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}};function mo(){let e="DOMRect"in globalThis?new DOMRect:Uo,[o,t]=Eo.useState(e),[n,r]=Eo.useState(null),i=Eo.useCallback(s=>{r(s);},[]);return Eo.useLayoutEffect(()=>{if(!n)return;let s=()=>{let l=n.getBoundingClientRect();t(l);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n]),{node:n,rect:o,ref:i}}function Or(e){let[o,t]=Eo.useState(!1),[n,r]=Eo.useState(Uo),i=n.height>0&&n.width>0;return Eo.useEffect(()=>{if(e==null)return;let s=new IntersectionObserver(l=>{let d=l[0];r(d.boundingClientRect),t(d.isIntersecting);},{root:null});return s.observe(e),()=>{s.disconnect();}},[e]),{isVisible:o&&i}}function Ko(B){var S=B,{align:e="center",alignOffset:o=0,anchor:t,autoScroll:n=!1,children:r,css:i={},defaultOpen:s=!0,modal:l=!1,onOpenChange:d=()=>{},open:u,part:m,side:g="bottom",sideOffset:b=0,spotlight:h=!1,style:P={}}=S,T=f(S,["align","alignOffset","anchor","autoScroll","children","css","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[w,v]=Eo.useState(s),[F,O]=Eo.useState(!1),D=u!=null?u:w,{getFloatingProps:M,getReferenceProps:k,floatingStyles:H,placement:A,refs:J,status:Re}=Br({align:e,alignOffset:o,anchor:t,onOpenChange:Y=>{d(Y),u==null&&v(Y);},open:D,side:g,sideOffset:b}),[Te,j]=A.split("-"),re=k(),{isVisible:se}=Or(J.reference.current);return Eo.useEffect(()=>{if(!F&&n&&J.reference.current instanceof Element){let Y=typeof n!="boolean"?n:{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 n||O(!0);},[n,J.reference.current]),J.reference.current==null||!F||!se?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h&&D&&jsxRuntime.jsx(_o,{anchor:t}),l&&!h&&D&&jsxRuntime.jsx(uo,{lockScroll:!0}),jsxRuntime.jsxs(y,p(a(a({css:a({'&[data-status="open"]':{transition:"transform 0.2s ease-out"}},i),"data-placement":A,"data-status":Re.status,part:["hint",m],ref:J.setFloating,style:a(a({},H),P)},M()),T),{children:[D&&r,jsxRuntime.jsx(Sr,p(a({},re),{position:"absolute",style:wr({align:j,side:Te}),clickable:s===!1}))]}))]})}var Ba=react.keyframes`
80
87
  from {
81
88
  opacity: 0;
82
89
  }
@@ -86,7 +93,7 @@ var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnProp
86
93
  to {
87
94
  opacity: 1;
88
95
  }
89
- `;function uo(v){var B=v,{align:e,alignOffset:o,defaultOpen:t,dismissible:n,flow:r,handleDismiss:i,modal:p,onPrimary:s,onSecondary:d,part:u,side:m,sideOffset:g,spotlight:b,step:x}=B,T=f(B,["align","alignOffset","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var $,L,E,I,A;let{handlePrimary:w,handleSecondary:P}=le(x,{onPrimary:s,onSecondary:d}),C=(L=($=x.primaryButton)==null?void 0:$.title)!=null?L:x.primaryButtonTitle,R=(I=(E=x.secondaryButton)==null?void 0:E.title)!=null?I:x.secondaryButtonTitle,k=!!x.$state.blocked;return jsxRuntime.jsx(Uo,l(a({align:e,alignOffset:o,anchor:x.selector,"data-step-id":x.id,defaultOpen:t,modal:p,part:u,side:m,sideOffset:g,spotlight:b},T),{children:jsxRuntime.jsxs(h,{animation:`${ca} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(h.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(A=x.videoUri)!=null?A:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image"}),jsxRuntime.jsx(h.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:n,handleDismiss:i,subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(h.Footer,{children:[r.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Be,{current:r.getCurrentStepOrder()+1,marginRight:"auto",total:r.getNumberOfAvailableSteps()}),jsxRuntime.jsx(h.Secondary,{disabled:k,onClick:P,title:R}),jsxRuntime.jsx(h.Primary,{disabled:k,onClick:w,title:C})]})]})}))}function Tr(e,o,t){let[n,r]=ko.useState(!1),i=ko.useRef();return ko.useEffect(()=>{i.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,i.current,t):null}function mo(T){var v=T,{align:e="after",alignOffset:o=0,as:t,defaultOpen:n,dismissible:r=!1,flowId:i,modal:p,part:s,sequential:d=!0,side:u="bottom",sideOffset:m=0,spotlight:g,zIndex:b=9999}=v,x=f(v,["align","alignOffset","as","defaultOpen","dismissible","flowId","modal","part","sequential","side","sideOffset","spotlight","zIndex"]);let{onDismiss:B,onPrimary:w,onSecondary:P}=x;return Tr(jsxRuntime.jsx(_,l(a({as:t,flowId:i,part:"tour"},x),{children:({flow:C,handleDismiss:R,parentProps:{containerProps:k},step:$})=>{var E,I,A,he;let L=a({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:R,modal:p,onPrimary:w,onSecondary:P,part:s,side:u,sideOffset:m,spotlight:g,step:$,zIndex:(A=(I=(E=$.props)==null?void 0:E.zIndex)!=null?I:k==null?void 0:k.zIndex)!=null?A:b},(he=$.props)!=null?he:{});return d?jsxRuntime.jsx(uo,a({defaultOpen:n!=null?n:!0},L),$.id):Array.from(C.steps.values()).filter(Q=>{let{blocked:Ae,completed:ue,skipped:ee,visible:Fe}=Q.$state;return !Ae&&!ue&&!ee&&Fe}).map(Q=>{var je,K,oe,ne,te;function Ae(me){return M(this,null,function*(){return (yield B==null?void 0:B(C,me))===!1?(me.preventDefault(),!1):(Q.skip(),!0)})}let ue=g&&Q.id===$.id,ee=(oe=(K=(je=Q.props)==null?void 0:je.zIndex)!=null?K:k==null?void 0:k.zIndex)!=null?oe:b,Fe=a({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:Ae,onPrimary:w,onSecondary:P,part:s,side:u,sideOffset:m,spotlight:g,zIndex:ee},(ne=Q.props)!=null?ne:{});return jsxRuntime.jsx(uo,a({css:{"&:has([aria-expanded=true])":{zIndex:Number(ee)+2},".fr-overlay":{zIndex:Number(ee)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(te=n||ue)!=null?te:!1,step:Q},Fe),`${Q.id}-${ue}`)})}})),"body")}function fo(){let{frigade:e}=ko.useContext(V),[,o]=ko.useState(!1),t,n=ko.useCallback(p=>{e==null||e.getCollections().then(()=>{p();});let s=()=>{clearTimeout(t),t=setTimeout(()=>{o(d=>!d),p();},0);};return e==null||e.onStateChange(s),()=>{e==null||e.removeStateChangeHandler(s);}},[]),r=()=>{let p;try{p=e==null?void 0:e.getCollectionsSync();}catch(s){}return p};return {collections:ko.useSyncExternalStore(n,r,r)}}function go(e){var s,d,u,m;let{frigade:o}=ko.useContext(V),{collections:t}=fo(),n=t==null?void 0:t.get(e),i=(m=((u=(d=(s=t==null?void 0:t.get(e))==null?void 0:s.flows)==null?void 0:d.filter(g=>g.visible).map(g=>l(a({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:p}=we(i);return ko.useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:p}}function Ko(r){var i=r,{collectionId:e,part:o,variables:t={}}=i,n=f(i,["collectionId","part","variables"]);var u,m,g;let p={ANNOUNCEMENT:jo,BANNER:Eo,CARD:h,CHECKLIST:to,EMBEDDED_TIP:h,FORM:He,NPS_SURVEY:_e,SURVEY:_e,TOUR:mo},{currentFlow:s}=go(e),d=(m=p[(u=s==null?void 0:s.rawData)==null?void 0:u.flowType])!=null?m:null;return s==null||d==null?null:((g=s==null?void 0:s.rawData)==null?void 0:g.flowType)===js.FlowType.FORM?jsxRuntime.jsx(y,l(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(He,{flowId:s.id,as:H,variables:t},s.id)})):jsxRuntime.jsx(y,l(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:s.id,variables:t},s.id)}))}function kr(){var t,n;let{collections:e}=fo(),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 go(o),o==null?null:jsxRuntime.jsx(Ko,{as:null,collectionId:o})}var V=ko.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Xo(){let{frigade:e}=ko.useContext(V);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Er(){let{frigade:e}=Xo();return ko.useEffect(()=>{M(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 Or="2.5.18";function $r(p){var s=p,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=s,i=f(s,["children","css","defaultCollection","navigate","theme"]);let d=r?Fo(r):{},u=ko.useRef(new Map),m=ko.useRef(),[g,b]=ko.useState(!1),x=ko.useMemo(()=>(b(!1),m.current=void 0,new js.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:Or,__platformName:"React"})),[i.userId,i.groupId,i.apiKey]);ko.useEffect(()=>{if(i.__flowStateOverrides){let P=x.getConfig();P.__flowStateOverrides=i.__flowStateOverrides,x.reload(P);}},[i.__flowStateOverrides]);function T(){let P=[...u.current.entries()].map(([C,R])=>[C,R.callback]);x.batchRegister(P),b(!0);}function v(P,C){if(m.current&&clearTimeout(m.current),g){u.current.has(P)?x.getFlow(P).then(R=>C(R.isVisible)):(x.getFlow(P).then(R=>R.register(C)),u.current.set(P,{callback:C}));return}u.current.has(P)||u.current.set(P,{callback:C}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>T(),0);}function B(P){u.current.has(P)&&x.getFlow(P).then(C=>{u.current.delete(P),C==null||C.unregister();});}let w=n!=null?n:(P,C="_self")=>{window.open(P,C);};return ko.useEffect(()=>()=>{x.destroy();},[]),jsxRuntime.jsxs(V.Provider,{value:l(a({navigate:w},i),{frigade:x,registerComponent:v,unregisterComponent:B,hasInitialized:g,variables:i.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":a(a(a({},vo),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:O,children:[t&&jsxRuntime.jsx(kr,{}),e]}),i.preloadImages!==!1&&jsxRuntime.jsx(Er,{})]})}function we(e,o){let{frigade:t,variables:n}=ko.useContext(V),[,r]=ko.useState(!1),i=ko.useCallback(s=>{t==null||t.getFlow(e).then(()=>{s();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),s();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),p=ko.useSyncExternalStore(i,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return p==null||p.applyVariables(a(a({},n),o==null?void 0:o.variables)),{flow:p,isLoading:t!=null&&t.hasFailedToLoad()?!1:!p}}function qo(e,{onComplete:o,onDismiss:t}={}){let n=ko.useRef(null);return ko.useEffect(()=>{if(e==null)return;function r(){return M(this,null,function*(){e.isCompleted&&n.current===!1&&(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:ko.useCallback(r=>M(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function Zo(e,o=!0){let t=ko.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,o]),n=ko.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,o]);ko.useEffect(()=>()=>{t();},[]),ko.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=de.size>0?de.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||de.size==0:!0}}function _(u){var m=u,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:i,onSecondary:p,variables:s}=m,d=f(m,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var E,A;let{flow:g}=we(t,{variables:s}),I=a(a({},d),(E=g==null?void 0:g.props)!=null?E:{}),{dismissible:b=!1,forceMount:x=!1}=I,T=f(I,["dismissible","forceMount"]),v=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=qo(g,{onComplete:n,onDismiss:r}),{handlePrimary:w,handleSecondary:P}=le(v,{onPrimary:i,onSecondary:p}),C=(T==null?void 0:T.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:R}=Zo(g,C),k=x&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!k||!k&&!R)return null;(k||!g.isCompleted&&!g.isSkipped)&&(v==null||v.start());let $=e===null?ko.Fragment:e!=null?e:y,L=l(a({},T),{"data-flow-id":g.id});return jsxRuntime.jsx($,l(a({},e===null?{}:L),{children:o({flow:g,handleDismiss:B,handlePrimary:w,handleSecondary:P,parentProps:{dismissible:b,flowId:t,variables:s,containerProps:L},step:v})}))}function Lr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(_,l(a({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:i,handleSecondary:p,parentProps:{dismissible:s},step:d})=>{var g,b,x,T;let u=(b=(g=d.primaryButton)==null?void 0:g.title)!=null?b:d.primaryButtonTitle,m=(T=(x=d.secondaryButton)==null?void 0:x.title)!=null?T:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(h.Header,{dismissible:s,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(h.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(h.Secondary,{title:m,onClick:p}),jsxRuntime.jsx(h.Primary,{title:u,onClick:i})]})]})}}))}function xo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function _a(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 ho(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let i=_a(o);return i?jsxRuntime.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")?jsxRuntime.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 ye(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?ho:xo,a({src:e},t))}var h=ko__namespace.forwardRef((i,r)=>{var p=i,{children:e,flowId:o,part:t}=p,n=f(p,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(Lr,a({flowId:o},n));let s=(d=n.as)!=null?d:S.Column;return jsxRuntime.jsx(s,l(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}))});h.Dismiss=e=>jsxRuntime.jsx(D.Plain,l(a({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}));h.Footer=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return jsxRuntime.jsx(S.Row,l(a({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};h.Header=p=>{var s=p,{dismissible:e,handleDismiss:o,part:t,subtitle:n,title:r}=s,i=f(s,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(S.Row,l(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},i),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};h.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(ye,a({borderRadius:"md",src:e},o))};h.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:jsxRuntime.jsx(D.Primary,a({title:o,onClick:e},t))};h.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:jsxRuntime.jsx(D.Secondary,a({title:o,onClick:e},t))};h.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(a({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};h.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.H4,l(a({display:"block",part:["title",o]},t),{children:e}))};var bo={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function _r(e){let o=Object.fromEntries(bo.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(bo.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!bo.content.some(i=>i===r)&&!bo.root.some(i=>i===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var ja=react.keyframes`
96
+ `;function fo(B){var S=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}=S,T=f(S,["align","alignOffset","autoScroll","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var M,k,H,A,J;let{handlePrimary:w,handleSecondary:v}=ue(P,{onPrimary:d,onSecondary:u}),F=(k=(M=P.primaryButton)==null?void 0:M.title)!=null?k:P.primaryButtonTitle,O=(A=(H=P.secondaryButton)==null?void 0:H.title)!=null?A:P.secondaryButtonTitle,D=!!P.$state.blocked;return jsxRuntime.jsx(Ko,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},T),{children:jsxRuntime.jsxs(x,{animation:`${Ba} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.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"}),jsxRuntime.jsx(x.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:r,handleDismiss:s,subtitle:P.subtitle,title:P.title}),jsxRuntime.jsxs(x.Footer,{children:[i.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Ee,{current:i.getCurrentStepOrder()+1,marginRight:"auto",total:i.getNumberOfAvailableSteps()}),jsxRuntime.jsx(x.Secondary,{disabled:D,onClick:v,title:O}),jsxRuntime.jsx(x.Primary,{disabled:D,onClick:w,title:F})]})]})}))}function $r(r){var i=r,{children:e,container:o,flowId:t}=i,n=f(i,["children","container","flowId"]);return jsxRuntime.jsx(hr,{container:o,children:jsxRuntime.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 jsxRuntime.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:T="body",defaultOpen:B,dismissible:S=!1,modal:w,part:v,sequential:F=!0,side:O="bottom",sideOffset:D=0,spotlight:M,zIndex:k=9999}=Re,H=f(Re,["align","alignOffset","autoScroll","container","defaultOpen","dismissible","modal","part","sequential","side","sideOffset","spotlight","zIndex"]),A=a({align:b,alignOffset:h,autoScroll:P,dismissible:S,flow:d,handleDismiss:u,modal:w,onPrimary:s,onSecondary:l,part:v,side:O,sideOffset:D,spotlight:M,step:g,zIndex:k},(Te=g.props)!=null?Te:{});if(F)return jsxRuntime.jsx($r,p(a({as:e,container:T,flowId:o,part:"tour",zIndex:k},H),{children:jsxRuntime.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=M&&j.id===g.id,Y=(le=(Q=j.props)==null?void 0:Q.zIndex)!=null?le:k,N=a({align:b,alignOffset:h,dismissible:S,flow:d,handleDismiss:re,onPrimary:s,onSecondary:l,part:v,side:O,sideOffset:D,spotlight:M,zIndex:Y},(ne=j.props)!=null?ne:{});return jsxRuntime.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 jsxRuntime.jsx($r,p(a({as:e,container:T,flowId:o,part:"tour",zIndex:k},H),{children:J}))}}))}function yo(){let{frigade:e}=Eo.useContext(L),[,o]=Eo.useState(!1),t,n=Eo.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:Eo.useSyncExternalStore(n,r,r)}}function xo(e){var l,d,u,m;let{frigade:o}=Eo.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 Eo.useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:s}}function jo(r){var i=r,{collectionId:e,part:o,variables:t={}}=i,n=f(i,["collectionId","part","variables"]);var u,m,g;let s={ANNOUNCEMENT:Xo,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)===js.FlowType.FORM?jsxRuntime.jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(Me,{flowId:l.id,as:$,variables:t},l.id)})):jsxRuntime.jsx(y,p(a({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.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:jsxRuntime.jsx(jo,{as:null,collectionId:o})}var L=Eo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Jo(){let{frigade:e}=Eo.useContext(L);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Mr(){let{frigade:e}=Jo();return Eo.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.20";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=Eo.useRef(new Map),m=Eo.useRef(),[g,b]=Eo.useState(!1),h=Eo.useMemo(()=>(b(!1),m.current=void 0,new js.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]);Eo.useEffect(()=>{if(i.__flowStateOverrides){let w=h.getConfig();w.__flowStateOverrides=i.__flowStateOverrides,h.reload(w);}},[i.__flowStateOverrides]);function P(){let w=[...u.current.entries()].map(([v,F])=>[v,F.callback]);h.batchRegister(w),b(!0);}function T(w,v){if(m.current&&clearTimeout(m.current),g){u.current.has(w)?h.getFlow(w).then(F=>v(F.isVisible)):(h.getFlow(w).then(F=>F.register(v)),u.current.set(w,{callback:v}));return}u.current.has(w)||u.current.set(w,{callback:v}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(),0);}function B(w){u.current.has(w)&&h.getFlow(w).then(v=>{u.current.delete(w),v==null||v.unregister();});}let S=n!=null?n:(w,v="_self")=>{window.open(w,v);};return Eo.useEffect(()=>()=>{h.destroy();},[]),jsxRuntime.jsxs(L.Provider,{value:p(a({navigate:S},i),{frigade:h,registerComponent:T,unregisterComponent:B,hasInitialized:g,variables:i.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":a(a(a({},Ro),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:E,children:[t&&jsxRuntime.jsx(Ar,{}),e]}),i.preloadImages!==!1&&jsxRuntime.jsx(Mr,{})]})}function Fe(e,o){let{frigade:t,variables:n}=Eo.useContext(L),[,r]=Eo.useState(!1),i=Eo.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=Eo.useSyncExternalStore(i,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return s==null||s.applyVariables(a(a({},n),o==null?void 0:o.variables)),{flow:s,isLoading:t!=null&&t.hasFailedToLoad()?!1:!s}}function Zo(e,{onComplete:o,onDismiss:t}={}){let n=Eo.useRef(null);return Eo.useEffect(()=>{if(e==null)return;function r(){return W(this,null,function*(){e.isCompleted&&n.current===!1&&(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:Eo.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 Yo(e,o=!0){let t=Eo.useCallback(()=>{fe.has(e==null?void 0:e.id)&&fe.delete(e==null?void 0:e.id);},[fe,o]),n=Eo.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!fe.has(e.id)&&fe.add(e.id);},[fe,o]);Eo.useEffect(()=>()=>{t();},[]),Eo.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}),H=a(a({},d),(k=g==null?void 0:g.props)!=null?k:{}),{dismissible:b=!1,forceMount:h=!1}=H,P=f(H,["dismissible","forceMount"]),T=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=Zo(g,{onComplete:n,onDismiss:r}),{handlePrimary:S,handleSecondary:w}=ue(T,{onPrimary:i,onSecondary:s}),v=(P==null?void 0:P.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:F}=Yo(g,v),O=h&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!O||!O&&!F)return null;(O||!g.isCompleted&&!g.isSkipped)&&(T==null||T.start());let D=e===null?Eo.Fragment:e!=null?e:y,M=p(a({},P),{"data-flow-id":g.id});return jsxRuntime.jsx(D,p(a({},e===null?{}:M),{children:o({flow:g,handleDismiss:B,handlePrimary:S,handleSecondary:w,parentProps:{dismissible:b,flowId:t,variables:l,containerProps:M},step:T})}))}function jr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(x.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(x.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(C.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(x.Secondary,{title:m,onClick:s}),jsxRuntime.jsx(x.Primary,{title:u,onClick:i})]})]})}}))}function bo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(y,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function ts(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=ts(o);return i?jsxRuntime.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")?jsxRuntime.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 jsxRuntime.jsx(o==="video"?Po:bo,a({src:e},t))}var x=Eo__namespace.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 jsxRuntime.jsx(jr,a({flowId:o},n));let l=(d=n.as)!=null?d:C.Column;return jsxRuntime.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=>jsxRuntime.jsx(I.Plain,p(a({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}));x.Footer=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return jsxRuntime.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 jsxRuntime.jsxs(C.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",t]},i),{children:[jsxRuntime.jsx(x.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(x.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.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:jsxRuntime.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:jsxRuntime.jsx(I.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:jsxRuntime.jsx(I.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:jsxRuntime.jsx(R.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:jsxRuntime.jsx(R.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 as=react.keyframes`
90
97
  from {
91
98
  opacity: 0;
92
99
  }
@@ -96,7 +103,7 @@ var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnProp
96
103
  to {
97
104
  opacity: 1;
98
105
  }
99
- `;function H(r){var i=r,{children:e,className:o,modal:t=!0}=i,n=f(i,["children","className","modal"]);let{rootProps:p,contentProps:s,otherProps:m}=_r(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,l(a({defaultOpen:!0,modal:t},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${ja} 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&&jsxRuntime.jsx(j__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(j__namespace.Content,l(a({asChild:!0,onOpenAutoFocus:b=>b.preventDefault(),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault()},s),{children:jsxRuntime.jsx(h,l(a({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}H.Dismiss=e=>jsxRuntime.jsx(j__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(D.Plain,l(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});H.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(F.Body2,l(a({part:"subtitle"},o),{children:e}))})};H.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,a({borderRadius:"md",src:e},o))};H.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Primary,a({title:o,onClick:e},t))};H.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?O.colors.primary.surface:O.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};H.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Secondary,a({title:o,onClick:e},t))};H.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(F.H4,l(a({part:"title"},o),{children:e}))})};H.displayName="Dialog";var Ur=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function jo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([s])=>Ur.some(d=>s===d))),p=Object.fromEntries(Object.entries(t).filter(([s])=>Ur.indexOf(s)===-1));return jsxRuntime.jsx(_,l(a({as:null,flowId:e},i),{children:({flow:s,handleDismiss:d,handlePrimary:u,handleSecondary:m,parentProps:{containerProps:g,dismissible:b},step:x})=>{var P,C,R,k,$,L;let T=(P=x.props)!=null?P:{},v=(R=(C=x.primaryButton)==null?void 0:C.title)!=null?R:x.primaryButtonTitle,B=($=(k=x.secondaryButton)==null?void 0:k.title)!=null?$:x.secondaryButtonTitle,w=x.$state.blocked;return jsxRuntime.jsx(H,l(a(a({part:["announcement",o],textAlign:"center"},g),p),{onEscapeKeyDown:E=>{if(t.dismissible===!1){E.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(E),E.defaultPrevented||d(E);},children:jsxRuntime.jsxs(S.Column,l(a({gap:5,part:"announcement-step"},T),{children:[b&&jsxRuntime.jsx(H.Dismiss,{onClick:d}),jsxRuntime.jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(H.Title,{children:x.title}),jsxRuntime.jsx(H.Subtitle,{children:x.subtitle})]}),jsxRuntime.jsx(H.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(L=x.videoUri)!=null?L:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx(H.ProgressDots,{current:s.getCurrentStepIndex(),total:s.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx(H.Secondary,{disabled:w,onClick:m,title:B}),v&&jsxRuntime.jsx(H.Primary,{disabled:w,onClick:u,title:v})]})]}))}))}}))}function Qo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Po(...e){let o=e.shift(),t=e.length===1?e[0]:Po(...e);if(!Qo(o)||!Qo(t))throw new Error("deepmerge can only merge Objects");let n=structuredClone(o);return Object.entries(t).forEach(([r,i])=>{Qo(i)?n[r]!==void 0?Object.assign(n,{[r]:Po(n[r],structuredClone(i))}):Object.assign(n,{[r]:structuredClone(i)}):Array.isArray(i)?n[r]!==void 0?Object.assign(n,{[r]:[...n[r],...structuredClone(i)]}):Object.assign(n,{[r]:structuredClone(i)}):Object.assign(n,{[r]:i});}),n}function Ja(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function qa(t){var n=t,{title:e}=n,o=f(n,["title"]);return jsxRuntime.jsx(_,l(a({as:null},o),{children:({flow:r,parentProps:{containerProps:i},step:p})=>{var g,b,x;let s=Ja(e,r.title,p.title),d=(g=r==null?void 0:r.getNumberOfCompletedSteps())!=null?g:0,u=(b=r==null?void 0:r.getNumberOfAvailableSteps())!=null?b:1,m=i.onClick!=null;return m&&(i.css=Po({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(x=i.css)!=null?x:{})),jsxRuntime.jsxs(h,l(a({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"1",p:"3",part:"progress-badge",role:"complementary"},i),{children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(h.Title,{fontSize:"sm",lineHeight:"sm",children:s}),jsxRuntime.jsx(y,{as:io,height:"20px",marginLeft:"auto",marginRight:"-1",transform:"rotate(-90deg)",width:"20px"})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsxRuntime.jsx(Be,{current:d,fontSize:"xs",fontWeight:"medium",lineHeight:"xs",total:u}),jsxRuntime.jsx(eo,{current:d,flexGrow:"1",total:u})]})]}))}}))}function Co(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=ko.useState(e),[n,r]=ko.useState(null),i=ko.useCallback(p=>{r(p);},[]);return ko.useLayoutEffect(()=>{if(!n)return;let p=()=>{let s=n.getBoundingClientRect();t(s);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:o,ref:i}}var es=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function jr(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(y,l(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${es}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function Xr({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},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"},p="-24px",s={top:"bottom",right:"left",bottom:"top",left:"right"};r[s[n]]=p;let d=i();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=p:r.bottom=p:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=p:r.top=p:["top","bottom"].includes(n)?r.left=`calc(50% + ${p})`:r.top=`calc(50% + ${p})`,r}var So={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function Jr(e,o){var i,p,s,d,u;let t=Object.fromEntries(So.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(So.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!So.content.includes(m)&&!So.root.includes(m)&&(r[m]=e[m]);if(t.align=(i=t.align)!=null?i:"after",t.side=(p=t.side)!=null?p:"bottom",["before","after"].includes(t.align)){let m={after:"end",before:"start"},g=(w,P)=>["top","bottom"].includes(P)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",b=(s=t.alignOffset)!=null?s:0,x=(d=t.style)!=null?d:{},T=(u=t.side)!=null?u:"bottom",v=t.align;t.style=l(a({},x),{[g(v,T)]:b});let B=["top","bottom"].includes(T)?o.width:o.height;t.alignOffset=(B+b)*-1,t.align=m[v];}return {contentProps:t,otherProps:r,rootProps:n}}var qr=react.keyframes`
106
+ `;function $(r){var i=r,{children:e,className:o,modal:t=!0}=i,n=f(i,["children","className","modal"]);let{rootProps:s,contentProps:l,otherProps:m}=qr(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(X__namespace.Root,p(a({defaultOpen:!0,modal:t},s),{children:jsxRuntime.jsx(X__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${as} 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&&jsxRuntime.jsx(X__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(X__namespace.Content,p(a({asChild:!0,onOpenAutoFocus:b=>b.preventDefault(),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault()},l),{children:jsxRuntime.jsx(x,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}))}))]})})}))}$.Dismiss=e=>jsxRuntime.jsx(X__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,p(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}))});$.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(X__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(R.Body2,p(a({part:"subtitle"},o),{children:e}))})};$.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(he,a({borderRadius:"md",src:e},o))};$.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,a({title:o,onClick:e},t))};$.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?E.colors.primary.surface:E.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};$.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,a({title:o,onClick:e},t))};$.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(X__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(R.H4,p(a({part:"title"},o),{children:e}))})};$.displayName="Dialog";var Zr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Xo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([l])=>Zr.some(d=>l===d))),s=Object.fromEntries(Object.entries(t).filter(([l])=>Zr.indexOf(l)===-1));return jsxRuntime.jsx(U,p(a({as:null,flowId:e},i),{children:({flow:l,handleDismiss:d,handlePrimary:u,handleSecondary:m,parentProps:{containerProps:g,dismissible:b},step:h})=>{var w,v,F,O,D,M;let P=(w=h.props)!=null?w:{},T=(F=(v=h.primaryButton)==null?void 0:v.title)!=null?F:h.primaryButtonTitle,B=(D=(O=h.secondaryButton)==null?void 0:O.title)!=null?D:h.secondaryButtonTitle,S=h.$state.blocked;return jsxRuntime.jsx($,p(a(a({part:["announcement",o],textAlign:"center"},g),s),{onEscapeKeyDown:k=>{if(t.dismissible===!1){k.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(k),k.defaultPrevented||d(k);},children:jsxRuntime.jsxs(C.Column,p(a({gap:5,part:"announcement-step"},P),{children:[b&&jsxRuntime.jsx($.Dismiss,{onClick:d}),jsxRuntime.jsxs(C.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx($.Title,{children:h.title}),jsxRuntime.jsx($.Subtitle,{children:h.subtitle})]}),jsxRuntime.jsx($.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(M=h.videoUri)!=null?M:h.imageUri,transform:"translate3d(0, 0, 1px)",type:h.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx($.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(C.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx($.Secondary,{disabled:S,onClick:m,title:B}),T&&jsxRuntime.jsx($.Primary,{disabled:S,onClick:u,title:T})]})]}))}))}}))}function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function So(...e){let o=e.shift(),t=e.length===1?e[0]:So(...e);if(!et(o)||!et(t))throw new Error("deepmerge can only merge Objects");let n=structuredClone(o);return Object.entries(t).forEach(([r,i])=>{et(i)?n[r]!==void 0?Object.assign(n,{[r]:So(n[r],structuredClone(i))}):Object.assign(n,{[r]:structuredClone(i)}):Array.isArray(i)?n[r]!==void 0?Object.assign(n,{[r]:[...n[r],...structuredClone(i)]}):Object.assign(n,{[r]:structuredClone(i)}):Object.assign(n,{[r]:i});}),n}function ls(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function ps(t){var n=t,{title:e}=n,o=f(n,["title"]);return jsxRuntime.jsx(U,p(a({as:null},o),{children:({flow:r,parentProps:{containerProps:i},step:s})=>{var g,b,h;let l=ls(e,r.title,s.title),d=(g=r==null?void 0:r.getNumberOfCompletedSteps())!=null?g:0,u=(b=r==null?void 0:r.getNumberOfAvailableSteps())!=null?b:1,m=i.onClick!=null;return m&&(i.css=So({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(h=i.css)!=null?h:{})),jsxRuntime.jsxs(x,p(a({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"1",p:"3",part:"progress-badge",role:"complementary"},i),{children:[jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(x.Title,{fontSize:"sm",lineHeight:"sm",children:l}),jsxRuntime.jsx(y,{as:ao,height:"20px",marginLeft:"auto",marginRight:"-1",transform:"rotate(-90deg)",width:"20px"})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsxRuntime.jsx(Ee,{current:d,fontSize:"xs",fontWeight:"medium",lineHeight:"xs",total:u}),jsxRuntime.jsx(oo,{current:d,flexGrow:"1",total:u})]})]}))}}))}var cs=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Qr(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(y,p(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${cs}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function en({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},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"};r[l[n]]=s;let d=i();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=s:r.bottom=s:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=s:r.top=s:["top","bottom"].includes(n)?r.left=`calc(50% + ${s})`:r.top=`calc(50% + ${s})`,r}var wo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function on(e,o){var i,s,l,d,u;let t=Object.fromEntries(wo.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(wo.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!wo.content.includes(m)&&!wo.root.includes(m)&&(r[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=(S,w)=>["top","bottom"].includes(w)?S=="after"?"marginLeft":"marginRight":S=="after"?"marginTop":"marginBottom",b=(l=t.alignOffset)!=null?l:0,h=(d=t.style)!=null?d:{},P=(u=t.side)!=null?u:"bottom",T=t.align;t.style=p(a({},h),{[g(T,P)]:b});let B=["top","bottom"].includes(P)?o.width:o.height;t.alignOffset=(B+b)*-1,t.align=m[T];}return {contentProps:t,otherProps:r,rootProps:n}}var tn=react.keyframes`
100
107
  from {
101
108
  opacity: 0;
102
109
  }
@@ -106,47 +113,47 @@ var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnProp
106
113
  to {
107
114
  opacity: 1;
108
115
  }
109
- `;function Zr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(u){var m=u,{anchor:e,children:o,className:t,defaultOpen:n=!0,open:r,part:i,spotlight:p=!1,style:s={}}=m,d=f(m,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:b,ref:x}=Co(),{node:T,rect:v,ref:B}=Co(),{contentProps:w,otherProps:P,rootProps:C}=Jr(d,b),[R,k]=ko.useState(n),[$,L]=ko.useState(w.align),[E,I]=ko.useState(w.side),[A,he]=ko.useState(0),[Q,Ae]=ko.useState(0);function ue(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",R),R)}if(g!==null){let K=g.getAttribute("data-align"),oe=g.getAttribute("data-side");$!==K&&L(K),E!==oe&&I(oe);}let ee=ko.useRef(null);if(ko.useEffect(()=>{let K=document.querySelector(e);K!=null?(B(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),ko.useEffect(()=>{function K(ne){if(ne.matches(e))return Zr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&Zr(te[0])?te[0]:null}let oe=new MutationObserver(ne=>{for(let te of ne)if(te.type==="childList"){for(let me of te.addedNodes){if(me.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(me);if(fe!=null){B(fe),ee.current=fe,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",fe);break}}for(let me of te.removedNodes){if(me.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(me);if(fe!=null){B(null),ee.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",fe);break}}}});return oe.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>oe.disconnect()},[]),ko.useEffect(()=>{let{scrollX:K,scrollY:oe}=window;he(v.left+K),Ae(v.top+oe);},[v.left,v.top]),T==null)return null;let Fe="0";typeof window!="undefined"&&(Fe=window.getComputedStyle(T).borderRadius);let je=Xr({props:d,alignAttr:$,sideAttr:E});return jsxRuntime.jsxs(re__namespace.Root,l(a({defaultOpen:!0},C),{children:[jsxRuntime.jsx(re__namespace.Anchor,{virtualRef:ee}),jsxRuntime.jsx(re__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p&&jsxRuntime.jsx(y,a({animation:`${qr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:Fe,height:v.height,left:A,top:Q,width:v.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(re__namespace.Content,l(a({},w),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ue()&&jsxRuntime.jsx(h,l(a({animation:`${qr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",i],style:s},P),{children:o})),jsxRuntime.jsx(jr,{onClick:()=>{k(()=>(typeof C.onOpenChange=="function"&&C.onOpenChange(!ue()),!ue()));},style:je})]})}),R)]})})]}))}xe.Close=e=>jsxRuntime.jsx(re__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(D.Plain,l(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});xe.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,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))};xe.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Primary,a({title:o,onClick:e},t))};xe.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(a({part:"progress"},o),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Secondary,a({title:o,onClick:e},t))};xe.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(a({part:"subtitle"},o),{children:e}))};xe.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.H4,l(a({part:"title"},o),{children:e}))};function is(){let{userId:e,frigade:o}=ko.useContext(V);function t(r){return M(this,null,function*(){yield o.identify(e,r);})}function n(r,i){return M(this,null,function*(){yield o.track(r,i);})}return {userId:e,addProperties:t,track:n}}function ss(){var r;let{frigade:e}=ko.useContext(V);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,p){return M(this,null,function*(){yield e.track(i,p);})}function n(i,p){return M(this,null,function*(){yield e.group(i,p);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
116
+ `;function rn(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function be(u){var m=u,{anchor:e,children:o,className:t,defaultOpen:n=!0,open:r,part:i,spotlight:s=!1,style:l={}}=m,d=f(m,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:b,ref:h}=mo(),{node:P,rect:T,ref:B}=mo(),{contentProps:S,otherProps:w,rootProps:v}=on(d,b),[F,O]=Eo.useState(n),[D,M]=Eo.useState(S.align),[k,H]=Eo.useState(S.side),[A,J]=Eo.useState(0),[Re,Te]=Eo.useState(0);function j(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",F),F)}if(g!==null){let N=g.getAttribute("data-align"),Q=g.getAttribute("data-side");D!==N&&M(N),k!==Q&&H(Q);}let re=Eo.useRef(null);if(Eo.useEffect(()=>{let N=document.querySelector(e);N!=null?(B(N),re.current=N):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Eo.useEffect(()=>{function N(le){if(le.matches(e))return rn(le)?le:null;let ne=le.querySelectorAll(e);return ne.length>0&&rn(ne[0])?ne[0]:null}let Q=new MutationObserver(le=>{for(let ne of le)if(ne.type==="childList"){for(let ye of ne.addedNodes){if(ye.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(ye);if(ie!=null){B(ie),re.current=ie,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",ie);break}}for(let ye of ne.removedNodes){if(ye.nodeType!==Node.ELEMENT_NODE)continue;let ie=N(ye);if(ie!=null){B(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()},[]),Eo.useEffect(()=>{let{scrollX:N,scrollY:Q}=window;J(T.left+N),Te(T.top+Q);},[T.left,T.top]),P==null)return null;let se="0";typeof window!="undefined"&&(se=window.getComputedStyle(P).borderRadius);let Y=en({props:d,alignAttr:D,sideAttr:k});return jsxRuntime.jsxs(ae__namespace.Root,p(a({defaultOpen:!0},v),{children:[jsxRuntime.jsx(ae__namespace.Anchor,{virtualRef:re}),jsxRuntime.jsx(ae__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(y,a({animation:`${tn} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:se,height:T.height,left:A,top:Re,width:T.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(ae__namespace.Content,p(a({},S),{ref:h,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[j()&&jsxRuntime.jsx(x,p(a({animation:`${tn} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",i],style:l},w),{children:o})),jsxRuntime.jsx(Qr,{onClick:()=>{O(()=>(typeof v.onOpenChange=="function"&&v.onOpenChange(!j()),!j()));},style:Y})]})}),F)]})})]}))}be.Close=e=>jsxRuntime.jsx(ae__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,p(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Be,{height:"20",fill:"currentColor"})}))});be.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(he,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))};be.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,a({title:o,onClick:e},t))};be.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({part:"progress"},o),{children:e}))};be.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,a({title:o,onClick:e},t))};be.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.Body2,p(a({part:"subtitle"},o),{children:e}))};be.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(R.H4,p(a({part:"title"},o),{children:e}))};function ys(){let{userId:e,frigade:o}=Eo.useContext(L);function t(r){return W(this,null,function*(){yield o.identify(e,r);})}function n(r,i){return W(this,null,function*(){yield o.track(r,i);})}return {userId:e,addProperties:t,track:n}}function hs(){var r;let{frigade:e}=Eo.useContext(L);function o(i){return W(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 W(this,null,function*(){yield e.track(i,s);})}function n(i,s){return W(this,null,function*(){yield e.group(i,s);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
110
117
 
111
118
  exports.FrigadeJS = js__namespace;
112
- exports.Announcement = jo;
113
- exports.Banner = Eo;
114
- exports.BaseField = Y;
119
+ exports.Announcement = Xo;
120
+ exports.Banner = Oo;
121
+ exports.BaseField = te;
115
122
  exports.Box = y;
116
- exports.Button = D;
117
- exports.Card = h;
118
- exports.Checklist = ro;
119
- exports.Collection = Ko;
120
- exports.Dialog = H;
121
- exports.Flex = S;
122
- exports.Flow = _;
123
- exports.Form = He;
124
- exports.Hint = Uo;
125
- exports.Image = xo;
126
- exports.Label = Ao;
127
- exports.Media = ye;
128
- exports.Progress = Pe;
129
- exports.ProgressBadge = qa;
130
- exports.Provider = $r;
131
- exports.RadioField = Wo;
132
- exports.SelectField = Vo;
133
- exports.Spotlight = zo;
134
- exports.Survey = po;
135
- exports.Text = F;
136
- exports.TextField = Lo;
137
- exports.TextareaField = No;
138
- exports.Tooltip = xe;
139
- exports.Tour = mo;
140
- exports.Video = ho;
141
- exports.themeVariables = vo;
142
- exports.tokens = qe;
143
- exports.useBoundingClientRect = Co;
144
- exports.useFlow = we;
145
- exports.useFlowHandlers = qo;
146
- exports.useFrigade = Xo;
147
- exports.useGroup = ss;
148
- exports.useModal = Zo;
149
- exports.useStepHandlers = le;
150
- exports.useUser = is;
123
+ exports.Button = I;
124
+ exports.Card = x;
125
+ exports.Checklist = no;
126
+ exports.Collection = jo;
127
+ exports.Dialog = $;
128
+ exports.Flex = C;
129
+ exports.Flow = U;
130
+ exports.Form = Me;
131
+ exports.Hint = Ko;
132
+ exports.Image = bo;
133
+ exports.Label = Mo;
134
+ exports.Media = he;
135
+ exports.Progress = Ce;
136
+ exports.ProgressBadge = ps;
137
+ exports.Provider = zr;
138
+ exports.RadioField = Vo;
139
+ exports.SelectField = Lo;
140
+ exports.Spotlight = _o;
141
+ exports.Survey = co;
142
+ exports.Text = R;
143
+ exports.TextField = No;
144
+ exports.TextareaField = zo;
145
+ exports.Tooltip = be;
146
+ exports.Tour = go;
147
+ exports.Video = Po;
148
+ exports.themeVariables = Ro;
149
+ exports.tokens = Ze;
150
+ exports.useBoundingClientRect = mo;
151
+ exports.useFlow = Fe;
152
+ exports.useFlowHandlers = Zo;
153
+ exports.useFrigade = Jo;
154
+ exports.useGroup = hs;
155
+ exports.useModal = Yo;
156
+ exports.useStepHandlers = ue;
157
+ exports.useUser = ys;
151
158
  //# sourceMappingURL=out.js.map
152
159
  //# sourceMappingURL=index.cjs.map