UNPKG

hello-csv

Version:

A modern CSV importer written in Preact

7 lines 290 kB
"use strict";var ia=Object.defineProperty;var la=(e,t,n)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>la(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("preact");var sa=0;function f(e,t,n,r,o,i){t||(t={});var l,s,a=t;if("ref"in a)for(s in a={},t)s=="ref"?l=t[s]:a[s]=t[s];var u={type:e,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--sa,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(s in l)a[s]===void 0&&(a[s]=l[s]);return C.options.vnode&&C.options.vnode(u),u}var et,de,Jn,$o,Pt=0,Pi=[],ge=C.options,To=ge.__b,Io=ge.__r,Fo=ge.diffed,Oo=ge.__c,Mo=ge.unmount,Po=ge.__;function xt(e,t){ge.__h&&ge.__h(de,e,Pt||t),Pt=0;var n=de.__H||(de.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function W(e){return Pt=1,tt(Ni,e)}function tt(e,t,n){var r=xt(et++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ni(void 0,t),function(s){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,s);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=de,!de.u)){var o=function(s,a,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(g){return!!g.__c});if(c.every(function(g){return!g.__N}))return!i||i.call(this,s,a,u);var p=r.__c.props!==s;return c.forEach(function(g){if(g.__N){var d=g.__[0];g.__=g.__N,g.__N=void 0,d!==g.__[0]&&(p=!0)}}),i&&i.call(this,s,a,u)||p};de.u=!0;var i=de.shouldComponentUpdate,l=de.componentWillUpdate;de.componentWillUpdate=function(s,a,u){if(this.__e){var c=i;i=void 0,o(s,a,u),i=c}l&&l.call(this,s,a,u)},de.shouldComponentUpdate=o}return r.__N||r.__}function re(e,t){var n=xt(et++,3);!ge.__s&&Yr(n.__H,t)&&(n.__=e,n.i=t,de.__H.__h.push(n))}function qe(e,t){var n=xt(et++,4);!ge.__s&&Yr(n.__H,t)&&(n.__=e,n.i=t,de.__h.push(n))}function D(e){return Pt=5,G(function(){return{current:e}},[])}function qr(e,t,n){Pt=6,qe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function G(e,t){var n=xt(et++,7);return Yr(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oe(e,t){return Pt=8,G(function(){return e},t)}function se(e){var t=de.context[e.__c],n=xt(et++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(de)),t.props.value):e.__}function Kr(e,t){ge.useDebugValue&&ge.useDebugValue(t?t(e):e)}function aa(e){var t=xt(et++,10),n=W();return t.__=e,de.componentDidCatch||(de.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function $e(){var e=xt(et++,11);if(!e.__){for(var t=de.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ua(){for(var e;e=Pi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_n),e.__H.__h.forEach(wr),e.__H.__h=[]}catch(t){e.__H.__h=[],ge.__e(t,e.__v)}}ge.__b=function(e){de=null,To&&To(e)},ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Po&&Po(e,t)},ge.__r=function(e){Io&&Io(e),et=0;var t=(de=e.__c).__H;t&&(Jn===de?(t.__h=[],de.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(_n),t.__h.forEach(wr),t.__h=[],et=0)),Jn=de},ge.diffed=function(e){Fo&&Fo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Pi.push(t)!==1&&$o===ge.requestAnimationFrame||(($o=ge.requestAnimationFrame)||ca)(ua)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Jn=de=null},ge.__c=function(e,t){t.some(function(n){try{n.__h.forEach(_n),n.__h=n.__h.filter(function(r){return!r.__||wr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ge.__e(r,n.__v)}}),Oo&&Oo(e,t)},ge.unmount=function(e){Mo&&Mo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{_n(r)}catch(o){t=o}}),n.__H=void 0,t&&ge.__e(t,n.__v))};var No=typeof requestAnimationFrame=="function";function ca(e){var t,n=function(){clearTimeout(r),No&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);No&&(t=requestAnimationFrame(n))}function _n(e){var t=de,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),de=t}function wr(e){var t=de;e.__c=e.__(),de=t}function Yr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Ni(e,t){return typeof t=="function"?t(e):t}function Ai(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ai(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function da(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ai(e))&&(r&&(r+=" "),r+=t);return r}const Ao=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ko=da,_t=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ko(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],p=i==null?void 0:i[u];if(c===null)return null;const g=Ao(c)||Ao(p);return o[u][g]}),s=n&&Object.entries(n).reduce((u,c)=>{let[p,g]=c;return g===void 0||(u[p]=g),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:p,className:g,...d}=c;return Object.entries(d).every(m=>{let[h,w]=m;return Array.isArray(w)?w.includes({...i,...s}[h]):{...i,...s}[h]===w})?[...u,p,g]:u},[]);return ko(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},fa=_t("text-center inline-block font-semibold px-3 py-2 rounded-md text-sm",{variants:{variant:{primary:"shadow-xs bg-hello-csv-primary text-white",secondary:"bg-white text-hello-csv-primary ring-1 shadow-xs ring-bg-hello-csv-primary ring-inset",tertiary:"bg-white text-gray-900 ring-1 shadow-xs ring-hello-csv-tertiary ring-inset",success:"shadow-xs bg-hello-csv-success text-white",danger:"shadow-xs bg-hello-csv-danger text-white"},withFullWidth:{true:"w-full",false:""},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:"cursor-pointer"}},compoundVariants:[{variant:"primary",disabled:!1,className:"hover:bg-hello-csv-primary-light focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-primary"},{variant:"secondary",disabled:!1,className:"hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-secondary"},{variant:"tertiary",disabled:!1,className:"hover:bg-hello-csv-tertiary-light"},{variant:"success",disabled:!1,className:"hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-success"},{variant:"danger",disabled:!1,className:"hover:bg-hello-csv-danger-light focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-danger"}],defaultVariants:{withFullWidth:!1,variant:"primary",disabled:!1}});function De({children:e,variant:t,disabled:n,onClick:r,withFullWidth:o}){const i=fa({variant:t,disabled:n,withFullWidth:o});return f("div",{role:"button",tabIndex:0,className:i,onClick:r,"aria-disabled":n,children:e})}function ki(e,t){for(var n in t)e[n]=t[n];return e}function yr(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Nn(e,t){var n=t(),r=W({t:{__:n,u:t}}),o=r[0].t,i=r[1];return qe(function(){o.__=n,o.u=t,er(o)&&i({t:o})},[e,n,t]),re(function(){return er(o)&&i({t:o}),e(function(){er(o)&&i({t:o})})},[e]),n}function er(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Xr(e){e()}function Zr(e){return e}function Qr(){return[!1,Xr]}var Jr=qe;function Rn(e,t){this.props=e,this.context=t}function Di(e,t){function n(o){var i=this.props.ref,l=i==o.ref;return!l&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!l:yr(this.props,o)}function r(o){return this.shouldComponentUpdate=n,C.createElement(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Rn.prototype=new C.Component).isPureReactComponent=!0,Rn.prototype.shouldComponentUpdate=function(e,t){return yr(this.props,e)||yr(this.state,t)};var Do=C.options.__b;C.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Do&&Do(e)};var pa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ce(e){function t(n){var r=ki({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=pa,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Lo=function(e,t){return e==null?null:C.toChildArray(C.toChildArray(e).map(t))},Li={map:Lo,forEach:Lo,count:function(e){return e?C.toChildArray(e).length:0},only:function(e){var t=C.toChildArray(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:C.toChildArray},ma=C.options.__e;C.options.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}ma(e,t,n,r)};var Vo=C.options.unmount;function Vi(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ki({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Vi(r,t,n)})),e}function Hi(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Hi(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Yt(){this.__u=0,this.o=null,this.__b=null}function zi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Bi(e){var t,n,r;function o(i){if(t||(t=e()).then(function(l){n=l.default||l},function(l){r=l}),r)throw r;if(!n)throw t;return C.createElement(n,i)}return o.displayName="Lazy",o.__f=!0,o}function It(){this.i=null,this.l=null}C.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Vo&&Vo(e)},(Yt.prototype=new C.Component).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=zi(r.__v),i=!1,l=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=l;var s=function(){if(!--r.__u){if(r.state.__a){var a=r.state.__a;r.__v.__k[0]=Hi(a,a.__c.__P,a.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(l,l)},Yt.prototype.componentWillUnmount=function(){this.o=[]},Yt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Vi(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&C.createElement(C.Fragment,null,e.fallback);return o&&(o.__u&=-33),[C.createElement(C.Fragment,null,t.__a?null:e.children),o]};var Ho=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function ga(e){return this.getChildContext=function(){return e.context},e.children}function ha(e){var t=this,n=e.h;t.componentWillUnmount=function(){C.render(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.h.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.h.insertBefore(r,o)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}),C.render(C.createElement(ga,{context:t.context},e.__v),t.v)}function sn(e,t){var n=C.createElement(ha,{__v:e,h:t});return n.containerInfo=t,n}(It.prototype=new C.Component).__a=function(e){var t=this,n=zi(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ho(t,e,r)):o()};n?n(i):i()}},It.prototype.render=function(e){this.i=null,this.l=new Map;var t=C.toChildArray(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},It.prototype.componentDidUpdate=It.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ho(e,n,t)})};var ji=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,va=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,wa=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ya=/[A-Z0-9]/g,ba=typeof document<"u",xa=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Wi(e,t,n){return t.__k==null&&(t.textContent=""),C.render(e,t),typeof n=="function"&&n(),e?e.__c:null}function Gi(e,t,n){return C.hydrate(e,t),typeof n=="function"&&n(),e?e.__c:null}C.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var zo=C.options.event;function _a(){}function Ca(){return this.cancelBubble}function Sa(){return this.defaultPrevented}C.options.event=function(e){return zo&&(e=zo(e)),e.persist=_a,e.isPropagationStopped=Ca,e.isDefaultPrevented=Sa,e.nativeEvent=e};var eo,Ea={enumerable:!1,configurable:!0,get:function(){return this.class}},Bo=C.options.vnode;C.options.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},i=r.indexOf("-")===-1;for(var l in n){var s=n[l];if(!(l==="value"&&"defaultValue"in n&&s==null||ba&&l==="children"&&r==="noscript"||l==="class"||l==="className")){var a=l.toLowerCase();l==="defaultValue"&&"value"in n&&n.value==null?l="value":l==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a[0]==="o"&&a[1]==="n"?a==="ondoubleclick"?l="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||xa(n.type)?a==="onfocus"?l="onfocusin":a==="onblur"?l="onfocusout":wa.test(l)&&(l=a):a=l="oninput":i&&va.test(l)?l=l.replace(ya,"-$&").toLowerCase():s===null&&(s=void 0),a==="oninput"&&o[l=a]&&(l="oninputCapture"),o[l]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=C.toChildArray(n.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=C.toChildArray(n.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Ea)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=ji,Bo&&Bo(e)};var jo=C.options.__r;C.options.__r=function(e){jo&&jo(e),eo=e.__c};var Wo=C.options.diffed;C.options.diffed=function(e){Wo&&Wo(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),eo=null};var Ui={ReactCurrentDispatcher:{current:{readContext:function(e){return eo.__n[e.__c].props.value},useCallback:oe,useContext:se,useDebugValue:Kr,useDeferredValue:Zr,useEffect:re,useId:$e,useImperativeHandle:qr,useInsertionEffect:Jr,useLayoutEffect:qe,useMemo:G,useReducer:tt,useRef:D,useState:W,useSyncExternalStore:Nn,useTransition:Qr}}},Ra="18.3.1";function qi(e){return C.createElement.bind(null,e)}function Dt(e){return!!e&&e.$$typeof===ji}function Ki(e){return Dt(e)&&e.type===C.Fragment}function Yi(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function to(e){return Dt(e)?C.cloneElement.apply(null,arguments):e}function Xi(e){return!!e.__k&&(C.render(null,e),!0)}function Zi(e){return e&&(e.base||e.nodeType===1&&e)||null}var Qi=function(e,t){return e(t)},Ne=function(e,t){return e(t)},Ji=C.Fragment,el=Dt,L={useState:W,useId:$e,useReducer:tt,useEffect:re,useLayoutEffect:qe,useInsertionEffect:Jr,useTransition:Qr,useDeferredValue:Zr,useSyncExternalStore:Nn,startTransition:Xr,useRef:D,useImperativeHandle:qr,useMemo:G,useCallback:oe,useContext:se,useDebugValue:Kr,version:"18.3.1",Children:Li,render:Wi,hydrate:Gi,unmountComponentAtNode:Xi,createPortal:sn,createElement:C.createElement,createContext:C.createContext,createFactory:qi,cloneElement:to,createRef:C.createRef,Fragment:C.Fragment,isValidElement:Dt,isElement:el,isFragment:Ki,isMemo:Yi,findDOMNode:Zi,Component:C.Component,PureComponent:Rn,memo:Di,forwardRef:ce,flushSync:Ne,unstable_batchedUpdates:Qi,StrictMode:Ji,Suspense:Yt,SuspenseList:It,lazy:Bi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ui};const br=Object.freeze(Object.defineProperty({__proto__:null,Children:Li,Component:C.Component,Fragment:C.Fragment,PureComponent:Rn,StrictMode:Ji,Suspense:Yt,SuspenseList:It,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ui,cloneElement:to,createContext:C.createContext,createElement:C.createElement,createFactory:qi,createPortal:sn,createRef:C.createRef,default:L,findDOMNode:Zi,flushSync:Ne,forwardRef:ce,hydrate:Gi,isElement:el,isFragment:Ki,isMemo:Yi,isValidElement:Dt,lazy:Bi,memo:Di,render:Wi,startTransition:Xr,unmountComponentAtNode:Xi,unstable_batchedUpdates:Qi,useCallback:oe,useContext:se,useDebugValue:Kr,useDeferredValue:Zr,useEffect:re,useErrorBoundary:aa,useId:$e,useImperativeHandle:qr,useInsertionEffect:Jr,useLayoutEffect:qe,useMemo:G,useReducer:tt,useRef:D,useState:W,useSyncExternalStore:Nn,useTransition:Qr,version:Ra},Symbol.toStringTag,{value:"Module"})),$a=_t("overflow-hidden rounded-md border border-gray-200",{variants:{variant:{default:"bg-white",muted:"bg-hello-csv-muted"},withPadding:{true:"px-4 py-5 sm:p-6",false:""}},defaultVariants:{variant:"default",withPadding:!0}}),tl=ce(({children:e,className:t,variant:n,withPadding:r=!0},o)=>{const i=$a({variant:n,withPadding:r});return f("div",{ref:o,className:`${i} ${t}`,children:e})});function nl({checked:e,setChecked:t,label:n}){const r=$e();return f("div",{className:"flex gap-3",children:[f("div",{className:"flex h-6 shrink-0 items-center",children:f("div",{className:"group grid size-4 grid-cols-1",children:[f("input",{checked:e,onChange:o=>t(o.target.checked),id:r,type:"checkbox",className:"checked:border-hello-csv-primary checked:bg-hello-csv-primary indeterminate:border-hello-csv-primary indeterminate:bg-hello-csv-primary focus-visible:outline-hello-csv-hello-csv-primary col-start-1 row-start-1 appearance-none rounded-sm border border-gray-300 bg-white focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 forced-colors:appearance-auto"}),f("svg",{fill:"none",viewBox:"0 0 14 14",className:"pointer-events-none col-start-1 row-start-1 size-3.5 self-center justify-self-center stroke-white group-has-disabled:stroke-gray-950/25",children:[f("path",{d:"M3 8L6 11L11 3.5",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-has-checked:opacity-100"}),f("path",{d:"M3 7H11",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-has-indeterminate:opacity-100"})]})]})}),n&&f("div",{className:"text-sm/6",children:f("label",{htmlFor:r,className:"font-medium text-gray-900",children:n})})]})}let Ta=!1;function no(){return Ta}const rl=typeof document<"u"?L.useLayoutEffect:()=>{};function Ia(e){const t=D(null);return rl(()=>{t.current=e},[e]),oe((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const dt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},gt=e=>e&&"window"in e&&e.window===e?e:dt(e).defaultView||window;function Fa(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Oa(e){return Fa(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ol(e,t){if(!no())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Oa(n)?n=n.host:n=n.parentNode}return!1}const xr=(e=document)=>{var t;if(!no())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function il(e){return no()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ma(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Pa(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ll(e){let t=null;return()=>(t==null&&(t=e()),t)}const Na=ll(function(){return Pa(/^Mac/i)}),Aa=ll(function(){return Ma(/Android/i)});function sl(){let e=D(new Map),t=oe((o,i,l,s)=>{let a=s!=null&&s.once?(...u)=>{e.current.delete(l),l(...u)}:l;e.current.set(l,{type:i,eventTarget:o,fn:a,options:s}),o.addEventListener(i,a,s)},[]),n=oe((o,i,l,s)=>{var a;let u=((a=e.current.get(l))===null||a===void 0?void 0:a.fn)||l;o.removeEventListener(i,u,s),e.current.delete(l)},[]),r=oe(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return re(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ka(e){return e.mozInputSource===0&&e.isTrusted?!0:Aa()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function al(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Da(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function ul(e){let t=D({isFocused:!1,observer:null});rl(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Ia(r=>{e==null||e(r)});return oe(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=l=>{if(t.current.isFocused=!1,o.disabled){let s=al(l);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var l;(l=t.current.observer)===null||l===void 0||l.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let La=!1,an=null,_r=new Set,Xt=new Map,wt=!1,Cr=!1;const Va={Tab:!0,Escape:!0};function ro(e,t){for(let n of _r)n(e,t)}function Ha(e){return!(e.metaKey||!Na()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function $n(e){wt=!0,Ha(e)&&(an="keyboard",ro("keyboard",e))}function Ot(e){an="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(wt=!0,ro("pointer",e))}function cl(e){ka(e)&&(wt=!0,an="virtual")}function dl(e){e.target===window||e.target===document||La||!e.isTrusted||(!wt&&!Cr&&(an="virtual",ro("virtual",e)),wt=!1,Cr=!1)}function fl(){wt=!1,Cr=!0}function Sr(e){if(typeof window>"u"||Xt.get(gt(e)))return;const t=gt(e),n=dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){wt=!0,r.apply(this,arguments)},n.addEventListener("keydown",$n,!0),n.addEventListener("keyup",$n,!0),n.addEventListener("click",cl,!0),t.addEventListener("focus",dl,!0),t.addEventListener("blur",fl,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",Ot,!0),n.addEventListener("pointermove",Ot,!0),n.addEventListener("pointerup",Ot,!0)),t.addEventListener("beforeunload",()=>{pl(e)},{once:!0}),Xt.set(t,{focus:r})}const pl=(e,t)=>{const n=gt(e),r=dt(e);t&&r.removeEventListener("DOMContentLoaded",t),Xt.has(n)&&(n.HTMLElement.prototype.focus=Xt.get(n).focus,r.removeEventListener("keydown",$n,!0),r.removeEventListener("keyup",$n,!0),r.removeEventListener("click",cl,!0),n.removeEventListener("focus",dl,!0),n.removeEventListener("blur",fl,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Ot,!0),r.removeEventListener("pointermove",Ot,!0),r.removeEventListener("pointerup",Ot,!0)),Xt.delete(n))};function za(e){const t=dt(e);let n;return t.readyState!=="loading"?Sr(e):(n=()=>{Sr(e)},t.addEventListener("DOMContentLoaded",n)),()=>pl(e,n)}typeof document<"u"&&za();function ml(){return an!=="pointer"}const Ba=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ja(e,t,n){let r=dt(n==null?void 0:n.target);const o=typeof window<"u"?gt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?gt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?gt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?gt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Ba.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!Va[n.key])}function Wa(e,t,n){Sr(),re(()=>{let r=(o,i)=>{ja(!!(n!=null&&n.isTextInput),o,i)&&e(ml())};return _r.add(r),()=>{_r.delete(r)}},t)}function Ga(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=oe(a=>{if(a.target===a.currentTarget)return r&&r(a),o&&o(!1),!0},[r,o]),l=ul(i),s=oe(a=>{const u=dt(a.target),c=u?xr(u):xr();a.target===a.currentTarget&&c===il(a.nativeEvent)&&(n&&n(a),o&&o(!0),l(a))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function Ua(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=D({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=sl(),a=oe(p=>{p.currentTarget.contains(p.target)&&i.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(p),o&&o(!1))},[n,o,i,s]),u=ul(a),c=oe(p=>{if(!p.currentTarget.contains(p.target))return;const g=dt(p.target),d=xr(g);if(!i.current.isFocusWithin&&d===il(p.nativeEvent)){r&&r(p),o&&o(!0),i.current.isFocusWithin=!0,u(p);let m=p.currentTarget;l(g,"focus",h=>{if(i.current.isFocusWithin&&!ol(m,h.target)){let w=new g.defaultView.FocusEvent("blur",{relatedTarget:h.target});Da(w,m);let b=al(w);a(b)}},{capture:!0})}},[r,o,u,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let Er=!1,tr=0;function qa(){Er=!0,setTimeout(()=>{Er=!1},50)}function Go(e){e.pointerType==="touch"&&qa()}function Ka(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",Go),tr++,()=>{tr--,!(tr>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Go)}}function gl(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,l]=W(!1),s=D({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;re(Ka,[]);let{addGlobalListener:a,removeAllGlobalListeners:u}=sl(),{hoverProps:c,triggerHoverEnd:p}=G(()=>{let g=(h,w)=>{if(s.pointerType=w,o||w==="touch"||s.isHovered||!h.currentTarget.contains(h.target))return;s.isHovered=!0;let b=h.currentTarget;s.target=b,a(dt(h.target),"pointerover",_=>{s.isHovered&&s.target&&!ol(s.target,_.target)&&d(_,_.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:b,pointerType:w}),n&&n(!0),l(!0)},d=(h,w)=>{let b=s.target;s.pointerType="",s.target=null,!(w==="touch"||!s.isHovered||!b)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:b,pointerType:w}),n&&n(!1),l(!1))},m={};return typeof PointerEvent<"u"&&(m.onPointerEnter=h=>{Er&&h.pointerType==="mouse"||g(h,h.pointerType)},m.onPointerLeave=h=>{!o&&h.currentTarget.contains(h.target)&&d(h,h.pointerType)}),{hoverProps:m,triggerHoverEnd:d}},[t,n,r,o,s,a,u]);return re(()=>{o&&p({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}function hl(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=D({isFocused:!1,isFocusVisible:t||ml()}),[i,l]=W(!1),[s,a]=W(()=>o.current.isFocused&&o.current.isFocusVisible),u=oe(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),c=oe(d=>{o.current.isFocused=d,l(d),u()},[u]);Wa(d=>{o.current.isFocusVisible=d,u()},[],{isTextInput:n});let{focusProps:p}=Ga({isDisabled:r,onFocusChange:c}),{focusWithinProps:g}=Ua({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:s,focusProps:r?g:p}}var Ya=Object.defineProperty,Xa=(e,t,n)=>t in e?Ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nr=(e,t,n)=>(Xa(e,typeof t!="symbol"?t+"":t,n),n);let Za=class{constructor(){nr(this,"current",this.detect()),nr(this,"handoffState","pending"),nr(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},vt=new Za;function Lt(e){return vt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function An(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ge(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return An(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Ge();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ct(){let[e]=W(Ge);return re(()=>()=>e.dispose(),[e]),e}let ue=(e,t)=>{vt.isServer?re(e,t):qe(e,t)};function ft(e){let t=D(e);return ue(()=>{t.current=e},[e]),t}let j=function(e){let t=ft(e);return L.useCallback((...n)=>t.current(...n),[t])};function Qa(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Ja(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function eu({disabled:e=!1}={}){let t=D(null),[n,r]=W(!1),o=Ct(),i=j(()=>{t.current=null,r(!1),o.dispose()}),l=j(s=>{if(o.dispose(),t.current===null){t.current=s.currentTarget,r(!0);{let a=Lt(s.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",u=>{if(t.current){let c=Qa(u);r(Ja(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:l,onPointerUp:i,onClick:i}}}let tu=C.createContext(void 0);function oo(){return se(tu)}function Rr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Me(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Me),r}var Nt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Nt||{}),it=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(it||{});function xe(){let e=ru();return oe(t=>nu({mergeRefs:e,...t}),[e])}function nu({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??ou;let a=vl(t,e);if(i)return vn(a,n,r,l,s);let u=o??0;if(u&2){let{static:c=!1,...p}=a;if(c)return vn(p,n,r,l,s)}if(u&1){let{unmount:c=!0,...p}=a;return Me(c?0:1,{0(){return null},1(){return vn({...p,hidden:!0,style:{display:"none"}},n,r,l,s)}})}return vn(a,n,r,l,s)}function vn(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=rr(e,["unmount","static"]),u=e.ref!==void 0?{[s]:e.ref}:{},c=typeof l=="function"?l(t):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let p={};if(t){let g=!1,d=[];for(let[m,h]of Object.entries(t))typeof h=="boolean"&&(g=!0),h===!0&&d.push(m.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(g){p["data-headlessui-state"]=d.join(" ");for(let m of d)p[`data-${m}`]=""}}if(i===C.Fragment&&(Object.keys(ot(a)).length>0||Object.keys(ot(p)).length>0))if(!Dt(c)||Array.isArray(c)&&c.length>1){if(Object.keys(ot(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ot(a)).concat(Object.keys(ot(p))).map(g=>` - ${g}`).join(` `),"","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(g=>` - ${g}`).join(` `)].join(` `))}else{let g=c.props,d=g==null?void 0:g.className,m=typeof d=="function"?(...b)=>Rr(d(...b),a.className):Rr(d,a.className),h=m?{className:m}:{},w=vl(c.props,ot(rr(a,["ref"])));for(let b in p)b in w&&delete p[b];return to(c,Object.assign({},w,p,u,{ref:o(iu(c),u.ref)},h))}return C.createElement(i,Object.assign({},rr(a,["ref"]),i!==C.Fragment&&u,i!==C.Fragment&&p),c)}function ru(){let e=D([]),t=oe(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 ou(...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 vl(...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 l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function io(...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 l of i)l==null||l(...o)}});return t}function ye(e){var t;return Object.assign(ce(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ot(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function rr(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function iu(e){return L.version.split(".")[0]>="19"?e.props.ref:e.ref}function lu(e,t,n){let[r,o]=W(n),i=e!==void 0,l=D(i),s=D(!1),a=D(!1);return i&&!l.current&&!s.current?(s.current=!0,l.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&&l.current&&!a.current&&(a.current=!0,l.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,j(u=>(i||o(u),t==null?void 0:t(u)))]}function su(e){let[t]=W(e);return t}function wl(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))bl(n,yl(t,r),o);return n}function yl(e,t){return e?e+"["+t+"]":t}function bl(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())bl(e,yl(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,""]):wl(n,t,e)}let au="span";var At=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(At||{});function uu(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 xe()({ourProps:i,theirProps:o,slot:{},defaultTag:au,name:"Hidden"})}let en=ye(uu),cu=C.createContext(null);function du({children:e}){let t=se(cu);if(!t)return L.createElement(L.Fragment,null,e);let{target:n}=t;return n?sn(L.createElement(L.Fragment,null,e),n):null}function fu({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,l]=W(null),s=Ct();return re(()=>{if(r&&i)return s.addEventListener(i,"reset",r)},[i,t,r]),L.createElement(du,null,L.createElement(pu,{setForm:l,formId:t}),wl(e).map(([a,u])=>L.createElement(en,{features:At.Hidden,...ot({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:u,...o})})))}function pu({setForm:e,formId:t}){return re(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:L.createElement(en,{features:At.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let mu=C.createContext(void 0);function xl(){return se(mu)}function gu(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&&hu(n)?!1:r}function hu(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let _l=Symbol();function vu(e,t=!0){return Object.assign(e,{[_l]:t})}function Fe(...e){let t=D(e);re(()=>{t.current=e},[e]);let n=j(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[_l]))?void 0:n}let kn=C.createContext(null);kn.displayName="DescriptionContext";function Cl(){let e=se(kn);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,Cl),t}return e}function wu(){var e,t;return(t=(e=se(kn))==null?void 0:e.value)!=null?t:void 0}function yu(){let[e,t]=W([]);return[e.length>0?e.join(" "):void 0,G(()=>function(n){let r=j(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),a=s.indexOf(i);return a!==-1&&s.splice(a,1),s}))),o=G(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return L.createElement(kn.Provider,{value:o},n.children)},[t])]}let bu="p";function xu(e,t){let n=$e(),r=oo(),{id:o=`headlessui-description-${n}`,...i}=e,l=Cl(),s=Fe(t);ue(()=>l.register(o),[o,l.register]);let a=r||!1,u=G(()=>({...l.slot,disabled:a}),[l.slot,a]),c={ref:s,...l.props,id:o};return xe()({ourProps:c,theirProps:i,slot:u,defaultTag:bu,name:l.name||"Description"})}let _u=ye(xu),Cu=Object.assign(_u,{});var Ee=(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))(Ee||{});let Dn=C.createContext(null);Dn.displayName="LabelContext";function Sl(){let e=se(Dn);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,Sl),t}return e}function Ln(e){var t,n,r;let o=(n=(t=se(Dn))==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 Su({inherit:e=!1}={}){let t=Ln(),[n,r]=W([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,G(()=>function(i){let l=j(a=>(r(u=>[...u,a]),()=>r(u=>{let c=u.slice(),p=c.indexOf(a);return p!==-1&&c.splice(p,1),c}))),s=G(()=>({register:l,slot:i.slot,name:i.name,props:i.props,value:i.value}),[l,i.slot,i.name,i.props,i.value]);return L.createElement(Dn.Provider,{value:s},i.children)},[r])]}let Eu="label";function Ru(e,t){var n;let r=$e(),o=Sl(),i=xl(),l=oo(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:u=!1,...c}=e,p=Fe(t);ue(()=>o.register(s),[s,o.register]);let g=j(w=>{let b=w.currentTarget;if(b instanceof HTMLLabelElement&&w.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(w),b instanceof HTMLLabelElement){let _=document.getElementById(b.htmlFor);if(_){let S=_.getAttribute("disabled");if(S==="true"||S==="")return;let R=_.getAttribute("aria-disabled");if(R==="true"||R==="")return;(_ instanceof HTMLInputElement&&(_.type==="radio"||_.type==="checkbox")||_.role==="radio"||_.role==="checkbox"||_.role==="switch")&&_.click(),_.focus({preventScroll:!0})}}}),d=l||!1,m=G(()=>({...o.slot,disabled:d}),[o.slot,d]),h={ref:p,...o.props,id:s,htmlFor:a,onClick:g};return u&&("onClick"in h&&(delete h.htmlFor,delete h.onClick),"onClick"in c&&delete c.onClick),xe()({ourProps:h,theirProps:c,slot:m,defaultTag:a?Eu:"div",name:o.name||"Label"})}let $u=ye(Ru),Tu=Object.assign($u,{}),Iu=C.createContext(()=>{});function Fu({value:e,children:t}){return L.createElement(Iu.Provider,{value:e},t)}function Tt(e,t,n){let r=n.initialDeps??[],o;function i(){var l,s,a,u;let c;n.key&&((l=n.debug)!=null&&l.call(n))&&(c=Date.now());const p=e();if(!(p.length!==r.length||p.some((m,h)=>r[h]!==m)))return o;r=p;let d;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(d=Date.now()),o=t(...p),n.key&&((a=n.debug)!=null&&a.call(n))){const m=Math.round((Date.now()-c)*100)/100,h=Math.round((Date.now()-d)*100)/100,w=h/16,b=(_,S)=>{for(_=String(_);_.length<S;)_=" "+_;return _};console.info(`%c⏱ ${b(h,5)} /${b(m,5)} ms`,` font-size: .6rem; font-weight: bold; color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,o),o}return i.updateDeps=l=>{r=l},i}function Uo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ou=(e,t)=>Math.abs(e-t)<=1,Mu=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}};var Gt={NODE_ENV:"production"};const qo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Pu=e=>e,Nu=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},Au=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:a}=l;t({width:Math.round(s),height:Math.round(a)})};if(o(qo(n)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=()=>{const a=l[0];if(a!=null&&a.borderBoxSize){const u=a.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(qo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Ko={passive:!0},Yo=typeof window>"u"?!0:"onscrollend"in window,ku=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&Yo?()=>{}:Mu(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),l=c=>()=>{const{horizontal:p,isRtl:g}=e.options;o=p?n.scrollLeft*(g&&-1||1):n.scrollTop,i(),t(o,c)},s=l(!0),a=l(!1);a(),n.addEventListener("scroll",s,Ko);const u=e.options.useScrollendEvent&&Yo;return u&&n.addEventListener("scrollend",a,Ko),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",a)}},Du=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Lu=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const l=e+t;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class Vu{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{const l=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Pu,rangeExtractor:Nu,onChange:()=>{},measureElement:Du,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Tt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:Gt.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=n[l];if(o.has(s.lane))continue;const a=i.get(s.lane);if(a==null||s.end>a.end?i.set(s.lane,s):s.end<a.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=Tt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=Tt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,a);for(let c=a;c<n;c++){const p=i(c),g=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),d=g?g.end+this.options.gap:r+o,m=s.get(p),h=typeof m=="number"?m:this.options.estimateSize(c),w=d+h,b=g?g.lane:c%this.options.lanes;u[c]={index:c,start:d,size:h,end:w,key:p,lane:b}}return this.measurementsCache=u,u},{key:Gt.NODE_ENV!=="production",debug:()=>this.options.debug}),this.calculateRange=Tt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,o,i)=>this.range=n.length>0&&r>0?Hu({measurements:n,outerSize:r,scrollOffset:o,lanes:i}):null,{key:Gt.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualIndexes=Tt(()