import{useState,useRef}from"react";import{q as s$1,l as l$1,o as o$1,U,C}from"./keyboard-D0PLkOsr.js";function i(a,b){let[c,d]=useState(a),e=s$1(a);return l$1(()=>d(e.current),[e,d,...b]),c}function T(a,b,f){let[c,g]=useState(f),h=void 0!==a,e=useRef(h),i=useRef(!1),j=useRef(!1);return!h||e.current||i.current?!h&&e.current&&!j.current&&(j.current=!0,e.current=h,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(i.current=!0,e.current=h,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.")),[h?a:c,o$1(a=>(h||g(a),null==b?void 0:b(a)))]}let p="div";var s=(a=>(a[a.None=1]="None",a[a.Focusable=2]="Focusable",a[a.Hidden=4]="Hidden",a))(s||{});function l(a,b){var c;let{features:e=1,...d}=a,f={ref:b,"aria-hidden":2==(2&e)||(null==(c=d["aria-hidden"])?void 0:c),hidden:!(4!=(4&e))||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==(4&e)&&2!=(2&e)&&{display:"none"})}};return C({ourProps:f,theirProps:d,slot:{},defaultTag:p,name:"Hidden"})}let u=U(l);function e(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:[];for(let[d,e]of Object.entries(a))o(c,f(b,d),e);return c}function f(a,b){return a?a+"["+b+"]":b}function o(a,b,c){if(Array.isArray(c))for(let[d,e]of c.entries())o(a,f(b,d.toString()),e);else c instanceof Date?a.push([b,c.toISOString()]):"boolean"==typeof c?a.push([b,c?"1":"0"]):"string"==typeof c?a.push([b,c]):"number"==typeof c?a.push([b,`${c}`]):null==c?a.push([b,""]):e(c,b,a)}export{T,e,i,s,u};