1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="6a670a28-1c1b-a233-65dd-a72f03447e83")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,672838,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(105419),i=e.i(51603),r=e.i(201183),s=e.i(766383);let l=(0,s.forwardRefWithAs)(function(e,l){var a;let u=(0,r.useDisabled)(),{disabled:c=u||!1,autoFocus:d=!1,...f}=e,{isFocusVisible:p,focusProps:v}=(0,t.useFocusRing)({autoFocus:d}),{isHovered:m,hoverProps:h}=(0,n.useHover)({isDisabled:c}),{pressed:b,pressProps:g}=(0,o.useActivePress)({disabled:c}),y=(0,s.mergeProps)({ref:l,type:null!=(a=f.type)?a:"button",disabled:c||void 0,autoFocus:d},v,h,g),x=(0,i.useSlot)({disabled:c,hover:m,focus:p,active:b,autofocus:d});return(0,s.useRender)()({ourProps:y,theirProps:f,slot:x,defaultTag:"button",name:"Button"})});e.s(["Button",0,l])},982439,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(90008),i=e.i(105419),r=e.i(665621),s=e.i(46210),l=e.i(129997),a=e.i(500674),u=e.i(51603),c=e.i(201183),d=e.i(195569),f=e.i(282684),p=e.i(949406),v=e.i(978699),m=e.i(766383),h=e.i(683791),b=e.i(672773),g=e.i(764118);let y=(0,m.forwardRefWithAs)(function(e,y){let x=(0,o.useId)(),E=(0,f.useProvidedId)(),S=(0,c.useDisabled)(),{id:P=E||`headlessui-checkbox-${x}`,disabled:I=S||!1,autoFocus:w=!1,checked:R,defaultChecked:T,onChange:F,name:O,value:C,form:M,indeterminate:D=!1,tabIndex:k=0,...A}=e,L=(0,s.useDefaultValue)(T),[B,_]=(0,r.useControllable)(R,F,null!=L&&L),H=(0,g.useLabelledBy)(),K=(0,h.useDescribedBy)(),N=(0,l.useDisposables)(),[W,V]=(0,o.useState)(!1),z=(0,a.useEvent)(()=>{V(!0),null==_||_(!B),N.nextFrame(()=>{V(!1)})}),$=(0,a.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),z()}),j=(0,a.useEvent)(e=>{e.key===b.Keys.Space?(e.preventDefault(),z()):e.key===b.Keys.Enter&&(0,v.attemptSubmit)(e.currentTarget)}),G=(0,a.useEvent)(e=>e.preventDefault()),{isFocusVisible:U,focusProps:q}=(0,t.useFocusRing)({autoFocus:w}),{isHovered:Q,hoverProps:Y}=(0,n.useHover)({isDisabled:I}),{pressed:J,pressProps:X}=(0,i.useActivePress)({disabled:I}),Z=(0,m.mergeProps)({ref:y,id:P,role:"checkbox","aria-checked":D?"mixed":B?"true":"false","aria-labelledby":H,"aria-describedby":K,"aria-disabled":!!I||void 0,indeterminate:D?"true":void 0,tabIndex:I?void 0:k,onKeyUp:I?void 0:j,onKeyPress:I?void 0:G,onClick:I?void 0:$},q,Y,X),ee=(0,u.useSlot)({checked:B,disabled:I,hover:Q,focus:U,active:J,indeterminate:D,changing:W,autofocus:w}),et=(0,o.useCallback)(()=>{if(void 0!==L)return null==_?void 0:_(L)},[_,L]),en=(0,m.useRender)();return o.default.createElement(o.default.Fragment,null,null!=O&&o.default.createElement(d.FormFields,{disabled:I,data:{[O]:C||"on"},overrides:{type:"checkbox",checked:B},form:M,onReset:et}),en({ourProps:Z,theirProps:A,slot:ee,defaultTag:"span",name:"Checkbox"}))});e.s(["Checkbox",0,y])},896866,e=>{"use strict";var t=e.i(90008),n=e.i(96895),o=e.i(766383),i=e.i(672838);let r=(0,o.forwardRefWithAs)(function(e,r){let s=(0,n.useClose)();return t.default.createElement(i.Button,{ref:r,...(0,o.mergeProps)({onClick:s},e)})});e.s(["CloseButton",0,r])},848832,e=>{"use strict";let t,n,o,i;var r=e.i(335115),s=e.i(55460),l=e.i(90008),a=e.i(690908);function u(e,t,n){let o,i=n.initialDeps??[];function r(){var r,s,l,a;let u,c;n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(u=Date.now());let d=e();if(!(d.length!==i.length||d.some((e,t)=>i[t]!==e)))return o;if(i=d,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(c=Date.now()),o=t(...d),n.key&&(null==(l=n.debug)?void 0:l.call(n))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,o=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%câ± ${i(t,5)} /${i(e,5)} ms`,` 3 font-size: .6rem; 4 font-weight: bold; 5 color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(a=null==n?void 0:n.onChange)||a.call(n,o),o}return r.updateDeps=e=>{i=e},r}function c(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let d=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},f=e=>e,p=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let e=t;e<=n;e++)o.push(e);return o},v=(e,t)=>
5{let n=e.scrollElement;if(!n)return;let o=e.targetWindow;if(!o)return;let i=e=>{let{width:n,height:o}=e;t({width:Math.round(n),height:Math.round(o)})};if(i(d(n)),!o.ResizeObserver)return()=>{};let r=new o.ResizeObserver(t=>{let o=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(d(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},m={passive:!0},h="u"<typeof window||"onscrollend"in window,b=(e,t)=>{var n,o;let i,r=e.scrollElement;if(!r)return;let s=e.targetWindow;if(!s)return;let l=0,a=e.options.useScrollendEvent&&h?()=>void 0:(n=()=>{t(l,!1)},o=e.options.isScrollingResetDelay,function(...e){s.clearTimeout(i),i=s.setTimeout(()=>n.apply(this,e),o)}),u=n=>()=>{let{horizontal:o,isRtl:i}=e.options;l=o?r.scrollLeft*(i&&-1||1):r.scrollTop,a(),t(l,n)},c=u(!0),d=u(!1);d(),r.addEventListener("scroll",c,m);let f=e.options.useScrollendEvent&&h;return f&&r.addEventListener("scrollend",d,m),()=>{r.removeEventListener("scroll",c),f&&r.removeEventListener("scrollend",d)}},g=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},y=(e,{adjustments:t=0,behavior:n},o)=>{var i,r;null==(r=null==(i=o.scrollElement)?void 0:i.scrollTo)||r.call(i,{[o.options.horizontal?"left":"top"]:e+t,behavior:n})};class x{constructor(e){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 e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:f,rangeExtractor:p,onChange:()=>{},measureElement:g,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,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=u(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,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(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>
5{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,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??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,o=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let r=o.get(t.lane);if(null==r||t.end>r.end?o.set(t.lane,t):t.end<r.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=u(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,n,o,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:i}),{key:!1}),this.getMeasurements=u(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:i},r)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let l=this.measurementsCache.slice(0,s);for(let i=s;i<e;i++){let e=o(i),s=1===this.options.lanes?l[i-1]:this.getFurthestMeasurement(l,i),a=s?s.end+this.options.gap:t+n,u=r.get(e),c="number"==typeof u?u:this.options.estimateSize(i),d=a+c,f=s?s.lane:i%this.options.lanes;l[i]={index:i,start:a,size:c,end:d,key:e,lane:f}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=u(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,o)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){let i=e.length-1;if(e.length<=o)return{startIndex:0,endIndex:i};let r=E(0,i,t=>e[t].start,n),s=r;if(1===o)for(;s<i&&e[s].end<n+t;)s++;else if(o>1){let l=Array(o).fill(0);for(;s<i&&l.some(e=>e<n+t);){let t=e[s];l[t.lane]=t.end,s++}let a=Array(o).fill(n+t);for(;r>=0&&a.some(e=>e>=n);){let t=e[r];a[t.lane]=t.start,r--}r=Math.max(0,r-r%o),s=Math.min(i,s+(o-1-s%o))}return{startIndex:r,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}
5),this.getVirtualIndexes=u(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,o,i)=>null===o||null===i?[]:e({startIndex:o,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),o=this.measurementsCache[n];if(!o)return;let i=o.key,r=this.elementsCache.get(i);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let o=t-(this.itemSizeCache.get(n.key)??n.size);0!==o&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,o,this):"backward"===this.scrollDirection&&n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=u(()=>
5[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let o=0,i=e.length;o<i;o++){let i=t[e[o]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return c(t[E(0,t.length-1,e=>c(t[e]).start,e)])},this.getOffsetForAlignment=(e,t,n=0)=>{let o=this.getSize(),i=this.getScrollOffset();return"auto"===t&&(t=e>=i+o?"end":"start"),"center"===t?e+=(n-o)/2:"end"===t&&(e-=o),Math.max(Math.min(this.getTotalSize()-o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let o=this.getSize(),i=this.getScrollOffset();if("auto"===t)if(n.end>=i+o-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}let r="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let o=this.getOffsetForIndex(e,t);if(!o)return;let[i,r]=o;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){let t=this.getOffsetForIndex(e,r);if(!t)return;let[o]=t;1>=Math.abs(o-this.getScrollOffset())||this.scrollToIndex(e,{align:r,behavior:n})}else this.scrollToIndex(e,{align:r,behavior:n})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
5stments:void 0,behavior:t})},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),o=n.length-1;for(;o>=0&&e.some(e=>null===e);){let t=n[o];null===e[t.lane]&&(e[t.lane]=t.end),o--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}let E=(e,t,n,o)=>{for(;e<=t;){let i=(e+t)/2|0,r=n(i);if(r<o)e=i+1;else{if(!(r>o))return i;t=i-1}}return e>0?e-1:0},S="u">typeof document?l.useLayoutEffect:l.useEffect;var P=e.i(105419),I=e.i(392231),w=e.i(665621),R=e.i(46210),T=e.i(129997),F=e.i(29023),O=e.i(500674),C=e.i(904277),M=e.i(536827),D=e.i(601483),k=e.i(489027),A=e.i(145516),L=e.i(466606),B=e.i(44873),_=e.i(637683),H=e.i(742231),K=e.i(809858),N=e.i(678374);function W(e){let t=(0,l.useRef)({value:"",selectionStart:null,selectionEnd:null});return(0,N.useEventListener)(e,"blur",e=>{let n=e.target;H.isHTMLInputElement(n)&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})}),(0,O.useEvent)(()=>{if(!(0,K.isActiveElement)(e)&&H.isHTMLInputElement(e)&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:o}=t.current;null!==n&&null!==o&&e.setSelectionRange(n,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}var V=e.i(97271),z=e.i(5738),$=e.i(51603),j=e.i(426466),G=e.i(195658),U=e.i(991306),q=e.i(296495),Q=e.i(954346),Y=e.i(201183),J=e.i(427638),X=e.i(195569),Z=e.i(533278),ee=e.i(282684),et=e.i(381489),en=e.i(135057),eo=e.i(325475),ei=e.i(414476),er=e.i(855828),es=e.i(932660),el=e.i(338789),ea=e.i(925682),eu=e.i(766383),ec=e.i(683791),ed=e.i(672773),ef=e.i(764118),ep=e.i(857617),ev=e.i(939801),em=e.i(318273),eh=e.i(6410),eb=e.i(267679),eg=Object.defineProperty,ey=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?eg(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},ex=((t=ex||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),eE=((n=eE||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),eS=((o=eS||{})[o.Pointer=0]="Pointer",o[o.Focus=1]="Focus",o[o.Other=2]="Other",o),eP=((i=eP||{})[i.OpenCombobox=0]="OpenCombobox",i[i.CloseCombobox=1]="CloseCombobox",i[i.GoToOption=2]="GoToOption",i[i.SetTyping=3]="SetTyping",i[i.RegisterOption=4]="RegisterOption",i[i.UnregisterOption=5]="UnregisterOption",i[i.DefaultToFirstOption=6]="DefaultToFirstOption",i[i.SetActivationTrigger=7]="SetActivationTrigger",i[i.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",i[i.SetInputElement=9]="SetInputElement",i[i.SetButtonElement=10]="SetButtonElement",i[i.SetOptionsElement=11]="SetOptionsElement",i[i.MarkInputAsMoved=12]="MarkInputAsMoved",i);function eI(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),i=o.length>0&&null!==o[0].dataRef.current.order?o.sort((e,t)=>e.dataRef.current.order-t.dataRef.current.order):(0,eb.sortByDomNode)(o,e=>e.dataRef.current.domRef.current),r=n?i.indexOf(n):null;return -1===r&&(r=null),{options:i,activeOptionIndex:r}}let ew={1(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState)return e;let n=e.inputElement?eh.ElementPositionState.Tracked((0,eh.computeVisualPosition)(e.inputElement)):e.inputPositionState;return{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,inputPositionState:n,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1,inputPositionState:eh.ElementPositionState.Idle}}return{...e,comboboxState:0,inputPositionState:eh.ElementPositionState.Idle,__demoMode:!1}},3:(e,t)=>
5e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,o,i,r;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&!(null!=(o=e.dataRef.current)&&o.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:o}=e.virtual,r=t.focus===er.Focus.Specific?t.idx:(0,er.calculateActiveIndex)(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,i;return null!=(i=null!=(t=e.activeOptionIndex)?t:n.findIndex(e=>!o(e)))?i:null},resolveDisabled:o,resolveId(){throw Error("Function not implemented.")}}),s=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===r&&e.activationTrigger===s?e:{...e,activeOptionIndex:r,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=eI(e);if(null===s.activeOptionIndex){let e=s.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(s.activeOptionIndex=e)}let l=t.focus===er.Focus.Specific?t.idx:(0,er.calculateActiveIndex)(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),a=null!=(r=t.trigger)?r:2;return e.activeOptionIndex===l&&e.activationTrigger===a?e:{...e,...s,isTyping:!1,activeOptionIndex:l,activationTrigger:a,__demoMode:!1}},4:(e,t)=>{var n,o,i,r;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let s=t.payload,l=eI(e,e=>(e.push(s),e));null===e.activeOptionIndex&&null!=(i=(o=e.dataRef.current).isSelected)&&i.call(o,t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(s));let a={...e,...l,activationTrigger:2};return null!=(r=e.dataRef.current)&&r.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter(e=>e.id!==t.id)};let o=eI(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...o,activationTrigger:2}},6:(e,t)=>e.defaultToFirstOption===t.value?e:{...e,defaultToFirstOption:t.value},7:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},8:(e,t)=>
5{var n,o;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let i=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);i=-1!==n?n:null}return{...e,activeOptionIndex:i,virtual:{options:t.options,disabled:null!=(o=t.disabled)?o:()=>!1}}},9:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},10:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},11:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},12:e=>"Tracked"!==e.inputPositionState.kind?e:{...e,inputPositionState:eh.ElementPositionState.Moved}};class eR extends em.Machine{constructor(e){super(e),ey(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:o,value:i}=this.state.dataRef.current;return(0,el.match)(o,{0:()=>null==t?void 0:t(e),1:()=>{let o=i.slice(),r=o.findIndex(t=>n(t,e));return -1===r?o.push(e):o.splice(r,1),null==t?void 0:t(o)}})},registerOption:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),null==(t=(e=this.state.dataRef.current).onClose)||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(null!==e){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:er.Focus.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),ey(this,"selectors",{activeDescendantId:e=>{var t,n;let o=this.selectors.activeOptionIndex(e);if(null!==o)return e.virtual?null==(n=e.options.find(t=>!t.dataRef.current.disabled&&e.dataRef.current.compare(t.dataRef.current.value,e.virtual.options[o])))?void 0:n.id:null==(t=e.options[o])?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&null===e.activeOptionIndex&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:t,disabled:n}=e.virtual,o=t.findIndex(e=>{var t;return!(null!=(t=null==n?void 0:n(e))&&t)});if(-1!==o)return o}let t=e.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==t)return t}return e.activeOptionIndex},activeOption:e=>{var t,n;let o=this.selectors.activeOptionIndex(e);return null===o?null:e.virtual?e.virtual.options[null!=o?o:0]:null!=(n=null==(t=e.options[o])?void 0:t.dataRef.current.value)?n:null},isActive:(e,t,n)=>{var o;let i=this.selectors.activeOptionIndex(e);return null!==i&&(e.virtual?i===e.dataRef.current.calculateIndex(t):(null==(o=e.options[i])?void 0:o.id)===n)},shouldScrollIntoView:(e,t,n)=>!(e.virtual||e.__demoMode||0!==e.comboboxState||0===e.activationTrigger||!this.selectors.isActive(e,t,n)),didInputMove:e=>"Moved"===e.inputPositionState.kind});{let e=this.state.id,t=en.stackMachines.get(null);this.disposables.add(t.on(en.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.comboboxState||this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.inputElement&&(e.dispose(),e.add((0,eh.detectMovement)(t.inputElement,t.inputPositionState,()=>{this.send({type:12})})))})})}static new({id:e,virtual:t=null,__demoMode:n=!1}){var o;return new eR({id:e,dataRef:{current:{}},comboboxState:+!n,isTyping:!1,options:[],virtual:t?{options:t.options,disabled:null!=(o=t.disabled)?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:n,inputPositionState:eh.ElementPositionState.Idle})}reduce(e,t){return(0,el.match)(t.type,ew,e,t)}}var eT=e.i(746723);let eF=(0,l.createContext)(null);function eO(e){let t=(0,l.useContext)(eF);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eC),t}return t}function eC({id:e,virtual:t=null,__demoMode:n=!1}){let o=(0,l.useMemo)(()=>eR.new({id:e,virtual:t,__demoMode:n}),[]);return(0,eT.useOnUnmount)(()=>o.dispose()),o}let eM=(0,l.createContext)(null);function eD(e){let t=(0,l.useContext)(eM);if(null===t){let t=Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,eD),t}return t}eM.displayName="ComboboxDataContext";let ek=(0,l.createContext)(null);function eA(e){let t=eO("VirtualProvider"),{options:n}=eD("VirtualProvider").virtual,o=(0,eo.useSlice)(t,e=>e.optionsElement),[i,r]=(0,l.useMemo)(()=>
5{if(!o)return[0,0];let e=window.getComputedStyle(o);return[parseFloat(e.paddingBlockStart||e.paddingTop),parseFloat(e.paddingBlockEnd||e.paddingBottom)]},[o]),s=function(e){let t=l.useReducer(()=>({}),{})[1],n={...e,onChange:(n,o)=>{var i;o?(0,a.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[o]=l.useState(()=>new x(n));return o.setOptions(n),S(()=>o._didMount(),[]),S(()=>o._willUpdate()),o}({observeElementRect:v,observeElementOffset:b,scrollToFn:y,...{enabled:0!==n.length,scrollPaddingStart:i,scrollPaddingEnd:r,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.state.optionsElement,overscan:12}}),[u,c]=(0,l.useState)(0);(0,D.useIsoMorphicEffect)(()=>{c(e=>e+1)},[n]);let d=s.getVirtualItems(),f=(0,eo.useSlice)(t,e=>e.activationTrigger===eS.Pointer),p=(0,eo.useSlice)(t,t.selectors.activeOptionIndex);return 0===d.length?null:l.default.createElement(ek.Provider,{value:s},l.default.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&(f||null!==p&&n.length>p&&s.scrollToIndex(p))}},d.map(t=>{var o;return l.default.createElement(l.Fragment,{key:t.key},l.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${u}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))})))}let eL=l.Fragment,eB=eu.RenderFeatures.RenderStrategy|eu.RenderFeatures.Static,e_=(0,eu.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),o=(0,Y.useDisabled)(),{value:i,defaultValue:r,onChange:s,form:a,name:u,by:c,invalid:d=!1,disabled:f=o||!1,onClose:p,__demoMode:v=!1,multiple:m=!1,immediate:h=!1,virtual:b=null,nullable:g,...y}=e,x=(0,R.useDefaultValue)(r),[E=m?[]:void 0,S]=(0,w.useControllable)(i,s,x),P=eC({id:n,virtual:b,__demoMode:v}),T=(0,l.useRef)({static:!1,hold:!1}),F=(0,I.useByComparator)(c),C=(0,O.useEvent)(e=>b?null===c?b.options.indexOf(e):b.options.findIndex(t=>F(t,e)):P.state.options.findIndex(t=>F(t.dataRef.current.value,e))),M=(0,l.useCallback)(e=>(0,el.match)(B.mode,{[eE.Multi]:()=>E.some(t=>F(t,e)),[eE.Single]:()=>F(E,e)}),[E]),k=(0,eo.useSlice)(P,e=>e.virtual),A=(0,O.useEvent)(()=>null==p?void 0:p()),B=(0,l.useMemo)(()=>({__demoMode:v,immediate:h,optionsPropsRef:T,value:E,defaultValue:x,disabled:f,invalid:d,mode:m?eE.Multi:eE.Single,virtual:b?k:null,onChange:S,isSelected:M,calculateIndex:C,compare:F,onClose:A}),[v,h,T,E,x,f,d,m,b,k,S,M,C,F,A]);(0,D.useIsoMorphicEffect)(()=>{var e;b&&P.send({type:eP.UpdateVirtualConfiguration,options:b.options,disabled:null!=(e=b.disabled)?e:null})},[b,null==b?void 0:b.options,null==b?void 0:b.disabled]),(0,D.useIsoMorphicEffect)(()=>{P.state.dataRef.current=B},[B]);let[_,H,K,N]=(0,eo.useSlice)(P,e=>[e.comboboxState,e.buttonElement,e.inputElement,e.optionsElement]),W=en.stackMachines.get(null),V=(0,eo.useSlice)(W,(0,l.useCallback)(e=>W.selectors.isTop(e,n),[W,n]));(0,L.useOutsideClick)(V,[H,K,N],()=>P.actions.closeCombobox());let z=(0,eo.useSlice)(P,P.selectors.activeOptionIndex),j=(0,eo.useSlice)(P,P.selectors.activeOption),G=(0,$.useSlot)({open:_===ex.Open,disabled:f,invalid:d,activeIndex:z,activeOption:j,value:E}),[U,q]=(0,ef.useLabels)(),Q=(0,l.useCallback)(()=>{if(void 0!==x)return null==S?void 0:S(x)},[S,x]),Z=(0,eu.useRender)();return l.default.createElement(q,{value:U,props:{htmlFor:null==K?void 0:K.id},slot:{open:_===ex.Open,disabled:f}},l.default.createElement(J.FloatingProvider,null,l.default.createElement(eM.Provider,{value:B},l.default.createElement(eF.Provider,{value:P},l.default.createElement(et.OpenClosedProvider,{value:(0,el.match)(_,{[ex.Open]:et.State.Open,[ex.Closed]:et.State.Closed})},null!=u&&l.default.createElement(X.FormFields,{disabled:f,data:null!=E?{[u]:E}:{},form:a,onReset:Q}),Z({ourProps:null===t?{}:{ref:t},theirProps:y,slot:G,defaultTag:eL,name:"Combobox"}))))))}),eH=(0,eu.forwardRefWithAs)(function(e,t){let n=eO("Combobox.Button"),o=eD("Combobox.Button"),[i,u]=(0,l.useState)(null),c=(0,j.useSyncRefs)(t,u,n.actions.setButtonElement),d=(0,l.useId)(),{id:f=`headlessui-combobox-button-${d}`,disabled:p=o.disabled||!1,autoFocus:v=!1,...m}=e,[h,b,g]=(0,eo.useSlice)(n,e=>[e.comboboxState,e.inputElement,e.optionsElement]),y=W(b),x=h===ex.Open;(0,_.useQuickRelease)(x,{trigger:i,action:(0,l.useCallback)(e=>{if(null!=i&&i.contains(e.target)||null!=b&&b.contains(e.target))return _.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return H.isHTMLElement(t)?_.Action.Select(t):null!=g&&g.contains(e.target)?_.Action.Ignore:_.Action.Close},[i,b,g]),close:n.actions.closeCombobox,select:n.actions.selectActiveOption});let E=(0,O.useEvent)(e=>{switch(e.key){case ed.Keys.Space:case ed.Keys.Enter:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===ex.Closed&&(0,a.flushSync)(()=>n.actions.openCombobox()),y();return;case ed.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===ex.Closed&&((0,a.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:er.Focus.First})),y();return;case ed.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),n.state.comboboxState===ex.Closed&&((0,a.flushSync)(()=>n.actions.openCombobox()),n.state.dataRef.current.value||n.actions.goToOption({focus:er.Focus.Last})),y();return;case ed.Keys.Escape:if(n.state.comboboxState!==ex.Open)return;e.preventDefault(),n.state.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,a.flushSync)(()=>n.actions.closeCombobox()),y();return;default:return}}),S=(0,C.useHandleToggle)(()=>{n.state.comboboxState===ex.Open?n.actions.closeCombobox():n.actions.openCombobox(),y()}),I=(0,ef.useLabelledBy)([f]),{isFocusVisible:w,focusProps:R}=(0,r.useFocusRing)({autoFocus:v}),{isHovered:T,hoverProps:F}=(0,s.useHover)({isDisabled:p}),{pressed:M,pressProps:D}=(0,P.useActivePress)({disabled:p}),k=(0,$.useSlot)({open:h===ex.Open,active:M||h===ex.Open,disabled:p,invalid:o.invalid,value:o.value,hover:T,focus:w}),A=(0,eu.mergeProps)({ref:c,id:f,type:(0,V.useResolveButtonType)(e,i),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==g?void 0:g.id,"aria-expanded":h===ex.Open,"aria-labelledby":I,disabled:p||void 0,autoFocus:v,onKeyDown:E},S,R,F,D);return(0,eu.useRender)()({ourProps:A,theirProps:m,slot:k,defaultTag:"button",name:"Combobox.Button"})}),eK=(0,eu.forwardRefWithAs)(function(e,t){var n,o;let i=eO("Combobox.Input"),u=eD("Combobox.Input"),c=(0,l.useId)(),d=(0,ee.useProvidedId)(),{id:f=d||`headlessui-combobox-input-${c}
5`,onChange:p,displayValue:v,disabled:m=u.disabled||!1,autoFocus:h=!1,type:b="text",...g}=e,y=(0,l.useRef)(null),x=(0,j.useSyncRefs)(y,t,(0,J.useFloatingReference)(),i.actions.setInputElement),[E,S]=(0,eo.useSlice)(i,e=>[e.comboboxState,e.isTyping]),P=(0,T.useDisposables)(),I=(0,O.useEvent)(()=>{i.actions.onChange(null),i.state.optionsElement&&(i.state.optionsElement.scrollTop=0),i.actions.goToOption({focus:er.Focus.Nothing})}),w=(0,l.useMemo)(()=>{var e;return"function"==typeof v&&void 0!==u.value?null!=(e=v(u.value))?e:"":"string"==typeof u.value?u.value:""},[u.value,v]);(0,Q.useWatch)(([e,t],[n,o])=>{if(i.state.isTyping)return;let r=y.current;r&&((o===ex.Open&&t===ex.Closed||e!==n)&&(r.value=e),requestAnimationFrame(()=>{if(i.state.isTyping||!r||(0,K.isActiveElement)(r))return;let{selectionStart:e,selectionEnd:t}=r;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&r.setSelectionRange(r.value.length,r.value.length)}))},[w,E,S]),(0,Q.useWatch)(([e],[t])=>{if(e===ex.Open&&t===ex.Closed){if(i.state.isTyping)return;let e=y.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:o,selectionDirection:r}=e;e.value="",e.value=t,null!==r?e.setSelectionRange(n,o,r):e.setSelectionRange(n,o)}},[E]);let R=(0,l.useRef)(!1),F=(0,O.useEvent)(()=>{R.current=!0}),C=(0,O.useEvent)(()=>{P.nextFrame(()=>{R.current=!1})}),M=(0,O.useEvent)(e=>{switch(i.actions.setIsTyping(!0),e.key){case ed.Keys.Enter:if(i.state.comboboxState!==ex.Open||R.current)return;if(e.preventDefault(),e.stopPropagation(),null===i.selectors.activeOptionIndex(i.state))return void i.actions.closeCombobox();i.actions.selectActiveOption(),u.mode===eE.Single&&i.actions.closeCombobox();break;case ed.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),(0,el.match)(i.state.comboboxState,{[ex.Open]:()=>i.actions.goToOption({focus:er.Focus.Next}),[ex.Closed]:()=>i.actions.openCombobox()});case ed.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),(0,el.match)(i.state.comboboxState,{[ex.Open]:()=>i.actions.goToOption({focus:er.Focus.Previous}),[ex.Closed]:()=>{(0,a.flushSync)(()=>i.actions.openCombobox()),u.value||i.actions.goToOption({focus:er.Focus.Last})}});case ed.Keys.Home:if(i.state.comboboxState===ex.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:er.Focus.First});case ed.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:er.Focus.First});case ed.Keys.End:if(i.state.comboboxState===ex.Closed||e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:er.Focus.Last});case ed.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),i.actions.goToOption({focus:er.Focus.Last});case ed.Keys.Escape:return i.state.comboboxState!==ex.Open?void 0:(e.preventDefault(),i.state.optionsElement&&!u.optionsPropsRef.current.static&&e.stopPropagation(),u.mode===eE.Single&&null===u.value&&I(),i.actions.closeCombobox());case ed.Keys.Tab:if(i.actions.setIsTyping(!1),i.state.comboboxState!==ex.Open)return;u.mode===eE.Single&&i.state.activationTrigger!==eS.Focus&&i.actions.selectActiveOption(),i.actions.closeCombobox()}}),D=(0,O.useEvent)(e=>{null==p||p(e),u.mode===eE.Single&&""===e.target.value&&I(),i.actions.openCombobox()}),k=(0,O.useEvent)(e=>{var t,n,o;let r=null!=(t=e.relatedTarget)?t:ei.history.find(t=>t!==e.currentTarget);if(!(null!=(n=i.state.optionsElement)&&n.contains(r))&&!(null!=(o=i.state.buttonElement)&&o.contains(r))&&i.state.comboboxState===ex.Open)return e.preventDefault(),u.mode===eE.Single&&null===u.value&&I(),i.actions.closeCombobox()}),A=(0,O.useEvent)(e=>{var t,n,o;let r=null!=(t=e.relatedTarget)?t:ei.history.find(t=>t!==e.currentTarget);null!=(n=i.state.buttonElement)&&n.contains(r)||null!=(o=i.state.optionsElement)&&o.contains(r)||u.disabled||u.immediate&&i.state.comboboxState!==ex.Open&&P.microTask(()=>{(0,a.flushSync)(()=>i.actions.openCombobox()),i.actions.setActivationTrigger(eS.Focus)})}),L=(0,ef.useLabelledBy)(),B=(0,ec.useDescribedBy)(),{isFocused:_,focusProps:H}=(0,r.useFocusRing)({autoFocus:h}),{isHovered:N,hoverProps:W}=(0,s.useHover)({isDisabled:m}),V=(0,eo.useSlice)(i,e=>e.optionsElement),z=(0,$.useSlot)({open:E===ex.Open,disabled:m,invalid:u.invalid,hover:N,focus:_,autofocus:h}),G=(0,eu.mergeProps)({ref:x,id:f,role:"combobox",type:b,"aria-controls":null==V?void 0:V.id,"aria-expanded":E===ex.Open,"aria-activedescendant":(0,eo.useSlice)(i,i.selectors.activeDescendantId),"aria-labelledby":L,"aria-describedby":B,"aria-autocomplete":"list",defaultValue:null!=(o=null!=(n=e.defaultValue)?n:void 0!==u.defaultValue?null==v?void 0:v(u.defaultValue):null)?o:u.defaultValue,disabled:m||void 0,autoFocus:h,onCompositionStart:F,onCompositionEnd:C,onKeyDown:M,onChange:D,onFocus:A,onBlur:k},H,W);return(0,eu.useRender)()({ourProps:G,theirProps:g,slot:z,defaultTag:"input",name:"Combobox.Input"})}),eN=ef.Label,eW=(0,eu.forwardRefWithAs)(function(e,t){var n,o,i;let r=(0,l.useId)(),{id:s=`headlessui-combobox-options-${r}`,hold:a=!1,anchor:u,portal:c=!1,modal:d=!0,transition:f=!1,...p}=e,v=eO("Combobox.Options"),m=eD("Combobox.Options"),h=(0,J.useResolvedAnchor)(u);h&&(c=!0);let[b,g]=(0,J.useFloatingPanel)(h),[y,x]=(0,l.useState)(null),E=(0,J.useFloatingPanelProps)(),S=(0,j.use
5SyncRefs)(t,h?b:null,v.actions.setOptionsElement,x),[P,I,w,R,T]=(0,eo.useSlice)(v,e=>[e.comboboxState,e.inputElement,e.buttonElement,e.optionsElement,e.activationTrigger]),C=(0,B.useOwnerDocument)(I||w),k=(0,B.useOwnerDocument)(R),L=(0,et.useOpenClosed)(),[_,H]=(0,U.useTransition)(f,y,null!==L?(L&et.State.Open)===et.State.Open:P===ex.Open);(0,A.useOnDisappear)(_,I,v.actions.closeCombobox);let K=!m.__demoMode&&d&&P===ex.Open;(0,z.useScrollLock)(K,k);let N=!m.__demoMode&&d&&P===ex.Open;(0,M.useInertOthers)(N,{allowed:(0,l.useCallback)(()=>[I,w,R],[I,w,R])});let W=!(0,eo.useSlice)(v,v.selectors.didInputMove)&&_;(0,D.useIsoMorphicEffect)(()=>{var t;m.optionsPropsRef.current.static=null!=(t=e.static)&&t},[m.optionsPropsRef,e.static]),(0,D.useIsoMorphicEffect)(()=>{m.optionsPropsRef.current.hold=a},[m.optionsPropsRef,a]),(0,q.useTreeWalker)(P===ex.Open,{container:R,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let V=(0,ef.useLabelledBy)([null==w?void 0:w.id]),G=(0,$.useSlot)({open:P===ex.Open,option:void 0}),Q=(0,O.useEvent)(()=>{v.actions.setActivationTrigger(eS.Pointer)}),Y=(0,O.useEvent)(e=>{e.preventDefault(),v.actions.setActivationTrigger(eS.Pointer)}),X=(0,eu.mergeProps)(h?E():{},{"aria-labelledby":V,role:"listbox","aria-multiselectable":m.mode===eE.Multi||void 0,id:s,ref:S,style:{...p.style,...g,"--input-width":(0,F.useElementSize)(_,I,!0).width,"--button-width":(0,F.useElementSize)(_,w,!0).width},onWheel:T===eS.Pointer?void 0:Q,onMouseDown:Y,...(0,U.transitionDataAttributes)(H)}),ee=_&&P===ex.Closed&&!e.static,en=(0,Z.useFrozenData)(ee,null==(n=m.virtual)?void 0:n.options),ei=(0,Z.useFrozenData)(ee,m.value),er=(0,l.useCallback)(e=>m.compare(ei,e),[m.compare,ei]),es=(0,l.useMemo)(()=>{if(!m.virtual)return m;if(void 0===en)throw Error("Missing `options` in virtual mode");return en!==m.virtual.options?{...m,virtual:{...m.virtual,options:en}}:m},[m,en,null==(o=m.virtual)?void 0:o.options]);m.virtual&&Object.assign(p,{children:l.default.createElement(eM.Provider,{value:es},l.default.createElement(eA,{slot:G},p.children))});let el=(0,eu.useRender)(),ea=(0,l.useMemo)(()=>m.mode===eE.Multi?m:{...m,isSelected:er},[m,er]);return l.default.createElement(ev.Portal,{enabled:!!c&&(e.static||_),ownerDocument:C},l.default.createElement(eM.Provider,{value:ea},el({ourProps:X,theirProps:{...p,children:l.default.createElement(Z.Frozen,{freeze:ee},"function"==typeof p.children?null==(i=p.children)?void 0:i.call(p,G):p.children)},slot:G,defaultTag:"div",features:eB,visible:W,name:"Combobox.Options"}
5)))}),eV=(0,eu.forwardRefWithAs)(function(e,t){var n,o,i;let r=eD("Combobox.Option"),s=eO("Combobox.Option"),a=(0,l.useId)(),{id:u=`headlessui-combobox-option-${a}`,value:c,disabled:d=null!=(i=null==(o=null==(n=r.virtual)?void 0:n.disabled)?void 0:o.call(n,c))&&i,order:f=null,...p}=e,[v]=(0,eo.useSlice)(s,e=>[e.inputElement]),m=W(v),h=(0,eo.useSlice)(s,(0,l.useCallback)(e=>s.selectors.isActive(e,c,u),[c,u])),b=r.isSelected(c),g=(0,l.useRef)(null),y=(0,k.useLatestValue)({disabled:d,value:c,domRef:g,order:f}),x=(0,l.useContext)(ek),E=(0,j.useSyncRefs)(t,g,x?x.measureElement:null),S=(0,O.useEvent)(()=>{s.actions.setIsTyping(!1),s.actions.onChange(c)});(0,D.useIsoMorphicEffect)(()=>s.actions.registerOption(u,y),[y,u]);let P=(0,eo.useSlice)(s,(0,l.useCallback)(e=>s.selectors.shouldScrollIntoView(e,c,u),[c,u]));(0,D.useIsoMorphicEffect)(()=>{if(P)return(0,es.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=g.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[P,g]);let I=(0,O.useEvent)(e=>{e.preventDefault(),e.button===ep.MouseButton.Left&&(d||(S(),(0,ea.isMobile)()||requestAnimationFrame(()=>m()),r.mode===eE.Single&&s.actions.closeCombobox()))}),w=(0,O.useEvent)(()=>{if(d)return s.actions.goToOption({focus:er.Focus.Nothing});let e=r.calculateIndex(c);s.actions.goToOption({focus:er.Focus.Specific,idx:e})}),R=(0,G.useTrackedPointer)(),T=(0,O.useEvent)(e=>R.update(e)),F=(0,O.useEvent)(e=>{if(!R.wasMoved(e)||d||h&&s.state.activationTrigger===eS.Pointer)return;let t=r.calculateIndex(c);s.actions.goToOption({focus:er.Focus.Specific,idx:t},eS.Pointer)}),C=(0,O.useEvent)(e=>{R.wasMoved(e)&&(d||h&&(r.optionsPropsRef.current.hold||s.state.activationTrigger===eS.Pointer&&s.actions.goToOption({focus:er.Focus.Nothing})))}),M=(0,$.useSlot)({active:h,focus:h,selected:b,disabled:d});return(0,eu.useRender)()({ourProps:{id:u,ref:E,role:"option",tabIndex:!0===d?void 0:-1,"aria-disabled":!0===d||void 0,"aria-selected":b,disabled:void 0,onMouseDown:I,onFocus:w,onPointerEnter:T,onMouseEnter:T,onPointerMove:F,onMouseMove:F,onPointerLeave:C,onMouseLeave:C},theirProps:p,slot:M,defaultTag:"div",name:"Combobox.Option"})}),ez=Object.assign(e_,{Input:eK,Button:eH,Label:eN,Options:eW,Option:eV});e.s(["Combobox",0,ez,"ComboboxButton",0,eH,"ComboboxInput",0,eK,"ComboboxLabel",0,eN,"ComboboxOption",0,eV,"ComboboxOptions",0,eW],848832)},26411,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(90008),i=e.i(105419),r=e.i(51603),s=e.i(766383);let l=o.Fragment,a=(0,s.forwardRefWithAs)(function(e,o){let{...a}=e,{isFocusVisible:u,focusProps:c}=(0,t.useFocusRing)(),{isHovered:d,hoverProps:f}=(0,n.useHover)({isDisabled:!1}),{pressed:p,pressProps:v}=(0,i.useActivePress)({disabled:!1}),m=(0,s.mergeProps)({ref:o},c,f,v),h=(0,r.useSlot)({hover:d,focus:u,active:p});return(0,s.useRender)()({ourProps:m,theirProps:a,slot:h,defaultTag:l,name:"DataInteractive"})});e.s(["DataInteractive",0,a])},872278,e=>{"use strict";let t,n;var o,i=e.i(335115),r=e.i(55460),s=e.i(90008),l=e.i(105419),a=e.i(500674),u=e.i(97271),c=e.i(51603),d=e.i(426466),f=e.i(991306),p=e.i(96895),v=e.i(381489),m=e.i(949406),h=e.i(742231),b=e.i(338789),g=e.i(809858),y=e.i(766383);let x=null!=(o=s.default.startTransition)?o:function(e){e()};var E=e.i(672773),S=((t=S||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),P=((n=P||{})[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.SetButtonElement=4]="SetButtonElement",n[n.SetPanelElement=5]="SetPanelElement",n);let I={0:e=>({...e,disclosureState:(0,b.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},w=(0,s.createContext)(null);function R(e){let t=(0,s.useContext)(w);if(null===t){let t=Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,R),t}return t}w.displayName="DisclosureContext";let T=(0,s.createContext)(null);T.displayName="DisclosureAPIContext";let F=(0,s.createContext)(null);function O(e,t){return(0,b.match)(t.type,I,e,t)}F.displayName="DisclosurePanelContext";let C=s.Fragment,M=y.RenderFeatures.RenderStrategy|y.RenderFeatures.Static,D=(0,y.forwardRefWithAs)(function(e,t){let{defaultOpen:n=!1,...o}=e,i=(0,s.useRef)(null),r=(0,d.useSyncRefs)(t,(0,d.optionalRef)(e=>{i.current=e},void 0===e.as||(0,y.isFragment)(e.as))),l=(0,s.useReducer)(O,{disclosureState:+!n,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:u,buttonId:f},m]=l,x=(0,a.useEvent)(e=>{m({type:1});let t=(0,g.getOwnerDocument)(i.current);if(!t||!f)return;let n=e?h.isHTMLorSVGElement(e)?e:"current"in e&&h.isHTMLorSVGElement(e.current)?e.current:t.getElementById(f):t.getElementById(f);null==n||n.focus()}),E=(0,s.useMemo)(()=>({close:x}),[x]),S=(0,c.useSlot)({open:0===u,close:x}),P=(0,y.useRender)();return s.default.createElement(w.Provider,{value:l},s.default.createElement(T.Provider,{value:E},s.default.createElement(p.CloseProvider,{value:x},s.default.createElement(v.OpenClosedProvider,{value:(0,b.match)(u,{0:v.State.Open,1:v.State.Closed})},P({ourProps:{ref:r},theirProps:o,slot:S,defaultTag:C,name:"Disclosure"})))))}),k=(0,y.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-disclosure-button-${n}`,disabled:f=!1,autoFocus:p=!1,...v}=e,[h,b]=R("Disclosure.Button"),g=(0,s.useContext)(F),x=null!==g&&g===h.panelId,S=(0,s.useRef)(null),P=(0,d.useSyncRefs)(S,t,(0,a.useEvent)(e=>{if(!x)return b({type:4,element:e})}));(0,s.useEffect)(()=>
5{if(!x)return b({type:2,buttonId:o}),()=>{b({type:2,buttonId:null})}},[o,b,x]);let I=(0,a.useEvent)(e=>{var t;if(x){if(1===h.disclosureState)return;switch(e.key){case E.Keys.Space:case E.Keys.Enter:e.preventDefault(),e.stopPropagation(),b({type:0}),null==(t=h.buttonElement)||t.focus()}}else switch(e.key){case E.Keys.Space:case E.Keys.Enter:e.preventDefault(),e.stopPropagation(),b({type:0})}}),w=(0,a.useEvent)(e=>{e.key===E.Keys.Space&&e.preventDefault()}),T=(0,a.useEvent)(e=>{var t;(0,m.isDisabledReactIssue7711)(e.currentTarget)||f||(x?(b({type:0}),null==(t=h.buttonElement)||t.focus()):b({type:0}))}),{isFocusVisible:O,focusProps:C}=(0,i.useFocusRing)({autoFocus:p}),{isHovered:M,hoverProps:D}=(0,r.useHover)({isDisabled:f}),{pressed:k,pressProps:A}=(0,l.useActivePress)({disabled:f}),L=(0,c.useSlot)({open:0===h.disclosureState,hover:M,active:k,disabled:f,focus:O,autofocus:p}),B=(0,u.useResolveButtonType)(e,h.buttonElement),_=x?(0,y.mergeProps)({ref:P,type:B,disabled:f||void 0,autoFocus:p,onKeyDown:I,onClick:T},C,D,A):(0,y.mergeProps)({ref:P,id:o,type:B,"aria-expanded":0===h.disclosureState,"aria-controls":h.panelElement?h.panelId:void 0,disabled:f||void 0,autoFocus:p,onKeyDown:I,onKeyUp:w,onClick:T},C,D,A);return(0,y.useRender)()({ourProps:_,theirProps:v,slot:L,defaultTag:"button",name:"Disclosure.Button"})}),A=(0,y.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-disclosure-panel-${n}`,transition:i=!1,...r}=e,[l,u]=R("Disclosure.Panel"),{close:p}=function e(t){let n=(0,s.useContext)(T);if(null===n){let n=Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}return n}("Disclosure.Panel"),[m,h]=(0,s.useState)(null),b=(0,d.useSyncRefs)(t,(0,a.useEvent)(e=>{x(()=>u({type:5,element:e}))}),h);(0,s.useEffect)(()=>(u({type:3,panelId:o}),()=>{u({type:3,panelId:null})}),[o,u]);let g=(0,v.useOpenClosed)(),[E,S]=(0,f.useTransition)(i,m,null!==g?(g&v.State.Open)===v.State.Open:0===l.disclosureState),P=(0,c.useSlot)({open:0===l.disclosureState,close:p}),I={ref:b,id:o,...(0,f.transitionDataAttributes)(S)},w=(0,y.useRender)();return s.default.createElement(v.ResetOpenClosedProvider,null,s.default.createElement(F.Provider,{value:l.panelId},w({ourProps:I,theirProps:r,slot:P,defaultTag:"div",features:M,visible:E,name:"Disclosure.Panel"})))}),L=Object.assign(D,{Button:k,Panel:A});e.s(["Disclosure",0,L,"DisclosureButton",0,k,"DisclosurePanel",0,A],872278)},184195,e=>{"use strict";var t=e.i(90008),n=e.i(51603),o=e.i(201183),i=e.i(195569),r=e.i(282684),s=e.i(766383),l=e.i(683791),a=e.i(764118);let u=(0,s.forwardRefWithAs)(function(e,u){let c=`headlessui-control-${(0,t.useId)()}`,[d,f]=(0,a.useLabels)(),[p,v]=(0,l.useDescriptions)(),m=(0,o.useDisabled)(),{disabled:h=m||!1,...b}=e,g=(0,n.useSlot)({disabled:h}),y=(0,s.useRender)();return t.default.createElement(o.DisabledProvider,{value:h},t.default.createElement(f,{value:d},t.default.createElement(v,{value:p},t.default.createElement(r.IdProvider,{id:c},y({ourProps:{ref:u,disabled:h||void 0,"aria-disabled":h||void 0},theirProps:{...b,children:t.default.createElement(i.FormFieldsProvider,null,"function"==typeof b.children?b.children(g):b.children)},slot:g,defaultTag:"div",name:"Field"})))))});e.s(["Field",0,u])},929147,e=>{"use strict";var t=e.i(90008),n=e.i(742231),o=e.i(51603),i=e.i(426466),r=e.i(201183),s=e.i(766383),l=e.i(764118);let a="fieldset",u=(0,s.forwardRefWithAs)(function(e,u){var c;let d=(0,r.useDisabled)(),{disabled:f=d||!1,...p}=e,[v,m]=function(e){let o="string"==typeof e?e:void 0,[i,r]=(0,t.useState)(o);return[null!=o?o:i,(0,t.useCallback)(e=>{o||n.isHTMLElement(e)&&r(e.tagName.toLowerCase())},[o])]}(null!=(c=e.as)?c:a),h=(0,i.useSyncRefs)(u,m),[b,g]=(0,l.useLabels)(),y=(0,o.useSlot)({disabled:f}),x="fieldset"===v?{ref:h,"aria-labelledby":b,disabled:f||void 0}:{ref:h,role:"group","aria-labelledby":b,"aria-disabled":f||void 0},E=(0,s.useRender)();return t.default.createElement(r.DisabledProvider,{value:f},t.default.createElement(g,null,E({ourProps:x,theirProps:p,slot:y,defaultTag:a,name:"Fieldset"})))});e.s(["Fieldset",0,u],929147)},993823,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(90008),i=e.i(51603),r=e.i(201183),s=e.i(282684),l=e.i(766383),a=e.i(683791),u=e.i(764118);let c=(0,l.forwardRefWithAs)(function(e,c){let d=(0,o.useId)(),f=(0,s.useProvidedId)(),p=(0,r.useDisabled)(),{id:v=f||`headlessui-input-${d}`,disabled:m=p||!1,autoFocus:h=!1,invalid:b=!1,...g}=e,y=(0,u.useLabelledBy)(),x=(0,a.useDescribedBy)(),{isFocused:E,focusProps:S}=(0,t.useFocusRing)({autoFocus:h}),{isHovered:P,hoverProps:I}=(0,n.useHover)({isDisabled:m}),w=(0,l.mergeProps)({ref:c,id:v,"aria-labelledby":y,"aria-describedby":x,"aria-invalid":b?"true":void 0,disabled:m||void 0,autoFocus:h},S,I),R=(0,i.useSlot)({disabled:m,invalid:b,hover:P,focus:E,autofocus:h});return(0,l.useRender)()({ourProps:w,theirProps:g,slot:R,defaultTag:"input",name:"Input"})});e.s(["Input",0,c])},586265,e=>{"use strict";var t=e.i(90008),n=e.i(766383),o=e.i(764118);o.Label;let i=(0,n.forwardRefWithAs)(function(e,n){return t.default.createElement(o.Label,{as:"div",ref:n,...e})});e.s(["Legend",0,i])},159277,e=>{"use strict";let t,n,o,i;var r=e.i(335115),s=e.i(55460),l=e.i(90008),a=e.i(690908),u=e.i(105419),c=e.i(392231),d=e.i(665621),f=e.i(46210),p=e.i(129997),v=e.i(29023),m=e.i(500674),h=e.i(904277),b=e.i(536827),g=e.i(601483),y=e.i(489027),x=e.i(145516),E=e.i(466606),S=e.i(44873),P=e.i(637683),I=e.i(97271),w=e.i(5738),R=e.i(51603),T=e.i(426466),F=e.i(435841),O=e.i(195658),C=e.i(991306),M=e.i(201183),D=e.i(427638),k=e.i(195569),A=e.i(533278),L=e.i(282684),B=e.i(381489),_=e.i(135057),H=e.i(325475),K=e.i(855828),N=e.i(932660),W=e.i(742231),V=e.i(267679),z=e.i(978699),$=e.i(338789),j=e.i(809858),G=e.i(766383),U=e.i(683791),q=e.i(672773),Q=e.i(764118),Y=e.i(939801),J=e.i(318273),X=e.i(6410),Z=Object.defineProperty,ee=(e,t,n
5)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?Z(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},et=((t=et||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),en=((n=en||{})[n.Single=0]="Single",n[n.Multi=1]="Multi",n),eo=((o=eo||{})[o.Pointer=0]="Pointer",o[o.Other=1]="Other",o),ei=((i=ei||{})[i.OpenListbox=0]="OpenListbox",i[i.CloseListbox=1]="CloseListbox",i[i.GoToOption=2]="GoToOption",i[i.Search=3]="Search",i[i.ClearSearch=4]="ClearSearch",i[i.SelectOption=5]="SelectOption",i[i.RegisterOptions=6]="RegisterOptions",i[i.UnregisterOptions=7]="UnregisterOptions",i[i.SetButtonElement=8]="SetButtonElement",i[i.SetOptionsElement=9]="SetOptionsElement",i[i.SortOptions=10]="SortOptions",i[i.MarkButtonAsMoved=11]="MarkButtonAsMoved",i);function er(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,o=(0,V.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?o.indexOf(n):null;return -1===i&&(i=null),{options:o,activeOptionIndex:i}}let es={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?X.ElementPositionState.Tracked((0,X.computeVisualPosition)(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:K.Focus.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let n=e.activeOptionIndex,{isSelected:o}=e.dataRef.current,i=e.options.findIndex(e=>o(e.dataRef.current.value));return -1!==i&&(n=i),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:X.ElementPositionState.Idle}},2(e,t){var n,o,i,r,s;if(e.dataRef.current.disabled||1===e.listboxState)return e;let l={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===K.Focus.Nothing)return{...l,activeOptionIndex:null};if(t.focus===K.Focus.Specific)return{...l,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===K.Focus.Previous){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,s=(0,K.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.options[s].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.previousElementSibling)===t.current||(null==(i=t.current)?void 0:i.previousElementSibling)===null)return{...l,activeOptionIndex:s}}}}else if(t.focus===K.Focus.Next){let n=e.activeOptionIndex;if(null!==n){let o=e.options[n].dataRef.current.domRef,i=(0,K.calculateActiveIndex)(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.nextElementSibling)===t.current||(null==(s=t.current)?void 0:s.nextElementSibling)===null)return{...l,activeOptionIndex:i}}}}let a=er(e),u=(0,K.calculateActiveIndex)(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...l,...a,activeOptionIndex:u}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=+(""===e.searchQuery),o=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(o))}),r=i?e.options.indexOf(i):-1;return -1===r||r===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:r,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:e=>0===e.dataRef.current.mode?{...e,frozenValue:!0}:{...e},6:(e,t)=>{let n=e.options.concat(t.options),o=e.activeOptionIndex;if(e.pendingFocus.focus!==K.Focus.Nothing&&(o=(0,K.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),null===e.activeOptionIndex){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(o=e)}}return{...e,options:n,activeOptionIndex:o,pendingFocus:{focus:K.Focus.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,o=[],i=new Set(t.options);for(let[e,t]of n.entries())if(i.has(t.id)&&(o.push(e),i.delete(t.id),0===i.size))break;if(o.length>0)for(let e of(n=n.slice(),o.reverse()))n.splice(e,1);return{...e,options:n,activationTrigger:1}},8:(e,t)=>
5e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...er(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:X.ElementPositionState.Moved}};class el extends J.Machine{constructor(e){super(e),ee(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:o,value:i}=this.state.dataRef.current;return(0,$.match)(o,{0:()=>null==t?void 0:t(e),1:()=>{let o=i.slice(),r=o.findIndex(t=>n(t,e));return -1===r?o.push(e):o.splice(r,1),null==t?void 0:t(o)}})},registerOption:(0,J.batch)(()=>{let e=[],t=new Set;return[(n,o)=>{t.has(o)||(t.add(o),e.push({id:n,dataRef:o}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:(0,J.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:(0,J.batch)(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(null!==this.state.activeOptionIndex){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else 0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(e=this.state.buttonElement)||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),ee(this,"selectors",{activeDescendantId(e){var t;let n=e.activeOptionIndex,o=e.options;return null===n||null==(t=o[n])?void 0:t.id},isActive(e,t){var n;let o=e.activeOptionIndex,i=e.options;return null!==o&&(null==(n=i[o])?void 0:n.id)===t},hasFrozenValue:e=>e.frozenValue,shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=_.stackMachines.get(null);this.disposables.add(t.on(_.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.listboxState||this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add((0,X.detectMovement)(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(n=this.state.buttonElement)||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:t=!1}){return new el({id:e,dataRef:{current:{}},listboxState:+!t,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:K.Focus.Nothing},frozenValue:!1,__demoMode:t,buttonPositionState:X.ElementPositionState.Idle})}reduce(e,t){return(0,$.match)(t.type,es,e,t)}}var ea=e.i(746723);let eu=(0,l.createContext)(null);function ec(e){let t=(0,l.useContext)(eu);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ed),t}return t}function ed({id:e,__demoMode:t=!1}){let n=(0,l.useMemo)(()=>el.new({id:e,__demoMode:t}),[]);return(0,ea.useOnUnmount)(()=>n.dispose()),n}let ef=(0,l.createContext)(null);function ep(e){let t=(0,l.useContext)(ef);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ep),t}return t}ef.displayName="ListboxDataContext";let ev=l.Fragment,em=(0,l.createContext)(!1),eh=G.RenderFeatures.RenderStrategy|G.RenderFeatures.Static,eb=l.Fragment,eg=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),o=(0,M.useDisabled)(),{value:i,defaultValue:r,form:s,name:a,onChange:u,by:p,invalid:v=!1,disabled:m=o||!1,horizontal:h=!1,multiple:b=!1,__demoMode:y=!1,...x}=e,S=(0,T.useSyncRefs)(t),P=(0,f.useDefaultValue)(r),[I=b?[]:void 0,w]=(0,d.useControllable)(i,u,P),F=ed({id:n,__demoMode:y}),O=(0,l.useRef)({static:!1,hold:!1}),C=(0,l.useRef)(new Map),A=(0,c.useByComparator)(p),L=(0,l.useCallback)(e=>(0,$.match)(K.mode,{[en.Multi]:()=>I.some(t=>A(t,e)),[en.Single]:()=>A(I,e)}),[I]),K=(0,R.useSlot)({value:I,disabled:m,invalid:v,mode:b?en.Multi:en.Single,orientation:h?"horizontal":"vertical",onChange:w,compare:A,isSelected:L,optionsPropsRef:O,listRef:C});(0,g.useIsoMorphicEffect)(()=>{F.state.dataRef.current=K},[K]);let N=(0,H.useSlice)(F,e=>e.listboxState),W=_.stackMachines.get(null),z=(0,H.useSlice)(W,(0,l.useCallback)(e=>W.selectors.isTop(e,n),[W,n])),[j,U]=(0,H.useSlice)(F,e=>[e.buttonElement,e.optionsElement]);(0,E.useOutsideClick)(z,[j,U],(e,t)=>{F.send({type:ei.CloseListbox}),(0,V.isFocusableElement)(t,V.FocusableMode.Loose)||(e.preventDefault(),null==j||j.focus())});let q=(0,R.useSlot)({open:N===et.Open,disabled:m,invalid:v,value:I}),[Y,J]=(0,Q.useLabels)({inherit:!0}),X=(0,l.useCallback)(()=>
5{if(void 0!==P)return null==w?void 0:w(P)},[w,P]),Z=(0,G.useRender)();return l.default.createElement(J,{value:Y,props:{htmlFor:null==j?void 0:j.id},slot:{open:N===et.Open,disabled:m}},l.default.createElement(D.FloatingProvider,null,l.default.createElement(eu.Provider,{value:F},l.default.createElement(ef.Provider,{value:K},l.default.createElement(B.OpenClosedProvider,{value:(0,$.match)(N,{[et.Open]:B.State.Open,[et.Closed]:B.State.Closed})},null!=a&&null!=I&&l.default.createElement(k.FormFields,{disabled:m,data:{[a]:I},form:s,onReset:X}),Z({ourProps:{ref:S},theirProps:x,slot:q,defaultTag:ev,name:"Listbox"}))))))}),ey=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),o=(0,L.useProvidedId)(),i=ep("Listbox.Button"),c=ec("Listbox.Button"),{id:d=o||`headlessui-listbox-button-${n}`,disabled:f=i.disabled||!1,autoFocus:p=!1,...v}=e,b=(0,T.useSyncRefs)(t,(0,D.useFloatingReference)(),c.actions.setButtonElement),g=(0,D.useFloatingReferenceProps)(),[y,x,E]=(0,H.useSlice)(c,e=>[e.listboxState,e.buttonElement,e.optionsElement]),S=y===et.Open;(0,P.useQuickRelease)(S,{trigger:x,action:(0,l.useCallback)(e=>{if(null!=x&&x.contains(e.target))return P.Action.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return W.isHTMLElement(t)?P.Action.Select(t):null!=E&&E.contains(e.target)?P.Action.Ignore:P.Action.Close},[x,E]),close:c.actions.closeListbox,select:c.actions.selectActiveOption});let w=(0,m.useEvent)(e=>{switch(e.key){case q.Keys.Enter:(0,z.attemptSubmit)(e.currentTarget);break;case q.Keys.Space:case q.Keys.ArrowDown:e.preventDefault(),c.actions.openListbox({focus:i.value?K.Focus.Nothing:K.Focus.First});break;case q.Keys.ArrowUp:e.preventDefault(),c.actions.openListbox({focus:i.value?K.Focus.Nothing:K.Focus.Last})}}),F=(0,m.useEvent)(e=>{e.key===q.Keys.Space&&e.preventDefault()}),O=(0,h.useHandleToggle)(e=>{var t;c.state.listboxState===et.Open?((0,a.flushSync)(()=>c.actions.closeListbox()),null==(t=c.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c.actions.openListbox({focus:K.Focus.Nothing}))}),C=(0,m.useEvent)(e=>e.preventDefault()),M=(0,Q.useLabelledBy)([d]),k=(0,U.useDescribedBy)(),{isFocusVisible:A,focusProps:B}=(0,r.useFocusRing)({autoFocus:p}),{isHovered:_,hoverProps:N}=(0,s.useHover)({isDisabled:f}),{pressed:V,pressProps:$}=(0,u.useActivePress)({disabled:f}),j=(0,R.useSlot)({open:y===et.Open,active:V||y===et.Open,disabled:f,invalid:i.invalid,value:i.value,hover:_,focus:A,autofocus:p}),Y=(0,H.useSlice)(c,e=>e.listboxState===et.Open),J=(0,G.mergeProps)(g(),{ref:b,id:d,type:(0,I.useResolveButtonType)(e,x),"aria-haspopup":"listbox","aria-controls":null==E?void 0:E.id,"aria-expanded":Y,"aria-labelledby":M,"aria-describedby":k,disabled:f||void 0,autoFocus:p,onKeyDown:w,onKeyUp:F,onKeyPress:C},O,B,N,$);return(0,G.useRender)()({ourProps:J,theirProps:v,slot:j,defaultTag:"button",name:"Listbox.Button"})}),ex=Q.Label,eE=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:o=`headlessui-listbox-options-${n}`,anchor:i,portal:r=!1,modal:s=!0,transition:u=!1,...c}=e,d=(0,D.useResolvedAnchor)(i),[f,h]=(0,l.useState)(null);d&&(r=!0);let g=ep("Listbox.Options"),y=ec("Listbox.Options"),[E,P,I,F]=(0,H.useSlice)(y,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),O=(0,S.useOwnerDocument)(P),M=(0,S.useOwnerDocument)(I),k=(0,B.useOpenClosed)(),[L,_]=(0,C.useTransition)(u,f,null!==k?(k&B.State.Open)===B.State.Open:E===et.Open);(0,x.useOnDisappear)(L,P,y.actions.closeListbox);let N=!F&&s&&E===et.Open;(0,w.useScrollLock)(N,M);let W=!F&&s&&E===et.Open;(0,b.useInertOthers)(W,{allowed:(0,l.useCallback)(()=>[P,I],[P,I])});let z=!(0,H.useSlice)(y,y.selectors.didButtonMove)&&L,U=(0,H.useSlice)(y,y.selectors.hasFrozenValue)&&!e.static,Q=(0,A.useFrozenData)(U,g.value),J=(0,l.useCallback)(e=>g.compare(Q,e),[g.compare,Q]),X=(0,H.useSlice)(y,e=>{var t;if(null==d||!(null!=(t=null==d?void 0:d.to)&&t.includes("selection")))return null;let n=e.options.findIndex(e=>J(e.dataRef.current.value));return -1===n&&(n=0),n}),Z=(()=>
5{if(null==d)return;if(null===X)return{...d,inner:void 0};let e=Array.from(g.listRef.current.values());return{...d,inner:{listRef:{current:e},index:X}}})(),[ee,eo]=(0,D.useFloatingPanel)(Z),ei=(0,D.useFloatingPanelProps)(),er=(0,T.useSyncRefs)(t,d?ee:null,y.actions.setOptionsElement,h),es=(0,p.useDisposables)();(0,l.useEffect)(()=>{I&&E===et.Open&&((0,j.isActiveElement)(I)||null==I||I.focus({preventScroll:!0}))},[E,I]);let el=(0,m.useEvent)(e=>{var t;switch(es.dispose(),e.key){case q.Keys.Space:if(""!==y.state.searchQuery)return e.preventDefault(),e.stopPropagation(),y.actions.search(e.key);case q.Keys.Enter:e.preventDefault(),e.stopPropagation(),y.actions.selectActiveOption();break;case(0,$.match)(g.orientation,{vertical:q.Keys.ArrowDown,horizontal:q.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:K.Focus.Next});case(0,$.match)(g.orientation,{vertical:q.Keys.ArrowUp,horizontal:q.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:K.Focus.Previous});case q.Keys.Home:case q.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:K.Focus.First});case q.Keys.End:case q.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),y.actions.goToOption({focus:K.Focus.Last});case q.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,a.flushSync)(()=>y.actions.closeListbox()),null==(t=y.state.buttonElement)||t.focus({preventScroll:!0});return;case q.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,a.flushSync)(()=>y.actions.closeListbox()),(0,V.focusFrom)(y.state.buttonElement,e.shiftKey?V.Focus.Previous:V.Focus.Next);break;default:1===e.key.length&&(y.actions.search(e.key),es.setTimeout(()=>y.actions.clearSearch(),350))}}),ea=(0,H.useSlice)(y,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),eu=(0,R.useSlot)({open:E===et.Open}),ed=(0,G.mergeProps)(d?ei():{},{id:o,ref:er,"aria-activedescendant":(0,H.useSlice)(y,y.selectors.activeDescendantId),"aria-multiselectable":g.mode===en.Multi||void 0,"aria-labelledby":ea,"aria-orientation":g.orientation,onKeyDown:el,role:"listbox",tabIndex:E===et.Open?0:void 0,style:{...c.style,...eo,"--button-width":(0,v.useElementSize)(L,P,!0).width},...(0,C.transitionDataAttributes)(_)}),ev=(0,G.useRender)(),em=(0,l.useMemo)(()=>g.mode===en.Multi?g:{...g,isSelected:J},[g,J]);return l.default.createElement(Y.Portal,{enabled:!!r&&(e.static||L),ownerDocument:O},l.default.createElement(ef.Provider,{value:em},ev({ourProps:ed,theirProps:c,slot:eu,defaultTag:"div",features:eh,visible:z,name:"Listbox.Options"}
5)))}),eS=(0,G.forwardRefWithAs)(function(e,t){let n=(0,l.useId)(),{id:o=`headlessui-listbox-option-${n}`,disabled:i=!1,value:r,...s}=e,a=!0===(0,l.useContext)(em),u=ep("Listbox.Option"),c=ec("Listbox.Option"),d=(0,H.useSlice)(c,e=>c.selectors.isActive(e,o)),f=u.isSelected(r),p=(0,l.useRef)(null),v=(0,F.useTextValue)(p),h=(0,y.useLatestValue)({disabled:i,value:r,domRef:p,get textValue(){return v()}}),b=(0,T.useSyncRefs)(t,p,e=>{e?u.listRef.current.set(o,e):u.listRef.current.delete(o)}),x=(0,H.useSlice)(c,e=>c.selectors.shouldScrollIntoView(e,o));(0,g.useIsoMorphicEffect)(()=>{if(x)return(0,N.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[x,p]),(0,g.useIsoMorphicEffect)(()=>{if(!a)return c.actions.registerOption(o,h),()=>c.actions.unregisterOption(o)},[h,o,a]);let E=(0,m.useEvent)(e=>{if(i)return e.preventDefault();c.actions.selectOption(r)}),S=(0,m.useEvent)(()=>{if(i)return c.actions.goToOption({focus:K.Focus.Nothing});c.actions.goToOption({focus:K.Focus.Specific,id:o})}),P=(0,O.useTrackedPointer)(),I=(0,m.useEvent)(e=>P.update(e)),w=(0,m.useEvent)(e=>{P.wasMoved(e)&&(i||d&&c.state.activationTrigger===eo.Pointer||c.actions.goToOption({focus:K.Focus.Specific,id:o},eo.Pointer))}),C=(0,m.useEvent)(e=>{P.wasMoved(e)&&(i||d&&c.state.activationTrigger===eo.Pointer&&c.actions.goToOption({focus:K.Focus.Nothing}))}),M=(0,R.useSlot)({active:d,focus:d,selected:f,disabled:i,selectedOption:f&&a}),D=a?{}:{id:o,ref:b,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":f,disabled:void 0,onClick:E,onFocus:S,onPointerEnter:I,onMouseEnter:I,onPointerMove:w,onMouseMove:w,onPointerLeave:C,onMouseLeave:C},k=(0,G.useRender)();return!f&&a?null:k({ourProps:D,theirProps:s,slot:M,defaultTag:"div",name:"Listbox.Option"})}),eP=(0,G.forwardRefWithAs)(function(e,t){let{options:n,placeholder:o,...i}=e,r={ref:(0,T.useSyncRefs)(t)},s=ep("ListboxSelectedOption"),a=(0,R.useSlot)({}),u=void 0===s.value||null===s.value||s.mode===en.Multi&&Array.isArray(s.value)&&0===s.value.length,c=(0,G.useRender)();return l.default.createElement(em.Provider,{value:!0},c({ourProps:r,theirProps:{...i,children:l.default.createElement(l.default.Fragment,null,o&&u?o:n)},slot:a,defaultTag:eb,name:"ListboxSelectedOption"}))}),eI=Object.assign(eg,{Button:ey,Label:ex,Options:eE,Option:eS,SelectedOption:eP});e.s(["Listbox",0,eI,"ListboxButton",0,ey,"ListboxLabel",0,ex,"ListboxOption",0,eS,"ListboxOptions",0,eE,"ListboxSelectedOption",0,eP],159277)},591050,e=>{"use strict";let t,n,o;var i=e.i(335115),r=e.i(55460),s=e.i(90008),l=e.i(690908),a=e.i(105419),u=e.i(129997),c=e.i(29023),d=e.i(500674),f=e.i(904277),p=e.i(536827),v=e.i(601483),m=e.i(145516),h=e.i(466606),b=e.i(44873),g=e.i(637683),y=e.i(97271),x=e.i(5738),E=e.i(51603),S=e.i(426466),P=e.i(435841),I=e.i(195658),w=e.i(991306),R=e.i(296495),T=e.i(427638),F=e.i(381489),O=e.i(135057),C=e.i(325475),M=e.i(855828),D=e.i(932660),k=e.i(742231),A=e.i(267679),L=e.i(338789),B=e.i(809858),_=e.i(766383),H=e.i(683791),K=e.i(672773),N=e.i(764118),W=e.i(939801),V=e.i(318273),z=e.i(6410),$=Object.defineProperty,j=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?$(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},G=((t=G||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),U=((n=U||{})[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n),q=((o=q||{})[o.OpenMenu=0]="OpenMenu",o[o.CloseMenu=1]="CloseMenu",o[o.GoToItem=2]="GoToItem",o[o.Search=3]="Search",o[o.ClearSearch=4]="ClearSearch",o[o.RegisterItems=5]="RegisterItems",o[o.UnregisterItems=6]="UnregisterItems",o[o.SetButtonElement=7]="SetButtonElement",o[o.SetItemsElement=8]="SetItemsElement",o[o.SortItems=9]="SortItems",o[o.MarkButtonAsMoved=10]="MarkButtonAsMoved",o);function Q(e,t=e=>e){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,o=(0,A.sortByDomNode)(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?o.indexOf(n):null;return -1===i&&(i=null),{items:o,activeItemIndex:i}}let Y={1(e){if(1===e.menuState)return e;let t=e.buttonElement?z.ElementPositionState.Tracked((0,z.computeVisualPosition)(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:M.Focus.Nothing},menuState:1,buttonPositionState:t}},0:(e,t)=>0===e.menuState?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:z.ElementPositionState.Idle},2:(e,t)=>{var n,o,i,r,s;if(1===e.menuState)return e;let l={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===M.Focus.Nothing)return{...l,activeItemIndex:null};if(t.focus===M.Focus.Specific)return{...l,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===M.Focus.Previous){let n=e.activeItemIndex;if(null!==n){let r=e.items[n].dataRef.current.domRef,s=(0,M.calculateActiveIndex)(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==s){let t=e.items[s].dataRef.current.domRef;if((null==(o=r.current)?void 0:o.previousElementSibling)===t.current||(null==(i=t.current)?void 0:i.previousElementSibling)===null)return{...l,activeItemIndex:s}}}}else if(t.focus===M.Focus.Next){let n=e.activeItemIndex;if(null!==n){let o=e.items[n].dataRef.current.domRef,i=(0,M.calculateActiveIndex)(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.items[i].dataRef.current.domRef;if((null==(r=o.current)?void 0:r.nextElementSibling)===t.current||(null==(s=t.current)?void 0:s.nextElementSibling)===null)return{...l,activeItemIndex:i}}}}let a=Q(e),u=(0,M.calculateActiveIndex)(t,{resolveItems:()=>a.items,resolveActiveIndex:()=>a.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...l,...a,activeItemIndex:u}},3:(e,t)=>
5{let n=+(""===e.searchQuery),o=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(o))&&!e.dataRef.current.disabled}),r=i?e.items.indexOf(i):-1;return -1===r||r===e.activeItemIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeItemIndex:r,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),o=e.activeItemIndex;return e.pendingFocus.focus!==M.Focus.Nothing&&(o=(0,M.calculateActiveIndex)(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:o,pendingFocus:{focus:M.Focus.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,o=[],i=new Set(t.items);for(let[e,t]of n.entries())if(i.has(t.id)&&(o.push(e),i.delete(t.id),0===i.size))break;if(o.length>0)for(let e of(n=n.slice(),o.reverse()))n.splice(e,1);return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...Q(e),pendingShouldSort:!1}:e,10:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:z.ElementPositionState.Moved}};class J extends V.Machine{constructor(e){super(e),j(this,"actions",{registerItem:(0,V.batch)(()=>{let e=[],t=new Set;return[(n,o)=>{t.has(o)||(t.add(o),e.push({id:n,dataRef:o}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:(0,V.batch)(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),j(this,"selectors",{activeDescendantId(e){var t;let n=e.activeItemIndex,o=e.items;return null===n||null==(t=o[n])?void 0:t.id},isActive(e,t){var n;let o=e.activeItemIndex,i=e.items;return null!==o&&(null==(n=i[o])?void 0:n.id)===t},shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.menuState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=O.stackMachines.get(null);this.disposables.add(t.on(O.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.menuState||this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add((0,z.detectMovement)(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:e,__demoMode:t=!1}){return new J({id:e,__demoMode:t,menuState:+!t,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:M.Focus.Nothing},buttonPositionState:z.ElementPositionState.Idle})}reduce(e,t){return(0,L.match)(t.type,Y,e,t)}}var X=e.i(746723);let Z=(0,s.createContext)(null);function ee(e){let t=(0,s.useContext)(Z);if(null===t){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,et),t}return t}function et({id:e,__demoMode:t=!1}){let n=(0,s.useMemo)(()=>J.new({id:e,__demoMode:t}),[]);return(0,X.useOnUnmount)(()=>n.dispose()),n}let en=s.Fragment,eo=_.RenderFeatures.RenderStrategy|_.RenderFeatures.Static,ei=s.Fragment,er=(0,_.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{__demoMode:o=!1,...i}=e,r=et({id:n,__demoMode:o}),[l,a,u]=(0,C.useSlice)(r,e=>[e.menuState,e.itemsElement,e.buttonElement]),c=(0,S.useSyncRefs)(t),f=O.stackMachines.get(null),p=(0,C.useSlice)(f,(0,s.useCallback)(e=>f.selectors.isTop(e,n),[f,n]));(0,h.useOutsideClick)(p,[u,a],(e,t)=>{var n;r.send({type:q.CloseMenu}),(0,A.isFocusableElement)(t,A.FocusableMode.Loose)||(e.preventDefault(),null==(n=r.state.buttonElement)||n.focus())});let v=(0,d.useEvent)(()=>{r.send({type:q.CloseMenu})}),m=(0,E.useSlot)({open:l===G.Open,close:v}),b=(0,_.useRender)();return s.default.createElement(T.FloatingProvider,null,s.default.createElement(Z.Provider,{value:r},s.default.createElement(F.OpenClosedProvider,{value:(0,L.match)(l,{[G.Open]:F.State.Open,[G.Closed]:F.State.Closed})},b({ourProps:{ref:c},theirProps:i,slot:m,defaultTag:en,name:"Menu"}))))}),es=(0,_.forwardRefWithAs)(function(e,t){let n=ee("Menu.Button"),o=(0,s.useId)(),{id:u=`headlessui-menu-button-${o}`,disabled:c=!1,autoFocus:p=!1,...v}=e,m=(0,s.useRef)(null),h=(0,T.useFloatingReferenceProps)(),b=(0,S.useSyncRefs)(t,m,(0,T.useFloatingReference)(),(0,d.useEvent)(e=>n.send({type:q.SetButtonElement,element:e}))),x=(0,d.useEvent)(e=>{switch(e.key){case K.Keys.Space:case K.Keys.Enter:case K.Keys.ArrowDown:e.preventDefault(),e.stopPropagation(),n.send({type:q.OpenMenu,focus:{focus:M.Focus.First}});break;case K.Keys.ArrowUp:e.preventDefault(),e.stopPropagation(),n.send({type:q.OpenMenu,focus:{focus:M.Focus.Last}})}}),P=(0,d.useEvent)(e=>{e.key===K.Keys.Space&&e.preventDefault()}),[I,w,R]=(0,C.useSlice)(n,e=>[e.menuState,e.buttonElement,e.itemsElement]),F=I===G.Open;(0,g.useQuickRelease)(F,{trigger:w,action:(0,s.useCallback)(e=>{if(null!=w&&w.contains(e.target))return g.Action.Ignore;let t=e.target.closest('[role="menuitem"]:not([data-disabled])');return k.isHTMLElement(t)?g.Action.Select(t):null!=R&&R.contains(e.target)?g.Action.Ignore:g.Action.Close},[w,R]),close:(0,s.useCallback)(()=>n.send({type:q.CloseMenu}),[]),select:(0,s.useCallback)(e=>e.click(),[])});let O=(0,f.useHandleToggle)(e=>{var t;c||(I===G.Open?((0,l.flushSync)(()=>n.send({type:q.CloseMenu}
5)),null==(t=m.current)||t.focus({preventScroll:!0})):(e.preventDefault(),n.send({type:q.OpenMenu,focus:{focus:M.Focus.Nothing},trigger:U.Pointer})))}),{isFocusVisible:D,focusProps:A}=(0,i.useFocusRing)({autoFocus:p}),{isHovered:L,hoverProps:B}=(0,r.useHover)({isDisabled:c}),{pressed:H,pressProps:N}=(0,a.useActivePress)({disabled:c}),W=(0,E.useSlot)({open:I===G.Open,active:H||I===G.Open,disabled:c,hover:L,focus:D,autofocus:p}),V=(0,_.mergeProps)(h(),{ref:b,id:u,type:(0,y.useResolveButtonType)(e,m.current),"aria-haspopup":"menu","aria-controls":null==R?void 0:R.id,"aria-expanded":I===G.Open,disabled:c||void 0,autoFocus:p,onKeyDown:x,onKeyUp:P},O,A,B,N);return(0,_.useRender)()({ourProps:V,theirProps:v,slot:W,defaultTag:"button",name:"Menu.Button"})}),el=(0,_.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-menu-items-${n}`,anchor:i,portal:r=!1,modal:a=!0,transition:f=!1,...v}=e,h=(0,T.useResolvedAnchor)(i),g=ee("Menu.Items"),[y,P]=(0,T.useFloatingPanel)(h),I=(0,T.useFloatingPanelProps)(),[O,D]=(0,s.useState)(null),k=(0,S.useSyncRefs)(t,h?y:null,(0,d.useEvent)(e=>g.send({type:q.SetItemsElement,element:e})),D),[L,H]=(0,C.useSlice)(g,e=>[e.menuState,e.buttonElement]),N=(0,b.useOwnerDocument)(H),V=(0,b.useOwnerDocument)(O);h&&(r=!0);let z=(0,F.useOpenClosed)(),[$,j]=(0,w.useTransition)(f,O,null!==z?(z&F.State.Open)===F.State.Open:L===G.Open);(0,m.useOnDisappear)($,H,()=>{g.send({type:q.CloseMenu})});let U=(0,C.useSlice)(g,e=>e.__demoMode),Q=!U&&a&&L===G.Open;(0,x.useScrollLock)(Q,V);let Y=!U&&a&&L===G.Open;(0,p.useInertOthers)(Y,{allowed:(0,s.useCallback)(()=>[H,O],[H,O])});let J=!(0,C.useSlice)(g,g.selectors.didButtonMove)&&$;(0,s.useEffect)(()=>{O&&L===G.Open&&((0,B.isActiveElement)(O)||O.focus({preventScroll:!0}))},[L,O]),(0,R.useTreeWalker)(L===G.Open,{container:O,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let X=(0,u.useDisposables)(),Z=(0,d.useEvent)(e=>{var t,n,o;switch(X.dispose(),e.key){case K.Keys.Space:if(""!==g.state.searchQuery)return e.preventDefault(),e.stopPropagation(),g.send({type:q.Search,value:e.key});case K.Keys.Enter:if(e.preventDefault(),e.stopPropagation(),null!==g.state.activeItemIndex){let{dataRef:e}=g.state.items[g.state.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}g.send({type:q.CloseMenu}),(0,A.restoreFocusIfNecessary)(g.state.buttonElement);break;case K.Keys.ArrowDown:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.Next});case K.Keys.ArrowUp:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.Previous});case K.Keys.Home:case K.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.First});case K.Keys.End:case K.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),g.send({type:q.GoToItem,focus:M.Focus.Last});case K.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,l.flushSync)(()=>g.send({type:q.CloseMenu})),null==(o=g.state.buttonElement)||o.focus({preventScroll:!0});break;case K.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,l.flushSync)(()=>g.send({type:q.CloseMenu})),(0,A.focusFrom)(g.state.buttonElement,e.shiftKey?A.Focus.Previous:A.Focus.Next);break;default:1===e.key.length&&(g.send({type:q.Search,value:e.key}),X.setTimeout(()=>g.send({type:q.ClearSearch}),350))}}),et=(0,d.useEvent)(e=>{e.key===K.Keys.Space&&e.preventDefault()}),en=(0,E.useSlot)({open:L===G.Open}),ei=(0,_.mergeProps)(h?I():{},{"aria-activedescendant":(0,C.useSlice)(g,g.selectors.activeDescendantId),"aria-labelledby":(0,C.useSlice)(g,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),id:o,onKeyDown:Z,onKeyUp:et,role:"menu",tabIndex:L===G.Open?0:void 0,ref:k,style:{...v.style,...P,"--button-width":(0,c.useElementSize)($,H,!0).width},...(0,w.transitionDataAttributes)(j)}),er=(0,_.useRender)();return s.default.createElement(W.Portal,{enabled:!!r&&(e.static||$),ownerDocument:N},er({ourProps:ei,theirProps:v,slot:en,defaultTag:"div",features:eo,visible:J,name:"Menu.Items"}))}),ea=(0,_.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-menu-item-${n}`,disabled:i=!1,...r}=e,l=ee("Menu.Item"),a=(0,C.useSlice)(l,e=>l.selectors.isActive(e,o)),u=(0,s.useRef)(null),c=(0,S.useSyncRefs)(t,u),f=(0,C.useSlice)(l,e=>l.selectors.shouldScrollIntoView(e,o));(0,v.useIsoMorphicEffect)(()=>
5{if(f)return(0,D.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[f,u]);let p=(0,P.useTextValue)(u),m=(0,s.useRef)({disabled:i,domRef:u,get textValue(){return p()}});(0,v.useIsoMorphicEffect)(()=>{m.current.disabled=i},[m,i]),(0,v.useIsoMorphicEffect)(()=>(l.actions.registerItem(o,m),()=>l.actions.unregisterItem(o)),[m,o]);let h=(0,d.useEvent)(()=>{l.send({type:q.CloseMenu})}),b=(0,d.useEvent)(e=>{if(i)return e.preventDefault();l.send({type:q.CloseMenu}),(0,A.restoreFocusIfNecessary)(l.state.buttonElement)}),g=(0,d.useEvent)(()=>{if(i)return l.send({type:q.GoToItem,focus:M.Focus.Nothing});l.send({type:q.GoToItem,focus:M.Focus.Specific,id:o})}),y=(0,I.useTrackedPointer)(),x=(0,d.useEvent)(e=>y.update(e)),w=(0,d.useEvent)(e=>{y.wasMoved(e)&&(i||a||l.send({type:q.GoToItem,focus:M.Focus.Specific,id:o,trigger:U.Pointer}))}),R=(0,d.useEvent)(e=>{y.wasMoved(e)&&(i||a&&l.state.activationTrigger===U.Pointer&&l.send({type:q.GoToItem,focus:M.Focus.Nothing}))}),[T,F]=(0,N.useLabels)(),[O,k]=(0,H.useDescriptions)(),L=(0,E.useSlot)({active:a,focus:a,disabled:i,close:h}),B=(0,_.useRender)();return s.default.createElement(F,null,s.default.createElement(k,null,B({ourProps:{id:o,ref:c,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-labelledby":T,"aria-describedby":O,disabled:void 0,onClick:b,onFocus:g,onPointerEnter:x,onMouseEnter:x,onPointerMove:w,onMouseMove:w,onPointerLeave:R,onMouseLeave:R},theirProps:r,slot:L,defaultTag:ei,name:"Menu.Item"})))}),eu=(0,_.forwardRefWithAs)(function(e,t){let[n,o]=(0,N.useLabels)(),i=(0,_.useRender)();return s.default.createElement(o,null,i({ourProps:{ref:t,"aria-labelledby":n,role:"group"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Section"}))}),ec=(0,_.forwardRefWithAs)(function(e,t){let n=(0,s.useId)(),{id:o=`headlessui-menu-heading-${n}`,...i}=e,r=(0,N.useLabelContext)();(0,v.useIsoMorphicEffect)(()=>r.register(o),[o,r.register]);let l={id:o,ref:t,role:"presentation",...r.props};return(0,_.useRender)()({ourProps:l,theirProps:i,slot:{},defaultTag:"header",name:"Menu.Heading"})}),ed=(0,_.forwardRefWithAs)(function(e,t){return(0,_.useRender)()({ourProps:{ref:t,role:"separator"},theirProps:e,slot:{},defaultTag:"div",name:"Menu.Separator"})}),ef=Object.assign(er,{Button:es,Items:el,Item:ea,Section:eu,Heading:ec,Separator:ed});e.s(["Menu",0,ef,"MenuButton",0,es,"MenuHeading",0,ec,"MenuItem",0,ea,"MenuItems",0,el,"MenuSection",0,eu,"MenuSeparator",0,ed],591050)},632611,e=>{"use strict";let t,n;var o=e.i(335115),i=e.i(55460),r=e.i(90008),s=e.i(105419),l=e.i(29023),a=e.i(500674),u=e.i(678374),c=e.i(601483),d=e.i(489027),f=e.i(145516),p=e.i(466606),v=e.i(44873),m=e.i(97271),h=e.i(897963),b=e.i(5738),g=e.i(51603),y=e.i(426466),x=e.i(861707),E=e.i(991306),S=e.i(96895),P=e.i(427638),I=e.i(953356),w=e.i(381489),R=e.i(325475),T=e.i(949406),F=e.i(742231),O=e.i(267679),C=e.i(338789),M=e.i(809858),D=e.i(766383),k=e.i(672773),A=e.i(939801),L=e.i(318273),B=e.i(135057),_=Object.defineProperty,H=(e,t,n)=>{let o;return(o="symbol"!=typeof t?t+"":t)in e?_(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,n},K=((t=K||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),N=((n=N||{})[n.OpenPopover=0]="OpenPopover",n[n.ClosePopover=1]="ClosePopover",n[n.SetButton=2]="SetButton",n[n.SetButtonId=3]="SetButtonId",n[n.SetPanel=4]="SetPanel",n[n.SetPanelId=5]="SetPanelId",n);let W={0:e=>0===e.popoverState?e:{...e,popoverState:0,__demoMode:!1},1:e=>1===e.popoverState?e:{...e,popoverState:1,__demoMode:!1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>
5e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}};class V extends L.Machine{constructor(e){super(e),H(this,"actions",{close:()=>this.send({type:1}),refocusableClose:e=>{this.actions.close();let t=e?F.isHTMLElement(e)?e:"current"in e&&F.isHTMLElement(e.current)?e.current:this.state.button:this.state.button;null==t||t.focus()},open:()=>this.send({type:0}),setButtonId:e=>this.send({type:3,buttonId:e}),setButton:e=>this.send({type:2,button:e}),setPanelId:e=>this.send({type:5,panelId:e}),setPanel:e=>this.send({type:4,panel:e})}),H(this,"selectors",{isPortalled:e=>{var t;if(!e.button||!e.panel)return!1;let n=null!=(t=(0,M.getOwnerDocument)(e.button))?t:document;for(let t of n.querySelectorAll("body > *"))if(Number(null==t?void 0:t.contains(e.button))^Number(null==t?void 0:t.contains(e.panel)))return!0;let o=(0,O.getFocusableElements)(n),i=o.indexOf(e.button),r=(i+o.length-1)%o.length,s=(i+1)%o.length,l=o[r],a=o[s];return!e.panel.contains(l)&&!e.panel.contains(a)}});{let e=this.state.id,t=B.stackMachines.get(null);this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:e,__demoMode:t=!1}){return new V({id:e,__demoMode:t,popoverState:+!t,buttons:{current:[]},button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:{current:null},afterPanelSentinel:{current:null},afterButtonSentinel:{current:null}})}reduce(e,t){return(0,C.match)(t.type,W,e,t)}}var z=e.i(746723);let $=(0,r.createContext)(null);function j(e){let t=(0,r.useContext)($);if(null===t){let t=Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return t}let G=(0,r.createContext)(null);function U(){return(0,r.useContext)(G)}G.displayName="PopoverGroupContext";let q=(0,r.createContext)(null);q.displayName="PopoverPanelContext";let Q=D.RenderFeatures.RenderStrategy|D.RenderFeatures.Static;function Y(e,t){let n=(0,r.useId)(),{id:o=`headlessui-popover-backdrop-${n}`,transition:i=!1,...s}=e,l=j("Popover.Backdrop"),u=(0,R.useSlice)(l,(0,r.useCallback)(e=>e.popoverState,[])),[c,d]=(0,r.useState)(null),f=(0,y.useSyncRefs)(t,d),p=(0,w.useOpenClosed)(),[v,m]=(0,E.useTransition)(i,c,null!==p?(p&w.State.Open)===w.State.Open:u===K.Open),h=(0,a.useEvent)(e=>{if((0,T.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.actions.close()}),b=(0,g.useSlot)({open:u===K.Open}),x={ref:f,id:o,"aria-hidden":!0,onClick:h,...(0,E.transitionDataAttributes)(m)};return(0,D.useRender)()({ourProps:x,theirProps:s,slot:b,defaultTag:"div",features:Q,visible:v,name:"Popover.Backdrop"})}let J=D.RenderFeatures.RenderStrategy|D.RenderFeatures.Static,X=(0,D.forwardRefWithAs)(function(e,t){var n;let o=(0,r.useId)(),{__demoMode:i=!1,...s}=e,l=function({id:e,__demoMode:t=!1}){let n=(0,r.useMemo)(()=>V.new({id:e,__demoMode:t}),[]);return(0,z.useOnUnmount)(()=>n.dispose()),n}({id:o,__demoMode:i}),c=(0,r.useRef)(null),f=(0,y.useSyncRefs)(t,(0,y.optionalRef)(e=>{c.current=e})),[m,b,x,E,I]=(0,R.useSlice)(l,(0,r.useCallback)(e=>[e.popoverState,e.button,e.panel,e.buttonId,e.panelId],[])),T=(0,v.useRootDocument)(null!=(n=c.current)?n:b),k=(0,d.useLatestValue)(E),L=(0,d.useLatestValue)(I),B=(0,r.useMemo)(()=>({buttonId:k,panelId:L,close:l.actions.close}),[k,L,l]),_=U(),H=null==_?void 0:_.registerPopover,N=(0,a.useEvent)(()=>{var e,t;let n=(0,M.getActiveElement)(null!=(e=c.current)?e:b);return null!=(t=null==_?void 0:_.isFocusWithinPopoverGroup())?t:n&&((null==b?void 0:b.contains(n))||(null==x?void 0:x.contains(n)))});(0,r.useEffect)(()=>null==H?void 0:H(B),[H,B]);let[W,j]=(0,A.useNestedPortals)(),G=(0,h.useMainTreeNode)(b),Q=(0,h.useRootContainers)({mainTreeNode:G,portals:W,defaultContainers:[{get current(){return l.state.button}},{get current(){return l.state.panel}}]});(0,u.useEventListener)(T,"focus",e=>{var t,n,o,i,r,s;e.target!==window&&F.isHTMLorSVGElement(e.target)&&l.state.popoverState===K.Open&&(N()||l.state.button&&l.state.panel&&(Q.contains(e.target)||null!=(n=null==(t=l.state.beforePanelSentinel.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(i=null==(o=l.state.afterPanelSentinel.current)?void 0:o.contains)&&i.call(o,e.target)||null!=(s=null==(r=l.state.afterButtonSentinel.current)?void 0:r.contains)&&s.call(r,e.target)||l.actions.close()))},!0);let Y=m===K.Open;(0,p.useOutsideClick)(Y,Q.resolveContainers,(e,t)=>{l.actions.close(),(0,O.isFocusableElement)(t,O.FocusableMode.Loose)||(e.preventDefault(),null==b||b.focu
5s())});let J=(0,g.useSlot)({open:m===K.Open,close:l.actions.refocusableClose}),X=(0,R.useSlice)(l,(0,r.useCallback)(e=>(0,C.match)(e.popoverState,{[K.Open]:w.State.Open,[K.Closed]:w.State.Closed}),[])),Z=(0,D.useRender)();return r.default.createElement(h.MainTreeProvider,{node:G},r.default.createElement(P.FloatingProvider,null,r.default.createElement(q.Provider,{value:null},r.default.createElement($.Provider,{value:l},r.default.createElement(S.CloseProvider,{value:l.actions.refocusableClose},r.default.createElement(w.OpenClosedProvider,{value:X},r.default.createElement(j,null,Z({ourProps:{ref:f},theirProps:s,slot:J,defaultTag:"div",name:"Popover"}))))))))}),Z=(0,D.forwardRefWithAs)(function(e,t){let n=(0,r.useId)(),{id:l=`headlessui-popover-button-${n}`,disabled:u=!1,autoFocus:c=!1,...d}=e,f=j("Popover.Button"),[p,v,h,b,E,S,w]=(0,R.useSlice)(f,(0,r.useCallback)(e=>[e.popoverState,f.selectors.isPortalled(e),e.button,e.buttonId,e.panel,e.panelId,e.afterButtonSentinel],[])),A=(0,r.useRef)(null),L=`headlessui-focus-sentinel-${(0,r.useId)()}`,B=U(),_=null==B?void 0:B.closeOthers,H=null!==(0,r.useContext)(q);(0,r.useEffect)(()=>{if(!H)return f.actions.setButtonId(l),()=>f.actions.setButtonId(null)},[H,l,f]);let[N]=(0,r.useState)(()=>Symbol()),W=(0,y.useSyncRefs)(A,t,(0,P.useFloatingReference)(),(0,a.useEvent)(e=>{if(!H){if(e)f.state.buttons.current.push(N);else{let e=f.state.buttons.current.indexOf(N);-1!==e&&f.state.buttons.current.splice(e,1)}f.state.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),e&&f.actions.setButton(e)}})),V=(0,y.useSyncRefs)(A,t),z=(0,a.useEvent)(e=>{var t,n,o;if(H){if(f.state.popoverState===K.Closed)return;switch(e.key){case k.Keys.Space:case k.Keys.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),f.actions.close(),null==(o=f.state.button)||o.focus()}}else switch(e.key){case k.Keys.Space:case k.Keys.Enter:e.preventDefault(),e.stopPropagation(),f.state.popoverState===K.Closed?(null==_||_(f.state.buttonId),f.actions.open()):f.actions.close();break;case k.Keys.Escape:if(f.state.popoverState!==K.Open)return null==_?void 0:_(f.state.buttonId);if(!A.current)return;let i=(0,M.getActiveElement)(A.current);if(i&&!A.current.contains(i))return;e.preventDefault(),e.stopPropagation(),f.actions.close()}}),$=(0,a.useEvent)(e=>{H||e.key===k.Keys.Space&&e.preventDefault()}),G=(0,a.useEvent)(e=>{var t,n;(0,T.isDisabledReactIssue7711)(e.currentTarget)||u||(H?(f.actions.close(),null==(t=f.state.button)||t.focus()):(e.preventDefault(),e.stopPropagation(),f.state.popoverState===K.Closed?(null==_||_(f.state.buttonId),f.actions.open()):f.actions.close(),null==(n=f.state.button)||n.focus()))}),Q=(0,a.useEvent)(e=>{e.preventDefault(),e.stopPropagation()}),{isFocusVisible:Y,focusProps:J}=(0,o.useFocusRing)({autoFocus:c}),{isHovered:X,hoverProps:Z}=(0,i.useHover)({isDisabled:u}),{pressed:ee,pressProps:et}=(0,s.useActivePress)({disabled:u}),en=p===K.Open,eo=(0,g.useSlot)({open:en,active:ee||en,disabled:u,hover:X,focus:Y,autofocus:c}),ei=(0,m.useResolveButtonType)(e,h),er=H?(0,D.mergeProps)({ref:V,type:ei,onKeyDown:z,onClick:G,disabled:u||void 0,autoFocus:c},J,Z,et):(0,D.mergeProps)({ref:W,id:b,type:ei,"aria-expanded":p===K.Open,"aria-controls":E?S:void 0,disabled:u||void 0,autoFocus:c,onKeyDown:z,onKeyUp:$,onClick:G,onMouseDown:Q},J,Z,et),es=(0,x.useTabDirection)(),el=(0,a.useEvent)(()=>{if(!F.isHTMLElement(f.state.panel))return;let e=f.state.panel;(0,C.match)(es.current,{[x.Direction.Forwards]:()=>(0,O.focusIn)(e,O.Focus.First),[x.Direction.Backwards]:()=>(0,O.focusIn)(e,O.Focus.Last)})===O.FocusResult.Error&&(0,O.focusIn)((0,O.getFocusableElements)((0,M.getRootNode)(f.state.button)).filter(e=>"true"!==e.dataset.headlessuiFocusGuard),(0,C.match)(es.current,{[x.Direction.Forwards]:O.Focus.Next,[x.Direction.Backwards]:O.Focus.Previous}),{relativeTo:f.state.button})}),ea=(0,D.useRender)();return r.default.createElement(r.default.Fragment,null,ea({ourProps:er,theirProps:d,slot:eo,defaultTag:"button",name:"Popover.Button"}),en&&!H&&v&&r.default.createElement(I.Hidden,{id:L,ref:w,features:I.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:el}))}),ee=(0,D.forwardRefWithAs)(Y),et=(0,D.forwardRefWithAs)(Y),en=(0,D.forwardRefWithAs)(function(e,t){let n=(0,r.useId)(),{id:o=`headlessui-popover-panel-${n}`,focus:i=!1,anchor:s,portal:u=!1,modal:d=!1,transition:p=!1,...m}=e,h=j("Popover.Panel"),T=(0,R.useSlice)(h,h.selectors.isPortalled),[F,L,B,_,H]=(0,R.useSlice)(h,(0,r.useCallback)(e=>[e.popoverState,e.button,e.__demoMode,e.beforePanelSentinel,e.afterPanelSentinel],[])),N=`headlessui-focus-sentinel-before-${n}`,W=`headlessui-focus-sentinel-after-${n}`,V=(0,r.useRef)(null),z=(0,P.useResolvedAnchor)(s),[$,G]=(0,P.useFloatingPanel)(z),U=(0,P.useFloatingPanelProps)();z&&(u=!0);let[Q,Y]=(0,r.useState)(null),X=(0,y.useSyncRefs)(V,t,z?$:null,h.actions.setPanel,Y),Z=(0,v.useOwnerDocument)(L),ee=(0,v.useOwnerDocument)(V.current);(0,c.useIsoMorphicEffect)(()=>(h.actions.setPanelId(o),()=>h.actions.setPanelId(null)),[o,h]);let et=(0,w.useOpenClosed)(),[en,eo]=(0,E.useTransition)(p,Q,null!==et?(et&w.State.Open)===w.State.Open:F===K.Open);(0,f.useOnDisappear)(en,L,h.actions.close),(0,b.useScrollLock)(!B&&d&&en,ee);let ei=(0,a.useEvent)(e=>{var t;if(e.key===k.Keys.Escape){if(h.state.popoverState!==K.Open||!V.current)return;let n=(0,M.getActiveElement)(V.current);if(n&&!V.current.contains(n))return;e.preventDefault(),e.stopPropagation(),h.actions.close(),null==(t=h.state.button)||t.focu
5s()}});(0,r.useEffect)(()=>{var t;e.static||F===K.Closed&&(null==(t=e.unmount)||t)&&h.actions.setPanel(null)},[F,e.unmount,e.static,h]),(0,r.useEffect)(()=>{if(B||!i||F!==K.Open||!V.current)return;let e=(0,M.getActiveElement)(V.current);V.current.contains(e)||(0,O.focusIn)(V.current,O.Focus.First)},[B,i,V.current,F]);let er=(0,g.useSlot)({open:F===K.Open,close:h.actions.refocusableClose}),es=(0,D.mergeProps)(z?U():{},{ref:X,id:o,onKeyDown:ei,onBlur:i&&F===K.Open?e=>{var t,n,o,i,r;let s=e.relatedTarget;s&&V.current&&(null!=(t=V.current)&&t.contains(s)||(h.actions.close(),(null!=(o=null==(n=_.current)?void 0:n.contains)&&o.call(n,s)||null!=(r=null==(i=H.current)?void 0:i.contains)&&r.call(i,s))&&s.focus({preventScroll:!0})))}:void 0,tabIndex:-1,style:{...m.style,...G,"--button-width":(0,l.useElementSize)(en,L,!0).width},...(0,E.transitionDataAttributes)(eo)}),el=(0,x.useTabDirection)(),ea=(0,a.useEvent)(()=>{let e=V.current;e&&(0,C.match)(el.current,{[x.Direction.Forwards]:()=>{var t;(0,O.focusIn)(e,O.Focus.First)===O.FocusResult.Error&&(null==(t=h.state.afterPanelSentinel.current)||t.focus())},[x.Direction.Backwards]:()=>{var e;null==(e=h.state.button)||e.focus({preventScroll:!0})}})}),eu=(0,a.useEvent)(()=>{let e=V.current;e&&(0,C.match)(el.current,{[x.Direction.Forwards]:()=>{var e;if(!h.state.button)return;let t=null!=(e=(0,M.getRootNode)(h.state.button))?e:document.body,n=(0,O.getFocusableElements)(t),o=n.indexOf(h.state.button),i=n.slice(0,o+1),r=[...n.slice(o+1),...i];for(let e of r.slice())if("true"===e.dataset.headlessuiFocusGuard||null!=Q&&Q.contains(e)){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}(0,O.focusIn)(r,O.Focus.First,{sorted:!1})},[x.Direction.Backwards]:()=>{var t;(0,O.focusIn)(e,O.Focus.Previous)===O.FocusResult.Error&&(null==(t=h.state.button)||t.focus())}})}),ec=(0,D.useRender)();return r.default.createElement(w.ResetOpenClosedProvider,null,r.default.createElement(q.Provider,{value:o},r.default.createElement(S.CloseProvider,{value:h.actions.refocusableClose},r.default.createElement(A.Portal,{enabled:!!u&&(e.static||en),ownerDocument:Z},en&&T&&r.default.createElement(I.Hidden,{id:N,ref:_,features:I.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:ea}),ec({ourProps:es,theirProps:m,slot:er,defaultTag:"div",features:J,visible:en,name:"Popover.Panel"}),en&&T&&r.default.createElement(I.Hidden,{id:W,ref:H,features:I.HiddenFeatures.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:eu})))))}),eo=(0,D.forwardRefWithAs)(function(e,t){let n=(0,r.useRef)(null),o=(0,y.useSyncRefs)(n,t),[i,s]=(0,r.useState)([]),l=(0,a.useEvent)(e=>{s(t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t})}),u=(0,a.useEvent)(e=>(s(t=>[...t,e]),()=>l(e))),c=(0,a.useEvent)(()=>{var e;let t=(0,M.getRootNode)(n.current);if(!t)return!1;let o=(0,M.getActiveElement)(n.current);return!!(null!=(e=n.current)&&e.contains(o))||i.some(e=>{var n,i;return(null==(n=t.getElementById(e.buttonId.current))?void 0:n.contains(o))||(null==(i=t.getElementById(e.panelId.current))?void 0:i.contains(o))})}),d=(0,a.useEvent)(e=>{for(let t of i)t.buttonId.current!==e&&t.close()}),f=(0,r.useMemo)(()=>({registerPopover:u,unregisterPopover:l,isFocusWithinPopoverGroup:c,closeOthers:d}),[u,l,c,d]),p=(0,g.useSlot)({}),v=(0,D.useRender)();return r.default.createElement(h.MainTreeProvider,null,r.default.createElement(G.Provider,{value:f},v({ourProps:{ref:o},theirProps:e,slot:p,defaultTag:"div",name:"Popover.Group"})))}),ei=Object.assign(X,{Button:Z,Backdrop:et,Overlay:ee,Panel:en,Group:eo});e.s(["Popover",0,ei,"PopoverBackdrop",0,et,"PopoverButton",0,Z,"PopoverGroup",0,eo,"PopoverOverlay",0,ee,"PopoverPanel",0,en],632611)},176242,e=>{"use strict";let t;var n=e.i(335115),o=e.i(55460),i=e.i(90008),r=e.i(392231),s=e.i(665621),l=e.i(46210),a=e.i(500674),u=e.i(601483),c=e.i(489027),d=e.i(51603),f=e.i(426466),p=e.i(201183),v=e.i(195569),m=e.i(282684),h=e.i(949406),b=e.i(267679),g=e.i(978699),y=e.i(338789),x=e.i(809858),E=e.i(766383),S=e.i(683791),P=e.i(672773),I=e.i(764118),w=((t=w||{})[t.RegisterOption=0]="RegisterOption",t[t.UnregisterOption=1]="UnregisterOption",t);let R={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:(0,b.sortByDomNode)(n,e=>e.element.current)}},1(e,t){let n=e.options.slice(),o=e.options.findIndex(e=>e.id===t.id);return -1===o?e:(n.splice(o,1),{...e,options:n})}},T=(0,i.createContext)(null);function F(e){let t=(0,i.useContext)(T);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,F),t}return t}T.displayName="RadioGroupDataContext";let O=(0,i.createContext)(null);function C(e){let t=(0,i.useContext)(O);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,C),t}return t}function M(e,t){return(0,y.match)(t.type,R,e,t)}O.displayName="RadioGroupActionsContext";let D=(0,E.forwardRefWithAs)(function(e,t){let n=(0,i.useId)(),o=(0,p.useDisabled)(),{id:u=`headlessui-radiogroup-${n}`,value:c,form:m,name:h,onChange:y,by:w,disabled:R=o||!1,defaultValue:F,tabIndex:C=0,...D}=e,k=(0,r.useByComparator)(w),[A,L]=(0,i.useReducer)(M,{options:[]}),B=A.options,[_,H]=(0,I.useLabels)(),[K,N]=(0,S.useDescriptions)(),W=(0,i.useRef)(null),V=(0,f.useSyncRefs)(W,t),z=(0,l.useDefaultValue)(F),[$,j]=(0,s.useControllable)(c,y,z),G=(0,i.useMemo)(()=>B.find(e=>!e.propsRef.current.disabled),[B]),U=(0,i.useMemo)(()=>B.some(e=>k(e.propsRef.current.value,$)),[B,$]),q=(0,a.useEvent)(e=>{var t;if(R||k(e,$))return!1;let n=null==(t=B.find(t=>k(t.propsRef.current.value,e)))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==j||j(e),!0)}),Q=(0,a.useEvent)(e=>{if(!W.current)return;let t=B.filter(e=>!1===e.propsRef.current.disabled).map(e=>e.element.current);switch(e.key){case P.Keys.Enter:(0,g.attemptSubmit)(e.currentTarget);break;case P.Keys.ArrowLeft:case P.Keys.ArrowUp:if(e.preventDefault(),e.stopPropagation(),(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround)===b.FocusResult.Success){let e=B.find(e=>(0,x.isActiveElement)(e.element.current));e&&q(e.propsRef.current.value)}break;case P.Keys.ArrowRight:case P.Keys.ArrowDown:if(e.preventDefault(),e.stopPropagation(),(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround)===b.FocusResult.Success){let e=B.find(e=>(0,x.isActiveElement)(e.element.current));e&&q(e.propsRef.current.value)}break;case P.Keys.Space:{e.preventDefault(),e.stopPropagation();let t=B.find(e=>(0,x.isActiveElement)(e.element.current));t&&q(t.propsRef.current.value)}}}),Y=(0,a.useEvent)(e=>(L({type:0,...e}),()=>L({type:1,id:e.id}))),J=(0,i.useMemo)(()=>({value:$,firstOption:G,containsCheckedOption:U,disabled:R,compare:k,tabIndex:C,...A}),[$,G,U,R,k,C,A]),X=(0,i.useMemo)(()=>({registerOption:Y,change:q}),[Y,q]),Z=(0,d.useSlot)({value:$}),ee=(0,i.useCallback)(()=>
5{if(void 0!==z)return q(z)},[q,z]),et=(0,E.useRender)();return i.default.createElement(N,{name:"RadioGroup.Description"},i.default.createElement(H,{name:"RadioGroup.Label"},i.default.createElement(O.Provider,{value:X},i.default.createElement(T.Provider,{value:J},null!=h&&i.default.createElement(v.FormFields,{disabled:R,data:{[h]:$||"on"},overrides:{type:"radio",checked:null!=$},form:m,onReset:ee}),et({ourProps:{ref:V,id:u,role:"radiogroup","aria-labelledby":_,"aria-describedby":K,onKeyDown:Q},theirProps:D,slot:Z,defaultTag:"div",name:"RadioGroup"})))))}),k=(0,E.forwardRefWithAs)(function(e,t){var r;let s=F("RadioGroup.Option"),l=C("RadioGroup.Option"),p=(0,i.useId)(),{id:v=`headlessui-radiogroup-option-${p}`,value:m,disabled:b=s.disabled||!1,autoFocus:g=!1,...y}=e,x=(0,i.useRef)(null),P=(0,f.useSyncRefs)(x,t),[w,R]=(0,I.useLabels)(),[T,O]=(0,S.useDescriptions)(),M=(0,c.useLatestValue)({value:m,disabled:b});(0,u.useIsoMorphicEffect)(()=>l.registerOption({id:v,element:x,propsRef:M}),[v,l,x,M]);let D=(0,a.useEvent)(e=>{var t;if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.change(m)&&(null==(t=x.current)||t.focus())}),k=(null==(r=s.firstOption)?void 0:r.id)===v,{isFocusVisible:A,focusProps:L}=(0,n.useFocusRing)({autoFocus:g}),{isHovered:B,hoverProps:_}=(0,o.useHover)({isDisabled:b}),H=s.compare(s.value,m),K=(0,E.mergeProps)({ref:P,id:v,role:"radio","aria-checked":H?"true":"false","aria-labelledby":w,"aria-describedby":T,"aria-disabled":!!b||void 0,tabIndex:b?-1:H||!s.containsCheckedOption&&k?s.tabIndex:-1,onClick:b?void 0:D,autoFocus:g},L,_),N=(0,d.useSlot)({checked:H,disabled:b,active:A,hover:B,focus:A,autofocus:g}),W=(0,E.useRender)();return i.default.createElement(O,{name:"RadioGroup.Description"},i.default.createElement(R,{name:"RadioGroup.Label"},W({ourProps:K,theirProps:y,slot:N,defaultTag:"div",name:"RadioGroup.Option"})))}),A=(0,E.forwardRefWithAs)(function(e,t){var r;let s=F("Radio"),l=C("Radio"),v=(0,i.useId)(),b=(0,m.useProvidedId)(),g=(0,p.useDisabled)(),{id:y=b||`headlessui-radio-${v}`,value:x,disabled:P=s.disabled||g||!1,autoFocus:w=!1,...R}=e,T=(0,i.useRef)(null),O=(0,f.useSyncRefs)(T,t),M=(0,I.useLabelledBy)(),D=(0,S.useDescribedBy)(),k=(0,c.useLatestValue)({value:x,disabled:P});(0,u.useIsoMorphicEffect)(()=>l.registerOption({id:y,element:T,propsRef:k}),[y,l,T,k]);let A=(0,a.useEvent)(e=>{var t;if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.change(x)&&(null==(t=T.current)||t.focus())}),{isFocusVisible:L,focusProps:B}=(0,n.useFocusRing)({autoFocus:w}),{isHovered:_,hoverProps:H}=(0,o.useHover)({isDisabled:P}),K=(null==(r=s.firstOption)?void 0:r.id)===y,N=s.compare(s.value,x),W=(0,E.mergeProps)({ref:O,id:y,role:"radio","aria-checked":N?"true":"false","aria-labelledby":M,"aria-describedby":D,"aria-disabled":!!P||void 0,tabIndex:P?-1:N||!s.containsCheckedOption&&K?s.tabIndex:-1,autoFocus:w,onClick:P?void 0:A},B,H),V=(0,d.useSlot)({checked:N,disabled:P,hover:_,focus:L,autofocus:w});return(0,E.useRender)()({ourProps:W,theirProps:R,slot:V,defaultTag:"span",name:"Radio"})}),L=I.Label,B=S.Description,_=Object.assign(D,{Option:k,Radio:A,Label:L,Description:B});e.s(["Radio",0,A,"RadioGroup",0,_,"RadioGroupDescription",0,B,"RadioGroupLabel",0,L,"RadioGroupOption",0,k])},46783,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(105419),i=e.i(90008),r=e.i(51603),s=e.i(201183),l=e.i(282684),a=e.i(766383),u=e.i(683791),c=e.i(764118);let d=(0,a.forwardRefWithAs)(function(e,d){let f=(0,i.useId)(),p=(0,l.useProvidedId)(),v=(0,s.useDisabled)(),{id:m=p||`headlessui-select-${f}`,disabled:h=v||!1,invalid:b=!1,autoFocus:g=!1,...y}=e,x=(0,c.useLabelledBy)(),E=(0,u.useDescribedBy)(),{isFocusVisible:S,focusProps:P}=(0,t.useFocusRing)({autoFocus:g}),{isHovered:I,hoverProps:w}=(0,n.useHover)({isDisabled:h}),{pressed:R,pressProps:T}=(0,o.useActivePress)({disabled:h}),F=(0,a.mergeProps)({ref:d,id:m,"aria-labelledby":x,"aria-describedby":E,"aria-invalid":b?"true":void 0,disabled:h||void 0,autoFocus:g},P,w,T),O=(0,r.useSlot)({disabled:h,invalid:b,hover:I,focus:S,active:R,autofocus:g});return(0,a.useRender)()({ourProps:F,theirProps:y,slot:O,defaultTag:"select",name:"Select"})});e.s(["Select",0,d])},56972,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(90008),i=e.i(105419),r=e.i(665621),s=e.i(46210),l=e.i(129997),a=e.i(500674),u=e.i(97271),c=e.i(51603),d=e.i(426466),f=e.i(201183),p=e.i(195569),v=e.i(282684),m=e.i(949406),h=e.i(742231),b=e.i(978699),g=e.i(766383),y=e.i(683791),x=e.i(672773),E=e.i(764118);let S=(0,o.createContext)(null);S.displayName="GroupContext";let P=o.Fragment,I=(0,g.forwardRefWithAs)(function(e,h){var P;let I=(0,o.useId)(),w=(0,v.useProvidedId)(),R=(0,f.useDisabled)(),{id:T=w||`headlessui-switch-${I}`,disabled:F=R||!1,checked:O,defaultChecked:C,onChange:M,name:D,value:k,form:A,autoFocus:L=!1,...B}=e,_=(0,o.useContext)(S),[H,K]=(0,o.useState)(null),N=(0,o.useRef)(null),W=(0,d.useSyncRefs)(N,h,null===_?null:_.setSwitch,K),V=(0,s.useDefaultValue)(C),[z,$]=(0,r.useControllable)(O,M,null!=V&&V),j=(0,l.useDisposables)(),[G,U]=(0,o.useState)(!1),q=(0,a.useEvent)(()=>{U(!0),null==$||$(!z),j.nextFrame(()=>{U(!1)})}),Q=(0,a.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),q()}),Y=(0,a.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),q()):e.key===x.Keys.Enter&&(0,b.attemptSubmit)(e.currentTarget)}),J=(0,a.useEvent)(e=>e.preventDefault()),X=(0,E.useLabelledBy)(),Z=(0,y.useDescribedBy)(),{isFocusVisible:ee,focusProps:et}=(0,t.useFocusRing)({autoFocus:L}),{isHovered:en,hoverProps:eo}=(0,n.useHover)({isDisabled:F}),{pressed:ei,pressProps:er}=(0,i.useActivePress)({disabled:F}),es=(0,c.useSlot)({checked:z,disabled:F,hover:en,focus:ee,active:ei,autofocus:L,changing:G}),el=(0,g.mergeProps)({id:T,ref:W,role:"switch",type:(0,u.useResolveButtonType)(e,H),tabIndex:-1===e.tabIndex?0:null!=(P=e.tabIndex)?P:0,"aria-checked":z,"aria-labelledby":X,"aria-describedby":Z,disabled:F||void 0,autoFocus:L,onClick:Q,onKeyUp:Y,onKeyPress:J},et,eo,er),ea=(0,o.useCallback)(()=>
5{if(void 0!==V)return null==$?void 0:$(V)},[$,V]),eu=(0,g.useRender)();return o.default.createElement(o.default.Fragment,null,null!=D&&o.default.createElement(p.FormFields,{disabled:F,data:{[D]:k||"on"},overrides:{type:"checkbox",checked:z},form:A,onReset:ea}),eu({ourProps:el,theirProps:B,slot:es,defaultTag:"button",name:"Switch"}))}),w=function(e){var t;let[n,i]=(0,o.useState)(null),[r,s]=(0,E.useLabels)(),[l,a]=(0,y.useDescriptions)(),u=(0,o.useMemo)(()=>({switch:n,setSwitch:i}),[n,i]),c=(0,g.useRender)();return o.default.createElement(a,{name:"Switch.Description",value:l},o.default.createElement(s,{name:"Switch.Label",value:r,props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){n&&(h.isHTMLLabelElement(e.currentTarget)&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},o.default.createElement(S.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:P,name:"Switch.Group"}))))},R=E.Label,T=y.Description,F=Object.assign(I,{Group:w,Label:R,Description:T});e.s(["Switch",0,F,"SwitchDescription",0,T,"SwitchGroup",0,w,"SwitchLabel",0,R])},87831,e=>{"use strict";let t,n,o;var i=e.i(335115),r=e.i(55460),s=e.i(90008),l=e.i(105419),a=e.i(500674),u=e.i(601483),c=e.i(489027),d=e.i(97271),f=e.i(51603),p=e.i(426466),v=e.i(206448),m=e.i(953356);function h({onFocus:e}){let[t,n]=(0,s.useState)(!0),o=(0,v.useIsMounted)();return t?s.default.createElement(m.Hidden,{as:"button",type:"button",features:m.HiddenFeatures.Focusable,onFocus:t=>{t.preventDefault();let i,r=50;i=requestAnimationFrame(function t(){if(r--<=0){i&&cancelAnimationFrame(i);return}if(e()){if(cancelAnimationFrame(i),!o.current)return;n(!1);return}i=requestAnimationFrame(t)})}}):null}var b=e.i(267679),g=e.i(338789),y=e.i(359121),x=e.i(809858),E=e.i(766383);let S=s.createContext(null);function P({children:e}){let t=s.useRef({groups:new Map,get(e,t){var n;let o=this.groups.get(e);o||(o=new Map,this.groups.set(e,o));let i=null!=(n=o.get(t))?n:0;return o.set(t,i+1),[Array.from(o.keys()).indexOf(t),function(){let e=o.get(t);e>1?o.set(t,e-1):o.delete(t)}]}});return s.createElement(S.Provider,{value:t},e)}function I(e){let t=s.useContext(S);if(!t)throw Error("You must wrap your component in a <StableCollection>");let n=s.useId(),[o,i]=t.current.get(e,n);return s.useEffect(()=>i,[]),o}var w=e.i(672773),R=((t=R||{})[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t),T=((n=T||{})[n.Less=-1]="Less",n[n.Equal=0]="Equal",n[n.Greater=1]="Greater",n),F=((o=F||{})[o.SetSelectedIndex=0]="SetSelectedIndex",o[o.RegisterTab=1]="RegisterTab",o[o.UnregisterTab=2]="UnregisterTab",o[o.RegisterPanel=3]="RegisterPanel",o[o.UnregisterPanel=4]="UnregisterPanel",o);let O={0(e,t){var n;let o=(0,b.sortByDomNode)(e.tabs,e=>e.current),i=(0,b.sortByDomNode)(e.panels,e=>e.current),r=o.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),s={...e,tabs:o,panels:i};if(t.index<0||t.index>o.length-1){let n=(0,g.match)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,g.match)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===r.length)return s;let i=(0,g.match)(n,{0:()=>o.indexOf(r[0]),1:()=>o.indexOf(r[r.length-1])});return{...s,selectedIndex:-1===i?e.selectedIndex:i}}let l=o.slice(0,t.index),a=[...o.slice(t.index),...l].find(e=>r.includes(e));if(!a)return s;let u=null!=(n=o.indexOf(a))?n:e.selectedIndex;return -1===u&&(u=e.selectedIndex),{...s,selectedIndex:u}},1(e,t){if(e.tabs.includes(t.tab))return e;let n=e.tabs[e.selectedIndex],o=(0,b.sortByDomNode)([...e.tabs,t.tab],e=>e.current),i=e.selectedIndex;return e.info.current.isControlled||-1===(i=o.indexOf(n))&&(i=e.selectedIndex),{...e,tabs:o,selectedIndex:i}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,b.sortByDomNode)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},C=(0,s.createContext)(null);function M(e){let t=(0,s.useContext)(C);if(null===t){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,M),t}return t}C.displayName="TabsDataContext";let D=(0,s.createContext)(null);function k(e){let t=(0,s.useContext)(D);if(null===t){let t=Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,k),t}return t}function A(e,t){return(0,g.match)(t.type,O,e,t)}D.displayName="TabsActionsContext";let L=E.RenderFeatures.RenderStrategy|E.RenderFeatures.Static,B=(0,E.forwardRefWithAs)(function(e,t){var n,o;let c=(0,s.useId)(),{id:v=`headlessui-tabs-tab-${c}`,disabled:m=!1,autoFocus:h=!1,...S}=e,{orientation:P,activation:R,selectedIndex:T,tabs:F,panels:O}
5=M("Tab"),C=k("Tab"),D=M("Tab"),[A,L]=(0,s.useState)(null),B=(0,s.useRef)(null),_=(0,p.useSyncRefs)(B,t,L);(0,u.useIsoMorphicEffect)(()=>C.registerTab(B),[C,B]);let H=I("tabs"),K=F.indexOf(B);-1===K&&(K=H);let N=K===T,W=(0,a.useEvent)(e=>{let t=e();if(t===b.FocusResult.Success&&"auto"===R){let e=(0,x.getActiveElement)(B.current),t=D.tabs.findIndex(t=>t.current===e);-1!==t&&C.change(t)}return t}),V=(0,a.useEvent)(e=>{let t=F.map(e=>e.current).filter(Boolean);if(e.key===w.Keys.Space||e.key===w.Keys.Enter){e.preventDefault(),e.stopPropagation(),C.change(K);return}switch(e.key){case w.Keys.Home:case w.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),W(()=>(0,b.focusIn)(t,b.Focus.First));case w.Keys.End:case w.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),W(()=>(0,b.focusIn)(t,b.Focus.Last))}if(W(()=>(0,g.match)(P,{vertical:()=>e.key===w.Keys.ArrowUp?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===w.Keys.ArrowDown?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error,horizontal:()=>e.key===w.Keys.ArrowLeft?(0,b.focusIn)(t,b.Focus.Previous|b.Focus.WrapAround):e.key===w.Keys.ArrowRight?(0,b.focusIn)(t,b.Focus.Next|b.Focus.WrapAround):b.FocusResult.Error}))===b.FocusResult.Success)return e.preventDefault()}),z=(0,s.useRef)(!1),$=(0,a.useEvent)(()=>{var e;z.current||(z.current=!0,null==(e=B.current)||e.focus({preventScroll:!0}),C.change(K),(0,y.microTask)(()=>{z.current=!1}))}),j=(0,a.useEvent)(e=>{e.preventDefault()}),{isFocusVisible:G,focusProps:U}=(0,i.useFocusRing)({autoFocus:h}),{isHovered:q,hoverProps:Q}=(0,r.useHover)({isDisabled:m}),{pressed:Y,pressProps:J}=(0,l.useActivePress)({disabled:m}),X=(0,f.useSlot)({selected:N,hover:q,active:Y,focus:G,autofocus:h,disabled:m}),Z=(0,E.mergeProps)({ref:_,onKeyDown:V,onMouseDown:j,onClick:$,id:v,role:"tab",type:(0,d.useResolveButtonType)(e,A),"aria-controls":null==(o=null==(n=O[K])?void 0:n.current)?void 0:o.id,"aria-selected":N,tabIndex:N?0:-1,disabled:m||void 0,autoFocus:h},U,Q,J);return(0,E.useRender)()({ourProps:Z,theirProps:S,slot:X,defaultTag:"button",name:"Tabs.Tab"})}),_=(0,E.forwardRefWithAs)(function(e,t){let{defaultIndex:n=0,vertical:o=!1,manual:i=!1,onChange:r,selectedIndex:l=null,...d}=e,v=o?"vertical":"horizontal",m=i?"manual":"auto",g=null!==l,y=(0,c.useLatestValue)({isControlled:g}),x=(0,p.useSyncRefs)(t),[S,I]=(0,s.useReducer)(A,{info:y,selectedIndex:null!=l?l:n,tabs:[],panels:[]}),w=(0,f.useSlot)({selectedIndex:S.selectedIndex}),R=(0,c.useLatestValue)(r||(()=>{})),T=(0,c.useLatestValue)(S.tabs),F=(0,s.useMemo)(()=>({orientation:v,activation:m,...S}),[v,m,S]),O=(0,a.useEvent)(e=>(I({type:1,tab:e}),()=>I({type:2,tab:e}))),M=(0,a.useEvent)(e=>(I({type:3,panel:e}),()=>I({type:4,panel:e}))),k=(0,a.useEvent)(e=>{L.current!==e&&R.current(e),g||I({type:0,index:e})}),L=(0,c.useLatestValue)(g?e.selectedIndex:S.selectedIndex),B=(0,s.useMemo)(()=>({registerTab:O,registerPanel:M,change:k}),[]);(0,u.useIsoMorphicEffect)(()=>{I({type:0,index:null!=l?l:n})},[l]),(0,u.useIsoMorphicEffect)(()=>{if(void 0===L.current||S.tabs.length<=0)return;let e=(0,b.sortByDomNode)(S.tabs,e=>e.current);e.some((e,t)=>S.tabs[t]!==e)&&k(e.indexOf(S.tabs[L.current]))});let _=(0,E.useRender)();return s.default.createElement(P,null,s.default.createElement(D.Provider,{value:B},s.default.createElement(C.Provider,{value:F},F.tabs.length<=0&&s.default.createElement(h,{onFocus:()=>{var e,t;for(let n of T.current)if((null==(e=n.current)?void 0:e.tabIndex)===0)return null==(t=n.current)||t.focus(),!0;return!1}}),_({ourProps:{ref:x},theirProps:d,slot:w,defaultTag:"div",name:"Tabs"}))))}),H=(0,E.forwardRefWithAs)(function(e,t){let{orientation:n,selectedIndex:o}=M("Tab.List"),i=(0,p.useSyncRefs)(t),r=(0,f.useSlot)({selectedIndex:o});return(0,E.useRender)()({ourProps:{ref:i,role:"tablist","aria-orientation":n},theirProps:e,slot:r,defaultTag:"div",name:"Tabs.List"})}),K=(0,E.forwardRefWithAs)(function(e,t){let{selectedIndex:n}=M("Tab.Panels"),o=(0,p.useSyncRefs)(t),i=(0,f.useSlot)({selectedIndex:n});return(0,E.useRender)()({ourProps:{ref:o},theirProps:e,slot:i,defaultTag:"div",name:"Tabs.Panels"})}),N=(0,E.forwardRefWithAs)(function(e,t){var n,o,r,l;let a=(0,s.useId)(),{id:c=`headlessui-tabs-panel-${a}`,tabIndex:d=0,...v}=e,{selectedIndex:h,tabs:b,panels:g}=M("Tab.Panel"),y=k("Tab.Panel"),x=(0,s.useRef)(null),S=(0,p.useSyncRefs)(x,t);(0,u.useIsoMorphicEffect)(()=>y.registerPanel(x),[y,x]);let P=I("panels"),w=g.indexOf(x);-1===w&&(w=P);let R=w===h,{isFocusVisible:T,focusProps:F}=(0,i.useFocusRing)(),O=(0,f.useSlot)({selected:R,focus:T}),C=(0,E.mergeProps)({ref:S,id:c,role:"tabpanel","aria-labelledby":null==(o=null==(n=b[w])?void 0:n.current)?void 0:o.id,tabIndex:R?d:-1},F),D=(0,E.useRender)();return R||null!=(r=v.unmount)&&!r||null!=(l=v.static)&&l?D({ourProps:C,theirProps:v,slot:O,defaultTag:"div",features:L,visible:R,name:"Tabs.Panel"}):s.default.createElement(m.Hidden,{"aria-hidden":"true",...C})}),W=Object.assign(B,{Group:_,List:H,Panels:K,Panel:N});e.s(["Tab",0,W,"TabGroup",0,_,"TabList",0,H,"TabPanel",0,N,"TabPanels",0,K],87831)},921438,e=>{"use strict";var t=e.i(335115),n=e.i(55460),o=e.i(90008),i=e.i(51603),r=e.i(201183),s=e.i(282684),l=e.i(766383),a=e.i(683791),u=e.i(764118);let c=(0,l.forwardRefWithAs)(function(e,c){let d=(0,o.useId)(),f=(0,s.useProvidedId)(),p=(0,r.useDisabled)(),{id:v=f||`headlessui-textarea-${d}`,disabled:m=p||!1,autoFocus:h=!1,invalid:b=!1,...g}=e,y=(0,u.useLabelledBy)(),x=(0,a.useDescribedBy)(),{isFocused:E,focusProps:S}=(0,t.useFocusRing)({autoFocus:h}),{isHovered:P,hoverProps:I}=(0,n.useHover)({isDisabled:m}),w=(0,l.mergeProps)({ref:c,id:v,"aria-labelledby":y,"aria-describedby":x,"aria-invalid":b?"true":void 0,disabled:m||void 0,autoFocus:h},S,I),R=(0,i.useSlot)({disabled:m,invalid:b,hover:P,focus:E,autofocus:h});return(0,l.useRender)()({ourProps:w,theirProps:g,slot:R,defaultTag:"textarea",
5name:"Textarea"})});e.s(["Textarea",0,c])},105419,e=>{"use strict";var t=e.i(90008),n=e.i(809858),o=e.i(129997),i=e.i(500674);e.s(["useActivePress",0,function({disabled:e=!1}={}){let r=(0,t.useRef)(null),[s,l]=(0,t.useState)(!1),a=(0,o.useDisposables)(),u=(0,i.useEvent)(()=>{r.current=null,l(!1),a.dispose()}),c=(0,i.useEvent)(e=>{if(a.dispose(),null===r.current){r.current=e.currentTarget,l(!0);{let t=(0,n.getOwnerDocument)(e.currentTarget);a.addEventListener(t,"pointerup",u,!1),a.addEventListener(t,"pointermove",e=>{if(r.current){var t,n;let o,i;l((o=e.width/2,i=e.height/2,t={top:e.clientY-i,right:e.clientX+o,bottom:e.clientY+i,left:e.clientX-o},n=r.current.getBoundingClientRect(),!(!t||!n||t.right<n.left||t.left>n.right||t.bottom<n.top||t.top>n.bottom)))}},!1),a.addEventListener(t,"pointercancel",u,!1)}}});return{pressed:s,pressProps:e?{}:{onPointerDown:c,onPointerUp:u,onClick:u}}}])},392231,e=>{"use strict";var t=e.i(90008);function n(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}e.s(["useByComparator",0,function(e=n){return(0,t.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}])},665621,46210,e=>{"use strict";var t=e.i(90008),n=e.i(690908),o=e.i(500674);e.s(["useControllable",0,function(e,i,r){let[s,l]=(0,t.useState)(r),a=void 0!==e,u=(0,t.useRef)(a),c=(0,t.useRef)(!1),d=(0,t.useRef)(!1);return!a||u.current||c.current?a||!u.current||d.current||(d.current=!0,u.current=a,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.")):(c.current=!0,u.current=a,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.")),[a?e:s,(0,o.useEvent)(e=>(a||(0,n.flushSync)(()=>l(e)),null==i?void 0:i(e)))]}],665621),e.s(["useDefaultValue",0,function(e){let[n]=(0,t.useState)(e);return n}],46210)},29023,427638,e=>{"use strict";var t=e.i(90008),n=e.i(932660),o=e.i(601483);function i(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}e.s(["useElementSize",0,function(e,r,s=!1){let[l,a]=(0,t.useState)(()=>i(r));return(0,o.useIsoMorphicEffect)(()=>{if(!r||!e)return;let t=(0,n.disposables)();return t.requestAnimationFrame(function e(){t.requestAnimationFrame(e),a(e=>{let t=i(r);return t.width===e.width&&t.height===e.height?e:t})}),()=>{t.dispose()}},[r,e]),s?{width:`${l.width}px`,height:`${l.height}px`}:l}],29023);let r=Math.min,s=Math.max,l=Math.round,a=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function m(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(p(e))?"y":"x"}function g(e){return e.replace(/start|end/g,e=>d[e])}function y(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function x(e){let{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function E(e,t,n){let o,{reference:i,floating:r}=e,s=b(t),l=m(b(t)),a=h(l),u=p(t),c="y"===s,d=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,g=i[a]/2-r[a]/2;switch(u){case"top":o={x:d,y:i.y-r.height};break;case"bottom":o={x:d,y:i.y+i.height};break;case"right":o={x:i.x+i.width,y:f};break;case"left":o={x:i.x-r.width,y:f};break;default:o={x:i.x,y:i.y}}switch(v(t)){case"start":o[l]-=g*(n&&c?-1:1);break;case"end":o[l]+=g*(n&&c?-1:1)}return o}let S=async(e,t,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),a=await (null==s.isRTL?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=E(u,o,a),f=o,p={},v=0;for(let n=0;n<l.length;n++){let{name:r,fn:m}=l[n],{x:h,y:b,data:g,reset:y}=await m({x:c,y:d,initialPlacement:o,placement:f,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=h?h:c,d=null!=b?b:d,p={...p,[r]:{...p[r],...g}},y&&v<=50&&(v++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(u=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:i}
5):y.rects),{x:c,y:d}=E(u,f,a)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function P(e,t){var n,o;void 0===t&&(t={});let{x:i,y:r,platform:s,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=f(t,e),h="number"!=typeof(o=m)?{top:0,right:0,bottom:0,left:0,...o}:{top:o,right:o,bottom:o,left:o},b=a[v?"floating"===p?"reference":"floating":p],g=x(await s.getClippingRect({element:null==(n=await (null==s.isElement?void 0:s.isElement(b)))||n?b:b.contextElement||await (null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),y="floating"===p?{x:i,y:r,width:l.floating.width,height:l.floating.height}:l.reference,E=await (null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),S=await (null==s.isElement?void 0:s.isElement(E))&&await (null==s.getScale?void 0:s.getScale(E))||{x:1,y:1},P=x(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:E,strategy:u}):y);return{top:(g.top-P.top+h.top)/S.y,bottom:(P.bottom-g.bottom+h.bottom)/S.y,left:(g.left-P.left+h.left)/S.x,right:(P.right-g.right+h.right)/S.x}}async function I(e,t){let{placement:n,platform:o,elements:i}=e,r=await (null==o.isRTL?void 0:o.isRTL(i.floating)),s=p(n),l=v(n),a="y"===b(n),u=["left","top"].includes(s)?-1:1,c=r&&a?-1:1,d=f(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof g&&(h="end"===l?-1*g:g),a?{x:h*c,y:m*u}:{x:m*u,y:h*c}}function w(){return"u">typeof window}function R(e){return O(e)?(e.nodeName||"").toLowerCase():"#document"}function T(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function F(e){var t;return null==(t=(O(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function O(e){return!!w()&&(e instanceof Node||e instanceof T(e).Node)}function C(e){return!!w()&&(e instanceof Element||e instanceof T(e).Element)}function M(e){return!!w()&&(e instanceof HTMLElement||e instanceof T(e).HTMLElement)}function D(e){return!(!w()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof T(e).ShadowRoot)}function k(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function A(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function L(e){let t=B(),n=C(e)?H(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function B(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function _(e){return["html","body","#document"].includes(R(e))}function H(e){return T(e).getComputedStyle(e)}function K(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function N(e){if("html"===R(e))return e;let t=e.assignedSlot||e.parentNode||D(e)&&e.host||F(e);return D(t)?t.host:t}function W(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=N(t);return _(n)?t.ownerDocument?t.ownerDocument.body:t.body:M(n)&&k(n)?n:e(n)}(e),r=i===(null==(o=e.ownerDocument)?void 0:o.body),s=T(i);if(r){let e=V(s);return t.concat(s,s.visualViewport||[],k(i)?i:[],e&&n?W(e):[])}return t.concat(i,W(i,[],n))}function V(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function z(e){let t=H(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=M(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,a=l(n)!==r||l(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function $(e){return C(e)?e:e.contextElement}function j(e){let t=$(e);
5if(!M(t))return u(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=z(t),s=(r?l(n.width):n.width)/o,a=(r?l(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}let G=u(0);function U(e){let t=T(e);return B()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:G}function q(e,t,n,o){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let r=e.getBoundingClientRect(),s=$(e),l=u(1);t&&(o?C(o)&&(l=j(o)):l=j(e));let a=(void 0===(i=n)&&(i=!1),o&&(!i||o===T(s))&&i)?U(s):u(0),c=(r.left+a.x)/l.x,d=(r.top+a.y)/l.y,f=r.width/l.x,p=r.height/l.y;if(s){let e=T(s),t=o&&C(o)?T(o):o,n=e,i=V(n);for(;i&&o&&t!==n;){let e=j(i),t=i.getBoundingClientRect(),o=H(i),r=t.left+(i.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,p*=e.y,c+=r,d+=s,i=V(n=T(i))}}return x({width:f,height:p,x:c,y:d})}function Q(e,t){let n=K(e).scrollLeft;return t?t.left+n:q(F(e)).left+n}function Y(e,t,n){void 0===n&&(n=!1);let o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-(n?0:Q(e,o)),y:o.top+t.scrollTop}}function J(e,t,n){var o;let i;if("viewport"===t)i=function(e,t){let n=T(e),o=F(e),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;let e=B();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:r,height:s,x:l,y:a}}(e,n);else if("document"===t){let t,n,r,l,a,u,c;o=F(e),t=F(o),n=K(o),r=o.ownerDocument.body,l=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),u=-n.scrollLeft+Q(o),c=-n.scrollTop,"rtl"===H(r).direction&&(u+=s(t.clientWidth,r.clientWidth)-l),i={width:l,height:a,x:u,y:c}}else if(C(t)){let e,o,r,s,l,a;o=(e=q(t,!0,"fixed"===n)).top+t.clientTop,r=e.left+t.clientLeft,s=M(t)?j(t):u(1),l=t.clientWidth*s.x,a=t.clientHeight*s.y,i={width:l,height:a,x:r*s.x,y:o*s.y}}else{let n=U(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return x(i)}function X(e){return"static"===H(e).position}function Z(e,t){if(!M(e)||"fixed"===H(e).position)return null;if(t)return t(e);let n=e.offsetParent;return F(e)===n&&(n=n.ownerDocument.body),n}function ee(e,t){let n=T(e);if(A(e))return n;if(!M(e)){let t=N(e);for(;t&&!_(t);){if(C(t)&&!X(t))return t;t=N(t)}return n}let o=Z(e,t);for(;o&&["table","td","th"].includes(R(o))&&X(o);)o=Z(o,t);return o&&_(o)&&X(o)&&!L(o)?n:o||function(e){let t=N(e);for(;M(t)&&!_(t);){if(L(t))return t;if(A(t))break;t=N(t)}return null}(e)||n}let et=async function(e){let t=this.getOffsetParent||ee,n=this.getDimensions,o=await n(e.floating);return{reference:function(e,t,n){let o=M(t),i=F(t),r="fixed"===n,s=q(e,!0,r,t),l={scrollLeft:0,scrollTop:0},a=u(0);if(o||!o&&!r)if(("body"!==R(t)||k(i))&&(l=K(t)),o){let e=q(t,!0,r,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else i&&(a.x=Q(i));r&&!o&&i&&(a.x=Q(i));let c=!i||o||r?u(0):Y(i,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},en={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e,r="fixed"===i,s=F(o),l=!!t&&A(t.floating);if(o===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=u(1),d=u(0),f=M(o);if((f||!f&&!r)&&(("body"!==R(o)||k(s))&&(a=K(o)),M(o))){let e=q(o);c=j(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}let p=!s||f||r?u(0):Y(s,a,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-a.scrollTop*c.y+d.y+p.y}},getDocumentElement:F,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e,l=[..."clippingAncestors"===n?A(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let o=W(e,[],!1).filter(e=>C(e)&&"body"!==R(e)),i=null,r="fixed"===H(e).position,s=r?N(e):e;for(;C(s)&&!_(s);){let t=H(s),n=L(s);n||"fixed"!==t.position||(i=null),(r?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||k(s)&&!n&&function e(t,n){let o=N(t);return!(o===n||!C(o)||_(o))&&("fixed"===H(o).position||e(o,n))}(e,s))?o=o.filter(e=>e!==s):i=t,s=N(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=l[0],u=l.reduce((e,n)=>{let o=J(t,n,i);return e.top=s(o.top,e.top),e.right=r(o.right,e.right),e.bottom=r(o.bottom,e.bottom),e.left=s(o.left,e.left),e},J(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:ee,getElementRects:et,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=z(e);return{width:t,height:n}},getScale:j,isElement:C,isRTL:function(e){return"rtl"===H(e).direction}};function eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ei(e,t,n,o){let i;void 0===o&&(o={});let{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=o,p=$(e),v=l||u?[...p?W(p):[],...W(t)]:[];
5v.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let m=p&&d?function(e,t){let n,o=null,i=F(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),l();let f=e.getBoundingClientRect(),{left:p,top:v,width:m,height:h}=f;if(c||t(),!m||!h)return;let b={rootMargin:-a(v)+"px "+-a(i.clientWidth-(p+m))+"px "+-a(i.clientHeight-(v+h))+"px "+-a(p)+"px",threshold:s(0,r(1,d))||1},g=!0;function y(t){let o=t[0].intersectionRatio;if(o!==d){if(!g)return u();o?u(!1,o):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==o||eo(f,e.getBoundingClientRect())||u(),g=!1}try{o=new IntersectionObserver(y,{...b,root:i.ownerDocument})}catch(e){o=new IntersectionObserver(y,b)}o.observe(e)}(!0),l}(p,n):null,h=-1,b=null;c&&(b=new ResizeObserver(e=>{let[o]=e;o&&o.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=b)||e.observe(t)})),n()}),p&&!f&&b.observe(p),b.observe(t));let g=f?q(e):null;return f&&function t(){let o=q(e);g&&!eo(g,o)&&n(),g=o,i=requestAnimationFrame(t)}(),n(),()=>{var e;v.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=b)||e.disconnect(),b=null,f&&cancelAnimationFrame(i)}}var er=e.i(690908),es="u">typeof document?t.useLayoutEffect:function(){};function el(e,t){let n,o,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(o=n;0!=o--;)if(!el(e[o],t[o]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!({}).hasOwnProperty.call(t,i[o]))return!1;for(o=n;0!=o--;){let n=i[o];if(("_owner"!==n||!e.$$typeof)&&!el(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ea(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eu(e,t){let n=ea(e);return Math.round(t*n)/n}function ec(e){let n=t.useRef(e);return es(()=>{n.current=e}),n}let ed=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,o;let{x:i,y:r,placement:s,middlewareData:l}=e,a=await I(e,n);return s===(null==(t=l.offset)?void 0:t.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}),options:[e,t]}};var ef="u"<typeof Element;ef||Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ef||Element.prototype.getRootNode;let ep={...t},ev=ep.useInsertionEffect||(e=>e());function em(e){let n=t.useRef(()=>{});return ev(()=>{n.current=e}),t.useCallback(function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return null==n.current?void 0:n.current(...t)},[])}var eh="u">typeof document?t.useLayoutEffect:t.useEffect;let eb=!1,eg=0,ey=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+eg++,ex=ep.useId||function(){let[e,n]=t.useState(()=>eb?ey():void 0);return eh(()=>{null==e&&n(ey())},[]),t.useEffect(()=>{eb=!0},[]),e},eE=t.createContext(null),eS=t.createContext(null),eP="active",eI="selected";function ew(e,t,n){let o=new Map,i="item"===n,r=e;if(i&&e){let{[eP]:t,[eI]:n,...o}=e;r=o}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...r,...t.map(t=>{let o=t?t[n]:null;return"function"==typeof o?e?o(e):null:o}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,r]=t;if(!(i&&[eP,eI].includes(n)))if(0===n.indexOf("on")){if(o.has(n)||o.set(n,[]),"function"==typeof r){var s;null==(s=o.get(n))||s.push(r),e[n]=function(){for(var e,t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];return null==(e=o.get(n))?void 0:e.map(e=>e(...i)).find(e=>void 0!==e)}}}else e[n]=r}),e),{})}}function eR(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var eT=e.i(129997),eF=e.i(500674),eO=e.i(742231);let eC=(0,t.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});eC.displayName="FloatingContext";let eM=(0,t.createContext)(null);function eD(e,n,i){let r=(0,eT.useDisposables)(),s=(0,eF.useEvent)((e,t)=>{if(null==e)return[i,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[i,null];let n=ek(e,t);return[n,o=>{let i=function e(t){let n=/var\((.*)\)/.exec(t);if(n){let t=n[1].indexOf(",");if(-1===t)return[n[1]];let o=n[1].slice(0,t).trim(),i=n[1].slice(t+1).trim();return i?[o,...e(i)]:[o]}return[]}(e);{let s=i.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function l(){r.nextFrame(l);let a=!1;for(let[e,n]of i.entries()){let o=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==o){s[e]=o,a=!0;break}}if(!a)return;let u=ek(e,t);n!==u&&(o(u),n=u)})}return r.dispose}]}return[i,null]}),l=(0,t.useMemo)(()=>s(e,n)[0],[e,n]),[a=l,u]=(0,t.useState)();return(0,o.useIsoMorphicEffect)(()=>{let[t,o]=s(e,n);if(u(t),o)return o(u)},[e,n]),a}function ek(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 o=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),o}eM.displayName="PlacementContext",e.s(["FloatingProvider",0,function({children:e,enabled:n=!0}){var i,a,u,c,d,x,E,I,w,R,T,F,O;let M,D,k,A,L,B,_,H,K,N,[W,V]=(0,t.useState)(null),[z,$]=(0,t.useState)(0),j=(0,t.useRef)(null),[G,U]=(0,t.useState)(null);I=G,(0,o.useIsoMorphicEffect)(()=>
5{if(!I)return;let e=new MutationObserver(()=>{let e=window.getComputedStyle(I).maxHeight,t=parseFloat(e);if(isNaN(t))return;let n=parseInt(e);isNaN(n)||t!==n&&(I.style.maxHeight=`${Math.ceil(t)}px`)});return e.observe(I,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[I]);let q=n&&null!==W&&null!==G,{to:Q="bottom",gap:Y=0,offset:J=0,padding:X=0,inner:Z}=(w=W,R=G,M=eD(null!=(T=null==w?void 0:w.gap)?T:"var(--anchor-gap, 0)",R),D=eD(null!=(F=null==w?void 0:w.offset)?F:"var(--anchor-offset, 0)",R),k=eD(null!=(O=null==w?void 0:w.padding)?O:"var(--anchor-padding, 0)",R),{...w,gap:M,offset:D,padding:k}),[ee,et="center"]=Q.split(" ");(0,o.useIsoMorphicEffect)(()=>{q&&$(0)},[q]);let{refs:eo,floatingStyles:ef,context:ep}=function(e){void 0===e&&(e={});let{nodeId:n}=e,o=function(e){var n;let{open:o=!1,onOpenChange:i,elements:r}=e,s=ex(),l=t.useRef({}),[a]=t.useState(()=>{let e;return e=new Map,{emit(t,n){var o;null==(o=e.get(t))||o.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter(e=>e!==n))||[])}}}),u=null!=((null==(n=t.useContext(eE))?void 0:n.id)||null),[c,d]=t.useState(r.reference),f=em((e,t,n)=>{l.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==i||i(e,t,n)}),p=t.useMemo(()=>({setPositionReference:d}),[]),v=t.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return t.useMemo(()=>({dataRef:l,open:o,onOpenChange:f,elements:v,events:a,floatingId:s,refs:p}),[o,f,v,a,s,p])}({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||o,r=i.elements,[s,l]=t.useState(null),[a,u]=t.useState(null),c=(null==r?void 0:r.domReference)||s,d=t.useRef(null),f=t.useContext(eS);eh(()=>{c&&(d.current=c)},[c]);let p=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:l}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[d,f]=t.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=t.useState(i);el(p,i)||v(i);let[m,h]=t.useState(null),[b,g]=t.useState(null),y=t.useCallback(e=>{e!==I.current&&(I.current=e,h(e))},[]),x=t.useCallback(e=>{e!==w.current&&(w.current=e,g(e))},[]),E=s||m,P=l||b,I=t.useRef(null),w=t.useRef(null),R=t.useRef(d),T=null!=u,F=ec(u),O=ec(r),C=ec(c),M=t.useCallback(()=>{var e,t;let i,r,s;if(!I.current||!w.current)return;let l={placement:n,strategy:o,middleware:p};O.current&&(l.platform=O.current),(e=I.current,t=w.current,i=new Map,s={...(r={platform:en,...l}).platform,_c:i},S(e,t,{...r,platform:s})).then(e=>{let t={...e,isPositioned:!1!==C.current};D.current&&!el(R.current,t)&&(R.current=t,er.flushSync(()=>{f(t)}))})},[p,n,o,O,C]);es(()=>{!1===c&&R.current.isPositioned&&(R.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);let D=t.useRef(!1);es(()=>(D.current=!0,()=>{D.current=!1}),[]),es(()=>{if(E&&(I.current=E),P&&(w.current=P),E&&P){if(F.current)return F.current(E,P,M);M()}},[E,P,M,F,T]);let k=t.useMemo(()=>({reference:I,floating:w,setReference:y,setFloating:x}),[y,x]),A=t.useMemo(()=>({reference:E,floating:P}),[E,P]),L=t.useMemo(()=>{let e={position:o,left:0,top:0};if(!A.floating)return e;let t=eu(A.floating,d.x),n=eu(A.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...ea(A.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}},[o,a,A.floating,d.x,d.y]);return t.useMemo(()=>({...d,update:M,refs:k,elements:A,floatingStyles:L}),[d,M,k,A,L])}({...e,elements:{...r,...a&&{reference:a}}}),v=t.useCallback(e=>{let t=C(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),m=t.useCallback(e=>{(C(e)||null===e)&&(d.current=e,l(e)),(C(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!C(e))&&p.refs.setReference(e)},[p.refs]),h=t.useMemo(()=>({...p.refs,setReference:m,setPositionReference:v,domReference:d}),[p.refs,m,v]),b=t.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),g=t.useMemo(()=>({...p,...i,refs:h,elements:b,nodeId:n}),[p,h,b,n,i]);return eh(()=>{i.dataRef.current.floatingContext=g;let e=null==f?void 0:f.nodesRef.current.find(e=>e.id===n);e&&(e.context=g)}),t.useMemo(()=>({...p,context:g,refs:h,elements:b}),[p,h,b,g])}({open:q,placement:"selection"===ee?"center"===et?"bottom":`bottom-${et}`:"center"===et?`${ee}`:`${ee}-${et}`,strategy:"absolute",transform:!1,middleware:[ed({mainAxis:"selection"===ee?0:Y,crossAxis:J}),{...{name:"shift",options:a=i={padding:X},async fn(e){let{x:t,y:n,placement:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=f(a,e),d={x:t,y:n},v=await P(e,c),h=b(p(o)),g=m(h),y=d[g],x=d[h];if(i){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=y+v[e],o=y-v[t];y=s(n,r(y,o))}
5if(l){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=x+v[e],o=x-v[t];x=s(n,r(x,o))}let E=u.fn({...e,[g]:y,[h]:x});return{...E,data:{x:E.x-t,y:E.y-n,enabled:{[g]:i,[h]:l}}}}},options:[i,void 0]},"selection"!==ee&&{...{name:"flip",options:c=u={padding:X},async fn(e){var t,n,o,i,r,s,l,a;let u,d,x,{placement:E,middlewareData:S,rects:I,initialPlacement:w,platform:R,elements:T}=e,{mainAxis:F=!0,crossAxis:O=!0,fallbackPlacements:C,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:k=!0,...A}=f(c,e);if(null!=(t=S.arrow)&&t.alignmentOffset)return{};let L=p(E),B=b(w),_=p(w)===w,H=await (null==R.isRTL?void 0:R.isRTL(T.floating)),K=C||(_||!k?[y(w)]:(u=y(w),[g(w),u,g(u)])),N="none"!==D;!C&&N&&K.push(...(d=v(w),x=function(e,t,n){let o=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(n)return t?i:o;return t?o:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(p(w),"start"===D,H),d&&(x=x.map(e=>e+"-"+d),k&&(x=x.concat(x.map(g)))),x));let W=[w,...K],V=await P(e,A),z=[],$=(null==(n=S.flip)?void 0:n.overflows)||[];if(F&&z.push(V[L]),O){let e,t,n,o,i=(s=E,l=I,void 0===(a=H)&&(a=!1),e=v(s),n=h(t=m(b(s))),o="x"===t?e===(a?"end":"start")?"right":"left":"start"===e?"bottom":"top",l.reference[n]>l.floating[n]&&(o=y(o)),[o,y(o)]);z.push(V[i[0]],V[i[1]])}if($=[...$,{placement:E,overflows:z}],!z.every(e=>e<=0)){let e=((null==(o=S.flip)?void 0:o.index)||0)+1,t=W[e];if(t&&("alignment"!==O||B===b(t)||$.every(e=>e.overflows[0]>0&&b(e.placement)===B)))return{data:{index:e,overflows:$},reset:{placement:t}};let n=null==(i=$.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(M){case"bestFit":{let e=null==(r=$.filter(e=>{if(N){let t=b(e.placement);return t===B||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:r[0];e&&(n=e);break}case"initialPlacement":n=w}if(E!==n)return{reset:{placement:n}}}return{}}},options:[u,void 0]},"selection"===ee&&Z?{name:"inner",options:A={...Z,padding:X,overflowRef:j,offset:z,minItemsVisible:4,referenceOverflowThreshold:X,onFallbackChange(e){var t,n;if(!e)return;let o=ep.elements.floating;if(!o)return;let i=parseFloat(getComputedStyle(o).scrollPaddingBottom)||0,r=Math.min(4,o.childElementCount),s=0,l=0;for(let e of null!=(n=null==(t=ep.elements.floating)?void 0:t.childNodes)?n:[])if(eO.isHTMLElement(e)){let t=e.offsetTop,n=t+e.clientHeight+i,a=o.scrollTop,u=a+o.clientHeight;if(t>=a&&n<=u)r--;else{l=Math.max(0,Math.min(n,u)-Math.max(t,a)),s=e.clientHeight;break}}r>=1&&$(e=>{let t=s*r-l+i;return e>=t?e:t})}},async fn(e){let{listRef:t,overflowRef:n,onFallbackChange:o,offset:i=0,index:a=0,minItemsVisible:u=4,referenceOverflowThreshold:c=0,scrollRef:d,...p}=f(A,e),{rects:v,elements:{floating:m}}=e,h=t.current[a],b=(null==d?void 0:d.current)||m,g=m.clientTop||b.clientTop,y=0!==m.clientTop,x=0!==b.clientTop,E=m===b;if(!h)return{};let S={...e,...await ed(-h.offsetTop-m.clientTop-v.reference.height/2-h.offsetHeight/2-i).fn(e)},I=await P(eR(S,b.scrollHeight+g+m.clientTop),p),w=await P(S,{...p,elementContext:"reference"}),R=s(0,I.top),T=S.y+R,F=(b.scrollHeight>b.clientHeight?e=>e:l)(s(0,b.scrollHeight+(y&&E||x?2*g:0)-R-s(0,I.bottom)));if(b.style.maxHeight=F+"px",b.scrollTop=R,o){let e=b.offsetHeight<h.offsetHeight*r(u,t.current.length)-1||w.top>=-c||w.bottom>=-c;er.flushSync(()=>o(e))}return n&&(n.current=await P(eR({...S,y:T},b.offsetHeight+g+m.clientTop),p)),{y:T}}}:null,{...{name:"size",options:x=d={padding:X,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}},async fn(e){var t,n;let o,i,{placement:l,rects:a,platform:u,elements:c}=e,{apply:d=()=>{},...m}=f(x,e),h=await P(e,m),g=p(l),y=v(l),E="y"===b(l),{width:S,height:I}=a.floating;"top"===g||"bottom"===g?(o=g,i=y===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(i=g,o="end"===y?"top":"bottom");let w=I-h.top-h.bottom,R=S-h.left-h.right,T=r(I-h[o],w),F=r(S-h[i],R),O=!e.middlewareData.shift,C=T,M=F;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(M=R),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(C=w),O&&!y){let e=s(h.left,0),t=s(h.right,0),n=s(h.top,0),o=s(h.bottom,0);E?M=S-2*(0!==e||0!==t?e+t:s(h.left,h.right)):C=I-2*(0!==n||0!==o?n+o:s(h.top,h.bottom))}await d({...e,availableWidth:M,availableHeight:C});let D=await u.getDimensions(c.floating);return S!==D.width||I!==D.height?{reset:{rects:!0}}:{}}},options:[d,void 0]}
5].filter(Boolean),whileElementsMounted:ei}),[ev=ee,eb=et]=ep.placement.split("-");"selection"===ee&&(ev="selection");let eg=(0,t.useMemo)(()=>({anchor:[ev,eb].filter(Boolean).join(" ")}),[ev,eb]),{getReferenceProps:ey,getFloatingProps:eP}=(L=(E=[function(e,n){let{open:o,elements:i}=e,{enabled:r=!0,overflowRef:s,scrollRef:l,onChange:a}=n,u=em(a),c=t.useRef(!1),d=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{if(!r)return;function e(e){if(e.ctrlKey||!t||null==s.current)return;let n=e.deltaY,o=s.current.top>=-.5,i=s.current.bottom>=-.5,r=t.scrollHeight-t.clientHeight,l=n<0?-1:1,a=n<0?"max":"min";if(!(t.scrollHeight<=t.clientHeight))if(!o&&n>0||!i&&n<0)e.preventDefault(),er.flushSync(()=>{u(e=>e+Math[a](n,r*l))});else{let e;/firefox/i.test((e=navigator.userAgentData)&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent)&&(t.scrollTop+=n)}}let t=(null==l?void 0:l.current)||i.floating;if(o&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{d.current=t.scrollTop,null!=s.current&&(f.current={...s.current})}),()=>{d.current=null,f.current=null,t.removeEventListener("wheel",e)}},[r,o,i.floating,s,l,u]);let p=t.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){let e=(null==l?void 0:l.current)||i.floating;if(s.current&&e&&c.current){if(null!==d.current){let t=e.scrollTop-d.current;(s.current.bottom<-.5&&t<-1||s.current.top<-.5&&t>1)&&er.flushSync(()=>u(e=>e+t))}requestAnimationFrame(()=>{d.current=e.scrollTop})}}}),[i.floating,u,s,l]);return t.useMemo(()=>r?{floating:p}:{},[r,p])}(ep,{overflowRef:j,onChange:$})]).map(e=>null==e?void 0:e.reference),B=E.map(e=>null==e?void 0:e.floating),_=E.map(e=>null==e?void 0:e.item),H=t.useCallback(e=>ew(e,E,"reference"),L),K=t.useCallback(e=>ew(e,E,"floating"),B),N=t.useCallback(e=>ew(e,E,"item"),_),t.useMemo(()=>({getReferenceProps:H,getFloatingProps:K,getItemProps:N}),[H,K,N])),eI=(0,eF.useEvent)(e=>{U(e),eo.setFloating(e)});return t.createElement(eM.Provider,{value:V},t.createElement(eC.Provider,{value:{setFloating:eI,setReference:eo.setReference,styles:ef,getReferenceProps:ey,getFloatingProps:eP,slot:eg}},e))},"useFloatingPanel",0,function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let n=(0,t.useContext)(eM),i=(0,t.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t})]);(0,o.useIsoMorphicEffect)(()=>{null==n||n(null!=i?i:null)},[n,i]);let r=(0,t.useContext)(eC);return(0,t.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])},"useFloatingPanelProps",0,function(){let{getFloatingProps:e,slot:n}=(0,t.useContext)(eC);return(0,t.useCallback)((...t)=>Object.assign({},e(...t),{"data-anchor":n.anchor}),[e,n])},"useFloatingReference",0,function(){return(0,t.useContext)(eC).setReference},"useFloatingReferenceProps",0,function(){return(0,t.useContext)(eC).getReferenceProps},"useResolvedAnchor",0,function(e){return(0,t.useMemo)(()=>e?"string"==typeof e?{to:e}:e:null,[e])}],427638)},904277,857617,637683,195658,855828,6410,e=>{"use strict";let t,n,o;var i=e.i(90008),r=((t=r||{})[t.Left=0]="Left",t[t.Right=2]="Right",t);e.s(["MouseButton",0,r],857617);var s=e.i(949406),l=e.i(500674);e.s(["useHandleToggle",0,function(e){let t=(0,i.useRef)(null);return{onPointerDown:(0,l.useEvent)(n=>{t.current=n.pointerType,(0,s.isDisabledReactIssue7711)(n.currentTarget)||"mouse"!==n.pointerType||n.button!==r.Left||(n.preventDefault(),e(n))}),onClick:(0,l.useEvent)(n=>{"mouse"!==t.current&&((0,s.isDisabledReactIssue7711)(n.currentTarget)||e(n))})}}],904277);var a=e.i(742231),u=e.i(160481),c=((n=c||{})[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n);function d(e){return[e.screenX,e.screenY]}e.s(["Action",0,{Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},"useQuickRelease",0,function(e,{trigger:t,action:n,close:o,select:r}){let s=(0,i.useRef)(null),l=(0,i.useRef)(null),c=(0,i.useRef)(null);(0,u.useDocumentEvent)(e&&null!==t,"pointerdown",e=>{a.isNode(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(l.current=e.x,c.current=e.y,s.current=e.timeStamp)}),(0,u.useDocumentEvent)(e&&null!==t,"pointerup",e=>{var t,i;let u=s.current;if(null===u||(s.current=null,!a.isHTMLorSVGElement(e.target))||5>Math.abs(e.x-(null!=(t=l.current)?t:e.x))&&5>
5Math.abs(e.y-(null!=(i=c.current)?i:e.y)))return;let d=n(e);switch(d.kind){case 0:return;case 1:e.timeStamp-u>200&&(r(d.target),o());break;case 2:o()}},{capture:!0})}],637683),e.s(["useTrackedPointer",0,function(){let e=(0,i.useRef)([-1,-1]);return{wasMoved(t){let n=d(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=d(t)}}}],195658);var f=((o=f||{})[o.First=0]="First",o[o.Previous=1]="Previous",o[o.Next=2]="Next",o[o.Last=3]="Last",o[o.Specific=4]="Specific",o[o.Nothing=5]="Nothing",o);e.s(["Focus",0,f,"calculateActiveIndex",0,function(e,t){let n=t.resolveItems();if(n.length<=0)return null;let o=t.resolveActiveIndex(),i=null!=o?o:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return o;case 4:for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return o;case 5:return null;default:throw Error("Unexpected object: "+e)}}],855828);var p=e.i(932660);function v(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}e.s(["ElementPositionState",0,{Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}},"computeVisualPosition",0,v,"detectMovement",0,function(e,t,n){let o=(0,p.disposables)();if("Tracked"===t.kind){let i=function(){r!==v(e)&&(o.dispose(),n())},{position:r}=t,s=new ResizeObserver(i);s.observe(e),o.add(()=>s.disconnect()),o.addEventListener(window,"scroll",i,{passive:!0}),o.addEventListener(window,"resize",i)}return()=>o.dispose()}],6410)},97271,e=>{"use strict";var t=e.i(90008);e.s(["useResolveButtonType",0,function(e,n){return(0,t.useMemo)(()=>{var t;if(e.type)return e.type;let o=null!=(t=e.as)?t:"button";if("string"==typeof o&&"button"===o.toLowerCase()||(null==n?void 0:n.tagName)==="BUTTON"&&!n.hasAttribute("type"))return"button"},[e.type,e.as,n])}])},435841,e=>{"use strict";var t=e.i(90008),n=e.i(742231);let o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function i(e){var t,i;let r=null!=(t=e.innerText)?t:"",s=e.cloneNode(!0);if(!n.isHTMLElement(s))return r;let l=!1;for(let e of s.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),l=!0;let a=l?null!=(i=s.innerText)?i:"":r;return o.test(a)&&(a=a.replace(o,"")),a}var r=e.i(500674);e.s(["useTextValue",0,function(e){let n=(0,t.useRef)(""),o=(0,t.useRef)("");return(0,r.useEvent)(()=>{let t=e.current;if(!t)return"";let r=t.innerText;if(n.current===r)return o.current;let s=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():i(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return i(e).trim()})(t).trim().toLowerCase();return n.current=r,o.current=s,s})}],435841)},296495,e=>{"use strict";var t=e.i(90008),n=e.i(809858),o=e.i(601483);e.s(["useTreeWalker",0,function(e,{container:i,accept:r,walk:s}){let l=(0,t.useRef)(r),a=(0,t.useRef)(s);(0,t.useEffect)(()=>{l.current=r,a.current=s},[r,s]),(0,o.useIsoMorphicEffect)(()=>{if(!i||!e)return;let t=(0,n.getOwnerDocument)(i);if(!t)return;let o=l.current,r=a.current,s=Object.assign(e=>o(e),{acceptNode:o}),u=t.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,s,!1);for(;u.nextNode();)r(u.currentNode)},[i,e,l,a])}])},195569,978699,e=>{"use strict";var t=e.i(90008),n=e.i(690908),o=e.i(129997);function i(e={},n=null,o=[]){for(let[s,l]of Object.entries(e))!function e(n,o,s){if
5(Array.isArray(s))for(let[t,i]of s.entries())e(n,r(o,t.toString()),i);else s instanceof Date?n.push([o,s.toISOString()]):"boolean"==typeof s?n.push([o,s?"1":"0"]):"string"==typeof s?n.push([o,s]):"number"==typeof s?n.push([o,`${s}`]):null==s?n.push([o,""]):function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(s)&&!(0,t.isValidElement)(s)&&i(s,o,n)}(o,r(n,s),l);return o}function r(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,n;let o=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(o){for(let t of o.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=o.requestSubmit)||n.call(o)}},"objectToFormEntries",0,i],978699);var s=e.i(766383),l=e.i(953356);let a=(0,t.createContext)(null);function u({children:e}){let o=(0,t.useContext)(a);if(!o)return t.default.createElement(t.default.Fragment,null,e);let{target:i}=o;return i?(0,n.createPortal)(t.default.createElement(t.default.Fragment,null,e),i):null}function c({setForm:e,formId:n}){return(0,t.useEffect)(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:t.default.createElement(l.Hidden,{features:l.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}e.s(["FormFields",0,function({data:e,form:n,disabled:r,onReset:a,overrides:d}){let[f,p]=(0,t.useState)(null),v=(0,o.useDisposables)();return(0,t.useEffect)(()=>{if(a&&f)return v.addEventListener(f,"reset",a)},[f,n,a]),t.default.createElement(u,null,t.default.createElement(c,{setForm:p,formId:n}),i(e).map(([e,o])=>t.default.createElement(l.Hidden,{features:l.HiddenFeatures.Hidden,...(0,s.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:r,name:e,value:o,...d})})))},"FormFieldsProvider",0,function(e){let[n,o]=(0,t.useState)(null);return t.default.createElement(a.Provider,{value:{target:n}},e.children,t.default.createElement(l.Hidden,{features:l.HiddenFeatures.Hidden,ref:o}))}],195569)},533278,e=>{"use strict";var t=e.i(90008);let n=t.default.forwardRef(function({children:e,freeze:n},i){let r=o(n,e);return(0,t.isValidElement)(r)?(0,t.cloneElement)(r,{ref:i}):t.default.createElement(t.default.Fragment,null,r)});function o(e,n){let[o,i]=(0,t.useState)(n);return e||o===n||i(n),e?o:n}e.s(["Frozen",0,n,"useFrozenData",0,o])},282684,764118,e=>{"use strict";var t=e.i(90008);let n=(0,t.createContext)(void 0);function o(){return(0,t.useContext)(n)}e.s(["IdProvider",0,function({id:e,children:o}){return t.default.createElement(n.Provider,{value:e},o)},"useProvidedId",0,o],282684);var i=e.i(500674),r=e.i(601483),s=e.i(51603),l=e.i(426466),a=e.i(201183),u=e.i(742231),c=e.i(766383);let d=(0,t.createContext)(null);function f(){let e=(0,t.useContext)(d);if(null===e){let e=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,f),e}return e}function p(e){var n,o,i;let r=null!=(o=null==(n=(0,t.useContext)(d))?void 0:n.value)?o:void 0;return(null!=(i=null==e?void 0:e.length)?i:0)>0?[r,...e].filter(Boolean).join(" "):r}d.displayName="LabelContext";let v=Object.assign((0,c.forwardRefWithAs)(function(e,n){var d;let p=(0,t.useId)(),v=f(),m=o(),h=(0,a.useDisabled)(),{id:b=`headlessui-label-${p}`,htmlFor:g=null!=m?m:null==(d=v.props)?void 0:d.htmlFor,passive:y=!1,...x}=e,E=(0,l.useSyncRefs)(n);(0,r.useIsoMorphicEffect)(()=>v.register(b),[b,v.register]);let S=(0,i.useEvent)(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&u.isInteractiveElement(e.target))&&(u.isHTMLLabelElement(t)&&e.preventDefault(),v.props&&"onClick"in v.props&&"function"==typeof v.props.onClick&&v.props.onClick(e),u.isHTMLLabelElement(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(u.isHTMLInputElement(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}
5),P=(0,s.useSlot)({...v.slot,disabled:h||!1}),I={ref:E,...v.props,id:b,htmlFor:g,onClick:S};return y&&("onClick"in I&&(delete I.htmlFor,delete I.onClick),"onClick"in x&&delete x.onClick),(0,c.useRender)()({ourProps:I,theirProps:x,slot:P,defaultTag:g?"label":"div",name:v.name||"Label"})}),{});e.s(["Label",0,v,"useLabelContext",0,f,"useLabelledBy",0,p,"useLabels",0,function({inherit:e=!1}={}){let n=p(),[o,r]=(0,t.useState)([]),s=e?[n,...o].filter(Boolean):o;return[s.length>0?s.join(" "):void 0,(0,t.useMemo)(()=>function(e){let n=(0,i.useEvent)(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),o=n.indexOf(e);return -1!==o&&n.splice(o,1),n}))),o=(0,t.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return t.default.createElement(d.Provider,{value:o},e.children)},[r])]}],764118)},949406,e=>{"use strict";var t=e.i(742231);e.s(["isDisabledReactIssue7711",0,function(e){let n=e.parentElement,o=null;for(;n&&!t.isHTMLFieldSetElement(n);)t.isHTMLLegendElement(n)&&(o=n),n=n.parentElement;let i=(null==n?void 0:n.getAttribute("disabled"))==="";return!(i&&function(e){if(!e)return!1;let n=e.previousElementSibling;for(;null!==n;){if(t.isHTMLLegendElement(n))return!1;n=n.previousElementSibling}return!0}(o))&&i}])},637188,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function({html:e,height:t=null,width:n=null,children:r,dataNtpc:s=""}){return(0,i.useEffect)(()=>{s&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${s}`}})},[s]),(0,o.jsxs)(o.Fragment,{children:[r,e?(0,o.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=n?`${n}px`:"auto"},"data-ntpc":s,dangerouslySetInnerHTML:{__html:e}}):null]})};let o=e.r(989385),i=e.r(90008)},739348,(e,t,n)=>{"use strict";let o;var i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.GoogleAnalytics=function(e){let{gaId:t,debugMode:n,dataLayerName:i="dataLayer",nonce:a}=e;return void 0===o&&(o=i),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:` 6 window['${i}'] = window['${i}'] || []; 7 function gtag(){window['${i}'].push(arguments);} 8 gtag('js', new Date()); 9 10 gtag('config', '${t}' ${n?",{ 'debug_mode': true }":""});`},nonce:a}),(0,r.jsx)(l.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:a})]})},n.sendGAEvent=function(){void 0===o?console.warn("@next/third-parties: GA has not been initialized"):window[o]?window[o].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${o} does not exist`)};let r=e.r(989385),s=e.r(90008),l=i(e.r(418845))},212341,(e,t,n)=>{"use strict";var o=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.sendGTMEvent=void 0,n.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:n,dataLayerName:o="dataLayer",auth:a,preview:u,dataLayer:c,nonce:d}=e;l=o;let f=new URL(n||"https://www.googletagmanager.com/gtm.js");return t&&f.searchParams.set("id",t),"dataLayer"!==o&&f.searchParams.set("l",o),a&&f.searchParams.set("gtm_auth",a),u&&(f.searchParams.set("gtm_preview",u),f.searchParams.set("gtm_cookies_win","x")),(0,r.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:` 11 (function(w,l){ 12 w[l]=w[l]||[]; 13 w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); 14 ${c?`w[l].push(${JSON.stringify(c)})`:""} 15 })(window,'${o}');`},nonce:d}),(0,i.jsx)(s.default,{id:"_next-gtm","data-ntpc":"GTM",src:f.href,nonce:d})]})};let i=e.r(989385),r=e.r(90008),s=o(e.r(418845)),l="dataLayer";n.sendGTMEvent=(e,t)=>{let n=t||l;window[n]=window[n]||[],window[n].push(e)}},335115,55460,e=>{"use strict";let t;var n=e.i(90008);let o="u">typeof document?n.default.useLayoutEffect:()=>{},i=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'];
15i.join(":not([hidden]),"),i.push('[tabindex]:not([tabindex="-1"]):not([disabled])'),i.join(':not([hidden]):not([tabindex="-1"]),');let r=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},s=e=>e&&"window"in e&&e.window===e?e:r(e).defaultView||window;function l(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function a(e){var t;let i,r=(0,n.useRef)({isFocused:!1,observer:null});o(()=>{let e=r.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let s=(t=t=>{null==e||e(t)},i=(0,n.useRef)(null),o(()=>{i.current=t},[t]),(0,n.useCallback)((...e)=>{let t=i.current;return null==t?void 0:t(...e)},[]));return(0,n.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){r.current.isFocused=!0;let t=e.target;t.addEventListener("focusout",e=>{r.current.isFocused=!1,t.disabled&&s(l(e)),r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)},{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&t.disabled){var e;null==(e=r.current.observer)||e.disconnect();let n=t===document.activeElement?null:document.activeElement;t.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),r.current.observer.observe(t,{attributes:!0,attributeFilter:["disabled"]})}},[s])}function u(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function c(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function d(e){let t=null;return()=>(null==t&&(t=e()),t)}let f=d(function(){return c(/^Mac/i)}),p=d(function(){return c(/^iPhone/i)}),v=d(function(){return c(/^iPad/i)||f()&&navigator.maxTouchPoints>1}),m=d(function(){return p()||v()});d(function(){return f()||m()}),d(function(){return u(/AppleWebKit/i)&&!h()});let h=d(function(){return u(/Chrome/i)}),b=d(function(){return u(/Android/i)});d(function(){return u(/Firefox/i)});let g={prefix:String(Math.round(1e10*Math.random())),current:0};n.default.createContext(g),n.default.createContext(!1),"u">typeof window&&window.document&&window.document.createElement,new WeakMap;n.default.useId;let y=null,x=new Set,E=new Map,S=!1,P=!1,I={Tab:!0,Escape:!0};function w(e,t){for(let n of x)n(e,t)}function R(e){S=!0,e.metaKey||!f()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(y="keyboard",w("keyboard",e))}
15function T(e){y="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(S=!0,w("pointer",e))}function F(e){(0===e.mozInputSource&&e.isTrusted||(b()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType))&&(S=!0,y="virtual")}function O(e){e.target!==window&&e.target!==document&&e.isTrusted&&(S||P||(y="virtual",w("virtual",e)),S=!1,P=!1)}function C(){S=!1,P=!0}function M(e){if("u"<typeof window||"u"<typeof document||E.get(s(e)))return;let t=s(e),n=r(e),o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){S=!0,o.apply(this,arguments)},n.addEventListener("keydown",R,!0),n.addEventListener("keyup",R,!0),n.addEventListener("click",F,!0),t.addEventListener("focus",O,!0),t.addEventListener("blur",C,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",T,!0),n.addEventListener("pointermove",T,!0),n.addEventListener("pointerup",T,!0)),t.addEventListener("beforeunload",()=>{D(e)},{once:!0}),E.set(t,{focus:o})}let D=(e,t)=>{let n=s(e),o=r(e);t&&o.removeEventListener("DOMContentLoaded",t),E.has(n)&&(n.HTMLElement.prototype.focus=E.get(n).focus,o.removeEventListener("keydown",R,!0),o.removeEventListener("keyup",R,!0),o.removeEventListener("click",F,!0),n.removeEventListener("focus",O,!0),n.removeEventListener("blur",C,!1),"u">typeof PointerEvent&&(o.removeEventListener("pointerdown",T,!0),o.removeEventListener("pointermove",T,!0),o.removeEventListener("pointerup",T,!0)),E.delete(n))};function k(){return"pointer"!==y}"u">typeof document&&("loading"!==(t=r(void 0)).readyState?M(void 0):t.addEventListener("DOMContentLoaded",()=>{M(void 0)}));let A=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function L(e,t){return!!t&&!!e&&e.contains(t)}function B(){let e=(0,n.useRef)(new Map),t=(0,n.useCallback)((t,n,o,i)=>{let r=(null==i?void 0:i.once)?(...t)=>{e.current.delete(o),o(...t)}:o;e.current.set(o,{type:n,eventTarget:t,fn:r,options:i}),t.addEventListener(n,r,i)},[]),o=(0,n.useCallback)((t,n,o,i)=>{var r;let s=(null==(r=e.current.get(o))?void 0:r.fn)||o;t.removeEventListener(n,s,i),e.current.delete(o)},[]),i=(0,n.useCallback)(()=>{e.current.forEach((e,t)=>{o(e.eventTarget,e.type,t,e.options)})},[o]);return(0,n.useEffect)(()=>i,[i]),{addGlobalListener:t,removeGlobalListener:o,removeAllGlobalListeners:i}}e.s(["useFocusRing",0,function(e={}){var t;let{autoFocus:o=!1,isTextInput:i,within:u}=e,c=(0,n.useRef)({isFocused:!1,isFocusVisible:o||k()}
15),[d,f]=(0,n.useState)(!1),[p,v]=(0,n.useState)(()=>c.current.isFocused&&c.current.isFocusVisible),m=(0,n.useCallback)(()=>v(c.current.isFocused&&c.current.isFocusVisible),[]),h=(0,n.useCallback)(e=>{c.current.isFocused=e,f(e),m()},[m]);t={isTextInput:i},M(),(0,n.useEffect)(()=>{let e=(e,n)=>{var o;let i,l,a,u,d;o=!!(null==t?void 0:t.isTextInput),i=r(null==n?void 0:n.target),l="u">typeof window?s(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,a="u">typeof window?s(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,u="u">typeof window?s(null==n?void 0:n.target).HTMLElement:HTMLElement,d="u">typeof window?s(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent,(o=o||i.activeElement instanceof l&&!A.has(i.activeElement.type)||i.activeElement instanceof a||i.activeElement instanceof u&&i.activeElement.isContentEditable)&&"keyboard"===e&&n instanceof d&&!I[n.key]||(e=>{c.current.isFocusVisible=e,m()})(k())};return x.add(e),()=>{x.delete(e)}},[]);let{focusProps:b}=function(e){let{isDisabled:t,onFocus:o,onBlur:i,onFocusChange:s}=e,l=(0,n.useCallback)(e=>{if(e.target===e.currentTarget)return i&&i(e),s&&s(!1),!0},[i,s]),u=a(l),c=(0,n.useCallback)(e=>{var t;let n=r(e.target),i=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();e.target===e.currentTarget&&i===(t=e.nativeEvent,t.target)&&(o&&o(e),s&&s(!0),u(e))},[s,o,u]);return{focusProps:{onFocus:!t&&(o||s||i)?c:void 0,onBlur:!t&&(i||s)?l:void 0}}}({isDisabled:u,onFocusChange:h}),{focusWithinProps:g}=function(e){let{isDisabled:t,onBlurWithin:o,onFocusWithin:i,onFocusWithinChange:s}=e,u=(0,n.useRef)({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:d}=B(),f=(0,n.useCallback)(e=>{e.currentTarget.contains(e.target)&&u.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(u.current.isFocusWithin=!1,d(),o&&o(e),s&&s(!1))},[o,s,u,d]),p=a(f),v=(0,n.useCallback)(e=>{var t;if(!e.currentTarget.contains(e.target))return;let n=r(e.target),o=((e=document)=>e.activeElement)(n);if(!u.current.isFocusWithin&&o===(t=e.nativeEvent,t.target)){i&&i(e),s&&s(!0),u.current.isFocusWithin=!0,p(e);let t=e.currentTarget;c(n,"focus",e=>{if(u.current.isFocusWithin&&!L(t,e.target)){let o=new n.defaultView.FocusEvent("blur",{relatedTarget:e.target});Object.defineProperty(o,"target",{value:t}),Object.defineProperty(o,"currentTarget",{value:t}),f(l(o))}},{capture:!0})}},[i,s,p,c,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:v,onBlur:f}}}({isDisabled:!u,onFocusWithinChange:h});return{isFocused:d,isFocusVisible:p,focusProps:u?g:b}}],335115);let _=!1,H=0;function K(e){"touch"===e.pointerType&&(_=!0,setTimeout(()=>{_=!1},50))}function N(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",K),H++,()=>{!(--H>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",K)}}e.s(["useHover",0,function(e){let{onHoverStart:t,onHoverChange:o,onHoverEnd:i,isDisabled:s}=e,[l,a]=(0,n.useState)(!1),u=(0,n.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,n.useEffect)(N,[]);let{addGlobalListener:c,removeAllGlobalListeners:d}=B(),{hoverProps:f,triggerHoverEnd:p}=(0,n.useMemo)(()=>{let e=(e,t)=>{let n=u.target;u.pointerType="",u.target=null,"touch"!==t&&u.isHovered&&n&&(u.isHovered=!1,d(),i&&i({type:"hoverend",target:n,pointerType:t}),o&&o(!1),a(!1))},n={};return"u">typeof PointerEvent&&(n.onPointerEnter=n=>{_&&"mouse"===n.pointerType||((n,i)=>{if(u.pointerType=i,s||"touch"===i||u.isHovered||!n.currentTarget.contains(n.target))return;u.isHovered=!0;let l=n.currentTarget;u.target=l,c(r(n.target),"pointerover",t=>{u.isHovered&&u.target&&!L(u.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:l,pointerType:i}),o&&o(!0),a(!0)})(n,n.pointerType)},n.onPointerLeave=t=>{!s&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:n,triggerHoverEnd:e}},[t,o,i,s,u,c,d]);return(0,n.useEffect)(()=>{s&&p({currentTarget:u.target},u.pointerType)},[s]),{hoverProps:f,isHovered:l}}],55460)},300914,e=>{"use strict";var t=e.i(989385),n=e.i(96895);e.s(["CloseLink",0,({children:e,href:o,...i})=>{let r=(0,n.useClose)();return(0,t.jsx)("a",{href:o,onClick:e=>{window.location.pathname.replace(/\/$/,"")===(o||"").split("#")[0].replace(/\/$/,"")&&r()},...i,children:e})}])}]); 16 17//# debugId=6a670a28-1c1b-a233-65dd-a72f03447e83
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.