@flarehr/apollo-import-workspace-app 0.1.420 → 0.1.422

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.
@@ -32,7 +32,7 @@ If you can't use one of these types, please pass an extra decoder.
32
32
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
33
33
  `)].join(`
34
34
  `))}else{let p=d.props,f=p==null?void 0:p.className,h=typeof f=="function"?(..._)=>Ys(f(..._),l.className):Ys(f,l.className),g=h?{className:h}:{},w=Af(d.props,Sn(gs(l,["ref"])));for(let _ in c)_ in w&&delete c[_];return ya(d,Object.assign({},w,c,u,{ref:o(yb(d),u.ref)},g))}return m(i,Object.assign({},gs(l,["ref"]),i!==Oe&&u,i!==Oe&&c),d)}function gb(){let e=K([]),t=ve(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function wb(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Af(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function $f(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function qe(e){var t;return Object.assign(ga(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Sn(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function gs(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function yb(e){return V.version.split(".")[0]>="19"?e.props.ref:e.ref}function vb(e,t,n){let[r,o]=ae(n),i=e!==void 0,s=K(i),a=K(!1),l=K(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!l.current&&(l.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,ee(u=>(i||o(u),t==null?void 0:t(u)))]}function bb(e){let[t]=ae(e);return t}function Mf(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))If(n,Nf(t,r),o);return n}function Nf(e,t){return e?e+"["+t+"]":t}function If(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())If(e,Nf(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Mf(n,t,e)}function _b(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}let xb="span";var Ir=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ir||{});function Cb(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return et()({ourProps:i,theirProps:o,slot:{},defaultTag:xb,name:"Hidden"})}let wo=qe(Cb),Sb=Be(null);function Eb({children:e}){let t=Ee(Sb);if(!t)return V.createElement(V.Fragment,null,e);let{target:n}=t;return n?Mi(V.createElement(V.Fragment,null,e),n):null}function kb({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,s]=ae(null),a=In();return Se(()=>{if(r&&i)return a.addEventListener(i,"reset",r)},[i,t,r]),V.createElement(Eb,null,V.createElement(Tb,{setForm:s,formId:t}),Mf(e).map(([l,u])=>V.createElement(wo,{features:Ir.Hidden,...Sn({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:l,value:u,...o})})))}function Tb({setForm:e,formId:t}){return Se(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:V.createElement(wo,{features:Ir.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let Ab=Be(void 0);function Of(){return Ee(Ab)}function $b(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Mb(n)?!1:r}function Mb(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ff=Symbol();function Nb(e,t=!0){return Object.assign(e,{[Ff]:t})}function it(...e){let t=K(e);Se(()=>{t.current=e},[e]);let n=ee(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ff]))?void 0:n}let Vi=Be(null);Vi.displayName="DescriptionContext";function Df(){let e=Ee(Vi);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Df),t}return e}function Ib(){var e,t;return(t=(e=Ee(Vi))==null?void 0:e.value)!=null?t:void 0}function Ob(){let[e,t]=ae([]);return[e.length>0?e.join(" "):void 0,te(()=>function(n){let r=ee(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}))),o=te(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return V.createElement(Vi.Provider,{value:o},n.children)},[t])]}let Fb="p";function Db(e,t){let n=Ft(),r=Ga(),{id:o=`headlessui-description-${n}`,...i}=e,s=Df(),a=it(t);Pe(()=>s.register(o),[o,s.register]);let l=r||!1,u=te(()=>({...s.slot,disabled:l}),[s.slot,l]),d={ref:a,...s.props,id:o};return et()({ourProps:d,theirProps:i,slot:u,defaultTag:Fb,name:s.name||"Description"})}let Pb=qe(Db),Rb=Object.assign(Pb,{});var Ye=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ye||{});let Ui=Be(null);Ui.displayName="LabelContext";function Pf(){let e=Ee(Ui);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Pf),t}return e}function Rf(e){var t,n,r;let o=(n=(t=Ee(Ui))==null?void 0:t.value)!=null?n:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Lb({inherit:e=!1}={}){let t=Rf(),[n,r]=ae([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,te(()=>function(i){let s=ee(l=>(r(u=>[...u,l]),()=>r(u=>{let d=u.slice(),c=d.indexOf(l);return c!==-1&&d.splice(c,1),d}))),a=te(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return V.createElement(Ui.Provider,{value:a},i.children)},[r])]}let Hb="label";function jb(e,t){var n;let r=Ft(),o=Pf(),i=Of(),s=Ga(),{id:a=`headlessui-label-${r}`,htmlFor:l=i??((n=o.props)==null?void 0:n.htmlFor),passive:u=!1,...d}=e,c=it(t);Pe(()=>o.register(a),[a,o.register]);let p=ee(w=>{let _=w.currentTarget;if(_ instanceof HTMLLabelElement&&w.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(w),_ instanceof HTMLLabelElement){let C=document.getElementById(_.htmlFor);if(C){let S=C.getAttribute("disabled");if(S==="true"||S==="")return;let $=C.getAttribute("aria-disabled");if($==="true"||$==="")return;(C instanceof HTMLInputElement&&(C.type==="radio"||C.type==="checkbox")||C.role==="radio"||C.role==="checkbox"||C.role==="switch")&&C.click(),C.focus({preventScroll:!0})}}}),f=s||!1,h=te(()=>({...o.slot,disabled:f}),[o.slot,f]),g={ref:c,...o.props,id:a,htmlFor:l,onClick:p};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),et()({ourProps:g,theirProps:d,slot:h,defaultTag:l?Hb:"div",name:o.name||"Label"})}let Bb=qe(jb),Vb=Object.assign(Bb,{}),Ub=Be(()=>{});function Wb({value:e,children:t}){return V.createElement(Ub.Provider,{value:e},t)}function Gb(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function zb(e=Gb){return ve((t,n)=>{if(typeof e=="string"){let r=e;return(t==null?void 0:t[r])===(n==null?void 0:n[r])}return e(t,n)},[e])}function qb(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Yb(e,t=!1){let[n,r]=or(()=>({}),{}),o=te(()=>qb(e),[e,n]);return Pe(()=>{if(!e)return;let i=new ResizeObserver(r);return i.observe(e),()=>{i.disconnect()}},[e]),t?{width:`${o.width}px`,height:`${o.height}px`}:o}let Zb=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Lf(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(a=>a()))}}}function Hf(e){return $i(e.subscribe,e.getSnapshot,e.getSnapshot)}let Kb=new Zb(()=>Lf(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function Ur(e,t){let n=Kb.get(t),r=Ft(),o=Hf(n);if(Pe(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let i=o.indexOf(r),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let Zs=new Map,ho=new Map;function ju(e){var t;let n=(t=ho.get(e))!=null?t:0;return ho.set(e,n+1),n!==0?()=>Bu(e):(Zs.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Bu(e))}function Bu(e){var t;let n=(t=ho.get(e))!=null?t:1;if(n===1?ho.delete(e):ho.set(e,n-1),n!==1)return;let r=Zs.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Zs.delete(e))}function jf(e,{allowed:t,disallowed:n}={}){let r=Ur(e,"inert-others");Pe(()=>{var o,i;if(!r)return;let s=bn();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&s.add(ju(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=Vr(l);if(!u)continue;let d=l.parentElement;for(;d&&d!==u.body;){for(let c of d.children)a.some(p=>c.contains(p))||s.add(ju(c));d=d.parentElement}}return s.dispose},[r,t,n])}function Bf(e,t,n){let r=On(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});Se(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=bn();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let Ci=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Xb=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Vt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Vt||{}),Ks=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ks||{}),Qb=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Qb||{});function Vf(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ci)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Jb(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Xb)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var za=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(za||{});function Uf(e,t=0){var n;return e===((n=Vr(e))==null?void 0:n.body)?!1:gt(t,{0(){return e.matches(Ci)},1(){let r=e;for(;r!==null;){if(r.matches(Ci))return!0;r=r.parentElement}return!1}})}var e_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(e_||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function dn(e){e==null||e.focus({preventScroll:!0})}let t_=["textarea","input"].join(",");function n_(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,t_))!=null?n:!1}function Wf(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function r_(e,t){return Cr(Vf(),t,{relativeTo:e})}function Cr(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?Wf(e):e:t&64?Jb(e):Vf(e);o.length>0&&s.length>1&&(s=s.filter(f=>!o.some(h=>h!=null&&"current"in h?(h==null?void 0:h.current)===f:h===f))),r=r??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},d=0,c=s.length,p;do{if(d>=c||d+c<=0)return 0;let f=l+d;if(t&16)f=(f+c)%c;else{if(f<0)return 3;if(f>=c)return 1}p=s[f],p==null||p.focus(u),d+=a}while(p!==i.activeElement);return t&6&&n_(p)&&p.select(),2}function Gf(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function o_(){return/Android/gi.test(window.navigator.userAgent)}function i_(){return Gf()||o_()}function no(e,t,n,r){let o=On(n);Se(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function zf(e,t,n,r){let o=On(n);Se(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const Vu=30;function qf(e,t,n){let r=Ur(e,"outside-click"),o=On(n),i=ve(function(l,u){if(l.defaultPrevented)return;let d=u(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let c=function p(f){return typeof f=="function"?p(f()):Array.isArray(f)||f instanceof Set?f:[f]}(t);for(let p of c)if(p!==null&&(p.contains(d)||l.composed&&l.composedPath().includes(p)))return;return!Uf(d,za.Loose)&&d.tabIndex!==-1&&l.preventDefault(),o.current(l,d)},[o,t]),s=K(null);no(r,"pointerdown",l=>{var u,d;s.current=((d=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:d[0])||l.target},!0),no(r,"mousedown",l=>{var u,d;s.current=((d=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:d[0])||l.target},!0),no(r,"click",l=>{i_()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=K({x:0,y:0});no(r,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),no(r,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=Vu||Math.abs(u.y-a.current.y)>=Vu))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),zf(r,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Wr(...e){return te(()=>Vr(...e),[...e])}function Yf(e,t,n,r){let o=On(n);Se(()=>{e=e??window;function i(s){o.current(s)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function s_(e,t){return te(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function a_(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function l_(){return Gf()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=bn();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),d=e.querySelector(u);d&&!r(d)&&(s=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let l=a.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function u_(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function c_(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let qn=Lf(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:bn(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:c_(n)},o=[l_(),a_(),u_()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});qn.subscribe(()=>{let e=qn.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&qn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&qn.dispatch("TEARDOWN",n)}});function d_(e,t,n=()=>({containers:[]})){let r=Hf(qn),o=t?r.get(t):void 0,i=o?o.count>0:!1;return Pe(()=>{if(!(!t||!e))return qn.dispatch("PUSH",t,n),()=>qn.dispatch("POP",t,n)},[e,t]),i}function Zf(e,t,n=()=>[document.body]){let r=Ur(e,"scroll-lock");d_(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Uu(e){return[e.screenX,e.screenY]}function f_(){let e=K([-1,-1]);return{wasMoved(t){let n=Uu(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Uu(t)}}}function h_(e=0){let[t,n]=ae(e),r=ve(l=>n(l),[t]),o=ve(l=>n(u=>u|l),[t]),i=ve(l=>(t&l)===l,[t]),s=ve(l=>n(u=>u&~l),[n]),a=ve(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var m_={},Wu,Gu;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Wu=process==null?void 0:m_)==null?void 0:Wu.NODE_ENV)==="test"&&typeof((Gu=Element==null?void 0:Element.prototype)==null?void 0:Gu.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
35
- `)),[]});var p_=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(p_||{});function Kf(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Xf(e,t,n,r){let[o,i]=ae(n),{hasFlag:s,addFlag:a,removeFlag:l}=h_(e&&o?3:0),u=K(!1),d=K(!1),c=In();return Pe(()=>{var p;if(e){if(n&&i(!0),!t){n&&a(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),g_(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var f;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||i(!1),(f=r==null?void 0:r.end)==null||f.call(r,n))}})}},[e,n,t,c]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function g_(e,{prepare:t,run:n,done:r,inFlight:o}){let i=bn();return y_(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(w_(e,r))})}),i.dispose}function w_(e,t){var n,r;let o=bn();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function y_(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function qa(e,t){let n=K([]),r=ee(e);Se(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}function Wi(){return typeof window<"u"}function Gr(e){return Qf(e)?(e.nodeName||"").toLowerCase():"#document"}function Et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function en(e){var t;return(t=(Qf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qf(e){return Wi()?e instanceof Node||e instanceof Et(e).Node:!1}function dt(e){return Wi()?e instanceof Element||e instanceof Et(e).Element:!1}function Qt(e){return Wi()?e instanceof HTMLElement||e instanceof Et(e).HTMLElement:!1}function zu(e){return!Wi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Et(e).ShadowRoot}function Fo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function v_(e){return["table","td","th"].includes(Gr(e))}function Gi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ya(e){const t=Za(),n=dt(e)?Gt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b_(e){let t=Mn(e);for(;Qt(t)&&!Or(t);){if(Ya(t))return t;if(Gi(t))return null;t=Mn(t)}return null}function Za(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Or(e){return["html","body","#document"].includes(Gr(e))}function Gt(e){return Et(e).getComputedStyle(e)}function zi(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mn(e){if(Gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zu(e)&&e.host||en(e);return zu(t)?t.host:t}function Jf(e){const t=Mn(e);return Or(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&Fo(t)?t:Jf(t)}function yo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jf(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Et(o);if(i){const a=Xs(s);return t.concat(s,s.visualViewport||[],Fo(o)?o:[],a&&n?yo(a):[])}return t.concat(o,yo(o,[],n))}function Xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function __(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const er=Math.min,ot=Math.max,vo=Math.round,Go=Math.floor,Yt=e=>({x:e,y:e}),x_={left:"right",right:"left",bottom:"top",top:"bottom"},C_={start:"end",end:"start"};function qu(e,t,n){return ot(e,er(t,n))}function zr(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function Do(e){return e.split("-")[1]}function eh(e){return e==="x"?"y":"x"}function th(e){return e==="y"?"height":"width"}function tr(e){return["top","bottom"].includes(Nn(e))?"y":"x"}function nh(e){return eh(tr(e))}function S_(e,t,n){n===void 0&&(n=!1);const r=Do(e),o=nh(e),i=th(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Si(s)),[s,Si(s)]}function E_(e){const t=Si(e);return[Qs(e),t,Qs(t)]}function Qs(e){return e.replace(/start|end/g,t=>C_[t])}function k_(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function T_(e,t,n,r){const o=Do(e);let i=k_(Nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Qs)))),i}function Si(e){return e.replace(/left|right|bottom|top/g,t=>x_[t])}function A_(e){return{top:0,right:0,bottom:0,left:0,...e}}function $_(e){return typeof e!="number"?A_(e):{top:e,right:e,bottom:e,left:e}}function Ei(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Yu(e,t,n){let{reference:r,floating:o}=e;const i=tr(t),s=nh(t),a=th(s),l=Nn(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:c};break;case"left":f={x:r.x-o.width,y:c};break;default:f={x:r.x,y:r.y}}switch(Do(t)){case"start":f[s]-=p*(n&&u?-1:1);break;case"end":f[s]+=p*(n&&u?-1:1);break}return f}const M_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Yu(u,r,l),p=r,f={},h=0;for(let g=0;g<a.length;g++){const{name:w,fn:_}=a[g],{x:C,y:S,data:$,reset:O}=await _({x:d,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:u,platform:s,elements:{reference:e,floating:t}});d=C??d,c=S??c,f={...f,[w]:{...f[w],...$}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(u=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:d,y:c}=Yu(u,p,l)),g=-1)}return{x:d,y:c,placement:p,strategy:o,middlewareData:f}};async function qi(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:p=!1,padding:f=0}=zr(t,e),h=$_(f),w=a[p?c==="floating"?"reference":"floating":c],_=Ei(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),C=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),$=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},O=Ei(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:S,strategy:l}):C);return{top:(_.top-O.top+h.top)/$.y,bottom:(O.bottom-_.bottom+h.bottom)/$.y,left:(_.left-O.left+h.left)/$.x,right:(O.right-_.right+h.right)/$.x}}const N_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...w}=zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=Nn(o),C=tr(a),S=Nn(a)===a,$=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=p||(S||!g?[Si(a)]:E_(a)),P=h!=="none";!p&&P&&O.push(...T_(a,g,h,$));const F=[a,...O],v=await qi(t,w),y=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&y.push(v[_]),c){const H=S_(o,s,$);y.push(v[H[0]],v[H[1]])}if(k=[...k,{placement:o,overflows:y}],!y.every(H=>H<=0)){var T,N;const H=(((T=i.flip)==null?void 0:T.index)||0)+1,le=F[H];if(le)return{data:{index:H,overflows:k},reset:{placement:le}};let W=(N=k.filter(U=>U.overflows[0]<=0).sort((U,I)=>U.overflows[1]-I.overflows[1])[0])==null?void 0:N.placement;if(!W)switch(f){case"bestFit":{var D;const U=(D=k.filter(I=>{if(P){const B=tr(I.placement);return B===C||B==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(B=>B>0).reduce((B,L)=>B+L,0)]).sort((I,B)=>I[1]-B[1])[0])==null?void 0:D[0];U&&(W=U);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};async function I_(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Nn(n),a=Do(n),l=tr(n)==="y",u=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,c=zr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*d,y:p*u}:{x:p*u,y:f*d}}const O_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await I_(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},F_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:_,y:C}=w;return{x:_,y:C}}},...l}=zr(e,t),u={x:n,y:r},d=await qi(t,l),c=tr(Nn(o)),p=eh(c);let f=u[p],h=u[c];if(i){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",C=f+d[w],S=f-d[_];f=qu(C,f,S)}if(s){const w=c==="y"?"top":"left",_=c==="y"?"bottom":"right",C=h+d[w],S=h-d[_];h=qu(C,h,S)}const g=a.fn({...t,[p]:f,[c]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[c]:s}}}}}},D_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=zr(e,t),d=await qi(t,u),c=Nn(o),p=Do(o),f=tr(o)==="y",{width:h,height:g}=i.floating;let w,_;c==="top"||c==="bottom"?(w=c,_=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=c,w=p==="end"?"top":"bottom");const C=g-d.top-d.bottom,S=h-d.left-d.right,$=er(g-d[w],C),O=er(h-d[_],S),P=!t.middlewareData.shift;let F=$,v=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(v=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(F=C),P&&!p){const k=ot(d.left,0),T=ot(d.right,0),N=ot(d.top,0),D=ot(d.bottom,0);f?v=h-2*(k!==0||T!==0?k+T:ot(d.left,d.right)):F=g-2*(N!==0||D!==0?N+D:ot(d.top,d.bottom))}await l({...t,availableWidth:v,availableHeight:F});const y=await s.getDimensions(a.floating);return h!==y.width||g!==y.height?{reset:{rects:!0}}:{}}}};function rh(e){const t=Gt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vo(n)!==i||vo(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ka(e){return dt(e)?e:e.contextElement}function Sr(e){const t=Ka(e);if(!Qt(t))return Yt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rh(t);let s=(i?vo(n.width):n.width)/r,a=(i?vo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const P_=Yt(0);function oh(e){const t=Et(e);return!Za()||!t.visualViewport?P_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function R_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Et(e)?!1:t}function nr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ka(e);let s=Yt(1);t&&(r?dt(r)&&(s=Sr(r)):s=Sr(e));const a=R_(i,n,r)?oh(i):Yt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,c=o.height/s.y;if(i){const p=Et(i),f=r&&dt(r)?Et(r):r;let h=p,g=Xs(h);for(;g&&r&&f!==h;){const w=Sr(g),_=g.getBoundingClientRect(),C=Gt(g),S=_.left+(g.clientLeft+parseFloat(C.paddingLeft))*w.x,$=_.top+(g.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,c*=w.y,l+=S,u+=$,h=Et(g),g=Xs(h)}}return Ei({width:d,height:c,x:l,y:u})}function Xa(e,t){const n=zi(e).scrollLeft;return t?t.left+n:nr(en(e)).left+n}function ih(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Xa(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function L_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=en(r),a=t?Gi(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Yt(1);const d=Yt(0),c=Qt(r);if((c||!c&&!i)&&((Gr(r)!=="body"||Fo(s))&&(l=zi(r)),Qt(r))){const f=nr(r);u=Sr(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const p=s&&!c&&!i?ih(s,l,!0):Yt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function H_(e){return Array.from(e.getClientRects())}function j_(e){const t=en(e),n=zi(e),r=e.ownerDocument.body,o=ot(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ot(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xa(e);const a=-n.scrollTop;return Gt(r).direction==="rtl"&&(s+=ot(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function B_(e,t){const n=Et(e),r=en(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Za();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function V_(e,t){const n=nr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Qt(e)?Sr(e):Yt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Zu(e,t,n){let r;if(t==="viewport")r=B_(e,n);else if(t==="document")r=j_(en(e));else if(dt(t))r=V_(t,n);else{const o=oh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ei(r)}function sh(e,t){const n=Mn(e);return n===t||!dt(n)||Or(n)?!1:Gt(n).position==="fixed"||sh(n,t)}function U_(e,t){const n=t.get(e);if(n)return n;let r=yo(e,[],!1).filter(a=>dt(a)&&Gr(a)!=="body"),o=null;const i=Gt(e).position==="fixed";let s=i?Mn(e):e;for(;dt(s)&&!Or(s);){const a=Gt(s),l=Ya(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Fo(s)&&!l&&sh(e,s))?r=r.filter(d=>d!==s):o=a,s=Mn(s)}return t.set(e,r),r}function W_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Gi(t)?[]:U_(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,d)=>{const c=Zu(t,d,o);return u.top=ot(c.top,u.top),u.right=er(c.right,u.right),u.bottom=er(c.bottom,u.bottom),u.left=ot(c.left,u.left),u},Zu(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function G_(e){const{width:t,height:n}=rh(e);return{width:t,height:n}}function z_(e,t,n){const r=Qt(t),o=en(t),i=n==="fixed",s=nr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Yt(0);if(r||!r&&!i)if((Gr(t)!=="body"||Fo(o))&&(a=zi(t)),r){const p=nr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&(l.x=Xa(o));const u=o&&!r&&!i?ih(o,a):Yt(0),d=s.left+a.scrollLeft-l.x-u.x,c=s.top+a.scrollTop-l.y-u.y;return{x:d,y:c,width:s.width,height:s.height}}function ws(e){return Gt(e).position==="static"}function Ku(e,t){if(!Qt(e)||Gt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return en(e)===n&&(n=n.ownerDocument.body),n}function ah(e,t){const n=Et(e);if(Gi(e))return n;if(!Qt(e)){let o=Mn(e);for(;o&&!Or(o);){if(dt(o)&&!ws(o))return o;o=Mn(o)}return n}let r=Ku(e,t);for(;r&&v_(r)&&ws(r);)r=Ku(r,t);return r&&Or(r)&&ws(r)&&!Ya(r)?n:r||b_(e)||n}const q_=async function(e){const t=this.getOffsetParent||ah,n=this.getDimensions,r=await n(e.floating);return{reference:z_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Y_(e){return Gt(e).direction==="rtl"}const Z_={convertOffsetParentRelativeRectToViewportRelativeRect:L_,getDocumentElement:en,getClippingRect:W_,getOffsetParent:ah,getElementRects:q_,getClientRects:H_,getDimensions:G_,getScale:Sr,isElement:dt,isRTL:Y_};function lh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K_(e,t){let n=null,r;const o=en(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:c,width:p,height:f}=u;if(a||t(),!p||!f)return;const h=Go(c),g=Go(o.clientWidth-(d+p)),w=Go(o.clientHeight-(c+f)),_=Go(d),S={rootMargin:-h+"px "+-g+"px "+-w+"px "+-_+"px",threshold:ot(0,er(1,l))||1};let $=!0;function O(P){const F=P[0].intersectionRatio;if(F!==l){if(!$)return s();F?s(!1,F):r=setTimeout(()=>{s(!1,1e-7)},1e3)}F===1&&!lh(u,e.getBoundingClientRect())&&s(),$=!1}try{n=new IntersectionObserver(O,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(O,S)}n.observe(e)}return s(!0),i}function X_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ka(e),d=o||i?[...u?yo(u):[],...yo(t)]:[];d.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const c=u&&a?K_(u,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(_=>{let[C]=_;C&&C.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=f)==null||S.observe(t)})),n()}),u&&!l&&f.observe(u),f.observe(t));let h,g=l?nr(e):null;l&&w();function w(){const _=nr(e);g&&!lh(g,_)&&n(),g=_,h=requestAnimationFrame(w)}return n(),()=>{var _;d.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),c==null||c(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const ys=qi,Q_=O_,J_=F_,ex=N_,tx=D_,nx=(e,t,n)=>{const r=new Map,o={platform:Z_,...n},i={...o.platform,_c:r};return M_(e,t,{...o,platform:i})};var ei=typeof document<"u"?wn:Se;function ki(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ki(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ki(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xu(e,t){const n=uh(e);return Math.round(t*n)/n}function vs(e){const t=K(e);return ei(()=>{t.current=e}),t}function rx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=ae({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=ae(r);ki(p,r)||f(r);const[h,g]=ae(null),[w,_]=ae(null),C=ve(I=>{I!==P.current&&(P.current=I,g(I))},[]),S=ve(I=>{I!==F.current&&(F.current=I,_(I))},[]),$=i||h,O=s||w,P=K(null),F=K(null),v=K(d),y=l!=null,k=vs(l),T=vs(o),N=vs(u),D=ve(()=>{if(!P.current||!F.current)return;const I={placement:t,strategy:n,middleware:p};T.current&&(I.platform=T.current),nx(P.current,F.current,I).then(B=>{const L={...B,isPositioned:N.current!==!1};H.current&&!ki(v.current,L)&&(v.current=L,St(()=>{c(L)}))})},[p,t,n,T,N]);ei(()=>{u===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,c(I=>({...I,isPositioned:!1})))},[u]);const H=K(!1);ei(()=>(H.current=!0,()=>{H.current=!1}),[]),ei(()=>{if($&&(P.current=$),O&&(F.current=O),$&&O){if(k.current)return k.current($,O,D);D()}},[$,O,D,k,y]);const le=te(()=>({reference:P,floating:F,setReference:C,setFloating:S}),[C,S]),W=te(()=>({reference:$,floating:O}),[$,O]),U=te(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const B=Xu(W.floating,d.x),L=Xu(W.floating,d.y);return a?{...I,transform:"translate("+B+"px, "+L+"px)",...uh(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:L}},[n,a,W.floating,d.x,d.y]);return te(()=>({...d,update:D,refs:le,elements:W,floatingStyles:U}),[d,D,le,W,U])}const ch=(e,t)=>({...Q_(e),options:[e,t]}),ox=(e,t)=>({...J_(e),options:[e,t]}),ix=(e,t)=>({...ex(e),options:[e,t]}),sx=(e,t)=>({...tx(e),options:[e,t]}),dh={...oi},ax=dh.useInsertionEffect,lx=ax||(e=>e());function fh(e){const t=K(()=>{});return lx(()=>{t.current=e}),ve(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Js=typeof document<"u"?wn:Se;let Qu=!1,ux=0;const Ju=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ux++;function cx(){const[e,t]=ae(()=>Qu?Ju():void 0);return Js(()=>{e==null&&t(Ju())},[]),Se(()=>{Qu=!0},[]),e}const dx=dh.useId,fx=dx||cx;function hx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const mx=Be(null),px=Be(null),gx=()=>{var e;return((e=Ee(mx))==null?void 0:e.id)||null},wx=()=>Ee(px),yx="data-floating-ui-focusable";function vx(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fx(),i=K({}),[s]=ae(()=>hx()),a=gx()!=null,[l,u]=ae(r.reference),d=fh((f,h,g)=>{i.current.openEvent=f?h:void 0,s.emit("openchange",{open:f,event:h,reason:g,nested:a}),n==null||n(f,h,g)}),c=te(()=>({setPositionReference:u}),[]),p=te(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return te(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:s,floatingId:o,refs:c}),[t,d,p,s,o,c])}function bx(e){e===void 0&&(e={});const{nodeId:t}=e,n=vx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=ae(null),[a,l]=ae(null),d=(o==null?void 0:o.domReference)||i,c=K(null),p=wx();Js(()=>{d&&(c.current=d)},[d]);const f=rx({...e,elements:{...o,...a&&{reference:a}}}),h=ve(S=>{const $=dt(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l($),f.refs.setReference($)},[f.refs]),g=ve(S=>{(dt(S)||S===null)&&(c.current=S,s(S)),(dt(f.refs.reference.current)||f.refs.reference.current===null||S!==null&&!dt(S))&&f.refs.setReference(S)},[f.refs]),w=te(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:c}),[f.refs,g,h]),_=te(()=>({...f.elements,domReference:d}),[f.elements,d]),C=te(()=>({...f,...r,refs:w,elements:_,nodeId:t}),[f,w,_,t,r]);return Js(()=>{r.dataRef.current.floatingContext=C;const S=p==null?void 0:p.nodesRef.current.find($=>$.id===t);S&&(S.context=C)}),te(()=>({...f,context:C,refs:w,elements:_}),[f,w,_,C])}const ec="active",tc="selected";function bs(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ec]:s,[tc]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[yx]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,d]=l;if(!(o&&[ec,tc].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var c;(c=r.get(u))==null||c.push(d),s[u]=function(){for(var p,f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(u))==null?void 0:p.map(w=>w(...h)).find(w=>w!==void 0)}}}else s[u]=d}),s),{})}}function _x(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=ve(a=>bs(a,e,"reference"),t),i=ve(a=>bs(a,e,"floating"),n),s=ve(a=>bs(a,e,"item"),r);return te(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function nc(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const xx=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...d}=zr(e,t),{rects:c,elements:{floating:p}}=t,f=n.current[s],h=(u==null?void 0:u.current)||p,g=p.clientTop||h.clientTop,w=p.clientTop!==0,_=h.clientTop!==0,C=p===h;if(!f)return{};const S={...t,...await ch(-f.offsetTop-p.clientTop-c.reference.height/2-f.offsetHeight/2-i).fn(t)},$=await ys(nc(S,h.scrollHeight+g+p.clientTop),d),O=await ys(S,{...d,elementContext:"reference"}),P=ot(0,$.top),F=S.y+P,k=(h.scrollHeight>h.clientHeight?T=>T:vo)(ot(0,h.scrollHeight+(w&&C||_?g*2:0)-P-ot(0,$.bottom)));if(h.style.maxHeight=k+"px",h.scrollTop=P,o){const T=h.offsetHeight<f.offsetHeight*er(a,n.current.length)-1||O.top>=-l||O.bottom>=-l;St(()=>o(T))}return r&&(r.current=await ys(nc({...S,y:F},h.offsetHeight+g+p.clientTop),d)),{y:F}}});function Cx(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=fh(a),u=K(!1),d=K(null),c=K(null);Se(()=>{if(!o)return;function f(g){if(g.ctrlKey||!h||i.current==null)return;const w=g.deltaY,_=i.current.top>=-.5,C=i.current.bottom>=-.5,S=h.scrollHeight-h.clientHeight,$=w<0?-1:1,O=w<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&w>0||!C&&w<0?(g.preventDefault(),St(()=>{l(P=>P+Math[O](w,S*$))})):/firefox/i.test(__())&&(h.scrollTop+=w))}const h=(s==null?void 0:s.current)||r.floating;if(n&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{d.current=h.scrollTop,i.current!=null&&(c.current={...i.current})}),()=>{d.current=null,c.current=null,h.removeEventListener("wheel",f)}},[o,n,r.floating,i,s,l]);const p=te(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const f=(s==null?void 0:s.current)||r.floating;if(!(!i.current||!f||!u.current)){if(d.current!==null){const h=f.scrollTop-d.current;(i.current.bottom<-.5&&h<-1||i.current.top<-.5&&h>1)&&St(()=>l(g=>g+h))}requestAnimationFrame(()=>{d.current=f.scrollTop})}}}),[r.floating,l,i,s]);return te(()=>o?{floating:p}:{},[o,p])}let qr=Be({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});qr.displayName="FloatingContext";let Qa=Be(null);Qa.displayName="PlacementContext";function Sx(e){return te(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Ex(){return Ee(qr).setReference}function kx(){return Ee(qr).getReferenceProps}function Tx(){let{getFloatingProps:e,slot:t}=Ee(qr);return ve((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Ax(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=Ee(Qa),n=te(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);Pe(()=>{t==null||t(n??null)},[t,n]);let r=Ee(qr);return te(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let rc=4;function $x({children:e,enabled:t=!0}){let[n,r]=ae(null),[o,i]=ae(0),s=K(null),[a,l]=ae(null);Mx(a);let u=t&&n!==null&&a!==null,{to:d="bottom",gap:c=0,offset:p=0,padding:f=0,inner:h}=Nx(n,a),[g,w="center"]=d.split(" ");Pe(()=>{u&&i(0)},[u]);let{refs:_,floatingStyles:C,context:S}=bx({open:u,placement:g==="selection"?w==="center"?"bottom":`bottom-${w}`:w==="center"?`${g}`:`${g}-${w}`,strategy:"absolute",transform:!1,middleware:[ch({mainAxis:g==="selection"?0:c,crossAxis:p}),ox({padding:f}),g!=="selection"&&ix({padding:f}),g==="selection"&&h?xx({...h,padding:f,overflowRef:s,offset:o,minItemsVisible:rc,referenceOverflowThreshold:f,onFallbackChange(T){var N,D;if(!T)return;let H=S.elements.floating;if(!H)return;let le=parseFloat(getComputedStyle(H).scrollPaddingBottom)||0,W=Math.min(rc,H.childElementCount),U=0,I=0;for(let B of(D=(N=S.elements.floating)==null?void 0:N.childNodes)!=null?D:[])if(B instanceof HTMLElement){let L=B.offsetTop,re=L+B.clientHeight+le,q=H.scrollTop,M=q+H.clientHeight;if(L>=q&&re<=M)W--;else{I=Math.max(0,Math.min(re,M)-Math.max(L,q)),U=B.clientHeight;break}}W>=1&&i(B=>{let L=U*W-I+le;return B>=L?B:L})}}):null,sx({padding:f,apply({availableWidth:T,availableHeight:N,elements:D}){Object.assign(D.floating.style,{overflow:"auto",maxWidth:`${T}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${N}px)`})}})].filter(Boolean),whileElementsMounted:X_}),[$=g,O=w]=S.placement.split("-");g==="selection"&&($="selection");let P=te(()=>({anchor:[$,O].filter(Boolean).join(" ")}),[$,O]),F=Cx(S,{overflowRef:s,onChange:i}),{getReferenceProps:v,getFloatingProps:y}=_x([F]),k=ee(T=>{l(T),_.setFloating(T)});return m(Qa.Provider,{value:r},m(qr.Provider,{value:{setFloating:k,setReference:_.setReference,styles:C,getReferenceProps:v,getFloatingProps:y,slot:P}},e))}function Mx(e){Pe(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Nx(e,t){var n,r,o;let i=_s((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),s=_s((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=_s((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function _s(e,t,n=void 0){let r=In(),o=ee((l,u)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[n,null];let d=oc(l,u);return[d,c=>{let p=hh(l);{let f=p.map(h=>window.getComputedStyle(u).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let g=!1;for(let[_,C]of p.entries()){let S=window.getComputedStyle(u).getPropertyValue(C);if(f[_]!==S){f[_]=S,g=!0;break}}if(!g)return;let w=oc(l,u);d!==w&&(c(w),d=w)})}return r.dispose}]}return[n,null]}),i=te(()=>o(e,t)[0],[e,t]),[s=i,a]=ae();return Pe(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function hh(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...hh(o)]:[r]}return[]}function oc(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Ix(e,t){let[n,r]=ae(t);return!e&&n!==t&&r(t),e?n:t}let Yi=Be(null);Yi.displayName="OpenClosedContext";var ft=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ft||{});function Po(){return Ee(Yi)}function mh({value:e,children:t}){return V.createElement(Yi.Provider,{value:e},t)}function Ox({children:e}){return V.createElement(Yi.Provider,{value:null},e)}function Fx(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let En=[];Fx(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||En[0]===t.target)return;let n=t.target;n=n.closest(Ci),En.unshift(n??t.target),En=En.filter(r=>r!=null&&r.isConnected),En.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Dx(e){throw new Error("Unexpected object: "+e)}var Xe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Xe||{});function xs(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:Dx(e)}}function ph(e){let t=ee(e),n=K(!1);Se(()=>(n.current=!1,()=>{n.current=!0,Bi(()=>{n.current&&t()})}),[t])}function Px(){let e=typeof document>"u";return"useSyncExternalStore"in oi?(t=>t.useSyncExternalStore)(oi)(()=>()=>{},()=>!1,()=>!e):!1}function Ro(){let e=Px(),[t,n]=ae(Zn.isHandoffComplete);return t&&Zn.isHandoffComplete===!1&&n(!1),Se(()=>{t!==!0&&n(!0)},[t]),Se(()=>Zn.handoff(),[]),e?!1:t}let gh=Be(!1);function Rx(){return Ee(gh)}function ic(e){return V.createElement(gh.Provider,{value:e.force},e.children)}function Lx(e){let t=Rx(),n=Ee(yh),r=Wr(e),[o,i]=ae(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Zn.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)});return Se(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),Se(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let wh=Oe,Hx=qe(function(e,t){let n=e,r=K(null),o=it(Nb(c=>{r.current=c}),t),i=Wr(r),s=Lx(r),[a]=ae(()=>{var c;return Zn.isServer?null:(c=i==null?void 0:i.createElement("div"))!=null?c:null}),l=Ee(ea),u=Ro();Pe(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),Pe(()=>{if(a&&l)return l.register(a)},[l,a]),ph(()=>{var c;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((c=s.parentElement)==null||c.removeChild(s)))});let d=et();return u?!s||!a?null:Mi(d({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:wh,name:"Portal"}),a):null});function jx(e,t){let n=it(t),{enabled:r=!0,...o}=e,i=et();return r?V.createElement(Hx,{...o,ref:n}):i({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:wh,name:"Portal"})}let Bx=Oe,yh=Be(null);function Vx(e,t){let{target:n,...r}=e,o={ref:it(t)},i=et();return V.createElement(yh.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:Bx,name:"Popover.Group"}))}let ea=Be(null);function Ux(){let e=Ee(ea),t=K([]),n=ee(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=ee(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=te(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,te(()=>function({children:i}){return V.createElement(ea.Provider,{value:o},i)},[o])]}let Wx=qe(jx),vh=qe(Vx),bh=Object.assign(Wx,{Group:vh});function Gx(e,t=typeof document<"u"?document.defaultView:null,n){let r=Ur(e,"escape");Yf(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Ye.Escape&&n(o))})}function zx(){var e;let[t]=ae(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=ae((e=t==null?void 0:t.matches)!=null?e:!1);return Pe(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function qx({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Wr(n),o=ee(()=>{var i,s;let a=[];for(let l of e)l!==null&&(l instanceof HTMLElement?a.push(l):"current"in l&&l.current instanceof HTMLElement&&a.push(l.current));if(t!=null&&t.current)for(let l of t.current)a.push(l);for(let l of(i=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?i:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(n&&(l.contains(n)||l.contains((s=n==null?void 0:n.getRootNode())==null?void 0:s.host))||a.some(u=>l.contains(u))||a.push(l));return a});return{resolveContainers:o,contains:ee(i=>o().some(s=>s.contains(i)))}}let _h=Be(null);function sc({children:e,node:t}){let[n,r]=ae(null),o=xh(t??n);return V.createElement(_h.Provider,{value:o},e,o===null&&V.createElement(wo,{features:Ir.Hidden,ref:i=>{var s,a;if(i){for(let l of(a=(s=Vr(i))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?a:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(i)){r(l);break}}}}))}function xh(e=null){var t;return(t=Ee(_h))!=null?t:e}function Ja(){let e=K(!1);return Pe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var ao=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ao||{});function Yx(){let e=K(0);return zf(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Ch(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Zx="div";var Vn=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Vn||{});function Kx(e,t){let n=K(null),r=it(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...l}=e;Ro()||(a=0);let u=Wr(n);e2(a,{ownerDocument:u});let d=t2(a,{ownerDocument:u,container:n,initialFocus:o,initialFocusFallback:i});n2(a,{ownerDocument:u,container:n,containers:s,previousActiveElement:d});let c=Yx(),p=ee(C=>{let S=n.current;S&&($=>$())(()=>{gt(c.current,{[ao.Forwards]:()=>{Cr(S,Vt.First,{skipElements:[C.relatedTarget,i]})},[ao.Backwards]:()=>{Cr(S,Vt.Last,{skipElements:[C.relatedTarget,i]})}})})}),f=Ur(!!(a&2),"focus-trap#tab-lock"),h=In(),g=K(!1),w={ref:r,onKeyDown(C){C.key=="Tab"&&(g.current=!0,h.requestAnimationFrame(()=>{g.current=!1}))},onBlur(C){if(!(a&4))return;let S=Ch(s);n.current instanceof HTMLElement&&S.add(n.current);let $=C.relatedTarget;$ instanceof HTMLElement&&$.dataset.headlessuiFocusGuard!=="true"&&(Sh(S,$)||(g.current?Cr(n.current,gt(c.current,{[ao.Forwards]:()=>Vt.Next,[ao.Backwards]:()=>Vt.Previous})|Vt.WrapAround,{relativeTo:C.target}):C.target instanceof HTMLElement&&dn(C.target)))}},_=et();return V.createElement(V.Fragment,null,f&&V.createElement(wo,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ir.Focusable}),_({ourProps:w,theirProps:l,defaultTag:Zx,name:"FocusTrap"}),f&&V.createElement(wo,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ir.Focusable}))}let Xx=qe(Kx),Qx=Object.assign(Xx,{features:Vn});function Jx(e=!0){let t=K(En.slice());return qa(([n],[r])=>{r===!0&&n===!1&&Bi(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=En.slice())},[e,En,t]),ee(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function e2(e,{ownerDocument:t}){let n=!!(e&8),r=Jx(n);qa(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&dn(r())},[n]),ph(()=>{n&&dn(r())})}function t2(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=K(null),s=Ur(!!(e&1),"focus-trap#initial-focus"),a=Ja();return qa(()=>{if(e===0)return;if(!s){o!=null&&o.current&&dn(o.current);return}let l=n.current;l&&Bi(()=>{if(!a.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){i.current=u;return}}else if(l.contains(u)){i.current=u;return}if(r!=null&&r.current)dn(r.current);else{if(e&16){if(Cr(l,Vt.First|Vt.AutoFocus)!==Ks.Error)return}else if(Cr(l,Vt.First)!==Ks.Error)return;if(o!=null&&o.current&&(dn(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,s,e]),i}function n2(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=Ja(),s=!!(e&4);Yf(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!i.current)return;let l=Ch(r);n.current instanceof HTMLElement&&l.add(n.current);let u=o.current;if(!u)return;let d=a.target;d&&d instanceof HTMLElement?Sh(l,d)?(o.current=d,dn(d)):(a.preventDefault(),a.stopPropagation(),dn(u)):dn(o.current)},!0)}function Sh(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Eh(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Th)!==Oe||V.Children.count(e.children)===1}let Zi=Be(null);Zi.displayName="TransitionContext";var r2=(e=>(e.Visible="visible",e.Hidden="hidden",e))(r2||{});function o2(){let e=Ee(Zi);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function i2(){let e=Ee(Ki);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ki=Be(null);Ki.displayName="NestingContext";function Xi(e){return"children"in e?Xi(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function kh(e,t){let n=On(e),r=K([]),o=Ja(),i=In(),s=ee((f,h=kn.Hidden)=>{let g=r.current.findIndex(({el:w})=>w===f);g!==-1&&(gt(h,{[kn.Unmount](){r.current.splice(g,1)},[kn.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var w;!Xi(r)&&o.current&&((w=n.current)==null||w.call(n))}))}),a=ee(f=>{let h=r.current.find(({el:g})=>g===f);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:f,state:"visible"}),()=>s(f,kn.Unmount)}),l=K([]),u=K(Promise.resolve()),d=K({enter:[],leave:[]}),c=ee((f,h,g)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([w])=>w!==f)),t==null||t.chains.current[h].push([f,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[h].push([f,new Promise(w=>{Promise.all(d.current[h].map(([_,C])=>C)).then(()=>w())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(h)):g(h)}),p=ee((f,h,g)=>{Promise.all(d.current[h].splice(0).map(([w,_])=>_)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>g(h))});return te(()=>({children:r,register:a,unregister:s,onStart:c,onStop:p,wait:u,chains:d}),[a,s,r,c,p,d,u])}let Th=Oe,Ah=Nr.RenderStrategy;function s2(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:p,leave:f,leaveFrom:h,leaveTo:g,...w}=e,[_,C]=ae(null),S=K(null),$=Eh(e),O=it(...$?[S,t,C]:t===null?[]:[t]),P=(n=w.unmount)==null||n?kn.Unmount:kn.Hidden,{show:F,appear:v,initial:y}=o2(),[k,T]=ae(F?"visible":"hidden"),N=i2(),{register:D,unregister:H}=N;Pe(()=>D(S),[D,S]),Pe(()=>{if(P===kn.Hidden&&S.current){if(F&&k!=="visible"){T("visible");return}return gt(k,{hidden:()=>H(S),visible:()=>D(S)})}},[k,S,D,H,F,P]);let le=Ro();Pe(()=>{if($&&le&&k==="visible"&&S.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[S,k,le,$]);let W=y&&!v,U=v&&F&&y,I=K(!1),B=kh(()=>{I.current||(T("hidden"),H(S))},N),L=ee(Ne=>{I.current=!0;let Q=Ne?"enter":"leave";B.onStart(S,Q,fe=>{fe==="enter"?i==null||i():fe==="leave"&&(a==null||a())})}),re=ee(Ne=>{let Q=Ne?"enter":"leave";I.current=!1,B.onStop(S,Q,fe=>{fe==="enter"?s==null||s():fe==="leave"&&(l==null||l())}),Q==="leave"&&!Xi(B)&&(T("hidden"),H(S))});Se(()=>{$&&o||(L(F),re(F))},[F,$,o]);let q=!(!o||!$||!le||W),[,M]=Xf(q,_,F,{start:L,end:re}),Y=Sn({ref:O,className:((r=Ys(w.className,U&&u,U&&d,M.enter&&u,M.enter&&M.closed&&d,M.enter&&!M.closed&&c,M.leave&&f,M.leave&&!M.closed&&h,M.leave&&M.closed&&g,!M.transition&&F&&p))==null?void 0:r.trim())||void 0,...Kf(M)}),oe=0;k==="visible"&&(oe|=ft.Open),k==="hidden"&&(oe|=ft.Closed),M.enter&&(oe|=ft.Opening),M.leave&&(oe|=ft.Closing);let Ae=et();return V.createElement(Ki.Provider,{value:B},V.createElement(mh,{value:oe},Ae({ourProps:Y,theirProps:w,defaultTag:Th,features:Ah,visible:k==="visible",name:"Transition.Child"})))}function a2(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=K(null),a=Eh(e),l=it(...a?[s,t]:t===null?[]:[t]);Ro();let u=Po();if(n===void 0&&u!==null&&(n=(u&ft.Open)===ft.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=ae(n?"visible":"hidden"),p=kh(()=>{n||c("hidden")}),[f,h]=ae(!0),g=K([n]);Pe(()=>{f!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),h(!1))},[g,n]);let w=te(()=>({show:n,appear:r,initial:f}),[n,r,f]);Pe(()=>{n?c("visible"):!Xi(p)&&s.current!==null&&c("hidden")},[n,p]);let _={unmount:o},C=ee(()=>{var O;f&&h(!1),(O=e.beforeEnter)==null||O.call(e)}),S=ee(()=>{var O;f&&h(!1),(O=e.beforeLeave)==null||O.call(e)}),$=et();return V.createElement(Ki.Provider,{value:p},V.createElement(Zi.Provider,{value:w},$({ourProps:{..._,as:Oe,children:V.createElement($h,{ref:l,..._,...i,beforeEnter:C,beforeLeave:S})},theirProps:{},defaultTag:Oe,features:Ah,visible:d==="visible",name:"Transition"})))}function l2(e,t){let n=Ee(Zi)!==null,r=Po()!==null;return V.createElement(V.Fragment,null,!n&&r?V.createElement(ta,{ref:t,...e}):V.createElement($h,{ref:t,...e}))}let ta=qe(a2),$h=qe(s2),el=qe(l2),u2=Object.assign(ta,{Child:el,Root:ta});var c2=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(c2||{}),d2=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(d2||{});let f2={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},tl=Be(null);tl.displayName="DialogContext";function Qi(e){let t=Ee(tl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qi),n}return t}function h2(e,t){return gt(t.type,f2,e,t)}let ac=qe(function(e,t){let n=Ft(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:l=!0,__demoMode:u=!1,unmount:d=!1,...c}=e,p=K(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(p.current||(p.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=Po();o===void 0&&f!==null&&(o=(f&ft.Open)===ft.Open);let h=K(null),g=it(h,t),w=Wr(h),_=o?0:1,[C,S]=or(h2,{titleId:null,descriptionId:null,panelRef:Ai()}),$=ee(()=>i(!1)),O=ee(re=>S({type:0,id:re})),P=Ro()?_===0:!1,[F,v]=Ux(),y={get current(){var re;return(re=C.panelRef.current)!=null?re:h.current}},k=xh(),{resolveContainers:T}=qx({mainTreeNode:k,portals:F,defaultContainers:[y]}),N=f!==null?(f&ft.Closing)===ft.Closing:!1;jf(u||N?!1:P,{allowed:ee(()=>{var re,q;return[(q=(re=h.current)==null?void 0:re.closest("[data-headlessui-portal]"))!=null?q:null]}),disallowed:ee(()=>{var re;return[(re=k==null?void 0:k.closest("body > *:not(#headlessui-portal-root)"))!=null?re:null]})}),qf(P,T,re=>{re.preventDefault(),$()}),Gx(P,w==null?void 0:w.defaultView,re=>{re.preventDefault(),re.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Zf(u||N?!1:P,w,T),Bf(P,h,$);let[D,H]=Ob(),le=te(()=>[{dialogState:_,close:$,setTitleId:O,unmount:d},C],[_,C,$,O,d]),W=te(()=>({open:_===0}),[_]),U={ref:g,id:r,role:a,tabIndex:-1,"aria-modal":u?void 0:_===0?!0:void 0,"aria-labelledby":C.titleId,"aria-describedby":D,unmount:d},I=!zx(),B=Vn.None;P&&!u&&(B|=Vn.RestoreFocus,B|=Vn.TabLock,l&&(B|=Vn.AutoFocus),I&&(B|=Vn.InitialFocus));let L=et();return V.createElement(Ox,null,V.createElement(ic,{force:!0},V.createElement(bh,null,V.createElement(tl.Provider,{value:le},V.createElement(vh,{target:h},V.createElement(ic,{force:!1},V.createElement(H,{slot:W},V.createElement(v,null,V.createElement(Qx,{initialFocus:s,initialFocusFallback:h,containers:T,features:B},V.createElement(Wb,{value:$},L({ourProps:U,theirProps:c,slot:W,defaultTag:m2,features:p2,visible:_===0,name:"Dialog"})))))))))))}),m2="div",p2=Nr.RenderStrategy|Nr.Static;function g2(e,t){let{transition:n=!1,open:r,...o}=e,i=Po(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?V.createElement(sc,null,V.createElement(u2,{show:r,transition:n,unmount:o.unmount},V.createElement(ac,{ref:t,...o}))):V.createElement(sc,null,V.createElement(ac,{ref:t,open:r,...o}))}let w2="div";function y2(e,t){let n=Ft(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s,unmount:a},l]=Qi("Dialog.Panel"),u=it(t,l.panelRef),d=te(()=>({open:s===0}),[s]),c=ee(w=>{w.stopPropagation()}),p={ref:u,id:r,onClick:c},f=o?el:Oe,h=o?{unmount:a}:{},g=et();return V.createElement(f,{...h},g({ourProps:p,theirProps:i,slot:d,defaultTag:w2,name:"Dialog.Panel"}))}let v2="div";function b2(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:i}]=Qi("Dialog.Backdrop"),s=te(()=>({open:o===0}),[o]),a={ref:t,"aria-hidden":!0},l=n?el:Oe,u=n?{unmount:i}:{},d=et();return V.createElement(l,{...u},d({ourProps:a,theirProps:r,slot:s,defaultTag:v2,name:"Dialog.Backdrop"}))}let _2="h2";function x2(e,t){let n=Ft(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=Qi("Dialog.Title"),a=it(t);Se(()=>(s(r),()=>s(null)),[r,s]);let l=te(()=>({open:i===0}),[i]),u={ref:a,id:r};return et()({ourProps:u,theirProps:o,slot:l,defaultTag:_2,name:"Dialog.Title"})}let C2=qe(g2),S2=qe(y2),E2=qe(b2),k2=qe(x2),Mh=Object.assign(C2,{Panel:S2,Title:k2,Description:Rb});function T2(e,t){let n=K({left:0,top:0});if(Pe(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(n.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let lc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function uc(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(n=o.innerText)!=null?n:"":r;return lc.test(s)&&(s=s.replace(lc,"")),s}function A2(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():uc(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return uc(e).trim()}function $2(e){let t=K(""),n=K("");return ee(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=A2(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var M2=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(M2||{}),N2=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(N2||{}),I2=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(I2||{}),O2=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(O2||{});function Cs(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Wf(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let F2={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(o=>n(o.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Xe.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Xe.Specific)return{...a,activeOptionIndex:e.options.findIndex(d=>d.id===t.id)};if(t.focus===Xe.Previous){let d=e.activeOptionIndex;if(d!==null){let c=e.options[d].dataRef.current.domRef,p=xs(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(p!==null){let f=e.options[p].dataRef.current.domRef;if(((r=c.current)==null?void 0:r.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:p}}}}else if(t.focus===Xe.Next){let d=e.activeOptionIndex;if(d!==null){let c=e.options[d].dataRef.current.domRef,p=xs(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(p!==null){let f=e.options[p].dataRef.current.domRef;if(((i=c.current)==null?void 0:i.nextElementSibling)===f.current||((s=f.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:p}}}}let l=Cs(e),u=xs(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Cs(e,o=>[...o,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Cs(e,r=>{let o=r.findIndex(i=>i.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},nl=Be(null);nl.displayName="ListboxActionsContext";function Ji(e){let t=Ee(nl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ji),n}return t}let es=Be(null);es.displayName="ListboxDataContext";function Lo(e){let t=Ee(es);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Lo),n}return t}function D2(e,t){return gt(t.type,F2,e,t)}let P2=Oe;function R2(e,t){var n;let r=Ga(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:d=!1,disabled:c=r||!1,horizontal:p=!1,multiple:f=!1,__demoMode:h=!1,...g}=e;const w=p?"horizontal":"vertical";let _=it(t),C=bb(i),[S=f?[]:void 0,$]=vb(o,l,C),[O,P]=or(D2,{dataRef:Ai(),listboxState:h?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:h}),F=K({static:!1,hold:!1}),v=K(new Map),y=zb(u),k=ve(X=>gt(T.mode,{1:()=>S.some(he=>y(he,X)),0:()=>y(S,X)}),[S]),T=te(()=>({...O,value:S,disabled:c,invalid:d,mode:f?1:0,orientation:w,compare:y,isSelected:k,optionsPropsRef:F,listRef:v}),[S,c,d,f,O,v]);Pe(()=>{O.dataRef.current=T},[T]);let N=T.listboxState===0;qf(N,[T.buttonElement,T.optionsElement],(X,he)=>{var ie;P({type:1}),Uf(he,za.Loose)||(X.preventDefault(),(ie=T.buttonElement)==null||ie.focus())});let D=te(()=>({open:T.listboxState===0,disabled:c,invalid:d,value:S}),[T,c,S,d]),H=ee(X=>{let he=T.options.find(ie=>ie.id===X);he&&re(he.dataRef.current.value)}),le=ee(()=>{if(T.activeOptionIndex!==null){let{dataRef:X,id:he}=T.options[T.activeOptionIndex];re(X.current.value),P({type:2,focus:Xe.Specific,id:he})}}),W=ee(()=>P({type:0})),U=ee(()=>P({type:1})),I=In(),B=ee((X,he,ie)=>{I.dispose(),I.microTask(()=>X===Xe.Specific?P({type:2,focus:Xe.Specific,id:he,trigger:ie}):P({type:2,focus:X,trigger:ie}))}),L=ee((X,he)=>(P({type:5,id:X,dataRef:he}),()=>P({type:6,id:X}))),re=ee(X=>gt(T.mode,{0(){return $==null?void 0:$(X)},1(){let he=T.value.slice(),ie=he.findIndex(we=>y(we,X));return ie===-1?he.push(X):he.splice(ie,1),$==null?void 0:$(he)}})),q=ee(X=>P({type:3,value:X})),M=ee(()=>P({type:4})),Y=ee(X=>{P({type:7,element:X})}),oe=ee(X=>{P({type:8,element:X})}),Ae=te(()=>({onChange:re,registerOption:L,goToOption:B,closeListbox:U,openListbox:W,selectActiveOption:le,selectOption:H,search:q,clearSearch:M,setButtonElement:Y,setOptionsElement:oe}),[]),[Ne,Q]=Lb({inherit:!0}),fe={ref:_},ue=ve(()=>{if(C!==void 0)return $==null?void 0:$(C)},[$,C]),_e=et();return V.createElement(Q,{value:Ne,props:{htmlFor:(n=T.buttonElement)==null?void 0:n.id},slot:{open:T.listboxState===0,disabled:c}},V.createElement($x,null,V.createElement(nl.Provider,{value:Ae},V.createElement(es.Provider,{value:T},V.createElement(mh,{value:gt(T.listboxState,{0:ft.Open,1:ft.Closed})},a!=null&&S!=null&&V.createElement(kb,{disabled:c,data:{[a]:S},form:s,onReset:ue}),_e({ourProps:fe,theirProps:g,slot:D,defaultTag:P2,name:"Listbox"}))))))}let L2="button";function H2(e,t){var n;let r=Lo("Listbox.Button"),o=Ji("Listbox.Button"),i=Ft(),s=Of(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...d}=e,c=it(t,Ex(),o.setButtonElement),p=kx(),f=ee(T=>{switch(T.key){case Ye.Enter:_b(T.currentTarget);break;case Ye.Space:case Ye.ArrowDown:T.preventDefault(),St(()=>o.openListbox()),r.value||o.goToOption(Xe.First);break;case Ye.ArrowUp:T.preventDefault(),St(()=>o.openListbox()),r.value||o.goToOption(Xe.Last);break}}),h=ee(T=>{switch(T.key){case Ye.Space:T.preventDefault();break}}),g=ee(T=>{var N;if($b(T.currentTarget))return T.preventDefault();r.listboxState===0?(St(()=>o.closeListbox()),(N=r.buttonElement)==null||N.focus({preventScroll:!0})):(T.preventDefault(),o.openListbox())}),w=ee(T=>T.preventDefault()),_=Rf([a]),C=Ib(),{isFocusVisible:S,focusProps:$}=ab({autoFocus:u}),{isHovered:O,hoverProps:P}=sb({isDisabled:l}),{pressed:F,pressProps:v}=hb({disabled:l}),y=te(()=>({open:r.listboxState===0,active:F||r.listboxState===0,disabled:l,invalid:r.invalid,value:r.value,hover:O,focus:S,autofocus:u}),[r.listboxState,r.value,l,O,S,F,r.invalid,u]),k=$f(p(),{ref:c,id:a,type:s_(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":(n=r.optionsElement)==null?void 0:n.id,"aria-expanded":r.listboxState===0,"aria-labelledby":_,"aria-describedby":C,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:h,onKeyPress:w,onClick:g},$,P,v);return et()({ourProps:k,theirProps:d,slot:y,defaultTag:L2,name:"Listbox.Button"})}let Nh=Be(!1),j2="div",B2=Nr.RenderStrategy|Nr.Static;function V2(e,t){var n,r;let o=Ft(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...d}=e,c=Sx(s),[p,f]=ae(null);c&&(a=!0);let h=Lo("Listbox.Options"),g=Ji("Listbox.Options"),w=Wr(h.optionsElement),_=Po(),[C,S]=Xf(u,p,_!==null?(_&ft.Open)===ft.Open:h.listboxState===0);Bf(C,h.buttonElement,g.closeListbox);let $=h.__demoMode?!1:l&&h.listboxState===0;Zf($,w);let O=h.__demoMode?!1:l&&h.listboxState===0;jf(O,{allowed:ve(()=>[h.buttonElement,h.optionsElement],[h.buttonElement,h.optionsElement])});let P=h.listboxState!==0,F=T2(P,h.buttonElement)?!1:C,v=C&&h.listboxState===1,y=Ix(v,h.value),k=ee(M=>h.compare(y,M)),T=te(()=>{var M;if(c==null||!((M=c==null?void 0:c.to)!=null&&M.includes("selection")))return null;let Y=h.options.findIndex(oe=>k(oe.dataRef.current.value));return Y===-1&&(Y=0),Y},[c,h.options]),N=(()=>{if(c==null)return;if(T===null)return{...c,inner:void 0};let M=Array.from(h.listRef.current.values());return{...c,inner:{listRef:{current:M},index:T}}})(),[D,H]=Ax(N),le=Tx(),W=it(t,c?D:null,g.setOptionsElement,f),U=In();Se(()=>{var M;let Y=h.optionsElement;Y&&h.listboxState===0&&Y!==((M=Vr(Y))==null?void 0:M.activeElement)&&(Y==null||Y.focus({preventScroll:!0}))},[h.listboxState,h.optionsElement]);let I=ee(M=>{var Y,oe;switch(U.dispose(),M.key){case Ye.Space:if(h.searchQuery!=="")return M.preventDefault(),M.stopPropagation(),g.search(M.key);case Ye.Enter:if(M.preventDefault(),M.stopPropagation(),h.activeOptionIndex!==null){let{dataRef:Ae}=h.options[h.activeOptionIndex];g.onChange(Ae.current.value)}h.mode===0&&(St(()=>g.closeListbox()),(Y=h.buttonElement)==null||Y.focus({preventScroll:!0}));break;case gt(h.orientation,{vertical:Ye.ArrowDown,horizontal:Ye.ArrowRight}):return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.Next);case gt(h.orientation,{vertical:Ye.ArrowUp,horizontal:Ye.ArrowLeft}):return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.Previous);case Ye.Home:case Ye.PageUp:return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.First);case Ye.End:case Ye.PageDown:return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.Last);case Ye.Escape:M.preventDefault(),M.stopPropagation(),St(()=>g.closeListbox()),(oe=h.buttonElement)==null||oe.focus({preventScroll:!0});return;case Ye.Tab:M.preventDefault(),M.stopPropagation(),St(()=>g.closeListbox()),r_(h.buttonElement,M.shiftKey?Vt.Previous:Vt.Next);break;default:M.key.length===1&&(g.search(M.key),U.setTimeout(()=>g.clearSearch(),350));break}}),B=(n=h.buttonElement)==null?void 0:n.id,L=te(()=>({open:h.listboxState===0}),[h.listboxState]),re=$f(c?le():{},{id:i,ref:W,"aria-activedescendant":h.activeOptionIndex===null||(r=h.options[h.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":h.mode===1?!0:void 0,"aria-labelledby":B,"aria-orientation":h.orientation,onKeyDown:I,role:"listbox",tabIndex:h.listboxState===0?0:void 0,style:{...d.style,...H,"--button-width":Yb(h.buttonElement,!0).width},...Kf(S)}),q=et();return V.createElement(bh,{enabled:a?e.static||C:!1},V.createElement(es.Provider,{value:h.mode===1?h:{...h,isSelected:k}},q({ourProps:re,theirProps:d,slot:L,defaultTag:j2,features:B2,visible:F,name:"Listbox.Options"})))}let U2="div";function W2(e,t){let n=Ft(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...s}=e,a=Ee(Nh)===!0,l=Lo("Listbox.Option"),u=Ji("Listbox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,c=l.isSelected(i),p=K(null),f=$2(p),h=On({disabled:o,value:i,domRef:p,get textValue(){return f()}}),g=it(t,p,y=>{y?l.listRef.current.set(r,y):l.listRef.current.delete(r)});Pe(()=>{if(!l.__demoMode&&l.listboxState===0&&d&&l.activationTrigger!==0)return bn().requestAnimationFrame(()=>{var y,k;(k=(y=p.current)==null?void 0:y.scrollIntoView)==null||k.call(y,{block:"nearest"})})},[p,d,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),Pe(()=>{if(!a)return u.registerOption(r,h)},[h,r,a]);let w=ee(y=>{var k;if(o)return y.preventDefault();u.onChange(i),l.mode===0&&(St(()=>u.closeListbox()),(k=l.buttonElement)==null||k.focus({preventScroll:!0}))}),_=ee(()=>{if(o)return u.goToOption(Xe.Nothing);u.goToOption(Xe.Specific,r)}),C=f_(),S=ee(y=>{C.update(y),!o&&(d||u.goToOption(Xe.Specific,r,0))}),$=ee(y=>{C.wasMoved(y)&&(o||d||u.goToOption(Xe.Specific,r,0))}),O=ee(y=>{C.wasMoved(y)&&(o||d&&u.goToOption(Xe.Nothing))}),P=te(()=>({active:d,focus:d,selected:c,disabled:o,selectedOption:c&&a}),[d,c,o,a]),F=a?{}:{id:r,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:w,onFocus:_,onPointerEnter:S,onMouseEnter:S,onPointerMove:$,onMouseMove:$,onPointerLeave:O,onMouseLeave:O},v=et();return!c&&a?null:v({ourProps:F,theirProps:s,slot:P,defaultTag:U2,name:"Listbox.Option"})}let G2=Oe;function z2(e,t){let{options:n,placeholder:r,...o}=e,i={ref:it(t)},s=Lo("ListboxSelectedOption"),a=te(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=et();return V.createElement(Nh.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:V.createElement(V.Fragment,null,r&&l?r:n)},slot:a,defaultTag:G2,name:"ListboxSelectedOption"}))}let q2=qe(R2),Ih=qe(H2),Y2=Vb,Oh=qe(V2),Fh=qe(W2),Z2=qe(z2),K2=Object.assign(q2,{Button:Ih,Label:Y2,Options:Oh,Option:Fh,SelectedOption:Z2}),fn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["As","Key","ClassName","Open","OnClose","Children"]}};function rl(e){return m(Mh,sr(e,1))}class ol extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","ClassName","Children"]}}function il(e){return m(Mh.Panel,sr(e,1))}class sl extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["As","Key","ClassName"]}}function al(e){return m(E2,sr(e,1))}function ll(e,t){let n;return m("svg",x(b([["width",e],["height",t],["viewBox","0 0 "+e+" "+t],["fill","none"],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,strokeLinecap:"round"})),["children",E.Children.toArray(Array.from(n))])])))}function X2(e,t){let n,r,o,i,s;return rl(b([new fn(3,[e]),new fn(4,[t]),new fn(5,[[al(ge(new sl(2,["fixed inset-0 bg-gray-500/50"]))),m("div",x(b([["className","fixed top-0 bottom-0 right-0 w-[480px] bg-white overflow-y-auto"],(n=[il(ge(new ol(2,[[m("div",x(b([["className","flex flex-col mt-6 mb-6 px-6"],(r=[m("div",x(b([["className","flex flex-row justify-between"],(o=[m("span",{className:"text-gray-900 font-semibold text-lg",children:"What is mapping and why is it important?"}),m("button",x(b([["onClick",a=>{t()}],["type","button"],["className","text-gray-700"],(i=[ll(24,24)],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])]))),m("div",x(b([["className","text-sm text-gray-600 pt-6"],(s="Mapping involves pairing each incoming CSV field with its correct destination field. This step is important because it makes sure that your data is organised correctly, minimising the risk of errors and ensuring a smooth import process.",["children",s])])))],["children",E.Children.toArray(Array.from(r))])])))]])))],["children",E.Children.toArray(Array.from(n))])])))]])]))}function Dh(e,t){let n;return m("svg",x(b([["fill","none"],["height",t],["viewBox","0 0 "+e+" "+t],["width",e],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",{d:"M15 6H1",stroke:"#D1D5DB",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),m("path",{d:"M6 11L1 6L6 1",stroke:"#D1D5DB",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]),["children",E.Children.toArray(Array.from(n))])])))}class Ss extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Value","OnChange","Children"]}}function Q2(e){return m(K2,sr(e,1))}class cc extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ClassName","Children"]}}function J2(e){return m(Ih,sr(e,1))}class eC extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ClassName"]}}function tC(e,t){return m(Oh,sr(e,1),...t)}class ro extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Value","Disabled","ClassName","Children"]}}function nC(e){return m(Fh,sr(e,1))}function rC(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["viewBox","0 0 "+e+" "+t],["width",e],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([["clipRule","evenodd"],["fill-rule","evenodd"],(r="M5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.7071 7.29289L9.99999 10.5858L13.2929 7.29289C13.6834 6.90237 14.3166 6.90237 14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L10.7071 12.7071C10.3166 13.0976 9.68341 13.0976 9.29289 12.7071L5.29289 8.70711C4.90237 8.31658 4.90237 7.68342 5.29289 7.29289Z",["d",r]),["fill","#6B7280"]])))),["children",E.Children.toArray(Array.from(n))])])))}class oo extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Below","Above"]}}function io(e,t,n,r,o,i,s,a,l){let u,d,c,p,f,h,g;const w=o.fields[0],_=a0(yn(C=>C[1].fields[0],l0(C=>fd(C.fields[0],w),r)));return m("div",x(b([["key",It(e)],["className","h-14 pr-3 py-2 rounded-lg justify-start items-center gap-2 inline-flex"],(u=[m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-end items-center gap-1 flex overflow-hidden"],(d=[m("div",x(Ue(G(()=>ye(j(["className",`${r==null?"bg-gray-50 border-gray-200 text-gray-500":"bg-emerald-50 border-emerald-200 text-emerald-700"} px-2 py-1 rounded border justify-start items-center gap-1.5 flex overflow-hidden`]),G(()=>{let C;return j((C=Ue(G(()=>ye(j(m("div",{className:"text-sm font-medium leading-tight",children:wf(e)})),G(()=>j(t?m("div",{className:"text-red-500 text-sm font-medium leading-tight",children:"*"}):Ke()))))),["children",E.Children.toArray(Array.from(C))]))}))))))],["children",E.Children.toArray(Array.from(d))])]))),m("div",x(b([["className","w-5 h-10 px-[3px] py-[5px] flex-col justify-center gap-2.5 inline-flex"],(c=[Dh(16,12)],["children",E.Children.toArray(Array.from(c))])]))),m("div",x(b([["className","w-[230px] h-[38px] px-3 justify-start items-center gap-2 flex"],(p=[Q2(b([new Ss(0,[_]),new Ss(1,[C=>{To(S=>{s(S[0])},Ca(Ta(S=>S[1].fields[0]===C?me(S[2],new sn(0,[])):!1,w)))}]),new Ss(2,[[m("div",x(b([["className","relative w-full"],(f=[J2(Ue(G(()=>ye(j(new cc(0,[`${t&&n&&r==null?"outline-red-300":"outline-gray-300"} grid w-full grid-cols-1 rounded-md bg-white py-1.5 pl-3 pr-2 text-left text-gray-900 text-sm outline outline-1 -outline-offset-1 focus:outline focus:outline-2 focus:outline-blue-600 focus:-outline-offset-2`])),G(()=>{let C;return j(new cc(1,[[m("span",x(Ue(G(()=>{const S=r!=null?[_,""]:n?["Select a field","text-red-900"]:["Select a field","text-gray-500"];return ye(j(["className",`${S[1]} col-start-1 row-start-1 truncate pr-6`]),G(()=>j(["children",S[0]])))})))),m("span",x(b([["className","col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4"],(C=[rC(20,20)],["children",E.Children.toArray(Array.from(C))])])))]]))}))))),tC(Ue(G(()=>j(new eC(`z-10 ${i.tag===1?"relative -mt-[226px]":"absolute mt-0.5"} max-h-48 w-full overflow-auto rounded-md border border-gray-300 shadow-gray-300 shadow-lg bg-white py-1 text-sm`)))),Ue(G(()=>kd(C=>{const S=C[2],$=C[1].fields[0];return j(nC(b([new ro(0,[Wt(C[0].fields[0])]),new ro(1,[$]),new ro(2,[me(S,new sn(1,[]))]),new ro(3,["relative select-none"]),new ro(4,[O=>[m("span",{className:"px-4 py-2 block truncate "+(S.tag===1?"text-gray-700 opacity-50 cursor-not-allowed":O.active?"bg-primary-600 text-white":(O.selected,"text-gray-700")),children:$})]])])))},w))))],["children",E.Children.toArray(Array.from(f))])])))]])]))],["children",E.Children.toArray(Array.from(p))])]))),m("div",x(b([(h="pl-1 justify-center items-center gap-2.5 flex text-gray-500 text-xs font-normal underline leading-none",["className",h]),(g=[m("button",x(Ue(G(()=>ye(j(["children","Clear"]),G(()=>ye(a==null?j(["className","opacity-50 cursor-not-allowed"]):j(["className","cursor-pointer"]),G(()=>{const C=a;if(C==null)return Bl();{const S=C;return j(["onClick",$=>{S()}])}})))))))),m("button",x(Ue(G(()=>ye(j(["children","Preview"]),G(()=>ye(l==null?j(["className","opacity-50 cursor-not-allowed"]):j(["className","cursor-pointer"]),G(()=>{const C=l;if(C==null)return Bl();{const S=C;return j(["onClick",$=>{S()}])}}))))))))],["children",E.Children.toArray(Array.from(g))])])))],["children",E.Children.toArray(Array.from(u))])])))}function oC(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["viewBox","0 0 "+e+" "+t],["width",e],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([["clipRule","evenodd"],["fill-rule","evenodd"],(r="M6.3001 1.40002C6.03495 1.40002 5.79257 1.54983 5.674 1.78697L5.16747 2.80002H2.8001C2.4135 2.80002 2.1001 3.11342 2.1001 3.50002C2.1001 3.88662 2.4135 4.20002 2.8001 4.20002L2.8001 11.2C2.8001 11.9732 3.4269 12.6 4.2001 12.6H9.80009C10.5733 12.6 11.2001 11.9732 11.2001 11.2V4.20002C11.5867 4.20002 11.9001 3.88662 11.9001 3.50002C11.9001 3.11342 11.5867 2.80002 11.2001 2.80002H8.83272L8.32619 1.78697C8.20762 1.54983 7.96523 1.40002 7.70009 1.40002H6.3001ZM4.9001 5.60002C4.9001 5.21342 5.2135 4.90002 5.60009 4.90002C5.98669 4.90002 6.30009 5.21342 6.30009 5.60002V9.80002C6.30009 10.1866 5.98669 10.5 5.60009 10.5C5.2135 10.5 4.9001 10.1866 4.9001 9.80002V5.60002ZM8.40009 4.90002C8.01349 4.90002 7.70009 5.21342 7.70009 5.60002V9.80002C7.70009 10.1866 8.01349 10.5 8.40009 10.5C8.78669 10.5 9.10009 10.1866 9.10009 9.80002V5.60002C9.10009 5.21342 8.78669 4.90002 8.40009 4.90002Z",["d",r]),["fill","#9CA3AF"]])))),["children",E.Children.toArray(Array.from(n))])])))}function Ph(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([(r="M8.83429 0.234315C9.14671 -0.0781049 9.65324 -0.0781049 9.96566 0.234315L13.1657 3.43431C13.4781 3.74673 13.4781 4.25327 13.1657 4.56569L9.96566 7.76569C9.65324 8.0781 9.14671 8.0781 8.83429 7.76569C8.52187 7.45327 8.52187 6.94673 8.83429 6.63432L10.6686 4.8H1.39998C0.958148 4.8 0.599976 4.44183 0.599976 4C0.599976 3.55817 0.958148 3.2 1.39998 3.2H10.6686L8.83429 1.36569C8.52187 1.05327 8.52187 0.546734 8.83429 0.234315Z",["d",r]),["fill","white"]])))),["children",E.Children.toArray(Array.from(n))])])))}function iC(e,t){let n,r,o,i,s,a,l;return m("div",x(b([["className","w-80 py-6 justify-start items-center gap-2.5 flex"],(n=[m("div",x(b([(r="grow shrink basis-0 p-4 bg-white rounded-lg shadow-lg border border-gray-100 flex-col justify-start items-start gap-3 inline-flex overflow-hidden",["className",r]),(o=[m("div",x(b([["className","self-stretch justify-start items-center gap-2 inline-flex"],(i=[m("div",{className:"text-black text-base font-semibold leading-normal",children:`Previewing “${wf(e)}”`})],["children",E.Children.toArray(Array.from(i))])]))),m("div",x(b([["className","self-stretch bg-white flex-col justify-start items-start flex overflow-hidden"],(s=[m("div",x(b([["className","self-stretch flex-col justify-center items-start flex"],(a=cd((u,d)=>m("div",x(Ue(G(()=>ye(j(["className",`${u%2===0?"bg-white":"bg-gray-50"} self-stretch h-10 px-3 py-3.5 border-b border-gray-200 justify-start items-center gap-1 inline-flex overflow-hidden`]),G(()=>{let c;return j((c=[m("div",{className:"grow shrink basis-0 text-gray-600 text-sm font-normal leading-tight",children:d})],["children",E.Children.toArray(Array.from(c))]))})))))),t),["children",E.Children.toArray(Array.from(a))])])))],["children",E.Children.toArray(Array.from(s))])]))),m("div",x(b([["className","self-stretch pt-2 justify-center items-center gap-2.5 inline-flex"],(l=[m("div",{className:"grow shrink basis-0 text-gray-500 text-sm font-normal leading-tight",children:"Showing first 10 rows only"})],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(n))])])))}function sC(){let e,t,n;return m("div",x(b([["className","w-full p-4 bg-blue-50 rounded-md justify-start items-start gap-3 inline-flex"],(e=[Pv(20,20),m("div",x(b([["className","grow shrink basis-0 h-[60px] justify-between items-center flex"],(t=[m("div",x(b([["className","grow shrink basis-0 text-blue-800 text-sm font-medium leading-tight"],(n="We’ve automatically pre-filled some options based on the matches found in your CSV. Please double-check to make sure they are correct and fill in any missing fields before continuing.",["children",n])])))],["children",E.Children.toArray(Array.from(t))])])))],["children",E.Children.toArray(Array.from(e))])])))}function aC(){let e,t;return m("div",x(b([["className","w-full h-[52px] p-4 bg-red-50 rounded-md justify-start items-start gap-3 inline-flex"],(e=[gf(16,15),m("div",x(b([["className","grow shrink basis-0 h-5 justify-between items-center flex"],(t=[m("div",{className:"grow shrink basis-0 text-red-800 text-sm font-medium leading-tight",children:"Some required fields are incomplete. Fill in all required fields to proceed"})],["children",E.Children.toArray(Array.from(t))])])))],["children",E.Children.toArray(Array.from(e))])])))}function lC(e){let t,n,r;const o=e.back,i=e.next,s=e.dataRows,a=e.headerRow,l=e.existingMappings;let u;const d=Vv(a,l);u=$o(()=>Ao(()=>d,(S,$)=>Uv(a,s,S,$),(S,$)=>{}),void 0,[]);const c=u[0],p=u[1],f=E.useState(!1),h=f[1],g=E.useState(!1),w=g[0],_=S=>{if(jv(c)(S))return()=>{p(new Pn(1,[S]))}},C=S=>{if(Bv(c,S))return()=>{p(new Pn(2,[S]))}};return m("div",x(b([["className","flex flex-col bg-gray-50 px-12 pt-8 pb-12"],(t=[X2(f[0],()=>{h(!1)}),m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Map fields"}),m("span",{className:"text-sm font-normal pt-2",children:"Match the fields from your CSV to the corresponding destination fields."}),m("div",x(b([["className","flex flex-row pt-3 gap-2"],(n=[m("button",{className:"rounded-2xl text-xs font-medium text-gray-600 border px-3.5 py-1.5 bg-white",onClick:S=>{h(!0)},type:"button",children:E.Children.toArray(["What is mapping and why is it important?"])})],["children",E.Children.toArray(Array.from(n))])]))),m("div",x(b([["className","justify-start items-start gap-12 inline-flex"],(r=Ue(G(()=>{let S;return ye(j(m("div",x(b([["className","w-[640px] pt-6 flex-col justify-start items-start gap-4 inline-flex"],(S=Ue(G(()=>ye(w||l!=null?j(Ke()):j(sC()),G(()=>ye(w&&c.Status.tag===0?j(aC()):j(Ke()),G(()=>{let $,O,P,F,v,y,k,T,N;return j(m("div",x(b([["className","flex-col justify-start items-start inline-flex overflow-hidden"],($=[m("div",x(b([(O="w-[640px] h-16 pt-6 bg-gray-50 border-b border-gray-200 justify-start items-center gap-2 inline-flex",["className",O]),(P=[m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-end items-center gap-1 flex overflow-hidden"],(F=[m("div",{className:"text-gray-900 text-sm font-medium leading-tight",children:"Destination fields"}),m("div",x(b([["className","px-2.5 py-0.5 bg-blue-100 rounded-[10px] justify-center items-center flex"],(v=[m("div",{className:"text-center text-blue-800 text-xs font-medium leading-none",children:`${c.NumberOfDestinationFieldsMapped} of 5 mapped`})],["children",E.Children.toArray(Array.from(v))])])))],["children",E.Children.toArray(Array.from(F))])]))),m("div",{className:"w-5 h-5 px-3 py-3.5"}),m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-start items-center gap-1 flex overflow-hidden"],(y=[m("div",{className:"text-gray-900 text-sm font-medium leading-tight",children:"Incoming CSV fields"}),m("div",x(b([["className","px-2.5 py-0.5 bg-gray-100 rounded-[10px] justify-center items-center flex"],(k=[m("div",{className:"text-center text-gray-800 text-xs font-medium leading-none",children:`${c.NumberOfDestinationFieldsMapped} of ${c.NumberOfIncomingFields} used`})],["children",E.Children.toArray(Array.from(k))])])))],["children",E.Children.toArray(Array.from(y))])])))],["children",E.Children.toArray(Array.from(P))])]))),m("div",x(b([["className","w-[640px] py-2 flex-col justify-start items-start gap-2 flex overflow-hidden"],(T=[m("div",x(ge((N=Ue(G(()=>ye(j(io(new ce(0,[]),!0,w,c.FirstName.ColumnIndex,c.FirstName.IncomingFields,new oo(0,[]),D=>{let H;p((H=[new ce(0,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(0,[])),C(new ce(0,[])))),G(()=>ye(j(io(new ce(1,[]),!0,w,c.LastName.ColumnIndex,c.LastName.IncomingFields,new oo(0,[]),D=>{let H;p((H=[new ce(1,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(1,[])),C(new ce(1,[])))),G(()=>ye(j(io(new ce(2,[]),!0,w,c.Email.ColumnIndex,c.Email.IncomingFields,new oo(0,[]),D=>{let H;p((H=[new ce(2,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(2,[])),C(new ce(2,[])))),G(()=>ye(j(io(new ce(3,[]),!1,w,c.MobilePhone.ColumnIndex,c.MobilePhone.IncomingFields,new oo(1,[]),D=>{let H;p((H=[new ce(3,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(3,[])),C(new ce(3,[])))),G(()=>ye(j(io(new ce(4,[]),!1,w,c.EmploymentBasis.ColumnIndex,c.EmploymentBasis.IncomingFields,new oo(1,[]),D=>{let H;p((H=[new ce(4,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(4,[])),C(new ce(4,[])))),G(()=>{let D,H,le,W,U,I;return ye(c.NumberOfIncomingFieldsDiscarded===0?j(Ke()):j(m("div",x(b([["className","h-16 pr-3 pt-2 pb-4 rounded-lg justify-start items-start gap-2 inline-flex"],(D=[m("div",x(b([["className","h-10 bg-gray-100 rounded-lg justify-start items-center gap-2 flex"],(H=[m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-end items-center gap-1 flex overflow-hidden"],(le=[oC(14,14),m("div",{className:"text-gray-500 text-sm font-medium leading-tight",children:"Discarded"})],["children",E.Children.toArray(Array.from(le))])]))),m("div",x(b([["className","w-5 h-10 px-[3px] py-[5px] flex-col justify-center gap-2.5 inline-flex"],(W=[Dh(16,12)],["children",E.Children.toArray(Array.from(W))])]))),m("div",x(b([["className","flex-col justify-start items-start gap-2 inline-flex"],(U=[m("div",x(b([["className","w-[218px] pl-3 items-center inline-flex"],(I=[m("div",x(Ue(G(()=>ye(j(["className","text-gray-500 text-sm font-medium"]),G(()=>{const B=c.NumberOfIncomingFieldsDiscarded|0;return j(B===1?["children","Remaining 1 unused field"]:["children",`Remaining ${B} unused fields`])}))))))],["children",E.Children.toArray(Array.from(I))])])))],["children",E.Children.toArray(Array.from(U))])])))],["children",E.Children.toArray(Array.from(H))])])))],["children",E.Children.toArray(Array.from(D))])])))),G(()=>{let B,L,re,q,M,Y,oe,Ae,Ne;return j(m("div",x(b([["className","h-[58px] pt-6 border-t border-gray-200 justify-start items-end gap-2 inline-flex w-full"],(B=[m("div",x(b([["className","grow shrink basis-0 h-[34px] justify-start items-center gap-2 flex"],(L=[m("div",x(b([["className","grow shrink basis-0 h-4 pr-2 justify-center items-center gap-2.5 flex"],(re=[m("div",x(b([["className","grow shrink basis-0 text-right"],(q=[m("span",{className:"text-gray-500 text-xs font-normal leading-none",children:"Destination fields marked with "}),m("span",{className:"text-red-600 text-xs font-normal leading-none",children:"*"}),m("span",{className:"text-gray-500 text-xs font-normal leading-none",children:" are required"})],["children",E.Children.toArray(Array.from(q))])])))],["children",E.Children.toArray(Array.from(re))])]))),m("div",x(b([["className","justify-start items-center gap-2 flex"],(M=[m("button",x(b([(Y="px-[13px] py-[9px] bg-white rounded-md shadow-sm border border-gray-300 justify-center items-center flex overflow-hidden",["className",Y]),["onClick",Q=>{o(c.Status)}],(oe=[m("div",{className:"grow shrink basis-0 text-center text-gray-700 text-sm font-medium leading-none",children:"Back"})],["children",E.Children.toArray(Array.from(oe))])]))),m("button",x(b([(Ae="pl-[13px] pr-[11px] py-[9px] bg-primary-600 disabled:opacity-50 rounded-md shadow-sm justify-center items-center gap-2 flex overflow-hidden",["className",Ae]),["disabled",w&&c.Status.tag===0],["onClick",Q=>{const fe=c.Status;fe.tag===0?g[1](!0):i([fe.fields[0],fe.fields[1]])}],(Ne=[m("div",{className:"grow shrink basis-0 text-center text-white text-sm font-medium leading-none",children:"Next"}),Ph(13,8)],["children",E.Children.toArray(Array.from(Ne))])])))],["children",E.Children.toArray(Array.from(M))])])))],["children",E.Children.toArray(Array.from(L))])])))],["children",E.Children.toArray(Array.from(B))])]))))}))})))))))))))),["children",E.Children.toArray(Array.from(N))]))))],["children",E.Children.toArray(Array.from(T))])])))],["children",E.Children.toArray(Array.from($))])]))))})))))),["children",E.Children.toArray(Array.from(S))])])))),G(()=>{const $=c.Preview;return $==null?j(Ke()):j(iC($[0],$[1]))}))})),["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(t))])])))}class zo extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UploadingCsv","MappingColumns","MappingEmploymentBasis","Reviewing"]}}class Es extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Reviewing","MappingEmploymentBasis","MappingColumns"]}}let Rn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Next","Back"]}};function uC(e,t,n,r){let o,i,s,a,l,u;return m("div",x(b([["className","flex flex-col bg-gray-50 px-12 pt-8 pb-12"],(o=[m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Map values - Employment basis"}),m("span",{className:"text-sm font-normal pt-2",children:"Match the values from your CSV to the corresponding destination values."}),m("div",x(b([["className","justify-start items-start gap-12 inline-flex"],(i=[m("div",x(b([["className","w-[640px] pt-6 flex-col justify-start items-start gap-4 inline-flex"],(s=[m("div",x(b([["className","justify-start items-center gap-2 flex"],(a=[m("button",x(b([(l="px-[13px] py-[9px] bg-white rounded-md shadow-sm border border-gray-300 justify-center items-center flex overflow-hidden",["className",l]),["onClick",d=>{r(e)}],(u=[m("div",{className:"grow shrink basis-0 text-center text-gray-700 text-sm font-medium leading-none",children:"Back"})],["children",E.Children.toArray(Array.from(u))])])))],["children",E.Children.toArray(Array.from(a))])])))],["children",E.Children.toArray(Array.from(s))])])))],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])])))}function cC(e,t,n,r,o,i){let s,a,l,u,d,c;return m("div",x(b([["className","flex flex-col bg-gray-50 px-12 pt-8 pb-12"],(s=[m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Review"}),m("span",{className:"text-sm font-normal pt-2",children:"Preview your data and confirm that everything is mapped correctly."}),m("div",x(b([["className","justify-start items-start gap-12 inline-flex"],(a=[m("div",x(b([["className","w-[640px] pt-6 flex-col justify-start items-start gap-4 inline-flex"],(l=[m("div",x(b([["className","justify-start items-center gap-2 flex"],(u=[m("button",x(b([(d="px-[13px] py-[9px] bg-white rounded-md shadow-sm border border-gray-300 justify-center items-center flex overflow-hidden",["className",d]),["onClick",p=>{i()}],(c=[m("div",{className:"grow shrink basis-0 text-center text-gray-700 text-sm font-medium leading-none",children:"Back"})],["children",E.Children.toArray(Array.from(c))])])))],["children",E.Children.toArray(Array.from(u))])])))],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(a))])])))],["children",E.Children.toArray(Array.from(s))])])))}function dC(e,t){return G(()=>{const n=new pg([],t);return yp(r=>Xp(r,n),e)})}function fC(e,t){return Sd(dC(e,t))}class so extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotCsv","TooLarge","ParseError"]}}class Yn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Parse","CancelParsing","Remove"]}}var ti={exports:{}};/* @license
35
+ `)),[]});var p_=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(p_||{});function Kf(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Xf(e,t,n,r){let[o,i]=ae(n),{hasFlag:s,addFlag:a,removeFlag:l}=h_(e&&o?3:0),u=K(!1),d=K(!1),c=In();return Pe(()=>{var p;if(e){if(n&&i(!0),!t){n&&a(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),g_(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var f;d.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||i(!1),(f=r==null?void 0:r.end)==null||f.call(r,n))}})}},[e,n,t,c]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function g_(e,{prepare:t,run:n,done:r,inFlight:o}){let i=bn();return y_(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(w_(e,r))})}),i.dispose}function w_(e,t){var n,r;let o=bn();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function y_(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function qa(e,t){let n=K([]),r=ee(e);Se(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}function Wi(){return typeof window<"u"}function Gr(e){return Qf(e)?(e.nodeName||"").toLowerCase():"#document"}function Et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function en(e){var t;return(t=(Qf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qf(e){return Wi()?e instanceof Node||e instanceof Et(e).Node:!1}function dt(e){return Wi()?e instanceof Element||e instanceof Et(e).Element:!1}function Qt(e){return Wi()?e instanceof HTMLElement||e instanceof Et(e).HTMLElement:!1}function zu(e){return!Wi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Et(e).ShadowRoot}function Fo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function v_(e){return["table","td","th"].includes(Gr(e))}function Gi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ya(e){const t=Za(),n=dt(e)?Gt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b_(e){let t=Mn(e);for(;Qt(t)&&!Or(t);){if(Ya(t))return t;if(Gi(t))return null;t=Mn(t)}return null}function Za(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Or(e){return["html","body","#document"].includes(Gr(e))}function Gt(e){return Et(e).getComputedStyle(e)}function zi(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mn(e){if(Gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zu(e)&&e.host||en(e);return zu(t)?t.host:t}function Jf(e){const t=Mn(e);return Or(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&Fo(t)?t:Jf(t)}function yo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jf(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Et(o);if(i){const a=Xs(s);return t.concat(s,s.visualViewport||[],Fo(o)?o:[],a&&n?yo(a):[])}return t.concat(o,yo(o,[],n))}function Xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function __(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const er=Math.min,ot=Math.max,vo=Math.round,Go=Math.floor,Yt=e=>({x:e,y:e}),x_={left:"right",right:"left",bottom:"top",top:"bottom"},C_={start:"end",end:"start"};function qu(e,t,n){return ot(e,er(t,n))}function zr(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function Do(e){return e.split("-")[1]}function eh(e){return e==="x"?"y":"x"}function th(e){return e==="y"?"height":"width"}function tr(e){return["top","bottom"].includes(Nn(e))?"y":"x"}function nh(e){return eh(tr(e))}function S_(e,t,n){n===void 0&&(n=!1);const r=Do(e),o=nh(e),i=th(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Si(s)),[s,Si(s)]}function E_(e){const t=Si(e);return[Qs(e),t,Qs(t)]}function Qs(e){return e.replace(/start|end/g,t=>C_[t])}function k_(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function T_(e,t,n,r){const o=Do(e);let i=k_(Nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Qs)))),i}function Si(e){return e.replace(/left|right|bottom|top/g,t=>x_[t])}function A_(e){return{top:0,right:0,bottom:0,left:0,...e}}function $_(e){return typeof e!="number"?A_(e):{top:e,right:e,bottom:e,left:e}}function Ei(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Yu(e,t,n){let{reference:r,floating:o}=e;const i=tr(t),s=nh(t),a=th(s),l=Nn(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:c};break;case"left":f={x:r.x-o.width,y:c};break;default:f={x:r.x,y:r.y}}switch(Do(t)){case"start":f[s]-=p*(n&&u?-1:1);break;case"end":f[s]+=p*(n&&u?-1:1);break}return f}const M_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Yu(u,r,l),p=r,f={},h=0;for(let g=0;g<a.length;g++){const{name:w,fn:_}=a[g],{x:C,y:S,data:$,reset:O}=await _({x:d,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:u,platform:s,elements:{reference:e,floating:t}});d=C??d,c=S??c,f={...f,[w]:{...f[w],...$}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(u=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:d,y:c}=Yu(u,p,l)),g=-1)}return{x:d,y:c,placement:p,strategy:o,middlewareData:f}};async function qi(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:p=!1,padding:f=0}=zr(t,e),h=$_(f),w=a[p?c==="floating"?"reference":"floating":c],_=Ei(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),C=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),$=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},O=Ei(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:S,strategy:l}):C);return{top:(_.top-O.top+h.top)/$.y,bottom:(O.bottom-_.bottom+h.bottom)/$.y,left:(_.left-O.left+h.left)/$.x,right:(O.right-_.right+h.right)/$.x}}const N_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...w}=zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=Nn(o),C=tr(a),S=Nn(a)===a,$=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=p||(S||!g?[Si(a)]:E_(a)),P=h!=="none";!p&&P&&O.push(...T_(a,g,h,$));const F=[a,...O],v=await qi(t,w),y=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&y.push(v[_]),c){const H=S_(o,s,$);y.push(v[H[0]],v[H[1]])}if(k=[...k,{placement:o,overflows:y}],!y.every(H=>H<=0)){var T,N;const H=(((T=i.flip)==null?void 0:T.index)||0)+1,le=F[H];if(le)return{data:{index:H,overflows:k},reset:{placement:le}};let W=(N=k.filter(U=>U.overflows[0]<=0).sort((U,I)=>U.overflows[1]-I.overflows[1])[0])==null?void 0:N.placement;if(!W)switch(f){case"bestFit":{var D;const U=(D=k.filter(I=>{if(P){const B=tr(I.placement);return B===C||B==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(B=>B>0).reduce((B,L)=>B+L,0)]).sort((I,B)=>I[1]-B[1])[0])==null?void 0:D[0];U&&(W=U);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};async function I_(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Nn(n),a=Do(n),l=tr(n)==="y",u=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,c=zr(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*d,y:p*u}:{x:p*u,y:f*d}}const O_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await I_(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},F_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:_,y:C}=w;return{x:_,y:C}}},...l}=zr(e,t),u={x:n,y:r},d=await qi(t,l),c=tr(Nn(o)),p=eh(c);let f=u[p],h=u[c];if(i){const w=p==="y"?"top":"left",_=p==="y"?"bottom":"right",C=f+d[w],S=f-d[_];f=qu(C,f,S)}if(s){const w=c==="y"?"top":"left",_=c==="y"?"bottom":"right",C=h+d[w],S=h-d[_];h=qu(C,h,S)}const g=a.fn({...t,[p]:f,[c]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[c]:s}}}}}},D_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=zr(e,t),d=await qi(t,u),c=Nn(o),p=Do(o),f=tr(o)==="y",{width:h,height:g}=i.floating;let w,_;c==="top"||c==="bottom"?(w=c,_=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=c,w=p==="end"?"top":"bottom");const C=g-d.top-d.bottom,S=h-d.left-d.right,$=er(g-d[w],C),O=er(h-d[_],S),P=!t.middlewareData.shift;let F=$,v=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(v=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(F=C),P&&!p){const k=ot(d.left,0),T=ot(d.right,0),N=ot(d.top,0),D=ot(d.bottom,0);f?v=h-2*(k!==0||T!==0?k+T:ot(d.left,d.right)):F=g-2*(N!==0||D!==0?N+D:ot(d.top,d.bottom))}await l({...t,availableWidth:v,availableHeight:F});const y=await s.getDimensions(a.floating);return h!==y.width||g!==y.height?{reset:{rects:!0}}:{}}}};function rh(e){const t=Gt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vo(n)!==i||vo(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ka(e){return dt(e)?e:e.contextElement}function Sr(e){const t=Ka(e);if(!Qt(t))return Yt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rh(t);let s=(i?vo(n.width):n.width)/r,a=(i?vo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const P_=Yt(0);function oh(e){const t=Et(e);return!Za()||!t.visualViewport?P_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function R_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Et(e)?!1:t}function nr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ka(e);let s=Yt(1);t&&(r?dt(r)&&(s=Sr(r)):s=Sr(e));const a=R_(i,n,r)?oh(i):Yt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,c=o.height/s.y;if(i){const p=Et(i),f=r&&dt(r)?Et(r):r;let h=p,g=Xs(h);for(;g&&r&&f!==h;){const w=Sr(g),_=g.getBoundingClientRect(),C=Gt(g),S=_.left+(g.clientLeft+parseFloat(C.paddingLeft))*w.x,$=_.top+(g.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,c*=w.y,l+=S,u+=$,h=Et(g),g=Xs(h)}}return Ei({width:d,height:c,x:l,y:u})}function Xa(e,t){const n=zi(e).scrollLeft;return t?t.left+n:nr(en(e)).left+n}function ih(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Xa(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function L_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=en(r),a=t?Gi(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Yt(1);const d=Yt(0),c=Qt(r);if((c||!c&&!i)&&((Gr(r)!=="body"||Fo(s))&&(l=zi(r)),Qt(r))){const f=nr(r);u=Sr(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const p=s&&!c&&!i?ih(s,l,!0):Yt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function H_(e){return Array.from(e.getClientRects())}function j_(e){const t=en(e),n=zi(e),r=e.ownerDocument.body,o=ot(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ot(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xa(e);const a=-n.scrollTop;return Gt(r).direction==="rtl"&&(s+=ot(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function B_(e,t){const n=Et(e),r=en(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Za();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function V_(e,t){const n=nr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Qt(e)?Sr(e):Yt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function Zu(e,t,n){let r;if(t==="viewport")r=B_(e,n);else if(t==="document")r=j_(en(e));else if(dt(t))r=V_(t,n);else{const o=oh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ei(r)}function sh(e,t){const n=Mn(e);return n===t||!dt(n)||Or(n)?!1:Gt(n).position==="fixed"||sh(n,t)}function U_(e,t){const n=t.get(e);if(n)return n;let r=yo(e,[],!1).filter(a=>dt(a)&&Gr(a)!=="body"),o=null;const i=Gt(e).position==="fixed";let s=i?Mn(e):e;for(;dt(s)&&!Or(s);){const a=Gt(s),l=Ya(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Fo(s)&&!l&&sh(e,s))?r=r.filter(d=>d!==s):o=a,s=Mn(s)}return t.set(e,r),r}function W_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Gi(t)?[]:U_(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,d)=>{const c=Zu(t,d,o);return u.top=ot(c.top,u.top),u.right=er(c.right,u.right),u.bottom=er(c.bottom,u.bottom),u.left=ot(c.left,u.left),u},Zu(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function G_(e){const{width:t,height:n}=rh(e);return{width:t,height:n}}function z_(e,t,n){const r=Qt(t),o=en(t),i=n==="fixed",s=nr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Yt(0);if(r||!r&&!i)if((Gr(t)!=="body"||Fo(o))&&(a=zi(t)),r){const p=nr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&(l.x=Xa(o));const u=o&&!r&&!i?ih(o,a):Yt(0),d=s.left+a.scrollLeft-l.x-u.x,c=s.top+a.scrollTop-l.y-u.y;return{x:d,y:c,width:s.width,height:s.height}}function ws(e){return Gt(e).position==="static"}function Ku(e,t){if(!Qt(e)||Gt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return en(e)===n&&(n=n.ownerDocument.body),n}function ah(e,t){const n=Et(e);if(Gi(e))return n;if(!Qt(e)){let o=Mn(e);for(;o&&!Or(o);){if(dt(o)&&!ws(o))return o;o=Mn(o)}return n}let r=Ku(e,t);for(;r&&v_(r)&&ws(r);)r=Ku(r,t);return r&&Or(r)&&ws(r)&&!Ya(r)?n:r||b_(e)||n}const q_=async function(e){const t=this.getOffsetParent||ah,n=this.getDimensions,r=await n(e.floating);return{reference:z_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Y_(e){return Gt(e).direction==="rtl"}const Z_={convertOffsetParentRelativeRectToViewportRelativeRect:L_,getDocumentElement:en,getClippingRect:W_,getOffsetParent:ah,getElementRects:q_,getClientRects:H_,getDimensions:G_,getScale:Sr,isElement:dt,isRTL:Y_};function lh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function K_(e,t){let n=null,r;const o=en(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:c,width:p,height:f}=u;if(a||t(),!p||!f)return;const h=Go(c),g=Go(o.clientWidth-(d+p)),w=Go(o.clientHeight-(c+f)),_=Go(d),S={rootMargin:-h+"px "+-g+"px "+-w+"px "+-_+"px",threshold:ot(0,er(1,l))||1};let $=!0;function O(P){const F=P[0].intersectionRatio;if(F!==l){if(!$)return s();F?s(!1,F):r=setTimeout(()=>{s(!1,1e-7)},1e3)}F===1&&!lh(u,e.getBoundingClientRect())&&s(),$=!1}try{n=new IntersectionObserver(O,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(O,S)}n.observe(e)}return s(!0),i}function X_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ka(e),d=o||i?[...u?yo(u):[],...yo(t)]:[];d.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const c=u&&a?K_(u,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(_=>{let[C]=_;C&&C.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=f)==null||S.observe(t)})),n()}),u&&!l&&f.observe(u),f.observe(t));let h,g=l?nr(e):null;l&&w();function w(){const _=nr(e);g&&!lh(g,_)&&n(),g=_,h=requestAnimationFrame(w)}return n(),()=>{var _;d.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),c==null||c(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const ys=qi,Q_=O_,J_=F_,ex=N_,tx=D_,nx=(e,t,n)=>{const r=new Map,o={platform:Z_,...n},i={...o.platform,_c:r};return M_(e,t,{...o,platform:i})};var ei=typeof document<"u"?wn:Se;function ki(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ki(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ki(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xu(e,t){const n=uh(e);return Math.round(t*n)/n}function vs(e){const t=K(e);return ei(()=>{t.current=e}),t}function rx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=ae({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=ae(r);ki(p,r)||f(r);const[h,g]=ae(null),[w,_]=ae(null),C=ve(I=>{I!==P.current&&(P.current=I,g(I))},[]),S=ve(I=>{I!==F.current&&(F.current=I,_(I))},[]),$=i||h,O=s||w,P=K(null),F=K(null),v=K(d),y=l!=null,k=vs(l),T=vs(o),N=vs(u),D=ve(()=>{if(!P.current||!F.current)return;const I={placement:t,strategy:n,middleware:p};T.current&&(I.platform=T.current),nx(P.current,F.current,I).then(B=>{const L={...B,isPositioned:N.current!==!1};H.current&&!ki(v.current,L)&&(v.current=L,St(()=>{c(L)}))})},[p,t,n,T,N]);ei(()=>{u===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,c(I=>({...I,isPositioned:!1})))},[u]);const H=K(!1);ei(()=>(H.current=!0,()=>{H.current=!1}),[]),ei(()=>{if($&&(P.current=$),O&&(F.current=O),$&&O){if(k.current)return k.current($,O,D);D()}},[$,O,D,k,y]);const le=te(()=>({reference:P,floating:F,setReference:C,setFloating:S}),[C,S]),W=te(()=>({reference:$,floating:O}),[$,O]),U=te(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const B=Xu(W.floating,d.x),L=Xu(W.floating,d.y);return a?{...I,transform:"translate("+B+"px, "+L+"px)",...uh(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:L}},[n,a,W.floating,d.x,d.y]);return te(()=>({...d,update:D,refs:le,elements:W,floatingStyles:U}),[d,D,le,W,U])}const ch=(e,t)=>({...Q_(e),options:[e,t]}),ox=(e,t)=>({...J_(e),options:[e,t]}),ix=(e,t)=>({...ex(e),options:[e,t]}),sx=(e,t)=>({...tx(e),options:[e,t]}),dh={...oi},ax=dh.useInsertionEffect,lx=ax||(e=>e());function fh(e){const t=K(()=>{});return lx(()=>{t.current=e}),ve(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Js=typeof document<"u"?wn:Se;let Qu=!1,ux=0;const Ju=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ux++;function cx(){const[e,t]=ae(()=>Qu?Ju():void 0);return Js(()=>{e==null&&t(Ju())},[]),Se(()=>{Qu=!0},[]),e}const dx=dh.useId,fx=dx||cx;function hx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const mx=Be(null),px=Be(null),gx=()=>{var e;return((e=Ee(mx))==null?void 0:e.id)||null},wx=()=>Ee(px),yx="data-floating-ui-focusable";function vx(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fx(),i=K({}),[s]=ae(()=>hx()),a=gx()!=null,[l,u]=ae(r.reference),d=fh((f,h,g)=>{i.current.openEvent=f?h:void 0,s.emit("openchange",{open:f,event:h,reason:g,nested:a}),n==null||n(f,h,g)}),c=te(()=>({setPositionReference:u}),[]),p=te(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return te(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:s,floatingId:o,refs:c}),[t,d,p,s,o,c])}function bx(e){e===void 0&&(e={});const{nodeId:t}=e,n=vx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=ae(null),[a,l]=ae(null),d=(o==null?void 0:o.domReference)||i,c=K(null),p=wx();Js(()=>{d&&(c.current=d)},[d]);const f=rx({...e,elements:{...o,...a&&{reference:a}}}),h=ve(S=>{const $=dt(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l($),f.refs.setReference($)},[f.refs]),g=ve(S=>{(dt(S)||S===null)&&(c.current=S,s(S)),(dt(f.refs.reference.current)||f.refs.reference.current===null||S!==null&&!dt(S))&&f.refs.setReference(S)},[f.refs]),w=te(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:c}),[f.refs,g,h]),_=te(()=>({...f.elements,domReference:d}),[f.elements,d]),C=te(()=>({...f,...r,refs:w,elements:_,nodeId:t}),[f,w,_,t,r]);return Js(()=>{r.dataRef.current.floatingContext=C;const S=p==null?void 0:p.nodesRef.current.find($=>$.id===t);S&&(S.context=C)}),te(()=>({...f,context:C,refs:w,elements:_}),[f,w,_,C])}const ec="active",tc="selected";function bs(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ec]:s,[tc]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[yx]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[u,d]=l;if(!(o&&[ec,tc].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var c;(c=r.get(u))==null||c.push(d),s[u]=function(){for(var p,f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return(p=r.get(u))==null?void 0:p.map(w=>w(...h)).find(w=>w!==void 0)}}}else s[u]=d}),s),{})}}function _x(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=ve(a=>bs(a,e,"reference"),t),i=ve(a=>bs(a,e,"floating"),n),s=ve(a=>bs(a,e,"item"),r);return te(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function nc(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const xx=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...d}=zr(e,t),{rects:c,elements:{floating:p}}=t,f=n.current[s],h=(u==null?void 0:u.current)||p,g=p.clientTop||h.clientTop,w=p.clientTop!==0,_=h.clientTop!==0,C=p===h;if(!f)return{};const S={...t,...await ch(-f.offsetTop-p.clientTop-c.reference.height/2-f.offsetHeight/2-i).fn(t)},$=await ys(nc(S,h.scrollHeight+g+p.clientTop),d),O=await ys(S,{...d,elementContext:"reference"}),P=ot(0,$.top),F=S.y+P,k=(h.scrollHeight>h.clientHeight?T=>T:vo)(ot(0,h.scrollHeight+(w&&C||_?g*2:0)-P-ot(0,$.bottom)));if(h.style.maxHeight=k+"px",h.scrollTop=P,o){const T=h.offsetHeight<f.offsetHeight*er(a,n.current.length)-1||O.top>=-l||O.bottom>=-l;St(()=>o(T))}return r&&(r.current=await ys(nc({...S,y:F},h.offsetHeight+g+p.clientTop),d)),{y:F}}});function Cx(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=fh(a),u=K(!1),d=K(null),c=K(null);Se(()=>{if(!o)return;function f(g){if(g.ctrlKey||!h||i.current==null)return;const w=g.deltaY,_=i.current.top>=-.5,C=i.current.bottom>=-.5,S=h.scrollHeight-h.clientHeight,$=w<0?-1:1,O=w<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&w>0||!C&&w<0?(g.preventDefault(),St(()=>{l(P=>P+Math[O](w,S*$))})):/firefox/i.test(__())&&(h.scrollTop+=w))}const h=(s==null?void 0:s.current)||r.floating;if(n&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{d.current=h.scrollTop,i.current!=null&&(c.current={...i.current})}),()=>{d.current=null,c.current=null,h.removeEventListener("wheel",f)}},[o,n,r.floating,i,s,l]);const p=te(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const f=(s==null?void 0:s.current)||r.floating;if(!(!i.current||!f||!u.current)){if(d.current!==null){const h=f.scrollTop-d.current;(i.current.bottom<-.5&&h<-1||i.current.top<-.5&&h>1)&&St(()=>l(g=>g+h))}requestAnimationFrame(()=>{d.current=f.scrollTop})}}}),[r.floating,l,i,s]);return te(()=>o?{floating:p}:{},[o,p])}let qr=Be({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});qr.displayName="FloatingContext";let Qa=Be(null);Qa.displayName="PlacementContext";function Sx(e){return te(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Ex(){return Ee(qr).setReference}function kx(){return Ee(qr).getReferenceProps}function Tx(){let{getFloatingProps:e,slot:t}=Ee(qr);return ve((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Ax(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=Ee(Qa),n=te(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i==null?void 0:i.outerHTML)!=null?s:i})]);Pe(()=>{t==null||t(n??null)},[t,n]);let r=Ee(qr);return te(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let rc=4;function $x({children:e,enabled:t=!0}){let[n,r]=ae(null),[o,i]=ae(0),s=K(null),[a,l]=ae(null);Mx(a);let u=t&&n!==null&&a!==null,{to:d="bottom",gap:c=0,offset:p=0,padding:f=0,inner:h}=Nx(n,a),[g,w="center"]=d.split(" ");Pe(()=>{u&&i(0)},[u]);let{refs:_,floatingStyles:C,context:S}=bx({open:u,placement:g==="selection"?w==="center"?"bottom":`bottom-${w}`:w==="center"?`${g}`:`${g}-${w}`,strategy:"absolute",transform:!1,middleware:[ch({mainAxis:g==="selection"?0:c,crossAxis:p}),ox({padding:f}),g!=="selection"&&ix({padding:f}),g==="selection"&&h?xx({...h,padding:f,overflowRef:s,offset:o,minItemsVisible:rc,referenceOverflowThreshold:f,onFallbackChange(T){var N,D;if(!T)return;let H=S.elements.floating;if(!H)return;let le=parseFloat(getComputedStyle(H).scrollPaddingBottom)||0,W=Math.min(rc,H.childElementCount),U=0,I=0;for(let B of(D=(N=S.elements.floating)==null?void 0:N.childNodes)!=null?D:[])if(B instanceof HTMLElement){let L=B.offsetTop,re=L+B.clientHeight+le,q=H.scrollTop,M=q+H.clientHeight;if(L>=q&&re<=M)W--;else{I=Math.max(0,Math.min(re,M)-Math.max(L,q)),U=B.clientHeight;break}}W>=1&&i(B=>{let L=U*W-I+le;return B>=L?B:L})}}):null,sx({padding:f,apply({availableWidth:T,availableHeight:N,elements:D}){Object.assign(D.floating.style,{overflow:"auto",maxWidth:`${T}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${N}px)`})}})].filter(Boolean),whileElementsMounted:X_}),[$=g,O=w]=S.placement.split("-");g==="selection"&&($="selection");let P=te(()=>({anchor:[$,O].filter(Boolean).join(" ")}),[$,O]),F=Cx(S,{overflowRef:s,onChange:i}),{getReferenceProps:v,getFloatingProps:y}=_x([F]),k=ee(T=>{l(T),_.setFloating(T)});return m(Qa.Provider,{value:r},m(qr.Provider,{value:{setFloating:k,setReference:_.setReference,styles:C,getReferenceProps:v,getFloatingProps:y,slot:P}},e))}function Mx(e){Pe(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Nx(e,t){var n,r,o;let i=_s((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),s=_s((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=_s((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function _s(e,t,n=void 0){let r=In(),o=ee((l,u)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[n,null];let d=oc(l,u);return[d,c=>{let p=hh(l);{let f=p.map(h=>window.getComputedStyle(u).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let g=!1;for(let[_,C]of p.entries()){let S=window.getComputedStyle(u).getPropertyValue(C);if(f[_]!==S){f[_]=S,g=!0;break}}if(!g)return;let w=oc(l,u);d!==w&&(c(w),d=w)})}return r.dispose}]}return[n,null]}),i=te(()=>o(e,t)[0],[e,t]),[s=i,a]=ae();return Pe(()=>{let[l,u]=o(e,t);if(a(l),!!u)return u(a)},[e,t]),s}function hh(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...hh(o)]:[r]}return[]}function oc(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Ix(e,t){let[n,r]=ae(t);return!e&&n!==t&&r(t),e?n:t}let Yi=Be(null);Yi.displayName="OpenClosedContext";var ft=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ft||{});function Po(){return Ee(Yi)}function mh({value:e,children:t}){return V.createElement(Yi.Provider,{value:e},t)}function Ox({children:e}){return V.createElement(Yi.Provider,{value:null},e)}function Fx(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let En=[];Fx(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||En[0]===t.target)return;let n=t.target;n=n.closest(Ci),En.unshift(n??t.target),En=En.filter(r=>r!=null&&r.isConnected),En.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Dx(e){throw new Error("Unexpected object: "+e)}var Xe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Xe||{});function xs(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:Dx(e)}}function ph(e){let t=ee(e),n=K(!1);Se(()=>(n.current=!1,()=>{n.current=!0,Bi(()=>{n.current&&t()})}),[t])}function Px(){let e=typeof document>"u";return"useSyncExternalStore"in oi?(t=>t.useSyncExternalStore)(oi)(()=>()=>{},()=>!1,()=>!e):!1}function Ro(){let e=Px(),[t,n]=ae(Zn.isHandoffComplete);return t&&Zn.isHandoffComplete===!1&&n(!1),Se(()=>{t!==!0&&n(!0)},[t]),Se(()=>Zn.handoff(),[]),e?!1:t}let gh=Be(!1);function Rx(){return Ee(gh)}function ic(e){return V.createElement(gh.Provider,{value:e.force},e.children)}function Lx(e){let t=Rx(),n=Ee(yh),r=Wr(e),[o,i]=ae(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Zn.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)});return Se(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),Se(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let wh=Oe,Hx=qe(function(e,t){let n=e,r=K(null),o=it(Nb(c=>{r.current=c}),t),i=Wr(r),s=Lx(r),[a]=ae(()=>{var c;return Zn.isServer?null:(c=i==null?void 0:i.createElement("div"))!=null?c:null}),l=Ee(ea),u=Ro();Pe(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),Pe(()=>{if(a&&l)return l.register(a)},[l,a]),ph(()=>{var c;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((c=s.parentElement)==null||c.removeChild(s)))});let d=et();return u?!s||!a?null:Mi(d({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:wh,name:"Portal"}),a):null});function jx(e,t){let n=it(t),{enabled:r=!0,...o}=e,i=et();return r?V.createElement(Hx,{...o,ref:n}):i({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:wh,name:"Portal"})}let Bx=Oe,yh=Be(null);function Vx(e,t){let{target:n,...r}=e,o={ref:it(t)},i=et();return V.createElement(yh.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:Bx,name:"Popover.Group"}))}let ea=Be(null);function Ux(){let e=Ee(ea),t=K([]),n=ee(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=ee(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=te(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,te(()=>function({children:i}){return V.createElement(ea.Provider,{value:o},i)},[o])]}let Wx=qe(jx),vh=qe(Vx),bh=Object.assign(Wx,{Group:vh});function Gx(e,t=typeof document<"u"?document.defaultView:null,n){let r=Ur(e,"escape");Yf(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Ye.Escape&&n(o))})}function zx(){var e;let[t]=ae(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=ae((e=t==null?void 0:t.matches)!=null?e:!1);return Pe(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function qx({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Wr(n),o=ee(()=>{var i,s;let a=[];for(let l of e)l!==null&&(l instanceof HTMLElement?a.push(l):"current"in l&&l.current instanceof HTMLElement&&a.push(l.current));if(t!=null&&t.current)for(let l of t.current)a.push(l);for(let l of(i=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?i:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(n&&(l.contains(n)||l.contains((s=n==null?void 0:n.getRootNode())==null?void 0:s.host))||a.some(u=>l.contains(u))||a.push(l));return a});return{resolveContainers:o,contains:ee(i=>o().some(s=>s.contains(i)))}}let _h=Be(null);function sc({children:e,node:t}){let[n,r]=ae(null),o=xh(t??n);return V.createElement(_h.Provider,{value:o},e,o===null&&V.createElement(wo,{features:Ir.Hidden,ref:i=>{var s,a;if(i){for(let l of(a=(s=Vr(i))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?a:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(i)){r(l);break}}}}))}function xh(e=null){var t;return(t=Ee(_h))!=null?t:e}function Ja(){let e=K(!1);return Pe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var ao=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ao||{});function Yx(){let e=K(0);return zf(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Ch(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Zx="div";var Vn=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Vn||{});function Kx(e,t){let n=K(null),r=it(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...l}=e;Ro()||(a=0);let u=Wr(n);e2(a,{ownerDocument:u});let d=t2(a,{ownerDocument:u,container:n,initialFocus:o,initialFocusFallback:i});n2(a,{ownerDocument:u,container:n,containers:s,previousActiveElement:d});let c=Yx(),p=ee(C=>{let S=n.current;S&&($=>$())(()=>{gt(c.current,{[ao.Forwards]:()=>{Cr(S,Vt.First,{skipElements:[C.relatedTarget,i]})},[ao.Backwards]:()=>{Cr(S,Vt.Last,{skipElements:[C.relatedTarget,i]})}})})}),f=Ur(!!(a&2),"focus-trap#tab-lock"),h=In(),g=K(!1),w={ref:r,onKeyDown(C){C.key=="Tab"&&(g.current=!0,h.requestAnimationFrame(()=>{g.current=!1}))},onBlur(C){if(!(a&4))return;let S=Ch(s);n.current instanceof HTMLElement&&S.add(n.current);let $=C.relatedTarget;$ instanceof HTMLElement&&$.dataset.headlessuiFocusGuard!=="true"&&(Sh(S,$)||(g.current?Cr(n.current,gt(c.current,{[ao.Forwards]:()=>Vt.Next,[ao.Backwards]:()=>Vt.Previous})|Vt.WrapAround,{relativeTo:C.target}):C.target instanceof HTMLElement&&dn(C.target)))}},_=et();return V.createElement(V.Fragment,null,f&&V.createElement(wo,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ir.Focusable}),_({ourProps:w,theirProps:l,defaultTag:Zx,name:"FocusTrap"}),f&&V.createElement(wo,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ir.Focusable}))}let Xx=qe(Kx),Qx=Object.assign(Xx,{features:Vn});function Jx(e=!0){let t=K(En.slice());return qa(([n],[r])=>{r===!0&&n===!1&&Bi(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=En.slice())},[e,En,t]),ee(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function e2(e,{ownerDocument:t}){let n=!!(e&8),r=Jx(n);qa(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&dn(r())},[n]),ph(()=>{n&&dn(r())})}function t2(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=K(null),s=Ur(!!(e&1),"focus-trap#initial-focus"),a=Ja();return qa(()=>{if(e===0)return;if(!s){o!=null&&o.current&&dn(o.current);return}let l=n.current;l&&Bi(()=>{if(!a.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){i.current=u;return}}else if(l.contains(u)){i.current=u;return}if(r!=null&&r.current)dn(r.current);else{if(e&16){if(Cr(l,Vt.First|Vt.AutoFocus)!==Ks.Error)return}else if(Cr(l,Vt.First)!==Ks.Error)return;if(o!=null&&o.current&&(dn(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,s,e]),i}function n2(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=Ja(),s=!!(e&4);Yf(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!i.current)return;let l=Ch(r);n.current instanceof HTMLElement&&l.add(n.current);let u=o.current;if(!u)return;let d=a.target;d&&d instanceof HTMLElement?Sh(l,d)?(o.current=d,dn(d)):(a.preventDefault(),a.stopPropagation(),dn(u)):dn(o.current)},!0)}function Sh(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Eh(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Th)!==Oe||V.Children.count(e.children)===1}let Zi=Be(null);Zi.displayName="TransitionContext";var r2=(e=>(e.Visible="visible",e.Hidden="hidden",e))(r2||{});function o2(){let e=Ee(Zi);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function i2(){let e=Ee(Ki);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ki=Be(null);Ki.displayName="NestingContext";function Xi(e){return"children"in e?Xi(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function kh(e,t){let n=On(e),r=K([]),o=Ja(),i=In(),s=ee((f,h=kn.Hidden)=>{let g=r.current.findIndex(({el:w})=>w===f);g!==-1&&(gt(h,{[kn.Unmount](){r.current.splice(g,1)},[kn.Hidden](){r.current[g].state="hidden"}}),i.microTask(()=>{var w;!Xi(r)&&o.current&&((w=n.current)==null||w.call(n))}))}),a=ee(f=>{let h=r.current.find(({el:g})=>g===f);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:f,state:"visible"}),()=>s(f,kn.Unmount)}),l=K([]),u=K(Promise.resolve()),d=K({enter:[],leave:[]}),c=ee((f,h,g)=>{l.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([w])=>w!==f)),t==null||t.chains.current[h].push([f,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[h].push([f,new Promise(w=>{Promise.all(d.current[h].map(([_,C])=>C)).then(()=>w())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(h)):g(h)}),p=ee((f,h,g)=>{Promise.all(d.current[h].splice(0).map(([w,_])=>_)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>g(h))});return te(()=>({children:r,register:a,unregister:s,onStart:c,onStop:p,wait:u,chains:d}),[a,s,r,c,p,d,u])}let Th=Oe,Ah=Nr.RenderStrategy;function s2(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:p,leave:f,leaveFrom:h,leaveTo:g,...w}=e,[_,C]=ae(null),S=K(null),$=Eh(e),O=it(...$?[S,t,C]:t===null?[]:[t]),P=(n=w.unmount)==null||n?kn.Unmount:kn.Hidden,{show:F,appear:v,initial:y}=o2(),[k,T]=ae(F?"visible":"hidden"),N=i2(),{register:D,unregister:H}=N;Pe(()=>D(S),[D,S]),Pe(()=>{if(P===kn.Hidden&&S.current){if(F&&k!=="visible"){T("visible");return}return gt(k,{hidden:()=>H(S),visible:()=>D(S)})}},[k,S,D,H,F,P]);let le=Ro();Pe(()=>{if($&&le&&k==="visible"&&S.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[S,k,le,$]);let W=y&&!v,U=v&&F&&y,I=K(!1),B=kh(()=>{I.current||(T("hidden"),H(S))},N),L=ee(Ne=>{I.current=!0;let Q=Ne?"enter":"leave";B.onStart(S,Q,fe=>{fe==="enter"?i==null||i():fe==="leave"&&(a==null||a())})}),re=ee(Ne=>{let Q=Ne?"enter":"leave";I.current=!1,B.onStop(S,Q,fe=>{fe==="enter"?s==null||s():fe==="leave"&&(l==null||l())}),Q==="leave"&&!Xi(B)&&(T("hidden"),H(S))});Se(()=>{$&&o||(L(F),re(F))},[F,$,o]);let q=!(!o||!$||!le||W),[,M]=Xf(q,_,F,{start:L,end:re}),Y=Sn({ref:O,className:((r=Ys(w.className,U&&u,U&&d,M.enter&&u,M.enter&&M.closed&&d,M.enter&&!M.closed&&c,M.leave&&f,M.leave&&!M.closed&&h,M.leave&&M.closed&&g,!M.transition&&F&&p))==null?void 0:r.trim())||void 0,...Kf(M)}),oe=0;k==="visible"&&(oe|=ft.Open),k==="hidden"&&(oe|=ft.Closed),M.enter&&(oe|=ft.Opening),M.leave&&(oe|=ft.Closing);let Ae=et();return V.createElement(Ki.Provider,{value:B},V.createElement(mh,{value:oe},Ae({ourProps:Y,theirProps:w,defaultTag:Th,features:Ah,visible:k==="visible",name:"Transition.Child"})))}function a2(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=K(null),a=Eh(e),l=it(...a?[s,t]:t===null?[]:[t]);Ro();let u=Po();if(n===void 0&&u!==null&&(n=(u&ft.Open)===ft.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=ae(n?"visible":"hidden"),p=kh(()=>{n||c("hidden")}),[f,h]=ae(!0),g=K([n]);Pe(()=>{f!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),h(!1))},[g,n]);let w=te(()=>({show:n,appear:r,initial:f}),[n,r,f]);Pe(()=>{n?c("visible"):!Xi(p)&&s.current!==null&&c("hidden")},[n,p]);let _={unmount:o},C=ee(()=>{var O;f&&h(!1),(O=e.beforeEnter)==null||O.call(e)}),S=ee(()=>{var O;f&&h(!1),(O=e.beforeLeave)==null||O.call(e)}),$=et();return V.createElement(Ki.Provider,{value:p},V.createElement(Zi.Provider,{value:w},$({ourProps:{..._,as:Oe,children:V.createElement($h,{ref:l,..._,...i,beforeEnter:C,beforeLeave:S})},theirProps:{},defaultTag:Oe,features:Ah,visible:d==="visible",name:"Transition"})))}function l2(e,t){let n=Ee(Zi)!==null,r=Po()!==null;return V.createElement(V.Fragment,null,!n&&r?V.createElement(ta,{ref:t,...e}):V.createElement($h,{ref:t,...e}))}let ta=qe(a2),$h=qe(s2),el=qe(l2),u2=Object.assign(ta,{Child:el,Root:ta});var c2=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(c2||{}),d2=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(d2||{});let f2={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},tl=Be(null);tl.displayName="DialogContext";function Qi(e){let t=Ee(tl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qi),n}return t}function h2(e,t){return gt(t.type,f2,e,t)}let ac=qe(function(e,t){let n=Ft(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:l=!0,__demoMode:u=!1,unmount:d=!1,...c}=e,p=K(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(p.current||(p.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=Po();o===void 0&&f!==null&&(o=(f&ft.Open)===ft.Open);let h=K(null),g=it(h,t),w=Wr(h),_=o?0:1,[C,S]=or(h2,{titleId:null,descriptionId:null,panelRef:Ai()}),$=ee(()=>i(!1)),O=ee(re=>S({type:0,id:re})),P=Ro()?_===0:!1,[F,v]=Ux(),y={get current(){var re;return(re=C.panelRef.current)!=null?re:h.current}},k=xh(),{resolveContainers:T}=qx({mainTreeNode:k,portals:F,defaultContainers:[y]}),N=f!==null?(f&ft.Closing)===ft.Closing:!1;jf(u||N?!1:P,{allowed:ee(()=>{var re,q;return[(q=(re=h.current)==null?void 0:re.closest("[data-headlessui-portal]"))!=null?q:null]}),disallowed:ee(()=>{var re;return[(re=k==null?void 0:k.closest("body > *:not(#headlessui-portal-root)"))!=null?re:null]})}),qf(P,T,re=>{re.preventDefault(),$()}),Gx(P,w==null?void 0:w.defaultView,re=>{re.preventDefault(),re.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Zf(u||N?!1:P,w,T),Bf(P,h,$);let[D,H]=Ob(),le=te(()=>[{dialogState:_,close:$,setTitleId:O,unmount:d},C],[_,C,$,O,d]),W=te(()=>({open:_===0}),[_]),U={ref:g,id:r,role:a,tabIndex:-1,"aria-modal":u?void 0:_===0?!0:void 0,"aria-labelledby":C.titleId,"aria-describedby":D,unmount:d},I=!zx(),B=Vn.None;P&&!u&&(B|=Vn.RestoreFocus,B|=Vn.TabLock,l&&(B|=Vn.AutoFocus),I&&(B|=Vn.InitialFocus));let L=et();return V.createElement(Ox,null,V.createElement(ic,{force:!0},V.createElement(bh,null,V.createElement(tl.Provider,{value:le},V.createElement(vh,{target:h},V.createElement(ic,{force:!1},V.createElement(H,{slot:W},V.createElement(v,null,V.createElement(Qx,{initialFocus:s,initialFocusFallback:h,containers:T,features:B},V.createElement(Wb,{value:$},L({ourProps:U,theirProps:c,slot:W,defaultTag:m2,features:p2,visible:_===0,name:"Dialog"})))))))))))}),m2="div",p2=Nr.RenderStrategy|Nr.Static;function g2(e,t){let{transition:n=!1,open:r,...o}=e,i=Po(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?V.createElement(sc,null,V.createElement(u2,{show:r,transition:n,unmount:o.unmount},V.createElement(ac,{ref:t,...o}))):V.createElement(sc,null,V.createElement(ac,{ref:t,open:r,...o}))}let w2="div";function y2(e,t){let n=Ft(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s,unmount:a},l]=Qi("Dialog.Panel"),u=it(t,l.panelRef),d=te(()=>({open:s===0}),[s]),c=ee(w=>{w.stopPropagation()}),p={ref:u,id:r,onClick:c},f=o?el:Oe,h=o?{unmount:a}:{},g=et();return V.createElement(f,{...h},g({ourProps:p,theirProps:i,slot:d,defaultTag:w2,name:"Dialog.Panel"}))}let v2="div";function b2(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:i}]=Qi("Dialog.Backdrop"),s=te(()=>({open:o===0}),[o]),a={ref:t,"aria-hidden":!0},l=n?el:Oe,u=n?{unmount:i}:{},d=et();return V.createElement(l,{...u},d({ourProps:a,theirProps:r,slot:s,defaultTag:v2,name:"Dialog.Backdrop"}))}let _2="h2";function x2(e,t){let n=Ft(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=Qi("Dialog.Title"),a=it(t);Se(()=>(s(r),()=>s(null)),[r,s]);let l=te(()=>({open:i===0}),[i]),u={ref:a,id:r};return et()({ourProps:u,theirProps:o,slot:l,defaultTag:_2,name:"Dialog.Title"})}let C2=qe(g2),S2=qe(y2),E2=qe(b2),k2=qe(x2),Mh=Object.assign(C2,{Panel:S2,Title:k2,Description:Rb});function T2(e,t){let n=K({left:0,top:0});if(Pe(()=>{if(!t)return;let o=t.getBoundingClientRect();o&&(n.current=o)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let lc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function uc(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(n=o.innerText)!=null?n:"":r;return lc.test(s)&&(s=s.replace(lc,"")),s}function A2(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():uc(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return uc(e).trim()}function $2(e){let t=K(""),n=K("");return ee(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=A2(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var M2=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(M2||{}),N2=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(N2||{}),I2=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(I2||{}),O2=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(O2||{});function Cs(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Wf(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let F2={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(o=>n(o.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Xe.Nothing)return{...a,activeOptionIndex:null};if(t.focus===Xe.Specific)return{...a,activeOptionIndex:e.options.findIndex(d=>d.id===t.id)};if(t.focus===Xe.Previous){let d=e.activeOptionIndex;if(d!==null){let c=e.options[d].dataRef.current.domRef,p=xs(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(p!==null){let f=e.options[p].dataRef.current.domRef;if(((r=c.current)==null?void 0:r.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeOptionIndex:p}}}}else if(t.focus===Xe.Next){let d=e.activeOptionIndex;if(d!==null){let c=e.options[d].dataRef.current.domRef,p=xs(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(p!==null){let f=e.options[p].dataRef.current.domRef;if(((i=c.current)==null?void 0:i.nextElementSibling)===f.current||((s=f.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeOptionIndex:p}}}}let l=Cs(e),u=xs(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...a,...l,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(s=>{var a;return!s.dataRef.current.disabled&&((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Cs(e,o=>[...o,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Cs(e,r=>{let o=r.findIndex(i=>i.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},nl=Be(null);nl.displayName="ListboxActionsContext";function Ji(e){let t=Ee(nl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ji),n}return t}let es=Be(null);es.displayName="ListboxDataContext";function Lo(e){let t=Ee(es);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Lo),n}return t}function D2(e,t){return gt(t.type,F2,e,t)}let P2=Oe;function R2(e,t){var n;let r=Ga(),{value:o,defaultValue:i,form:s,name:a,onChange:l,by:u,invalid:d=!1,disabled:c=r||!1,horizontal:p=!1,multiple:f=!1,__demoMode:h=!1,...g}=e;const w=p?"horizontal":"vertical";let _=it(t),C=bb(i),[S=f?[]:void 0,$]=vb(o,l,C),[O,P]=or(D2,{dataRef:Ai(),listboxState:h?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:h}),F=K({static:!1,hold:!1}),v=K(new Map),y=zb(u),k=ve(X=>gt(T.mode,{1:()=>S.some(he=>y(he,X)),0:()=>y(S,X)}),[S]),T=te(()=>({...O,value:S,disabled:c,invalid:d,mode:f?1:0,orientation:w,compare:y,isSelected:k,optionsPropsRef:F,listRef:v}),[S,c,d,f,O,v]);Pe(()=>{O.dataRef.current=T},[T]);let N=T.listboxState===0;qf(N,[T.buttonElement,T.optionsElement],(X,he)=>{var ie;P({type:1}),Uf(he,za.Loose)||(X.preventDefault(),(ie=T.buttonElement)==null||ie.focus())});let D=te(()=>({open:T.listboxState===0,disabled:c,invalid:d,value:S}),[T,c,S,d]),H=ee(X=>{let he=T.options.find(ie=>ie.id===X);he&&re(he.dataRef.current.value)}),le=ee(()=>{if(T.activeOptionIndex!==null){let{dataRef:X,id:he}=T.options[T.activeOptionIndex];re(X.current.value),P({type:2,focus:Xe.Specific,id:he})}}),W=ee(()=>P({type:0})),U=ee(()=>P({type:1})),I=In(),B=ee((X,he,ie)=>{I.dispose(),I.microTask(()=>X===Xe.Specific?P({type:2,focus:Xe.Specific,id:he,trigger:ie}):P({type:2,focus:X,trigger:ie}))}),L=ee((X,he)=>(P({type:5,id:X,dataRef:he}),()=>P({type:6,id:X}))),re=ee(X=>gt(T.mode,{0(){return $==null?void 0:$(X)},1(){let he=T.value.slice(),ie=he.findIndex(we=>y(we,X));return ie===-1?he.push(X):he.splice(ie,1),$==null?void 0:$(he)}})),q=ee(X=>P({type:3,value:X})),M=ee(()=>P({type:4})),Y=ee(X=>{P({type:7,element:X})}),oe=ee(X=>{P({type:8,element:X})}),Ae=te(()=>({onChange:re,registerOption:L,goToOption:B,closeListbox:U,openListbox:W,selectActiveOption:le,selectOption:H,search:q,clearSearch:M,setButtonElement:Y,setOptionsElement:oe}),[]),[Ne,Q]=Lb({inherit:!0}),fe={ref:_},ue=ve(()=>{if(C!==void 0)return $==null?void 0:$(C)},[$,C]),_e=et();return V.createElement(Q,{value:Ne,props:{htmlFor:(n=T.buttonElement)==null?void 0:n.id},slot:{open:T.listboxState===0,disabled:c}},V.createElement($x,null,V.createElement(nl.Provider,{value:Ae},V.createElement(es.Provider,{value:T},V.createElement(mh,{value:gt(T.listboxState,{0:ft.Open,1:ft.Closed})},a!=null&&S!=null&&V.createElement(kb,{disabled:c,data:{[a]:S},form:s,onReset:ue}),_e({ourProps:fe,theirProps:g,slot:D,defaultTag:P2,name:"Listbox"}))))))}let L2="button";function H2(e,t){var n;let r=Lo("Listbox.Button"),o=Ji("Listbox.Button"),i=Ft(),s=Of(),{id:a=s||`headlessui-listbox-button-${i}`,disabled:l=r.disabled||!1,autoFocus:u=!1,...d}=e,c=it(t,Ex(),o.setButtonElement),p=kx(),f=ee(T=>{switch(T.key){case Ye.Enter:_b(T.currentTarget);break;case Ye.Space:case Ye.ArrowDown:T.preventDefault(),St(()=>o.openListbox()),r.value||o.goToOption(Xe.First);break;case Ye.ArrowUp:T.preventDefault(),St(()=>o.openListbox()),r.value||o.goToOption(Xe.Last);break}}),h=ee(T=>{switch(T.key){case Ye.Space:T.preventDefault();break}}),g=ee(T=>{var N;if($b(T.currentTarget))return T.preventDefault();r.listboxState===0?(St(()=>o.closeListbox()),(N=r.buttonElement)==null||N.focus({preventScroll:!0})):(T.preventDefault(),o.openListbox())}),w=ee(T=>T.preventDefault()),_=Rf([a]),C=Ib(),{isFocusVisible:S,focusProps:$}=ab({autoFocus:u}),{isHovered:O,hoverProps:P}=sb({isDisabled:l}),{pressed:F,pressProps:v}=hb({disabled:l}),y=te(()=>({open:r.listboxState===0,active:F||r.listboxState===0,disabled:l,invalid:r.invalid,value:r.value,hover:O,focus:S,autofocus:u}),[r.listboxState,r.value,l,O,S,F,r.invalid,u]),k=$f(p(),{ref:c,id:a,type:s_(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":(n=r.optionsElement)==null?void 0:n.id,"aria-expanded":r.listboxState===0,"aria-labelledby":_,"aria-describedby":C,disabled:l||void 0,autoFocus:u,onKeyDown:f,onKeyUp:h,onKeyPress:w,onClick:g},$,P,v);return et()({ourProps:k,theirProps:d,slot:y,defaultTag:L2,name:"Listbox.Button"})}let Nh=Be(!1),j2="div",B2=Nr.RenderStrategy|Nr.Static;function V2(e,t){var n,r;let o=Ft(),{id:i=`headlessui-listbox-options-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:u=!1,...d}=e,c=Sx(s),[p,f]=ae(null);c&&(a=!0);let h=Lo("Listbox.Options"),g=Ji("Listbox.Options"),w=Wr(h.optionsElement),_=Po(),[C,S]=Xf(u,p,_!==null?(_&ft.Open)===ft.Open:h.listboxState===0);Bf(C,h.buttonElement,g.closeListbox);let $=h.__demoMode?!1:l&&h.listboxState===0;Zf($,w);let O=h.__demoMode?!1:l&&h.listboxState===0;jf(O,{allowed:ve(()=>[h.buttonElement,h.optionsElement],[h.buttonElement,h.optionsElement])});let P=h.listboxState!==0,F=T2(P,h.buttonElement)?!1:C,v=C&&h.listboxState===1,y=Ix(v,h.value),k=ee(M=>h.compare(y,M)),T=te(()=>{var M;if(c==null||!((M=c==null?void 0:c.to)!=null&&M.includes("selection")))return null;let Y=h.options.findIndex(oe=>k(oe.dataRef.current.value));return Y===-1&&(Y=0),Y},[c,h.options]),N=(()=>{if(c==null)return;if(T===null)return{...c,inner:void 0};let M=Array.from(h.listRef.current.values());return{...c,inner:{listRef:{current:M},index:T}}})(),[D,H]=Ax(N),le=Tx(),W=it(t,c?D:null,g.setOptionsElement,f),U=In();Se(()=>{var M;let Y=h.optionsElement;Y&&h.listboxState===0&&Y!==((M=Vr(Y))==null?void 0:M.activeElement)&&(Y==null||Y.focus({preventScroll:!0}))},[h.listboxState,h.optionsElement]);let I=ee(M=>{var Y,oe;switch(U.dispose(),M.key){case Ye.Space:if(h.searchQuery!=="")return M.preventDefault(),M.stopPropagation(),g.search(M.key);case Ye.Enter:if(M.preventDefault(),M.stopPropagation(),h.activeOptionIndex!==null){let{dataRef:Ae}=h.options[h.activeOptionIndex];g.onChange(Ae.current.value)}h.mode===0&&(St(()=>g.closeListbox()),(Y=h.buttonElement)==null||Y.focus({preventScroll:!0}));break;case gt(h.orientation,{vertical:Ye.ArrowDown,horizontal:Ye.ArrowRight}):return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.Next);case gt(h.orientation,{vertical:Ye.ArrowUp,horizontal:Ye.ArrowLeft}):return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.Previous);case Ye.Home:case Ye.PageUp:return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.First);case Ye.End:case Ye.PageDown:return M.preventDefault(),M.stopPropagation(),g.goToOption(Xe.Last);case Ye.Escape:M.preventDefault(),M.stopPropagation(),St(()=>g.closeListbox()),(oe=h.buttonElement)==null||oe.focus({preventScroll:!0});return;case Ye.Tab:M.preventDefault(),M.stopPropagation(),St(()=>g.closeListbox()),r_(h.buttonElement,M.shiftKey?Vt.Previous:Vt.Next);break;default:M.key.length===1&&(g.search(M.key),U.setTimeout(()=>g.clearSearch(),350));break}}),B=(n=h.buttonElement)==null?void 0:n.id,L=te(()=>({open:h.listboxState===0}),[h.listboxState]),re=$f(c?le():{},{id:i,ref:W,"aria-activedescendant":h.activeOptionIndex===null||(r=h.options[h.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":h.mode===1?!0:void 0,"aria-labelledby":B,"aria-orientation":h.orientation,onKeyDown:I,role:"listbox",tabIndex:h.listboxState===0?0:void 0,style:{...d.style,...H,"--button-width":Yb(h.buttonElement,!0).width},...Kf(S)}),q=et();return V.createElement(bh,{enabled:a?e.static||C:!1},V.createElement(es.Provider,{value:h.mode===1?h:{...h,isSelected:k}},q({ourProps:re,theirProps:d,slot:L,defaultTag:j2,features:B2,visible:F,name:"Listbox.Options"})))}let U2="div";function W2(e,t){let n=Ft(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...s}=e,a=Ee(Nh)===!0,l=Lo("Listbox.Option"),u=Ji("Listbox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,c=l.isSelected(i),p=K(null),f=$2(p),h=On({disabled:o,value:i,domRef:p,get textValue(){return f()}}),g=it(t,p,y=>{y?l.listRef.current.set(r,y):l.listRef.current.delete(r)});Pe(()=>{if(!l.__demoMode&&l.listboxState===0&&d&&l.activationTrigger!==0)return bn().requestAnimationFrame(()=>{var y,k;(k=(y=p.current)==null?void 0:y.scrollIntoView)==null||k.call(y,{block:"nearest"})})},[p,d,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),Pe(()=>{if(!a)return u.registerOption(r,h)},[h,r,a]);let w=ee(y=>{var k;if(o)return y.preventDefault();u.onChange(i),l.mode===0&&(St(()=>u.closeListbox()),(k=l.buttonElement)==null||k.focus({preventScroll:!0}))}),_=ee(()=>{if(o)return u.goToOption(Xe.Nothing);u.goToOption(Xe.Specific,r)}),C=f_(),S=ee(y=>{C.update(y),!o&&(d||u.goToOption(Xe.Specific,r,0))}),$=ee(y=>{C.wasMoved(y)&&(o||d||u.goToOption(Xe.Specific,r,0))}),O=ee(y=>{C.wasMoved(y)&&(o||d&&u.goToOption(Xe.Nothing))}),P=te(()=>({active:d,focus:d,selected:c,disabled:o,selectedOption:c&&a}),[d,c,o,a]),F=a?{}:{id:r,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:w,onFocus:_,onPointerEnter:S,onMouseEnter:S,onPointerMove:$,onMouseMove:$,onPointerLeave:O,onMouseLeave:O},v=et();return!c&&a?null:v({ourProps:F,theirProps:s,slot:P,defaultTag:U2,name:"Listbox.Option"})}let G2=Oe;function z2(e,t){let{options:n,placeholder:r,...o}=e,i={ref:it(t)},s=Lo("ListboxSelectedOption"),a=te(()=>({}),[]),l=s.value===void 0||s.value===null||s.mode===1&&Array.isArray(s.value)&&s.value.length===0,u=et();return V.createElement(Nh.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:V.createElement(V.Fragment,null,r&&l?r:n)},slot:a,defaultTag:G2,name:"ListboxSelectedOption"}))}let q2=qe(R2),Ih=qe(H2),Y2=Vb,Oh=qe(V2),Fh=qe(W2),Z2=qe(z2),K2=Object.assign(q2,{Button:Ih,Label:Y2,Options:Oh,Option:Fh,SelectedOption:Z2}),fn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["As","Key","ClassName","Open","OnClose","Children"]}};function rl(e){return m(Mh,sr(e,1))}class ol extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","ClassName","Children"]}}function il(e){return m(Mh.Panel,sr(e,1))}class sl extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["As","Key","ClassName"]}}function al(e){return m(E2,sr(e,1))}function ll(e,t){let n;return m("svg",x(b([["width",e],["height",t],["viewBox","0 0 "+e+" "+t],["fill","none"],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,strokeLinecap:"round"})),["children",E.Children.toArray(Array.from(n))])])))}function X2(e,t){let n,r,o,i,s;return rl(b([new fn(3,[e]),new fn(4,[t]),new fn(5,[[al(ge(new sl(2,["fixed inset-0 bg-gray-500/50"]))),m("div",x(b([["className","fixed top-0 bottom-0 right-0 w-[480px] bg-white overflow-y-auto"],(n=[il(ge(new ol(2,[[m("div",x(b([["className","flex flex-col mt-6 mb-6 px-6"],(r=[m("div",x(b([["className","flex flex-row justify-between"],(o=[m("span",{className:"text-gray-900 font-semibold text-lg",children:"What is mapping and why is it important?"}),m("button",x(b([["onClick",a=>{t()}],["type","button"],["className","text-gray-700"],(i=[ll(24,24)],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])]))),m("div",x(b([["className","text-sm text-gray-600 pt-6"],(s="Mapping involves pairing each incoming CSV field with its correct destination field. This step is important because it makes sure that your data is organised correctly, minimising the risk of errors and ensuring a smooth import process.",["children",s])])))],["children",E.Children.toArray(Array.from(r))])])))]])))],["children",E.Children.toArray(Array.from(n))])])))]])]))}function Dh(e,t){let n;return m("svg",x(b([["fill","none"],["height",t],["viewBox","0 0 "+e+" "+t],["width",e],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",{d:"M15 6H1",stroke:"#D1D5DB",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),m("path",{d:"M6 11L1 6L6 1",stroke:"#D1D5DB",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]),["children",E.Children.toArray(Array.from(n))])])))}class Ss extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Value","OnChange","Children"]}}function Q2(e){return m(K2,sr(e,1))}class cc extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["ClassName","Children"]}}function J2(e){return m(Ih,sr(e,1))}class eC extends z{constructor(t){super(),this.tag=0,this.fields=[t]}cases(){return["ClassName"]}}function tC(e,t){return m(Oh,sr(e,1),...t)}class ro extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Key","Value","Disabled","ClassName","Children"]}}function nC(e){return m(Fh,sr(e,1))}function rC(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["viewBox","0 0 "+e+" "+t],["width",e],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([["clipRule","evenodd"],["fill-rule","evenodd"],(r="M5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.7071 7.29289L9.99999 10.5858L13.2929 7.29289C13.6834 6.90237 14.3166 6.90237 14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L10.7071 12.7071C10.3166 13.0976 9.68341 13.0976 9.29289 12.7071L5.29289 8.70711C4.90237 8.31658 4.90237 7.68342 5.29289 7.29289Z",["d",r]),["fill","#6B7280"]])))),["children",E.Children.toArray(Array.from(n))])])))}class oo extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Below","Above"]}}function io(e,t,n,r,o,i,s,a,l){let u,d,c,p,f,h,g;const w=o.fields[0],_=a0(yn(C=>C[1].fields[0],l0(C=>fd(C.fields[0],w),r)));return m("div",x(b([["key",It(e)],["className","h-14 pr-3 py-2 rounded-lg justify-start items-center gap-2 inline-flex"],(u=[m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-end items-center gap-1 flex overflow-hidden"],(d=[m("div",x(Ue(G(()=>ye(j(["className",`${r==null?"bg-gray-50 border-gray-200 text-gray-500":"bg-emerald-50 border-emerald-200 text-emerald-700"} px-2 py-1 rounded border justify-start items-center gap-1.5 flex overflow-hidden`]),G(()=>{let C;return j((C=Ue(G(()=>ye(j(m("div",{className:"text-sm font-medium leading-tight",children:wf(e)})),G(()=>j(t?m("div",{className:"text-red-500 text-sm font-medium leading-tight",children:"*"}):Ke()))))),["children",E.Children.toArray(Array.from(C))]))}))))))],["children",E.Children.toArray(Array.from(d))])]))),m("div",x(b([["className","w-5 h-10 px-[3px] py-[5px] flex-col justify-center gap-2.5 inline-flex"],(c=[Dh(16,12)],["children",E.Children.toArray(Array.from(c))])]))),m("div",x(b([["className","w-[230px] h-[38px] px-3 justify-start items-center gap-2 flex"],(p=[Q2(b([new Ss(0,[_]),new Ss(1,[C=>{To(S=>{s(S[0])},Ca(Ta(S=>S[1].fields[0]===C?me(S[2],new sn(0,[])):!1,w)))}]),new Ss(2,[[m("div",x(b([["className","relative w-full"],(f=[J2(Ue(G(()=>ye(j(new cc(0,[`${t&&n&&r==null?"outline-red-300":"outline-gray-300"} grid w-full grid-cols-1 rounded-md bg-white py-1.5 pl-3 pr-2 text-left text-gray-900 text-sm outline outline-1 -outline-offset-1 focus:outline focus:outline-2 focus:outline-blue-600 focus:-outline-offset-2`])),G(()=>{let C;return j(new cc(1,[[m("span",x(Ue(G(()=>{const S=r!=null?[_,""]:n?["Select a field","text-red-900"]:["Select a field","text-gray-500"];return ye(j(["className",`${S[1]} col-start-1 row-start-1 truncate pr-6`]),G(()=>j(["children",S[0]])))})))),m("span",x(b([["className","col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4"],(C=[rC(20,20)],["children",E.Children.toArray(Array.from(C))])])))]]))}))))),tC(Ue(G(()=>j(new eC(`z-10 ${i.tag===1?"relative -mt-[226px]":"absolute mt-0.5"} max-h-48 w-full overflow-auto rounded-md border border-gray-300 shadow-gray-300 shadow-lg bg-white py-1 text-sm`)))),Ue(G(()=>kd(C=>{const S=C[2],$=C[1].fields[0];return j(nC(b([new ro(0,[Wt(C[0].fields[0])]),new ro(1,[$]),new ro(2,[me(S,new sn(1,[]))]),new ro(3,["relative select-none"]),new ro(4,[O=>[m("span",{className:"px-4 py-2 block truncate "+(S.tag===1?"text-gray-700 opacity-50 cursor-not-allowed":O.active?"bg-primary-600 text-white":(O.selected,"text-gray-700")),children:$})]])])))},w))))],["children",E.Children.toArray(Array.from(f))])])))]])]))],["children",E.Children.toArray(Array.from(p))])]))),m("div",x(b([(h="pl-1 justify-center items-center gap-2.5 flex text-gray-500 text-xs font-normal underline leading-none",["className",h]),(g=[m("button",x(Ue(G(()=>ye(j(["children","Clear"]),G(()=>ye(a==null?j(["className","opacity-50 cursor-not-allowed"]):j(["className","cursor-pointer"]),G(()=>{const C=a;if(C==null)return Bl();{const S=C;return j(["onClick",$=>{S()}])}})))))))),m("button",x(Ue(G(()=>ye(j(["children","Preview"]),G(()=>ye(l==null?j(["className","opacity-50 cursor-not-allowed"]):j(["className","cursor-pointer"]),G(()=>{const C=l;if(C==null)return Bl();{const S=C;return j(["onClick",$=>{S()}])}}))))))))],["children",E.Children.toArray(Array.from(g))])])))],["children",E.Children.toArray(Array.from(u))])])))}function oC(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["viewBox","0 0 "+e+" "+t],["width",e],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([["clipRule","evenodd"],["fill-rule","evenodd"],(r="M6.3001 1.40002C6.03495 1.40002 5.79257 1.54983 5.674 1.78697L5.16747 2.80002H2.8001C2.4135 2.80002 2.1001 3.11342 2.1001 3.50002C2.1001 3.88662 2.4135 4.20002 2.8001 4.20002L2.8001 11.2C2.8001 11.9732 3.4269 12.6 4.2001 12.6H9.80009C10.5733 12.6 11.2001 11.9732 11.2001 11.2V4.20002C11.5867 4.20002 11.9001 3.88662 11.9001 3.50002C11.9001 3.11342 11.5867 2.80002 11.2001 2.80002H8.83272L8.32619 1.78697C8.20762 1.54983 7.96523 1.40002 7.70009 1.40002H6.3001ZM4.9001 5.60002C4.9001 5.21342 5.2135 4.90002 5.60009 4.90002C5.98669 4.90002 6.30009 5.21342 6.30009 5.60002V9.80002C6.30009 10.1866 5.98669 10.5 5.60009 10.5C5.2135 10.5 4.9001 10.1866 4.9001 9.80002V5.60002ZM8.40009 4.90002C8.01349 4.90002 7.70009 5.21342 7.70009 5.60002V9.80002C7.70009 10.1866 8.01349 10.5 8.40009 10.5C8.78669 10.5 9.10009 10.1866 9.10009 9.80002V5.60002C9.10009 5.21342 8.78669 4.90002 8.40009 4.90002Z",["d",r]),["fill","#9CA3AF"]])))),["children",E.Children.toArray(Array.from(n))])])))}function Ph(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([(r="M8.83429 0.234315C9.14671 -0.0781049 9.65324 -0.0781049 9.96566 0.234315L13.1657 3.43431C13.4781 3.74673 13.4781 4.25327 13.1657 4.56569L9.96566 7.76569C9.65324 8.0781 9.14671 8.0781 8.83429 7.76569C8.52187 7.45327 8.52187 6.94673 8.83429 6.63432L10.6686 4.8H1.39998C0.958148 4.8 0.599976 4.44183 0.599976 4C0.599976 3.55817 0.958148 3.2 1.39998 3.2H10.6686L8.83429 1.36569C8.52187 1.05327 8.52187 0.546734 8.83429 0.234315Z",["d",r]),["fill","white"]])))),["children",E.Children.toArray(Array.from(n))])])))}function iC(e,t){let n,r,o,i,s,a,l;return m("div",x(b([["className","w-80 py-6 justify-start items-center gap-2.5 flex"],(n=[m("div",x(b([(r="grow shrink basis-0 p-4 bg-white rounded-lg shadow-lg border border-gray-100 flex-col justify-start items-start gap-3 inline-flex overflow-hidden",["className",r]),(o=[m("div",x(b([["className","self-stretch justify-start items-center gap-2 inline-flex"],(i=[m("div",{className:"text-black text-base font-semibold leading-normal",children:`Previewing “${wf(e)}”`})],["children",E.Children.toArray(Array.from(i))])]))),m("div",x(b([["className","self-stretch bg-white flex-col justify-start items-start flex overflow-hidden"],(s=[m("div",x(b([["className","self-stretch flex-col justify-center items-start flex"],(a=cd((u,d)=>m("div",x(Ue(G(()=>ye(j(["className",`${u%2===0?"bg-white":"bg-gray-50"} self-stretch h-10 px-3 py-3.5 border-b border-gray-200 justify-start items-center gap-1 inline-flex overflow-hidden`]),G(()=>{let c;return j((c=[m("div",{className:"grow shrink basis-0 text-gray-600 text-sm font-normal leading-tight",children:d})],["children",E.Children.toArray(Array.from(c))]))})))))),t),["children",E.Children.toArray(Array.from(a))])])))],["children",E.Children.toArray(Array.from(s))])]))),m("div",x(b([["className","self-stretch pt-2 justify-center items-center gap-2.5 inline-flex"],(l=[m("div",{className:"grow shrink basis-0 text-gray-500 text-sm font-normal leading-tight",children:"Showing first 10 rows only"})],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(o))])])))],["children",E.Children.toArray(Array.from(n))])])))}function sC(){let e,t,n;return m("div",x(b([["className","w-full p-4 bg-blue-50 rounded-md justify-start items-start gap-3 inline-flex"],(e=[Pv(20,20),m("div",x(b([["className","grow shrink basis-0 h-[60px] justify-between items-center flex"],(t=[m("div",x(b([["className","grow shrink basis-0 text-blue-800 text-sm font-medium leading-tight"],(n="We’ve automatically pre-filled some options based on the matches found in your CSV. Please double-check to make sure they are correct and fill in any missing fields before continuing.",["children",n])])))],["children",E.Children.toArray(Array.from(t))])])))],["children",E.Children.toArray(Array.from(e))])])))}function aC(){let e,t;return m("div",x(b([["className","w-full h-[52px] p-4 bg-red-50 rounded-md justify-start items-start gap-3 inline-flex"],(e=[gf(16,15),m("div",x(b([["className","grow shrink basis-0 h-5 justify-between items-center flex"],(t=[m("div",{className:"grow shrink basis-0 text-red-800 text-sm font-medium leading-tight",children:"Some required fields are incomplete. Fill in all required fields to proceed"})],["children",E.Children.toArray(Array.from(t))])])))],["children",E.Children.toArray(Array.from(e))])])))}function lC(e){let t,n,r;const o=e.back,i=e.next,s=e.dataRows,a=e.headerRow,l=e.existingMappings;let u;const d=Vv(a,l);u=$o(()=>Ao(()=>d,(S,$)=>Uv(a,s,S,$),(S,$)=>{}),void 0,[]);const c=u[0],p=u[1],f=E.useState(!1),h=f[1],g=E.useState(!1),w=g[0],_=S=>{if(jv(c)(S))return()=>{p(new Pn(1,[S]))}},C=S=>{if(Bv(c,S))return()=>{p(new Pn(2,[S]))}};return m("div",x(b([["className","flex flex-col bg-gray-50 px-12 pt-8 pb-12 h-full"],(t=[X2(f[0],()=>{h(!1)}),m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Map fields"}),m("span",{className:"text-sm font-normal pt-2",children:"Match the fields from your CSV to the corresponding destination fields."}),m("div",x(b([["className","flex flex-row pt-3 gap-2"],(n=[m("button",{className:"rounded-2xl text-xs font-medium text-gray-600 border px-3.5 py-1.5 bg-white",onClick:S=>{h(!0)},type:"button",children:E.Children.toArray(["What is mapping and why is it important?"])})],["children",E.Children.toArray(Array.from(n))])]))),m("div",x(b([["className","justify-start items-start gap-12 inline-flex"],(r=Ue(G(()=>{let S;return ye(j(m("div",x(b([["className","w-[640px] pt-6 flex-col justify-start items-start gap-4 inline-flex"],(S=Ue(G(()=>ye(w||l!=null?j(Ke()):j(sC()),G(()=>ye(w&&c.Status.tag===0?j(aC()):j(Ke()),G(()=>{let $,O,P,F,v,y,k,T,N;return j(m("div",x(b([["className","flex-col justify-start items-start inline-flex overflow-hidden"],($=[m("div",x(b([(O="w-[640px] h-16 pt-6 bg-gray-50 border-b border-gray-200 justify-start items-center gap-2 inline-flex",["className",O]),(P=[m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-end items-center gap-1 flex overflow-hidden"],(F=[m("div",{className:"text-gray-900 text-sm font-medium leading-tight",children:"Destination fields"}),m("div",x(b([["className","px-2.5 py-0.5 bg-blue-100 rounded-[10px] justify-center items-center flex"],(v=[m("div",{className:"text-center text-blue-800 text-xs font-medium leading-none",children:`${c.NumberOfDestinationFieldsMapped} of 5 mapped`})],["children",E.Children.toArray(Array.from(v))])])))],["children",E.Children.toArray(Array.from(F))])]))),m("div",{className:"w-5 h-5 px-3 py-3.5"}),m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-start items-center gap-1 flex overflow-hidden"],(y=[m("div",{className:"text-gray-900 text-sm font-medium leading-tight",children:"Incoming CSV fields"}),m("div",x(b([["className","px-2.5 py-0.5 bg-gray-100 rounded-[10px] justify-center items-center flex"],(k=[m("div",{className:"text-center text-gray-800 text-xs font-medium leading-none",children:`${c.NumberOfDestinationFieldsMapped} of ${c.NumberOfIncomingFields} used`})],["children",E.Children.toArray(Array.from(k))])])))],["children",E.Children.toArray(Array.from(y))])])))],["children",E.Children.toArray(Array.from(P))])]))),m("div",x(b([["className","w-[640px] py-2 flex-col justify-start items-start gap-2 flex overflow-hidden"],(T=[m("div",x(ge((N=Ue(G(()=>ye(j(io(new ce(0,[]),!0,w,c.FirstName.ColumnIndex,c.FirstName.IncomingFields,new oo(0,[]),D=>{let H;p((H=[new ce(0,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(0,[])),C(new ce(0,[])))),G(()=>ye(j(io(new ce(1,[]),!0,w,c.LastName.ColumnIndex,c.LastName.IncomingFields,new oo(0,[]),D=>{let H;p((H=[new ce(1,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(1,[])),C(new ce(1,[])))),G(()=>ye(j(io(new ce(2,[]),!0,w,c.Email.ColumnIndex,c.Email.IncomingFields,new oo(0,[]),D=>{let H;p((H=[new ce(2,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(2,[])),C(new ce(2,[])))),G(()=>ye(j(io(new ce(3,[]),!1,w,c.MobilePhone.ColumnIndex,c.MobilePhone.IncomingFields,new oo(1,[]),D=>{let H;p((H=[new ce(3,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(3,[])),C(new ce(3,[])))),G(()=>ye(j(io(new ce(4,[]),!1,w,c.EmploymentBasis.ColumnIndex,c.EmploymentBasis.IncomingFields,new oo(1,[]),D=>{let H;p((H=[new ce(4,[]),D],new Pn(0,[H[0],H[1]])))},_(new ce(4,[])),C(new ce(4,[])))),G(()=>{let D,H,le,W,U,I;return ye(c.NumberOfIncomingFieldsDiscarded===0?j(Ke()):j(m("div",x(b([["className","h-16 pr-3 pt-2 pb-4 rounded-lg justify-start items-start gap-2 inline-flex"],(D=[m("div",x(b([["className","h-10 bg-gray-100 rounded-lg justify-start items-center gap-2 flex"],(H=[m("div",x(b([["className","w-[260px] h-10 px-3 py-3.5 justify-end items-center gap-1 flex overflow-hidden"],(le=[oC(14,14),m("div",{className:"text-gray-500 text-sm font-medium leading-tight",children:"Discarded"})],["children",E.Children.toArray(Array.from(le))])]))),m("div",x(b([["className","w-5 h-10 px-[3px] py-[5px] flex-col justify-center gap-2.5 inline-flex"],(W=[Dh(16,12)],["children",E.Children.toArray(Array.from(W))])]))),m("div",x(b([["className","flex-col justify-start items-start gap-2 inline-flex"],(U=[m("div",x(b([["className","w-[218px] pl-3 items-center inline-flex"],(I=[m("div",x(Ue(G(()=>ye(j(["className","text-gray-500 text-sm font-medium"]),G(()=>{const B=c.NumberOfIncomingFieldsDiscarded|0;return j(B===1?["children","Remaining 1 unused field"]:["children",`Remaining ${B} unused fields`])}))))))],["children",E.Children.toArray(Array.from(I))])])))],["children",E.Children.toArray(Array.from(U))])])))],["children",E.Children.toArray(Array.from(H))])])))],["children",E.Children.toArray(Array.from(D))])])))),G(()=>{let B,L,re,q,M,Y,oe,Ae,Ne;return j(m("div",x(b([["className","h-[58px] pt-6 border-t border-gray-200 justify-start items-end gap-2 inline-flex w-full"],(B=[m("div",x(b([["className","grow shrink basis-0 h-[34px] justify-start items-center gap-2 flex"],(L=[m("div",x(b([["className","grow shrink basis-0 h-4 pr-2 justify-center items-center gap-2.5 flex"],(re=[m("div",x(b([["className","grow shrink basis-0 text-right"],(q=[m("span",{className:"text-gray-500 text-xs font-normal leading-none",children:"Destination fields marked with "}),m("span",{className:"text-red-600 text-xs font-normal leading-none",children:"*"}),m("span",{className:"text-gray-500 text-xs font-normal leading-none",children:" are required"})],["children",E.Children.toArray(Array.from(q))])])))],["children",E.Children.toArray(Array.from(re))])]))),m("div",x(b([["className","justify-start items-center gap-2 flex"],(M=[m("button",x(b([(Y="px-[13px] py-[9px] bg-white rounded-md shadow-sm border border-gray-300 justify-center items-center flex overflow-hidden",["className",Y]),["onClick",Q=>{o(c.Status)}],(oe=[m("div",{className:"grow shrink basis-0 text-center text-gray-700 text-sm font-medium leading-none",children:"Back"})],["children",E.Children.toArray(Array.from(oe))])]))),m("button",x(b([(Ae="pl-[13px] pr-[11px] py-[9px] bg-primary-600 disabled:opacity-50 rounded-md shadow-sm justify-center items-center gap-2 flex overflow-hidden",["className",Ae]),["disabled",w&&c.Status.tag===0],["onClick",Q=>{const fe=c.Status;fe.tag===0?g[1](!0):i([fe.fields[0],fe.fields[1]])}],(Ne=[m("div",{className:"grow shrink basis-0 text-center text-white text-sm font-medium leading-none",children:"Next"}),Ph(13,8)],["children",E.Children.toArray(Array.from(Ne))])])))],["children",E.Children.toArray(Array.from(M))])])))],["children",E.Children.toArray(Array.from(L))])])))],["children",E.Children.toArray(Array.from(B))])]))))}))})))))))))))),["children",E.Children.toArray(Array.from(N))]))))],["children",E.Children.toArray(Array.from(T))])])))],["children",E.Children.toArray(Array.from($))])]))))})))))),["children",E.Children.toArray(Array.from(S))])])))),G(()=>{const $=c.Preview;return $==null?j(Ke()):j(iC($[0],$[1]))}))})),["children",E.Children.toArray(Array.from(r))])])))],["children",E.Children.toArray(Array.from(t))])])))}class zo extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UploadingCsv","MappingColumns","MappingEmploymentBasis","Reviewing"]}}class Es extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Reviewing","MappingEmploymentBasis","MappingColumns"]}}let Rn=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Next","Back"]}};function uC(e,t,n,r){let o,i,s,a,l,u;return m("div",x(b([["className","flex flex-col bg-gray-50 px-12 pt-8 pb-12 h-full"],(o=[m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Map values - Employment basis"}),m("span",{className:"text-sm font-normal pt-2",children:"Match the values from your CSV to the corresponding destination values."}),m("div",x(b([["className","justify-start items-start gap-12 inline-flex"],(i=[m("div",x(b([["className","w-[640px] pt-6 flex-col justify-start items-start gap-4 inline-flex"],(s=[m("div",x(b([["className","justify-start items-center gap-2 flex"],(a=[m("button",x(b([(l="px-[13px] py-[9px] bg-white rounded-md shadow-sm border border-gray-300 justify-center items-center flex overflow-hidden",["className",l]),["onClick",d=>{r(e)}],(u=[m("div",{className:"grow shrink basis-0 text-center text-gray-700 text-sm font-medium leading-none",children:"Back"})],["children",E.Children.toArray(Array.from(u))])])))],["children",E.Children.toArray(Array.from(a))])])))],["children",E.Children.toArray(Array.from(s))])])))],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])])))}function cC(e,t,n,r,o,i){let s,a,l,u,d,c;return m("div",x(b([["className","flex flex-col bg-gray-50 px-12 pt-8 pb-12 h-full"],(s=[m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Review"}),m("span",{className:"text-sm font-normal pt-2",children:"Preview your data and confirm that everything is mapped correctly."}),m("div",x(b([["className","justify-start items-start gap-12 inline-flex"],(a=[m("div",x(b([["className","w-[640px] pt-6 flex-col justify-start items-start gap-4 inline-flex"],(l=[m("div",x(b([["className","justify-start items-center gap-2 flex"],(u=[m("button",x(b([(d="px-[13px] py-[9px] bg-white rounded-md shadow-sm border border-gray-300 justify-center items-center flex overflow-hidden",["className",d]),["onClick",p=>{i()}],(c=[m("div",{className:"grow shrink basis-0 text-center text-gray-700 text-sm font-medium leading-none",children:"Back"})],["children",E.Children.toArray(Array.from(c))])])))],["children",E.Children.toArray(Array.from(u))])])))],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(a))])])))],["children",E.Children.toArray(Array.from(s))])])))}function dC(e,t){return G(()=>{const n=new pg([],t);return yp(r=>Xp(r,n),e)})}function fC(e,t){return Sd(dC(e,t))}class so extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NotCsv","TooLarge","ParseError"]}}class Yn extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Parse","CancelParsing","Remove"]}}var ti={exports:{}};/* @license
36
36
  Papa Parse
37
37
  v5.5.1
38
38
  https://github.com/mholt/PapaParse
@@ -48,4 +48,4 @@ License: MIT
48
48
  `,H='"',le=H+H,W=!1,U=null,I=!1,B=((()=>{if(typeof y=="object"){if(typeof y.delimiter!="string"||u.BAD_DELIMITERS.filter(function(q){return y.delimiter.indexOf(q)!==-1}).length||(N=y.delimiter),typeof y.quotes!="boolean"&&typeof y.quotes!="function"&&!Array.isArray(y.quotes)||(k=y.quotes),typeof y.skipEmptyLines!="boolean"&&typeof y.skipEmptyLines!="string"||(W=y.skipEmptyLines),typeof y.newline=="string"&&(D=y.newline),typeof y.quoteChar=="string"&&(H=y.quoteChar),typeof y.header=="boolean"&&(T=y.header),Array.isArray(y.columns)){if(y.columns.length===0)throw new Error("Option columns is empty");U=y.columns}y.escapeChar!==void 0&&(le=y.escapeChar+H),y.escapeFormulae instanceof RegExp?I=y.escapeFormulae:typeof y.escapeFormulae=="boolean"&&y.escapeFormulae&&(I=/^[=+\-@\t\r].*$/)}})(),new RegExp(w(H),"g"));if(typeof v=="string"&&(v=JSON.parse(v)),Array.isArray(v)){if(!v.length||Array.isArray(v[0]))return L(null,v,W);if(typeof v[0]=="object")return L(U||Object.keys(v[0]),v,W)}else if(typeof v=="object")return typeof v.data=="string"&&(v.data=JSON.parse(v.data)),Array.isArray(v.data)&&(v.fields||(v.fields=v.meta&&v.meta.fields||U),v.fields||(v.fields=Array.isArray(v.data[0])?v.fields:typeof v.data[0]=="object"?Object.keys(v.data[0]):[]),Array.isArray(v.data[0])||typeof v.data[0]=="object"||(v.data=[v.data])),L(v.fields||[],v.data||[],W);throw new Error("Unable to serialize unrecognized input");function L(q,M,Y){var oe="",Ae=(typeof q=="string"&&(q=JSON.parse(q)),typeof M=="string"&&(M=JSON.parse(M)),Array.isArray(q)&&0<q.length),Ne=!Array.isArray(M[0]);if(Ae&&T){for(var Q=0;Q<q.length;Q++)0<Q&&(oe+=N),oe+=re(q[Q],Q);0<M.length&&(oe+=D)}for(var fe=0;fe<M.length;fe++){var ue=(Ae?q:M[fe]).length,_e=!1,X=Ae?Object.keys(M[fe]).length===0:M[fe].length===0;if(Y&&!Ae&&(_e=Y==="greedy"?M[fe].join("").trim()==="":M[fe].length===1&&M[fe][0].length===0),Y==="greedy"&&Ae){for(var he=[],ie=0;ie<ue;ie++){var we=Ne?q[ie]:ie;he.push(M[fe][we])}_e=he.join("").trim()===""}if(!_e){for(var Re=0;Re<ue;Re++){0<Re&&!X&&(oe+=N);var pe=Ae&&Ne?q[Re]:Re;oe+=re(M[fe][pe],Re)}fe<M.length-1&&(!Y||0<ue&&!X)&&(oe+=D)}}return oe}function re(q,M){var Y,oe;return q==null?"":q.constructor===Date?JSON.stringify(q).slice(1,25):(oe=!1,I&&typeof q=="string"&&I.test(q)&&(q="'"+q,oe=!0),Y=q.toString().replace(B,le),(oe=oe||k===!0||typeof k=="function"&&k(q,M)||Array.isArray(k)&&k[M]||((Ae,Ne)=>{for(var Q=0;Q<Ne.length;Q++)if(-1<Ae.indexOf(Ne[Q]))return!0;return!1})(Y,u.BAD_DELIMITERS)||-1<Y.indexOf(N)||Y.charAt(0)===" "||Y.charAt(Y.length-1)===" ")?H+Y+H:Y)}},u.RECORD_SEP="",u.UNIT_SEP="",u.BYTE_ORDER_MARK="\uFEFF",u.BAD_DELIMITERS=["\r",`
49
49
  `,'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!i&&!!r.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=_,u.ParserHandle=g,u.NetworkStreamer=c,u.FileStreamer=p,u.StringStreamer=f,u.ReadableStreamStreamer=h,r.jQuery&&((o=r.jQuery).fn.parse=function(v){var y=v.config||{},k=[];return this.each(function(D){if(!(o(this).prop("tagName").toUpperCase()==="INPUT"&&o(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var H=0;H<this.files.length;H++)k.push({file:this.files[H],inputElem:this,instanceConfig:o.extend({},y)})}),T(),this;function T(){if(k.length===0)F(v.complete)&&v.complete();else{var D,H,le,W,U=k[0];if(F(v.before)){var I=v.before(U.file,U.inputElem);if(typeof I=="object"){if(I.action==="abort")return D="AbortError",H=U.file,le=U.inputElem,W=I.reason,void(F(v.error)&&v.error({name:D},H,le,W));if(I.action==="skip")return void N();typeof I.config=="object"&&(U.instanceConfig=o.extend(U.instanceConfig,I.config))}else if(I==="skip")return void N()}var B=U.instanceConfig.complete;U.instanceConfig.complete=function(L){F(B)&&B(L,U.file,U.inputElem),N()},u.parse(U.file,U.instanceConfig)}}function N(){k.splice(0,1),T()}}),s&&(r.onmessage=function(v){v=v.data,u.WORKER_ID===void 0&&v&&(u.WORKER_ID=v.workerId),typeof v.input=="string"?r.postMessage({workerId:u.WORKER_ID,results:u.parse(v.input,v.config),finished:!0}):(r.File&&v.input instanceof File||v.input instanceof Object)&&(v=u.parse(v.input,v.config))&&r.postMessage({workerId:u.WORKER_ID,results:v,finished:!0})}),(c.prototype=Object.create(d.prototype)).constructor=c,(p.prototype=Object.create(d.prototype)).constructor=p,(f.prototype=Object.create(f.prototype)).constructor=f,(h.prototype=Object.create(d.prototype)).constructor=h,u})}(ti)),ti.exports}var pC=mC();let Un=class extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["NoFileSelected","ParsingFile","FileSelected"]}};function gC(e){return e==null?[new Un(0,[void 0]),J()]:[new Un(2,[e]),J()]}function wC(e,t){let n,r,o,i,s;switch(e.tag){case 1:{t.tag===1?n=4:n=5;break}case 2:{t.tag===2?n=6:n=7;break}default:if(e.fields[0].tag===1)e.fields[0].fields[0].tag===1?t.tag===1?(n=2,s=e.fields[0].fields[0].fields[0]):n=3:t.tag===1?(n=1,i=e.fields[0].fields[0].fields[0]):n=3;else switch(t.tag){case 0:{n=0,r=e.fields[0].fields[0][0],o=e.fields[0].fields[0][1];break}case 2:{n=0,r=e.fields[0].fields[0][0],o=e.fields[0].fields[0][1];break}default:n=3}}switch(n){case 0:return[new Un(1,[r]),P1(o)];case 1:return[new Un(2,[i]),J()];case 2:return[new Un(0,[s]),J()];case 3:return[t,J()];case 4:return[new Un(0,[void 0]),J()];case 5:return[t,J()];case 6:return[new Un(0,[void 0]),J()];default:return[t,J()]}}function Rh(e,t){let n,r,o;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",x(b([(r="M11.6666 13.6667H2.33328C1.23062 13.6667 0.333282 12.7693 0.333282 11.6667V9H1.66662V11.6667C1.66662 12.034 1.96595 12.3333 2.33328 12.3333H11.6666C12.0339 12.3333 12.3333 12.034 12.3333 11.6667V9H13.6666V11.6667C13.6666 12.7693 12.7693 13.6667 11.6666 13.6667Z",["d",r]),["fill","#2E66F7"]]))),m("path",x(b([(o="M10.3333 4.72395L7.66667 7.39062V0.333282H6.33333V7.39062L3.66667 4.72395L2.724 5.66662L7 9.94262L11.276 5.66662L10.3333 4.72395Z",["d",o]),["fill","#2E66F7"]])))]),["children",E.Children.toArray(Array.from(n))])])))}function yC(e,t){let n,r,o,i,s,a,l,u,d,c,p,f,h,g,w,_,C,S,$,O,P,F;return rl(b([new fn(3,[e]),new fn(4,[t]),new fn(5,[[al(ge(new sl(2,["fixed inset-0 bg-gray-500/50"]))),m("div",x(b([["className","fixed top-0 bottom-0 right-0 w-[480px] bg-white overflow-y-auto"],(n=[il(ge(new ol(2,[[m("div",x(b([["className","flex flex-col mt-6 mb-6 px-6"],(r=[m("div",x(b([["className","flex flex-row justify-between"],(o=[m("span",{className:"text-gray-900 font-semibold text-lg",children:"What kind of data do I need?"}),m("button",x(b([["onClick",v=>{t()}],["type","button"],["className","text-gray-600"],(i=[ll(24,24)],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])]))),m("div",x(b([["className","text-gray-600 text-sm pt-6"],(s=[m("span",{children:"Fields marked with "}),m("span",{className:"text-red-600",children:"*"}),m("span",x(ge((a=" are required to create a user. While “Mobile number” and “Employment basis” are optional, they are recommended for improved searching and filtering.",["children",a]))))],["children",E.Children.toArray(Array.from(s))])]))),m("div",x(b([["className","grid grid-cols-2 mt-3"],(l=[m("span",{className:"text-gray-900 font-medium text-sm px-3 py-3.5 bg-gray-100 border",children:"Column fields"}),m("span",{className:"text-gray-900 font-medium text-sm px-3 py-3.5 bg-gray-100 border",children:"Accepted values"}),m("div",x(b([["className","text-gray-600 font-medium text-sm px-3 py-3.5 bg-gray-50 border"],(u=[m("span",{children:"First name "}),m("span",{className:"text-red-600",children:"*"})],["children",E.Children.toArray(Array.from(u))])]))),m("div",x(ge((d=[m("div",x(b([["className","text-gray-600 font-normal text-sm px-3 py-3.5 border"],(c=[m("span",{children:"For example:"}),m("br",{}),m("span",{className:"italic",children:"Sam, Josh, Alex"})],["children",E.Children.toArray(Array.from(c))])])))],["children",E.Children.toArray(Array.from(d))])))),m("div",x(b([["className","text-gray-600 font-medium text-sm px-3 py-3.5 bg-gray-50 border"],(p=[m("span",{children:"Last name "}),m("span",{className:"text-red-600",children:"*"})],["children",E.Children.toArray(Array.from(p))])]))),m("div",x(ge((f=[m("div",x(b([["className","text-gray-600 font-normal text-sm px-3 py-3.5 border"],(h=[m("span",{children:"For example:"}),m("br",{}),m("span",{className:"italic",children:"Smith, Doe, Williams"})],["children",E.Children.toArray(Array.from(h))])])))],["children",E.Children.toArray(Array.from(f))])))),m("div",x(b([["className","text-gray-600 font-medium text-sm px-3 py-3.5 bg-gray-50 border"],(g=[m("span",{children:"Email "}),m("span",{className:"text-red-600",children:"*"})],["children",E.Children.toArray(Array.from(g))])]))),m("div",x(ge((w=[m("div",x(b([["className","text-gray-600 font-normal text-sm px-3 py-3.5 border"],(_=[m("span",{children:"For example:"}),m("br",{}),m("span",{className:"italic",children:"john.smith@mycompany.com"})],["children",E.Children.toArray(Array.from(_))])])))],["children",E.Children.toArray(Array.from(w))])))),m("span",{className:"text-gray-600 font-medium text-sm px-3 py-3.5 bg-gray-50 border",children:"Mobile number"}),m("div",x(ge((C=[m("div",x(b([["className","text-gray-600 font-normal text-sm px-3 py-3.5 border"],(S=[m("span",{children:"For example:"}),m("br",{}),m("span",{className:"italic",children:"+61432368712"})],["children",E.Children.toArray(Array.from(S))])])))],["children",E.Children.toArray(Array.from(C))])))),m("span",{className:"text-gray-600 font-medium text-sm px-3 py-3.5 bg-gray-50 border",children:"Employment basis"}),m("div",x(ge(($=[m("div",x(b([["className","text-gray-600 font-normal text-sm px-3 py-3.5 border"],(O=[m("span",{children:"One of the following options:"}),m("br",{}),m("ul",x(b([["className","italic list-disc px-3"],(P=[m("li",{children:"Full-time"}),m("li",{children:"Part-time"}),m("li",{children:"Labour hire"}),m("li",{children:"Casual"})],["children",E.Children.toArray(Array.from(P))])])))],["children",E.Children.toArray(Array.from(O))])])))],["children",E.Children.toArray(Array.from($))])))),m("div",x(b([["className","flex flex-row items-end gap-1 pt-3"],(F=[m("span",{className:"text-sm text-primary-600 font-medium",children:"Download template"}),Rh(13,13)],["children",E.Children.toArray(Array.from(F))])])))],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(r))])])))]])))],["children",E.Children.toArray(Array.from(n))])])))]])]))}function vC(e,t){let n,r,o,i,s,a,l;return rl(b([new fn(3,[e]),new fn(4,[t]),new fn(5,[[al(ge(new sl(2,["fixed inset-0 bg-gray-500/50"]))),m("div",x(b([["className","fixed top-0 bottom-0 right-0 w-[480px] bg-white overflow-y-auto"],(n=[il(ge(new ol(2,[[m("div",x(b([["className","flex flex-col mt-6 mb-6 px-6"],(r=[m("div",x(b([["className","flex flex-row justify-between"],(o=[m("span",{className:"text-gray-900 font-semibold text-lg",children:"Frequently asked questions"}),m("button",x(b([["onClick",u=>{t()}],["type","button"],["className","text-gray-700"],(i=[ll(24,24)],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(o))])]))),m("div",{className:"font-semibold text-sm pt-6",children:"What file format is accepted for bulk import?"}),m("div",{className:"text-sm text-gray-500 pt-2",children:"The only accepted file format for bulk import is CSV."}),m("div",{className:"font-semibold text-sm pt-6",children:"What is the maximum upload file size?"}),m("div",{className:"text-sm text-gray-500 pt-2",children:"The maximum upload file size is 10 MB."}),m("div",{className:"font-semibold text-sm pt-6",children:"What is the maximum number of rows supported for bulk import?"}),m("div",{className:"text-sm text-gray-500 pt-2",children:"The maximum number of rows you can upload is 5,000."}),m("div",{className:"font-semibold text-sm pt-6",children:"What information do I need to include in the CSV file?"}),m("div",x(b([["className","text-sm text-gray-500 pt-2"],(s="You must include the required fields: “First name,” “Last name,” and “Email” to create a profile. “Mobile number” and “Employment basis” are optional but recommended, as they can help with searching and filtering.",["children",s])]))),m("div",{className:"font-semibold text-sm pt-6",children:"How do I format the CSV file?"}),m("div",x(b([["className","text-sm text-gray-500 pt-2"],(a=`We recommend downloading and editing our sample CSV template, which includes all the necessary column headers and example values.
50
50
  If you’re using your own CSV, ensure that your data is organised correctly and that there are no extra spaces or special characters.`,["children",a])]))),m("div",{className:"font-semibold text-sm pt-6",children:"What should I do if my CSV file contains errors?"}),m("div",x(b([["className","text-sm text-gray-500 pt-2"],(l=`We recommend checking for common issues, such as missing data or incorrect formatting before upload.
51
- If errors are detected during import, you can download a CSV file that lists all the rows with issues.`,["children",l])])))],["children",E.Children.toArray(Array.from(r))])])))]])))],["children",E.Children.toArray(Array.from(n))])])))]])]))}function Lh(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([(r="M9.99992 0.833328C4.94575 0.833328 0.833252 4.94583 0.833252 10C0.833252 15.0542 4.94575 19.1667 9.99992 19.1667C15.0541 19.1667 19.1666 15.0542 19.1666 10C19.1666 4.94583 15.0541 0.833328 9.99992 0.833328ZM8.37409 14.5525L4.65492 10.8333L5.83325 9.655L8.29242 12.1142L14.0883 5.49083L15.3424 6.58833L8.37409 14.5525Z",["d",r]),["fill","#10B981"]])))),["children",E.Children.toArray(Array.from(n))])])))}function bC(e,t){let n,r,o;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",x(b([(r="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM3.99743 10C3.99743 13.3151 6.68487 16.0026 10 16.0026C13.3151 16.0026 16.0026 13.3151 16.0026 10C16.0026 6.68487 13.3151 3.99743 10 3.99743C6.68487 3.99743 3.99743 6.68487 3.99743 10Z",["d",r]),["fill","#D6E2FC"]]))),m("path",x(b([(o="M10 3C10 2.44772 10.4494 1.99356 10.9974 2.06242C11.7053 2.15137 12.3996 2.3348 13.0615 2.60896C14.0321 3.011 14.914 3.60028 15.6569 4.34315C16.3997 5.08602 16.989 5.96793 17.391 6.93853C17.6652 7.60043 17.8486 8.29473 17.9376 9.0026C18.0064 9.55057 17.5523 10 17 10C16.4477 10 16.0085 9.54925 15.9169 9.00462C15.842 8.55939 15.7169 8.12298 15.5433 7.7039C15.2417 6.97595 14.7998 6.31451 14.2426 5.75736C13.6855 5.20021 13.0241 4.75825 12.2961 4.45672C11.877 4.28313 11.4406 4.15804 10.9954 4.08314C10.4508 3.99152 10 3.55228 10 3Z",["d",o]),["fill","#2E66F7"]])))]),["children",E.Children.toArray(Array.from(n))])])))}function _C(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",x(b([(r="M17 21H3C1.346 21 0 19.654 0 18V14H2V18C2 18.551 2.448 19 3 19H17C17.552 19 18 18.551 18 18V14H20V18C20 19.654 18.654 21 17 21Z",["d",r]),["fill","#9CA3AF"]]))),m("path",{d:"M16.414 7L10 0.585999L3.586 7L5 8.414L9 4.414V15H11V4.414L15 8.414L16.414 7Z",fill:"#9CA3AF"})]),["children",E.Children.toArray(Array.from(n))])])))}function xC(e,t){const n=e.type==="text/csv",r=e.size<=10485760;if(n)if(r){const o={};o.complete=(i,s)=>{let a,l,u,d,c,p;t(new Yn(0,[new Gn(1,[(a=i.errors,!A0(me,a)&&a.length===0?(l=(u=is(i.data),u.length|0),l>=3&&(d=fC(pn(f=>f.trim().toLocaleLowerCase(),is(i.data)),{Equals:(f,h)=>f===h,GetHashCode:Dr}),d.length===l)&&i.data.length>1&&(c=(p=i.data,p.filter(f=>f.length!==l)),c.length===0)?new A(0,[new Dv(new pf(e.name),cd((f,h)=>[new kv(f),new Nv(h.trim())],is(i.data)),new Ov(pn(f=>new Iv(f),$0(i.data))),e.size)]):new A(1,[new so(2,["Invalid format."])])):new A(1,[new so(2,[ze(0,i.errors).message])]))])]))},o.error=(i,s)=>{t(new Yn(0,[new Gn(1,[new A(1,[new so(2,[i])])])]))},o.worker=!0,pC.parse(e,o)}else t(new Yn(0,[new Gn(1,[new A(1,[new so(1,[])])])]));else t(new Yn(0,[new Gn(1,[new A(1,[new so(0,[])])])]))}function CC(e,t){vd(at.Delay(()=>at.Bind(Q0(1e3),()=>(xC(e,t),at.Zero()))))}const fc=(()=>{const e=new Blob(["first_name, last_name, email, mobile_phone, employment_basis"],{type:"text/csv;charset=utf-8;"});return window.URL.createObjectURL(e)})();function SC(e){let t,n,r,o,i,s,a,l;const u=e.cancel,d=e.next,c=e.existingCsvFile;let p;const f=gC(c);p=$o(()=>Ao(()=>f,wC,(y,k)=>{}),void 0,[]);const h=p[0],g=p[1],w=y=>{g(new Yn(0,[new Gn(0,[[new pf(y.name),k=>{CC(y,k)}]])]))},_=E.useState(!1),C=_[1],S=E.useState(!1),$=S[1],O=E.useState(!1),P=O[1],F=E.useRef(void 0),v=h.tag===2;return m("div",x(b([["className","bg-gray-50"],(t=[m("div",x(b([["className","max-w-[640px] flex flex-col mx-12 mt-8 mb-12"],(n=[yC(_[0],()=>{C(!1)}),vC(O[0],()=>{P(!1)}),m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Upload CSV"}),m("span",{className:"text-sm font-normal pt-2",children:"Download and use our template, or upload your own CSV to get started."}),m("a",x(b([["className","flex flex-row items-end gap-1"],["href",fc],["download","import_users"],(r=[m("span",{className:"text-sm font-medium text-primary-600 pt-2",children:"Download sample CSV template"}),Rh(13,13)],["children",E.Children.toArray(Array.from(r))])]))),m("div",x(b([["className","flex flex-row pt-3 gap-2"],(o=[m("button",{className:"rounded-2xl text-xs font-medium text-gray-600 border px-3.5 py-1.5 bg-white",onClick:y=>{C(!0)},type:"button",children:E.Children.toArray(["What kind of data do I need?"])}),m("button",{className:"rounded-2xl text-xs font-medium text-gray-600 border px-3.5 py-1.5 bg-white",onClick:y=>{P(!0)},type:"button",children:E.Children.toArray(["Frequently asked questions"])})],["children",E.Children.toArray(Array.from(o))])]))),m("div",x(Ue(G(()=>ye(S[0]?j(["className","h-75 border-gray-300 border-dashed border-2 rounded-md my-6 bg-blue-50 border-blue-300"]):j(["className","h-75 border-gray-300 border-dashed border-2 rounded-md my-6 hover:bg-gray-100"]),G(()=>{let y;return j((y=Ue(G(()=>{let k,T,N,D,H,le,W,U,I,B,L,re,q;switch(h.tag){case 2:{let M;const Y=h.fields[0].SizeInBytes/1024/1024;return M=rd("{0:F2}",Y),j(m("div",x(b([["className","p-6 justify-between items-center inline-flex w-full"],(k=[m("div",x(b([["className","justify-start items-start gap-2 flex"],(T=[m("div",{className:"text-center text-gray-600 text-sm font-medium",children:h.fields[0].Name.fields[0]}),m("span",x(b([["className","text-emerald-700"],(N=[Lh(20,20)],["children",E.Children.toArray(Array.from(N))])])))],["children",E.Children.toArray(Array.from(T))])]))),m("div",x(b([["className","justify-start items-start gap-2 flex"],(D=[m("div",{className:"text-center text-gray-500 text-sm font-medium",children:`${M}MB`}),m("button",x(b([["className","justify-start items-center gap-1 flex text-red-600"],["onClick",oe=>{g(new Yn(2,[]))}],(H=[m("div",{className:"text-center text-sm font-medium",children:"Remove"}),m("div",x(b([["className","w-4 h-4 justify-center items-center flex"],(le=[Vs(10,10)],["children",E.Children.toArray(Array.from(le))])])))],["children",E.Children.toArray(Array.from(H))])])))],["children",E.Children.toArray(Array.from(D))])])))],["children",E.Children.toArray(Array.from(k))])]))))}case 1:return j(m("div",x(b([["className","p-6 justify-between items-center inline-flex w-full"],(W=[m("div",x(b([["className","justify-start items-start gap-2 flex"],(U=[m("div",{className:"text-center text-gray-600 text-sm font-medium",children:h.fields[0].fields[0]}),m("span",x(b([["className","animate-spin"],(I=[bC(20,20)],["children",E.Children.toArray(Array.from(I))])])))],["children",E.Children.toArray(Array.from(U))])]))),m("div",x(b([["className","justify-start items-start gap-2 flex"],(B=[m("button",x(b([["className","justify-start items-center gap-1 flex text-red-600"],["onClick",M=>{g(new Yn(1,[]))}],(L=[m("div",{className:"text-center text-sm font-medium",children:"Cancel"}),m("div",x(b([["className","w-4 h-4 justify-center items-center flex"],(re=[Vs(10,10)],["children",E.Children.toArray(Array.from(re))])])))],["children",E.Children.toArray(Array.from(L))])])))],["children",E.Children.toArray(Array.from(B))])])))],["children",E.Children.toArray(Array.from(W))])]))));default:{const M=Y=>{Y.preventDefault(),Y.stopPropagation()};return j(m("div",x(b([["className","flex flex-col items-center p-4"],["onDragEnter",Y=>{M(Y),$(!0)}],["onDragLeave",Y=>{M(Y),$(!1)}],["onDragOver",Y=>{M(Y),$(!0)}],["onDrop",Y=>{let oe;M(Y),$(!1),w((oe=Y,oe.dataTransfer).files.item(0))}],(q=Ue(G(()=>{let Y,oe,Ae,Ne,Q,fe;return ye((Y=h.fields[0],Y==null?j(Ke()):(oe=Y,j(m("div",x(b([["className","h-9 p-2 bg-red-50 rounded-md justify-start items-start gap-2 inline-flex w-full"],(Ae=[m("div",x(b([["className","w-5 h-5 px-0.5 pt-0.5 pb-[3px] justify-center items-center flex"],(Ne=[gf(16,15)],["children",E.Children.toArray(Array.from(Ne))])]))),m("div",x(b([["className","grow shrink basis-0 flex-col justify-start items-start gap-2 inline-flex"],(Q=[m("div",x(b([["className","self-stretch text-red-800 text-sm font-medium"],(fe=Ue(G(()=>{let ue;return oe.tag===0?j(m("span",{children:["File type must be .csv"]})):oe.tag===2?j((ue=b([m("span",{children:["Invalid CSV. Try using our "]}),m("a",{className:"underline",children:"sample CSV",href:fc,download:"import_users"}),m("span",{children:[" instead."]})]),m("p",{children:E.Children.toArray(Array.from(ue))}))):j(m("span",{children:["File size is too large"]}))})),["children",E.Children.toArray(Array.from(fe))])])))],["children",E.Children.toArray(Array.from(Q))])])))],["children",E.Children.toArray(Array.from(Ae))])])))))),G(()=>{let ue;return ye(j(m("div",x(b([["className","pt-2"],(ue=[_C(20,21)],["children",E.Children.toArray(Array.from(ue))])])))),G(()=>ye(j(m("input",{type:"file",onChange:_e=>{const X=_e.target.files;X!=null&&X.length>0&&w(X.item(0))},className:"hidden",ref:F})),G(()=>ye(j(m("span",{className:"text-gray-600 text-sm font-medium mt-3",children:"Drag and drop CSV file here"})),G(()=>ye(j(m("button",{className:"rounded text-sm w-[120px] border px-3 py-2 mt-4 font-medium text-gray-700 bg-white",onClick:_e=>{To(X=>{X.click()},Ca(F.current))},type:"button",children:E.Children.toArray(["Choose file"])})),G(()=>j(m("span",{className:"text-gray-500 text-xs font-normal mt-2 font-normal pb-2",children:"Maximum size: 10 MB"}))))))))))}))})),["children",E.Children.toArray(Array.from(q))])]))))}}})),["children",E.Children.toArray(Array.from(y))]))})))))),m("div",x(b([["className","flex flex-row justify-end gap-3"],(i=[m("button",x(b([(s="bg-white rounded-md text-red-700 shadow-sm text-sm border border-gray-300 font-medium px-3 py-2 w-[120px]",["className",s]),["onClick",y=>{u()}],["type","button"],["children",E.Children.toArray(["Cancel import"])]]))),m("button",x(b([(a="inline-flex justify-center items-center gap-x-1 rounded-md text-white bg-primary-600 text-sm w-[120px] border font-medium px-3 py-2 disabled:opacity-50",["className",a]),["onClick",y=>{h.tag===2&&d(h.fields[0])}],["type","button"],["disabled",!v],(l=["Map fields",Ph(13,8)],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}class bt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UploadingCsv","MappingColumns","MappingEmploymentBasis","Reviewing"]}}class mt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Configuring","Importing"]}}function EC(){return[new mt(0,[new bt(0,[void 0])]),J()]}function kC(e,t){let n,r,o,i,s,a,l,u,d,c,p,f,h,g,w,_,C,S,$,O,P,F,v,y,k,T,N,D,H,le,W,U,I,B,L,re,q;if(e.tag===1)switch(e.fields[0].tag){case 1:{t.tag===0&&t.fields[0].tag===2?(n=13,T=t.fields[0].fields[0][1],N=t.fields[0].fields[0][0],D=t.fields[0].fields[0][2],H=e.fields[0].fields[0]):n=14;break}case 2:{e.fields[0].fields[0].tag===0?t.tag===0&&t.fields[0].tag===1?(n=17,re=t.fields[0].fields[0][0],q=e.fields[0].fields[0].fields[0]):n=18:e.fields[0].fields[0].fields[1]!=null?t.tag===0&&t.fields[0].tag===1?(n=16,U=e.fields[0].fields[0].fields[0],I=t.fields[0].fields[0][0],B=e.fields[0].fields[0].fields[1],L=t.fields[0].fields[0][1]):n=18:t.tag===0&&t.fields[0].tag===1?(n=15,le=e.fields[0].fields[0].fields[0],W=t.fields[0].fields[0][0]):n=18;break}default:t.tag===0&&t.fields[0].tag===3?t.fields[0].fields[0][2]!=null?(n=11,F=t.fields[0].fields[0][1],v=t.fields[0].fields[0][0],y=t.fields[0].fields[0][2][0],k=t.fields[0].fields[0][2][1]):(n=10,O=t.fields[0].fields[0][1],P=t.fields[0].fields[0][0]):n=12}else switch(e.fields[0].tag){case 1:{e.fields[0].fields[1]!=null?t.tag===0&&t.fields[0].tag===1?(n=4,u=e.fields[0].fields[0],d=t.fields[0].fields[0][0],c=e.fields[0].fields[1],p=t.fields[0].fields[0][1]):n=5:t.tag===0&&t.fields[0].tag===1?(n=3,a=e.fields[0].fields[0],l=t.fields[0].fields[0][0]):n=5;break}case 2:{t.tag===0&&t.fields[0].tag===2?(n=6,f=t.fields[0].fields[0][1],h=t.fields[0].fields[0][0],g=t.fields[0].fields[0][2],w=e.fields[0].fields[0]):n=7;break}case 3:{t.tag===0&&t.fields[0].tag===3?(n=8,_=t.fields[0].fields[0][1],C=t.fields[0].fields[0][0],S=t.fields[0].fields[0][2],$=e.fields[0].fields[0]):n=9;break}default:t.tag===0&&t.fields[0].tag===0?t.fields[0].fields[0]!=null?(n=1,o=e.fields[0].fields[0],i=t.fields[0].fields[0][0],s=t.fields[0].fields[0][1]):(n=0,r=e.fields[0].fields[0]):n=2}switch(n){case 0:return[new mt(0,[new bt(1,[[r,new nn(0,[void 0])]])]),J()];case 1:return me(o,i)?[new mt(0,[new bt(1,[[i,s]])]),J()]:[new mt(0,[new bt(1,[[o,new nn(0,[void 0])]])]),J()];case 2:return[t,J()];case 3:return[new mt(0,[new bt(3,[[l,a,void 0]])]),J()];case 4:return[new mt(0,[new bt(2,[[d,u,c,p.tag===1&&p.fields[0].tag===1&&me(c,p.fields[0].fields[1])?p.fields[0].fields[2]:void 0]])]),J()];case 5:return[t,J()];case 6:return[new mt(0,[new bt(3,[[h,f,[g,w]]])]),J()];case 7:return[t,J()];case 8:return[new mt(1,[[C,_,S,$]]),J()];case 9:return[t,J()];case 10:return[new mt(0,[new bt(1,[[P,new nn(1,[new fr(0,[O])])]])]),J()];case 11:return[new mt(0,[new bt(2,[[v,F,y,k]])]),J()];case 12:return[t,J()];case 13:return[new mt(0,[new bt(1,[[N,new nn(1,[new fr(1,[T,D,H])])]])]),J()];case 14:return[t,J()];case 15:return[new mt(0,[new bt(0,[[W,new nn(1,[new fr(0,[le])])]])]),J()];case 16:return[new mt(0,[new bt(0,[[I,L.tag===1?L.fields[0].tag===1?me(U,L.fields[0].fields[0])&&me(B,L.fields[0].fields[1])?L:new nn(1,[new fr(1,[U,B,void 0])]):new nn(1,[new fr(1,[U,B,void 0])]):new nn(1,[new fr(1,[U,B,void 0])])]])]),J()];case 17:return[new mt(0,[new bt(0,[[re,new nn(0,[q])]])]),J()];default:return[t,J()]}}function TC(e,t,n,r,o,i,s){return m("div",{})}class rt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Completed","Active","Disabled"]}}class qo extends Te{constructor(t,n,r,o){super(),this.UploadingCsv=t,this.MappingColumns=n,this.MappingEmploymentBasis=r,this.Reviewing=o}}function AC(e){switch(e.tag){case 1:return new qo(new rt(0,[]),new rt(1,[]),new rt(2,[]),new rt(2,[]));case 2:return new qo(new rt(0,[]),new rt(0,[]),new rt(1,[]),new rt(2,[]));case 3:return new qo(new rt(0,[]),new rt(0,[]),new rt(0,[]),new rt(1,[]));default:return new qo(new rt(1,[]),new rt(2,[]),new rt(2,[]),new rt(2,[]))}}function $C(e,t,n){switch(n.tag){case 1:{const r=n.fields[0],o=r[1].tag===1?r[1].fields[0].tag===1?[Lu(r[1].fields[0].fields[0],r[1].fields[0].fields[1]),r[0].HeaderRow,r[0].DataRows]:[Lu(r[1].fields[0].fields[0],void 0),r[0].HeaderRow,r[0].DataRows]:[r[1].fields[0],r[0].HeaderRow,r[0].DataRows];return m(lC,{existingMappings:Ps(o[0]),headerRow:o[1],dataRows:o[2],next:i=>{let s;t(new Rn(0,[(s=i,new zo(1,[s[0],s[1]]))]))},back:i=>{t(new Rn(1,[new Es(2,[i])]))}})}case 2:return uC(n.fields[0][3],Fv(n.fields[0][0].DataRows,n.fields[0][2]),r=>{t(new Rn(0,[new zo(2,[r])]))},r=>{t(new Rn(1,[new Es(1,[r])]))});case 3:return cC(n.fields[0][0].HeaderRow,n.fields[0][0].DataRows,n.fields[0][1],n.fields[0][2],r=>{t(new Rn(0,[new zo(3,[r])]))},()=>{t(new Rn(1,[new Es(0,[])]))});default:{const r=yn(o=>o[0],n.fields[0]);return m(SC,{existingCsvFile:Ps(r),next:o=>{t(new Rn(0,[new zo(0,[o])]))},cancel:e})}}}function Yo(e,t){let n,r,o;switch(t.tag){case 1:return m("div",x(b([["className","text-sm font-medium border-b-2 border-primary-600 pt-1 pb-3 text-primary-600"],(n=[m("span",{children:e})],["children",E.Children.toArray(Array.from(n))])])));case 2:return m("div",x(b([["className","text-sm font-medium pt-1 pb-3 text-gray-500"],(r=[m("span",{children:e})],["children",E.Children.toArray(Array.from(r))])])));default:return m("div",x(b([["className","text-sm font-medium pt-1 pb-3 text-emerald-700 gap-2 inline-flex"],(o=[Lh(20,20),m("span",{children:e})],["children",E.Children.toArray(Array.from(o))])])))}}function MC(e){let t,n,r,o,i;const s=EC();i=$o(()=>Ao(()=>s,kC,(c,p)=>{}),void 0,[]);const a=i[0],l=E.useState(!1);let u;if(a.tag===0){const c=a.fields[0],p=()=>{l[0]||l[1](!0)},f=AC(c),h=$C(p,i[1],c);u=m("div",x(b([["className","flex flex-col"],(t=[m("div",x(b([["className","flex flex-row justify-between px-12 pt-8 pb-4"],(n=[m("span",{className:"font-sonoma text-gray-900 font-bold text-lg",children:"Import Users from CSV"}),m("button",x(b([(r="bg-white rounded-md text-red-700 shadow-sm text-sm border border-gray-300 font-medium px-3 py-2 w-[120px]",["className",r]),["onClick",g=>{p()}],["type","button"],["children",E.Children.toArray(["Cancel import"])]])))],["children",E.Children.toArray(Array.from(n))])]))),m("div",x(b([["className","flex flex-row items-center px-12 gap-2 border-b border-gray-200"],(o=[Yo("1. Upload CSV",f.UploadingCsv),m("hr",{className:"w-16 pt-1.5"}),Yo("2. Map fields",f.MappingColumns),m("hr",{className:"w-16 pt-1.5"}),Yo("3. Map values",f.MappingEmploymentBasis),m("hr",{className:"w-16 pt-1.5"}),Yo("4. Review",f.Reviewing)],["children",E.Children.toArray(Array.from(o))])]))),h],["children",E.Children.toArray(Array.from(t))])])))}else{const c=a.fields[0][0].DataRows;u=TC(a.fields[0][0].Name,a.fields[0][0].HeaderRow,c,a.fields[0][1],a.fields[0][2],a.fields[0][3])}const d=[m("style",{children:[ba]}),u];return m(Oe,{},...d)}function NC(){la(e=>m(MC,e),"apollo-import-workspace-wizard")}la(e=>m(j0,e),"apollo-import-workspace-app");Ev();NC();
51
+ If errors are detected during import, you can download a CSV file that lists all the rows with issues.`,["children",l])])))],["children",E.Children.toArray(Array.from(r))])])))]])))],["children",E.Children.toArray(Array.from(n))])])))]])]))}function Lh(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=ge(m("path",x(b([(r="M9.99992 0.833328C4.94575 0.833328 0.833252 4.94583 0.833252 10C0.833252 15.0542 4.94575 19.1667 9.99992 19.1667C15.0541 19.1667 19.1666 15.0542 19.1666 10C19.1666 4.94583 15.0541 0.833328 9.99992 0.833328ZM8.37409 14.5525L4.65492 10.8333L5.83325 9.655L8.29242 12.1142L14.0883 5.49083L15.3424 6.58833L8.37409 14.5525Z",["d",r]),["fill","#10B981"]])))),["children",E.Children.toArray(Array.from(n))])])))}function bC(e,t){let n,r,o;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",x(b([(r="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM3.99743 10C3.99743 13.3151 6.68487 16.0026 10 16.0026C13.3151 16.0026 16.0026 13.3151 16.0026 10C16.0026 6.68487 13.3151 3.99743 10 3.99743C6.68487 3.99743 3.99743 6.68487 3.99743 10Z",["d",r]),["fill","#D6E2FC"]]))),m("path",x(b([(o="M10 3C10 2.44772 10.4494 1.99356 10.9974 2.06242C11.7053 2.15137 12.3996 2.3348 13.0615 2.60896C14.0321 3.011 14.914 3.60028 15.6569 4.34315C16.3997 5.08602 16.989 5.96793 17.391 6.93853C17.6652 7.60043 17.8486 8.29473 17.9376 9.0026C18.0064 9.55057 17.5523 10 17 10C16.4477 10 16.0085 9.54925 15.9169 9.00462C15.842 8.55939 15.7169 8.12298 15.5433 7.7039C15.2417 6.97595 14.7998 6.31451 14.2426 5.75736C13.6855 5.20021 13.0241 4.75825 12.2961 4.45672C11.877 4.28313 11.4406 4.15804 10.9954 4.08314C10.4508 3.99152 10 3.55228 10 3Z",["d",o]),["fill","#2E66F7"]])))]),["children",E.Children.toArray(Array.from(n))])])))}function _C(e,t){let n,r;return m("svg",x(b([["fill","none"],["height",t],["width",e],["viewBox","0 0 "+e+" "+t],["xmlns","http://www.w3.org/2000/svg"],(n=b([m("path",x(b([(r="M17 21H3C1.346 21 0 19.654 0 18V14H2V18C2 18.551 2.448 19 3 19H17C17.552 19 18 18.551 18 18V14H20V18C20 19.654 18.654 21 17 21Z",["d",r]),["fill","#9CA3AF"]]))),m("path",{d:"M16.414 7L10 0.585999L3.586 7L5 8.414L9 4.414V15H11V4.414L15 8.414L16.414 7Z",fill:"#9CA3AF"})]),["children",E.Children.toArray(Array.from(n))])])))}function xC(e,t){const n=e.type==="text/csv",r=e.size<=10485760;if(n)if(r){const o={};o.complete=(i,s)=>{let a,l,u,d,c,p;t(new Yn(0,[new Gn(1,[(a=i.errors,!A0(me,a)&&a.length===0?(l=(u=is(i.data),u.length|0),l>=3&&(d=fC(pn(f=>f.trim().toLocaleLowerCase(),is(i.data)),{Equals:(f,h)=>f===h,GetHashCode:Dr}),d.length===l)&&i.data.length>1&&(c=(p=i.data,p.filter(f=>f.length!==l)),c.length===0)?new A(0,[new Dv(new pf(e.name),cd((f,h)=>[new kv(f),new Nv(h.trim())],is(i.data)),new Ov(pn(f=>new Iv(f),$0(i.data))),e.size)]):new A(1,[new so(2,["Invalid format."])])):new A(1,[new so(2,[ze(0,i.errors).message])]))])]))},o.error=(i,s)=>{t(new Yn(0,[new Gn(1,[new A(1,[new so(2,[i])])])]))},o.worker=!0,pC.parse(e,o)}else t(new Yn(0,[new Gn(1,[new A(1,[new so(1,[])])])]));else t(new Yn(0,[new Gn(1,[new A(1,[new so(0,[])])])]))}function CC(e,t){vd(at.Delay(()=>at.Bind(Q0(1e3),()=>(xC(e,t),at.Zero()))))}const fc=(()=>{const e=new Blob(["first_name, last_name, email, mobile_phone, employment_basis"],{type:"text/csv;charset=utf-8;"});return window.URL.createObjectURL(e)})();function SC(e){let t,n,r,o,i,s,a,l;const u=e.cancel,d=e.next,c=e.existingCsvFile;let p;const f=gC(c);p=$o(()=>Ao(()=>f,wC,(y,k)=>{}),void 0,[]);const h=p[0],g=p[1],w=y=>{g(new Yn(0,[new Gn(0,[[new pf(y.name),k=>{CC(y,k)}]])]))},_=E.useState(!1),C=_[1],S=E.useState(!1),$=S[1],O=E.useState(!1),P=O[1],F=E.useRef(void 0),v=h.tag===2;return m("div",x(b([["className","bg-gray-50 h-full"],(t=[m("div",x(b([["className","max-w-[640px] flex flex-col mx-12 mt-8 mb-12"],(n=[yC(_[0],()=>{C(!1)}),vC(O[0],()=>{P(!1)}),m("span",{className:"font-sonoma text-black font-semibold text-lg",children:"Upload CSV"}),m("span",{className:"text-sm font-normal pt-2",children:"Download and use our template, or upload your own CSV to get started."}),m("a",x(b([["className","flex flex-row items-end gap-1"],["href",fc],["download","import_users"],(r=[m("span",{className:"text-sm font-medium text-primary-600 pt-2",children:"Download sample CSV template"}),Rh(13,13)],["children",E.Children.toArray(Array.from(r))])]))),m("div",x(b([["className","flex flex-row pt-3 gap-2"],(o=[m("button",{className:"rounded-2xl text-xs font-medium text-gray-600 border px-3.5 py-1.5 bg-white",onClick:y=>{C(!0)},type:"button",children:E.Children.toArray(["What kind of data do I need?"])}),m("button",{className:"rounded-2xl text-xs font-medium text-gray-600 border px-3.5 py-1.5 bg-white",onClick:y=>{P(!0)},type:"button",children:E.Children.toArray(["Frequently asked questions"])})],["children",E.Children.toArray(Array.from(o))])]))),m("div",x(Ue(G(()=>ye(S[0]?j(["className","h-75 border-gray-300 border-dashed border-2 rounded-md my-6 bg-blue-50 border-blue-300"]):j(["className","h-75 border-gray-300 border-dashed border-2 rounded-md my-6 hover:bg-gray-100"]),G(()=>{let y;return j((y=Ue(G(()=>{let k,T,N,D,H,le,W,U,I,B,L,re,q;switch(h.tag){case 2:{let M;const Y=h.fields[0].SizeInBytes/1024/1024;return M=rd("{0:F2}",Y),j(m("div",x(b([["className","p-6 justify-between items-center inline-flex w-full"],(k=[m("div",x(b([["className","justify-start items-start gap-2 flex"],(T=[m("div",{className:"text-center text-gray-600 text-sm font-medium",children:h.fields[0].Name.fields[0]}),m("span",x(b([["className","text-emerald-700"],(N=[Lh(20,20)],["children",E.Children.toArray(Array.from(N))])])))],["children",E.Children.toArray(Array.from(T))])]))),m("div",x(b([["className","justify-start items-start gap-2 flex"],(D=[m("div",{className:"text-center text-gray-500 text-sm font-medium",children:`${M}MB`}),m("button",x(b([["className","justify-start items-center gap-1 flex text-red-600"],["onClick",oe=>{g(new Yn(2,[]))}],(H=[m("div",{className:"text-center text-sm font-medium",children:"Remove"}),m("div",x(b([["className","w-4 h-4 justify-center items-center flex"],(le=[Vs(10,10)],["children",E.Children.toArray(Array.from(le))])])))],["children",E.Children.toArray(Array.from(H))])])))],["children",E.Children.toArray(Array.from(D))])])))],["children",E.Children.toArray(Array.from(k))])]))))}case 1:return j(m("div",x(b([["className","p-6 justify-between items-center inline-flex w-full"],(W=[m("div",x(b([["className","justify-start items-start gap-2 flex"],(U=[m("div",{className:"text-center text-gray-600 text-sm font-medium",children:h.fields[0].fields[0]}),m("span",x(b([["className","animate-spin"],(I=[bC(20,20)],["children",E.Children.toArray(Array.from(I))])])))],["children",E.Children.toArray(Array.from(U))])]))),m("div",x(b([["className","justify-start items-start gap-2 flex"],(B=[m("button",x(b([["className","justify-start items-center gap-1 flex text-red-600"],["onClick",M=>{g(new Yn(1,[]))}],(L=[m("div",{className:"text-center text-sm font-medium",children:"Cancel"}),m("div",x(b([["className","w-4 h-4 justify-center items-center flex"],(re=[Vs(10,10)],["children",E.Children.toArray(Array.from(re))])])))],["children",E.Children.toArray(Array.from(L))])])))],["children",E.Children.toArray(Array.from(B))])])))],["children",E.Children.toArray(Array.from(W))])]))));default:{const M=Y=>{Y.preventDefault(),Y.stopPropagation()};return j(m("div",x(b([["className","flex flex-col items-center p-4"],["onDragEnter",Y=>{M(Y),$(!0)}],["onDragLeave",Y=>{M(Y),$(!1)}],["onDragOver",Y=>{M(Y),$(!0)}],["onDrop",Y=>{let oe;M(Y),$(!1),w((oe=Y,oe.dataTransfer).files.item(0))}],(q=Ue(G(()=>{let Y,oe,Ae,Ne,Q,fe;return ye((Y=h.fields[0],Y==null?j(Ke()):(oe=Y,j(m("div",x(b([["className","h-9 p-2 bg-red-50 rounded-md justify-start items-start gap-2 inline-flex w-full"],(Ae=[m("div",x(b([["className","w-5 h-5 px-0.5 pt-0.5 pb-[3px] justify-center items-center flex"],(Ne=[gf(16,15)],["children",E.Children.toArray(Array.from(Ne))])]))),m("div",x(b([["className","grow shrink basis-0 flex-col justify-start items-start gap-2 inline-flex"],(Q=[m("div",x(b([["className","self-stretch text-red-800 text-sm font-medium"],(fe=Ue(G(()=>{let ue;return oe.tag===0?j(m("span",{children:["File type must be .csv"]})):oe.tag===2?j((ue=b([m("span",{children:["Invalid CSV. Try using our "]}),m("a",{className:"underline",children:"sample CSV",href:fc,download:"import_users"}),m("span",{children:[" instead."]})]),m("p",{children:E.Children.toArray(Array.from(ue))}))):j(m("span",{children:["File size is too large"]}))})),["children",E.Children.toArray(Array.from(fe))])])))],["children",E.Children.toArray(Array.from(Q))])])))],["children",E.Children.toArray(Array.from(Ae))])])))))),G(()=>{let ue;return ye(j(m("div",x(b([["className","pt-2"],(ue=[_C(20,21)],["children",E.Children.toArray(Array.from(ue))])])))),G(()=>ye(j(m("input",{type:"file",onChange:_e=>{const X=_e.target.files;X!=null&&X.length>0&&w(X.item(0))},className:"hidden",ref:F})),G(()=>ye(j(m("span",{className:"text-gray-600 text-sm font-medium mt-3",children:"Drag and drop CSV file here"})),G(()=>ye(j(m("button",{className:"rounded text-sm w-[120px] border px-3 py-2 mt-4 font-medium text-gray-700 bg-white",onClick:_e=>{To(X=>{X.click()},Ca(F.current))},type:"button",children:E.Children.toArray(["Choose file"])})),G(()=>j(m("span",{className:"text-gray-500 text-xs font-normal mt-2 font-normal pb-2",children:"Maximum size: 10 MB"}))))))))))}))})),["children",E.Children.toArray(Array.from(q))])]))))}}})),["children",E.Children.toArray(Array.from(y))]))})))))),m("div",x(b([["className","flex flex-row justify-end gap-3"],(i=[m("button",x(b([(s="bg-white rounded-md text-red-700 shadow-sm text-sm border border-gray-300 font-medium px-3 py-2 w-[120px]",["className",s]),["onClick",y=>{u()}],["type","button"],["children",E.Children.toArray(["Cancel import"])]]))),m("button",x(b([(a="inline-flex justify-center items-center gap-x-1 rounded-md text-white bg-primary-600 text-sm w-[120px] border font-medium px-3 py-2 disabled:opacity-50",["className",a]),["onClick",y=>{h.tag===2&&d(h.fields[0])}],["type","button"],["disabled",!v],(l=["Map fields",Ph(13,8)],["children",E.Children.toArray(Array.from(l))])])))],["children",E.Children.toArray(Array.from(i))])])))],["children",E.Children.toArray(Array.from(n))])])))],["children",E.Children.toArray(Array.from(t))])])))}class bt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["UploadingCsv","MappingColumns","MappingEmploymentBasis","Reviewing"]}}class mt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Configuring","Importing"]}}function EC(){return[new mt(0,[new bt(0,[void 0])]),J()]}function kC(e,t){let n,r,o,i,s,a,l,u,d,c,p,f,h,g,w,_,C,S,$,O,P,F,v,y,k,T,N,D,H,le,W,U,I,B,L,re,q;if(e.tag===1)switch(e.fields[0].tag){case 1:{t.tag===0&&t.fields[0].tag===2?(n=13,T=t.fields[0].fields[0][1],N=t.fields[0].fields[0][0],D=t.fields[0].fields[0][2],H=e.fields[0].fields[0]):n=14;break}case 2:{e.fields[0].fields[0].tag===0?t.tag===0&&t.fields[0].tag===1?(n=17,re=t.fields[0].fields[0][0],q=e.fields[0].fields[0].fields[0]):n=18:e.fields[0].fields[0].fields[1]!=null?t.tag===0&&t.fields[0].tag===1?(n=16,U=e.fields[0].fields[0].fields[0],I=t.fields[0].fields[0][0],B=e.fields[0].fields[0].fields[1],L=t.fields[0].fields[0][1]):n=18:t.tag===0&&t.fields[0].tag===1?(n=15,le=e.fields[0].fields[0].fields[0],W=t.fields[0].fields[0][0]):n=18;break}default:t.tag===0&&t.fields[0].tag===3?t.fields[0].fields[0][2]!=null?(n=11,F=t.fields[0].fields[0][1],v=t.fields[0].fields[0][0],y=t.fields[0].fields[0][2][0],k=t.fields[0].fields[0][2][1]):(n=10,O=t.fields[0].fields[0][1],P=t.fields[0].fields[0][0]):n=12}else switch(e.fields[0].tag){case 1:{e.fields[0].fields[1]!=null?t.tag===0&&t.fields[0].tag===1?(n=4,u=e.fields[0].fields[0],d=t.fields[0].fields[0][0],c=e.fields[0].fields[1],p=t.fields[0].fields[0][1]):n=5:t.tag===0&&t.fields[0].tag===1?(n=3,a=e.fields[0].fields[0],l=t.fields[0].fields[0][0]):n=5;break}case 2:{t.tag===0&&t.fields[0].tag===2?(n=6,f=t.fields[0].fields[0][1],h=t.fields[0].fields[0][0],g=t.fields[0].fields[0][2],w=e.fields[0].fields[0]):n=7;break}case 3:{t.tag===0&&t.fields[0].tag===3?(n=8,_=t.fields[0].fields[0][1],C=t.fields[0].fields[0][0],S=t.fields[0].fields[0][2],$=e.fields[0].fields[0]):n=9;break}default:t.tag===0&&t.fields[0].tag===0?t.fields[0].fields[0]!=null?(n=1,o=e.fields[0].fields[0],i=t.fields[0].fields[0][0],s=t.fields[0].fields[0][1]):(n=0,r=e.fields[0].fields[0]):n=2}switch(n){case 0:return[new mt(0,[new bt(1,[[r,new nn(0,[void 0])]])]),J()];case 1:return me(o,i)?[new mt(0,[new bt(1,[[i,s]])]),J()]:[new mt(0,[new bt(1,[[o,new nn(0,[void 0])]])]),J()];case 2:return[t,J()];case 3:return[new mt(0,[new bt(3,[[l,a,void 0]])]),J()];case 4:return[new mt(0,[new bt(2,[[d,u,c,p.tag===1&&p.fields[0].tag===1&&me(c,p.fields[0].fields[1])?p.fields[0].fields[2]:void 0]])]),J()];case 5:return[t,J()];case 6:return[new mt(0,[new bt(3,[[h,f,[g,w]]])]),J()];case 7:return[t,J()];case 8:return[new mt(1,[[C,_,S,$]]),J()];case 9:return[t,J()];case 10:return[new mt(0,[new bt(1,[[P,new nn(1,[new fr(0,[O])])]])]),J()];case 11:return[new mt(0,[new bt(2,[[v,F,y,k]])]),J()];case 12:return[t,J()];case 13:return[new mt(0,[new bt(1,[[N,new nn(1,[new fr(1,[T,D,H])])]])]),J()];case 14:return[t,J()];case 15:return[new mt(0,[new bt(0,[[W,new nn(1,[new fr(0,[le])])]])]),J()];case 16:return[new mt(0,[new bt(0,[[I,L.tag===1?L.fields[0].tag===1?me(U,L.fields[0].fields[0])&&me(B,L.fields[0].fields[1])?L:new nn(1,[new fr(1,[U,B,void 0])]):new nn(1,[new fr(1,[U,B,void 0])]):new nn(1,[new fr(1,[U,B,void 0])])]])]),J()];case 17:return[new mt(0,[new bt(0,[[re,new nn(0,[q])]])]),J()];default:return[t,J()]}}function TC(e,t,n,r,o,i,s){return m("div",{})}class rt extends z{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Completed","Active","Disabled"]}}class qo extends Te{constructor(t,n,r,o){super(),this.UploadingCsv=t,this.MappingColumns=n,this.MappingEmploymentBasis=r,this.Reviewing=o}}function AC(e){switch(e.tag){case 1:return new qo(new rt(0,[]),new rt(1,[]),new rt(2,[]),new rt(2,[]));case 2:return new qo(new rt(0,[]),new rt(0,[]),new rt(1,[]),new rt(2,[]));case 3:return new qo(new rt(0,[]),new rt(0,[]),new rt(0,[]),new rt(1,[]));default:return new qo(new rt(1,[]),new rt(2,[]),new rt(2,[]),new rt(2,[]))}}function $C(e,t,n){switch(n.tag){case 1:{const r=n.fields[0],o=r[1].tag===1?r[1].fields[0].tag===1?[Lu(r[1].fields[0].fields[0],r[1].fields[0].fields[1]),r[0].HeaderRow,r[0].DataRows]:[Lu(r[1].fields[0].fields[0],void 0),r[0].HeaderRow,r[0].DataRows]:[r[1].fields[0],r[0].HeaderRow,r[0].DataRows];return m(lC,{existingMappings:Ps(o[0]),headerRow:o[1],dataRows:o[2],next:i=>{let s;t(new Rn(0,[(s=i,new zo(1,[s[0],s[1]]))]))},back:i=>{t(new Rn(1,[new Es(2,[i])]))}})}case 2:return uC(n.fields[0][3],Fv(n.fields[0][0].DataRows,n.fields[0][2]),r=>{t(new Rn(0,[new zo(2,[r])]))},r=>{t(new Rn(1,[new Es(1,[r])]))});case 3:return cC(n.fields[0][0].HeaderRow,n.fields[0][0].DataRows,n.fields[0][1],n.fields[0][2],r=>{t(new Rn(0,[new zo(3,[r])]))},()=>{t(new Rn(1,[new Es(0,[])]))});default:{const r=yn(o=>o[0],n.fields[0]);return m(SC,{existingCsvFile:Ps(r),next:o=>{t(new Rn(0,[new zo(0,[o])]))},cancel:e})}}}function Yo(e,t){let n,r,o;switch(t.tag){case 1:return m("div",x(b([["className","text-sm font-medium border-b-2 border-primary-600 pt-1 pb-3 text-primary-600"],(n=[m("span",{children:e})],["children",E.Children.toArray(Array.from(n))])])));case 2:return m("div",x(b([["className","text-sm font-medium pt-1 pb-3 text-gray-500"],(r=[m("span",{children:e})],["children",E.Children.toArray(Array.from(r))])])));default:return m("div",x(b([["className","text-sm font-medium pt-1 pb-3 text-emerald-700 gap-2 inline-flex"],(o=[Lh(20,20),m("span",{children:e})],["children",E.Children.toArray(Array.from(o))])])))}}function MC(e){let t,n,r,o,i;const s=EC();i=$o(()=>Ao(()=>s,kC,(c,p)=>{}),void 0,[]);const a=i[0],l=E.useState(!1);let u;if(a.tag===0){const c=a.fields[0],p=()=>{l[0]||l[1](!0)},f=AC(c),h=$C(p,i[1],c);u=m("div",x(b([["className","flex flex-col h-full"],(t=[m("div",x(b([["className","flex flex-row justify-between px-12 pt-8 pb-4"],(n=[m("span",{className:"font-sonoma text-gray-900 font-bold text-lg",children:"Import Users from CSV"}),m("button",x(b([(r="bg-white rounded-md text-red-700 shadow-sm text-sm border border-gray-300 font-medium px-3 py-2 w-[120px]",["className",r]),["onClick",g=>{p()}],["type","button"],["children",E.Children.toArray(["Cancel import"])]])))],["children",E.Children.toArray(Array.from(n))])]))),m("div",x(b([["className","flex flex-row items-center px-12 gap-2 border-b border-gray-200"],(o=[Yo("1. Upload CSV",f.UploadingCsv),m("hr",{className:"w-16 pt-1.5"}),Yo("2. Map fields",f.MappingColumns),m("hr",{className:"w-16 pt-1.5"}),Yo("3. Map values",f.MappingEmploymentBasis),m("hr",{className:"w-16 pt-1.5"}),Yo("4. Review",f.Reviewing)],["children",E.Children.toArray(Array.from(o))])]))),h],["children",E.Children.toArray(Array.from(t))])])))}else{const c=a.fields[0][0].DataRows;u=TC(a.fields[0][0].Name,a.fields[0][0].HeaderRow,c,a.fields[0][1],a.fields[0][2],a.fields[0][3])}const d=[m("style",{children:[ba]}),u];return m(Oe,{},...d)}function NC(){la(e=>m(MC,e),"apollo-import-workspace-wizard")}la(e=>m(j0,e),"apollo-import-workspace-app");Ev();NC();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-import-workspace-app",
3
- "version": "0.1.420",
3
+ "version": "0.1.422",
4
4
  "description": "Apollo Import Workspace App",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",