From bc49923329568ebde7ec0f53e979280cc3d3d9b3 Mon Sep 17 00:00:00 2001 From: RealKai42 Date: Fri, 8 Nov 2024 16:44:09 +0000 Subject: [PATCH] deploy: 9370375f0c7a3e64709a6a3ade184b41aca80f0e --- ...-3d77e7b6.js => FileSaver.min-4e9dceea.js} | 2 +- ...e80.js => dexie-export-import-db2cea22.js} | 2 +- .../{index-ff4c1fcd.js => index-606673fc.js} | 6 +++--- .../{index-b8cdcbde.js => index-f8e80506.js} | 2 +- .../{index-67a6117b.js => index-fafb9a35.js} | 2 +- index.html | 2 +- weChat-group.jpg | Bin 212148 -> 212914 bytes 7 files changed, 8 insertions(+), 8 deletions(-) rename assets/{FileSaver.min-3d77e7b6.js => FileSaver.min-4e9dceea.js} (97%) rename assets/{dexie-export-import-103a5e80.js => dexie-export-import-db2cea22.js} (99%) rename assets/{index-ff4c1fcd.js => index-606673fc.js} (99%) rename assets/{index-b8cdcbde.js => index-f8e80506.js} (99%) rename assets/{index-67a6117b.js => index-fafb9a35.js} (99%) diff --git a/assets/FileSaver.min-3d77e7b6.js b/assets/FileSaver.min-4e9dceea.js similarity index 97% rename from assets/FileSaver.min-3d77e7b6.js rename to assets/FileSaver.min-4e9dceea.js index 47243fddbc..5b31bc18fb 100644 --- a/assets/FileSaver.min-3d77e7b6.js +++ b/assets/FileSaver.min-4e9dceea.js @@ -1 +1 @@ -import{aC as O,c as d}from"./index-ff4c1fcd.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; +import{aC as O,c as d}from"./index-606673fc.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; diff --git a/assets/dexie-export-import-103a5e80.js b/assets/dexie-export-import-db2cea22.js similarity index 99% rename from assets/dexie-export-import-103a5e80.js rename to assets/dexie-export-import-db2cea22.js index c4c01d1d90..84716ea9c0 100644 --- a/assets/dexie-export-import-103a5e80.js +++ b/assets/dexie-export-import-db2cea22.js @@ -1,4 +1,4 @@ -import{aD as Ce}from"./index-ff4c1fcd.js";/*! ***************************************************************************** +import{aD as Ce}from"./index-606673fc.js";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any diff --git a/assets/index-ff4c1fcd.js b/assets/index-606673fc.js similarity index 99% rename from assets/index-ff4c1fcd.js rename to assets/index-606673fc.js index 9a0165b176..d2a7308f9a 100644 --- a/assets/index-ff4c1fcd.js +++ b/assets/index-606673fc.js @@ -103,12 +103,12 @@ From previous: `);return this._state!==null&&(this._stack=e),e}finally{N$=!1}}}, dark:!bg-gray-800 dark:text-gray-300 dark:shadow-lg dark:shadow-gray-700`,children:[P("div",{className:"flex gap-2",children:[y("img",{src:_ee,alt:"alipay",className:" h-44 rounded shadow-lg shadow-gray-300 dark:shadow-gray-700"}),y("img",{src:wee,alt:"alipay",className:" h-44 rounded shadow-lg shadow-gray-300 dark:shadow-gray-700"})]}),P("span",{className:"mt-3 text-xs font-bold text-gray-500",children:[y(Jee,{className:"mb-[3px] mr-1 inline-block"}),"此贴纸非商品,仅用于感谢您的捐赠,不可用于任何商业用途"]})]})]}),tte=""+new URL("redBook-code-376dffeb.jpg",import.meta.url).href;var rte=Object.defineProperty,nte=(e,t,r)=>t in e?rte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eb=(e,t,r)=>(nte(e,typeof t!="symbol"?t+"":t,r),r);let ate=class{constructor(){eb(this,"current",this.detect()),eb(this,"handoffState","pending"),eb(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},co=new ate,gt=(e,t)=>{co.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function dr(e){let t=p.useRef(e);return gt(()=>{t.current=e},[e]),t}function ND(e,t){let[r,n]=p.useState(e),a=dr(e);return gt(()=>n(a.current),[a,n,...t]),r}function Ru(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $o(){let e=[],t={addEventListener(r,n,a,o){return r.addEventListener(n,a,o),t.add(()=>r.removeEventListener(n,a,o))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Ru(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,a){let o=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:a}),this.add(()=>{Object.assign(r.style,{[n]:o})})},group(r){let n=$o();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let a of e.splice(n,1))a()}},dispose(){for(let r of e.splice(0))r()}};return t}function Vi(){let[e]=p.useState($o);return p.useEffect(()=>()=>e.dispose(),[e]),e}let re=function(e){let t=dr(e);return Y.useCallback((...r)=>t.current(...r),[t])};function ku(){let[e,t]=p.useState(co.isHandoffComplete);return e&&co.isHandoffComplete===!1&&t(!1),p.useEffect(()=>{e!==!0&&t(!0)},[e]),p.useEffect(()=>co.handoff(),[]),e}var tA;let Pt=(tA=Y.useId)!=null?tA:function(){let e=ku(),[t,r]=Y.useState(e?()=>co.nextId():null);return gt(()=>{t===null&&r(co.nextId())},[t]),t!=null?""+t:void 0};function Re(e,t,...r){if(e in t){let a=t[e];return typeof a=="function"?a(...r):a}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Re),n}function Rh(e){return co.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let d2=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var et=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(et||{}),ro=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ro||{}),ote=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ote||{});function V0(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(d2)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var W0=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(W0||{});function JE(e,t=0){var r;return e===((r=Rh(e))==null?void 0:r.body)?!1:Re(t,{[0](){return e.matches(d2)},[1](){let n=e;for(;n!==null;){if(n.matches(d2))return!0;n=n.parentElement}return!1}})}var ite=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ite||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ws(e){e==null||e.focus({preventScroll:!0})}let ste=["textarea","input"].join(",");function lte(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,ste))!=null?r:!1}function Ns(e,t=r=>r){return e.slice().sort((r,n)=>{let a=t(r),o=t(n);if(a===null||o===null)return 0;let i=a.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function qt(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:a=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?r?Ns(e):e:V0(e);a.length>0&&i.length>1&&(i=i.filter(h=>!a.includes(h))),n=n??o.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(n))-1;if(t&4)return Math.max(0,i.indexOf(n))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},f=0,c=i.length,d;do{if(f>=c||f+c<=0)return 0;let h=l+f;if(t&16)h=(h+c)%c;else{if(h<0)return 3;if(h>=c)return 1}d=i[h],d==null||d.focus(u),f+=s}while(d!==o.activeElement);return t&6&<e(d)&&d.select(),2}function tb(e,t,r){let n=dr(t);p.useEffect(()=>{function a(o){n.current(o)}return document.addEventListener(e,a,r),()=>document.removeEventListener(e,a,r)},[e,r])}function eC(e,t,r=!0){let n=p.useRef(!1);p.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function a(i,s){if(!n.current||i.defaultPrevented)return;let l=function f(c){return typeof c=="function"?f(c()):Array.isArray(c)||c instanceof Set?c:[c]}(e),u=s(i);if(u!==null&&u.getRootNode().contains(u)){for(let f of l){if(f===null)continue;let c=f instanceof HTMLElement?f:f.current;if(c!=null&&c.contains(u)||i.composed&&i.composedPath().includes(c))return}return!JE(u,W0.Loose)&&u.tabIndex!==-1&&i.preventDefault(),t(i,u)}}let o=p.useRef(null);tb("mousedown",i=>{var s,l;n.current&&(o.current=((l=(s=i.composedPath)==null?void 0:s.call(i))==null?void 0:l[0])||i.target)},!0),tb("click",i=>{o.current&&(a(i,()=>o.current),o.current=null)},!0),tb("blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rA(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function H0(e,t){let[r,n]=p.useState(()=>rA(e));return gt(()=>{n(rA(e))},[e.type,e.as]),gt(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let LD=Symbol();function MD(e,t=!0){return Object.assign(e,{[LD]:t})}function We(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let r=re(n=>{for(let a of t.current)a!=null&&(typeof a=="function"?a(n):a.current=n)});return e.every(n=>n==null||(n==null?void 0:n[LD]))?void 0:r}function cte(e){throw new Error("Unexpected object: "+e)}var Pr=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Pr||{});function ute(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),a=n??-1,o=(()=>{switch(e.focus){case 0:return r.findIndex(i=>!t.resolveDisabled(i));case 1:{let i=r.slice().reverse().findIndex((s,l,u)=>a!==-1&&u.length-l-1>=a?!1:!t.resolveDisabled(s));return i===-1?i:r.length-1-i}case 2:return r.findIndex((i,s)=>s<=a?!1:!t.resolveDisabled(i));case 3:{let i=r.slice().reverse().findIndex(s=>!t.resolveDisabled(s));return i===-1?i:r.length-1-i}case 4:return r.findIndex(i=>t.resolveId(i)===e.id);case 5:return null;default:cte(e)}})();return o===-1?n:o}function f2(...e){return e.filter(Boolean).join(" ")}var Pn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Pn||{}),no=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(no||{});function Fe({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:a,visible:o=!0,name:i}){let s=DD(t,e);if(o)return Xp(s,r,n,i);let l=a??0;if(l&2){let{static:u=!1,...f}=s;if(u)return Xp(f,r,n,i)}if(l&1){let{unmount:u=!0,...f}=s;return Re(u?0:1,{[0](){return null},[1](){return Xp({...f,hidden:!0,style:{display:"none"}},r,n,i)}})}return Xp(s,r,n,i)}function Xp(e,t={},r,n){let{as:a=r,children:o,refName:i="ref",...s}=rb(e,["unmount","static"]),l=e.ref!==void 0?{[i]:e.ref}:{},u=typeof o=="function"?o(t):o;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let f={};if(t){let c=!1,d=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(c=!0),g===!0&&d.push(h);c&&(f["data-headlessui-state"]=d.join(" "))}if(a===p.Fragment&&Object.keys(Sm(s)).length>0){if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(g=>` - ${g}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` `)].join(` -`));let c=u.props,d=typeof(c==null?void 0:c.className)=="function"?(...g)=>f2(c==null?void 0:c.className(...g),s.className):f2(c==null?void 0:c.className,s.className),h=d?{className:d}:{};return p.cloneElement(u,Object.assign({},DD(u.props,Sm(rb(s,["ref"]))),f,l,dte(u.ref,l.ref),h))}return p.createElement(a,Object.assign({},rb(s,["ref"]),a!==p.Fragment&&l,a!==p.Fragment&&f),u)}function dte(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}}function DD(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let a in n)a.startsWith("on")&&typeof n[a]=="function"?(r[a]!=null||(r[a]=[]),r[a].push(n[a])):t[a]=n[a];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](a,...o){let i=r[n];for(let s of i){if((a instanceof Event||(a==null?void 0:a.nativeEvent)instanceof Event)&&a.defaultPrevented)return;s(a,...o)}}});return t}function Be(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Sm(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function rb(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function kh(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&fte(r)?!1:n}function fte(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function jD(e={},t=null,r=[]){for(let[n,a]of Object.entries(e))BD(r,FD(t,n),a);return r}function FD(e,t){return e?e+"["+t+"]":t}function BD(e,t,r){if(Array.isArray(r))for(let[n,a]of r.entries())BD(e,FD(t,n.toString()),a);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):jD(r,t,e)}function hte(e){var t;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let n of r.elements)if(n.tagName==="INPUT"&&n.type==="submit"||n.tagName==="BUTTON"&&n.type==="submit"||n.nodeName==="INPUT"&&n.type==="image"){n.click();return}}}let pte="div";var Ca=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ca||{});function gte(e,t){let{features:r=1,...n}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Fe({ourProps:a,theirProps:n,slot:{},defaultTag:pte,name:"Hidden"})}let Ta=Be(gte),tC=p.createContext(null);tC.displayName="OpenClosedContext";var ut=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ut||{});function Ou(){return p.useContext(tC)}function rC({value:e,children:t}){return Y.createElement(tC.Provider,{value:e},t)}var ye=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ye||{});function UD(e,t,r){let[n,a]=p.useState(r),o=e!==void 0,i=p.useRef(o),s=p.useRef(!1),l=p.useRef(!1);return o&&!i.current&&!s.current?(s.current=!0,i.current=o):!o&&i.current&&!l.current&&(l.current=!0,i.current=o),[o?e:n,re(u=>(o||a(u),t==null?void 0:t(u)))]}function nC(e,t){let r=p.useRef([]),n=re(e);p.useEffect(()=>{let a=[...r.current];for(let[o,i]of t.entries())if(r.current[o]!==i){let s=n(t,a);return r.current=t,s}},[n,...t])}function nA(e){return[e.screenX,e.screenY]}function vte(){let e=p.useRef([-1,-1]);return{wasMoved(t){let r=nA(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=nA(t)}}}function mte(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yte(e,t,r){let n=dr(t);p.useEffect(()=>{function a(o){n.current(o)}return window.addEventListener(e,a,r),()=>window.removeEventListener(e,a,r)},[e,r])}var Xr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Xr||{});function aC(){let e=p.useRef(0);return yte("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Oh(){let e=p.useRef(!1);return gt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ml(...e){return p.useMemo(()=>Rh(...e),[...e])}function oC(e,t,r,n){let a=dr(r);p.useEffect(()=>{e=e??window;function o(i){a.current(i)}return e.addEventListener(t,o,n),()=>e.removeEventListener(t,o,n)},[e,t,n])}function bte(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function zD(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}let wte="div";var VD=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(VD||{});function _te(e,t){let r=p.useRef(null),n=We(r,t),{initialFocus:a,containers:o,features:i=30,...s}=e;ku()||(i=1);let l=ml(r);Ste({ownerDocument:l},!!(i&16));let u=Ete({ownerDocument:l,container:r,initialFocus:a},!!(i&2));Cte({ownerDocument:l,container:r,containers:o,previousActiveElement:u},!!(i&8));let f=aC(),c=re(m=>{let w=r.current;w&&(v=>v())(()=>{Re(f.current,{[Xr.Forwards]:()=>{qt(w,et.First,{skipElements:[m.relatedTarget]})},[Xr.Backwards]:()=>{qt(w,et.Last,{skipElements:[m.relatedTarget]})}})})}),d=Vi(),h=p.useRef(!1),g={ref:n,onKeyDown(m){m.key=="Tab"&&(h.current=!0,d.requestAnimationFrame(()=>{h.current=!1}))},onBlur(m){let w=zD(o);r.current instanceof HTMLElement&&w.add(r.current);let v=m.relatedTarget;v instanceof HTMLElement&&v.dataset.headlessuiFocusGuard!=="true"&&(WD(w,v)||(h.current?qt(r.current,Re(f.current,{[Xr.Forwards]:()=>et.Next,[Xr.Backwards]:()=>et.Previous})|et.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Ws(m.target)))}};return Y.createElement(Y.Fragment,null,!!(i&4)&&Y.createElement(Ta,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:Ca.Focusable}),Fe({ourProps:g,theirProps:s,defaultTag:wte,name:"FocusTrap"}),!!(i&4)&&Y.createElement(Ta,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:Ca.Focusable}))}let $te=Be(_te),cd=Object.assign($te,{features:VD}),oi=[];bte(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&oi[0]!==t.target&&(oi.unshift(t.target),oi=oi.filter(r=>r!=null&&r.isConnected),oi.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function xte(e=!0){let t=p.useRef(oi.slice());return nC(([r],[n])=>{n===!0&&r===!1&&Ru(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=oi.slice())},[e,oi,t]),re(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function Ste({ownerDocument:e},t){let r=xte(t);nC(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Ws(r())},[t]);let n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,Ru(()=>{n.current&&Ws(r())})}),[])}function Ete({ownerDocument:e,container:t,initialFocus:r},n){let a=p.useRef(null),o=Oh();return nC(()=>{if(!n)return;let i=t.current;i&&Ru(()=>{if(!o.current)return;let s=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===s){a.current=s;return}}else if(i.contains(s)){a.current=s;return}r!=null&&r.current?Ws(r.current):(qt(i,et.First),ro.Error),a.current=e==null?void 0:e.activeElement})},[n]),a}function Cte({ownerDocument:e,container:t,containers:r,previousActiveElement:n},a){let o=Oh();oC(e==null?void 0:e.defaultView,"focus",i=>{if(!a||!o.current)return;let s=zD(r);t.current instanceof HTMLElement&&s.add(t.current);let l=n.current;if(!l)return;let u=i.target;u&&u instanceof HTMLElement?WD(s,u)?(n.current=u,Ws(u)):(i.preventDefault(),i.stopPropagation(),Ws(l)):Ws(n.current)},!0)}function WD(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let HD=p.createContext(!1);function Tte(){return p.useContext(HD)}function h2(e){return Y.createElement(HD.Provider,{value:e.force},e.children)}function Ate(e){let t=Tte(),r=p.useContext(GD),n=ml(e),[a,o]=p.useState(()=>{if(!t&&r!==null||co.isServer)return null;let i=n==null?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return p.useEffect(()=>{a!==null&&(n!=null&&n.body.contains(a)||n==null||n.body.appendChild(a))},[a,n]),p.useEffect(()=>{t||r!==null&&o(r.current)},[r,o,t]),a}let Rte=p.Fragment;function kte(e,t){let r=e,n=p.useRef(null),a=We(MD(f=>{n.current=f}),t),o=ml(n),i=Ate(n),[s]=p.useState(()=>{var f;return co.isServer?null:(f=o==null?void 0:o.createElement("div"))!=null?f:null}),l=ku(),u=p.useRef(!1);return gt(()=>{if(u.current=!1,!(!i||!s))return i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s)),()=>{u.current=!0,Ru(()=>{var f;u.current&&(!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((f=i.parentElement)==null||f.removeChild(i))))})}},[i,s]),l?!i||!s?null:Xi.createPortal(Fe({ourProps:{ref:a},theirProps:r,defaultTag:Rte,name:"Portal"}),s):null}let Ote=p.Fragment,GD=p.createContext(null);function Pte(e,t){let{target:r,...n}=e,a={ref:We(t)};return Y.createElement(GD.Provider,{value:r},Fe({ourProps:a,theirProps:n,defaultTag:Ote,name:"Popover.Group"}))}let Ite=Be(kte),Nte=Be(Pte),p2=Object.assign(Ite,{Group:Nte}),KD=p.createContext(null);function qD(){let e=p.useContext(KD);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,qD),t}return e}function YD(){let[e,t]=p.useState([]);return[e.length>0?e.join(" "):void 0,p.useMemo(()=>function(r){let n=re(o=>(t(i=>[...i,o]),()=>t(i=>{let s=i.slice(),l=s.indexOf(o);return l!==-1&&s.splice(l,1),s}))),a=p.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return Y.createElement(KD.Provider,{value:a},r.children)},[t])]}let Lte="p";function Mte(e,t){let r=Pt(),{id:n=`headlessui-description-${r}`,...a}=e,o=qD(),i=We(t);gt(()=>o.register(n),[n,o.register]);let s={ref:i,...o.props,id:n};return Fe({ourProps:s,theirProps:a,slot:o.slot||{},defaultTag:Lte,name:o.name||"Description"})}let Dte=Be(Mte),XD=Object.assign(Dte,{}),iC=p.createContext(()=>{});iC.displayName="StackContext";var g2=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(g2||{});function jte(){return p.useContext(iC)}function Fte({children:e,onUpdate:t,type:r,element:n,enabled:a}){let o=jte(),i=re((...s)=>{t==null||t(...s),o(...s)});return gt(()=>{let s=a===void 0||a===!0;return s&&i(0,r,n),()=>{s&&i(1,r,n)}},[i,r,n,a]),Y.createElement(iC.Provider,{value:i},e)}function Bte(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Ute=typeof Object.is=="function"?Object.is:Bte,{useState:zte,useEffect:Vte,useLayoutEffect:Wte,useDebugValue:Hte}=qs;function Gte(e,t,r){const n=t(),[{inst:a},o]=zte({inst:{value:n,getSnapshot:t}});return Wte(()=>{a.value=n,a.getSnapshot=t,nb(a)&&o({inst:a})},[e,n,t]),Vte(()=>(nb(a)&&o({inst:a}),e(()=>{nb(a)&&o({inst:a})})),[e]),Hte(n),n}function nb(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!Ute(r,n)}catch{return!0}}function Kte(e,t,r){return t()}const qte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yte=!qte,Xte=Yte?Kte:Gte,Zte="useSyncExternalStore"in qs?(e=>e.useSyncExternalStore)(qs):Xte;function Qte(e){return Zte(e.subscribe,e.getSnapshot,e.getSnapshot)}function Jte(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(a){return n.add(a),()=>n.delete(a)},dispatch(a,...o){let i=t[a].call(r,...o);i&&(r=i,n.forEach(s=>s()))}}}function ere(){let e;return{before({doc:t}){var r;let n=t.documentElement;e=((r=t.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:t,d:r}){let n=t.documentElement,a=n.clientWidth-n.offsetWidth,o=e-a;r.style(n,"paddingRight",`${o}px`)}}}function tre(){if(!mte())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:r,meta:n}){function a(i){return n.containers.flatMap(s=>s()).some(s=>s.contains(i))}r.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let o=null;r.addEventListener(t,"click",i=>{if(i.target instanceof HTMLElement)try{let s=i.target.closest("a");if(!s)return;let{hash:l}=new URL(s.href),u=t.querySelector(l);u&&!a(u)&&(o=u)}catch{}},!0),r.addEventListener(t,"touchmove",i=>{i.target instanceof HTMLElement&&!a(i.target)&&i.preventDefault()},{passive:!1}),r.add(()=>{window.scrollTo(0,window.pageYOffset+e),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})}}}function rre(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function nre(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Ls=Jte(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:$o(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:nre(r)},a=[tre(),ere(),rre()];a.forEach(({before:o})=>o==null?void 0:o(n)),a.forEach(({after:o})=>o==null?void 0:o(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ls.subscribe(()=>{let e=Ls.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",a=r.count!==0;(a&&!n||!a&&n)&&Ls.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Ls.dispatch("TEARDOWN",r)}});function are(e,t,r){let n=Qte(Ls),a=e?n.get(e):void 0,o=a?a.count>0:!1;return gt(()=>{if(!(!e||!t))return Ls.dispatch("PUSH",e,r),()=>Ls.dispatch("POP",e,r)},[t,e]),o}let ab=new Map,ud=new Map;function aA(e,t=!0){gt(()=>{var r;if(!t)return;let n=typeof e=="function"?e():e.current;if(!n)return;function a(){var i;if(!n)return;let s=(i=ud.get(n))!=null?i:1;if(s===1?ud.delete(n):ud.set(n,s-1),s!==1)return;let l=ab.get(n);l&&(l["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",l["aria-hidden"]),n.inert=l.inert,ab.delete(n))}let o=(r=ud.get(n))!=null?r:0;return ud.set(n,o+1),o!==0||(ab.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),a},[e,t])}var ore=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ore||{}),ire=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ire||{});let sre={[0](e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Em=p.createContext(null);Em.displayName="DialogContext";function Ph(e){let t=p.useContext(Em);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ph),r}return t}function lre(e,t,r=()=>[document.body]){are(e,t,n=>{var a;return{containers:[...(a=n.containers)!=null?a:[],r]}})}function cre(e,t){return Re(t.type,sre,e,t)}let ure="div",dre=Pn.RenderStrategy|Pn.Static;function fre(e,t){let r=Pt(),{id:n=`headlessui-dialog-${r}`,open:a,onClose:o,initialFocus:i,__demoMode:s=!1,...l}=e,[u,f]=p.useState(0),c=Ou();a===void 0&&c!==null&&(a=(c&ut.Open)===ut.Open);let d=p.useRef(null),h=We(d,t),g=p.useRef(null),m=ml(d),w=e.hasOwnProperty("open")||c!==null,v=e.hasOwnProperty("onClose");if(!w&&!v)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!w)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!v)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof a!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${a}`);if(typeof o!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${o}`);let b=a?0:1,[_,$]=p.useReducer(cre,{titleId:null,descriptionId:null,panelRef:p.createRef()}),C=re(()=>o(!1)),k=re(K=>$({type:0,id:K})),x=ku()?s?!1:b===0:!1,S=u>1,A=p.useContext(Em)!==null,O=S?"parent":"leaf",L=c!==null?(c&ut.Closing)===ut.Closing:!1,I=(()=>A||L?!1:x)(),N=p.useCallback(()=>{var K,Q;return(Q=Array.from((K=m==null?void 0:m.querySelectorAll("body > *"))!=null?K:[]).find(J=>J.id==="headlessui-portal-root"?!1:J.contains(g.current)&&J instanceof HTMLElement))!=null?Q:null},[g]);aA(N,I);let E=(()=>S?!0:x)(),R=p.useCallback(()=>{var K,Q;return(Q=Array.from((K=m==null?void 0:m.querySelectorAll("[data-headlessui-portal]"))!=null?K:[]).find(J=>J.contains(g.current)&&J instanceof HTMLElement))!=null?Q:null},[g]);aA(R,E);let F=re(()=>{var K,Q;return[...Array.from((K=m==null?void 0:m.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?K:[]).filter(J=>!(J===document.body||J===document.head||!(J instanceof HTMLElement)||J.contains(g.current)||_.panelRef.current&&J.contains(_.panelRef.current))),(Q=_.panelRef.current)!=null?Q:d.current]}),B=(()=>!(!x||S))();eC(()=>F(),C,B);let j=(()=>!(S||b!==0))();oC(m==null?void 0:m.defaultView,"keydown",K=>{j&&(K.defaultPrevented||K.key===ye.Escape&&(K.preventDefault(),K.stopPropagation(),C()))});let M=(()=>!(L||b!==0||A))();lre(m,M,F),p.useEffect(()=>{if(b!==0||!d.current)return;let K=new ResizeObserver(Q=>{for(let J of Q){let de=J.target.getBoundingClientRect();de.x===0&&de.y===0&&de.width===0&&de.height===0&&C()}});return K.observe(d.current),()=>K.disconnect()},[b,d,C]);let[D,U]=YD(),V=p.useMemo(()=>[{dialogState:b,close:C,setTitleId:k},_],[b,_,C,k]),G=p.useMemo(()=>({open:b===0}),[b]),H={ref:h,id:n,role:"dialog","aria-modal":b===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":D};return Y.createElement(Fte,{type:"Dialog",enabled:b===0,element:d,onUpdate:re((K,Q)=>{Q==="Dialog"&&Re(K,{[g2.Add]:()=>f(J=>J+1),[g2.Remove]:()=>f(J=>J-1)})})},Y.createElement(h2,{force:!0},Y.createElement(p2,null,Y.createElement(Em.Provider,{value:V},Y.createElement(p2.Group,{target:d},Y.createElement(h2,{force:!1},Y.createElement(U,{slot:G,name:"Dialog.Description"},Y.createElement(cd,{initialFocus:i,containers:F,features:x?Re(O,{parent:cd.features.RestoreFocus,leaf:cd.features.All&~cd.features.FocusLock}):cd.features.None},Fe({ourProps:H,theirProps:l,slot:G,defaultTag:ure,features:dre,visible:b===0,name:"Dialog"})))))))),Y.createElement(Ta,{features:Ca.Hidden,ref:g}))}let hre="div";function pre(e,t){let r=Pt(),{id:n=`headlessui-dialog-overlay-${r}`,...a}=e,[{dialogState:o,close:i}]=Ph("Dialog.Overlay"),s=We(t),l=re(f=>{if(f.target===f.currentTarget){if(kh(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),i()}}),u=p.useMemo(()=>({open:o===0}),[o]);return Fe({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:l},theirProps:a,slot:u,defaultTag:hre,name:"Dialog.Overlay"})}let gre="div";function vre(e,t){let r=Pt(),{id:n=`headlessui-dialog-backdrop-${r}`,...a}=e,[{dialogState:o},i]=Ph("Dialog.Backdrop"),s=We(t);p.useEffect(()=>{if(i.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[i.panelRef]);let l=p.useMemo(()=>({open:o===0}),[o]);return Y.createElement(h2,{force:!0},Y.createElement(p2,null,Fe({ourProps:{ref:s,id:n,"aria-hidden":!0},theirProps:a,slot:l,defaultTag:gre,name:"Dialog.Backdrop"})))}let mre="div";function yre(e,t){let r=Pt(),{id:n=`headlessui-dialog-panel-${r}`,...a}=e,[{dialogState:o},i]=Ph("Dialog.Panel"),s=We(t,i.panelRef),l=p.useMemo(()=>({open:o===0}),[o]),u=re(f=>{f.stopPropagation()});return Fe({ourProps:{ref:s,id:n,onClick:u},theirProps:a,slot:l,defaultTag:mre,name:"Dialog.Panel"})}let bre="h2";function wre(e,t){let r=Pt(),{id:n=`headlessui-dialog-title-${r}`,...a}=e,[{dialogState:o,setTitleId:i}]=Ph("Dialog.Title"),s=We(t);p.useEffect(()=>(i(n),()=>i(null)),[n,i]);let l=p.useMemo(()=>({open:o===0}),[o]);return Fe({ourProps:{ref:s,id:n},theirProps:a,slot:l,defaultTag:bre,name:"Dialog.Title"})}let _re=Be(fre),$re=Be(vre),xre=Be(yre),Sre=Be(pre),Ere=Be(wre),yr=Object.assign(_re,{Backdrop:$re,Panel:xre,Overlay:Sre,Title:Ere,Description:XD});var Cre=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Cre||{}),Tre=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Tre||{}),Are=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Are||{}),Rre=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Rre||{});function ob(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=Ns(t(e.options.slice()),o=>o.dataRef.current.domRef.current),a=r?n.indexOf(r):null;return a===-1&&(a=null),{options:n,activeOptionIndex:a}}let kre={[1](e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},[0](e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(a=>r(a.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t}},[2](e,t){var r;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=ob(e),a=ute(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeOptionIndex:a,activationTrigger:(r=t.trigger)!=null?r:1}},[3]:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(n))}),o=a?e.options.indexOf(a):-1;return o===-1||o===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:o,activationTrigger:1}},[4](e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},[5]:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=ob(e,a=>[...a,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},[6]:(e,t)=>{let r=ob(e,n=>{let a=n.findIndex(o=>o.id===t.id);return a!==-1&&n.splice(a,1),n});return{...e,...r,activationTrigger:1}},[7]:(e,t)=>({...e,labelId:t.id})},sC=p.createContext(null);sC.displayName="ListboxActionsContext";function Ih(e){let t=p.useContext(sC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ih),r}return t}let lC=p.createContext(null);lC.displayName="ListboxDataContext";function Nh(e){let t=p.useContext(lC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Nh),r}return t}function Ore(e,t){return Re(t.type,kre,e,t)}let Pre=p.Fragment;function Ire(e,t){let{value:r,defaultValue:n,form:a,name:o,onChange:i,by:s=(H,K)=>H===K,disabled:l=!1,horizontal:u=!1,multiple:f=!1,...c}=e;const d=u?"horizontal":"vertical";let h=We(t),[g=f?[]:void 0,m]=UD(r,i,n),[w,v]=p.useReducer(Ore,{dataRef:p.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),b=p.useRef({static:!1,hold:!1}),_=p.useRef(null),$=p.useRef(null),C=p.useRef(null),k=re(typeof s=="string"?(H,K)=>{let Q=s;return(H==null?void 0:H[Q])===(K==null?void 0:K[Q])}:s),x=p.useCallback(H=>Re(S.mode,{[1]:()=>g.some(K=>k(K,H)),[0]:()=>k(g,H)}),[g]),S=p.useMemo(()=>({...w,value:g,disabled:l,mode:f?1:0,orientation:d,compare:k,isSelected:x,optionsPropsRef:b,labelRef:_,buttonRef:$,optionsRef:C}),[g,l,f,w]);gt(()=>{w.dataRef.current=S},[S]),eC([S.buttonRef,S.optionsRef],(H,K)=>{var Q;v({type:1}),JE(K,W0.Loose)||(H.preventDefault(),(Q=S.buttonRef.current)==null||Q.focus())},S.listboxState===0);let A=p.useMemo(()=>({open:S.listboxState===0,disabled:l,value:g}),[S,l,g]),O=re(H=>{let K=S.options.find(Q=>Q.id===H);K&&B(K.dataRef.current.value)}),L=re(()=>{if(S.activeOptionIndex!==null){let{dataRef:H,id:K}=S.options[S.activeOptionIndex];B(H.current.value),v({type:2,focus:Pr.Specific,id:K})}}),I=re(()=>v({type:0})),N=re(()=>v({type:1})),E=re((H,K,Q)=>H===Pr.Specific?v({type:2,focus:Pr.Specific,id:K,trigger:Q}):v({type:2,focus:H,trigger:Q})),R=re((H,K)=>(v({type:5,id:H,dataRef:K}),()=>v({type:6,id:H}))),F=re(H=>(v({type:7,id:H}),()=>v({type:7,id:null}))),B=re(H=>Re(S.mode,{[0](){return m==null?void 0:m(H)},[1](){let K=S.value.slice(),Q=K.findIndex(J=>k(J,H));return Q===-1?K.push(H):K.splice(Q,1),m==null?void 0:m(K)}})),j=re(H=>v({type:3,value:H})),M=re(()=>v({type:4})),D=p.useMemo(()=>({onChange:B,registerOption:R,registerLabel:F,goToOption:E,closeListbox:N,openListbox:I,selectActiveOption:L,selectOption:O,search:j,clearSearch:M}),[]),U={ref:h},V=p.useRef(null),G=Vi();return p.useEffect(()=>{V.current&&n!==void 0&&G.addEventListener(V.current,"reset",()=>{B(n)})},[V,B]),Y.createElement(sC.Provider,{value:D},Y.createElement(lC.Provider,{value:S},Y.createElement(rC,{value:Re(S.listboxState,{[0]:ut.Open,[1]:ut.Closed})},o!=null&&g!=null&&jD({[o]:g}).map(([H,K],Q)=>Y.createElement(Ta,{features:Ca.Hidden,ref:Q===0?J=>{var de;V.current=(de=J==null?void 0:J.closest("form"))!=null?de:null}:void 0,...Sm({key:H,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,name:H,value:K})})),Fe({ourProps:U,theirProps:c,slot:A,defaultTag:Pre,name:"Listbox"}))))}let Nre="button";function Lre(e,t){var r;let n=Pt(),{id:a=`headlessui-listbox-button-${n}`,...o}=e,i=Nh("Listbox.Button"),s=Ih("Listbox.Button"),l=We(i.buttonRef,t),u=Vi(),f=re(w=>{switch(w.key){case ye.Space:case ye.Enter:case ye.ArrowDown:w.preventDefault(),s.openListbox(),u.nextFrame(()=>{i.value||s.goToOption(Pr.First)});break;case ye.ArrowUp:w.preventDefault(),s.openListbox(),u.nextFrame(()=>{i.value||s.goToOption(Pr.Last)});break}}),c=re(w=>{switch(w.key){case ye.Space:w.preventDefault();break}}),d=re(w=>{if(kh(w.currentTarget))return w.preventDefault();i.listboxState===0?(s.closeListbox(),u.nextFrame(()=>{var v;return(v=i.buttonRef.current)==null?void 0:v.focus({preventScroll:!0})})):(w.preventDefault(),s.openListbox())}),h=ND(()=>{if(i.labelId)return[i.labelId,a].join(" ")},[i.labelId,a]),g=p.useMemo(()=>({open:i.listboxState===0,disabled:i.disabled,value:i.value}),[i]),m={ref:l,id:a,type:H0(e,i.buttonRef),"aria-haspopup":"listbox","aria-controls":(r=i.optionsRef.current)==null?void 0:r.id,"aria-expanded":i.disabled?void 0:i.listboxState===0,"aria-labelledby":h,disabled:i.disabled,onKeyDown:f,onKeyUp:c,onClick:d};return Fe({ourProps:m,theirProps:o,slot:g,defaultTag:Nre,name:"Listbox.Button"})}let Mre="label";function Dre(e,t){let r=Pt(),{id:n=`headlessui-listbox-label-${r}`,...a}=e,o=Nh("Listbox.Label"),i=Ih("Listbox.Label"),s=We(o.labelRef,t);gt(()=>i.registerLabel(n),[n]);let l=re(()=>{var f;return(f=o.buttonRef.current)==null?void 0:f.focus({preventScroll:!0})}),u=p.useMemo(()=>({open:o.listboxState===0,disabled:o.disabled}),[o]);return Fe({ourProps:{ref:s,id:n,onClick:l},theirProps:a,slot:u,defaultTag:Mre,name:"Listbox.Label"})}let jre="ul",Fre=Pn.RenderStrategy|Pn.Static;function Bre(e,t){var r;let n=Pt(),{id:a=`headlessui-listbox-options-${n}`,...o}=e,i=Nh("Listbox.Options"),s=Ih("Listbox.Options"),l=We(i.optionsRef,t),u=Vi(),f=Vi(),c=Ou(),d=(()=>c!==null?(c&ut.Open)===ut.Open:i.listboxState===0)();p.useEffect(()=>{var v;let b=i.optionsRef.current;b&&i.listboxState===0&&b!==((v=Rh(b))==null?void 0:v.activeElement)&&b.focus({preventScroll:!0})},[i.listboxState,i.optionsRef]);let h=re(v=>{switch(f.dispose(),v.key){case ye.Space:if(i.searchQuery!=="")return v.preventDefault(),v.stopPropagation(),s.search(v.key);case ye.Enter:if(v.preventDefault(),v.stopPropagation(),i.activeOptionIndex!==null){let{dataRef:b}=i.options[i.activeOptionIndex];s.onChange(b.current.value)}i.mode===0&&(s.closeListbox(),$o().nextFrame(()=>{var b;return(b=i.buttonRef.current)==null?void 0:b.focus({preventScroll:!0})}));break;case Re(i.orientation,{vertical:ye.ArrowDown,horizontal:ye.ArrowRight}):return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.Next);case Re(i.orientation,{vertical:ye.ArrowUp,horizontal:ye.ArrowLeft}):return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.Previous);case ye.Home:case ye.PageUp:return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.First);case ye.End:case ye.PageDown:return v.preventDefault(),v.stopPropagation(),s.goToOption(Pr.Last);case ye.Escape:return v.preventDefault(),v.stopPropagation(),s.closeListbox(),u.nextFrame(()=>{var b;return(b=i.buttonRef.current)==null?void 0:b.focus({preventScroll:!0})});case ye.Tab:v.preventDefault(),v.stopPropagation();break;default:v.key.length===1&&(s.search(v.key),f.setTimeout(()=>s.clearSearch(),350));break}}),g=ND(()=>{var v,b,_;return(_=(v=i.labelRef.current)==null?void 0:v.id)!=null?_:(b=i.buttonRef.current)==null?void 0:b.id},[i.labelRef.current,i.buttonRef.current]),m=p.useMemo(()=>({open:i.listboxState===0}),[i]),w={"aria-activedescendant":i.activeOptionIndex===null||(r=i.options[i.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":i.mode===1?!0:void 0,"aria-labelledby":g,"aria-orientation":i.orientation,id:a,onKeyDown:h,role:"listbox",tabIndex:0,ref:l};return Fe({ourProps:w,theirProps:o,slot:m,defaultTag:jre,features:Fre,visible:d,name:"Listbox.Options"})}let Ure="li";function zre(e,t){let r=Pt(),{id:n=`headlessui-listbox-option-${r}`,disabled:a=!1,value:o,...i}=e,s=Nh("Listbox.Option"),l=Ih("Listbox.Option"),u=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===n:!1,f=s.isSelected(o),c=p.useRef(null),d=dr({disabled:a,value:o,domRef:c,get textValue(){var C,k;return(k=(C=c.current)==null?void 0:C.textContent)==null?void 0:k.toLowerCase()}}),h=We(t,c);gt(()=>{if(s.listboxState!==0||!u||s.activationTrigger===0)return;let C=$o();return C.requestAnimationFrame(()=>{var k,x;(x=(k=c.current)==null?void 0:k.scrollIntoView)==null||x.call(k,{block:"nearest"})}),C.dispose},[c,u,s.listboxState,s.activationTrigger,s.activeOptionIndex]),gt(()=>l.registerOption(n,d),[d,n]);let g=re(C=>{if(a)return C.preventDefault();l.onChange(o),s.mode===0&&(l.closeListbox(),$o().nextFrame(()=>{var k;return(k=s.buttonRef.current)==null?void 0:k.focus({preventScroll:!0})}))}),m=re(()=>{if(a)return l.goToOption(Pr.Nothing);l.goToOption(Pr.Specific,n)}),w=vte(),v=re(C=>w.update(C)),b=re(C=>{w.wasMoved(C)&&(a||u||l.goToOption(Pr.Specific,n,0))}),_=re(C=>{w.wasMoved(C)&&(a||u&&l.goToOption(Pr.Nothing))}),$=p.useMemo(()=>({active:u,selected:f,disabled:a}),[u,f,a]);return Fe({ourProps:{id:n,ref:h,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:v,onMouseEnter:v,onPointerMove:b,onMouseMove:b,onPointerLeave:_,onMouseLeave:_},theirProps:i,slot:$,defaultTag:Ure,name:"Listbox.Option"})}let Vre=Be(Ire),Wre=Be(Lre),Hre=Be(Dre),Gre=Be(Bre),Kre=Be(zre),ur=Object.assign(Vre,{Button:Wre,Label:Hre,Options:Gre,Option:Kre});var qre=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(qre||{}),Yre=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(Yre||{});let Xre={[0]:e=>({...e,popoverState:Re(e.popoverState,{[0]:1,[1]:0})}),[1](e){return e.popoverState===1?e:{...e,popoverState:1}},[2](e,t){return e.button===t.button?e:{...e,button:t.button}},[3](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[4](e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},[5](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},cC=p.createContext(null);cC.displayName="PopoverContext";function G0(e){let t=p.useContext(cC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,G0),r}return t}let uC=p.createContext(null);uC.displayName="PopoverAPIContext";function dC(e){let t=p.useContext(uC);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,dC),r}return t}let fC=p.createContext(null);fC.displayName="PopoverGroupContext";function ZD(){return p.useContext(fC)}let K0=p.createContext(null);K0.displayName="PopoverPanelContext";function Zre(){return p.useContext(K0)}function Qre(e,t){return Re(t.type,Xre,e,t)}let Jre="div";function ene(e,t){var r;let n=p.useRef(null),a=We(t,MD(I=>{n.current=I})),o=p.useRef([]),i=p.useReducer(Qre,{popoverState:1,buttons:o,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:p.createRef(),afterPanelSentinel:p.createRef()}),[{popoverState:s,button:l,buttonId:u,panel:f,panelId:c,beforePanelSentinel:d,afterPanelSentinel:h},g]=i,m=ml((r=n.current)!=null?r:l),w=p.useMemo(()=>{if(!l||!f)return!1;for(let j of document.querySelectorAll("body > *"))if(Number(j==null?void 0:j.contains(l))^Number(j==null?void 0:j.contains(f)))return!0;let I=V0(),N=I.indexOf(l),E=(N+I.length-1)%I.length,R=(N+1)%I.length,F=I[E],B=I[R];return!f.contains(F)&&!f.contains(B)},[l,f]),v=dr(u),b=dr(c),_=p.useMemo(()=>({buttonId:v,panelId:b,close:()=>g({type:1})}),[v,b,g]),$=ZD(),C=$==null?void 0:$.registerPopover,k=re(()=>{var I;return(I=$==null?void 0:$.isFocusWithinPopoverGroup())!=null?I:(m==null?void 0:m.activeElement)&&((l==null?void 0:l.contains(m.activeElement))||(f==null?void 0:f.contains(m.activeElement)))});p.useEffect(()=>C==null?void 0:C(_),[C,_]),oC(m==null?void 0:m.defaultView,"focus",I=>{var N,E,R,F;s===0&&(k()||l&&f&&I.target!==window&&((E=(N=d.current)==null?void 0:N.contains)!=null&&E.call(N,I.target)||(F=(R=h.current)==null?void 0:R.contains)!=null&&F.call(R,I.target)||g({type:1})))},!0),eC([l,f],(I,N)=>{g({type:1}),JE(N,W0.Loose)||(I.preventDefault(),l==null||l.focus())},s===0);let x=re(I=>{g({type:1});let N=(()=>I?I instanceof HTMLElement?I:"current"in I&&I.current instanceof HTMLElement?I.current:l:l)();N==null||N.focus()}),S=p.useMemo(()=>({close:x,isPortalled:w}),[x,w]),A=p.useMemo(()=>({open:s===0,close:x}),[s,x]),O=e,L={ref:a};return Y.createElement(K0.Provider,{value:null},Y.createElement(cC.Provider,{value:i},Y.createElement(uC.Provider,{value:S},Y.createElement(rC,{value:Re(s,{[0]:ut.Open,[1]:ut.Closed})},Fe({ourProps:L,theirProps:O,slot:A,defaultTag:Jre,name:"Popover"})))))}let tne="button";function rne(e,t){let r=Pt(),{id:n=`headlessui-popover-button-${r}`,...a}=e,[o,i]=G0("Popover.Button"),{isPortalled:s}=dC("Popover.Button"),l=p.useRef(null),u=`headlessui-focus-sentinel-${Pt()}`,f=ZD(),c=f==null?void 0:f.closeOthers,d=Zre()!==null;p.useEffect(()=>{if(!d)return i({type:3,buttonId:n}),()=>{i({type:3,buttonId:null})}},[d,n,i]);let[h]=p.useState(()=>Symbol()),g=We(l,t,d?null:L=>{if(L)o.buttons.current.push(h);else{let I=o.buttons.current.indexOf(h);I!==-1&&o.buttons.current.splice(I,1)}o.buttons.current.length>1,L&&i({type:2,button:L})}),m=We(l,t),w=ml(l),v=re(L=>{var I,N,E;if(d){if(o.popoverState===1)return;switch(L.key){case ye.Space:case ye.Enter:L.preventDefault(),(N=(I=L.target).click)==null||N.call(I),i({type:1}),(E=o.button)==null||E.focus();break}}else switch(L.key){case ye.Space:case ye.Enter:L.preventDefault(),L.stopPropagation(),o.popoverState===1&&(c==null||c(o.buttonId)),i({type:0});break;case ye.Escape:if(o.popoverState!==0)return c==null?void 0:c(o.buttonId);if(!l.current||w!=null&&w.activeElement&&!l.current.contains(w.activeElement))return;L.preventDefault(),L.stopPropagation(),i({type:1});break}}),b=re(L=>{d||L.key===ye.Space&&L.preventDefault()}),_=re(L=>{var I,N;kh(L.currentTarget)||e.disabled||(d?(i({type:1}),(I=o.button)==null||I.focus()):(L.preventDefault(),L.stopPropagation(),o.popoverState===1&&(c==null||c(o.buttonId)),i({type:0}),(N=o.button)==null||N.focus()))}),$=re(L=>{L.preventDefault(),L.stopPropagation()}),C=o.popoverState===0,k=p.useMemo(()=>({open:C}),[C]),x=H0(e,l),S=d?{ref:m,type:x,onKeyDown:v,onClick:_}:{ref:g,id:o.buttonId,type:x,"aria-expanded":e.disabled?void 0:o.popoverState===0,"aria-controls":o.panel?o.panelId:void 0,onKeyDown:v,onKeyUp:b,onClick:_,onMouseDown:$},A=aC(),O=re(()=>{let L=o.panel;if(!L)return;function I(){Re(A.current,{[Xr.Forwards]:()=>qt(L,et.First),[Xr.Backwards]:()=>qt(L,et.Last)})===ro.Error&&qt(V0().filter(N=>N.dataset.headlessuiFocusGuard!=="true"),Re(A.current,{[Xr.Forwards]:et.Next,[Xr.Backwards]:et.Previous}),{relativeTo:o.button})}I()});return Y.createElement(Y.Fragment,null,Fe({ourProps:S,theirProps:a,slot:k,defaultTag:tne,name:"Popover.Button"}),C&&!d&&s&&Y.createElement(Ta,{id:u,features:Ca.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:O}))}let nne="div",ane=Pn.RenderStrategy|Pn.Static;function one(e,t){let r=Pt(),{id:n=`headlessui-popover-overlay-${r}`,...a}=e,[{popoverState:o},i]=G0("Popover.Overlay"),s=We(t),l=Ou(),u=(()=>l!==null?(l&ut.Open)===ut.Open:o===0)(),f=re(d=>{if(kh(d.currentTarget))return d.preventDefault();i({type:1})}),c=p.useMemo(()=>({open:o===0}),[o]);return Fe({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:f},theirProps:a,slot:c,defaultTag:nne,features:ane,visible:u,name:"Popover.Overlay"})}let ine="div",sne=Pn.RenderStrategy|Pn.Static;function lne(e,t){let r=Pt(),{id:n=`headlessui-popover-panel-${r}`,focus:a=!1,...o}=e,[i,s]=G0("Popover.Panel"),{close:l,isPortalled:u}=dC("Popover.Panel"),f=`headlessui-focus-sentinel-before-${Pt()}`,c=`headlessui-focus-sentinel-after-${Pt()}`,d=p.useRef(null),h=We(d,t,x=>{s({type:4,panel:x})}),g=ml(d);gt(()=>(s({type:5,panelId:n}),()=>{s({type:5,panelId:null})}),[n,s]);let m=Ou(),w=(()=>m!==null?(m&ut.Open)===ut.Open:i.popoverState===0)(),v=re(x=>{var S;switch(x.key){case ye.Escape:if(i.popoverState!==0||!d.current||g!=null&&g.activeElement&&!d.current.contains(g.activeElement))return;x.preventDefault(),x.stopPropagation(),s({type:1}),(S=i.button)==null||S.focus();break}});p.useEffect(()=>{var x;e.static||i.popoverState===1&&((x=e.unmount)==null||x)&&s({type:4,panel:null})},[i.popoverState,e.unmount,e.static,s]),p.useEffect(()=>{if(!a||i.popoverState!==0||!d.current)return;let x=g==null?void 0:g.activeElement;d.current.contains(x)||qt(d.current,et.First)},[a,d,i.popoverState]);let b=p.useMemo(()=>({open:i.popoverState===0,close:l}),[i,l]),_={ref:h,id:n,onKeyDown:v,onBlur:a&&i.popoverState===0?x=>{var S,A,O,L,I;let N=x.relatedTarget;N&&d.current&&((S=d.current)!=null&&S.contains(N)||(s({type:1}),((O=(A=i.beforePanelSentinel.current)==null?void 0:A.contains)!=null&&O.call(A,N)||(I=(L=i.afterPanelSentinel.current)==null?void 0:L.contains)!=null&&I.call(L,N))&&N.focus({preventScroll:!0})))}:void 0,tabIndex:-1},$=aC(),C=re(()=>{let x=d.current;if(!x)return;function S(){Re($.current,{[Xr.Forwards]:()=>{var A;qt(x,et.First)===ro.Error&&((A=i.afterPanelSentinel.current)==null||A.focus())},[Xr.Backwards]:()=>{var A;(A=i.button)==null||A.focus({preventScroll:!0})}})}S()}),k=re(()=>{let x=d.current;if(!x)return;function S(){Re($.current,{[Xr.Forwards]:()=>{var A;if(!i.button)return;let O=V0(),L=O.indexOf(i.button),I=O.slice(0,L+1),N=[...O.slice(L+1),...I];for(let E of N.slice())if(E.dataset.headlessuiFocusGuard==="true"||(A=i.panel)!=null&&A.contains(E)){let R=N.indexOf(E);R!==-1&&N.splice(R,1)}qt(N,et.First,{sorted:!1})},[Xr.Backwards]:()=>{var A;qt(x,et.Previous)===ro.Error&&((A=i.button)==null||A.focus())}})}S()});return Y.createElement(K0.Provider,{value:n},w&&u&&Y.createElement(Ta,{id:f,ref:i.beforePanelSentinel,features:Ca.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:C}),Fe({ourProps:_,theirProps:o,slot:b,defaultTag:ine,features:sne,visible:w,name:"Popover.Panel"}),w&&u&&Y.createElement(Ta,{id:c,ref:i.afterPanelSentinel,features:Ca.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:k}))}let cne="div";function une(e,t){let r=p.useRef(null),n=We(r,t),[a,o]=p.useState([]),i=re(g=>{o(m=>{let w=m.indexOf(g);if(w!==-1){let v=m.slice();return v.splice(w,1),v}return m})}),s=re(g=>(o(m=>[...m,g]),()=>i(g))),l=re(()=>{var g;let m=Rh(r);if(!m)return!1;let w=m.activeElement;return(g=r.current)!=null&&g.contains(w)?!0:a.some(v=>{var b,_;return((b=m.getElementById(v.buttonId.current))==null?void 0:b.contains(w))||((_=m.getElementById(v.panelId.current))==null?void 0:_.contains(w))})}),u=re(g=>{for(let m of a)m.buttonId.current!==g&&m.close()}),f=p.useMemo(()=>({registerPopover:s,unregisterPopover:i,isFocusWithinPopoverGroup:l,closeOthers:u}),[s,i,l,u]),c=p.useMemo(()=>({}),[]),d=e,h={ref:n};return Y.createElement(fC.Provider,{value:f},Fe({ourProps:h,theirProps:d,slot:c,defaultTag:cne,name:"Popover.Group"}))}let dne=Be(ene),fne=Be(rne),hne=Be(one),pne=Be(lne),gne=Be(une),An=Object.assign(dne,{Button:fne,Overlay:hne,Panel:pne,Group:gne});function vne(e=0){let[t,r]=p.useState(e),n=Oh(),a=p.useCallback(l=>{n.current&&r(u=>u|l)},[t,n]),o=p.useCallback(l=>!!(t&l),[t]),i=p.useCallback(l=>{n.current&&r(u=>u&~l)},[r,n]),s=p.useCallback(l=>{n.current&&r(u=>u^l)},[r]);return{flags:t,addFlag:a,hasFlag:o,removeFlag:i,toggleFlag:s}}let QD=p.createContext(null);function JD(){let e=p.useContext(QD);if(e===null){let t=new Error("You used a