"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7900],{91449:function(e,t){t.Q=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},r=(t||{}).decode||o,i=0;i<e.length;){var l=e.indexOf("=",i);if(-1===l)break;var a=e.indexOf(";",i);if(-1===a)a=e.length;else if(a<l){i=e.lastIndexOf(";",l-1)+1;continue}var u=e.slice(i,l).trim();if(void 0===n[u]){var s=e.slice(l+1,a).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),n[u]=function(e,t){try{return t(e)}catch(t){return e}}(s,r)}i=a+1}return n},t.q=function(e,t,o){var l=o||{},a=l.encode||i;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!r.test(e))throw TypeError("argument name is invalid");var u=a(t);if(u&&!r.test(u))throw TypeError("argument val is invalid");var s=e+"="+u;if(null!=l.maxAge){var c=l.maxAge-0;if(isNaN(c)||!isFinite(c))throw TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(c)}if(l.domain){if(!r.test(l.domain))throw TypeError("option domain is invalid");s+="; Domain="+l.domain}if(l.path){if(!r.test(l.path))throw TypeError("option path is invalid");s+="; Path="+l.path}if(l.expires){var d=l.expires;if("[object Date]"!==n.call(d)&&!(d instanceof Date)||isNaN(d.valueOf()))throw TypeError("option expires is invalid");s+="; Expires="+d.toUTCString()}if(l.httpOnly&&(s+="; HttpOnly"),l.secure&&(s+="; Secure"),l.partitioned&&(s+="; Partitioned"),l.priority)switch("string"==typeof l.priority?l.priority.toLowerCase():l.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(l.sameSite)switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"none":s+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return s};var n=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function i(e){return encodeURIComponent(e)}},89433:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(91449);function o(e,t={}){let n=e&&"j"===e[0]&&":"===e[1]?e.substr(2):e;if(!t.doNotParse)try{return JSON.parse(n)}catch(e){}return e}class i{constructor(e,t={}){var o;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=r.Q(document.cookie),this._checkChanges(e)};let i="undefined"==typeof document?"":document.cookie;this.cookies="string"==typeof(o=e||i)?r.Q(o):"object"==typeof o&&null!==o?o:{},this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=function(){let e=void 0===n.g?void 0:n.g.TEST_HAS_DOCUMENT_COOKIE;return"boolean"==typeof e?e:"object"==typeof document&&"string"==typeof document.cookie}()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach(t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:o(this.cookies[t])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),o(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let n in this.cookies)t[n]=o(this.cookies[n],e);return t}set(e,t,n){n=n?Object.assign(Object.assign({},this.defaultSetOptions),n):this.defaultSetOptions;let o="string"==typeof t?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.q(e,o,n)),this._emitChange({name:e,value:t,options:n})}remove(e,t){let n=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.q(e,"",n)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&1===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&0===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}var l=i},83184:function(e,t,n){n.d(t,{d:function(){return d},f:function(){return c}});var r=n(2265),o=n(6584),i=n(72955),l=n(61463),a=n(41469),u=n(3600);let s=(0,r.createContext)(null);function c(){let[e,t]=(0,r.useState)([]);return[e.length>0?e.join(" "):void 0,(0,r.useMemo)(()=>function(e){let n=(0,o.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),i=(0,r.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return r.createElement(s.Provider,{value:i},e.children)},[t])]}let d=Object.assign((0,u.yV)(function(e,t){let n=(0,i.M)(),{id:o="headlessui-description-".concat(n),...c}=e,d=function e(){let t=(0,r.useContext)(s);if(null===t){let t=Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),f=(0,a.T)(t);(0,l.e)(()=>d.register(o),[o,d.register]);let p={ref:f,...d.props,id:o};return(0,u.sY)({ourProps:p,theirProps:c,slot:d.slot||{},defaultTag:"p",name:d.name||"Description"})}),{})},72059:function(e,t,n){let r,o,i,l,a,u,s;n.d(t,{V:function(){return ey}});var c,d,f=n(2265),p=n.t(f,2),h=n(99299),m=n(6584),v=n(88703);function g(e,t,n,r){let o=(0,v.E)(n);(0,f.useEffect)(()=>{function n(e){o.current(e)}return(e=null!=e?e:window).addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}var E=n(26400),w=n(28043);function y(e){let t=(0,m.z)(e),n=(0,f.useRef)(!1);(0,f.useEffect)(()=>(n.current=!1,()=>{n.current=!0,(0,w.Y)(()=>{n.current&&t()})}),[t])}var b=n(91498);function T(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,f.useMemo)(()=>(0,b.r)(...t),[...t])}var O=n(33856),S=n(41469);function C(e,t,n){let r=(0,v.E)(t);(0,f.useEffect)(()=>{function t(e){r.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)},[e,n])}var L=((r=L||{})[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r);function k(e,t){let n=(0,f.useRef)([]),r=(0,m.z)(e);(0,f.useEffect)(()=>{let e=[...n.current];for(let[o,i]of t.entries())if(n.current[o]!==i){let o=r(t,e);return n.current=t,o}},[r,...t])}var P=n(89080);let A=[];!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&A[0]!==e.target&&(A.unshift(e.target),(A=A.filter(e=>null!=e&&e.isConnected)).splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});var M=n(19309),D=n(5583),N=n(3600);function x(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}var R=((o=R||{})[o.None=1]="None",o[o.InitialFocus=2]="InitialFocus",o[o.TabLock=4]="TabLock",o[o.FocusLock=8]="FocusLock",o[o.RestoreFocus=16]="RestoreFocus",o[o.All=30]="All",o);let F=Object.assign((0,N.yV)(function(e,t){let n,r=(0,f.useRef)(null),o=(0,S.T)(r,t),{initialFocus:i,containers:l,features:a=30,...u}=e;(0,O.H)()||(a=1);let s=T(r);!function(e,t){let{ownerDocument:n}=e,r=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,f.useRef)(A.slice());return k((e,n)=>{let[r]=e,[o]=n;!0===o&&!1===r&&(0,w.Y)(()=>{t.current.splice(0)}),!1===o&&!0===r&&(t.current=A.slice())},[e,A,t]),(0,m.z)(()=>{var e;return null!=(e=t.current.find(e=>null!=e&&e.isConnected))?e:null})}(t);k(()=>{t||(null==n?void 0:n.activeElement)===(null==n?void 0:n.body)&&(0,M.C5)(r())},[t]),y(()=>{t&&(0,M.C5)(r())})}({ownerDocument:s},!!(16&a));let c=function(e,t){let{ownerDocument:n,container:r,initialFocus:o}=e,i=(0,f.useRef)(null),l=(0,E.t)();return k(()=>{if(!t)return;let e=r.current;e&&(0,w.Y)(()=>{if(!l.current)return;let t=null==n?void 0:n.activeElement;if(null!=o&&o.current){if((null==o?void 0:o.current)===t){i.current=t;return}}else if(e.contains(t)){i.current=t;return}null!=o&&o.current?(0,M.C5)(o.current):(0,M.jA)(e,M.TO.First)===M.fE.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=null==n?void 0:n.activeElement})},[t]),i}({ownerDocument:s,container:r,initialFocus:i},!!(2&a));!function(e,t){let{ownerDocument:n,container:r,containers:o,previousActiveElement:i}=e,l=(0,E.t)();g(null==n?void 0:n.defaultView,"focus",e=>{if(!t||!l.current)return;let n=x(o);r.current instanceof HTMLElement&&n.add(r.current);let a=i.current;if(!a)return;let u=e.target;u&&u instanceof HTMLElement?_(n,u)?(i.current=u,(0,M.C5)(u)):(e.preventDefault(),e.stopPropagation(),(0,M.C5)(a)):(0,M.C5)(i.current)},!0)}({ownerDocument:s,container:r,containers:l,previousActiveElement:c},!!(8&a));let d=(n=(0,f.useRef)(0),C("keydown",e=>{"Tab"===e.key&&(n.current=e.shiftKey?1:0)},!0),n),p=(0,m.z)(e=>{let t=r.current;t&&(0,D.E)(d.current,{[L.Forwards]:()=>{(0,M.jA)(t,M.TO.First,{skipElements:[e.relatedTarget]})},[L.Backwards]:()=>{(0,M.jA)(t,M.TO.Last,{skipElements:[e.relatedTarget]})}})}),v=(0,h.G)(),b=(0,f.useRef)(!1);return f.createElement(f.Fragment,null,!!(4&a)&&f.createElement(P._,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:P.A.Focusable}),(0,N.sY)({ourProps:{ref:o,onKeyDown(e){"Tab"==e.key&&(b.current=!0,v.requestAnimationFrame(()=>{b.current=!1}))},onBlur(e){let t=x(l);r.current instanceof HTMLElement&&t.add(r.current);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&(_(t,n)||(b.current?(0,M.jA)(r.current,(0,D.E)(d.current,{[L.Forwards]:()=>M.TO.Next,[L.Backwards]:()=>M.TO.Previous})|M.TO.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&(0,M.C5)(e.target)))}},theirProps:u,defaultTag:"div",name:"FocusTrap"}),!!(4&a)&&f.createElement(P._,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:P.A.Focusable}))}),{features:R});function _(e,t){for(let n of e)if(n.contains(t))return!0;return!1}var H=n(54887),I=n(61463);let j=(0,f.createContext)(!1);function U(e){return f.createElement(j.Provider,{value:e.force},e.children)}var Y=n(54462);let V=f.Fragment,z=f.Fragment,B=(0,f.createContext)(null),W=(0,f.createContext)(null),K=Object.assign((0,N.yV)(function(e,t){let n=(0,f.useRef)(null),r=(0,S.T)((0,S.h)(e=>{n.current=e}),t),o=T(n),i=function(e){let t=(0,f.useContext)(j),n=(0,f.useContext)(B),r=T(e),[o,i]=(0,f.useState)(()=>{if(!t&&null!==n||Y.O.isServer)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)});return(0,f.useEffect)(()=>{null!==o&&(null!=r&&r.body.contains(o)||null==r||r.body.appendChild(o))},[o,r]),(0,f.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),o}(n),[l]=(0,f.useState)(()=>{var e;return Y.O.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null}),a=(0,f.useContext)(W),u=(0,O.H)();return(0,I.e)(()=>{!i||!l||i.contains(l)||(l.setAttribute("data-headlessui-portal",""),i.appendChild(l))},[i,l]),(0,I.e)(()=>{if(l&&a)return a.register(l)},[a,l]),y(()=>{var e;i&&l&&(l instanceof Node&&i.contains(l)&&i.removeChild(l),i.childNodes.length<=0&&(null==(e=i.parentElement)||e.removeChild(i)))}),u&&i&&l?(0,H.createPortal)((0,N.sY)({ourProps:{ref:r},theirProps:e,defaultTag:V,name:"Portal"}),l):null}),{Group:(0,N.yV)(function(e,t){let{target:n,...r}=e,o={ref:(0,S.T)(t)};return f.createElement(B.Provider,{value:n},(0,N.sY)({ourProps:o,theirProps:r,defaultTag:z,name:"Popover.Group"}))})}),{useState:q,useEffect:G,useLayoutEffect:Z,useDebugValue:J}=p;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;let Q=p.useSyncExternalStore;var X=n(70777);function $(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}let ee=(c=()=>new Map,d={PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:(0,X.k)(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT(e){let t,{doc:n,d:r,meta:o}=e,i={doc:n,d:r,meta:function(e){let t={};for(let n of e)Object.assign(t,n(t));return t}(o)},l=[$()?{before(e){let{doc:t,d:n,meta:r}=e;function o(e){return r.containers.flatMap(e=>e()).some(t=>t.contains(e))}n.microTask(()=>{var e;if("auto"!==window.getComputedStyle(t.documentElement).scrollBehavior){let e=(0,X.k)();e.style(t.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>e.dispose()))}let r=null!=(e=window.scrollY)?e:window.pageYOffset,i=null;n.addEventListener(t,"click",e=>{if(e.target instanceof HTMLElement)try{let n=e.target.closest("a");if(!n)return;let{hash:r}=new URL(n.href),l=t.querySelector(r);l&&!o(l)&&(i=l)}catch(e){}},!0),n.addEventListener(t,"touchstart",e=>{if(e.target instanceof HTMLElement){if(o(e.target)){let t=e.target;for(;t.parentElement&&o(t.parentElement);)t=t.parentElement;n.style(t,"overscrollBehavior","contain")}else n.style(e.target,"touchAction","none")}}),n.addEventListener(t,"touchmove",e=>{if(e.target instanceof HTMLElement){if(o(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),n.add(()=>{var e;r!==(null!=(e=window.scrollY)?e:window.pageYOffset)&&window.scrollTo(0,r),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{},{before(e){var n;let{doc:r}=e,o=r.documentElement;t=(null!=(n=r.defaultView)?n:window).innerWidth-o.clientWidth},after(e){let{doc:n,d:r}=e,o=n.documentElement,i=o.clientWidth-o.offsetWidth,l=t-i;r.style(o,"paddingRight","".concat(l,"px"))}},{before(e){let{doc:t,d:n}=e;n.style(t.documentElement,"overflow","hidden")}}];l.forEach(e=>{let{before:t}=e;return null==t?void 0:t(i)}),l.forEach(e=>{let{after:t}=e;return null==t?void 0:t(i)})},SCROLL_ALLOW(e){let{d:t}=e;t.dispose()},TEARDOWN(e){let{doc:t}=e;this.delete(t)}},i=c(),l=new Set,{getSnapshot:()=>i,subscribe:e=>(l.add(e),()=>l.delete(e)),dispatch(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let o=d[e].call(i,...n);o&&(i=o,l.forEach(e=>e()))}});ee.subscribe(()=>{let e=ee.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&ee.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&ee.dispatch("TEARDOWN",n)}});var et=n(72955);let en=new Map,er=new Map;function eo(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];(0,I.e)(()=>{var n;if(!t)return;let r="function"==typeof e?e():e.current;if(!r)return;let o=null!=(n=er.get(r))?n:0;return er.set(r,o+1),0!==o||(en.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(!r)return;let t=null!=(e=er.get(r))?e:1;if(1===t?er.delete(r):er.set(r,t-1),1!==t)return;let n=en.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,en.delete(r))}},[e,t])}function ei(e,t,n){let r=(0,v.E)(t);(0,f.useEffect)(()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}var el=n(53509);let ea=(0,f.createContext)(()=>{});ea.displayName="StackContext";var eu=((a=eu||{})[a.Add=0]="Add",a[a.Remove=1]="Remove",a);function es(e){let{children:t,onUpdate:n,type:r,element:o,enabled:i}=e,l=(0,f.useContext)(ea),a=(0,m.z)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n(...t),l(...t)});return(0,I.e)(()=>{let e=void 0===i||!0===i;return e&&a(0,r,o),()=>{e&&a(1,r,o)}},[a,r,o,i]),f.createElement(ea.Provider,{value:a},t)}var ec=n(47986),ed=n(83184),ef=n(7551),ep=((u=ep||{})[u.Open=0]="Open",u[u.Closed=1]="Closed",u),eh=((s=eh||{})[s.SetTitleId=0]="SetTitleId",s);let em={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},ev=(0,f.createContext)(null);function eg(e){let t=(0,f.useContext)(ev);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Dialog /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,eg),t}return t}function eE(e,t){return(0,D.E)(t.type,em,e,t)}ev.displayName="DialogContext";let ew=N.AN.RenderStrategy|N.AN.Static,ey=Object.assign((0,N.yV)(function(e,t){let n,r,o,i,l,a=(0,et.M)(),{id:u="headlessui-dialog-".concat(a),open:s,onClose:c,initialFocus:d,role:p="dialog",__demoMode:h=!1,...v}=e,[E,w]=(0,f.useState)(0),y=(0,f.useRef)(!1);p="dialog"===p||"alertdialog"===p?p:(y.current||(y.current=!0,console.warn("Invalid role [".concat(p,"] passed to <Dialog />. Only `dialog` and and `alertdialog` are supported. Using `dialog` instead."))),"dialog");let b=(0,el.oJ)();void 0===s&&null!==b&&(s=(b&el.ZM.Open)===el.ZM.Open);let L=(0,f.useRef)(null),k=(0,S.T)(L,t),A=T(L),x=e.hasOwnProperty("open")||null!==b,R=e.hasOwnProperty("onClose");if(!x&&!R)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!x)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!R)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof s)throw Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(s));if("function"!=typeof c)throw Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: ".concat(c));let _=s?0:1,[H,j]=(0,f.useReducer)(eE,{titleId:null,descriptionId:null,panelRef:(0,f.createRef)()}),Y=(0,m.z)(()=>c(!1)),V=(0,m.z)(e=>j({type:0,id:e})),z=!!(0,O.H)()&&!h&&0===_,B=E>1,q=null!==(0,f.useContext)(ev),[G,Z]=(n=(0,f.useContext)(W),r=(0,f.useRef)([]),o=(0,m.z)(e=>(r.current.push(e),n&&n.register(e),()=>i(e))),i=(0,m.z)(e=>{let t=r.current.indexOf(e);-1!==t&&r.current.splice(t,1),n&&n.unregister(e)}),l=(0,f.useMemo)(()=>({register:o,unregister:i,portals:r}),[o,i,r]),[r,(0,f.useMemo)(()=>function(e){let{children:t}=e;return f.createElement(W.Provider,{value:l},t)},[l])]),{resolveContainers:J,mainTreeNodeRef:X,MainTreeNode:en}=function(){var e;let{defaultContainers:t=[],portals:n,mainTreeNodeRef:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=(0,f.useRef)(null!=(e=null==r?void 0:r.current)?e:null),i=T(o),l=(0,m.z)(()=>{var e,r,l;let a=[];for(let e of t)null!==e&&(e instanceof HTMLElement?a.push(e):"current"in e&&e.current instanceof HTMLElement&&a.push(e.current));if(null!=n&&n.current)for(let e of n.current)a.push(e);for(let t of null!=(e=null==i?void 0:i.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(o.current)||t.contains(null==(l=null==(r=o.current)?void 0:r.getRootNode())?void 0:l.host)||a.some(e=>t.contains(e))||a.push(t));return a});return{resolveContainers:l,contains:(0,m.z)(e=>l().some(t=>t.contains(e))),mainTreeNodeRef:o,MainTreeNode:(0,f.useMemo)(()=>function(){return null!=r?null:f.createElement(P._,{features:P.A.Hidden,ref:o})},[o,r])}}({portals:G,defaultContainers:[{get current(){var er;return null!=(er=H.panelRef.current)?er:L.current}}]}),ea=null!==b&&(b&el.ZM.Closing)===el.ZM.Closing,ec=!q&&!ea&&z;eo((0,f.useCallback)(()=>{var e,t;return null!=(t=Array.from(null!=(e=null==A?void 0:A.querySelectorAll("body > *"))?e:[]).find(e=>"headlessui-portal-root"!==e.id&&e.contains(X.current)&&e instanceof HTMLElement))?t:null},[X]),ec);let ep=!!B||z;eo((0,f.useCallback)(()=>{var e,t;return null!=(t=Array.from(null!=(e=null==A?void 0:A.querySelectorAll("[data-headlessui-portal]"))?e:[]).find(e=>e.contains(X.current)&&e instanceof HTMLElement))?t:null},[X]),ep),function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=(0,f.useRef)(!1);function o(n,o){if(!r.current||n.defaultPrevented)return;let i=o(n);if(null!==i&&i.getRootNode().contains(i)&&i.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e)){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(i)||n.composed&&n.composedPath().includes(e))return}return(0,M.sP)(i,M.tJ.Loose)||-1===i.tabIndex||n.preventDefault(),t(n,i)}}(0,f.useEffect)(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);let i=(0,f.useRef)(null);ei("pointerdown",e=>{var t,n;r.current&&(i.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),ei("mousedown",e=>{var t,n;r.current&&(i.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),ei("click",e=>{$()||/Android/gi.test(window.navigator.userAgent)||i.current&&(o(e,()=>i.current),i.current=null)},!0),ei("touchend",e=>o(e,()=>e.target instanceof HTMLElement?e.target:null),!0),C("blur",e=>o(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}(J,e=>{e.preventDefault(),Y()},!(!z||B));let eh=!(B||0!==_);g(null==A?void 0:A.defaultView,"keydown",e=>{eh&&(e.defaultPrevented||e.key===ef.R.Escape&&(e.preventDefault(),e.stopPropagation(),Y()))}),function(e,t){var n;let r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[document.body];n=e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],i]}},r=Q(ee.subscribe,ee.getSnapshot,ee.getSnapshot),(o=e?r.get(e):void 0)&&o.count,(0,I.e)(()=>{if(!(!e||!t))return ee.dispatch("PUSH",e,n),()=>ee.dispatch("POP",e,n)},[t,e])}(A,!(ea||0!==_||q),J),(0,f.useEffect)(()=>{if(0!==_||!L.current)return;let e=new ResizeObserver(e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&Y()}});return e.observe(L.current),()=>e.disconnect()},[_,L,Y]);let[em,eg]=(0,ed.f)(),ey=(0,f.useMemo)(()=>[{dialogState:_,close:Y,setTitleId:V},H],[_,H,Y,V]),eb=(0,f.useMemo)(()=>({open:0===_}),[_]),eT={ref:k,id:u,role:p,"aria-modal":0===_||void 0,"aria-labelledby":H.titleId,"aria-describedby":em};return f.createElement(es,{type:"Dialog",enabled:0===_,element:L,onUpdate:(0,m.z)((e,t)=>{"Dialog"===t&&(0,D.E)(e,{[eu.Add]:()=>w(e=>e+1),[eu.Remove]:()=>w(e=>e-1)})})},f.createElement(U,{force:!0},f.createElement(K,null,f.createElement(ev.Provider,{value:ey},f.createElement(K.Group,{target:L},f.createElement(U,{force:!1},f.createElement(eg,{slot:eb,name:"Dialog.Description"},f.createElement(F,{initialFocus:d,containers:J,features:z?(0,D.E)(B?"parent":"leaf",{parent:F.features.RestoreFocus,leaf:F.features.All&~F.features.FocusLock}):F.features.None},f.createElement(Z,null,(0,N.sY)({ourProps:eT,theirProps:v,slot:eb,defaultTag:"div",features:ew,visible:0===_,name:"Dialog"}))))))))),f.createElement(en,null))}),{Backdrop:(0,N.yV)(function(e,t){let n=(0,et.M)(),{id:r="headlessui-dialog-backdrop-".concat(n),...o}=e,[{dialogState:i},l]=eg("Dialog.Backdrop"),a=(0,S.T)(t);(0,f.useEffect)(()=>{if(null===l.panelRef.current)throw Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=(0,f.useMemo)(()=>({open:0===i}),[i]);return f.createElement(U,{force:!0},f.createElement(K,null,(0,N.sY)({ourProps:{ref:a,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:"div",name:"Dialog.Backdrop"})))}),Panel:(0,N.yV)(function(e,t){let n=(0,et.M)(),{id:r="headlessui-dialog-panel-".concat(n),...o}=e,[{dialogState:i},l]=eg("Dialog.Panel"),a=(0,S.T)(t,l.panelRef),u=(0,f.useMemo)(()=>({open:0===i}),[i]),s=(0,m.z)(e=>{e.stopPropagation()});return(0,N.sY)({ourProps:{ref:a,id:r,onClick:s},theirProps:o,slot:u,defaultTag:"div",name:"Dialog.Panel"})}),Overlay:(0,N.yV)(function(e,t){let n=(0,et.M)(),{id:r="headlessui-dialog-overlay-".concat(n),...o}=e,[{dialogState:i,close:l}]=eg("Dialog.Overlay"),a=(0,S.T)(t),u=(0,m.z)(e=>{if(e.target===e.currentTarget){if((0,ec.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),l()}}),s=(0,f.useMemo)(()=>({open:0===i}),[i]);return(0,N.sY)({ourProps:{ref:a,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:s,defaultTag:"div",name:"Dialog.Overlay"})}),Title:(0,N.yV)(function(e,t){let n=(0,et.M)(),{id:r="headlessui-dialog-title-".concat(n),...o}=e,[{dialogState:i,setTitleId:l}]=eg("Dialog.Title"),a=(0,S.T)(t);(0,f.useEffect)(()=>(l(r),()=>l(null)),[r,l]);let u=(0,f.useMemo)(()=>({open:0===i}),[i]);return(0,N.sY)({ourProps:{ref:a,id:r},theirProps:o,slot:u,defaultTag:"h2",name:"Dialog.Title"})}),Description:ed.d})},7551:function(e,t,n){let r;n.d(t,{R:function(){return o}});var o=((r=o||{}).Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r)},72955:function(e,t,n){n.d(t,{M:function(){return u}});var r,o=n(2265),i=n(54462),l=n(61463),a=n(33856);let u=null!=(r=o.useId)?r:function(){let e=(0,a.H)(),[t,n]=o.useState(e?()=>i.O.nextId():null);return(0,l.e)(()=>{null===t&&n(i.O.nextId())},[t]),null!=t?""+t:void 0}},89080:function(e,t,n){let r;n.d(t,{A:function(){return i},_:function(){return l}});var o=n(3600),i=((r=i||{})[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r);let l=(0,o.yV)(function(e,t){var n;let{features:r=1,...i}=e,l={ref:t,"aria-hidden":(2&r)==2||(null!=(n=i["aria-hidden"])?n:void 0),hidden:(4&r)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&r)==4&&(2&r)!=2&&{display:"none"}}};return(0,o.sY)({ourProps:l,theirProps:i,slot:{},defaultTag:"div",name:"Hidden"})})},47986:function(e,t,n){function r(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}n.d(t,{P:function(){return r}})},19309:function(e,t,n){let r,o,i,l,a;n.d(t,{C5:function(){return g},TO:function(){return d},fE:function(){return f},jA:function(){return w},sP:function(){return m},tJ:function(){return h},z2:function(){return E}});var u=n(5583),s=n(91498);let c=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var d=((r=d||{})[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r),f=((o=f||{})[o.Error=0]="Error",o[o.Overflow=1]="Overflow",o[o.Success=2]="Success",o[o.Underflow=3]="Underflow",o),p=((i=p||{})[i.Previous=-1]="Previous",i[i.Next=1]="Next",i),h=((l=h||{})[l.Strict=0]="Strict",l[l.Loose=1]="Loose",l);function m(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(t=(0,s.r)(e))?void 0:t.body)&&(0,u.E)(n,{0:()=>e.matches(c),1(){let t=e;for(;null!==t;){if(t.matches(c))return!0;t=t.parentElement}return!1}})}var v=((a=v||{})[a.Keyboard=0]="Keyboard",a[a.Mouse=1]="Mouse",a);function g(e){null==e||e.focus({preventScroll:!0})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.slice().sort((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function w(e,t){var n,r,o;let{sorted:i=!0,relativeTo:l=null,skipElements:a=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?i?E(e):e:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(c)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e);a.length>0&&s.length>1&&(s=s.filter(e=>!a.includes(e))),l=null!=l?l:u.activeElement;let d=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,s.indexOf(l))-1;if(4&t)return Math.max(0,s.indexOf(l))+1;if(8&t)return s.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=32&t?{preventScroll:!0}:{},h=0,m=s.length,v;do{if(h>=m||h+m<=0)return 0;let e=f+h;if(16&t)e=(e+m)%m;else{if(e<0)return 3;if(e>=m)return 1}null==(v=s[e])||v.focus(p),h+=d}while(v!==u.activeElement);return 6&t&&null!=(o=null==(r=null==(n=v)?void 0:n.matches)?void 0:r.call(n,"textarea,input"))&&o&&v.select(),2}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0))},91498:function(e,t,n){n.d(t,{r:function(){return o}});var r=n(54462);function o(e){return r.O.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}},84573:function(e,t,n){var r=n(2265);let o=r.forwardRef(function(e,t){let{title:n,titleId:o,...i}=e;return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},i),n?r.createElement("title",{id:o},n):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))});t.Z=o}}]);