@frigade/react 2.5.27 → 2.5.29

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